@azure/arm-communication 5.0.0-beta.1 → 5.0.0
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/dist/browser/api/communicationServiceManagementContext.js +1 -1
- package/dist/browser/api/communicationServiceManagementContext.js.map +1 -1
- package/dist/browser/restorePollerHelpers.js.map +1 -1
- package/dist/commonjs/api/communicationServiceManagementContext.js +1 -1
- package/dist/commonjs/api/communicationServiceManagementContext.js.map +1 -1
- package/dist/commonjs/restorePollerHelpers.js.map +2 -2
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/api/communicationServiceManagementContext.js +1 -1
- package/dist/esm/api/communicationServiceManagementContext.js.map +1 -1
- package/dist/esm/restorePollerHelpers.js.map +1 -1
- package/package.json +19 -60
- package/dist/react-native/api/communicationServiceManagementContext.d.ts +0 -22
- package/dist/react-native/api/communicationServiceManagementContext.js +0 -24
- package/dist/react-native/api/communicationServiceManagementContext.js.map +0 -1
- package/dist/react-native/api/communicationServices/index.d.ts +0 -3
- package/dist/react-native/api/communicationServices/index.js +0 -4
- package/dist/react-native/api/communicationServices/index.js.map +0 -1
- package/dist/react-native/api/communicationServices/operations.d.ts +0 -52
- package/dist/react-native/api/communicationServices/operations.js +0 -305
- package/dist/react-native/api/communicationServices/operations.js.map +0 -1
- package/dist/react-native/api/communicationServices/options.d.ts +0 -39
- package/dist/react-native/api/communicationServices/options.js +0 -4
- package/dist/react-native/api/communicationServices/options.js.map +0 -1
- package/dist/react-native/api/domains/index.d.ts +0 -3
- package/dist/react-native/api/domains/index.js +0 -4
- package/dist/react-native/api/domains/index.js.map +0 -1
- package/dist/react-native/api/domains/operations.d.ts +0 -40
- package/dist/react-native/api/domains/operations.js +0 -242
- package/dist/react-native/api/domains/operations.js.map +0 -1
- package/dist/react-native/api/domains/options.d.ts +0 -33
- package/dist/react-native/api/domains/options.js +0 -4
- package/dist/react-native/api/domains/options.js.map +0 -1
- package/dist/react-native/api/emailServices/index.d.ts +0 -3
- package/dist/react-native/api/emailServices/index.js +0 -4
- package/dist/react-native/api/emailServices/index.js.map +0 -1
- package/dist/react-native/api/emailServices/operations.d.ts +0 -40
- package/dist/react-native/api/emailServices/operations.js +0 -222
- package/dist/react-native/api/emailServices/operations.js.map +0 -1
- package/dist/react-native/api/emailServices/options.d.ts +0 -29
- package/dist/react-native/api/emailServices/options.js +0 -4
- package/dist/react-native/api/emailServices/options.js.map +0 -1
- package/dist/react-native/api/index.d.ts +0 -3
- package/dist/react-native/api/index.js +0 -4
- package/dist/react-native/api/index.js.map +0 -1
- package/dist/react-native/api/operations/index.d.ts +0 -3
- package/dist/react-native/api/operations/index.js +0 -4
- package/dist/react-native/api/operations/index.js.map +0 -1
- package/dist/react-native/api/operations/operations.d.ts +0 -10
- package/dist/react-native/api/operations/operations.js +0 -31
- package/dist/react-native/api/operations/operations.js.map +0 -1
- package/dist/react-native/api/operations/options.d.ts +0 -5
- package/dist/react-native/api/operations/options.js +0 -4
- package/dist/react-native/api/operations/options.js.map +0 -1
- package/dist/react-native/api/senderUsernames/index.d.ts +0 -3
- package/dist/react-native/api/senderUsernames/index.js +0 -4
- package/dist/react-native/api/senderUsernames/index.js.map +0 -1
- package/dist/react-native/api/senderUsernames/operations.d.ts +0 -27
- package/dist/react-native/api/senderUsernames/operations.js +0 -129
- package/dist/react-native/api/senderUsernames/operations.js.map +0 -1
- package/dist/react-native/api/senderUsernames/options.d.ts +0 -14
- package/dist/react-native/api/senderUsernames/options.js +0 -4
- package/dist/react-native/api/senderUsernames/options.js.map +0 -1
- package/dist/react-native/api/smtpUsernames/index.d.ts +0 -3
- package/dist/react-native/api/smtpUsernames/index.js +0 -4
- package/dist/react-native/api/smtpUsernames/index.js.map +0 -1
- package/dist/react-native/api/smtpUsernames/operations.d.ts +0 -27
- package/dist/react-native/api/smtpUsernames/operations.js +0 -125
- package/dist/react-native/api/smtpUsernames/operations.js.map +0 -1
- package/dist/react-native/api/smtpUsernames/options.d.ts +0 -14
- package/dist/react-native/api/smtpUsernames/options.js +0 -4
- package/dist/react-native/api/smtpUsernames/options.js.map +0 -1
- package/dist/react-native/api/suppressionListAddresses/index.d.ts +0 -3
- package/dist/react-native/api/suppressionListAddresses/index.js +0 -4
- package/dist/react-native/api/suppressionListAddresses/index.js.map +0 -1
- package/dist/react-native/api/suppressionListAddresses/operations.d.ts +0 -27
- package/dist/react-native/api/suppressionListAddresses/operations.js +0 -133
- package/dist/react-native/api/suppressionListAddresses/operations.js.map +0 -1
- package/dist/react-native/api/suppressionListAddresses/options.d.ts +0 -14
- package/dist/react-native/api/suppressionListAddresses/options.js +0 -4
- package/dist/react-native/api/suppressionListAddresses/options.js.map +0 -1
- package/dist/react-native/api/suppressionLists/index.d.ts +0 -3
- package/dist/react-native/api/suppressionLists/index.js +0 -4
- package/dist/react-native/api/suppressionLists/index.js.map +0 -1
- package/dist/react-native/api/suppressionLists/operations.d.ts +0 -27
- package/dist/react-native/api/suppressionLists/operations.js +0 -129
- package/dist/react-native/api/suppressionLists/operations.js.map +0 -1
- package/dist/react-native/api/suppressionLists/options.d.ts +0 -14
- package/dist/react-native/api/suppressionLists/options.js +0 -4
- package/dist/react-native/api/suppressionLists/options.js.map +0 -1
- package/dist/react-native/classic/communicationServices/index.d.ts +0 -44
- package/dist/react-native/classic/communicationServices/index.js +0 -40
- package/dist/react-native/classic/communicationServices/index.js.map +0 -1
- package/dist/react-native/classic/domains/index.d.ts +0 -50
- package/dist/react-native/classic/domains/index.js +0 -61
- package/dist/react-native/classic/domains/index.js.map +0 -1
- package/dist/react-native/classic/emailServices/index.d.ts +0 -42
- package/dist/react-native/classic/emailServices/index.js +0 -45
- package/dist/react-native/classic/emailServices/index.js.map +0 -1
- package/dist/react-native/classic/index.d.ts +0 -9
- package/dist/react-native/classic/index.js +0 -4
- package/dist/react-native/classic/index.js.map +0 -1
- package/dist/react-native/classic/operations/index.d.ts +0 -11
- package/dist/react-native/classic/operations/index.js +0 -14
- package/dist/react-native/classic/operations/index.js.map +0 -1
- package/dist/react-native/classic/senderUsernames/index.d.ts +0 -22
- package/dist/react-native/classic/senderUsernames/index.js +0 -17
- package/dist/react-native/classic/senderUsernames/index.js.map +0 -1
- package/dist/react-native/classic/smtpUsernames/index.d.ts +0 -22
- package/dist/react-native/classic/smtpUsernames/index.js +0 -17
- package/dist/react-native/classic/smtpUsernames/index.js.map +0 -1
- package/dist/react-native/classic/suppressionListAddresses/index.d.ts +0 -22
- package/dist/react-native/classic/suppressionListAddresses/index.js +0 -17
- package/dist/react-native/classic/suppressionListAddresses/index.js.map +0 -1
- package/dist/react-native/classic/suppressionLists/index.d.ts +0 -22
- package/dist/react-native/classic/suppressionLists/index.js +0 -17
- package/dist/react-native/classic/suppressionLists/index.js.map +0 -1
- package/dist/react-native/communicationServiceManagementClient.d.ts +0 -36
- package/dist/react-native/communicationServiceManagementClient.js +0 -53
- package/dist/react-native/communicationServiceManagementClient.js.map +0 -1
- package/dist/react-native/index.d.ts +0 -23
- package/dist/react-native/index.js +0 -8
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/logger.d.ts +0 -2
- package/dist/react-native/logger.js +0 -5
- package/dist/react-native/logger.js.map +0 -1
- package/dist/react-native/models/index.d.ts +0 -3
- package/dist/react-native/models/index.js +0 -4
- package/dist/react-native/models/index.js.map +0 -1
- package/dist/react-native/models/models.d.ts +0 -991
- package/dist/react-native/models/models.js +0 -979
- package/dist/react-native/models/models.js.map +0 -1
- package/dist/react-native/package.json +0 -3
- package/dist/react-native/restorePollerHelpers.d.ts +0 -21
- package/dist/react-native/restorePollerHelpers.js +0 -111
- package/dist/react-native/restorePollerHelpers.js.map +0 -1
- package/dist/react-native/static-helpers/cloudSettingHelpers.d.ts +0 -22
- package/dist/react-native/static-helpers/cloudSettingHelpers.js +0 -38
- package/dist/react-native/static-helpers/cloudSettingHelpers.js.map +0 -1
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +0 -74
- package/dist/react-native/static-helpers/pagingHelpers.js +0 -143
- package/dist/react-native/static-helpers/pagingHelpers.js.map +0 -1
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +0 -34
- package/dist/react-native/static-helpers/pollingHelpers.js +0 -95
- package/dist/react-native/static-helpers/pollingHelpers.js.map +0 -1
- package/dist/react-native/static-helpers/serialization/check-prop-undefined.d.ts +0 -8
- package/dist/react-native/static-helpers/serialization/check-prop-undefined.js +0 -17
- package/dist/react-native/static-helpers/serialization/check-prop-undefined.js.map +0 -1
- package/dist/react-native/static-helpers/simplePollerHelpers.d.ts +0 -73
- package/dist/react-native/static-helpers/simplePollerHelpers.js +0 -44
- package/dist/react-native/static-helpers/simplePollerHelpers.js.map +0 -1
- package/dist/react-native/static-helpers/urlTemplate.d.ts +0 -5
- package/dist/react-native/static-helpers/urlTemplate.js +0 -200
- package/dist/react-native/static-helpers/urlTemplate.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { getClient } from "@azure-rest/core-client";
|
|
|
7
7
|
export function createCommunicationServiceManagement(credential, subscriptionId, options = {}) {
|
|
8
8
|
const endpointUrl = options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com";
|
|
9
9
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
10
|
-
const userAgentInfo = `azsdk-js-arm-communication/5.0.0
|
|
10
|
+
const userAgentInfo = `azsdk-js-arm-communication/5.0.0`;
|
|
11
11
|
const userAgentPrefix = prefixFromOptions
|
|
12
12
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
13
13
|
: `azsdk-js-api ${userAgentInfo}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communicationServiceManagementContext.js","sourceRoot":"","sources":["../../../src/api/communicationServiceManagementContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAqBpD,2DAA2D;AAC3D,MAAM,UAAU,oCAAoC,CAClD,UAA2B,EAC3B,cAAsB,EACtB,UAA8D,EAAE;IAEhE,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8BAA8B,CAAC;IAC7F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"communicationServiceManagementContext.js","sourceRoot":"","sources":["../../../src/api/communicationServiceManagementContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAqBpD,2DAA2D;AAC3D,MAAM,UAAU,oCAAoC,CAClD,UAA2B,EAC3B,cAAsB,EACtB,UAA8D,EAAE;IAEhE,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8BAA8B,CAAC;IAC7F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,kCAAkC,CAAC;IACzD,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC,EAAE;KACpF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,cAAc,EAA2C,CAAC;AACnG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport interface CommunicationServiceManagementContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface CommunicationServiceManagementClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport function createCommunicationServiceManagement(\n credential: TokenCredential,\n subscriptionId: string,\n options: CommunicationServiceManagementClientOptionalParams = {},\n): CommunicationServiceManagementContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-communication/5.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, subscriptionId } as CommunicationServiceManagementContext;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,0BAA0B,IAAI,iCAAiC,GAChE,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,IAAI,wCAAwC,EAC/D,0BAA0B,IAAI,+CAA+C,GAC9E,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAgBnD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA4C,EAC5C,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI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;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationServiceManagementClient } from \"./communicationServiceManagementClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/emailServices/operations.js\";\nimport {\n _cancelVerificationDeserialize,\n _initiateVerificationDeserialize,\n _$deleteDeserialize as _$deleteDeserializeDomains,\n _updateDeserialize as _updateDeserializeDomains,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeDomains,\n} from \"./api/domains/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCommunicationServices,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCommunicationServices,\n} from \"./api/communicationServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CommunicationServiceManagementClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification\":\n { deserializer: _cancelVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification\":\n { deserializer: _initiateVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _$deleteDeserializeDomains, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _updateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _createOrUpdateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _$deleteDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _createOrUpdateDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,EAChC,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,0BAA0B,IAAI,iCAAiC,GAChE,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,IAAI,wCAAwC,EAC/D,0BAA0B,IAAI,+CAA+C,GAC9E,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAgBnD;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAA4C,EAC5C,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CA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AAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationServiceManagementClient } from \"./communicationServiceManagementClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/emailServices/operations.js\";\nimport {\n _cancelVerificationDeserialize,\n _initiateVerificationDeserialize,\n _$deleteDeserialize as _$deleteDeserializeDomains,\n _updateDeserialize as _updateDeserializeDomains,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeDomains,\n} from \"./api/domains/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCommunicationServices,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCommunicationServices,\n} from \"./api/communicationServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CommunicationServiceManagementClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n ResourceLocationConfig | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification\":\n { deserializer: _cancelVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification\":\n { deserializer: _initiateVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _$deleteDeserializeDomains, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _updateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _createOrUpdateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _$deleteDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _createOrUpdateDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"]}
|
|
@@ -26,7 +26,7 @@ var import_core_client = require("@azure-rest/core-client");
|
|
|
26
26
|
function createCommunicationServiceManagement(credential, subscriptionId, options = {}) {
|
|
27
27
|
const endpointUrl = options.endpoint ?? (0, import_cloudSettingHelpers.getArmEndpoint)(options.cloudSetting) ?? "https://management.azure.com";
|
|
28
28
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
29
|
-
const userAgentInfo = `azsdk-js-arm-communication/5.0.0
|
|
29
|
+
const userAgentInfo = `azsdk-js-arm-communication/5.0.0`;
|
|
30
30
|
const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`;
|
|
31
31
|
const { apiVersion: _, ...updatedOptions } = {
|
|
32
32
|
...options,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/api/communicationServiceManagementContext.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport interface CommunicationServiceManagementContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface CommunicationServiceManagementClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport function createCommunicationServiceManagement(\n credential: TokenCredential,\n subscriptionId: string,\n options: CommunicationServiceManagementClientOptionalParams = {},\n): CommunicationServiceManagementContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-communication/5.0.0
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport interface CommunicationServiceManagementContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface CommunicationServiceManagementClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport function createCommunicationServiceManagement(\n credential: TokenCredential,\n subscriptionId: string,\n options: CommunicationServiceManagementClientOptionalParams = {},\n): CommunicationServiceManagementContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-communication/5.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, subscriptionId } as CommunicationServiceManagementContext;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAGvB,iCAA+B;AAE/B,yBAA0B;AAsBnB,SAAS,qCACd,YACA,gBACA,UAA8D,CAAC,GACxB;AACvC,QAAM,cACJ,QAAQ,gBAAY,2CAAe,QAAQ,YAAY,KAAK;AAC9D,QAAM,oBAAoB,SAAS,kBAAkB;AACrD,QAAM,gBAAgB;AACtB,QAAM,kBAAkB,oBACpB,GAAG,iBAAiB,iBAAiB,aAAa,KAClD,gBAAgB,aAAa;AACjC,QAAM,EAAE,YAAY,GAAG,GAAG,eAAe,IAAI;AAAA,IAC3C,GAAG;AAAA,IACH,kBAAkB,EAAE,gBAAgB;AAAA,IACpC,gBAAgB,EAAE,QAAQ,QAAQ,gBAAgB,UAAU,qBAAO,KAAK;AAAA,IACxE,aAAa,EAAE,QAAQ,QAAQ,aAAa,UAAU,CAAC,GAAG,WAAW,WAAW,EAAE;AAAA,EACpF;AACA,QAAM,oBAAgB,8BAAU,aAAa,YAAY,cAAc;AACvE,QAAM,aAAa,QAAQ;AAC3B,SAAO,EAAE,GAAG,eAAe,YAAY,eAAe;AACxD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/restorePollerHelpers.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationServiceManagementClient } from \"./communicationServiceManagementClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/emailServices/operations.js\";\nimport {\n _cancelVerificationDeserialize,\n _initiateVerificationDeserialize,\n _$deleteDeserialize as _$deleteDeserializeDomains,\n _updateDeserialize as _updateDeserializeDomains,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeDomains,\n} from \"./api/domains/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCommunicationServices,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCommunicationServices,\n} from \"./api/communicationServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CommunicationServiceManagementClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAIO;AACP,IAAAA,qBAMO;AACP,IAAAA,qBAGO;AACP,4BAAqC;AAIrC,sBAAiC;AAqB1B,SAAS,cACd,QACA,iBACA,iBACA,SAC8C;AAC9C,QAAM,mBAAe,kCAAiB,eAAe,EAAE;AACvD,QAAM,EAAE,mBAAmB,eAAe,SAAS,IAAI;AACvD,MAAI,CAAC,qBAAqB,CAAC,eAAe;AACxC,UAAM,IAAI;AAAA,MACR,6BAA6B,eAAe,wBAAwB,iBAAiB,IAAI;AAAA,IAC3F;AAAA,EACF;AACA,QAAM,yBAAyB,WAAW,wBAAwB;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationServiceManagementClient } from \"./communicationServiceManagementClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/emailServices/operations.js\";\nimport {\n _cancelVerificationDeserialize,\n _initiateVerificationDeserialize,\n _$deleteDeserialize as _$deleteDeserializeDomains,\n _updateDeserialize as _updateDeserializeDomains,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeDomains,\n} from \"./api/domains/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCommunicationServices,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCommunicationServices,\n} from \"./api/communicationServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CommunicationServiceManagementClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n ResourceLocationConfig | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification\":\n { deserializer: _cancelVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification\":\n { deserializer: _initiateVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _$deleteDeserializeDomains, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _updateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _createOrUpdateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _$deleteDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _createOrUpdateDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAIO;AACP,IAAAA,qBAMO;AACP,IAAAA,qBAGO;AACP,4BAAqC;AAIrC,sBAAiC;AAqB1B,SAAS,cACd,QACA,iBACA,iBACA,SAC8C;AAC9C,QAAM,mBAAe,kCAAiB,eAAe,EAAE;AACvD,QAAM,EAAE,mBAAmB,eAAe,SAAS,IAAI;AACvD,MAAI,CAAC,qBAAqB,CAAC,eAAe;AACxC,UAAM,IAAI;AAAA,MACR,6BAA6B,eAAe,wBAAwB,iBAAiB,IAAI;AAAA,IAC3F;AAAA,EACF;AACA,QAAM,yBAAyB,WAAW,wBAAwB;AAElE,QAAM,EAAE,cAAc,mBAAmB,CAAC,EAAE,IAC1C,yBAAyB,mBAAmB,aAAa,KAAK,CAAC;AACjE,QAAM,oBAAoB,SAAS,uBAAuB;AAC1D,MAAI,CAAC,mBAAmB;AACtB,UAAM,IAAI;AAAA,MACR,0FAA0F,iBAAiB,IAAI;AAAA,IACjH;A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C,MAAI,aAAa,IACf;AAGF,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc,GAAG;AAGzD,QAAI,CAAC,IAAI,WAAW,MAAM,GAAG;AAC3B;AAAA,IACF;AACA,UAAM,gBAAgB,kBAAkB,GAAG;AAE3C,UAAM,iBAAiB,cAAc,MAAM,GAAG;AAG9C,QAAI,QAAQ;AACZ,aAAS,IAAI,eAAe,SAAS,GAAG,IAAI,UAAU,SAAS,GAAG,KAAK,KAAK,KAAK,GAAG,KAAK,KAAK;AAC5F,UAAI,eAAe,CAAC,GAAG,WAAW,GAAG,KAAK,eAAe,CAAC,GAAG,QAAQ,GAAG,MAAM,IAAI;AAChF,cAAM,QAAQ,eAAe,CAAC,EAAG,QAAQ,GAAG,IAAI,GAC9C,MAAM,eAAe,CAAC,GAAG;AAK3B,cAAM,YAAY,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,MAAM,OAAO,GAAG,CAAC,EAAE,EAAE;AAAA,UACtE,UAAU,CAAC,KAAK;AAAA,QAClB;AAEA,YAAI,CAAC,WAAW;AACd,kBAAQ;AACR;AAAA,QACF;AACA;AAAA,MACF;AAKA,UAAI,eAAe,CAAC,MAAM,UAAU,CAAC,GAAG;AACtC,gBAAQ;AACR;AAAA,MACF;AAAA,IACF;AAIA,QAAI,SAAS,cAAc,SAAS,YAAY;AAC9C,mBAAa,cAAc;AAC3B,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,QAAwB;AACjD,QAAM,YAAY,OAAO,QAAQ,GAAG;AACpC,SAAO,OAAO,MAAM,SAAS;AAC/B;AAEA,SAAS,qBAAqB,QAAoC;AAChE,QAAM,MAAM,IAAI,IAAI,MAAM;AAC1B,SAAO,IAAI,aAAa,IAAI,aAAa,KAAK;AAChD;",
|
|
6
6
|
"names": ["import_operations", "_$deleteDeserializeDomains", "_updateDeserializeDomains", "_createOrUpdateDeserializeDomains", "_$deleteDeserializeCommunicationServices", "_createOrUpdateDeserializeCommunicationServices"]
|
|
7
7
|
}
|
|
@@ -7,7 +7,7 @@ import { getClient } from "@azure-rest/core-client";
|
|
|
7
7
|
export function createCommunicationServiceManagement(credential, subscriptionId, options = {}) {
|
|
8
8
|
const endpointUrl = options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com";
|
|
9
9
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
10
|
-
const userAgentInfo = `azsdk-js-arm-communication/5.0.0
|
|
10
|
+
const userAgentInfo = `azsdk-js-arm-communication/5.0.0`;
|
|
11
11
|
const userAgentPrefix = prefixFromOptions
|
|
12
12
|
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
13
13
|
: `azsdk-js-api ${userAgentInfo}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communicationServiceManagementContext.js","sourceRoot":"","sources":["../../../src/api/communicationServiceManagementContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAqBpD,2DAA2D;AAC3D,MAAM,UAAU,oCAAoC,CAClD,UAA2B,EAC3B,cAAsB,EACtB,UAA8D,EAAE;IAEhE,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8BAA8B,CAAC;IAC7F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"communicationServiceManagementContext.js","sourceRoot":"","sources":["../../../src/api/communicationServiceManagementContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAqBpD,2DAA2D;AAC3D,MAAM,UAAU,oCAAoC,CAClD,UAA2B,EAC3B,cAAsB,EACtB,UAA8D,EAAE;IAEhE,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8BAA8B,CAAC;IAC7F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,kCAAkC,CAAC;IACzD,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC,EAAE;KACpF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,cAAc,EAA2C,CAAC;AACnG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport interface CommunicationServiceManagementContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface CommunicationServiceManagementClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport function createCommunicationServiceManagement(\n credential: TokenCredential,\n subscriptionId: string,\n options: CommunicationServiceManagementClientOptionalParams = {},\n): CommunicationServiceManagementContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-communication/5.0.0`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, subscriptionId } as CommunicationServiceManagementContext;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHel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M,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationServiceManagementClient } from \"./communicationServiceManagementClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/emailServices/operations.js\";\nimport {\n _cancelVerificationDeserialize,\n _initiateVerificationDeserialize,\n _$deleteDeserialize as _$deleteDeserializeDomains,\n _updateDeserialize as _updateDeserializeDomains,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeDomains,\n} from \"./api/domains/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCommunicationServices,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCommunicationServices,\n} from \"./api/communicationServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CommunicationServiceManagementClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification\":\n { deserializer: _cancelVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification\":\n { deserializer: _initiateVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _$deleteDeserializeDomains, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _updateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _createOrUpdateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _$deleteDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _createOrUpdateDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,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ACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationServiceManagementClient } from \"./communicationServiceManagementClient.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/emailServices/operations.js\";\nimport {\n _cancelVerificationDeserialize,\n _initiateVerificationDeserialize,\n _$deleteDeserialize as _$deleteDeserializeDomains,\n _updateDeserialize as _updateDeserializeDomains,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeDomains,\n} from \"./api/domains/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCommunicationServices,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCommunicationServices,\n} from \"./api/communicationServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CommunicationServiceManagementClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n ResourceLocationConfig | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/cancelVerification\":\n { deserializer: _cancelVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}/initiateVerification\":\n { deserializer: _initiateVerificationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _$deleteDeserializeDomains, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _updateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/emailServices/{emailServiceName}/domains/{domainName}\":\n { deserializer: _createOrUpdateDeserializeDomains, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _$deleteDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}\":\n {\n deserializer: _createOrUpdateDeserializeCommunicationServices,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/arm-communication",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A generated SDK for CommunicationServiceManagementClient.",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=22.0.0"
|
|
7
7
|
},
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"autoPublish": false,
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"module": "./dist/esm/index.js",
|
|
13
13
|
"types": "./dist/commonjs/index.d.ts",
|
|
14
14
|
"browser": "./dist/browser/index.js",
|
|
15
|
-
"react-native": "./dist/react-native/index.js",
|
|
16
15
|
"exports": {
|
|
17
16
|
"./package.json": "./package.json",
|
|
18
17
|
".": {
|
|
@@ -20,10 +19,6 @@
|
|
|
20
19
|
"types": "./dist/browser/index.d.ts",
|
|
21
20
|
"default": "./dist/browser/index.js"
|
|
22
21
|
},
|
|
23
|
-
"react-native": {
|
|
24
|
-
"types": "./dist/react-native/index.d.ts",
|
|
25
|
-
"default": "./dist/react-native/index.js"
|
|
26
|
-
},
|
|
27
22
|
"import": {
|
|
28
23
|
"types": "./dist/esm/index.d.ts",
|
|
29
24
|
"default": "./dist/esm/index.js"
|
|
@@ -38,10 +33,6 @@
|
|
|
38
33
|
"types": "./dist/browser/api/index.d.ts",
|
|
39
34
|
"default": "./dist/browser/api/index.js"
|
|
40
35
|
},
|
|
41
|
-
"react-native": {
|
|
42
|
-
"types": "./dist/react-native/api/index.d.ts",
|
|
43
|
-
"default": "./dist/react-native/api/index.js"
|
|
44
|
-
},
|
|
45
36
|
"import": {
|
|
46
37
|
"types": "./dist/esm/api/index.d.ts",
|
|
47
38
|
"default": "./dist/esm/api/index.js"
|
|
@@ -56,10 +47,6 @@
|
|
|
56
47
|
"types": "./dist/browser/api/suppressionListAddresses/index.d.ts",
|
|
57
48
|
"default": "./dist/browser/api/suppressionListAddresses/index.js"
|
|
58
49
|
},
|
|
59
|
-
"react-native": {
|
|
60
|
-
"types": "./dist/react-native/api/suppressionListAddresses/index.d.ts",
|
|
61
|
-
"default": "./dist/react-native/api/suppressionListAddresses/index.js"
|
|
62
|
-
},
|
|
63
50
|
"import": {
|
|
64
51
|
"types": "./dist/esm/api/suppressionListAddresses/index.d.ts",
|
|
65
52
|
"default": "./dist/esm/api/suppressionListAddresses/index.js"
|
|
@@ -74,10 +61,6 @@
|
|
|
74
61
|
"types": "./dist/browser/api/suppressionLists/index.d.ts",
|
|
75
62
|
"default": "./dist/browser/api/suppressionLists/index.js"
|
|
76
63
|
},
|
|
77
|
-
"react-native": {
|
|
78
|
-
"types": "./dist/react-native/api/suppressionLists/index.d.ts",
|
|
79
|
-
"default": "./dist/react-native/api/suppressionLists/index.js"
|
|
80
|
-
},
|
|
81
64
|
"import": {
|
|
82
65
|
"types": "./dist/esm/api/suppressionLists/index.d.ts",
|
|
83
66
|
"default": "./dist/esm/api/suppressionLists/index.js"
|
|
@@ -92,10 +75,6 @@
|
|
|
92
75
|
"types": "./dist/browser/api/smtpUsernames/index.d.ts",
|
|
93
76
|
"default": "./dist/browser/api/smtpUsernames/index.js"
|
|
94
77
|
},
|
|
95
|
-
"react-native": {
|
|
96
|
-
"types": "./dist/react-native/api/smtpUsernames/index.d.ts",
|
|
97
|
-
"default": "./dist/react-native/api/smtpUsernames/index.js"
|
|
98
|
-
},
|
|
99
78
|
"import": {
|
|
100
79
|
"types": "./dist/esm/api/smtpUsernames/index.d.ts",
|
|
101
80
|
"default": "./dist/esm/api/smtpUsernames/index.js"
|
|
@@ -110,10 +89,6 @@
|
|
|
110
89
|
"types": "./dist/browser/api/senderUsernames/index.d.ts",
|
|
111
90
|
"default": "./dist/browser/api/senderUsernames/index.js"
|
|
112
91
|
},
|
|
113
|
-
"react-native": {
|
|
114
|
-
"types": "./dist/react-native/api/senderUsernames/index.d.ts",
|
|
115
|
-
"default": "./dist/react-native/api/senderUsernames/index.js"
|
|
116
|
-
},
|
|
117
92
|
"import": {
|
|
118
93
|
"types": "./dist/esm/api/senderUsernames/index.d.ts",
|
|
119
94
|
"default": "./dist/esm/api/senderUsernames/index.js"
|
|
@@ -128,10 +103,6 @@
|
|
|
128
103
|
"types": "./dist/browser/api/emailServices/index.d.ts",
|
|
129
104
|
"default": "./dist/browser/api/emailServices/index.js"
|
|
130
105
|
},
|
|
131
|
-
"react-native": {
|
|
132
|
-
"types": "./dist/react-native/api/emailServices/index.d.ts",
|
|
133
|
-
"default": "./dist/react-native/api/emailServices/index.js"
|
|
134
|
-
},
|
|
135
106
|
"import": {
|
|
136
107
|
"types": "./dist/esm/api/emailServices/index.d.ts",
|
|
137
108
|
"default": "./dist/esm/api/emailServices/index.js"
|
|
@@ -146,10 +117,6 @@
|
|
|
146
117
|
"types": "./dist/browser/api/domains/index.d.ts",
|
|
147
118
|
"default": "./dist/browser/api/domains/index.js"
|
|
148
119
|
},
|
|
149
|
-
"react-native": {
|
|
150
|
-
"types": "./dist/react-native/api/domains/index.d.ts",
|
|
151
|
-
"default": "./dist/react-native/api/domains/index.js"
|
|
152
|
-
},
|
|
153
120
|
"import": {
|
|
154
121
|
"types": "./dist/esm/api/domains/index.d.ts",
|
|
155
122
|
"default": "./dist/esm/api/domains/index.js"
|
|
@@ -164,10 +131,6 @@
|
|
|
164
131
|
"types": "./dist/browser/api/communicationServices/index.d.ts",
|
|
165
132
|
"default": "./dist/browser/api/communicationServices/index.js"
|
|
166
133
|
},
|
|
167
|
-
"react-native": {
|
|
168
|
-
"types": "./dist/react-native/api/communicationServices/index.d.ts",
|
|
169
|
-
"default": "./dist/react-native/api/communicationServices/index.js"
|
|
170
|
-
},
|
|
171
134
|
"import": {
|
|
172
135
|
"types": "./dist/esm/api/communicationServices/index.d.ts",
|
|
173
136
|
"default": "./dist/esm/api/communicationServices/index.js"
|
|
@@ -182,10 +145,6 @@
|
|
|
182
145
|
"types": "./dist/browser/api/operations/index.d.ts",
|
|
183
146
|
"default": "./dist/browser/api/operations/index.js"
|
|
184
147
|
},
|
|
185
|
-
"react-native": {
|
|
186
|
-
"types": "./dist/react-native/api/operations/index.d.ts",
|
|
187
|
-
"default": "./dist/react-native/api/operations/index.js"
|
|
188
|
-
},
|
|
189
148
|
"import": {
|
|
190
149
|
"types": "./dist/esm/api/operations/index.d.ts",
|
|
191
150
|
"default": "./dist/esm/api/operations/index.js"
|
|
@@ -200,10 +159,6 @@
|
|
|
200
159
|
"types": "./dist/browser/models/index.d.ts",
|
|
201
160
|
"default": "./dist/browser/models/index.js"
|
|
202
161
|
},
|
|
203
|
-
"react-native": {
|
|
204
|
-
"types": "./dist/react-native/models/index.d.ts",
|
|
205
|
-
"default": "./dist/react-native/models/index.js"
|
|
206
|
-
},
|
|
207
162
|
"import": {
|
|
208
163
|
"types": "./dist/esm/models/index.d.ts",
|
|
209
164
|
"default": "./dist/esm/models/index.js"
|
|
@@ -261,22 +216,22 @@
|
|
|
261
216
|
},
|
|
262
217
|
"devDependencies": {
|
|
263
218
|
"@azure/identity": "4.13.0",
|
|
264
|
-
"@types/node": "^
|
|
265
|
-
"cross-env": "^10.1.0",
|
|
266
|
-
"eslint": "^9.39.1",
|
|
267
|
-
"prettier": "^3.6.2",
|
|
268
|
-
"rimraf": "^6.1.0",
|
|
219
|
+
"@types/node": "^22.0.0",
|
|
269
220
|
"@vitest/browser-playwright": "^4.1.2",
|
|
270
221
|
"@vitest/coverage-istanbul": "^4.1.2",
|
|
222
|
+
"cross-env": "^10.1.0",
|
|
271
223
|
"dotenv": "^16.6.1",
|
|
272
|
-
"
|
|
224
|
+
"eslint": "^9.39.1",
|
|
225
|
+
"playwright": "^1.60.0",
|
|
226
|
+
"prettier": "^3.9.1",
|
|
227
|
+
"rimraf": "^6.1.0",
|
|
273
228
|
"typescript": "~6.0.2",
|
|
274
229
|
"vitest": "^4.1.2",
|
|
275
230
|
"@azure-tools/test-credential": "^2.1.2",
|
|
231
|
+
"@azure-tools/test-utils-vitest": "^2.0.1",
|
|
276
232
|
"@azure-tools/test-recorder": "^4.1.1",
|
|
277
|
-
"@azure/dev-tool": "^1.0.0",
|
|
278
233
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
279
|
-
"@azure
|
|
234
|
+
"@azure/dev-tool": "^1.0.0"
|
|
280
235
|
},
|
|
281
236
|
"//sampleConfiguration": {
|
|
282
237
|
"productName": "@azure/arm-communication",
|
|
@@ -284,7 +239,12 @@
|
|
|
284
239
|
"azure"
|
|
285
240
|
],
|
|
286
241
|
"disableDocsMs": true,
|
|
287
|
-
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-communication
|
|
242
|
+
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-communication"
|
|
243
|
+
},
|
|
244
|
+
"imports": {
|
|
245
|
+
"#platform/*": {
|
|
246
|
+
"default": "./src/*.ts"
|
|
247
|
+
}
|
|
288
248
|
},
|
|
289
249
|
"scripts": {
|
|
290
250
|
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
@@ -292,16 +252,15 @@
|
|
|
292
252
|
"pack": "pnpm pack 2>&1",
|
|
293
253
|
"lint": "echo skipped",
|
|
294
254
|
"lint:fix": "echo skipped",
|
|
295
|
-
"build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f",
|
|
255
|
+
"build:samples": "tsc -p config/tsconfig.samples.json && dev-tool samples publish -f",
|
|
296
256
|
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
|
|
297
257
|
"execute:samples": "dev-tool samples run samples-dev",
|
|
298
258
|
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"",
|
|
299
259
|
"generate:client": "echo skipped",
|
|
300
|
-
"test:browser": "dev-tool run
|
|
260
|
+
"test:browser": "dev-tool run test:vitest --browser",
|
|
301
261
|
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
302
262
|
"test:node": "dev-tool run test:vitest",
|
|
303
|
-
"test
|
|
304
|
-
"test": "npm run test:node && npm run test:browser",
|
|
263
|
+
"test": "tsc -b --noEmit && npm run test:node && npm run test:browser",
|
|
305
264
|
"update-snippets": "dev-tool run update-snippets"
|
|
306
265
|
}
|
|
307
266
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { AzureSupportedClouds } from "../static-helpers/cloudSettingHelpers.js";
|
|
2
|
-
import type { Client, ClientOptions } from "@azure-rest/core-client";
|
|
3
|
-
import type { TokenCredential } from "@azure/core-auth";
|
|
4
|
-
/** REST API for Email Services/Domains/SuppressionLists */
|
|
5
|
-
export interface CommunicationServiceManagementContext extends Client {
|
|
6
|
-
/** The ID of the target subscription. The value must be an UUID. */
|
|
7
|
-
subscriptionId: string;
|
|
8
|
-
/** The API version to use for this operation. */
|
|
9
|
-
/** Known values of {@link KnownVersions} that the service accepts. */
|
|
10
|
-
apiVersion?: string;
|
|
11
|
-
}
|
|
12
|
-
/** Optional parameters for the client. */
|
|
13
|
-
export interface CommunicationServiceManagementClientOptionalParams extends ClientOptions {
|
|
14
|
-
/** The API version to use for this operation. */
|
|
15
|
-
/** Known values of {@link KnownVersions} that the service accepts. */
|
|
16
|
-
apiVersion?: string;
|
|
17
|
-
/** Specifies the Azure cloud environment for the client. */
|
|
18
|
-
cloudSetting?: AzureSupportedClouds;
|
|
19
|
-
}
|
|
20
|
-
/** REST API for Email Services/Domains/SuppressionLists */
|
|
21
|
-
export declare function createCommunicationServiceManagement(credential: TokenCredential, subscriptionId: string, options?: CommunicationServiceManagementClientOptionalParams): CommunicationServiceManagementContext;
|
|
22
|
-
//# sourceMappingURL=communicationServiceManagementContext.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { logger } from "../logger.js";
|
|
4
|
-
import { getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js";
|
|
5
|
-
import { getClient } from "@azure-rest/core-client";
|
|
6
|
-
/** REST API for Email Services/Domains/SuppressionLists */
|
|
7
|
-
export function createCommunicationServiceManagement(credential, subscriptionId, options = {}) {
|
|
8
|
-
const endpointUrl = options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com";
|
|
9
|
-
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
10
|
-
const userAgentInfo = `azsdk-js-arm-communication/5.0.0-beta.1`;
|
|
11
|
-
const userAgentPrefix = prefixFromOptions
|
|
12
|
-
? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
|
|
13
|
-
: `azsdk-js-api ${userAgentInfo}`;
|
|
14
|
-
const { apiVersion: _, ...updatedOptions } = {
|
|
15
|
-
...options,
|
|
16
|
-
userAgentOptions: { userAgentPrefix },
|
|
17
|
-
loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
|
|
18
|
-
credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },
|
|
19
|
-
};
|
|
20
|
-
const clientContext = getClient(endpointUrl, credential, updatedOptions);
|
|
21
|
-
const apiVersion = options.apiVersion;
|
|
22
|
-
return { ...clientContext, apiVersion, subscriptionId };
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=communicationServiceManagementContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"communicationServiceManagementContext.js","sourceRoot":"","sources":["../../../src/api/communicationServiceManagementContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAqBpD,2DAA2D;AAC3D,MAAM,UAAU,oCAAoC,CAClD,UAA2B,EAC3B,cAAsB,EACtB,UAA8D,EAAE;IAEhE,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8BAA8B,CAAC;IAC7F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,yCAAyC,CAAC;IAChE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC,EAAE;KACpF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,cAAc,EAA2C,CAAC;AACnG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport interface CommunicationServiceManagementContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface CommunicationServiceManagementClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\n/** REST API for Email Services/Domains/SuppressionLists */\nexport function createCommunicationServiceManagement(\n credential: TokenCredential,\n subscriptionId: string,\n options: CommunicationServiceManagementClientOptionalParams = {},\n): CommunicationServiceManagementContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-communication/5.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, subscriptionId } as CommunicationServiceManagementContext;\n}\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { checkNameAvailability, regenerateKey, listKeys, linkNotificationHub, listBySubscription, listByResourceGroup, $delete, update, createOrUpdate, get, } from "./operations.js";
|
|
2
|
-
export type { CommunicationServicesCheckNameAvailabilityOptionalParams, CommunicationServicesRegenerateKeyOptionalParams, CommunicationServicesListKeysOptionalParams, CommunicationServicesLinkNotificationHubOptionalParams, CommunicationServicesListBySubscriptionOptionalParams, CommunicationServicesListByResourceGroupOptionalParams, CommunicationServicesDeleteOptionalParams, CommunicationServicesUpdateOptionalParams, CommunicationServicesCreateOrUpdateOptionalParams, CommunicationServicesGetOptionalParams, } from "./options.js";
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
export { checkNameAvailability, regenerateKey, listKeys, linkNotificationHub, listBySubscription, listByResourceGroup, $delete, update, createOrUpdate, get, } from "./operations.js";
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/communicationServices/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,cAAc,EACd,GAAG,GACJ,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n checkNameAvailability,\n regenerateKey,\n listKeys,\n linkNotificationHub,\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"./operations.js\";\nexport type {\n CommunicationServicesCheckNameAvailabilityOptionalParams,\n CommunicationServicesRegenerateKeyOptionalParams,\n CommunicationServicesListKeysOptionalParams,\n CommunicationServicesLinkNotificationHubOptionalParams,\n CommunicationServicesListBySubscriptionOptionalParams,\n CommunicationServicesListByResourceGroupOptionalParams,\n CommunicationServicesDeleteOptionalParams,\n CommunicationServicesUpdateOptionalParams,\n CommunicationServicesCreateOrUpdateOptionalParams,\n CommunicationServicesGetOptionalParams,\n} from \"./options.js\";\n"]}
|