@azure/arm-storagesync 9.1.1-alpha.20250619.1 → 9.1.1-alpha.20250718.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/browser/lroImpl.js +11 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/microsoftStorageSync.js +23 -5
  4. package/dist/browser/microsoftStorageSync.js.map +1 -1
  5. package/dist/browser/models/mappers.js +248 -117
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/cloudEndpoints.js +87 -69
  8. package/dist/browser/operations/cloudEndpoints.js.map +1 -1
  9. package/dist/browser/operations/operationStatusOperations.js +1 -0
  10. package/dist/browser/operations/operationStatusOperations.js.map +1 -1
  11. package/dist/browser/operations/operations.js +23 -40
  12. package/dist/browser/operations/operations.js.map +1 -1
  13. package/dist/browser/operations/privateEndpointConnections.js +32 -39
  14. package/dist/browser/operations/privateEndpointConnections.js.map +1 -1
  15. package/dist/browser/operations/privateLinkResources.js +1 -0
  16. package/dist/browser/operations/privateLinkResources.js.map +1 -1
  17. package/dist/browser/operations/registeredServers.js +43 -45
  18. package/dist/browser/operations/registeredServers.js.map +1 -1
  19. package/dist/browser/operations/serverEndpoints.js +54 -51
  20. package/dist/browser/operations/serverEndpoints.js.map +1 -1
  21. package/dist/browser/operations/storageSyncServices.js +52 -71
  22. package/dist/browser/operations/storageSyncServices.js.map +1 -1
  23. package/dist/browser/operations/syncGroups.js +10 -27
  24. package/dist/browser/operations/syncGroups.js.map +1 -1
  25. package/dist/browser/operations/workflows.js +10 -27
  26. package/dist/browser/operations/workflows.js.map +1 -1
  27. package/dist/browser/pagingHelper.js +2 -4
  28. package/dist/browser/pagingHelper.js.map +1 -1
  29. package/dist/commonjs/lroImpl.js +11 -3
  30. package/dist/commonjs/lroImpl.js.map +1 -1
  31. package/dist/commonjs/microsoftStorageSync.js +23 -5
  32. package/dist/commonjs/microsoftStorageSync.js.map +1 -1
  33. package/dist/commonjs/models/mappers.js +248 -117
  34. package/dist/commonjs/models/mappers.js.map +1 -1
  35. package/dist/commonjs/operations/cloudEndpoints.js +87 -68
  36. package/dist/commonjs/operations/cloudEndpoints.js.map +1 -1
  37. package/dist/commonjs/operations/operationStatusOperations.js +1 -0
  38. package/dist/commonjs/operations/operationStatusOperations.js.map +1 -1
  39. package/dist/commonjs/operations/operations.js +23 -39
  40. package/dist/commonjs/operations/operations.js.map +1 -1
  41. package/dist/commonjs/operations/privateEndpointConnections.js +32 -38
  42. package/dist/commonjs/operations/privateEndpointConnections.js.map +1 -1
  43. package/dist/commonjs/operations/privateLinkResources.js +1 -0
  44. package/dist/commonjs/operations/privateLinkResources.js.map +1 -1
  45. package/dist/commonjs/operations/registeredServers.js +43 -44
  46. package/dist/commonjs/operations/registeredServers.js.map +1 -1
  47. package/dist/commonjs/operations/serverEndpoints.js +54 -50
  48. package/dist/commonjs/operations/serverEndpoints.js.map +1 -1
  49. package/dist/commonjs/operations/storageSyncServices.js +52 -70
  50. package/dist/commonjs/operations/storageSyncServices.js.map +1 -1
  51. package/dist/commonjs/operations/syncGroups.js +10 -26
  52. package/dist/commonjs/operations/syncGroups.js.map +1 -1
  53. package/dist/commonjs/operations/workflows.js +10 -26
  54. package/dist/commonjs/operations/workflows.js.map +1 -1
  55. package/dist/commonjs/pagingHelper.js +2 -4
  56. package/dist/commonjs/pagingHelper.js.map +1 -1
  57. package/dist/commonjs/tsdoc-metadata.json +11 -11
  58. package/dist/esm/lroImpl.js +11 -3
  59. package/dist/esm/lroImpl.js.map +1 -1
  60. package/dist/esm/microsoftStorageSync.js +23 -5
  61. package/dist/esm/microsoftStorageSync.js.map +1 -1
  62. package/dist/esm/models/mappers.js +248 -117
  63. package/dist/esm/models/mappers.js.map +1 -1
  64. package/dist/esm/operations/cloudEndpoints.js +87 -69
  65. package/dist/esm/operations/cloudEndpoints.js.map +1 -1
  66. package/dist/esm/operations/operationStatusOperations.js +1 -0
  67. package/dist/esm/operations/operationStatusOperations.js.map +1 -1
  68. package/dist/esm/operations/operations.js +23 -40
  69. package/dist/esm/operations/operations.js.map +1 -1
  70. package/dist/esm/operations/privateEndpointConnections.js +32 -39
  71. package/dist/esm/operations/privateEndpointConnections.js.map +1 -1
  72. package/dist/esm/operations/privateLinkResources.js +1 -0
  73. package/dist/esm/operations/privateLinkResources.js.map +1 -1
  74. package/dist/esm/operations/registeredServers.js +43 -45
  75. package/dist/esm/operations/registeredServers.js.map +1 -1
  76. package/dist/esm/operations/serverEndpoints.js +54 -51
  77. package/dist/esm/operations/serverEndpoints.js.map +1 -1
  78. package/dist/esm/operations/storageSyncServices.js +52 -71
  79. package/dist/esm/operations/storageSyncServices.js.map +1 -1
  80. package/dist/esm/operations/syncGroups.js +10 -27
  81. package/dist/esm/operations/syncGroups.js.map +1 -1
  82. package/dist/esm/operations/workflows.js +10 -27
  83. package/dist/esm/operations/workflows.js.map +1 -1
  84. package/dist/esm/pagingHelper.js +2 -4
  85. package/dist/esm/pagingHelper.js.map +1 -1
  86. package/dist/react-native/lroImpl.js +11 -3
  87. package/dist/react-native/lroImpl.js.map +1 -1
  88. package/dist/react-native/microsoftStorageSync.js +23 -5
  89. package/dist/react-native/microsoftStorageSync.js.map +1 -1
  90. package/dist/react-native/models/mappers.js +248 -117
  91. package/dist/react-native/models/mappers.js.map +1 -1
  92. package/dist/react-native/operations/cloudEndpoints.js +87 -69
  93. package/dist/react-native/operations/cloudEndpoints.js.map +1 -1
  94. package/dist/react-native/operations/operationStatusOperations.js +1 -0
  95. package/dist/react-native/operations/operationStatusOperations.js.map +1 -1
  96. package/dist/react-native/operations/operations.js +23 -40
  97. package/dist/react-native/operations/operations.js.map +1 -1
  98. package/dist/react-native/operations/privateEndpointConnections.js +32 -39
  99. package/dist/react-native/operations/privateEndpointConnections.js.map +1 -1
  100. package/dist/react-native/operations/privateLinkResources.js +1 -0
  101. package/dist/react-native/operations/privateLinkResources.js.map +1 -1
  102. package/dist/react-native/operations/registeredServers.js +43 -45
  103. package/dist/react-native/operations/registeredServers.js.map +1 -1
  104. package/dist/react-native/operations/serverEndpoints.js +54 -51
  105. package/dist/react-native/operations/serverEndpoints.js.map +1 -1
  106. package/dist/react-native/operations/storageSyncServices.js +52 -71
  107. package/dist/react-native/operations/storageSyncServices.js.map +1 -1
  108. package/dist/react-native/operations/syncGroups.js +10 -27
  109. package/dist/react-native/operations/syncGroups.js.map +1 -1
  110. package/dist/react-native/operations/workflows.js +10 -27
  111. package/dist/react-native/operations/workflows.js.map +1 -1
  112. package/dist/react-native/pagingHelper.js +2 -4
  113. package/dist/react-native/pagingHelper.js.map +1 -1
  114. package/package.json +2 -2
  115. /package/review/{arm-storagesync.api.md → arm-storagesync-node.api.md} +0 -0
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
14
14
  * @returns The continuation token that can be passed into byPage() during future calls.
