@azure/arm-customerinsights 4.1.1-alpha.20250619.1 → 4.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 (171) hide show
  1. package/dist/browser/customerInsightsManagementClient.js +30 -5
  2. package/dist/browser/customerInsightsManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +11 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +479 -230
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/authorizationPolicies.js +23 -40
  8. package/dist/browser/operations/authorizationPolicies.js.map +1 -1
  9. package/dist/browser/operations/connectorMappings.js +23 -40
  10. package/dist/browser/operations/connectorMappings.js.map +1 -1
  11. package/dist/browser/operations/connectors.js +45 -52
  12. package/dist/browser/operations/connectors.js.map +1 -1
  13. package/dist/browser/operations/hubs.js +56 -85
  14. package/dist/browser/operations/hubs.js.map +1 -1
  15. package/dist/browser/operations/images.js +1 -0
  16. package/dist/browser/operations/images.js.map +1 -1
  17. package/dist/browser/operations/interactions.js +34 -46
  18. package/dist/browser/operations/interactions.js.map +1 -1
  19. package/dist/browser/operations/kpi.js +45 -52
  20. package/dist/browser/operations/kpi.js.map +1 -1
  21. package/dist/browser/operations/links.js +34 -46
  22. package/dist/browser/operations/links.js.map +1 -1
  23. package/dist/browser/operations/operations.js +23 -40
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/predictions.js +45 -52
  26. package/dist/browser/operations/predictions.js.map +1 -1
  27. package/dist/browser/operations/profiles.js +45 -52
  28. package/dist/browser/operations/profiles.js.map +1 -1
  29. package/dist/browser/operations/relationshipLinks.js +45 -52
  30. package/dist/browser/operations/relationshipLinks.js.map +1 -1
  31. package/dist/browser/operations/relationships.js +45 -52
  32. package/dist/browser/operations/relationships.js.map +1 -1
  33. package/dist/browser/operations/roleAssignments.js +34 -46
  34. package/dist/browser/operations/roleAssignments.js.map +1 -1
  35. package/dist/browser/operations/roles.js +23 -40
  36. package/dist/browser/operations/roles.js.map +1 -1
  37. package/dist/browser/operations/views.js +23 -40
  38. package/dist/browser/operations/views.js.map +1 -1
  39. package/dist/browser/operations/widgetTypes.js +23 -40
  40. package/dist/browser/operations/widgetTypes.js.map +1 -1
  41. package/dist/browser/pagingHelper.js +2 -4
  42. package/dist/browser/pagingHelper.js.map +1 -1
  43. package/dist/commonjs/customerInsightsManagementClient.js +30 -5
  44. package/dist/commonjs/customerInsightsManagementClient.js.map +1 -1
  45. package/dist/commonjs/lroImpl.js +11 -3
  46. package/dist/commonjs/lroImpl.js.map +1 -1
  47. package/dist/commonjs/models/mappers.js +479 -230
  48. package/dist/commonjs/models/mappers.js.map +1 -1
  49. package/dist/commonjs/operations/authorizationPolicies.js +23 -39
  50. package/dist/commonjs/operations/authorizationPolicies.js.map +1 -1
  51. package/dist/commonjs/operations/connectorMappings.js +23 -39
  52. package/dist/commonjs/operations/connectorMappings.js.map +1 -1
  53. package/dist/commonjs/operations/connectors.js +45 -51
  54. package/dist/commonjs/operations/connectors.js.map +1 -1
  55. package/dist/commonjs/operations/hubs.js +56 -84
  56. package/dist/commonjs/operations/hubs.js.map +1 -1
  57. package/dist/commonjs/operations/images.js +1 -0
  58. package/dist/commonjs/operations/images.js.map +1 -1
  59. package/dist/commonjs/operations/interactions.js +34 -45
  60. package/dist/commonjs/operations/interactions.js.map +1 -1
  61. package/dist/commonjs/operations/kpi.js +45 -51
  62. package/dist/commonjs/operations/kpi.js.map +1 -1
  63. package/dist/commonjs/operations/links.js +34 -45
  64. package/dist/commonjs/operations/links.js.map +1 -1
  65. package/dist/commonjs/operations/operations.js +23 -39
  66. package/dist/commonjs/operations/operations.js.map +1 -1
  67. package/dist/commonjs/operations/predictions.js +45 -51
  68. package/dist/commonjs/operations/predictions.js.map +1 -1
  69. package/dist/commonjs/operations/profiles.js +45 -51
  70. package/dist/commonjs/operations/profiles.js.map +1 -1
  71. package/dist/commonjs/operations/relationshipLinks.js +45 -51
  72. package/dist/commonjs/operations/relationshipLinks.js.map +1 -1
  73. package/dist/commonjs/operations/relationships.js +45 -51
  74. package/dist/commonjs/operations/relationships.js.map +1 -1
  75. package/dist/commonjs/operations/roleAssignments.js +34 -45
  76. package/dist/commonjs/operations/roleAssignments.js.map +1 -1
  77. package/dist/commonjs/operations/roles.js +23 -39
  78. package/dist/commonjs/operations/roles.js.map +1 -1
  79. package/dist/commonjs/operations/views.js +23 -39
  80. package/dist/commonjs/operations/views.js.map +1 -1
  81. package/dist/commonjs/operations/widgetTypes.js +23 -39
  82. package/dist/commonjs/operations/widgetTypes.js.map +1 -1
  83. package/dist/commonjs/pagingHelper.js +2 -4
  84. package/dist/commonjs/pagingHelper.js.map +1 -1
  85. package/dist/commonjs/tsdoc-metadata.json +11 -11
  86. package/dist/esm/customerInsightsManagementClient.js +30 -5
  87. package/dist/esm/customerInsightsManagementClient.js.map +1 -1
  88. package/dist/esm/lroImpl.js +11 -3
  89. package/dist/esm/lroImpl.js.map +1 -1
  90. package/dist/esm/models/mappers.js +479 -230
  91. package/dist/esm/models/mappers.js.map +1 -1
  92. package/dist/esm/operations/authorizationPolicies.js +23 -40
  93. package/dist/esm/operations/authorizationPolicies.js.map +1 -1
  94. package/dist/esm/operations/connectorMappings.js +23 -40
  95. package/dist/esm/operations/connectorMappings.js.map +1 -1
  96. package/dist/esm/operations/connectors.js +45 -52
  97. package/dist/esm/operations/connectors.js.map +1 -1
  98. package/dist/esm/operations/hubs.js +56 -85
  99. package/dist/esm/operations/hubs.js.map +1 -1
  100. package/dist/esm/operations/images.js +1 -0
  101. package/dist/esm/operations/images.js.map +1 -1
  102. package/dist/esm/operations/interactions.js +34 -46
  103. package/dist/esm/operations/interactions.js.map +1 -1
  104. package/dist/esm/operations/kpi.js +45 -52
  105. package/dist/esm/operations/kpi.js.map +1 -1
  106. package/dist/esm/operations/links.js +34 -46
  107. package/dist/esm/operations/links.js.map +1 -1
  108. package/dist/esm/operations/operations.js +23 -40
  109. package/dist/esm/operations/operations.js.map +1 -1
  110. package/dist/esm/operations/predictions.js +45 -52
  111. package/dist/esm/operations/predictions.js.map +1 -1
  112. package/dist/esm/operations/profiles.js +45 -52
  113. package/dist/esm/operations/profiles.js.map +1 -1
  114. package/dist/esm/operations/relationshipLinks.js +45 -52
  115. package/dist/esm/operations/relationshipLinks.js.map +1 -1
  116. package/dist/esm/operations/relationships.js +45 -52
  117. package/dist/esm/operations/relationships.js.map +1 -1
  118. package/dist/esm/operations/roleAssignments.js +34 -46
  119. package/dist/esm/operations/roleAssignments.js.map +1 -1
  120. package/dist/esm/operations/roles.js +23 -40
  121. package/dist/esm/operations/roles.js.map +1 -1
  122. package/dist/esm/operations/views.js +23 -40
  123. package/dist/esm/operations/views.js.map +1 -1
  124. package/dist/esm/operations/widgetTypes.js +23 -40
  125. package/dist/esm/operations/widgetTypes.js.map +1 -1
  126. package/dist/esm/pagingHelper.js +2 -4
  127. package/dist/esm/pagingHelper.js.map +1 -1
  128. package/dist/react-native/customerInsightsManagementClient.js +30 -5
  129. package/dist/react-native/customerInsightsManagementClient.js.map +1 -1
  130. package/dist/react-native/lroImpl.js +11 -3
  131. package/dist/react-native/lroImpl.js.map +1 -1
  132. package/dist/react-native/models/mappers.js +479 -230
  133. package/dist/react-native/models/mappers.js.map +1 -1
  134. package/dist/react-native/operations/authorizationPolicies.js +23 -40
  135. package/dist/react-native/operations/authorizationPolicies.js.map +1 -1
  136. package/dist/react-native/operations/connectorMappings.js +23 -40
  137. package/dist/react-native/operations/connectorMappings.js.map +1 -1
  138. package/dist/react-native/operations/connectors.js +45 -52
  139. package/dist/react-native/operations/connectors.js.map +1 -1
  140. package/dist/react-native/operations/hubs.js +56 -85
  141. package/dist/react-native/operations/hubs.js.map +1 -1
  142. package/dist/react-native/operations/images.js +1 -0
  143. package/dist/react-native/operations/images.js.map +1 -1
  144. package/dist/react-native/operations/interactions.js +34 -46
  145. package/dist/react-native/operations/interactions.js.map +1 -1
  146. package/dist/react-native/operations/kpi.js +45 -52
  147. package/dist/react-native/operations/kpi.js.map +1 -1
  148. package/dist/react-native/operations/links.js +34 -46
  149. package/dist/react-native/operations/links.js.map +1 -1
  150. package/dist/react-native/operations/operations.js +23 -40
  151. package/dist/react-native/operations/operations.js.map +1 -1
  152. package/dist/react-native/operations/predictions.js +45 -52
  153. package/dist/react-native/operations/predictions.js.map +1 -1
  154. package/dist/react-native/operations/profiles.js +45 -52
  155. package/dist/react-native/operations/profiles.js.map +1 -1
  156. package/dist/react-native/operations/relationshipLinks.js +45 -52
  157. package/dist/react-native/operations/relationshipLinks.js.map +1 -1
  158. package/dist/react-native/operations/relationships.js +45 -52
  159. package/dist/react-native/operations/relationships.js.map +1 -1
  160. package/dist/react-native/operations/roleAssignments.js +34 -46
  161. package/dist/react-native/operations/roleAssignments.js.map +1 -1
  162. package/dist/react-native/operations/roles.js +23 -40
  163. package/dist/react-native/operations/roles.js.map +1 -1
  164. package/dist/react-native/operations/views.js +23 -40
  165. package/dist/react-native/operations/views.js.map +1 -1
  166. package/dist/react-native/operations/widgetTypes.js +23 -40
  167. package/dist/react-native/operations/widgetTypes.js.map +1 -1
  168. package/dist/react-native/pagingHelper.js +2 -4
  169. package/dist/react-native/pagingHelper.js.map +1 -1
  170. package/package.json +2 -2
  171. /package/review/{arm-customerinsights.api.md → arm-customerinsights-node.api.md} +0 -0
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { OperationsImpl, HubsImpl, ProfilesImpl, InteractionsImpl, RelationshipsImpl, RelationshipLinksImpl, AuthorizationPoliciesImpl, ConnectorsImpl, ConnectorMappingsImpl, KpiImpl, WidgetTypesImpl, ViewsImpl, LinksImpl, RolesImpl, RoleAssignmentsImpl, ImagesImpl, PredictionsImpl } from "./operations/index.js";
11
11
  export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
