Skip to content

Commit

Permalink
[JobRouter] Minor fix to readme (#26031)
Browse files Browse the repository at this point in the history
### Packages impacted by this PR


### Issues associated with this PR


### Describe the problem that is addressed by this PR


### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
  • Loading branch information
williamzhao87 authored May 29, 2023
1 parent 6133290 commit 06220e0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
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

0 comments on commit 06220e0

Please sign in to comment.