@azure/arm-trustedsigning 1.0.0-beta.1 → 1.0.0-beta.3

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.
Files changed (99) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/LICENSE +4 -4
  3. package/README.md +24 -16
  4. package/dist/browser/api/certificateProfiles/index.js +128 -128
  5. package/dist/browser/api/certificateProfiles/index.js.map +1 -1
  6. package/dist/browser/api/codeSigningAccounts/index.js +82 -78
  7. package/dist/browser/api/codeSigningAccounts/index.js.map +1 -1
  8. package/dist/browser/api/codeSigningContext.d.ts.map +1 -1
  9. package/dist/browser/api/codeSigningContext.js +15 -9
  10. package/dist/browser/api/codeSigningContext.js.map +1 -1
  11. package/dist/browser/api/operations/index.js +5 -6
  12. package/dist/browser/api/operations/index.js.map +1 -1
  13. package/dist/browser/classic/certificateProfiles/index.js +3 -1
  14. package/dist/browser/classic/certificateProfiles/index.js.map +1 -1
  15. package/dist/browser/classic/codeSigningAccounts/index.js +3 -1
  16. package/dist/browser/classic/codeSigningAccounts/index.js.map +1 -1
  17. package/dist/browser/classic/operations/index.js +3 -1
  18. package/dist/browser/classic/operations/index.js.map +1 -1
  19. package/dist/browser/codeSigningClient.js +14 -3
  20. package/dist/browser/codeSigningClient.js.map +1 -1
  21. package/dist/browser/restorePollerHelpers.js +11 -13
  22. package/dist/browser/restorePollerHelpers.js.map +1 -1
  23. package/dist/browser/static-helpers/pagingHelpers.js +31 -50
  24. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
  25. package/dist/browser/static-helpers/pollingHelpers.js +14 -11
  26. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
  27. package/dist/commonjs/api/certificateProfiles/index.js +128 -128
  28. package/dist/commonjs/api/certificateProfiles/index.js.map +1 -1
  29. package/dist/commonjs/api/codeSigningAccounts/index.js +82 -78
  30. package/dist/commonjs/api/codeSigningAccounts/index.js.map +1 -1
  31. package/dist/commonjs/api/codeSigningContext.d.ts.map +1 -1
  32. package/dist/commonjs/api/codeSigningContext.js +15 -9
  33. package/dist/commonjs/api/codeSigningContext.js.map +1 -1
  34. package/dist/commonjs/api/operations/index.js +5 -6
  35. package/dist/commonjs/api/operations/index.js.map +1 -1
  36. package/dist/commonjs/classic/certificateProfiles/index.js +3 -1
  37. package/dist/commonjs/classic/certificateProfiles/index.js.map +1 -1
  38. package/dist/commonjs/classic/codeSigningAccounts/index.js +3 -1
  39. package/dist/commonjs/classic/codeSigningAccounts/index.js.map +1 -1
  40. package/dist/commonjs/classic/operations/index.js +3 -1
  41. package/dist/commonjs/classic/operations/index.js.map +1 -1
  42. package/dist/commonjs/codeSigningClient.js +14 -3
  43. package/dist/commonjs/codeSigningClient.js.map +1 -1
  44. package/dist/commonjs/restorePollerHelpers.js +11 -13
  45. package/dist/commonjs/restorePollerHelpers.js.map +1 -1
  46. package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
  47. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
  48. package/dist/commonjs/static-helpers/pollingHelpers.js +14 -11
  49. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
  50. package/dist/commonjs/tsdoc-metadata.json +11 -11
  51. package/dist/esm/api/certificateProfiles/index.js +128 -128
  52. package/dist/esm/api/certificateProfiles/index.js.map +1 -1
  53. package/dist/esm/api/codeSigningAccounts/index.js +82 -78
  54. package/dist/esm/api/codeSigningAccounts/index.js.map +1 -1
  55. package/dist/esm/api/codeSigningContext.d.ts.map +1 -1
  56. package/dist/esm/api/codeSigningContext.js +15 -9
  57. package/dist/esm/api/codeSigningContext.js.map +1 -1
  58. package/dist/esm/api/operations/index.js +5 -6
  59. package/dist/esm/api/operations/index.js.map +1 -1
  60. package/dist/esm/classic/certificateProfiles/index.js +3 -1
  61. package/dist/esm/classic/certificateProfiles/index.js.map +1 -1
  62. package/dist/esm/classic/codeSigningAccounts/index.js +3 -1
  63. package/dist/esm/classic/codeSigningAccounts/index.js.map +1 -1
  64. package/dist/esm/classic/operations/index.js +3 -1
  65. package/dist/esm/classic/operations/index.js.map +1 -1
  66. package/dist/esm/codeSigningClient.js +14 -3
  67. package/dist/esm/codeSigningClient.js.map +1 -1
  68. package/dist/esm/restorePollerHelpers.js +11 -13
  69. package/dist/esm/restorePollerHelpers.js.map +1 -1
  70. package/dist/esm/static-helpers/pagingHelpers.js +31 -50
  71. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
  72. package/dist/esm/static-helpers/pollingHelpers.js +14 -11
  73. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
  74. package/dist/react-native/api/certificateProfiles/index.js +128 -128
  75. package/dist/react-native/api/certificateProfiles/index.js.map +1 -1
  76. package/dist/react-native/api/codeSigningAccounts/index.js +82 -78
  77. package/dist/react-native/api/codeSigningAccounts/index.js.map +1 -1
  78. package/dist/react-native/api/codeSigningContext.d.ts.map +1 -1
  79. package/dist/react-native/api/codeSigningContext.js +15 -9
  80. package/dist/react-native/api/codeSigningContext.js.map +1 -1
  81. package/dist/react-native/api/operations/index.js +5 -6
  82. package/dist/react-native/api/operations/index.js.map +1 -1
  83. package/dist/react-native/classic/certificateProfiles/index.js +3 -1
  84. package/dist/react-native/classic/certificateProfiles/index.js.map +1 -1
  85. package/dist/react-native/classic/codeSigningAccounts/index.js +3 -1
  86. package/dist/react-native/classic/codeSigningAccounts/index.js.map +1 -1
  87. package/dist/react-native/classic/operations/index.js +3 -1
  88. package/dist/react-native/classic/operations/index.js.map +1 -1
  89. package/dist/react-native/codeSigningClient.js +14 -3
  90. package/dist/react-native/codeSigningClient.js.map +1 -1
  91. package/dist/react-native/restorePollerHelpers.js +11 -13
  92. package/dist/react-native/restorePollerHelpers.js.map +1 -1
  93. package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
  94. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
  95. package/dist/react-native/static-helpers/pollingHelpers.js +14 -11
  96. package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
  97. package/package.json +46 -61
  98. /package/review/{arm-trustedsigning-models.api.md → arm-trustedsigning-models-node.api.md} +0 -0
  99. /package/review/{arm-trustedsigning.api.md → arm-trustedsigning-node.api.md} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/codeSigningAccounts/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,sCAAsC,EACtC,2CAA2C,GAM5C,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,mCAAmC,EAEnC,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAY9E,MAAM,UAAU,QAAQ,CACtB,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,WAAmB,EACnB,UAAgD,EAAE,cAAc,EAAE,EAAE,EAAE;IAEtE,OAAO,OAAO;SACX,IAAI,CACH,sIAAsI,EACtI,cAAc,EACd,iBAAiB,EACjB,WAAW,CACZ;SACA,GAAG,mBAAM,mCAAmC,CAAC,OAAO,CAAC,EAAG,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAA6B;;IACjE,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QACjC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;Q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AC,CAAC;IACxF,OAAO,iCAAiC,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n codeSigningAccountPropertiesSerializer,\n codeSigningAccountPatchPropertiesSerializer,\n CodeSigningAccount,\n CodeSigningAccountPatch,\n CheckNameAvailability,\n CheckNameAvailabilityResult,\n _CodeSigningAccountListResult,\n} from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport { serializeRecord } from \"../../helpers/serializerHelpers.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CodeSigningAccountsGetOptionalParams,\n CodeSigningAccountsCreateOptionalParams,\n CodeSigningAccountsUpdateOptionalParams,\n CodeSigningAccountsDeleteOptionalParams,\n CodeSigningAccountsListByResourceGroupOptionalParams,\n CodeSigningAccountsListBySubscriptionOptionalParams,\n CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n} from \"../../models/options.js\";\n\nexport function _getSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<CodeSigningAccount> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n tags: result.body[\"tags\"],\n location: result.body[\"location\"],\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n accountUri: result.body.properties?.[\"accountUri\"],\n sku: !result.body.properties?.sku\n ? undefined\n : { name: result.body.properties?.sku?.[\"name\"] },\n provisioningState: result.body.properties?.[\"provisioningState\"],\n },\n };\n}\n\n/** Get a trusted Signing Account. */\nexport async function get(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsGetOptionalParams = { requestOptions: {} },\n): Promise<CodeSigningAccount> {\n const result = await _getSend(context, subscriptionId, resourceGroupName, accountName, options);\n return _getDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options: CodeSigningAccountsCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: {\n tags: !resource.tags ? resource.tags : (serializeRecord(resource.tags as any) as any),\n location: resource[\"location\"],\n properties: !resource.properties\n ? resource.properties\n : codeSigningAccountPropertiesSerializer(resource.properties),\n },\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<CodeSigningAccount> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n tags: result.body[\"tags\"],\n location: result.body[\"location\"],\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n accountUri: result.body.properties?.[\"accountUri\"],\n sku: !result.body.properties?.sku\n ? undefined\n : { name: result.body.properties?.sku?.[\"name\"] },\n provisioningState: result.body.properties?.[\"provisioningState\"],\n },\n };\n}\n\n/** Create a trusted Signing Account. */\nexport function create(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options: CodeSigningAccountsCreateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount> {\n return getLongRunningPoller(context, _createDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createSend(context, subscriptionId, resourceGroupName, accountName, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n}\n\nexport function _updateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options: CodeSigningAccountsUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .patch({\n ...operationOptionsToRequestParameters(options),\n body: {\n tags: !properties.tags ? properties.tags : (serializeRecord(properties.tags as any) as any),\n properties: !properties.properties\n ? properties.properties\n : codeSigningAccountPatchPropertiesSerializer(properties.properties),\n },\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<CodeSigningAccount> {\n const expectedStatuses = [\"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n tags: result.body[\"tags\"],\n location: result.body[\"location\"],\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n accountUri: result.body.properties?.[\"accountUri\"],\n sku: !result.body.properties?.sku\n ? undefined\n : { name: result.body.properties?.sku?.[\"name\"] },\n provisioningState: result.body.properties?.[\"provisioningState\"],\n },\n };\n}\n\n/** Update a trusted signing account. */\nexport function update(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options: CodeSigningAccountsUpdateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount> {\n return getLongRunningPoller(context, _updateDeserialize, [\"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _updateSend(context, subscriptionId, resourceGroupName, accountName, properties, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n}\n\nexport function _$deleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete a trusted signing account. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _$deleteSend(context, subscriptionId, resourceGroupName, accountName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n options: CodeSigningAccountsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts\",\n subscriptionId,\n resourceGroupName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CodeSigningAccountListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n tags: p[\"tags\"],\n location: p[\"location\"],\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n accountUri: p.properties?.[\"accountUri\"],\n sku: !p.properties?.sku ? undefined : { name: p.properties?.sku?.[\"name\"] },\n provisioningState: p.properties?.[\"provisioningState\"],\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** Lists trusted signing accounts within a resource group. */\nexport function listByResourceGroup(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n options: CodeSigningAccountsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CodeSigningAccount> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, subscriptionId, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listBySubscriptionSend(\n context: Client,\n subscriptionId: string,\n options: CodeSigningAccountsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.CodeSigning/codeSigningAccounts\",\n subscriptionId,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CodeSigningAccountListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n tags: p[\"tags\"],\n location: p[\"location\"],\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n accountUri: p.properties?.[\"accountUri\"],\n sku: !p.properties?.sku ? undefined : { name: p.properties?.sku?.[\"name\"] },\n provisioningState: p.properties?.[\"provisioningState\"],\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** Lists trusted signing accounts within a subscription. */\nexport function listBySubscription(\n context: Client,\n subscriptionId: string,\n options: CodeSigningAccountsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CodeSigningAccount> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, subscriptionId, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _checkNameAvailabilitySend(\n context: Client,\n subscriptionId: string,\n body: CheckNameAvailability,\n options: CodeSigningAccountsCheckNameAvailabilityOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.CodeSigning/checkNameAvailability\",\n subscriptionId,\n )\n .post({\n ...operationOptionsToRequestParameters(options),\n body: { name: body[\"name\"] },\n });\n}\n\nexport async function _checkNameAvailabilityDeserialize(\n result: PathUncheckedResponse,\n): Promise<CheckNameAvailabilityResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n nameAvailable: result.body[\"nameAvailable\"],\n reason: result.body[\"reason\"],\n message: result.body[\"message\"],\n };\n}\n\n/** Checks that the trusted signing account name is valid and is not already in use. */\nexport async function checkNameAvailability(\n context: Client,\n subscriptionId: string,\n body: CheckNameAvailability,\n options: CodeSigningAccountsCheckNameAvailabilityOptionalParams = {\n requestOptions: {},\n },\n): Promise<CheckNameAvailabilityResult> {\n const result = await _checkNameAvailabilitySend(context, subscriptionId, body, options);\n return _checkNameAvailabilityDeserialize(result);\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/codeSigningAccounts/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,sCAAsC,EACtC,2CAA2C,GAM5C,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEL,mCAAmC,EAEnC,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAY9E,MAAM,UAAU,QAAQ,CACtB,OAAe,EACf,cAAsB,EACtB,iBAAyB,EACzB,WAAmB,EACnB,UA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AAC;QAC7B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAe,EACf,cAAsB,EACtB,IAA2B,EAC3B,UAAkE;IAChE,cAAc,EAAE,EAAE;CACnB;IAED,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACxF,OAAO,iCAAiC,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n codeSigningAccountPropertiesSerializer,\n codeSigningAccountPatchPropertiesSerializer,\n CodeSigningAccount,\n CodeSigningAccountPatch,\n CheckNameAvailability,\n CheckNameAvailabilityResult,\n _CodeSigningAccountListResult,\n} from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport { serializeRecord } from \"../../helpers/serializerHelpers.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { getLongRunningPoller } from \"../../static-helpers/pollingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CodeSigningAccountsGetOptionalParams,\n CodeSigningAccountsCreateOptionalParams,\n CodeSigningAccountsUpdateOptionalParams,\n CodeSigningAccountsDeleteOptionalParams,\n CodeSigningAccountsListByResourceGroupOptionalParams,\n CodeSigningAccountsListBySubscriptionOptionalParams,\n CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n} from \"../../models/options.js\";\n\nexport function _getSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsGetOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _getDeserialize(result: PathUncheckedResponse): Promise<CodeSigningAccount> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n tags: result.body[\"tags\"],\n location: result.body[\"location\"],\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n accountUri: result.body.properties?.[\"accountUri\"],\n sku: !result.body.properties?.sku\n ? undefined\n : { name: result.body.properties?.sku?.[\"name\"] },\n provisioningState: result.body.properties?.[\"provisioningState\"],\n },\n };\n}\n\n/** Get a trusted Signing Account. */\nexport async function get(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsGetOptionalParams = { requestOptions: {} },\n): Promise<CodeSigningAccount> {\n const result = await _getSend(context, subscriptionId, resourceGroupName, accountName, options);\n return _getDeserialize(result);\n}\n\nexport function _createSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options: CodeSigningAccountsCreateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .put({\n ...operationOptionsToRequestParameters(options),\n body: {\n tags: !resource.tags ? resource.tags : (serializeRecord(resource.tags as any) as any),\n location: resource[\"location\"],\n properties: !resource.properties\n ? resource.properties\n : codeSigningAccountPropertiesSerializer(resource.properties),\n },\n });\n}\n\nexport async function _createDeserialize(\n result: PathUncheckedResponse,\n): Promise<CodeSigningAccount> {\n const expectedStatuses = [\"200\", \"201\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n tags: result.body[\"tags\"],\n location: result.body[\"location\"],\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n accountUri: result.body.properties?.[\"accountUri\"],\n sku: !result.body.properties?.sku\n ? undefined\n : { name: result.body.properties?.sku?.[\"name\"] },\n provisioningState: result.body.properties?.[\"provisioningState\"],\n },\n };\n}\n\n/** Create a trusted Signing Account. */\nexport function create(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options: CodeSigningAccountsCreateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount> {\n return getLongRunningPoller(context, _createDeserialize, [\"200\", \"201\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _createSend(context, subscriptionId, resourceGroupName, accountName, resource, options),\n resourceLocationConfig: \"azure-async-operation\",\n }) as PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n}\n\nexport function _updateSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options: CodeSigningAccountsUpdateOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .patch({\n ...operationOptionsToRequestParameters(options),\n body: {\n tags: !properties.tags ? properties.tags : (serializeRecord(properties.tags as any) as any),\n properties: !properties.properties\n ? properties.properties\n : codeSigningAccountPatchPropertiesSerializer(properties.properties),\n },\n });\n}\n\nexport async function _updateDeserialize(\n result: PathUncheckedResponse,\n): Promise<CodeSigningAccount> {\n const expectedStatuses = [\"200\", \"202\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n tags: result.body[\"tags\"],\n location: result.body[\"location\"],\n id: result.body[\"id\"],\n name: result.body[\"name\"],\n type: result.body[\"type\"],\n systemData: !result.body.systemData\n ? undefined\n : {\n createdBy: result.body.systemData?.[\"createdBy\"],\n createdByType: result.body.systemData?.[\"createdByType\"],\n createdAt:\n result.body.systemData?.[\"createdAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: result.body.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: result.body.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n result.body.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(result.body.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !result.body.properties\n ? undefined\n : {\n accountUri: result.body.properties?.[\"accountUri\"],\n sku: !result.body.properties?.sku\n ? undefined\n : { name: result.body.properties?.sku?.[\"name\"] },\n provisioningState: result.body.properties?.[\"provisioningState\"],\n },\n };\n}\n\n/** Update a trusted signing account. */\nexport function update(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options: CodeSigningAccountsUpdateOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount> {\n return getLongRunningPoller(context, _updateDeserialize, [\"200\", \"202\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _updateSend(context, subscriptionId, resourceGroupName, accountName, properties, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n}\n\nexport function _$deleteSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\",\n subscriptionId,\n resourceGroupName,\n accountName,\n )\n .delete({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void> {\n const expectedStatuses = [\"202\", \"204\", \"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return;\n}\n\n/** Delete a trusted signing account. */\n/**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\nexport function $delete(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n accountName: string,\n options: CodeSigningAccountsDeleteOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<void>, void> {\n return getLongRunningPoller(context, _$deleteDeserialize, [\"202\", \"204\", \"200\"], {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n getInitialResponse: () =>\n _$deleteSend(context, subscriptionId, resourceGroupName, accountName, options),\n resourceLocationConfig: \"location\",\n }) as PollerLike<OperationState<void>, void>;\n}\n\nexport function _listByResourceGroupSend(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n options: CodeSigningAccountsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts\",\n subscriptionId,\n resourceGroupName,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listByResourceGroupDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CodeSigningAccountListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n tags: p[\"tags\"],\n location: p[\"location\"],\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n accountUri: p.properties?.[\"accountUri\"],\n sku: !p.properties?.sku ? undefined : { name: p.properties?.sku?.[\"name\"] },\n provisioningState: p.properties?.[\"provisioningState\"],\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** Lists trusted signing accounts within a resource group. */\nexport function listByResourceGroup(\n context: Client,\n subscriptionId: string,\n resourceGroupName: string,\n options: CodeSigningAccountsListByResourceGroupOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CodeSigningAccount> {\n return buildPagedAsyncIterator(\n context,\n () => _listByResourceGroupSend(context, subscriptionId, resourceGroupName, options),\n _listByResourceGroupDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _listBySubscriptionSend(\n context: Client,\n subscriptionId: string,\n options: CodeSigningAccountsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.CodeSigning/codeSigningAccounts\",\n subscriptionId,\n )\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listBySubscriptionDeserialize(\n result: PathUncheckedResponse,\n): Promise<_CodeSigningAccountListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n tags: p[\"tags\"],\n location: p[\"location\"],\n id: p[\"id\"],\n name: p[\"name\"],\n type: p[\"type\"],\n systemData: !p.systemData\n ? undefined\n : {\n createdBy: p.systemData?.[\"createdBy\"],\n createdByType: p.systemData?.[\"createdByType\"],\n createdAt:\n p.systemData?.[\"createdAt\"] !== undefined\n ? new Date(p.systemData?.[\"createdAt\"])\n : undefined,\n lastModifiedBy: p.systemData?.[\"lastModifiedBy\"],\n lastModifiedByType: p.systemData?.[\"lastModifiedByType\"],\n lastModifiedAt:\n p.systemData?.[\"lastModifiedAt\"] !== undefined\n ? new Date(p.systemData?.[\"lastModifiedAt\"])\n : undefined,\n },\n properties: !p.properties\n ? undefined\n : {\n accountUri: p.properties?.[\"accountUri\"],\n sku: !p.properties?.sku ? undefined : { name: p.properties?.sku?.[\"name\"] },\n provisioningState: p.properties?.[\"provisioningState\"],\n },\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** Lists trusted signing accounts within a subscription. */\nexport function listBySubscription(\n context: Client,\n subscriptionId: string,\n options: CodeSigningAccountsListBySubscriptionOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<CodeSigningAccount> {\n return buildPagedAsyncIterator(\n context,\n () => _listBySubscriptionSend(context, subscriptionId, options),\n _listBySubscriptionDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n\nexport function _checkNameAvailabilitySend(\n context: Client,\n subscriptionId: string,\n body: CheckNameAvailability,\n options: CodeSigningAccountsCheckNameAvailabilityOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.CodeSigning/checkNameAvailability\",\n subscriptionId,\n )\n .post({\n ...operationOptionsToRequestParameters(options),\n body: { name: body[\"name\"] },\n });\n}\n\nexport async function _checkNameAvailabilityDeserialize(\n result: PathUncheckedResponse,\n): Promise<CheckNameAvailabilityResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n nameAvailable: result.body[\"nameAvailable\"],\n reason: result.body[\"reason\"],\n message: result.body[\"message\"],\n };\n}\n\n/** Checks that the trusted signing account name is valid and is not already in use. */\nexport async function checkNameAvailability(\n context: Client,\n subscriptionId: string,\n body: CheckNameAvailability,\n options: CodeSigningAccountsCheckNameAvailabilityOptionalParams = {\n requestOptions: {},\n },\n): Promise<CheckNameAvailabilityResult> {\n const result = await _checkNameAvailabilitySend(context, subscriptionId, body, options);\n return _checkNameAvailabilityDeserialize(result);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAgCpB"}
