@azure-rest/communication-messages 2.0.0 → 2.0.1-alpha.20241111.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/generated/src/logger.ts","../src/generated/src/messagesServiceClient.ts","../src/messagesServiceClient.ts","../src/generated/src/isUnexpected.ts","../src/generated/src/paginateHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"communication-messages\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { MessagesServiceClient } from \"./clientDefinitions\";\n\n/** The optional parameters for the client */\nexport interface MessagesServiceClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpointParam - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential | KeyCredential,\n { apiVersion = \"2024-08-30\", ...options }: MessagesServiceClientOptions = {},\n): MessagesServiceClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n const userAgentInfo = `azsdk-js-communication-messages-rest/2.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://communication.azure.com/.default\",\n ],\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"Authorization\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MessagesServiceClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n TokenCredential,\n isTokenCredential,\n KeyCredential,\n isKeyCredential,\n} from \"@azure/core-auth\";\nimport { ClientOptions } from \"@azure-rest/core-client\";\nimport { parseClientArguments, createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { MessagesServiceClient } from \"./generated/src/clientDefinitions\";\nimport GeneratedAzureCommunicationMessageServiceClient from \"./generated/src/messagesServiceClient\";\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The endpoint of your Communication Services resource.\n * @param credential - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointOrConnectionString: string,\n credentialOrOptions?: ClientOptions | (TokenCredential | KeyCredential),\n options?: ClientOptions,\n): MessagesServiceClient {\n if (!(isTokenCredential(credentialOrOptions) || isKeyCredential(credentialOrOptions))) {\n options = credentialOrOptions as ClientOptions;\n }\n\n if (options === undefined) {\n options = {};\n }\n\n const { url, credential } = parseClientArguments(endpointOrConnectionString, credentialOrOptions);\n const baseUrl = options.baseUrl ?? `${url}`;\n\n const client = GeneratedAzureCommunicationMessageServiceClient(baseUrl, credential, options);\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /messages/streams/{id}\": [\"200\"],\n \"POST /messages/notifications:send\": [\"202\"],\n \"GET /messages/channels/{channelId}/templates\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetMedia200Response | GetMediaDefaultResponse,\n): response is GetMediaDefaultResponse;\nexport function isUnexpected(\n response: Send202Response | SendDefaultResponse,\n): response is SendDefaultResponse;\nexport function isUnexpected(\n response: ListTemplates200Response | ListTemplatesDefaultResponse,\n): response is ListTemplatesDefaultResponse;\nexport function isUnexpected(\n response:\n | GetMedia200Response\n | GetMediaDefaultResponse\n | Send202Response\n | SendDefaultResponse\n | ListTemplates200Response\n | ListTemplatesDefaultResponse,\n): response is\n | GetMediaDefaultResponse\n | SendDefaultResponse\n | ListTemplatesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\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: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\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 (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\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(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n getPagedAsyncIterator,\n PagedAsyncIterableIterator,\n PagedResult,\n} from \"@azure/core-paging\";\nimport {\n Client,\n createRestError,\n PathUncheckedResponse,\n} from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun\n ? initialResponse\n : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(\n `Body Property ${nextLinkName} should be a string or undefined`,\n );\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\n \"200\",\n \"201\",\n \"202\",\n \"203\",\n \"204\",\n \"205\",\n \"206\",\n \"207\",\n \"208\",\n \"226\",\n ];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MessagesServiceClient from \"./messagesServiceClient\";\nexport * from \"./generated/src/messagesServiceClient\";\nexport * from \"./generated/src/parameters\";\nexport * from \"./generated/src/responses\";\nexport * from \"./generated/src/clientDefinitions\";\nexport * from \"./generated/src/isUnexpected\";\nexport * from \"./generated/src/models\";\nexport * from \"./generated/src/outputModels\";\nexport * from \"./generated/src/paginateHelper\";\nexport default MessagesServiceClient;\n"],"names":["createClientLogger","createClient","__rest","getClient","isTokenCredential","isKeyCredential","parseClientArguments","GeneratedAzureCommunicationMessageServiceClient","createCommunicationAuthPolicy","getPagedAsyncIterator","createRestError"],"mappings":";;;;;;;;;;;AAAA;AACA;AAGO,MAAM,MAA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AqB,EAAA;IACvD,IAAI,CAAC,YAAY,EAAE;AACjB,QAAA,OAAO,SAAS,CAAC;KAClB;AAED,IAAA,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnE,QAAA,MAAM,IAAI,KAAK,CACb,iBAAiB,YAAY,CAAA,gCAAA,CAAkC,CAChE,CAAC;KACH;AAED,IAAA,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;AAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB,EAAA;AAC/D,IAAA,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;;;;IAKjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACzB,QAAA,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,CAAA,CAAE,CAC7F,CAAC;KACH;AAED,IAAA,OAAO,KAAK,KAAL,IAAA,IAAA,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;AAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B,EAAA;AACzD,IAAA,MAAM,kBAAkB,GAAG;QACzB,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAC;IACF,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjD,MAAMC,0BAAe,CACnB,CAAA,6CAAA,EAAgD,QAAQ,CAAC,MAAM,CAAE,CAAA,EACjE,QAAQ,CACT,CAAC;KACH;AACH;;ACzJA;AACA;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/generated/src/logger.ts","../src/generated/src/messagesServiceClient.ts","../src/messagesServiceClient.ts","../src/generated/src/isUnexpected.ts","../src/generated/src/paginateHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"communication-messages\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { MessagesServiceClient } from \"./clientDefinitions\";\n\n/** The optional parameters for the client */\nexport interface MessagesServiceClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpointParam - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential | KeyCredential,\n { apiVersion = \"2024-08-30\", ...options }: MessagesServiceClientOptions = {},\n): MessagesServiceClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n const userAgentInfo = `azsdk-js-communication-messages-rest/2.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://communication.azure.com/.default\",\n ],\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"Authorization\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MessagesServiceClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { isTokenCredential, isKeyCredential } from \"@azure/core-auth\";\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { parseClientArguments, createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport type { MessagesServiceClient } from \"./generated/src/clientDefinitions\";\nimport GeneratedAzureCommunicationMessageServiceClient from \"./generated/src/messagesServiceClient\";\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The endpoint of your Communication Services resource.\n * @param credential - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointOrConnectionString: string,\n credentialOrOptions?: ClientOptions | (TokenCredential | KeyCredential),\n options?: ClientOptions,\n): MessagesServiceClient {\n if (!(isTokenCredential(credentialOrOptions) || isKeyCredential(credentialOrOptions))) {\n options = credentialOrOptions as ClientOptions;\n }\n\n if (options === undefined) {\n options = {};\n }\n\n const { url, credential } = parseClientArguments(endpointOrConnectionString, credentialOrOptions);\n const baseUrl = options.baseUrl ?? `${url}`;\n\n const client = GeneratedAzureCommunicationMessageServiceClient(baseUrl, credential, options);\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /messages/streams/{id}\": [\"200\"],\n \"POST /messages/notifications:send\": [\"202\"],\n \"GET /messages/channels/{channelId}/templates\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetMedia200Response | GetMediaDefaultResponse,\n): response is GetMediaDefaultResponse;\nexport function isUnexpected(\n response: Send202Response | SendDefaultResponse,\n): response is SendDefaultResponse;\nexport function isUnexpected(\n response: ListTemplates200Response | ListTemplatesDefaultResponse,\n): response is ListTemplatesDefaultResponse;\nexport function isUnexpected(\n response:\n | GetMedia200Response\n | GetMediaDefaultResponse\n | Send202Response\n | SendDefaultResponse\n | ListTemplates200Response\n | ListTemplatesDefaultResponse,\n): response is\n | GetMediaDefaultResponse\n | SendDefaultResponse\n | ListTemplatesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\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: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\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 (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\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(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n getPagedAsyncIterator,\n PagedAsyncIterableIterator,\n PagedResult,\n} from \"@azure/core-paging\";\nimport {\n Client,\n createRestError,\n PathUncheckedResponse,\n} from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun\n ? initialResponse\n : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(\n `Body Property ${nextLinkName} should be a string or undefined`,\n );\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\n \"200\",\n \"201\",\n \"202\",\n \"203\",\n \"204\",\n \"205\",\n \"206\",\n \"207\",\n \"208\",\n \"226\",\n ];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MessagesServiceClient from \"./messagesServiceClient\";\nexport * from \"./generated/src/messagesServiceClient\";\nexport * from \"./generated/src/parameters\";\nexport * from \"./generated/src/responses\";\nexport * from \"./generated/src/clientDefinitions\";\nexport * from \"./generated/src/isUnexpected\";\nexport * from \"./generated/src/models\";\nexport * from \"./generated/src/outputModels\";\nexport * from \"./generated/src/paginateHelper\";\nexport default MessagesServiceClient;\n"],"names":["createClientLogger","createClient","__rest","getClient","isTokenCredential","isKeyCredential","parseClientArguments","GeneratedAzureCommunicationMessageServiceClient","createCommunicationAuthPolicy","getPagedAsyncIterator","createRestError"],"mappings":";;;;;;;;;;;AAAA;AACA;AAGO,MAAM,MAAM,GAAGA,2BAAkB,CAAC,wBAAwB,CAAC;;ACJlE;AACA;AAaA;;;;;AAKG;AACW,SAAUC,cAAY,CAClC,aAAqB,EACrB,WAA4C,EAC5C,EAAA,GAA0E,EAAE,EAAA;;QAA5E,EAAE,UAAU,GAAG,YAAY,EAAA,GAAA,EAAiD,EAA5C,OAAO,GAAAC,YAAA,CAAA,EAAA,EAAvC,cAAyC,CAAF;AAEvC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A;AACzD,IAAA,MAAM,kBAAkB,GAAG;QACzB,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;IACD,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjD,MAAMC,0BAAe,CACnB,CAAA,6CAAA,EAAgD,QAAQ,CAAC,MAAM,CAAE,CAAA,EACjE,QAAQ,CACT;;AAEL;;ACzJA;AACA;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { isTokenCredential, isKeyCredential, } from "@azure/core-auth";
3
+ import { isTokenCredential, isKeyCredential } from "@azure/core-auth";
4
4
  import { parseClientArguments, createCommunicationAuthPolicy } from "@azure/communication-common";