15
15
  */
16
16
  export function getContinuationToken(page) {
17
- var _a;
18
17
  if (typeof page !== "object" || page === null) {
19
18
  return undefined;
20
19
  }
21
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
20
+ return pageMap.get(page)?.continuationToken;
22
21
  }
23
22
  export function setContinuationToken(page, continuationToken) {
24
- var _a;
25
23
  if (typeof page !== "object" || page === null || !continuationToken) {
26
24
  return;
27
25
  }
28
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
26
+ const pageInfo = pageMap.get(page) ?? {};
29
27
  pageInfo.continuationToken = continuationToken;
30
28
  pageMap.set(page, pageInfo);
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
@@ -5,8 +5,12 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __rest } from "tslib";
9
8
  export class LroImpl {
9
+ sendOperationFn;
10
+ args;
11
+ spec;
12
+ requestPath;
13
+ requestMethod;
10
14
  constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
11
15
  this.sendOperationFn = sendOperationFn;
12
16
  this.args = args;
@@ -18,8 +22,12 @@ export class LroImpl {
18
22
  return this.sendOperationFn(this.args, this.spec);
19
23
  }
20
24
  async sendPollRequest(path) {
21
- const _a = this.spec, { requestBody } = _a, restSpec = __rest(_a, ["requestBody"]);
22
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
25
+ const { requestBody, ...restSpec } = this.spec;
26
+ return this.sendOperationFn(this.args, {
27
+ ...restSpec,
28
+ path,
29
+ httpMethod: "GET"
30
+ });
23
31
  }
24
32
  }