12
+ $host;
13
+ apiVersion;
14
+ subscriptionId;
12
15
  /**
13
16
  * Initializes a new instance of the CustomerInsightsManagementClient class.
14
17
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -17,7 +20,6 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
17
20
  * @param options The parameter options
18
21
  */
19
22
  constructor(credentials, subscriptionId, options) {
20
- var _a, _b, _c;
21
23
  if (credentials === undefined) {
22
24
  throw new Error("'credentials' cannot be null");
23
25
  }
@@ -36,12 +38,17 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
36
38
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
37
39
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
38
40
  : `${packageDetails}`;
39
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
41
+ const optionsWithDefaults = {
42
+ ...defaults,
43
+ ...options,
44
+ userAgentOptions: {
40
45
  userAgentPrefix
41
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
46
+ },
47
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
48
+ };
42
49
  super(optionsWithDefaults);
43
50
  let bearerTokenAuthenticationPolicyFound = false;
44
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
51
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
45
52
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
46
53
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
47
54
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -55,7 +62,8 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
55
62
  });
56
63
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
57
64
  credential: credentials,
58
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
65
+ scopes: optionsWithDefaults.credentialScopes ??
66
+ `${optionsWithDefaults.endpoint}/.default`,
59
67
  challengeCallbacks: {
60
68
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
61
69
  }