5
5
  import GeneratedAzureCommunicationMessageServiceClient from "./generated/src/messagesServiceClient";
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../src/messagesServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,iBAAiB,EAEjB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,+CAA+C,MAAM,uCAAuC,CAAC;AAwBpG;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,0BAAkC,EAClC,mBAAuE,EACvE,OAAuB;;IAEvB,IAAI,CAAC,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC;QACtF,OAAO,GAAG,mBAAoC,CAAC;IACjD,CAAC;IAED,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;IAClG,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAE5C,MAAM,MAAM,GAAG,+CAA+C,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7F,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n TokenCredential,\n isTokenCredential,\n KeyCredential,\n isKeyCredential,\n} from \"@azure/core-auth\";\nimport { ClientOptions } from \"@azure-rest/core-client\";\nimport { parseClientArguments, createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { MessagesServiceClient } from \"./generated/src/clientDefinitions\";\nimport GeneratedAzureCommunicationMessageServiceClient from \"./generated/src/messagesServiceClient\";\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The endpoint of your Communication Services resource.\n * @param credential - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointOrConnectionString: string,\n credentialOrOptions?: ClientOptions | (TokenCredential | KeyCredential),\n options?: ClientOptions,\n): MessagesServiceClient {\n if (!(isTokenCredential(credentialOrOptions) || isKeyCredential(credentialOrOptions))) {\n options = credentialOrOptions as ClientOptions;\n }\n\n if (options === undefined) {\n options = {};\n }\n\n const { url, credential } = parseClientArguments(endpointOrConnectionString, credentialOrOptions);\n const baseUrl = options.baseUrl ?? `${url}`;\n\n const client = GeneratedAzureCommunicationMessageServiceClient(baseUrl, credential, options);\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../src/messagesServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,+CAA+C,MAAM,uCAAuC,CAAC;AAwBpG;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,0BAAkC,EAClC,mBAAuE,EACvE,OAAuB;;IAEvB,IAAI,CAAC,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC;QACtF,OAAO,GAAG,mBAAoC,CAAC;IACjD,CAAC;IAED,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;IAClG,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAE5C,MAAM,MAAM,GAAG,+CAA+C,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7F,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { isTokenCredential, isKeyCredential } from \"@azure/core-auth\";\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { parseClientArguments, createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport type { MessagesServiceClient } from \"./generated/src/clientDefinitions\";\nimport GeneratedAzureCommunicationMessageServiceClient from \"./generated/src/messagesServiceClient\";\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The endpoint of your Communication Services resource.\n * @param credential - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointOrConnectionString: string,\n credentialOrOptions?: ClientOptions | (TokenCredential | KeyCredential),\n options?: ClientOptions,\n): MessagesServiceClient {\n if (!(isTokenCredential(credentialOrOptions) || isKeyCredential(credentialOrOptions))) {\n options = credentialOrOptions as ClientOptions;\n }\n\n if (options === undefined) {\n options = {};\n }\n\n const { url, credential } = parseClientArguments(endpointOrConnectionString, credentialOrOptions);\n const baseUrl = options.baseUrl ?? `${url}`;\n\n const client = GeneratedAzureCommunicationMessageServiceClient(baseUrl, credential, options);\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure-rest/communication-messages",
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
- "version": "2.0.0",
5
+ "version": "2.0.1-alpha.20241111.2",
6
6
  "description": "Azure client library for Azure Communication Messages services",