25
33
  //# sourceMappingURL=lroImpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,MAAM,OAAO,OAAO;IAClB,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,KAA+B,IAAI,CAAC,IAAI,EAAxC,EAAE,WAAW,OAA2B,EAAtB,QAAQ,cAA1B,eAA4B,CAAY,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,kCAChC,QAAQ,KACX,IAAI,EACJ,UAAU,EAAE,KAAK,IACjB,CAAC;IACL,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
1
+ {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,OAAO;IAER;IACA;IACA;IAKD;IACA;IATT,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;YACrC,GAAG,QAAQ;YACX,IAAI;YACJ,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
@@ -11,6 +11,9 @@ import { OperationsImpl, StorageSyncServicesImpl, PrivateLinkResourcesImpl, Priv
11
11
  import * as Parameters from "./models/parameters.js";
12
12
  import * as Mappers from "./models/mappers.js";
13
13
  export class MicrosoftStorageSync extends coreClient.ServiceClient {
14
+ $host;
15
+ apiVersion;
16
+ subscriptionId;
14
17
  /**
15
18
  * Initializes a new instance of the MicrosoftStorageSync class.
16
19
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -18,7 +21,6 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient {
18
21
  * @param options The parameter options
19
22
  */
20
23
  constructor(credentials, subscriptionId, options) {
21
- var _a, _b, _c;
22
24
  if (credentials === undefined) {
23
25
  throw new Error("'credentials' cannot be null");
24
26
  }
@@ -37,12 +39,17 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient {
37
39
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
38
40
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
39
41
  : `${packageDetails}`;
40
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
42
+ const optionsWithDefaults = {
43
+ ...defaults,
44
+ ...options,
45
+ userAgentOptions: {
41
46
  userAgentPrefix
42
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
47
+ },
48
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
49
+ };
43
50
  super(optionsWithDefaults);
44
51
  let bearerTokenAuthenticationPolicyFound = false;
45
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
52
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
46
53
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
47
54
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
48
55
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -56,7 +63,8 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient {
56
63
  });
57
64
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
58
65
  credential: credentials,
59
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
66
+ scopes: optionsWithDefaults.credentialScopes ??
67
+ `${optionsWithDefaults.endpoint}/.default`,
60
68
  challengeCallbacks: {
61
69
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
62
70
  }
@@ -113,6 +121,16 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient {
113
121
  locationOperationStatus(locationName, operationId, options) {
114
122
  return this.sendOperationRequest({ locationName, operationId, options }, locationOperationStatusOperationSpec);
115
123
  }
124
+ operations;
125
+ storageSyncServices;
126
+ privateLinkResources;
127
+ privateEndpointConnections;
128
+ syncGroups;
129
+ cloudEndpoints;
130
+ serverEndpoints;
131
+ registeredServers;
132
+ workflows;
133
+ operationStatusOperations;
116
134
  }
117
135
  // Operation Specifications
118
136
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftStorageSync.js","sourceRoot":"","sources":["../../src/microsoftStorageSync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAa/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAO/C,MAAM,OAAO,oBAAqB,SAAQ,UAAU,CAAC,aAAa;IAKhE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA4C;;QAE5C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,C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,OAAO,IAAI,CAAC,oBAAoB,CAC9B,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,EACtC,oCAAoC,CACrC,CAAC;IACJ,CAAC;CAYF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EACF,mHAAmH;IACrH,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;YAC3C,aAAa,EAAE,OAAO,CAAC,kDAAkD;SAC1E;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,WAAW;KACvB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n StorageSyncServicesImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n SyncGroupsImpl,\n CloudEndpointsImpl,\n ServerEndpointsImpl,\n RegisteredServersImpl,\n WorkflowsImpl,\n OperationStatusOperationsImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n StorageSyncServices,\n PrivateLinkResources,\n PrivateEndpointConnections,\n SyncGroups,\n CloudEndpoints,\n ServerEndpoints,\n RegisteredServers,\n Workflows,\n OperationStatusOperations\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftStorageSyncOptionalParams,\n LocationOperationStatusOptionalParams,\n LocationOperationStatusResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftStorageSync extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftStorageSync class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftStorageSyncOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftStorageSyncOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-storagesync/9.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2020-09-01\";\n this.operations = new OperationsImpl(this);\n this.storageSyncServices = new StorageSyncServicesImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.syncGroups = new SyncGroupsImpl(this);\n this.cloudEndpoints = new CloudEndpointsImpl(this);\n this.serverEndpoints = new ServerEndpointsImpl(this);\n this.registeredServers = new RegisteredServersImpl(this);\n this.workflows = new WorkflowsImpl(this);\n this.operationStatusOperations = new OperationStatusOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Get Operation status\n * @param locationName The desired region to obtain information from.\n * @param operationId operation Id\n * @param options The options parameters.\n */\n locationOperationStatus(\n locationName: string,\n operationId: string,\n options?: LocationOperationStatusOptionalParams\n ): Promise<LocationOperationStatusResponse> {\n return this.sendOperationRequest(\n { locationName, operationId, options },\n locationOperationStatusOperationSpec\n );\n }\n\n operations: Operations;\n storageSyncServices: StorageSyncServices;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n syncGroups: SyncGroups;\n cloudEndpoints: CloudEndpoints;\n serverEndpoints: ServerEndpoints;\n registeredServers: RegisteredServers;\n workflows: Workflows;\n operationStatusOperations: OperationStatusOperations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst locationOperationStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LocationOperationStatus,\n headersMapper: Mappers.MicrosoftStorageSyncLocationOperationStatusHeaders\n },\n default: {\n bodyMapper: Mappers.StorageSyncError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.locationName,\n Parameters.subscriptionId,\n Parameters.operationId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftStorageSync.js","sourceRoot":"","sources":["../../src/microsoftStorageSync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB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;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n StorageSyncServicesImpl,\n PrivateLinkResourcesImpl,\n PrivateEndpointConnectionsImpl,\n SyncGroupsImpl,\n CloudEndpointsImpl,\n ServerEndpointsImpl,\n RegisteredServersImpl,\n WorkflowsImpl,\n OperationStatusOperationsImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n StorageSyncServices,\n PrivateLinkResources,\n PrivateEndpointConnections,\n SyncGroups,\n CloudEndpoints,\n ServerEndpoints,\n RegisteredServers,\n Workflows,\n OperationStatusOperations\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftStorageSyncOptionalParams,\n LocationOperationStatusOptionalParams,\n LocationOperationStatusResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftStorageSync extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftStorageSync class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftStorageSyncOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftStorageSyncOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-storagesync/9.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2020-09-01\";\n this.operations = new OperationsImpl(this);\n this.storageSyncServices = new StorageSyncServicesImpl(this);\n this.privateLinkResources = new PrivateLinkResourcesImpl(this);\n this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);\n this.syncGroups = new SyncGroupsImpl(this);\n this.cloudEndpoints = new CloudEndpointsImpl(this);\n this.serverEndpoints = new ServerEndpointsImpl(this);\n this.registeredServers = new RegisteredServersImpl(this);\n this.workflows = new WorkflowsImpl(this);\n this.operationStatusOperations = new OperationStatusOperationsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Get Operation status\n * @param locationName The desired region to obtain information from.\n * @param operationId operation Id\n * @param options The options parameters.\n */\n locationOperationStatus(\n locationName: string,\n operationId: string,\n options?: LocationOperationStatusOptionalParams\n ): Promise<LocationOperationStatusResponse> {\n return this.sendOperationRequest(\n { locationName, operationId, options },\n locationOperationStatusOperationSpec\n );\n }\n\n operations: Operations;\n storageSyncServices: StorageSyncServices;\n privateLinkResources: PrivateLinkResources;\n privateEndpointConnections: PrivateEndpointConnections;\n syncGroups: SyncGroups;\n cloudEndpoints: CloudEndpoints;\n serverEndpoints: ServerEndpoints;\n registeredServers: RegisteredServers;\n workflows: Workflows;\n operationStatusOperations: OperationStatusOperations;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst locationOperationStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LocationOperationStatus,\n headersMapper: Mappers.MicrosoftStorageSyncLocationOperationStatusHeaders\n },\n default: {\n bodyMapper: Mappers.StorageSyncError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.locationName,\n Parameters.subscriptionId,\n Parameters.operationId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}