1
+ {"version":3,"file":"codeSigningContext.d.ts","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAG3E,MAAM,WAAW,kBAAmB,SAAQ,MAAM;CAAG;AAErD,0CAA0C;AAC1C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,+BAAoC,GAC5C,kBAAkB,CAmCpB"}
@@ -1,20 +1,26 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { __rest } from "tslib";
4
3
  import { getClient } from "@azure-rest/core-client";
5
4
  import { logger } from "../logger.js";
6
5
  /** Code Signing resource provider api. */
7
6
  export function createCodeSigning(credential, options = {}) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h;
9
- const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `https://management.azure.com`;
10
- const prefixFromOptions = (_c = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _c === void 0 ? void 0 : _c.userAgentPrefix;
11
- const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api";
12
- const _j = Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix }, loggingOptions: { logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info }, credentials: {
13
- scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [`${endpointUrl}/.default`],
14
- } }), { apiVersion: _ } = _j, updatedOptions = __rest(_j, ["apiVersion"]);
7
+ const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;
8
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
9
+ const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.3`;
10
+ const userAgentPrefix = prefixFromOptions
11
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
12
+ : `azsdk-js-api ${userAgentInfo}`;
13
+ const { apiVersion: _, ...updatedOptions } = {
14
+ ...options,
15
+ userAgentOptions: { userAgentPrefix },
16
+ loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
17
+ credentials: {
18
+ scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],
19
+ },
20
+ };
15
21
  const clientContext = getClient(endpointUrl, credential, updatedOptions);
16
22
  clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
17
- const apiVersion = (_h = options.apiVersion) !== null && _h !== void 0 ? _h : "2024-02-05-preview";
23
+ const apiVersion = options.apiVersion ?? "2024-02-05-preview";
18
24
  clientContext.pipeline.addPolicy({
19
25
  name: "ClientApiVersionPolicy",
20
26
  sendRequest: (req, next) => {
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,M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,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : \"azsdk-js-api\";\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.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\")) {\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 return clientContext;\n}\n"]}
1
+ {"version":3,"file":"codeSigningContext.js","sourceRoot":"","sources":["../../../src/api/codeSigningContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAUtC,0CAA0C;AAC1C,MAAM,UAAU,iBAAiB,CAC/B,UAA2B,EAC3B,UAA2C,EAAE;IAE7C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,8BAA8B,CAAC;IAE1F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE;KACF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAoB,CAAC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ClientOptions, Client, getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\n\nexport interface CodeSigningContext extends Client {}\n\n/** Optional parameters for the client. */\nexport interface CodeSigningClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n apiVersion?: string;\n}\n\n/** Code Signing resource provider api. */\nexport function createCodeSigning(\n credential: TokenCredential,\n options: CodeSigningClientOptionalParams = {},\n): CodeSigningContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://management.azure.com`;\n\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-trustedsigning/1.0.0-beta.3`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2024-02-05-preview\";\n clientContext.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\")) {\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 return clientContext;\n}\n"]}
@@ -5,7 +5,7 @@ import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js"
5
5
  export function _listSend(context, options = { requestOptions: {} }) {
6
6
  return context
7
7
  .path("/providers/Microsoft.CodeSigning/operations")
8
- .get(Object.assign({}, operationOptionsToRequestParameters(options)));
8
+ .get({ ...operationOptionsToRequestParameters(options) });
9
9
  }
10
10
  export async function _listDeserialize(result) {
11
11
  const expectedStatuses = ["200"];
@@ -14,17 +14,16 @@ export async function _listDeserialize(result) {
14
14
  }
15
15
  return {
16
16
  value: result.body["value"].map((p) => {
17
- var _a, _b, _c, _d;
18
17
  return {
19
18
  name: p["name"],
20
19
  isDataAction: p["isDataAction"],
21
20
  display: !p.display
22
21
  ? undefined
23
22
  : {
24
- provider: (_a = p.display) === null || _a === void 0 ? void 0 : _a["provider"],
25
- resource: (_b = p.display) === null || _b === void 0 ? void 0 : _b["resource"],
26
- operation: (_c = p.display) === null || _c === void 0 ? void 0 : _c["operation"],
27
- description: (_d = p.display) === null || _d === void 0 ? void 0 : _d["description"],
23
+ provider: p.display?.["provider"],
24
+ resource: p.display?.["resource"],
25
+ operation: p.display?.["operation"],
26
+ description: p.display?.["description"],
28
27
  },
29
28
  origin: p["origin"],
30
29
  actionType: p["actionType"],
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAEL,mCAAmC,EAEnC,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAG/C,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,OAAO;SACX,IAAI,CAAC,6CAA6C,CAAC;SACnD,GAAG,mBAAM,mCAAmC,CAAC,OAAO,CAAC,EAAG,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;;YACzC,OAAO;gBACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;gBACf,YAAY,EAAE,CAAC,CAAC,cAAc,CAAC;gBAC/B,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO;oBACjB,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC;wBACE,QAAQ,EAAE,MAAA,CAAC,CAAC,OAAO,0CAAG,UAAU,CAAC;wBACjC,QAAQ,EAAE,MAAA,CAAC,CAAC,OAAO,0CAAG,UAAU,CAAC;wBACjC,SAAS,EAAE,MAAA,CAAC,CAAC,OAAO,0CAAG,WAAW,CAAC;wBACnC,WAAW,EAAE,MAAA,CAAC,CAAC,OAAO,0CAAG,aAAa,CAAC;qBACxC;gBACL,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC;gBACnB,UAAU,EAAE,CAAC,CAAC,YAAY,CAAC;aAC5B,CAAC;QACJ,CAAC,CAAC;QACF,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Operation, _OperationListResult } from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { OperationsListOptionalParams } from \"../../models/options.js\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/providers/Microsoft.CodeSigning/operations\")\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n name: p[\"name\"],\n isDataAction: p[\"isDataAction\"],\n display: !p.display\n ? undefined\n : {\n provider: p.display?.[\"provider\"],\n resource: p.display?.[\"resource\"],\n operation: p.display?.[\"operation\"],\n description: p.display?.[\"description\"],\n },\n origin: p[\"origin\"],\n actionType: p[\"actionType\"],\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAEL,mCAAmC,EAEnC,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAG/C,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,OAAO;SACX,IAAI,CAAC,6CAA6C,CAAC;SACnD,GAAG,CAAC,EAAE,GAAG,mCAAmC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;YACzC,OAAO;gBACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;gBACf,YAAY,EAAE,CAAC,CAAC,cAAc,CAAC;gBAC/B,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO;oBACjB,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC;wBACE,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC;wBACjC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC;wBACjC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC;wBACnC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC;qBACxC;gBACL,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC;gBACnB,UAAU,EAAE,CAAC,CAAC,YAAY,CAAC;aAC5B,CAAC;QACJ,CAAC,CAAC;QACF,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,UAAwC,EAAE,cAAc,EAAE,EAAE,EAAE;IAE9D,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,EACjC,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAChD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Operation, _OperationListResult } from \"../../models/models.js\";\nimport { CodeSigningContext as Client } from \"../index.js\";\nimport {\n StreamableMethod,\n operationOptionsToRequestParameters,\n PathUncheckedResponse,\n createRestError,\n} from \"@azure-rest/core-client\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { OperationsListOptionalParams } from \"../../models/options.js\";\n\nexport function _listSend(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n return context\n .path(\"/providers/Microsoft.CodeSigning/operations\")\n .get({ ...operationOptionsToRequestParameters(options) });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_OperationListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return {\n value: result.body[\"value\"].map((p: any) => {\n return {\n name: p[\"name\"],\n isDataAction: p[\"isDataAction\"],\n display: !p.display\n ? undefined\n : {\n provider: p.display?.[\"provider\"],\n resource: p.display?.[\"resource\"],\n operation: p.display?.[\"operation\"],\n description: p.display?.[\"description\"],\n },\n origin: p[\"origin\"],\n actionType: p[\"actionType\"],\n };\n }),\n nextLink: result.body[\"nextLink\"],\n };\n}\n\n/** List the operations for the provider */\nexport function list(\n context: Client,\n options: OperationsListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<Operation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, options),\n _listDeserialize,\n [\"200\"],\n { itemName: \"value\", nextLinkName: \"nextLink\" },\n );\n}\n"]}
@@ -11,6 +11,8 @@ export function getCertificateProfiles(context, subscriptionId) {
11
11
  };
12
12
  }
13
13
  export function getCertificateProfilesOperations(context, subscriptionId) {
14
- return Object.assign({}, getCertificateProfiles(context, subscriptionId));
14
+ return {
15
+ ...getCertificateProfiles(context, subscriptionId),
16
+ };
15
17
  }
16
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/certificateProfiles/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC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copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningContext } from \"../../api/codeSigningContext.js\";\nimport { CertificateProfile, RevokeCertificate } from \"../../models/models.js\";\nimport {\n get,\n create,\n $delete,\n listByCodeSigningAccount,\n revokeCertificate,\n} from \"../../api/certificateProfiles/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CertificateProfilesGetOptionalParams,\n CertificateProfilesCreateOptionalParams,\n CertificateProfilesDeleteOptionalParams,\n CertificateProfilesListByCodeSigningAccountOptionalParams,\n CertificateProfilesRevokeCertificateOptionalParams,\n} from \"../../models/options.js\";\n\n/** Interface representing a CertificateProfiles operations. */\nexport interface CertificateProfilesOperations {\n /** Get details of a certificate profile. */\n get: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesGetOptionalParams,\n ) => Promise<CertificateProfile>;\n /** Create a certificate profile. */\n create: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options?: CertificateProfilesCreateOptionalParams,\n ) => PollerLike<OperationState<CertificateProfile>, CertificateProfile>;\n /** Delete a certificate profile. */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** List certificate profiles under a trusted signing account. */\n listByCodeSigningAccount: (\n resourceGroupName: string,\n accountName: string,\n options?: CertificateProfilesListByCodeSigningAccountOptionalParams,\n ) => PagedAsyncIterableIterator<CertificateProfile>;\n /** Revoke a certificate under a certificate profile. */\n revokeCertificate: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options?: CertificateProfilesRevokeCertificateOptionalParams,\n ) => Promise<void>;\n}\n\nexport function getCertificateProfiles(context: CodeSigningContext, subscriptionId: string) {\n return {\n get: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesGetOptionalParams,\n ) => get(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n create: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options?: CertificateProfilesCreateOptionalParams,\n ) =>\n create(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n resource,\n options,\n ),\n delete: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesDeleteOptionalParams,\n ) => $delete(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n listByCodeSigningAccount: (\n resourceGroupName: string,\n accountName: string,\n options?: CertificateProfilesListByCodeSigningAccountOptionalParams,\n ) => listByCodeSigningAccount(context, subscriptionId, resourceGroupName, accountName, options),\n revokeCertificate: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options?: CertificateProfilesRevokeCertificateOptionalParams,\n ) =>\n revokeCertificate(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n body,\n options,\n ),\n };\n}\n\nexport function getCertificateProfilesOperations(\n context: CodeSigningContext,\n subscriptionId: string,\n): CertificateProfilesOperations {\n return {\n ...getCertificateProfiles(context, subscriptionId),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/certificateProfiles/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,GAAG,EACH,MAAM,EACN,OAAO,EACP,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAwDhD,MAAM,UAAU,sBAAsB,CAAC,OAA2B,EAAE,cAAsB;IACxF,OAAO;QACL,GAAG,EAAE,CACH,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,OAA8C,EAC9C,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC;QACvF,MAAM,EAAE,CACN,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,QAA4B,EAC5B,OAAiD,EACjD,EAAE,CACF,MAAM,CACJ,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,OAAO,CACR;QACH,MAAM,EAAE,CACN,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,OAAiD,EACjD,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC;QAC3F,wBAAwB,EAAE,CACxB,iBAAyB,EACzB,WAAmB,EACnB,OAAmE,EACnE,EAAE,CAAC,wBAAwB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,CAAC;QAC/F,iBAAiB,EAAE,CACjB,iBAAyB,EACzB,WAAmB,EACnB,WAAmB,EACnB,IAAuB,EACvB,OAA4D,EAC5D,EAAE,CACF,iBAAiB,CACf,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,IAAI,EACJ,OAAO,CACR;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAA2B,EAC3B,cAAsB;IAEtB,OAAO;QACL,GAAG,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC;KACnD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningContext } from \"../../api/codeSigningContext.js\";\nimport { CertificateProfile, RevokeCertificate } from \"../../models/models.js\";\nimport {\n get,\n create,\n $delete,\n listByCodeSigningAccount,\n revokeCertificate,\n} from \"../../api/certificateProfiles/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CertificateProfilesGetOptionalParams,\n CertificateProfilesCreateOptionalParams,\n CertificateProfilesDeleteOptionalParams,\n CertificateProfilesListByCodeSigningAccountOptionalParams,\n CertificateProfilesRevokeCertificateOptionalParams,\n} from \"../../models/options.js\";\n\n/** Interface representing a CertificateProfiles operations. */\nexport interface CertificateProfilesOperations {\n /** Get details of a certificate profile. */\n get: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesGetOptionalParams,\n ) => Promise<CertificateProfile>;\n /** Create a certificate profile. */\n create: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options?: CertificateProfilesCreateOptionalParams,\n ) => PollerLike<OperationState<CertificateProfile>, CertificateProfile>;\n /** Delete a certificate profile. */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** List certificate profiles under a trusted signing account. */\n listByCodeSigningAccount: (\n resourceGroupName: string,\n accountName: string,\n options?: CertificateProfilesListByCodeSigningAccountOptionalParams,\n ) => PagedAsyncIterableIterator<CertificateProfile>;\n /** Revoke a certificate under a certificate profile. */\n revokeCertificate: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options?: CertificateProfilesRevokeCertificateOptionalParams,\n ) => Promise<void>;\n}\n\nexport function getCertificateProfiles(context: CodeSigningContext, subscriptionId: string) {\n return {\n get: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesGetOptionalParams,\n ) => get(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n create: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n resource: CertificateProfile,\n options?: CertificateProfilesCreateOptionalParams,\n ) =>\n create(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n resource,\n options,\n ),\n delete: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n options?: CertificateProfilesDeleteOptionalParams,\n ) => $delete(context, subscriptionId, resourceGroupName, accountName, profileName, options),\n listByCodeSigningAccount: (\n resourceGroupName: string,\n accountName: string,\n options?: CertificateProfilesListByCodeSigningAccountOptionalParams,\n ) => listByCodeSigningAccount(context, subscriptionId, resourceGroupName, accountName, options),\n revokeCertificate: (\n resourceGroupName: string,\n accountName: string,\n profileName: string,\n body: RevokeCertificate,\n options?: CertificateProfilesRevokeCertificateOptionalParams,\n ) =>\n revokeCertificate(\n context,\n subscriptionId,\n resourceGroupName,\n accountName,\n profileName,\n body,\n options,\n ),\n };\n}\n\nexport function getCertificateProfilesOperations(\n context: CodeSigningContext,\n subscriptionId: string,\n): CertificateProfilesOperations {\n return {\n ...getCertificateProfiles(context, subscriptionId),\n };\n}\n"]}
@@ -13,6 +13,8 @@ export function getCodeSigningAccounts(context, subscriptionId) {
13
13
  };
14
14
  }
15
15
  export function getCodeSigningAccountsOperations(context, subscriptionId) {
16
- return Object.assign({}, getCodeSigningAccounts(context, subscriptionId));
16
+ return {
17
+ ...getCodeSigningAccounts(context, subscriptionId),
18
+ };
17
19
  }
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/codeSigningAccounts/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EACL,GAAG,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wCAAwC,CAAC;AA8DhD,MAAM,UAAU,sBAAsB,CAAC,OAA2B,EAAE,cAAsB;IACxF,OAAO;QACL,GAAG,EAAE,CACH,iBAAyB,EACzB,WAAmB,EACnB,OAA8C,EAC9C,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,CAAC;QAC1E,MAAM,EAAE,CACN,iBAAyB,EACzB,WAAmB,EACnB,QAA4B,EAC5B,OAAiD,EACjD,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC;QACvF,MAAM,EAAE,CACN,iBAAyB,EACzB,WAAmB,EACnB,UAAmC,EACnC,OAAiD,EACjD,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC;QACzF,MAAM,EAAE,CACN,iBAAyB,EACzB,WAAmB,EACnB,OAAiD,EACjD,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,CAAC;QAC9E,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAA8D,EAC9D,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7E,kBAAkB,EAAE,CAAC,OAA6D,EAAE,EAAE,CACpF,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC;QACtD,qBAAqB,EAAE,CACrB,IAA2B,EAC3B,OAAgE,EAChE,EAAE,CAAC,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC;KACnE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAA2B,EAC3B,cAAsB;IAEtB,yBACK,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,EAClD;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningContext } from \"../../api/codeSigningContext.js\";\nimport {\n CodeSigningAccount,\n CodeSigningAccountPatch,\n CheckNameAvailability,\n CheckNameAvailabilityResult,\n} from \"../../models/models.js\";\nimport {\n get,\n create,\n update,\n $delete,\n listByResourceGroup,\n listBySubscription,\n checkNameAvailability,\n} from \"../../api/codeSigningAccounts/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CodeSigningAccountsGetOptionalParams,\n CodeSigningAccountsCreateOptionalParams,\n CodeSigningAccountsUpdateOptionalParams,\n CodeSigningAccountsDeleteOptionalParams,\n CodeSigningAccountsListByResourceGroupOptionalParams,\n CodeSigningAccountsListBySubscriptionOptionalParams,\n CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n} from \"../../models/options.js\";\n\n/** Interface representing a CodeSigningAccounts operations. */\nexport interface CodeSigningAccountsOperations {\n /** Get a trusted Signing Account. */\n get: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsGetOptionalParams,\n ) => Promise<CodeSigningAccount>;\n /** Create a trusted Signing Account. */\n create: (\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options?: CodeSigningAccountsCreateOptionalParams,\n ) => PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n /** Update a trusted signing account. */\n update: (\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options?: CodeSigningAccountsUpdateOptionalParams,\n ) => PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n /** Delete a trusted signing account. */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Lists trusted signing accounts within a resource group. */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: CodeSigningAccountsListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<CodeSigningAccount>;\n /** Lists trusted signing accounts within a subscription. */\n listBySubscription: (\n options?: CodeSigningAccountsListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<CodeSigningAccount>;\n /** Checks that the trusted signing account name is valid and is not already in use. */\n checkNameAvailability: (\n body: CheckNameAvailability,\n options?: CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n ) => Promise<CheckNameAvailabilityResult>;\n}\n\nexport function getCodeSigningAccounts(context: CodeSigningContext, subscriptionId: string) {\n return {\n get: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsGetOptionalParams,\n ) => get(context, subscriptionId, resourceGroupName, accountName, options),\n create: (\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options?: CodeSigningAccountsCreateOptionalParams,\n ) => create(context, subscriptionId, resourceGroupName, accountName, resource, options),\n update: (\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options?: CodeSigningAccountsUpdateOptionalParams,\n ) => update(context, subscriptionId, resourceGroupName, accountName, properties, options),\n delete: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsDeleteOptionalParams,\n ) => $delete(context, subscriptionId, resourceGroupName, accountName, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: CodeSigningAccountsListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, subscriptionId, resourceGroupName, options),\n listBySubscription: (options?: CodeSigningAccountsListBySubscriptionOptionalParams) =>\n listBySubscription(context, subscriptionId, options),\n checkNameAvailability: (\n body: CheckNameAvailability,\n options?: CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n ) => checkNameAvailability(context, subscriptionId, body, options),\n };\n}\n\nexport function getCodeSigningAccountsOperations(\n context: CodeSigningContext,\n subscriptionId: string,\n): CodeSigningAccountsOperations {\n return {\n ...getCodeSigningAccounts(context, subscriptionId),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/codeSigningAccounts/index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AAE,IAAI,EAAE,OAAO,CAAC;KACnE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAA2B,EAC3B,cAAsB;IAEtB,OAAO;QACL,GAAG,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC;KACnD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningContext } from \"../../api/codeSigningContext.js\";\nimport {\n CodeSigningAccount,\n CodeSigningAccountPatch,\n CheckNameAvailability,\n CheckNameAvailabilityResult,\n} from \"../../models/models.js\";\nimport {\n get,\n create,\n update,\n $delete,\n listByResourceGroup,\n listBySubscription,\n checkNameAvailability,\n} from \"../../api/codeSigningAccounts/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { PollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n CodeSigningAccountsGetOptionalParams,\n CodeSigningAccountsCreateOptionalParams,\n CodeSigningAccountsUpdateOptionalParams,\n CodeSigningAccountsDeleteOptionalParams,\n CodeSigningAccountsListByResourceGroupOptionalParams,\n CodeSigningAccountsListBySubscriptionOptionalParams,\n CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n} from \"../../models/options.js\";\n\n/** Interface representing a CodeSigningAccounts operations. */\nexport interface CodeSigningAccountsOperations {\n /** Get a trusted Signing Account. */\n get: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsGetOptionalParams,\n ) => Promise<CodeSigningAccount>;\n /** Create a trusted Signing Account. */\n create: (\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options?: CodeSigningAccountsCreateOptionalParams,\n ) => PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n /** Update a trusted signing account. */\n update: (\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options?: CodeSigningAccountsUpdateOptionalParams,\n ) => PollerLike<OperationState<CodeSigningAccount>, CodeSigningAccount>;\n /** Delete a trusted signing account. */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsDeleteOptionalParams,\n ) => PollerLike<OperationState<void>, void>;\n /** Lists trusted signing accounts within a resource group. */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: CodeSigningAccountsListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<CodeSigningAccount>;\n /** Lists trusted signing accounts within a subscription. */\n listBySubscription: (\n options?: CodeSigningAccountsListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<CodeSigningAccount>;\n /** Checks that the trusted signing account name is valid and is not already in use. */\n checkNameAvailability: (\n body: CheckNameAvailability,\n options?: CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n ) => Promise<CheckNameAvailabilityResult>;\n}\n\nexport function getCodeSigningAccounts(context: CodeSigningContext, subscriptionId: string) {\n return {\n get: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsGetOptionalParams,\n ) => get(context, subscriptionId, resourceGroupName, accountName, options),\n create: (\n resourceGroupName: string,\n accountName: string,\n resource: CodeSigningAccount,\n options?: CodeSigningAccountsCreateOptionalParams,\n ) => create(context, subscriptionId, resourceGroupName, accountName, resource, options),\n update: (\n resourceGroupName: string,\n accountName: string,\n properties: CodeSigningAccountPatch,\n options?: CodeSigningAccountsUpdateOptionalParams,\n ) => update(context, subscriptionId, resourceGroupName, accountName, properties, options),\n delete: (\n resourceGroupName: string,\n accountName: string,\n options?: CodeSigningAccountsDeleteOptionalParams,\n ) => $delete(context, subscriptionId, resourceGroupName, accountName, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: CodeSigningAccountsListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, subscriptionId, resourceGroupName, options),\n listBySubscription: (options?: CodeSigningAccountsListBySubscriptionOptionalParams) =>\n listBySubscription(context, subscriptionId, options),\n checkNameAvailability: (\n body: CheckNameAvailability,\n options?: CodeSigningAccountsCheckNameAvailabilityOptionalParams,\n ) => checkNameAvailability(context, subscriptionId, body, options),\n };\n}\n\nexport function getCodeSigningAccountsOperations(\n context: CodeSigningContext,\n subscriptionId: string,\n): CodeSigningAccountsOperations {\n return {\n ...getCodeSigningAccounts(context, subscriptionId),\n };\n}\n"]}
@@ -7,6 +7,8 @@ export function getOperations(context) {
7
7
  };
8
8
  }
9
9
  export function getOperationsOperations(context) {
10
- return Object.assign({}, getOperations(context));
10
+ return {
11
+ ...getOperations(context),
12
+ };
11
13
  }
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,aAAa,CAAC,OAA2B;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAA2B;IACjE,yBACK,aAAa,CAAC,OAAO,CAAC,EACzB;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningContext } from \"../../api/codeSigningContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { list } from \"../../api/operations/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { OperationsListOptionalParams } from \"../../models/options.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nexport function getOperations(context: CodeSigningContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function getOperationsOperations(context: CodeSigningContext): OperationsOperations {\n return {\n ...getOperations(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,aAAa,CAAC,OAA2B;IACvD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAA2B;IACjE,OAAO;QACL,GAAG,aAAa,CAAC,OAAO,CAAC;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningContext } from \"../../api/codeSigningContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { list } from \"../../api/operations/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { OperationsListOptionalParams } from \"../../models/options.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nexport function getOperations(context: CodeSigningContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function getOperationsOperations(context: CodeSigningContext): OperationsOperations {\n return {\n ...getOperations(context),\n };\n}\n"]}
@@ -5,18 +5,29 @@ import { getCodeSigningAccountsOperations, } from "./classic/codeSigningAccounts
5
5
  import { getCertificateProfilesOperations, } from "./classic/certificateProfiles/index.js";
6
6
  import { createCodeSigning, } from "./api/index.js";
7
7
  export class CodeSigningClient {
8
+ _client;
9
+ /** The pipeline used by this client to make requests */
10
+ pipeline;
8
11
  /** Code Signing resource provider api. */
9
12
  constructor(credential, subscriptionId, options = {}) {
10
- var _a;
11
- const prefixFromOptions = (_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix;
13
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
12
14
  const userAgentPrefix = prefixFromOptions
13
15
  ? `${prefixFromOptions} azsdk-js-client`
14
16
  : "azsdk-js-client";
15
- this._client = createCodeSigning(credential, Object.assign(Object.assign({}, options), { userAgentOptions: { userAgentPrefix } }));
17
+ this._client = createCodeSigning(credential, {
18
+ ...options,
19
+ userAgentOptions: { userAgentPrefix },
20
+ });
16
21
  this.pipeline = this._client.pipeline;
17
22
  this.operations = getOperationsOperations(this._client);
18
23
  this.codeSigningAccounts = getCodeSigningAccountsOperations(this._client, subscriptionId);
19
24
  this.certificateProfiles = getCertificateProfilesOperations(this._client, subscriptionId);
20
25
  }
26
+ /** The operation groups for Operations */
27
+ operations;
28
+ /** The operation groups for CodeSigningAccounts */
29
+ codeSigningAccounts;
30
+ /** The operation groups for CertificateProfiles */
31
+ certificateProfiles;
21
32
  }
22
33
  //# sourceMappingURL=codeSigningClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codeSigningClient.js","sourceRoot":"","sources":["../../src/codeSigningClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,uBAAuB,EAAwB,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EACL,gCAAgC,GAEjC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gCAAgC,GAEjC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iBAAiB,GAGlB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,OAAO,iBAAiB;IAK5B,0CAA0C;IAC1C,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAA2C,EAAE;;QAE7C,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,0CAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,UAAU,kCACtC,OAAO,KACV,gBAAgB,EAAE,EAAE,eAAe,EAAE,IACrC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,mBAAmB,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC1F,IAAI,CAAC,mBAAmB,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC5F,CAAC;CAQF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { getOperationsOperations, OperationsOperations } from \"./classic/operations/index.js\";\nimport {\n getCodeSigningAccountsOperations,\n CodeSigningAccountsOperations,\n} from \"./classic/codeSigningAccounts/index.js\";\nimport {\n getCertificateProfilesOperations,\n CertificateProfilesOperations,\n} from \"./classic/certificateProfiles/index.js\";\nimport {\n createCodeSigning,\n CodeSigningContext,\n CodeSigningClientOptionalParams,\n} from \"./api/index.js\";\n\nexport { CodeSigningClientOptionalParams } from \"./api/codeSigningContext.js\";\n\nexport class CodeSigningClient {\n private _client: CodeSigningContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Code Signing resource provider api. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: CodeSigningClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : \"azsdk-js-client\";\n this._client = createCodeSigning(credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.operations = getOperationsOperations(this._client);\n this.codeSigningAccounts = getCodeSigningAccountsOperations(this._client, subscriptionId);\n this.certificateProfiles = getCertificateProfilesOperations(this._client, subscriptionId);\n }\n\n /** The operation groups for Operations */\n public readonly operations: OperationsOperations;\n /** The operation groups for CodeSigningAccounts */\n public readonly codeSigningAccounts: CodeSigningAccountsOperations;\n /** The operation groups for CertificateProfiles */\n public readonly certificateProfiles: CertificateProfilesOperations;\n}\n"]}
1
+ {"version":3,"file":"codeSigningClient.js","sourceRoot":"","sources":["../../src/codeSigningClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,uBAAuB,EAAwB,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EACL,gCAAgC,GAEjC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gCAAgC,GAEjC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iBAAiB,GAGlB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,OAAO,iBAAiB;IACpB,OAAO,CAAqB;IACpC,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,0CAA0C;IAC1C,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAA2C,EAAE;QAE7C,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,UAAU,EAAE;YAC3C,GAAG,OAAO;YACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;SACtC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,mBAAmB,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC1F,IAAI,CAAC,mBAAmB,GAAG,gCAAgC,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC5F,CAAC;IAED,0CAA0C;IAC1B,UAAU,CAAuB;IACjD,mDAAmD;IACnC,mBAAmB,CAAgC;IACnE,mDAAmD;IACnC,mBAAmB,CAAgC;CACpE","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { getOperationsOperations, OperationsOperations } from \"./classic/operations/index.js\";\nimport {\n getCodeSigningAccountsOperations,\n CodeSigningAccountsOperations,\n} from \"./classic/codeSigningAccounts/index.js\";\nimport {\n getCertificateProfilesOperations,\n CertificateProfilesOperations,\n} from \"./classic/certificateProfiles/index.js\";\nimport {\n createCodeSigning,\n CodeSigningContext,\n CodeSigningClientOptionalParams,\n} from \"./api/index.js\";\n\nexport { CodeSigningClientOptionalParams } from \"./api/codeSigningContext.js\";\n\nexport class CodeSigningClient {\n private _client: CodeSigningContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Code Signing resource provider api. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: CodeSigningClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : \"azsdk-js-client\";\n this._client = createCodeSigning(credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.operations = getOperationsOperations(this._client);\n this.codeSigningAccounts = getCodeSigningAccountsOperations(this._client, subscriptionId);\n this.certificateProfiles = getCertificateProfilesOperations(this._client, subscriptionId);\n }\n\n /** The operation groups for Operations */\n public readonly operations: OperationsOperations;\n /** The operation groups for CodeSigningAccounts */\n public readonly codeSigningAccounts: CodeSigningAccountsOperations;\n /** The operation groups for CertificateProfiles */\n public readonly certificateProfiles: CertificateProfilesOperations;\n}\n"]}
@@ -10,21 +10,20 @@ import { deserializeState, } from "@azure/core-lro";
10
10
  * needs to be constructed after the original one is not in scope.
11
11
  */
12
12
  export function restorePoller(client, serializedState, sourceOperation, options) {
13
- var _a, _b, _c;
14
13
  const pollerConfig = deserializeState(serializedState).config;
15
14
  const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
16
15
  if (!initialRequestUrl || !requestMethod) {
17
- throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
16
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`);
18
17
  }
