@azure/communication-identity 1.4.0-alpha.20250825.1 → 1.4.0-alpha.20250901.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/browser/communicationIdentityClient.js +10 -31
- package/dist/browser/communicationIdentityClient.js.map +1 -1
- package/dist/browser/generated/src/identityRestClient.js +3 -15
- package/dist/browser/generated/src/identityRestClient.js.map +1 -1
- package/dist/browser/generated/src/operations/communicationIdentityOperations.js +8 -12
- package/dist/browser/generated/src/operations/communicationIdentityOperations.js.map +1 -1
- package/dist/browser/generated/src/operations/entraIdAssignment.js +4 -5
- package/dist/browser/generated/src/operations/entraIdAssignment.js.map +1 -1
- package/dist/browser/generated/src/operations/entraIdAssignments.js +43 -26
- package/dist/browser/generated/src/operations/entraIdAssignments.js.map +1 -1
- package/dist/browser/generated/src/operations/entraIdToken.js +1 -2
- package/dist/browser/generated/src/operations/entraIdToken.js.map +1 -1
- package/dist/browser/generated/src/operations/teamsExtensionAssignment.js +4 -8
- package/dist/browser/generated/src/operations/teamsExtensionAssignment.js.map +1 -1
- package/dist/browser/generated/src/operations/teamsExtensionToken.js +1 -2
- package/dist/browser/generated/src/operations/teamsExtensionToken.js.map +1 -1
- package/dist/browser/generated/src/pagingHelper.js +4 -2
- package/dist/browser/generated/src/pagingHelper.js.map +1 -1
- package/dist/commonjs/communicationIdentityClient.js +10 -31
- package/dist/commonjs/communicationIdentityClient.js.map +1 -1
- package/dist/commonjs/generated/src/identityRestClient.js +3 -15
- package/dist/commonjs/generated/src/identityRestClient.js.map +1 -1
- package/dist/commonjs/generated/src/operations/communicationIdentityOperations.js +8 -12
- package/dist/commonjs/generated/src/operations/communicationIdentityOperations.js.map +1 -1
- package/dist/commonjs/generated/src/operations/entraIdAssignment.js +4 -5
- package/dist/commonjs/generated/src/operations/entraIdAssignment.js.map +1 -1
- package/dist/commonjs/generated/src/operations/entraIdAssignments.js +42 -26
- package/dist/commonjs/generated/src/operations/entraIdAssignments.js.map +1 -1
- package/dist/commonjs/generated/src/operations/entraIdToken.js +1 -2
- package/dist/commonjs/generated/src/operations/entraIdToken.js.map +1 -1
- package/dist/commonjs/generated/src/operations/teamsExtensionAssignment.js +4 -8
- package/dist/commonjs/generated/src/operations/teamsExtensionAssignment.js.map +1 -1
- package/dist/commonjs/generated/src/operations/teamsExtensionToken.js +1 -2
- package/dist/commonjs/generated/src/operations/teamsExtensionToken.js.map +1 -1
- package/dist/commonjs/generated/src/pagingHelper.js +4 -2
- package/dist/commonjs/generated/src/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/communicationIdentityClient.js +10 -31
- package/dist/esm/communicationIdentityClient.js.map +1 -1
- package/dist/esm/generated/src/identityRestClient.js +3 -15
- package/dist/esm/generated/src/identityRestClient.js.map +1 -1
- package/dist/esm/generated/src/operations/communicationIdentityOperations.js +8 -12
- package/dist/esm/generated/src/operations/communicationIdentityOperations.js.map +1 -1
- package/dist/esm/generated/src/operations/entraIdAssignment.js +4 -5
- package/dist/esm/generated/src/operations/entraIdAssignment.js.map +1 -1
- package/dist/esm/generated/src/operations/entraIdAssignments.js +43 -26
- package/dist/esm/generated/src/operations/entraIdAssignments.js.map +1 -1
- package/dist/esm/generated/src/operations/entraIdToken.js +1 -2
- package/dist/esm/generated/src/operations/entraIdToken.js.map +1 -1
- package/dist/esm/generated/src/operations/teamsExtensionAssignment.js +4 -8
- package/dist/esm/generated/src/operations/teamsExtensionAssignment.js.map +1 -1
- package/dist/esm/generated/src/operations/teamsExtensionToken.js +1 -2
- package/dist/esm/generated/src/operations/teamsExtensionToken.js.map +1 -1
- package/dist/esm/generated/src/pagingHelper.js +4 -2
- package/dist/esm/generated/src/pagingHelper.js.map +1 -1
- package/dist/react-native/communicationIdentityClient.js +10 -31
- package/dist/react-native/communicationIdentityClient.js.map +1 -1
- package/dist/react-native/generated/src/identityRestClient.js +3 -15
- package/dist/react-native/generated/src/identityRestClient.js.map +1 -1
- package/dist/react-native/generated/src/operations/communicationIdentityOperations.js +8 -12
- package/dist/react-native/generated/src/operations/communicationIdentityOperations.js.map +1 -1
- package/dist/react-native/generated/src/operations/entraIdAssignment.js +4 -5
- package/dist/react-native/generated/src/operations/entraIdAssignment.js.map +1 -1
- package/dist/react-native/generated/src/operations/entraIdAssignments.js +43 -26
- package/dist/react-native/generated/src/operations/entraIdAssignments.js.map +1 -1
- package/dist/react-native/generated/src/operations/entraIdToken.js +1 -2
- package/dist/react-native/generated/src/operations/entraIdToken.js.map +1 -1
- package/dist/react-native/generated/src/operations/teamsExtensionAssignment.js +4 -8
- package/dist/react-native/generated/src/operations/teamsExtensionAssignment.js.map +1 -1
- package/dist/react-native/generated/src/operations/teamsExtensionToken.js +1 -2
- package/dist/react-native/generated/src/operations/teamsExtensionToken.js.map +1 -1
- package/dist/react-native/generated/src/pagingHelper.js +4 -2
- package/dist/react-native/generated/src/pagingHelper.js.map +1 -1
- package/package.json +38 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communicationIdentityOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/communicationIdentityOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgBtD,mEAAmE;AACnE,MAAa,mCAAmC;IAG7B,MAAM,CAAqB;IAE5C;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,OAAmD;QAEnD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2BAA2B,EAC3B,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,mBAAmB,CAC4B,CAAC;QACpD,CAAC,CACF,CAAC;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CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { CommunicationIdentityOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n CommunicationIdentityCreateOptionalParams,\n CommunicationIdentityCreateResponse,\n CommunicationIdentityDeleteOptionalParams,\n CommunicationIdentityGetOptionalParams,\n CommunicationIdentityGetResponse,\n CommunicationIdentityRevokeAccessTokensOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenResponse,\n CommunicationIdentityTokenScope,\n CommunicationIdentityIssueAccessTokenOptionalParams,\n CommunicationIdentityIssueAccessTokenResponse,\n} from \"../models/index.js\";\n\n/** Class containing CommunicationIdentityOperations operations. */\nexport class CommunicationIdentityOperationsImpl\n implements CommunicationIdentityOperations\n{\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class CommunicationIdentityOperations class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Create a new identity with an optional customId mapping, and optionally, an access token. If called\n * again with the same customId, the returned identity will be the same as the one returned previously.\n * @param options The options parameters.\n */\n async create(\n options?: CommunicationIdentityCreateOptionalParams,\n ): Promise<CommunicationIdentityCreateResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.create\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n createOperationSpec,\n ) as Promise<CommunicationIdentityCreateResponse>;\n },\n );\n }\n\n /**\n * Delete the identity, revoke all tokens for the identity and delete all associated data.\n * @param id Identifier of the identity to be deleted.\n * @param options The options parameters.\n */\n async delete(\n id: string,\n options?: CommunicationIdentityDeleteOptionalParams,\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.delete\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec,\n ) as Promise<void>;\n },\n );\n }\n\n /**\n * Get an identity by its id.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n async get(\n id: string,\n options?: CommunicationIdentityGetOptionalParams,\n ): Promise<CommunicationIdentityGetResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n getOperationSpec,\n ) as Promise<CommunicationIdentityGetResponse>;\n },\n );\n }\n\n /**\n * Revoke all access tokens for the specific identity.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n async revokeAccessTokens(\n id: string,\n options?: CommunicationIdentityRevokeAccessTokensOptionalParams,\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.revokeAccessTokens\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n revokeAccessTokensOperationSpec,\n ) as Promise<void>;\n },\n );\n }\n\n /**\n * Exchange an Entra ID access token of a Teams user for a new Communication Identity access token with\n * a matching expiration time.\n * @param token Entra ID access token of a Teams User to acquire a new Communication Identity access\n * token.\n * @param appId Client ID of an Entra ID application to be verified against the appid claim in the\n * Entra ID access token.\n * @param userId Object ID of an Entra ID user (Teams User) to be verified against the oid claim in the\n * Entra ID access token.\n * @param options The options parameters.\n */\n async exchangeTeamsUserAccessToken(\n token: string,\n appId: string,\n userId: string,\n options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n ): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.exchangeTeamsUserAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { token, appId, userId, options },\n exchangeTeamsUserAccessTokenOperationSpec,\n ) as Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;\n },\n );\n }\n\n /**\n * Issue a new token for an identity.\n * @param id Identifier of the identity to issue token for.\n * @param scopes List of scopes attached to the token.\n * @param options The options parameters.\n */\n async issueAccessToken(\n id: string,\n scopes: CommunicationIdentityTokenScope[],\n options?: CommunicationIdentityIssueAccessTokenOptionalParams,\n ): Promise<CommunicationIdentityIssueAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.issueAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, scopes, options },\n issueAccessTokenOperationSpec,\n ) as Promise<CommunicationIdentityIssueAccessTokenResponse>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/identities\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CommunicationIdentityAccessTokenResult,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n customId: [\"options\", \"customId\"],\n createTokenWithScopes: [\"options\", \"createTokenWithScopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"],\n },\n mapper: Mappers.CommunicationIdentityCreateRequest,\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentity,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst revokeAccessTokensOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:revokeAccessTokens\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst exchangeTeamsUserAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/teamsUser/:exchangeAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: { token: [\"token\"], appId: [\"appId\"], userId: [\"userId\"] },\n mapper: { ...Mappers.TeamsUserExchangeTokenRequest, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst issueAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:issueAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n scopes: [\"scopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"],\n },\n mapper: {\n ...Mappers.CommunicationIdentityAccessTokenRequest,\n required: true,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"communicationIdentityOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/communicationIdentityOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgBtD,mEAAmE;AACnE,MAAa,mCAAmC;IAK9C;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,OAAmD;QAEnD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2BAA2B,EAC3B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,mBAAmB,CAC4B,CAAC;QACpD,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,EAAU,EACV,OAAmD;QAEnD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2BAA2B,EAC3B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,EAAE,EAAE,OAAO,EAAE,EACf,mBAAmB,CACH,CAAC;QACrB,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CACP,EAAU,EACV,OAAgD;QAEhD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,wBAAwB,EACxB,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,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AAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,oCAAoC;IAC1C,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,MAAM,EAAE,CAAC,QAAQ,CAAC;YAClB,gBAAgB,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC;SAClD;QACD,MAAM,kCACD,OAAO,CAAC,uCAAuC,KAClD,QAAQ,EAAE,IAAI,GACf;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { CommunicationIdentityOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n CommunicationIdentityCreateOptionalParams,\n CommunicationIdentityCreateResponse,\n CommunicationIdentityDeleteOptionalParams,\n CommunicationIdentityGetOptionalParams,\n CommunicationIdentityGetResponse,\n CommunicationIdentityRevokeAccessTokensOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenResponse,\n CommunicationIdentityTokenScope,\n CommunicationIdentityIssueAccessTokenOptionalParams,\n CommunicationIdentityIssueAccessTokenResponse,\n} from \"../models/index.js\";\n\n/** Class containing CommunicationIdentityOperations operations. */\nexport class CommunicationIdentityOperationsImpl\n implements CommunicationIdentityOperations\n{\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class CommunicationIdentityOperations class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Create a new identity with an optional customId mapping, and optionally, an access token. If called\n * again with the same customId, the returned identity will be the same as the one returned previously.\n * @param options The options parameters.\n */\n async create(\n options?: CommunicationIdentityCreateOptionalParams,\n ): Promise<CommunicationIdentityCreateResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.create\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n createOperationSpec,\n ) as Promise<CommunicationIdentityCreateResponse>;\n },\n );\n }\n\n /**\n * Delete the identity, revoke all tokens for the identity and delete all associated data.\n * @param id Identifier of the identity to be deleted.\n * @param options The options parameters.\n */\n async delete(\n id: string,\n options?: CommunicationIdentityDeleteOptionalParams,\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.delete\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec,\n ) as Promise<void>;\n },\n );\n }\n\n /**\n * Get an identity by its id.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n async get(\n id: string,\n options?: CommunicationIdentityGetOptionalParams,\n ): Promise<CommunicationIdentityGetResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n getOperationSpec,\n ) as Promise<CommunicationIdentityGetResponse>;\n },\n );\n }\n\n /**\n * Revoke all access tokens for the specific identity.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n async revokeAccessTokens(\n id: string,\n options?: CommunicationIdentityRevokeAccessTokensOptionalParams,\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.revokeAccessTokens\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n revokeAccessTokensOperationSpec,\n ) as Promise<void>;\n },\n );\n }\n\n /**\n * Exchange an Entra ID access token of a Teams user for a new Communication Identity access token with\n * a matching expiration time.\n * @param token Entra ID access token of a Teams User to acquire a new Communication Identity access\n * token.\n * @param appId Client ID of an Entra ID application to be verified against the appid claim in the\n * Entra ID access token.\n * @param userId Object ID of an Entra ID user (Teams User) to be verified against the oid claim in the\n * Entra ID access token.\n * @param options The options parameters.\n */\n async exchangeTeamsUserAccessToken(\n token: string,\n appId: string,\n userId: string,\n options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n ): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.exchangeTeamsUserAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { token, appId, userId, options },\n exchangeTeamsUserAccessTokenOperationSpec,\n ) as Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;\n },\n );\n }\n\n /**\n * Issue a new token for an identity.\n * @param id Identifier of the identity to issue token for.\n * @param scopes List of scopes attached to the token.\n * @param options The options parameters.\n */\n async issueAccessToken(\n id: string,\n scopes: CommunicationIdentityTokenScope[],\n options?: CommunicationIdentityIssueAccessTokenOptionalParams,\n ): Promise<CommunicationIdentityIssueAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.issueAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, scopes, options },\n issueAccessTokenOperationSpec,\n ) as Promise<CommunicationIdentityIssueAccessTokenResponse>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/identities\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CommunicationIdentityAccessTokenResult,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n customId: [\"options\", \"customId\"],\n createTokenWithScopes: [\"options\", \"createTokenWithScopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"],\n },\n mapper: Mappers.CommunicationIdentityCreateRequest,\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentity,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst revokeAccessTokensOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:revokeAccessTokens\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst exchangeTeamsUserAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/teamsUser/:exchangeAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: { token: [\"token\"], appId: [\"appId\"], userId: [\"userId\"] },\n mapper: { ...Mappers.TeamsUserExchangeTokenRequest, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst issueAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:issueAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n scopes: [\"scopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"],\n },\n mapper: {\n ...Mappers.CommunicationIdentityAccessTokenRequest,\n required: true,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -15,7 +15,6 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
15
15
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/** Class containing EntraIdAssignment operations. */
|
|
17
17
|
class EntraIdAssignmentImpl {
|
|
18
|
-
client;
|
|
19
18
|
/**
|
|
20
19
|
* Initialize a new instance of the class EntraIdAssignment class.
|
|
21
20
|
* @param client Reference to the service client
|
|
@@ -30,7 +29,7 @@ class EntraIdAssignmentImpl {
|
|
|
30
29
|
* @param options The options parameters.
|
|
31
30
|
*/
|
|
32
31
|
async get(objectId, options) {
|
|
33
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.get", options
|
|
32
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.get", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
34
33
|
return this.client.sendOperationRequest({ objectId, options }, getOperationSpec);
|
|
35
34
|
});
|
|
36
35
|
}
|
|
@@ -43,7 +42,7 @@ class EntraIdAssignmentImpl {
|
|
|
43
42
|
* @param options The options parameters.
|
|
44
43
|
*/
|
|
45
44
|
async upsert(objectId, tenantId, principalType, clientIds, options) {
|
|
46
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.upsert", options
|
|
45
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.upsert", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
47
46
|
return this.client.sendOperationRequest({ objectId, tenantId, principalType, clientIds, options }, upsertOperationSpec);
|
|
48
47
|
});
|
|
49
48
|
}
|
|
@@ -54,7 +53,7 @@ class EntraIdAssignmentImpl {
|
|
|
54
53
|
* @param options The options parameters.
|
|
55
54
|
*/
|
|
56
55
|
async delete(objectId, options) {
|
|
57
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.delete", options
|
|
56
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.delete", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
58
57
|
return this.client.sendOperationRequest({ objectId, options }, deleteOperationSpec);
|
|
59
58
|
});
|
|
60
59
|
}
|
|
@@ -98,7 +97,7 @@ const upsertOperationSpec = {
|
|
|
98
97
|
principalType: ["principalType"],
|
|
99
98
|
clientIds: ["clientIds"],
|
|
100
99
|
},
|
|
101
|
-
mapper: {
|
|
100
|
+
mapper: Object.assign(Object.assign({}, Mappers.EntraAssignmentCreateOrUpdateRequest), { required: true }),
|
|
102
101
|
},
|
|
103
102
|
queryParameters: [Parameters.apiVersion],
|
|
104
103
|
urlParameters: [Parameters.endpoint, Parameters.objectId],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entraIdAssignment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/entraIdAssignment.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,qDAAqD;AACrD,MAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"entraIdAssignment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/entraIdAssignment.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,qDAAqD;AACrD,MAAa,qBAAqB;IAGhC;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,QAAgB,EAChB,OAA4C;QAE5C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,wBAAwB,EACxB,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,gBAAgB,CACwB,CAAC;QAC7C,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CACV,QAAgB,EAChB,QAAgB,EAChB,aAAiC,EACjC,SAAmB,EACnB,OAA+C;QAE/C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2BAA2B,EAC3B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,EACzD,mBAAmB,CACwB,CAAC;QAChD,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK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AAe,CAAC;YAChC,SAAS,EAAE,CAAC,WAAW,CAAC;SACzB;QACD,MAAM,kCAAO,OAAO,CAAC,oCAAoC,KAAE,QAAQ,EAAE,IAAI,GAAE;KAC5E;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,sCAAsC;IAC5C,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { EntraIdAssignment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n EntraIdAssignmentGetOptionalParams,\n EntraIdAssignmentGetResponse,\n EntraPrincipalType,\n EntraIdAssignmentUpsertOptionalParams,\n EntraIdAssignmentUpsertResponse,\n EntraIdAssignmentDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing EntraIdAssignment operations. */\nexport class EntraIdAssignmentImpl implements EntraIdAssignment {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class EntraIdAssignment class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Get Entra access assignment by object id.\n * @param objectId objectId we want to get the assignment for. AcsResourceId is taken from\n * authentication.\n * @param options The options parameters.\n */\n async get(\n objectId: string,\n options?: EntraIdAssignmentGetOptionalParams,\n ): Promise<EntraIdAssignmentGetResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { objectId, options },\n getOperationSpec,\n ) as Promise<EntraIdAssignmentGetResponse>;\n },\n );\n }\n\n /**\n * Creates or replaces an Entra access assignment.\n * @param objectId objectId we want to update the assignment for.\n * @param tenantId\n * @param principalType\n * @param clientIds Array of EntraAssignmentCreateOrUpdateRequestClientIdsItem\n * @param options The options parameters.\n */\n async upsert(\n objectId: string,\n tenantId: string,\n principalType: EntraPrincipalType,\n clientIds: string[],\n options?: EntraIdAssignmentUpsertOptionalParams,\n ): Promise<EntraIdAssignmentUpsertResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.upsert\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { objectId, tenantId, principalType, clientIds, options },\n upsertOperationSpec,\n ) as Promise<EntraIdAssignmentUpsertResponse>;\n },\n );\n }\n\n /**\n * Removes an Entra access assignment.\n * @param objectId objectId we want to remove the assignment for. AcsResourceId is taken from\n * authentication.\n * @param options The options parameters.\n */\n async delete(\n objectId: string,\n options?: EntraIdAssignmentDeleteOptionalParams,\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.delete\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { objectId, options },\n deleteOperationSpec,\n ) as Promise<void>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments/{objectId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignment,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.objectId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst upsertOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments/{objectId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignment,\n },\n 201: {\n bodyMapper: Mappers.EntraAssignment,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n tenantId: [\"tenantId\"],\n principalType: [\"principalType\"],\n clientIds: [\"clientIds\"],\n },\n mapper: { ...Mappers.EntraAssignmentCreateOrUpdateRequest, required: true },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.objectId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments/{objectId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.objectId],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -17,7 +17,6 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
17
17
|
/// <reference lib="esnext.asynciterable" />
|
|
18
18
|
/** Class containing EntraIdAssignments operations. */
|
|
19
19
|
class EntraIdAssignmentsImpl {
|
|
20
|
-
client;
|
|
21
20
|
/**
|
|
22
21
|
* Initialize a new instance of the class EntraIdAssignments class.
|
|
23
22
|
* @param client Reference to the service client
|
|
@@ -40,35 +39,52 @@ class EntraIdAssignmentsImpl {
|
|
|
40
39
|
return this;
|
|
41
40
|
},
|
|
42
41
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
42
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
44
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
44
|
}
|
|
46
45
|
return this.updatePagingPage(body, options, settings);
|
|
47
46
|
},
|
|
48
47
|
};
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
49
|
+
updatePagingPage(body, options, settings) {
|
|
50
|
+
return tslib_1.__asyncGenerator(this, arguments, function* updatePagingPage_1() {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = yield tslib_1.__await(this._update(body, options));
|
|
55
|
+
let page = result.value || [];
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
58
|
+
yield yield tslib_1.__await(page);
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = yield tslib_1.__await(this._updateNext(body, continuationToken, options));
|
|
62
|
+
continuationToken = result.nextLink;
|
|
63
|
+
let page = result.value || [];
|
|
64
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
65
|
+
yield yield tslib_1.__await(page);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
updatePagingAll(body, options) {
|
|
70
|
+
return tslib_1.__asyncGenerator(this, arguments, function* updatePagingAll_1() {
|
|
71
|
+
var _a, e_1, _b, _c;
|
|
72
|
+
try {
|
|
73
|
+
for (var _d = true, _e = tslib_1.__asyncValues(this.updatePagingPage(body, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
+
_c = _f.value;
|
|
75
|
+
_d = false;
|
|
76
|
+
const page = _c;
|
|
77
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
+
finally {
|
|
82
|
+
try {
|
|
83
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
84
|
+
}
|
|
85
|
+
finally { if (e_1) throw e_1.error; }
|
|
86
|
+
}
|
|
87
|
+
});
|
|
72
88
|
}
|
|
73
89
|
/**
|
|
74
90
|
* Updates Entra access assignments in bulk.
|
|
@@ -76,7 +92,7 @@ class EntraIdAssignmentsImpl {
|
|
|
76
92
|
* @param options The options parameters.
|
|
77
93
|
*/
|
|
78
94
|
async _update(body, options) {
|
|
79
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient._update", options
|
|
95
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient._update", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
80
96
|
return this.client.sendOperationRequest({ body, options }, updateOperationSpec);
|
|
81
97
|
});
|
|
82
98
|
}
|
|
@@ -85,7 +101,7 @@ class EntraIdAssignmentsImpl {
|
|
|
85
101
|
* @param options The options parameters.
|
|
86
102
|
*/
|
|
87
103
|
async list(options) {
|
|
88
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.list", options
|
|
104
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.list", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
89
105
|
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
90
106
|
});
|
|
91
107
|
}
|
|
@@ -96,7 +112,7 @@ class EntraIdAssignmentsImpl {
|
|
|
96
112
|
* @param options The options parameters.
|
|
97
113
|
*/
|
|
98
114
|
async _updateNext(body, nextLink, options) {
|
|
99
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient._updateNext", options
|
|
115
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient._updateNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
100
116
|
return this.client.sendOperationRequest({ body, nextLink, options }, updateNextOperationSpec);
|
|
101
117
|
});
|
|
102
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entraIdAssignments.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/entraIdAssignments.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAatD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAa,sBAAsB;IAChB,MAAM,CAAqB;IAE5C;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,UAAU,CACf,IAAsE,EACtE,OAAgD;QAEhD,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,EA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,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EntraIdAssignments } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n EntraAssignment,\n EntraAssignmentCreateOrUpdateRequest,\n EntraIdAssignmentsUpdateNextOptionalParams,\n EntraIdAssignmentsUpdateOptionalParams,\n EntraIdAssignmentsUpdateResponse,\n EntraIdAssignmentsListOptionalParams,\n EntraIdAssignmentsListResponse,\n EntraIdAssignmentsUpdateNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EntraIdAssignments operations. */\nexport class EntraIdAssignmentsImpl implements EntraIdAssignments {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class EntraIdAssignments class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Updates Entra access assignments in bulk.\n * @param body Set of assignments to be added, updated or removed.\n * @param options The options parameters.\n */\n public listUpdate(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n ): PagedAsyncIterableIterator<EntraAssignment> {\n const iter = this.updatePagingAll(body, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.updatePagingPage(body, options, settings);\n },\n };\n }\n\n private async *updatePagingPage(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EntraAssignment[]> {\n let result: EntraIdAssignmentsUpdateResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._update(body, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._updateNext(body, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *updatePagingAll(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n ): AsyncIterableIterator<EntraAssignment> {\n for await (const page of this.updatePagingPage(body, options)) {\n yield* page;\n }\n }\n\n /**\n * Updates Entra access assignments in bulk.\n * @param body Set of assignments to be added, updated or removed.\n * @param options The options parameters.\n */\n private async _update(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n ): Promise<EntraIdAssignmentsUpdateResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient._update\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { body, options },\n updateOperationSpec,\n ) as Promise<EntraIdAssignmentsUpdateResponse>;\n },\n );\n }\n\n /**\n * Lists Entra access assignments.\n * @param options The options parameters.\n */\n async list(\n options?: EntraIdAssignmentsListOptionalParams,\n ): Promise<EntraIdAssignmentsListResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.list\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n listOperationSpec,\n ) as Promise<EntraIdAssignmentsListResponse>;\n },\n );\n }\n\n /**\n * UpdateNext\n * @param body Set of assignments to be added, updated or removed.\n * @param nextLink The nextLink from the previous successful call to the Update method.\n * @param options The options parameters.\n */\n private async _updateNext(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n nextLink: string,\n options?: EntraIdAssignmentsUpdateNextOptionalParams,\n ): Promise<EntraIdAssignmentsUpdateNextResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient._updateNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { body, nextLink, options },\n updateNextOperationSpec,\n ) as Promise<EntraIdAssignmentsUpdateNextResponse>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignmentsResponse,\n },\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.body5,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignmentsResponse,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignmentsResponse,\n },\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"entraIdAssignments.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/entraIdAssignments.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAatD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAa,sBAAsB;IAGjC;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GA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,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,uBAAuB,GAA6B;IACxD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { EntraIdAssignments } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n EntraAssignment,\n EntraAssignmentCreateOrUpdateRequest,\n EntraIdAssignmentsUpdateNextOptionalParams,\n EntraIdAssignmentsUpdateOptionalParams,\n EntraIdAssignmentsUpdateResponse,\n EntraIdAssignmentsListOptionalParams,\n EntraIdAssignmentsListResponse,\n EntraIdAssignmentsUpdateNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing EntraIdAssignments operations. */\nexport class EntraIdAssignmentsImpl implements EntraIdAssignments {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class EntraIdAssignments class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Updates Entra access assignments in bulk.\n * @param body Set of assignments to be added, updated or removed.\n * @param options The options parameters.\n */\n public listUpdate(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n ): PagedAsyncIterableIterator<EntraAssignment> {\n const iter = this.updatePagingAll(body, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.updatePagingPage(body, options, settings);\n },\n };\n }\n\n private async *updatePagingPage(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<EntraAssignment[]> {\n let result: EntraIdAssignmentsUpdateResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._update(body, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._updateNext(body, continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *updatePagingAll(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n ): AsyncIterableIterator<EntraAssignment> {\n for await (const page of this.updatePagingPage(body, options)) {\n yield* page;\n }\n }\n\n /**\n * Updates Entra access assignments in bulk.\n * @param body Set of assignments to be added, updated or removed.\n * @param options The options parameters.\n */\n private async _update(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n options?: EntraIdAssignmentsUpdateOptionalParams,\n ): Promise<EntraIdAssignmentsUpdateResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient._update\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { body, options },\n updateOperationSpec,\n ) as Promise<EntraIdAssignmentsUpdateResponse>;\n },\n );\n }\n\n /**\n * Lists Entra access assignments.\n * @param options The options parameters.\n */\n async list(\n options?: EntraIdAssignmentsListOptionalParams,\n ): Promise<EntraIdAssignmentsListResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.list\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n listOperationSpec,\n ) as Promise<EntraIdAssignmentsListResponse>;\n },\n );\n }\n\n /**\n * UpdateNext\n * @param body Set of assignments to be added, updated or removed.\n * @param nextLink The nextLink from the previous successful call to the Update method.\n * @param options The options parameters.\n */\n private async _updateNext(\n body: { [propertyName: string]: EntraAssignmentCreateOrUpdateRequest },\n nextLink: string,\n options?: EntraIdAssignmentsUpdateNextOptionalParams,\n ): Promise<EntraIdAssignmentsUpdateNextResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient._updateNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { body, nextLink, options },\n updateNextOperationSpec,\n ) as Promise<EntraIdAssignmentsUpdateNextResponse>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignmentsResponse,\n },\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.body5,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/assignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignmentsResponse,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntraAssignmentsResponse,\n },\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -15,7 +15,6 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
15
15
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/** Class containing EntraIdToken operations. */
|
|
17
17
|
class EntraIdTokenImpl {
|
|
18
|
-
client;
|
|
19
18
|
/**
|
|
20
19
|
* Initialize a new instance of the class EntraIdToken class.
|
|
21
20
|
* @param client Reference to the service client
|
|
@@ -29,7 +28,7 @@ class EntraIdTokenImpl {
|
|
|
29
28
|
* @param options The options parameters.
|
|
30
29
|
*/
|
|
31
30
|
async exchange(body, options) {
|
|
32
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.exchange", options
|
|
31
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.exchange", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
33
32
|
return this.client.sendOperationRequest({ body, options }, exchangeOperationSpec);
|
|
34
33
|
});
|
|
35
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entraIdToken.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/entraIdToken.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,gDAAgD;AAChD,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"entraIdToken.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/entraIdToken.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,gDAAgD;AAChD,MAAa,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CACZ,IAA6B,EAC7B,OAA4C;QAE5C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,6BAA6B,EAC7B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,IAAI,EAAE,OAAO,EAAE,EACjB,qBAAqB,CACmB,CAAC;QAC7C,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,4CA+BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,oCAAoC;IAC1C,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sCAAsC;SAC3D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE,UAAU,CAAC,KAAK;IAC7B,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { EntraIdToken } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n EntraIdTokenExchangeOptionalParams,\n EntraIdTokenExchangeResponse,\n} from \"../models/index.js\";\n\n/** Class containing EntraIdToken operations. */\nexport class EntraIdTokenImpl implements EntraIdToken {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class EntraIdToken class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Exchanges an Entra ID token for an ACS user access token.\n * @param body Request payload for the token exchange.\n * @param options The options parameters.\n */\n async exchange(\n body: Record<string, unknown>,\n options?: EntraIdTokenExchangeOptionalParams,\n ): Promise<EntraIdTokenExchangeResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.exchange\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { body, options },\n exchangeOperationSpec,\n ) as Promise<EntraIdTokenExchangeResponse>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst exchangeOperationSpec: coreClient.OperationSpec = {\n path: \"/access/entra/:exchangeAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessTokenResult,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.body3,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -15,7 +15,6 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
15
15
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/** Class containing TeamsExtensionAssignment operations. */
|
|
17
17
|
class TeamsExtensionAssignmentImpl {
|
|
18
|
-
client;
|
|
19
18
|
/**
|
|
20
19
|
* Initialize a new instance of the class TeamsExtensionAssignment class.
|
|
21
20
|
* @param client Reference to the service client
|
|
@@ -30,7 +29,7 @@ class TeamsExtensionAssignmentImpl {
|
|
|
30
29
|
* @param options The options parameters.
|
|
31
30
|
*/
|
|
32
31
|
async get(tenantId, objectId, options) {
|
|
33
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.get", options
|
|
32
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.get", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
34
33
|
return this.client.sendOperationRequest({ tenantId, objectId, options }, getOperationSpec);
|
|
35
34
|
});
|
|
36
35
|
}
|
|
@@ -42,7 +41,7 @@ class TeamsExtensionAssignmentImpl {
|
|
|
42
41
|
* @param options The options parameters.
|
|
43
42
|
*/
|
|
44
43
|
async upsert(tenantId, objectId, principalType, options) {
|
|
45
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.upsert", options
|
|
44
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.upsert", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
46
45
|
return this.client.sendOperationRequest({ tenantId, objectId, principalType, options }, upsertOperationSpec);
|
|
47
46
|
});
|
|
48
47
|
}
|
|
@@ -53,7 +52,7 @@ class TeamsExtensionAssignmentImpl {
|
|
|
53
52
|
* @param options The options parameters.
|
|
54
53
|
*/
|
|
55
54
|
async delete(tenantId, objectId, options) {
|
|
56
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.delete", options
|
|
55
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.delete", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
57
56
|
return this.client.sendOperationRequest({ tenantId, objectId, options }, deleteOperationSpec);
|
|
58
57
|
});
|
|
59
58
|
}
|
|
@@ -100,10 +99,7 @@ const upsertOperationSpec = {
|
|
|
100
99
|
principalType: ["principalType"],
|
|
101
100
|
clientIds: ["options", "clientIds"],
|
|
102
101
|
},
|
|
103
|
-
mapper: {
|
|
104
|
-
...Mappers.TeamsExtensionAssignmentCreateOrUpdateRequest,
|
|
105
|
-
required: true,
|
|
106
|
-
},
|
|
102
|
+
mapper: Object.assign(Object.assign({}, Mappers.TeamsExtensionAssignmentCreateOrUpdateRequest), { required: true }),
|
|
107
103
|
},
|
|
108
104
|
queryParameters: [Parameters.apiVersion],
|
|
109
105
|
urlParameters: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teamsExtensionAssignment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/teamsExtensionAssignment.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,4DAA4D;AAC5D,MAAa,4BAA4B;
|
|
1
|
+
{"version":3,"file":"teamsExtensionAssignment.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/teamsExtensionAssignment.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,4DAA4D;AAC5D,MAAa,4BAA4B;IAGvC;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,QAAgB,EAChB,QAAgB,EAChB,OAAmD;QAEnD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,wBAAwB,E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EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { TeamsExtensionAssignment } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n TeamsExtensionAssignmentGetOptionalParams,\n TeamsExtensionAssignmentGetResponse,\n TeamsExtensionPrincipalType,\n TeamsExtensionAssignmentUpsertOptionalParams,\n TeamsExtensionAssignmentUpsertResponse,\n TeamsExtensionAssignmentDeleteOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing TeamsExtensionAssignment operations. */\nexport class TeamsExtensionAssignmentImpl implements TeamsExtensionAssignment {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class TeamsExtensionAssignment class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Get Teams Phone access assignment by object id.\n * @param tenantId Tenant Id we want to get the assignment for.\n * @param objectId Object Id we want to get the assignment for.\n * @param options The options parameters.\n */\n async get(\n tenantId: string,\n objectId: string,\n options?: TeamsExtensionAssignmentGetOptionalParams,\n ): Promise<TeamsExtensionAssignmentGetResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { tenantId, objectId, options },\n getOperationSpec,\n ) as Promise<TeamsExtensionAssignmentGetResponse>;\n },\n );\n }\n\n /**\n * Creates or replaces a Teams Phone access assignment.\n * @param tenantId Tenant Id we want to update the assignment for.\n * @param objectId Object Id we want to update the assignment for.\n * @param principalType The type of principal the assignment is for.\n * @param options The options parameters.\n */\n async upsert(\n tenantId: string,\n objectId: string,\n principalType: TeamsExtensionPrincipalType,\n options?: TeamsExtensionAssignmentUpsertOptionalParams,\n ): Promise<TeamsExtensionAssignmentUpsertResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.upsert\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { tenantId, objectId, principalType, options },\n upsertOperationSpec,\n ) as Promise<TeamsExtensionAssignmentUpsertResponse>;\n },\n );\n }\n\n /**\n * Removes a Teams Phone access assignment.\n * @param tenantId Tenant Id we want to remove the assignment for.\n * @param objectId Object Id we want to remove the assignment for.\n * @param options The options parameters.\n */\n async delete(\n tenantId: string,\n objectId: string,\n options?: TeamsExtensionAssignmentDeleteOptionalParams,\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.delete\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { tenantId, objectId, options },\n deleteOperationSpec,\n ) as Promise<void>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/access/teamsExtension/tenants/{tenantId}/assignments/{objectId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.TeamsExtensionAssignmentResponse,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.tenantId,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst upsertOperationSpec: coreClient.OperationSpec = {\n path: \"/access/teamsExtension/tenants/{tenantId}/assignments/{objectId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.TeamsExtensionAssignmentResponse,\n },\n 201: {\n bodyMapper: Mappers.TeamsExtensionAssignmentResponse,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n principalType: [\"principalType\"],\n clientIds: [\"options\", \"clientIds\"],\n },\n mapper: {\n ...Mappers.TeamsExtensionAssignmentCreateOrUpdateRequest,\n required: true,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.tenantId,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/access/teamsExtension/tenants/{tenantId}/assignments/{objectId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.tenantId,\n Parameters.objectId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -15,7 +15,6 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
15
15
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
16
16
|
/** Class containing TeamsExtensionToken operations. */
|
|
17
17
|
class TeamsExtensionTokenImpl {
|
|
18
|
-
client;
|
|
19
18
|
/**
|
|
20
19
|
* Initialize a new instance of the class TeamsExtensionToken class.
|
|
21
20
|
* @param client Reference to the service client
|
|
@@ -29,7 +28,7 @@ class TeamsExtensionTokenImpl {
|
|
|
29
28
|
* @param options The options parameters.
|
|
30
29
|
*/
|
|
31
30
|
async exchange(body, options) {
|
|
32
|
-
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.exchange", options
|
|
31
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.exchange", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
33
32
|
return this.client.sendOperationRequest({ body, options }, exchangeOperationSpec);
|
|
34
33
|
});
|
|
35
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teamsExtensionToken.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/teamsExtensionToken.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,uDAAuD;AACvD,MAAa,uBAAuB;
|
|
1
|
+
{"version":3,"file":"teamsExtensionToken.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/teamsExtensionToken.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAOtD,uDAAuD;AACvD,MAAa,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CACZ,IAA6B,EAC7B,OAAmD;QAEnD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,6BAA6B,EAC7B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,IAAI,EAAE,OAAO,EAAE,EACjB,qBAAqB,CAC0B,CAAC;QACpD,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA/BD,0DA+BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,6CAA6C;IACnD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sCAAsC;SAC3D;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE,UAAU,CAAC,KAAK;IAC7B,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { TeamsExtensionToken } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n TeamsExtensionTokenExchangeOptionalParams,\n TeamsExtensionTokenExchangeResponse,\n} from \"../models/index.js\";\n\n/** Class containing TeamsExtensionToken operations. */\nexport class TeamsExtensionTokenImpl implements TeamsExtensionToken {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class TeamsExtensionToken class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Exchanges a Teams Phone token for an ACS user access token.\n * @param body Request payload for the token exchange.\n * @param options The options parameters.\n */\n async exchange(\n body: Record<string, unknown>,\n options?: TeamsExtensionTokenExchangeOptionalParams,\n ): Promise<TeamsExtensionTokenExchangeResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.exchange\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { body, options },\n exchangeOperationSpec,\n ) as Promise<TeamsExtensionTokenExchangeResponse>;\n },\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst exchangeOperationSpec: coreClient.OperationSpec = {\n path: \"/access/teamsExtension/:exchangeAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessTokenResult,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.body3,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -18,16 +18,18 @@ const pageMap = new WeakMap();
|
|
|
18
18
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
19
19
|
*/
|
|
20
20
|
function getContinuationToken(page) {
|
|
21
|
+
var _a;
|
|
21
22
|
if (typeof page !== "object" || page === null) {
|
|
22
23
|
return undefined;
|
|
23
24
|
}
|
|
24
|
-
return pageMap.get(page)
|
|
25
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
25
26
|
}
|
|
26
27
|
function setContinuationToken(page, continuationToken) {
|
|
28
|
+
var _a;
|
|
27
29
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
|
-
const pageInfo = pageMap.get(page)
|
|
32
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
31
33
|
pageInfo.continuationToken = continuationToken;
|
|
32
34
|
pageMap.set(page, pageInfo);
|
|
33
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../../../src/generated/src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../../../src/generated/src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,SAAgB,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined,\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.52.
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.52.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|