7
7
  "keywords": [
8
8
  "node",
@@ -32,16 +32,16 @@
32
32
  "node": ">=18.0.0"
33
33
  },
34
34
  "scripts": {
35
- "build": "npm run clean && tsc -p . && dev-tool run bundle && mkdirp ./review && dev-tool run extract-api",
36
- "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
35
+ "build": "npm run clean && tsc -p . && dev-tool run bundle && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
36
+ "build:browser": "tsc -p . && dev-tool run vendored cross-env ONLY_BROWSER=true rollup -c 2>&1",
37
37
  "build:debug": "tsc -p . && dev-tool run bundle && dev-tool run extract-api",
38
- "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
38
+ "build:node": "tsc -p . && dev-tool run vendored cross-env ONLY_NODE=true rollup -c 2>&1",
39
39
  "build:samples": "echo skipped.",
40
40
  "build:test": "tsc -p . && dev-tool run bundle",
41
41
  "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
42
- "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
42
+ "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
43
43
  "execute:samples": "echo skipped",
44
- "extract-api": "rimraf review && mkdirp ./review && dev-tool run extract-api",
44
+ "extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
45
45
  "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"",
46
46
  "generate:client": "echo skipped",
47
47
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
@@ -73,16 +73,14 @@
73
73
  "devDependencies": {
74
74
  "@azure-tools/test-credential": "^1.0.0",
75
75
  "@azure-tools/test-recorder": "^3.0.0",
76
- "@azure/dev-tool": "^1.0.0",
77
- "@azure/eslint-plugin-azure-sdk": "^3.0.0",
76
+ "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
77
+ "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
78
78
  "@azure/identity": "^4.2.1",
79
- "@microsoft/api-extractor": "^7.31.1",
80
79
  "@types/chai": "^4.2.8",
81
80
  "@types/mocha": "^10.0.0",
82
81
  "@types/node": "^18.0.0",
83
82
  "autorest": "latest",
84
83
  "chai": "^4.2.0",
85
- "cross-env": "^7.0.2",
86
84
  "dotenv": "^16.0.0",
87
85
  "eslint": "^9.9.0",
88
86
  "karma": "^6.2.0",
@@ -95,10 +93,8 @@
95
93
  "karma-mocha-reporter": "^2.2.5",
96
94
  "karma-source-map-support": "~1.4.0",
97
95
  "karma-sourcemap-loader": "^0.4.0",
98
- "mkdirp": "^3.0.1",
99
96
  "mocha": "^10.0.0",
100
97
  "nyc": "^17.0.0",
101
- "rimraf": "^5.0.0",
102
98
  "source-map-support": "^0.5.9",
103
99
  "ts-node": "^10.0.0",
104
100
  "typescript": "~5.6.2"
@@ -8,7 +8,7 @@ import { Client } from '@azure-rest/core-client';
8
8
  import { ClientOptions } from '@azure-rest/core-client';
9
9
  import { ErrorResponse } from '@azure-rest/core-client';
10
10
  import { HttpResponse } from '@azure-rest/core-client';
11
- import { KeyCredential } from '@azure/core-auth';
11
+ import type { KeyCredential } from '@azure/core-auth';
12
12
  import { Paged } from '@azure/core-paging';
13
13
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
14
14
  import { PathUncheckedResponse } from '@azure-rest/core-client';
@@ -16,7 +16,7 @@ import { RawHttpHeaders } from '@azure/core-rest-pipeline';
16
16
  import { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
17
17
  import { RequestParameters } from '@azure-rest/core-client';
18
18
  import { StreamableMethod } from '@azure-rest/core-client';
19
- import { TokenCredential } from '@azure/core-auth';
19
+ import type { TokenCredential } from '@azure/core-auth';
20
20
 
21
21
  // @public
22
22
  export interface AudioNotificationContent extends NotificationContentParent {
@@ -2,7 +2,7 @@ import { Client } from '@azure-rest/core-client';
2
2
  import { ClientOptions } from '@azure-rest/core-client';
3
3
  import { ErrorResponse } from '@azure-rest/core-client';
4
4
  import { HttpResponse } from '@azure-rest/core-client';
5
- import { KeyCredential } from '@azure/core-auth';
5
+ import type { KeyCredential } from '@azure/core-auth';
6
6
  import { Paged } from '@azure/core-paging';
7
7
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
8
8
  import { PathUncheckedResponse } from '@azure-rest/core-client';
@@ -10,7 +10,7 @@ import { RawHttpHeaders } from '@azure/core-rest-pipeline';
10
10
  import { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
11
11
  import { RequestParameters } from '@azure-rest/core-client';
12
12
  import { StreamableMethod } from '@azure-rest/core-client';
13
- import { TokenCredential } from '@azure/core-auth';
13
+ import type { TokenCredential } from '@azure/core-auth';
14
14
 
15
15
  /** A request to send an audio notification. */
16
16
  export declare interface AudioNotificationContent extends NotificationContentParent {