Skip to content

Commit

Permalink
[Communication Services - JobRouter] Initial commit (#17872)
Browse files Browse the repository at this point in the history
* initial commit

* add readmes

* revise readme

* fix swagger link

* fix swagger link, add closing brace to patch classification example

* Updating with latest swagger and prettier changes

* Fix prettier in swagger

* Fix examples

* Address many comments

* prettier and avocado fixes

* fix other issues

* add offerttlseonds to examples

* remove readonlys

* Change to upsert routes

* add descriptions

* add descriptions

* added empty properties for model validation

* Add missing descriptions/summaries

* Make reclassify an action

* Fix spell check

* Add required to requests and remove required attributes from some models

* removed csharp readme

* change order of worker and offer id parameters to match path

Co-authored-by: Charandeep Parisineti <[email protected]>
  • Loading branch information
rcoleobrien and cparisineti authored May 5, 2022
1 parent 77b673c commit 30c98b2
Show file tree
Hide file tree
Showing 45 changed files with 4,972 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "90eb00c4-234e-4df7-a231-ef7895518384",
"patch": {
"name": "Main",
"fallbackQueueId": "MainQueue",
"queueSelectors": [
{
"kind": "conditional",
"condition": {
"kind": "expression-rule",
"language": "PowerFx",
"expression": "1 = 1"
},
"labelSelectors": [
{
"key": "foo",
"labelOperator": "equal",
"value": "bar"
}
]
}
],
"prioritizationRule": {
"kind": "static-rule",
"value": "2"
}
}
},
"responses": {
"200": {
"body": {
"id": "90eb00c4-234e-4df7-a231-ef7895518384",
"name": "Main",
"fallbackQueueId": "MainQueue",
"queueSelectors": [
{
"kind": "conditional",
"condition": {
"kind": "expression-rule",
"language": "PowerFx",
"expression": "1 = 1"
},
"labelSelectors": [
{
"key": "foo",
"labelOperator": "equal",
"value": "bar"
}
]
}
],
"prioritizationRule": {
"kind": "static-rule",
"value": "2"
},
"workerSelectors": []
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "MainClassificationPolicy"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "MainClassificationPolicy"
},
"responses": {
"200": {
"body": {
"id": "MainClassificationPolicy",
"name": "Main",
"fallbackQueueId": "MainQueue",
"queueSelectors": [
{
"kind": "conditional",
"condition": {
"kind": "expression-rule",
"language": "PowerFx",
"expression": "1 = 1"
},
"labelSelectors": [
{
"key": "foo",
"labelOperator": "equal",
"value": "bar"
}
]
}
],
"prioritizationRule": {
"kind": "static-rule",
"value": "2"
},
"workerSelectors": [
{
"kind": "pass-through",
"key": "language",
"operator": "equal"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"maxpagesize": 2
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "MainClassificationPolicy",
"name": "Main",
"fallbackQueueId": "MainQueue",
"queueSelectors": [
{
"kind": "rule",
"rule": {
"kind": "expression-rule",
"language": "PowerFx",
"expression": "If(job.Escalated = true, \"SecondaryQueue\", \"MainQueue\")"
}
}
],
"prioritizationRule": {
"kind": "static-rule",
"value": "2"
},
"workerSelectors": []
},
{
"id": "SecondaryClassificationPolicy",
"name": "Secondary",
"fallbackQueueId": "MainQueue",
"queueSelectors": [
{
"kind": "rule",
"rule": {
"kind": "expression-rule",
"language": "PowerFx",
"expression": "If(job.VIP = true, \"VIPQueue\", \"MainQueue\")"
}
}
],
"prioritizationRule": {
"kind": "static-rule",
"value": "1"
},
"workerSelectors": []
}
],
"nextLink": "null"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "90eb00c4-234e-4df7-a231-ef7895518384",
"patch": {
"name": "MainUpdate"
}
},
"responses": {
"200": {
"body": {
"id": "90eb00c4-234e-4df7-a231-ef7895518384",
"name": "MainUpdate",
"fallbackQueueId": "MainQueue",
"queueSelectors": [
{
"kind": "conditional",
"condition": {
"kind": "expression-rule",
"language": "PowerFx",
"expression": "1 = 1"
},
"labelSelectors": [
{
"key": "foo",
"operator": "equal",
"value": "bar"
}
]
}
],
"prioritizationRule": {
"kind": "static-rule",
"value": "2"
},
"workerSelectors": []
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "d9033d56-659c-437a-b5b7-4f3b14301dd4",
"patch": {
"mode": {
"kind": "longest-idle",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 5,
"bypassSelectors": false
},
"offerTtlSeconds": 300,
"name": "Main"
}
},
"responses": {
"200": {
"body": {
"id": "d9033d56-659c-437a-b5b7-4f3b14301dd4",
"name": "Main",
"offerTtlSeconds": 300,
"mode": {
"kind": "longest-idle",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 5,
"bypassSelectors": false
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "MainDistributionPolicy"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "MainDistributionPolicy"
},
"responses": {
"200": {
"body": {
"id": "MainDistributionPolicy",
"name": "Main",
"offerTtlSeconds": 300,
"mode": {
"kind": "longest-idle",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 5,
"bypassSelectors": false
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"maxpagesize": 2
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "SecondaryDistributionPolicy",
"name": "Secondary",
"offerTtlSeconds": 300,
"mode": {
"kind": "round-robin",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 2,
"bypassSelectors": false
}
},
{
"id": "MainDistributionPolicy",
"name": "Main",
"offerTtlSeconds": 300,
"mode": {
"kind": "longest-idle",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 5,
"bypassSelectors": false
}
}
],
"nextLink": "null"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"endpoint": "https://contoso.westus.communications.azure.com",
"api-version": "2021-10-20_preview2",
"id": "d9033d56-659c-437a-b5b7-4f3b14301dd4",
"patch": {
"mode": {
"kind": "longest-idle",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 5,
"bypassSelectors": false
},
"offerTtlSeconds": 300,
"name": "Main"
}
},
"responses": {
"200": {
"body": {
"id": "d9033d56-659c-437a-b5b7-4f3b14301dd4",
"name": "Main",
"offerTtlSeconds": 300,
"mode": {
"kind": "longest-idle",
"minConcurrentOffers": 1,
"maxConcurrentOffers": 5,
"bypassSelectors": false
}
}
}
}
}
Loading

0 comments on commit 30c98b2

Please sign in to comment.