@azure-rest/communication-job-router 1.1.0-beta.1 → 1.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -115
- package/dist/browser/azureCommunicationRoutingServiceClient.d.ts +14 -0
- package/dist/browser/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
- package/dist/browser/azureCommunicationRoutingServiceClient.js +40 -0
- package/dist/browser/azureCommunicationRoutingServiceClient.js.map +1 -0
- package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
- package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
- package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.js +29 -0
- package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
- package/dist/browser/clientDefinitions.d.ts +159 -0
- package/dist/browser/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/clientDefinitions.js +4 -0
- package/dist/browser/clientDefinitions.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +13 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/isUnexpected.d.ts +35 -0
- package/dist/browser/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/isUnexpected.js +1 -1
- package/dist/browser/isUnexpected.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/logger.js +1 -1
- package/{dist-esm/src → dist/browser}/logger.js.map +1 -1
- package/dist/browser/models.d.ts +562 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +4 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/outputModels.d.ts +683 -0
- package/dist/browser/outputModels.d.ts.map +1 -0
- package/dist/browser/outputModels.js +4 -0
- package/dist/browser/outputModels.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/paginateHelper.d.ts +68 -0
- package/dist/browser/paginateHelper.d.ts.map +1 -0
- package/dist/browser/paginateHelper.js +167 -0
- package/dist/browser/paginateHelper.js.map +1 -0
- package/dist/browser/parameters.d.ts +245 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js +4 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/responses.d.ts +616 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js +4 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/commonjs/azureCommunicationRoutingServiceClient.d.ts +14 -0
- package/dist/commonjs/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
- package/dist/commonjs/azureCommunicationRoutingServiceClient.js +43 -0
- package/dist/commonjs/azureCommunicationRoutingServiceClient.js.map +1 -0
- package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
- package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
- package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.js +33 -0
- package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
- package/dist/commonjs/clientDefinitions.d.ts +159 -0
- package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/clientDefinitions.js +5 -0
- package/dist/commonjs/clientDefinitions.js.map +1 -0
- package/dist/commonjs/index.d.ts +11 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +16 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/isUnexpected.d.ts +35 -0
- package/dist/commonjs/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/isUnexpected.js +105 -0
- package/dist/commonjs/isUnexpected.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +562 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/outputModels.d.ts +683 -0
- package/dist/commonjs/outputModels.d.ts.map +1 -0
- package/dist/commonjs/outputModels.js +5 -0
- package/dist/commonjs/outputModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/paginateHelper.d.ts +68 -0
- package/dist/commonjs/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/paginateHelper.js +170 -0
- package/dist/commonjs/paginateHelper.js.map +1 -0
- package/dist/commonjs/parameters.d.ts +245 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/responses.d.ts +616 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/azureCommunicationRoutingServiceClient.d.ts +14 -0
- package/dist/esm/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
- package/dist/esm/azureCommunicationRoutingServiceClient.js +40 -0
- package/dist/esm/azureCommunicationRoutingServiceClient.js.map +1 -0
- package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
- package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
- package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.js +29 -0
- package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
- package/dist/esm/clientDefinitions.d.ts +159 -0
- package/dist/esm/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/clientDefinitions.js +4 -0
- package/dist/esm/clientDefinitions.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isUnexpected.d.ts +35 -0
- package/dist/esm/isUnexpected.d.ts.map +1 -0
- package/dist/esm/isUnexpected.js +102 -0
- package/dist/esm/isUnexpected.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +562 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/outputModels.d.ts +683 -0
- package/dist/esm/outputModels.d.ts.map +1 -0
- package/dist/esm/outputModels.js +4 -0
- package/dist/esm/outputModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/paginateHelper.d.ts +68 -0
- package/dist/esm/paginateHelper.d.ts.map +1 -0
- package/dist/esm/paginateHelper.js +167 -0
- package/dist/esm/paginateHelper.js.map +1 -0
- package/dist/esm/parameters.d.ts +245 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/responses.d.ts +616 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/react-native/azureCommunicationRoutingServiceClient.d.ts +14 -0
- package/dist/react-native/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
- package/dist/react-native/azureCommunicationRoutingServiceClient.js +40 -0
- package/dist/react-native/azureCommunicationRoutingServiceClient.js.map +1 -0
- package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
- package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
- package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.js +29 -0
- package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
- package/dist/react-native/clientDefinitions.d.ts +159 -0
- package/dist/react-native/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/clientDefinitions.js +4 -0
- package/dist/react-native/clientDefinitions.js.map +1 -0
- package/dist/react-native/index.d.ts +11 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/isUnexpected.d.ts +35 -0
- package/dist/react-native/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/isUnexpected.js +102 -0
- package/dist/react-native/isUnexpected.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +562 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/outputModels.d.ts +683 -0
- package/dist/react-native/outputModels.d.ts.map +1 -0
- package/dist/react-native/outputModels.js +4 -0
- package/dist/react-native/outputModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/paginateHelper.d.ts +68 -0
- package/dist/react-native/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/paginateHelper.js +167 -0
- package/dist/react-native/paginateHelper.js.map +1 -0
- package/dist/react-native/parameters.d.ts +245 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/responses.d.ts +616 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/package.json +79 -63
- package/dist/index.js +0 -229
- package/dist/index.js.map +0 -1
- package/dist-esm/src/azureCommunicationRoutingServiceClient.js +0 -42
- package/dist-esm/src/azureCommunicationRoutingServiceClient.js.map +0 -1
- package/dist-esm/src/clientDefinitions.js +0 -4
- package/dist-esm/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/index.js +0 -13
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/models.js +0 -4
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/outputModels.js +0 -4
- package/dist-esm/src/outputModels.js.map +0 -1
- package/dist-esm/src/paginateHelper.js +0 -70
- package/dist-esm/src/paginateHelper.js.map +0 -1
- package/dist-esm/src/parameters.js +0 -4
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/responses.js +0 -4
- package/dist-esm/src/responses.js.map +0 -1
- package/review/communication-job-router.api.md +0 -2485
- package/types/communication-job-router.d.ts +0 -2677
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A container for the rules that govern how jobs are classified. */\nexport interface ClassificationPolicy {\n /** Friendly name of this policy. */\n name?: string;\n /** Id of a fallback queue to select if queue selector attachments doesn't find a match. */\n fallbackQueueId?: string;\n /** Queue selector attachments used to resolve a queue for a job. */\n queueSelectorAttachments?: Array<QueueSelectorAttachment>;\n /** A rule to determine a priority score for a job. */\n prioritizationRule?: RouterRule;\n /** Worker selector attachments used to attach worker selectors to a job. */\n workerSelectorAttachments?: Array<WorkerSelectorAttachment>;\n}\n\n/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */\nexport interface QueueSelectorAttachmentParent {\n kind: QueueSelectorAttachmentKind;\n}\n\n/** Describes a set of queue selectors that will be attached if the given condition resolves to true. */\nexport interface ConditionalQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** The condition that must be true for the queue selectors to be attached. */\n condition: RouterRule;\n /** The queue selectors to attach. */\n queueSelectors: Array<RouterQueueSelector>;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"conditional\";\n}\n\n/**\n * A rule of one of the following types:\n * StaticRule: A rule providing static rules that always return the same result, regardless of input.\n * DirectMapRule: A rule that return the same labels as the input labels.\n * ExpressionRule: A rule providing inline expression rules.\n * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\n * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.\n */\nexport interface RouterRuleParent {\n kind: RouterRuleKind;\n}\n\n/** A rule that return the same labels as the input labels. */\nexport interface DirectMapRouterRule extends RouterRuleParent {\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"directMap\";\n}\n\n/** A rule providing inline expression rules. */\nexport interface ExpressionRouterRule extends RouterRuleParent {\n /**\n * The expression language to compile to and execute.\n *\n * Possible values: \"powerFx\"\n */\n language?: ExpressionRouterRuleLanguage;\n /** An expression to evaluate. Should contain return statement with calculated values. */\n expression: string;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"expression\";\n}\n\n/** A rule providing a binding to an HTTP Triggered Azure Function. */\nexport interface FunctionRouterRule extends RouterRuleParent {\n /** URL for Azure Function. */\n functionUri: string;\n /** Credentials used to access Azure function rule. */\n credential?: FunctionRouterRuleCredential;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"function\";\n}\n\n/** Credentials used to access Azure function rule. */\nexport interface FunctionRouterRuleCredential {\n /** Access key scoped to a particular function. */\n functionKey?: string;\n /** Access key scoped to a Azure Function app. This key grants access to all functions under the app. */\n appKey?: string;\n /** Client id, when AppKey is provided In context of Azure function, this is usually the name of the key. */\n clientId?: string;\n}\n\n/** A rule providing static rules that always return the same result, regardless of input. */\nexport interface StaticRouterRule extends RouterRuleParent {\n /** The static value this rule always returns. Values must be primitive values - number, string, boolean. */\n value?: unknown;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"static\";\n}\n\n/** A rule providing a binding to an external web server. */\nexport interface WebhookRouterRule extends RouterRuleParent {\n /** Uri for Authorization Server. */\n authorizationServerUri?: string;\n /** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */\n clientCredential?: OAuth2WebhookClientCredential;\n /** Uri for Contoso's Web Server. */\n webhookUri?: string;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"webhook\";\n}\n\n/** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */\nexport interface OAuth2WebhookClientCredential {\n /** ClientId for Contoso Authorization server. */\n clientId?: string;\n /** Client secret for Contoso Authorization server. */\n clientSecret?: string;\n}\n\n/** Describes a condition that must be met against a set of labels for queue selection. */\nexport interface RouterQueueSelector {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value defined on the label selector.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: LabelOperator;\n /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */\n value?: unknown;\n}\n\n/** Attaches a queue selector where the value is passed through from a job's label with the same key. */\nexport interface PassThroughQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value pass through.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: LabelOperator;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"passThrough\";\n}\n\n/** Attaches queue selectors to a job when the RouterRule is resolved. */\nexport interface RuleEngineQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** A RouterRule that resolves a collection of queue selectors to attach. */\n rule: RouterRule;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"ruleEngine\";\n}\n\n/** Describes a queue selector that will be attached to a job. */\nexport interface StaticQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** The queue selector to attach. */\n queueSelector: RouterQueueSelector;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"static\";\n}\n\n/** Describes multiple sets of queue selectors, of which one will be selected and attached according to a weighting. */\nexport interface WeightedAllocationQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** A collection of percentage based weighted allocations. */\n allocations: Array<QueueWeightedAllocation>;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"weightedAllocation\";\n}\n\n/** Contains the weight percentage and queue selectors to be applied if selected for weighted distributions. */\nexport interface QueueWeightedAllocation {\n /** The percentage of this weight, expressed as a fraction of 1. */\n weight: number;\n /** A collection of queue selectors that will be applied if this allocation is selected. */\n queueSelectors: Array<RouterQueueSelector>;\n}\n\n/** An attachment which attaches worker selectors to a job. */\nexport interface WorkerSelectorAttachmentParent {\n kind: WorkerSelectorAttachmentKind;\n}\n\n/** Describes a set of worker selectors that will be attached if the given condition resolves to true. */\nexport interface ConditionalWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** The condition that must be true for the worker selectors to be attached. */\n condition: RouterRule;\n /** The worker selectors to attach. */\n workerSelectors: Array<RouterWorkerSelector>;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"conditional\";\n}\n\n/** Describes a condition that must be met against a set of labels for worker selection. */\nexport interface RouterWorkerSelector {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value defined on the worker selector.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: LabelOperator;\n /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */\n value?: unknown;\n /** Describes how long this label selector is valid in seconds. */\n expiresAfterSeconds?: number;\n /** Pushes a job to the front of the queue as long as this selector is active. */\n expedite?: boolean;\n}\n\n/** Attaches a worker selector where the value is passed through from a job's label with the same key. */\nexport interface PassThroughWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value pass through.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: LabelOperator;\n /** Describes how long the attached label selector is valid in seconds. */\n expiresAfterSeconds?: number;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"passThrough\";\n}\n\n/** Attaches worker selectors to a job when a RouterRule is resolved. */\nexport interface RuleEngineWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** A RouterRule that resolves a collection of worker selectors to attach. */\n rule: RouterRule;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"ruleEngine\";\n}\n\n/** Describes a worker selector that will be attached to a job. */\nexport interface StaticWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** The worker selector to attach. */\n workerSelector: RouterWorkerSelector;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"static\";\n}\n\n/** Describes multiple sets of worker selectors, of which one will be selected and attached according to a weighting. */\nexport interface WeightedAllocationWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** A collection of percentage based weighted allocations. */\n allocations: Array<WorkerWeightedAllocation>;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"weightedAllocation\";\n}\n\n/** Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. */\nexport interface WorkerWeightedAllocation {\n /** The percentage of this weight, expressed as a fraction of 1. */\n weight: number;\n /** A collection of worker selectors that will be applied if this allocation is selected. */\n workerSelectors: Array<RouterWorkerSelector>;\n}\n\n/** Policy governing how jobs are distributed to workers */\nexport interface DistributionPolicy {\n /** Friendly name of this policy. */\n name?: string;\n /** Number of seconds after which any offers created under this policy will be expired. */\n offerExpiresAfterSeconds?: number;\n /** Mode governing the specific distribution method. */\n mode?: DistributionMode;\n}\n\n/** Abstract base class for defining a distribution mode. */\nexport interface DistributionModeParent {\n /** Governs the minimum desired number of active concurrent offers a job can have. */\n minConcurrentOffers?: number;\n /** Governs the maximum number of active concurrent offers a job can have. */\n maxConcurrentOffers?: number;\n /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */\n bypassSelectors?: boolean;\n kind: DistributionModeKind;\n}\n\n/** Jobs are distributed to the worker with the strongest abilities available. */\nexport interface BestWorkerMode extends DistributionModeParent {\n /** Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function). */\n scoringRule?: RouterRule;\n /** Options to configure 'scoringRule'. If not set, default values are used. */\n scoringRuleOptions?: ScoringRuleOptions;\n /** The type discriminator describing a sub-type of Mode */\n kind: \"bestWorker\";\n}\n\n/** Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode. */\nexport interface ScoringRuleOptions {\n /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */\n batchSize?: number;\n /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */\n scoringParameters?: ScoringRuleParameterSelector[];\n /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */\n isBatchScoringEnabled?: boolean;\n /** If false, will sort scores by ascending order. By default, set to true. */\n descendingOrder?: boolean;\n}\n\n/** Jobs are directed to the worker who has been idle longest. */\nexport interface LongestIdleMode extends DistributionModeParent {\n /** The type discriminator describing a sub-type of Mode. */\n kind: \"longestIdle\";\n}\n\n/** Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job. */\nexport interface RoundRobinMode extends DistributionModeParent {\n /** The type discriminator describing a sub-type of Mode. */\n kind: \"roundRobin\";\n}\n\n/** A policy that defines actions to execute when exception are triggered. */\nexport interface ExceptionPolicy {\n /** Friendly name of this policy. */\n name?: string;\n /** A collection of exception rules on the exception policy. */\n exceptionRules?: Array<ExceptionRule>;\n}\n\n/** A rule that defines actions to execute upon a specific trigger. */\nexport interface ExceptionRule {\n /** Id of an exception rule. */\n id: string;\n /** The trigger for this exception rule. */\n trigger: ExceptionTrigger;\n /** A collection of actions to perform once the exception is triggered. */\n actions: Array<ExceptionAction>;\n}\n\n/** Abstract base class for defining a trigger for exception rules. */\nexport interface ExceptionTriggerParent {\n kind: ExceptionTriggerKind;\n}\n\n/** Trigger for an exception action on exceeding queue length. */\nexport interface QueueLengthExceptionTrigger extends ExceptionTriggerParent {\n /** Threshold of number of jobs ahead in the queue to for this trigger to fire. */\n threshold: number;\n /** The type discriminator describing a sub-type of ExceptionTrigger. */\n kind: \"queueLength\";\n}\n\n/** Trigger for an exception action on exceeding wait time. */\nexport interface WaitTimeExceptionTrigger extends ExceptionTriggerParent {\n /** Threshold for wait time for this trigger. */\n thresholdSeconds: number;\n /** The type discriminator describing a sub-type of ExceptionTrigger. */\n kind: \"waitTime\";\n}\n\n/** The action to take when the exception is triggered. */\nexport interface ExceptionActionParent {\n /** Unique Id of the exception action. */\n id?: string;\n kind: ExceptionActionKind;\n}\n\n/** An action that marks a job as cancelled. */\nexport interface CancelExceptionAction extends ExceptionActionParent {\n /** A note that will be appended to a job's notes collection with the current timestamp. */\n note?: string;\n /** Indicates the outcome of a job, populate this field with your own custom values. */\n dispositionCode?: string;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"cancel\";\n}\n\n/** An action that manually reclassifies a job by providing the queue, priority and worker selectors. */\nexport interface ManualReclassifyExceptionAction extends ExceptionActionParent {\n /** Updated QueueId. */\n queueId?: string;\n /** Updated Priority. */\n priority?: number;\n /** Updated WorkerSelectors. */\n workerSelectors?: Array<RouterWorkerSelector>;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"manualReclassify\";\n}\n\n/** An action that modifies labels on a job and then reclassifies it. */\nexport interface ReclassifyExceptionAction extends ExceptionActionParent {\n /** The new classification policy that will determine queue, priority and worker selectors. */\n classificationPolicyId?: string;\n /** Dictionary containing the labels to update (or add if not existing) in key-value pairs. Values must be primitive values - number, string, boolean. */\n labelsToUpsert?: Record<string, unknown>;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"reclassify\";\n}\n\n/** A queue that can contain jobs to be routed. */\nexport interface RouterQueue {\n /** Friendly name of this queue. */\n name?: string;\n /** Id of a distribution policy that will determine how a job is distributed to workers. */\n distributionPolicyId?: string;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, unknown>;\n /** Id of an exception policy that determines various job escalation rules. */\n exceptionPolicyId?: string;\n}\n\n/** A unit of work to be routed */\nexport interface RouterJob {\n /** Reference to an external parent context, eg. call ID. */\n channelReference?: string;\n /** The channel identifier. eg. voice, chat, etc. */\n channelId?: string;\n /** Id of a classification policy used for classifying this job. */\n classificationPolicyId?: string;\n /** Id of a queue that this job is queued to. */\n queueId?: string;\n /** Priority of this job. Value must be between -100 to 100. */\n priority?: number;\n /** Reason code for cancelled or closed jobs. */\n dispositionCode?: string;\n /** A collection of manually specified worker selectors, which a worker must satisfy in order to process this job. */\n requestedWorkerSelectors?: Array<RouterWorkerSelector>;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, unknown>;\n /** A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean. */\n tags?: Record<string, unknown>;\n /** Notes attached to a job, sorted by timestamp. */\n notes?: Array<RouterJobNote>;\n /** If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode. */\n matchingMode?: JobMatchingMode;\n}\n\n/** Assignment details of a job to a worker. */\nexport interface RouterJobAssignment {\n /** Id of the Worker assigned to the job. */\n workerId?: string;\n /** Timestamp when the job was assigned to a worker in UTC. */\n assignedAt: Date | string;\n /** Timestamp when the job was marked as completed after being assigned in UTC. */\n completedAt?: Date | string;\n /** Timestamp when the job was marked as closed after being completed in UTC. */\n closedAt?: Date | string;\n}\n\n/** A note attached to a job. */\nexport interface RouterJobNote {\n /** The message contained in the note. */\n message: string;\n /** The time at which the note was added in UTC. If not provided, will default to the current time. */\n addedAt?: Date | string;\n}\n\n/**\n * A matching mode of one of the following types:\n * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\n * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\n * SuspendMode: Used when matching workers to a job needs to be suspended.\n */\nexport interface JobMatchingModeParent {\n kind: JobMatchingModeKind;\n}\n\n/** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */\nexport interface ScheduleAndSuspendMode extends JobMatchingModeParent {\n /** Requested schedule time. */\n scheduleAt: Date | string;\n /** The type discriminator describing ScheduleAndSuspendMode */\n kind: \"scheduleAndSuspend\";\n}\n\n/** Describes a matching mode where matching worker to a job is automatically started after job is queued successfully. */\nexport interface QueueAndMatchMode extends JobMatchingModeParent {\n /** The type discriminator describing QueueAndMatchMode */\n kind: \"queueAndMatch\";\n}\n\n/** Describes a matching mode where matching worker to a job is suspended. */\nexport interface SuspendMode extends JobMatchingModeParent {\n /** The type discriminator describing SuspendMode */\n kind: \"suspend\";\n}\n\n/** Request payload for reclassifying jobs. */\nexport interface ReclassifyJobOptions {}\n\n/** Request payload for cancelling a job. */\nexport interface CancelJobOptions {\n /** A note that will be appended to a job's Notes collection with the current timestamp. */\n note?: string;\n /** Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of \"Cancelled\" is set. */\n dispositionCode?: string;\n}\n\n/** Request payload for completing jobs. */\nexport interface CompleteJobOptions {\n /** A note that will be appended to a job's Notes collection with the current timestamp. */\n note?: string;\n}\n\n/** Request payload for closing jobs */\nexport interface CloseJobOptions {\n /** Indicates the outcome of a job, populate this field with your own custom values. */\n dispositionCode?: string;\n /** If not provided, worker capacity is released immediately along with a JobClosedEvent notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC. */\n closeAt?: Date | string;\n /** A note that will be appended to a job's Notes collection with the current timestamp. */\n note?: string;\n}\n\n/** Request payload for unassigning a job. */\nexport interface UnassignJobOptions {\n /** If SuspendMatching is true, then a job is not queued for re-matching with a worker. */\n suspendMatching?: boolean;\n}\n\n/** Request payload for declining offers. */\nexport interface DeclineJobOfferOptions {\n /** If the RetryOfferAt is not provided, then this job will not be offered again to the worker who declined this job unless the worker is de-registered and re-registered. If a RetryOfferAt time is provided, then the job will be re-matched to eligible workers at the retry time in UTC. The worker that declined the job will also be eligible for the job at that time. */\n retryOfferAt?: Date | string;\n}\n\n/** An entity for jobs to be routed to. */\nexport interface RouterWorker {\n /** Collection of queue(s) that this worker can receive work from. */\n queues?: string[];\n /** The total capacity score this worker has to manage multiple concurrent jobs. */\n capacity?: number;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, unknown>;\n /** A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean. */\n tags?: Record<string, unknown>;\n /** Collection of channel(s) this worker can handle and their impact on the workers capacity. */\n channels?: Array<RouterChannel>;\n /** A flag indicating this worker is open to receive offers or not. */\n availableForOffers?: boolean;\n /** If this is set, the worker will only receive up to this many new offers at a time. */\n maxConcurrentOffers?: number;\n}\n\n/** Represents the capacity a job in this channel will consume from a worker. */\nexport interface RouterChannel {\n /** Id of a channel. */\n channelId: string;\n /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */\n capacityCostPerJob: number;\n /** The maximum number of jobs that can be supported concurrently for this channel. Value must be greater than zero. */\n maxNumberOfJobs?: number;\n}\n\n/** An offer of a job to a worker. */\nexport interface RouterJobOffer {\n /** Id of the job. */\n jobId: string;\n /** The capacity cost consumed by the job offer. */\n capacityCost: number;\n /** Timestamp when the offer was created in UTC. */\n offeredAt?: Date | string;\n /** Timestamp when the offer will expire in UTC. */\n expiresAt?: Date | string;\n}\n\n/** The assignment for a worker to a job. */\nexport interface RouterWorkerAssignment {\n /** Id of the assignment. */\n assignmentId: string;\n /** Id of the job assigned. */\n jobId: string;\n /** The amount of capacity this assignment has consumed on the worker. */\n capacityCost: number;\n /** The assignment time of the job in UTC. */\n assignedAt: Date | string;\n}\n\n/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */\nexport type QueueSelectorAttachment =\n | QueueSelectorAttachmentParent\n | ConditionalQueueSelectorAttachment\n | PassThroughQueueSelectorAttachment\n | RuleEngineQueueSelectorAttachment\n | StaticQueueSelectorAttachment\n | WeightedAllocationQueueSelectorAttachment;\n/**\n * A rule of one of the following types:\n * StaticRule: A rule providing static rules that always return the same result, regardless of input.\n * DirectMapRule: A rule that return the same labels as the input labels.\n * ExpressionRule: A rule providing inline expression rules.\n * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\n * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.\n */\nexport type RouterRule =\n | RouterRuleParent\n | DirectMapRouterRule\n | ExpressionRouterRule\n | FunctionRouterRule\n | StaticRouterRule\n | WebhookRouterRule;\n/** An attachment which attaches worker selectors to a job. */\nexport type WorkerSelectorAttachment =\n | WorkerSelectorAttachmentParent\n | ConditionalWorkerSelectorAttachment\n | PassThroughWorkerSelectorAttachment\n | RuleEngineWorkerSelectorAttachment\n | StaticWorkerSelectorAttachment\n | WeightedAllocationWorkerSelectorAttachment;\n/** Abstract base class for defining a distribution mode. */\nexport type DistributionMode =\n | DistributionModeParent\n | BestWorkerMode\n | LongestIdleMode\n | RoundRobinMode;\n/** Abstract base class for defining a trigger for exception rules. */\nexport type ExceptionTrigger =\n | ExceptionTriggerParent\n | QueueLengthExceptionTrigger\n | WaitTimeExceptionTrigger;\n/** The action to take when the exception is triggered. */\nexport type ExceptionAction =\n | ExceptionActionParent\n | CancelExceptionAction\n | ManualReclassifyExceptionAction\n | ReclassifyExceptionAction;\n/**\n * A matching mode of one of the following types:\n * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\n * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\n * SuspendMode: Used when matching workers to a job needs to be suspended.\n */\nexport type JobMatchingMode =\n | JobMatchingModeParent\n | ScheduleAndSuspendMode\n | QueueAndMatchMode\n | SuspendMode;\n/** Alias for QueueSelectorAttachmentKind */\nexport type QueueSelectorAttachmentKind = string;\n/** Alias for RouterRuleKind */\nexport type RouterRuleKind = string;\n/** Alias for ExpressionRouterRuleLanguage */\nexport type ExpressionRouterRuleLanguage = string;\n/** Alias for LabelOperator */\nexport type LabelOperator = string;\n/** Alias for WorkerSelectorAttachmentKind */\nexport type WorkerSelectorAttachmentKind = string;\n/** Alias for RouterWorkerSelectorStatus */\nexport type RouterWorkerSelectorStatus = string;\n/** Alias for DistributionModeKind */\nexport type DistributionModeKind = string;\n/** Alias for ScoringRuleParameterSelector */\nexport type ScoringRuleParameterSelector = string;\n/** Alias for ExceptionTriggerKind */\nexport type ExceptionTriggerKind = string;\n/** Alias for ExceptionActionKind */\nexport type ExceptionActionKind = string;\n/** Alias for RouterJobStatus */\nexport type RouterJobStatus = string;\n/** Alias for JobMatchingModeKind */\nexport type JobMatchingModeKind = string;\n/** Alias for RouterJobStatusSelector */\nexport type RouterJobStatusSelector = string;\n/** Alias for RouterWorkerState */\nexport type RouterWorkerState = string;\n/** Alias for RouterWorkerStateSelector */\nexport type RouterWorkerStateSelector = string;\n"]}
|