@@ -110,5 +118,22 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
110
118
  };
111
119
  this.pipeline.addPolicy(apiVersionPolicy);
112
120
  }
121
+ operations;
122
+ hubs;
123
+ profiles;
124
+ interactions;
125
+ relationships;
126
+ relationshipLinks;
127
+ authorizationPolicies;
128
+ connectors;
129
+ connectorMappings;
130
+ kpi;
131
+ widgetTypes;
132
+ views;
133
+ links;
134
+ roles;
135
+ roleAssignments;
136
+ images;
137
+ predictions;
113
138
  }
114
139
  //# sourceMappingURL=customerInsightsManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customerInsightsManagementClient.js","sourceRoot":"","sources":["../../src/customerInsightsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAsB/B,MAAM,OAAO,gCAAiC,SAAQ,UAAU,CAAC,aAAa;IAK5E;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAwD;;QAExD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAA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G,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAmBF","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 HubsImpl,\n ProfilesImpl,\n InteractionsImpl,\n RelationshipsImpl,\n RelationshipLinksImpl,\n AuthorizationPoliciesImpl,\n ConnectorsImpl,\n ConnectorMappingsImpl,\n KpiImpl,\n WidgetTypesImpl,\n ViewsImpl,\n LinksImpl,\n RolesImpl,\n RoleAssignmentsImpl,\n ImagesImpl,\n PredictionsImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n Hubs,\n Profiles,\n Interactions,\n Relationships,\n RelationshipLinks,\n AuthorizationPolicies,\n Connectors,\n ConnectorMappings,\n Kpi,\n WidgetTypes,\n Views,\n Links,\n Roles,\n RoleAssignments,\n Images,\n Predictions\n} from \"./operationsInterfaces/index.js\";\nimport { CustomerInsightsManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class CustomerInsightsManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CustomerInsightsManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure\n * subscription. The subscription ID forms part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CustomerInsightsManagementClientOptionalParams\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: CustomerInsightsManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-customerinsights/4.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 || \"2017-04-26\";\n this.operations = new OperationsImpl(this);\n this.hubs = new HubsImpl(this);\n this.profiles = new ProfilesImpl(this);\n this.interactions = new InteractionsImpl(this);\n this.relationships = new RelationshipsImpl(this);\n this.relationshipLinks = new RelationshipLinksImpl(this);\n this.authorizationPolicies = new AuthorizationPoliciesImpl(this);\n this.connectors = new ConnectorsImpl(this);\n this.connectorMappings = new ConnectorMappingsImpl(this);\n this.kpi = new KpiImpl(this);\n this.widgetTypes = new WidgetTypesImpl(this);\n this.views = new ViewsImpl(this);\n this.links = new LinksImpl(this);\n this.roles = new RolesImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.images = new ImagesImpl(this);\n this.predictions = new PredictionsImpl(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 operations: Operations;\n hubs: Hubs;\n profiles: Profiles;\n interactions: Interactions;\n relationships: Relationships;\n relationshipLinks: RelationshipLinks;\n authorizationPolicies: AuthorizationPolicies;\n connectors: Connectors;\n connectorMappings: ConnectorMappings;\n kpi: Kpi;\n widgetTypes: WidgetTypes;\n views: Views;\n links: Links;\n roles: Roles;\n roleAssignments: RoleAssignments;\n images: Images;\n predictions: Predictions;\n}\n"]}
