Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JobRouter] Minor fix to API #26031

Merged
merged 2 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,16 @@ export interface CreateWorkerOptions extends JobRouterUpsertWorkerOptionalParams
totalCapacity?: number;
}

// Warning: (ae-forgotten-export) The symbol "JobRouterDeclineJobActionOptionalParams" needs to be exported by the entry point index.d.ts
//
// @public
export interface DeclineJobOfferOptions extends JobRouterDeclineJobActionOptionalParams {
reofferTimeUtc?: Date;
}

// @public
export interface DeclineJobOfferRequest {
reofferTimeUtc?: Date;
}

// @public
export interface DirectMapRule extends RouterRule {
kind: "direct-map-rule";
Expand Down Expand Up @@ -377,6 +380,11 @@ export type JobRouterCompleteJobActionResponse = {
body: any;
};

// @public
export interface JobRouterDeclineJobActionOptionalParams extends coreClient.OperationOptions {
declineJobOfferRequest?: DeclineJobOfferRequest;
}

// @public
export type JobRouterDeclineJobActionResponse = {
body: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export {
JobRouterUpsertJobOptionalParams,
JobRouterUpsertWorkerOptionalParams,
JobRouterReclassifyJobActionOptionalParams,
JobRouterDeclineJobActionOptionalParams,
DeclineJobOfferRequest,
ClassificationPolicyItem,
DistributionPolicyItem,
ExceptionPolicyItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ export class RouterClient {
offerId: string,
options: DeclineJobOfferOptions = {}
): Promise<JobRouterDeclineJobActionResponse> {
if (options.reofferTimeUtc) {
options.declineJobOfferRequest = {
reofferTimeUtc: options.reofferTimeUtc,
};
}
return this.client.jobRouter.declineJobAction(workerId, offerId, options);
}

Expand Down