diff --git a/package-lock.json b/package-lock.json index b420236240e4..e00aebe18ded 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2543,6 +2543,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "autorest": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/autorest/-/autorest-3.6.3.tgz", + "integrity": "sha512-j/Axwk9bniifTNtBLYVxfQZGQIGPKljFaCQCBWOiybVar2j3tkHP1btiC4a/t9pAJXY6IaFgWctoPM3G/Puhyg==" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", diff --git a/package.json b/package.json index c96a4693c2f4..673d44ce3027 100644 --- a/package.json +++ b/package.json @@ -41,5 +41,8 @@ "prettier": "prettier", "tsc": "tsc", "multiapi": "ts-node ./scripts/multiapi.ts" + }, + "dependencies": { + "autorest": "^3.6.3" } } diff --git a/specification/communication/data-plane/Common/stable/2022-07-13/common.json b/specification/communication/data-plane/Common/stable/2022-07-13/common.json index a5b3fd88c562..2d24910d6e8f 100644 --- a/specification/communication/data-plane/Common/stable/2022-07-13/common.json +++ b/specification/communication/data-plane/Common/stable/2022-07-13/common.json @@ -84,6 +84,30 @@ "modelAsString": true } }, + "CallingCommunicationIdentifierModel": { + "description": "Calling communication identifier model", + "allOf": [ + { + "$ref": "#/definitions/CommunicationIdentifierModel" + } + ], + "properties": { + "unknownIdentifiers": { + "$ref": "#/definitions/UnknownIdentifierModel", + "description": "The unknown identifier." + } + } + }, + "UnknownIdentifierModel": { + "description": "Unknown identifier identifier model", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unknown id." + } + } + }, "CommunicationIdentifierModel": { "description": "Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value.", "type": "object", diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json index 4983a7f06344..f22f0fe4d35c 100644 --- a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json @@ -7,6 +7,32 @@ }, "paths": {}, "definitions": { + "AcsIncomingCallEventData": { + "description": "Schema of the Data property of an EventGridEvent for an Microsoft.Communication.IncomingCall event", + "type": "object", + "properties": { + "to": { + "description": "The communication identifier of the target user.", + "$ref": "../../../../../communication/data-plane/Common/stable/2022-07-13/common.json#/definitions/CallingCommunicationIdentifierModel" + }, + "from": { + "description": "The communication identifier of the user who initiated the call.", + "$ref": "../../../../../communication/data-plane/Common/stable/2022-07-13/common.json#/definitions/CallingCommunicationIdentifierModel" + }, + "callerDisplayName": { + "description": "Display name of caller.", + "type": "string" + }, + "incomingCallContext": { + "description": "Incoming call context & compact payload.", + "type": "string" + }, + "correlationId": { + "description": "CorrelationId (CallId).", + "type": "string" + } + } + }, "AcsUserDisconnectedEventData": { "description": "Schema of the Data property of an EventGridEvent for an Microsoft.Communication.UserDisconnected event.", "properties": { diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/incoming_call.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/incoming_call.json new file mode 100644 index 000000000000..f6023af310c0 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/cloud-events-schema/incoming_call.json @@ -0,0 +1,26 @@ +{ + "id": "81fa5460-7d8c-4fb7-bbb7-2d56154e78d9", + "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}", + "subject": "/call/{call-id}", + "data": { + "to": { + "rawId": "8:acs:5354158b-17b7-489c-9380-95d8821ff76b_0000000c-6c47-7dfd-6d70-224822000cfb", + "communicationUser": { + "id": "8:acs:5354158b-17b7-489c-9380-95d8821ff76b_0000000c-6c47-7dfd-6d70-224822000cfb" + } + }, + "from": { + "rawId": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_0000000c-6c47-7dfd-6d70-224822000cfb", + "communicationUser": { + "id": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_0000000c-6c47-7dfd-6d70-224822000cfb" + } + }, + "callerDisplayName": "VOIP Caller", + "incomingCallContext": "H4sIAAAAAAAEAMVX+2/bOBL+VwQfcD9cS4sUJUrkwjg4jn3NNa/m0WuL4AKKomw2sqSV6Ee62//9hpbzsnOH4naBKrAicjjffD0iODO/9ZQsitPKmtwoaU1V9sRvvbyp5u6/yXqilwipWiElylgapk", + "correlationId": "correlationId" + }, + "eventType": "Microsoft.Communication.IncomingCall", + "dataVersion": "1.0", + "metadataVersion": "1", + "eventTime": "2022-12-30T21:13:45Z" +} diff --git a/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/incoming_call.json b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/incoming_call.json new file mode 100644 index 000000000000..f6023af310c0 --- /dev/null +++ b/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/examples/event-grid-schema/incoming_call.json @@ -0,0 +1,26 @@ +{ + "id": "81fa5460-7d8c-4fb7-bbb7-2d56154e78d9", + "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}", + "subject": "/call/{call-id}", + "data": { + "to": { + "rawId": "8:acs:5354158b-17b7-489c-9380-95d8821ff76b_0000000c-6c47-7dfd-6d70-224822000cfb", + "communicationUser": { + "id": "8:acs:5354158b-17b7-489c-9380-95d8821ff76b_0000000c-6c47-7dfd-6d70-224822000cfb" + } + }, + "from": { + "rawId": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_0000000c-6c47-7dfd-6d70-224822000cfb", + "communicationUser": { + "id": "8:acs:0a420b29-555c-4f6b-841e-de8059893bb9_0000000c-6c47-7dfd-6d70-224822000cfb" + } + }, + "callerDisplayName": "VOIP Caller", + "incomingCallContext": "H4sIAAAAAAAEAMVX+2/bOBL+VwQfcD9cS4sUJUrkwjg4jn3NNa/m0WuL4AKKomw2sqSV6Ee62//9hpbzsnOH4naBKrAicjjffD0iODO/9ZQsitPKmtwoaU1V9sRvvbyp5u6/yXqilwipWiElylgapk", + "correlationId": "correlationId" + }, + "eventType": "Microsoft.Communication.IncomingCall", + "dataVersion": "1.0", + "metadataVersion": "1", + "eventTime": "2022-12-30T21:13:45Z" +}