1
+ {"version":3,"file":"customerInsightsManagementClient.js","sourceRoot":"","sources":["../../src/customerInsightsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAsB/B,MAAM,OAAO,gCAAiC,SAAQ,UAAU,CAAC,aAAa;IAC5E,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAwD;QAExD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmD;YAC/D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,qCAAqC,CAAC;QAC7D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC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ACX,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,aAAa,CAAgB;IAC7B,iBAAiB,CAAoB;IACrC,qBAAqB,CAAwB;IAC7C,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,GAAG,CAAM;IACT,WAAW,CAAc;IACzB,KAAK,CAAQ;IACb,KAAK,CAAQ;IACb,KAAK,CAAQ;IACb,eAAe,CAAkB;IACjC,MAAM,CAAS;IACf,WAAW,CAAc;CAC1B","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 HubsImpl,\n ProfilesImpl,\n InteractionsImpl,\n RelationshipsImpl,\n RelationshipLinksImpl,\n AuthorizationPoliciesImpl,\n ConnectorsImpl,\n ConnectorMappingsImpl,\n KpiImpl,\n WidgetTypesImpl,\n ViewsImpl,\n LinksImpl,\n RolesImpl,\n RoleAssignmentsImpl,\n ImagesImpl,\n PredictionsImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n Hubs,\n Profiles,\n Interactions,\n Relationships,\n RelationshipLinks,\n AuthorizationPolicies,\n Connectors,\n ConnectorMappings,\n Kpi,\n WidgetTypes,\n Views,\n Links,\n Roles,\n RoleAssignments,\n Images,\n Predictions\n} from \"./operationsInterfaces/index.js\";\nimport { CustomerInsightsManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class CustomerInsightsManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CustomerInsightsManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure\n * subscription. The subscription ID forms part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CustomerInsightsManagementClientOptionalParams\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: CustomerInsightsManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-customerinsights/4.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 || \"2017-04-26\";\n this.operations = new OperationsImpl(this);\n this.hubs = new HubsImpl(this);\n this.profiles = new ProfilesImpl(this);\n this.interactions = new InteractionsImpl(this);\n this.relationships = new RelationshipsImpl(this);\n this.relationshipLinks = new RelationshipLinksImpl(this);\n this.authorizationPolicies = new AuthorizationPoliciesImpl(this);\n this.connectors = new ConnectorsImpl(this);\n this.connectorMappings = new ConnectorMappingsImpl(this);\n this.kpi = new KpiImpl(this);\n this.widgetTypes = new WidgetTypesImpl(this);\n this.views = new ViewsImpl(this);\n this.links = new LinksImpl(this);\n this.roles = new RolesImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.images = new ImagesImpl(this);\n this.predictions = new PredictionsImpl(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 operations: Operations;\n hubs: Hubs;\n profiles: Profiles;\n interactions: Interactions;\n relationships: Relationships;\n relationshipLinks: RelationshipLinks;\n authorizationPolicies: AuthorizationPolicies;\n connectors: Connectors;\n connectorMappings: ConnectorMappings;\n kpi: Kpi;\n widgetTypes: WidgetTypes;\n views: Views;\n links: Links;\n roles: Roles;\n roleAssignments: RoleAssignments;\n images: Images;\n predictions: Predictions;\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"]}