19
- const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
20
- const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
21
- const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
18
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
19
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
20
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
22
21
  if (!deserializeHelper) {
23
- throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
22
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`);
24
23
  }
25
- return getLongRunningPoller((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
26
- updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
27
- abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
24
+ return getLongRunningPoller(client["_client"] ?? client, deserializeHelper, expectedStatuses, {
25
+ updateIntervalInMs: options?.updateIntervalInMs,
26
+ abortSignal: options?.abortSignal,
28
27
  resourceLocationConfig,
29
28
  restoreFrom: serializedState,
30
29
  initialRequestUrl,
@@ -47,7 +46,6 @@ const deserializeMap = {
47
46
  },
48
47
  };
49
48
  function getDeserializationHelper(urlStr, method) {
50
- var _a, _b, _c, _d;
51
49
  const path = new URL(urlStr).pathname;
52
50
  const pathParts = path.split("/");
53
51
  // Traverse list to match the longest candidate
@@ -67,13 +65,13 @@ function getDeserializationHelper(urlStr, method) {
67
65
  // track if we have found a match to return the values found.
68
66
  let found = true;
69
67
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
70
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
71
- const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
68
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
69
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
72
70
  // If the current part of the candidate is a "template" part
73
71
  // Try to use the suffix of pattern to match the path
74
72
  // {guid} ==> $
75
73
  // {guid}:export ==> :export$
76
- const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
74
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
77
75
  if (!isMatched) {
78
76
  found = false;
79
77
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.js","sourceR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AAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningClient } from \"./codeSigningClient.js\";\nimport {\n _createDeserialize,\n _updateDeserialize,\n _$deleteDeserialize,\n} from \"./api/codeSigningAccounts/index.js\";\nimport {\n _createDeserialize as _createDeserializeCertificateProfiles,\n _$deleteDeserialize as _$deleteDeserializeCertificateProfiles,\n} from \"./api/certificateProfiles/index.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CodeSigningClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _createDeserialize, expectedStatuses: [\"200\", \"201\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _createDeserializeCertificateProfiles,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _$deleteDeserializeCertificateProfiles,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,kBAAkB,IAAI,qCAAqC,EAC3D,mBAAmB,IAAI,sCAAsC,GAC9D,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAyB,EACzB,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,EAAE,IAAI,EAAE,CA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;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CodeSigningClient } from \"./codeSigningClient.js\";\nimport {\n _createDeserialize,\n _updateDeserialize,\n _$deleteDeserialize,\n} from \"./api/codeSigningAccounts/index.js\";\nimport {\n _createDeserialize as _createDeserializeCertificateProfiles,\n _$deleteDeserialize as _$deleteDeserializeCertificateProfiles,\n} from \"./api/certificateProfiles/index.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CodeSigningClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _createDeserialize, expectedStatuses: [\"200\", \"201\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _createDeserializeCertificateProfiles,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _$deleteDeserializeCertificateProfiles,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}