Skip to content

Commit 06220e0

Browse files
[JobRouter] Minor fix to readme (Azure#26031)
### 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)
1 parent 6133290 commit 06220e0

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

sdk/communication/communication-job-router/review/communication-job-router.api.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,16 @@ export interface CreateWorkerOptions extends JobRouterUpsertWorkerOptionalParams
169169
totalCapacity?: number;
170170
}
171171

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

177+
// @public
178+
export interface DeclineJobOfferRequest {
179+
reofferTimeUtc?: Date;
180+
}
181+
179182
// @public
180183
export interface DirectMapRule extends RouterRule {
181184
kind: "direct-map-rule";
@@ -377,6 +380,11 @@ export type JobRouterCompleteJobActionResponse = {
377380
body: any;
378381
};
379382

383+
// @public
384+
export interface JobRouterDeclineJobActionOptionalParams extends coreClient.OperationOptions {
385+
declineJobOfferRequest?: DeclineJobOfferRequest;
386+
}
387+
380388
// @public
381389
export type JobRouterDeclineJobActionResponse = {
382390
body: any;

sdk/communication/communication-job-router/src/models/models.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export {
6565
JobRouterUpsertJobOptionalParams,
6666
JobRouterUpsertWorkerOptionalParams,
6767
JobRouterReclassifyJobActionOptionalParams,
68+
JobRouterDeclineJobActionOptionalParams,
69+
DeclineJobOfferRequest,
6870
ClassificationPolicyItem,
6971
DistributionPolicyItem,
7072
ExceptionPolicyItem,

sdk/communication/communication-job-router/src/routerClient.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,11 @@ export class RouterClient {
310310
offerId: string,
311311
options: DeclineJobOfferOptions = {}
312312
): Promise<JobRouterDeclineJobActionResponse> {
313+
if (options.reofferTimeUtc) {
314+
options.declineJobOfferRequest = {
315+
reofferTimeUtc: options.reofferTimeUtc,
316+
};
317+
}
313318
return this.client.jobRouter.declineJobAction(workerId, offerId, options);
314319
}
315320

0 commit comments

Comments
 (0)