@azure-rest/purview-sharing 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 (207) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +2 -2
  3. package/dist/browser/clientDefinitions.d.ts +87 -0
  4. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  5. package/dist/browser/clientDefinitions.js +4 -0
  6. package/dist/browser/clientDefinitions.js.map +1 -0
  7. package/dist/browser/index.d.ts +12 -0
  8. package/dist/browser/index.d.ts.map +1 -0
  9. package/dist/browser/index.js +15 -0
  10. package/dist/browser/index.js.map +1 -0
  11. package/dist/browser/isUnexpected.d.ts +19 -0
  12. package/dist/browser/isUnexpected.d.ts.map +1 -0
  13. package/{dist-esm/src → dist/browser}/isUnexpected.js +2 -1
  14. package/dist/browser/isUnexpected.js.map +1 -0
  15. package/dist/browser/logger.d.ts +2 -0
  16. package/dist/browser/logger.d.ts.map +1 -0
  17. package/dist/browser/logger.js +5 -0
  18. package/dist/browser/logger.js.map +1 -0
  19. package/dist/browser/models.d.ts +201 -0
  20. package/dist/browser/models.d.ts.map +1 -0
  21. package/dist/browser/models.js +4 -0
  22. package/dist/browser/models.js.map +1 -0
  23. package/dist/browser/outputModels.d.ts +352 -0
  24. package/dist/browser/outputModels.d.ts.map +1 -0
  25. package/dist/browser/outputModels.js +4 -0
  26. package/dist/browser/outputModels.js.map +1 -0
  27. package/dist/browser/package.json +3 -0
  28. package/dist/browser/paginateHelper.d.ts +68 -0
  29. package/dist/browser/paginateHelper.d.ts.map +1 -0
  30. package/dist/browser/paginateHelper.js +167 -0
  31. package/dist/browser/paginateHelper.js.map +1 -0
  32. package/dist/browser/parameters.d.ts +123 -0
  33. package/dist/browser/parameters.d.ts.map +1 -0
  34. package/dist/browser/parameters.js +4 -0
  35. package/dist/browser/parameters.js.map +1 -0
  36. package/dist/browser/pollingHelper.d.ts +76 -0
  37. package/dist/browser/pollingHelper.d.ts.map +1 -0
  38. package/dist/browser/pollingHelper.js +104 -0
  39. package/dist/browser/pollingHelper.js.map +1 -0
  40. package/dist/browser/purviewSharing.d.ts +16 -0
  41. package/dist/browser/purviewSharing.d.ts.map +1 -0
  42. package/dist/browser/purviewSharing.js +43 -0
  43. package/dist/browser/purviewSharing.js.map +1 -0
  44. package/dist/browser/responses.d.ts +304 -0
  45. package/dist/browser/responses.d.ts.map +1 -0
  46. package/dist/browser/responses.js +4 -0
  47. package/dist/browser/responses.js.map +1 -0
  48. package/dist/commonjs/clientDefinitions.d.ts +87 -0
  49. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  50. package/dist/commonjs/clientDefinitions.js +5 -0
  51. package/dist/commonjs/clientDefinitions.js.map +1 -0
  52. package/dist/commonjs/index.d.ts +12 -0
  53. package/dist/commonjs/index.d.ts.map +1 -0
  54. package/dist/commonjs/index.js +18 -0
  55. package/dist/commonjs/index.js.map +1 -0
  56. package/dist/commonjs/isUnexpected.d.ts +19 -0
  57. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  58. package/dist/commonjs/isUnexpected.js +89 -0
  59. package/dist/commonjs/isUnexpected.js.map +1 -0
  60. package/dist/commonjs/logger.d.ts +2 -0
  61. package/dist/commonjs/logger.d.ts.map +1 -0
  62. package/dist/commonjs/logger.js +8 -0
  63. package/dist/commonjs/logger.js.map +1 -0
  64. package/dist/commonjs/models.d.ts +201 -0
  65. package/dist/commonjs/models.d.ts.map +1 -0
  66. package/dist/commonjs/models.js +5 -0
  67. package/dist/commonjs/models.js.map +1 -0
  68. package/dist/commonjs/outputModels.d.ts +352 -0
  69. package/dist/commonjs/outputModels.d.ts.map +1 -0
  70. package/dist/commonjs/outputModels.js +5 -0
  71. package/dist/commonjs/outputModels.js.map +1 -0
  72. package/dist/commonjs/package.json +3 -0
  73. package/dist/commonjs/paginateHelper.d.ts +68 -0
  74. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  75. package/dist/commonjs/paginateHelper.js +170 -0
  76. package/dist/commonjs/paginateHelper.js.map +1 -0
  77. package/dist/commonjs/parameters.d.ts +123 -0
  78. package/dist/commonjs/parameters.d.ts.map +1 -0
  79. package/dist/commonjs/parameters.js +5 -0
  80. package/dist/commonjs/parameters.js.map +1 -0
  81. package/dist/commonjs/pollingHelper.d.ts +76 -0
  82. package/dist/commonjs/pollingHelper.d.ts.map +1 -0
  83. package/dist/commonjs/pollingHelper.js +107 -0
  84. package/dist/commonjs/pollingHelper.js.map +1 -0
  85. package/dist/commonjs/purviewSharing.d.ts +16 -0
  86. package/dist/commonjs/purviewSharing.d.ts.map +1 -0
  87. package/dist/commonjs/purviewSharing.js +46 -0
  88. package/dist/commonjs/purviewSharing.js.map +1 -0
  89. package/dist/commonjs/responses.d.ts +304 -0
  90. package/dist/commonjs/responses.d.ts.map +1 -0
  91. package/dist/commonjs/responses.js +5 -0
  92. package/dist/commonjs/responses.js.map +1 -0
  93. package/dist/commonjs/tsdoc-metadata.json +11 -0
  94. package/dist/esm/clientDefinitions.d.ts +87 -0
  95. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  96. package/dist/esm/clientDefinitions.js +4 -0
  97. package/dist/esm/clientDefinitions.js.map +1 -0
  98. package/dist/esm/index.d.ts +12 -0
  99. package/dist/esm/index.d.ts.map +1 -0
  100. package/dist/esm/index.js +15 -0
  101. package/dist/esm/index.js.map +1 -0
  102. package/dist/esm/isUnexpected.d.ts +19 -0
  103. package/dist/esm/isUnexpected.d.ts.map +1 -0
  104. package/dist/esm/isUnexpected.js +86 -0
  105. package/dist/esm/isUnexpected.js.map +1 -0
  106. package/dist/esm/logger.d.ts +2 -0
  107. package/dist/esm/logger.d.ts.map +1 -0
  108. package/dist/esm/logger.js +5 -0
  109. package/dist/esm/logger.js.map +1 -0
  110. package/dist/esm/models.d.ts +201 -0
  111. package/dist/esm/models.d.ts.map +1 -0
  112. package/dist/esm/models.js +4 -0
  113. package/dist/esm/models.js.map +1 -0
  114. package/dist/esm/outputModels.d.ts +352 -0
  115. package/dist/esm/outputModels.d.ts.map +1 -0
  116. package/dist/esm/outputModels.js +4 -0
  117. package/dist/esm/outputModels.js.map +1 -0
  118. package/dist/esm/package.json +3 -0
  119. package/dist/esm/paginateHelper.d.ts +68 -0
  120. package/dist/esm/paginateHelper.d.ts.map +1 -0
  121. package/dist/esm/paginateHelper.js +167 -0
  122. package/dist/esm/paginateHelper.js.map +1 -0
  123. package/dist/esm/parameters.d.ts +123 -0
  124. package/dist/esm/parameters.d.ts.map +1 -0
  125. package/dist/esm/parameters.js +4 -0
  126. package/dist/esm/parameters.js.map +1 -0
  127. package/dist/esm/pollingHelper.d.ts +76 -0
  128. package/dist/esm/pollingHelper.d.ts.map +1 -0
  129. package/dist/esm/pollingHelper.js +104 -0
  130. package/dist/esm/pollingHelper.js.map +1 -0
  131. package/dist/esm/purviewSharing.d.ts +16 -0
  132. package/dist/esm/purviewSharing.d.ts.map +1 -0
  133. package/dist/esm/purviewSharing.js +43 -0
  134. package/dist/esm/purviewSharing.js.map +1 -0
  135. package/dist/esm/responses.d.ts +304 -0
  136. package/dist/esm/responses.d.ts.map +1 -0
  137. package/dist/esm/responses.js +4 -0
  138. package/dist/esm/responses.js.map +1 -0
  139. package/dist/react-native/clientDefinitions.d.ts +87 -0
  140. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  141. package/dist/react-native/clientDefinitions.js +4 -0
  142. package/dist/react-native/clientDefinitions.js.map +1 -0
  143. package/dist/react-native/index.d.ts +12 -0
  144. package/dist/react-native/index.d.ts.map +1 -0
  145. package/dist/react-native/index.js +15 -0
  146. package/dist/react-native/index.js.map +1 -0
  147. package/dist/react-native/isUnexpected.d.ts +19 -0
  148. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  149. package/dist/react-native/isUnexpected.js +86 -0
  150. package/dist/react-native/isUnexpected.js.map +1 -0
  151. package/dist/react-native/logger.d.ts +2 -0
  152. package/dist/react-native/logger.d.ts.map +1 -0
  153. package/dist/react-native/logger.js +5 -0
  154. package/dist/react-native/logger.js.map +1 -0
  155. package/dist/react-native/models.d.ts +201 -0
  156. package/dist/react-native/models.d.ts.map +1 -0
  157. package/dist/react-native/models.js +4 -0
  158. package/dist/react-native/models.js.map +1 -0
  159. package/dist/react-native/outputModels.d.ts +352 -0
  160. package/dist/react-native/outputModels.d.ts.map +1 -0
  161. package/dist/react-native/outputModels.js +4 -0
  162. package/dist/react-native/outputModels.js.map +1 -0
  163. package/dist/react-native/package.json +3 -0
  164. package/dist/react-native/paginateHelper.d.ts +68 -0
  165. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  166. package/dist/react-native/paginateHelper.js +167 -0
  167. package/dist/react-native/paginateHelper.js.map +1 -0
  168. package/dist/react-native/parameters.d.ts +123 -0
  169. package/dist/react-native/parameters.d.ts.map +1 -0
  170. package/dist/react-native/parameters.js +4 -0
  171. package/dist/react-native/parameters.js.map +1 -0
  172. package/dist/react-native/pollingHelper.d.ts +76 -0
  173. package/dist/react-native/pollingHelper.d.ts.map +1 -0
  174. package/dist/react-native/pollingHelper.js +104 -0
  175. package/dist/react-native/pollingHelper.js.map +1 -0
  176. package/dist/react-native/purviewSharing.d.ts +16 -0
  177. package/dist/react-native/purviewSharing.d.ts.map +1 -0
  178. package/dist/react-native/purviewSharing.js +43 -0
  179. package/dist/react-native/purviewSharing.js.map +1 -0
  180. package/dist/react-native/responses.d.ts +304 -0
  181. package/dist/react-native/responses.d.ts.map +1 -0
  182. package/dist/react-native/responses.js +4 -0
  183. package/dist/react-native/responses.js.map +1 -0
  184. package/package.json +83 -69
  185. package/dist/index.js +0 -240
  186. package/dist/index.js.map +0 -1
  187. package/dist-esm/src/clientDefinitions.js +0 -4
  188. package/dist-esm/src/clientDefinitions.js.map +0 -1
  189. package/dist-esm/src/index.js +0 -14
  190. package/dist-esm/src/index.js.map +0 -1
  191. package/dist-esm/src/isUnexpected.js.map +0 -1
  192. package/dist-esm/src/models.js +0 -4
  193. package/dist-esm/src/models.js.map +0 -1
  194. package/dist-esm/src/outputModels.js +0 -4
  195. package/dist-esm/src/outputModels.js.map +0 -1
  196. package/dist-esm/src/paginateHelper.js +0 -70
  197. package/dist-esm/src/paginateHelper.js.map +0 -1
  198. package/dist-esm/src/parameters.js +0 -4
  199. package/dist-esm/src/parameters.js.map +0 -1
  200. package/dist-esm/src/pollingHelper.js +0 -50
  201. package/dist-esm/src/pollingHelper.js.map +0 -1
  202. package/dist-esm/src/purviewSharing.js +0 -27
  203. package/dist-esm/src/purviewSharing.js.map +0 -1
  204. package/dist-esm/src/responses.js +0 -4
  205. package/dist-esm/src/responses.js.map +0 -1
  206. package/review/purview-sharing.api.md +0 -1234
  207. package/types/purview-sharing.d.ts +0 -1270
@@ -1,50 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { createHttpPoller, } from "@azure/core-lro";
4
- /**
5
- * Helper function that builds a Poller object to help polling a long running operation.
6
- * @param client - Client to use for sending the request to get additional pages.
7
- * @param initialResponse - The initial response.
8
- * @param options - Options to set a resume state or custom polling interval.
9
- * @returns - A poller object to poll for operation state updates and eventually get the final response.
10
- */
11
- export async function getLongRunningPoller(client, initialResponse, options = {}) {
12
- var _a;
13
- const poller = {
14
- requestMethod: initialResponse.request.method,
15
- requestPath: initialResponse.request.url,
16
- sendInitialRequest: async () => {
17
- // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
18
- // we are not triggering the initial request here, just extracting the information from the
19
- // response we were provided.
20
- return getLroResponse(initialResponse);
21
- },
22
- sendPollRequest: async (path) => {
23
- // This is the callback that is going to be called to poll the service
24
- // to get the latest status. We use the client provided and the polling path
25
- // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
26
- // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
27
- const response = await client.pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url).get();
28
- const lroResponse = getLroResponse(response);
29
- lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
30
- return lroResponse;
31
- },
32
- };
33
- options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
34
- return createHttpPoller(poller, options);
35
- }
36
- /**
37
- * Converts a Rest Client response to a response that the LRO implementation understands
38
- * @param response - a rest client http response
39
- * @returns - An LRO response that the LRO implementation understands
40
- */
41
- function getLroResponse(response) {
42
- if (Number.isNaN(response.status)) {
43
- throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
44
- }
45
- return {
46
- flatResponse: response,
47
- rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
48
- };
49
- }
50
- //# sourceMappingURL=pollingHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAML,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACvF,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,CAAC,qBAAqB,GAAG,MAAA,OAAO,CAAC,qBAAqB,mCAAI,IAAI,CAAC;IACtE,OAAO,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;KAC/F;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n createHttpPoller,\n} from \"@azure/core-lro\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {}\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
@@ -1,27 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { getClient } from "@azure-rest/core-client";
4
- /**
5
- * Initialize a new instance of `PurviewSharingClient`
6
- * @param endpoint type: string, The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share
7
- * @param credentials type: TokenCredential, uniquely identify client credential
8
- * @param options type: ClientOptions, the parameter for all optional parameters
9
- */
10
- export default function createClient(endpoint, credentials, options = {}) {
11
- var _a, _b;
12
- const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}`;
13
- options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2023-02-15-preview";
14
- options = Object.assign(Object.assign({}, options), { credentials: {
15
- scopes: ["https://purview.azure.net/.default"],
16
- } });
17
- const userAgentInfo = `azsdk-js-purview-sharing-rest/1.0.0-beta.1`;
18
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
19
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
20
- : `${userAgentInfo}`;
21
- options = Object.assign(Object.assign({}, options), { userAgentOptions: {
22
- userAgentPrefix,
23
- } });
24
- const client = getClient(baseUrl, credentials, options);
25
- return client;
26
- }
27
- //# sourceMappingURL=purviewSharing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"purviewSharing.js","sourceRoot":"","sources":["../../src/purviewSharing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AAInE;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,oCAAoC,CAAC;SAC/C,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,4CAA4C,CAAC;IACnE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAyB,CAAC;IAEhF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { PurviewSharingClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of `PurviewSharingClient`\n * @param endpoint type: string, The sharing endpoint of your purview account. Example: https://{accountName}.purview.azure.com/share\n * @param credentials type: TokenCredential, uniquely identify client credential\n * @param options type: ClientOptions, the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewSharingClient {\n const baseUrl = options.baseUrl ?? `${endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2023-02-15-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-purview-sharing-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as PurviewSharingClient;\n\n return client;\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=responses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n ReceivedShareOutput,\n PurviewShareErrorOutput,\n OperationResponseOutput,\n ReceivedShareListOutput,\n TenantEmailRegistrationOutput,\n SentShareListOutput,\n SentShareOutput,\n SentShareInvitationListOutput,\n SentShareInvitationOutput,\n} from \"./outputModels\";\n\n/** Get a received share */\nexport interface ReceivedSharesGetReceivedShare200Response extends HttpResponse {\n status: \"200\";\n body: ReceivedShareOutput;\n}\n\nexport interface ReceivedSharesGetReceivedShareDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Get a received share */\nexport interface ReceivedSharesGetReceivedShareDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesGetReceivedShareDefaultHeaders;\n}\n\nexport interface ReceivedSharesCreateOrReplace200Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Update changes to a received share */\nexport interface ReceivedSharesCreateOrReplace200Response extends HttpResponse {\n status: \"200\";\n body: ReceivedShareOutput;\n headers: RawHttpHeaders & ReceivedSharesCreateOrReplace200Headers;\n}\n\nexport interface ReceivedSharesCreateOrReplace201Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Update changes to a received share */\nexport interface ReceivedSharesCreateOrReplace201Response extends HttpResponse {\n status: \"201\";\n body: ReceivedShareOutput;\n headers: RawHttpHeaders & ReceivedSharesCreateOrReplace201Headers;\n}\n\nexport interface ReceivedSharesCreateOrReplaceDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Update changes to a received share */\nexport interface ReceivedSharesCreateOrReplaceDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesCreateOrReplaceDefaultHeaders;\n}\n\nexport interface ReceivedSharesDeleteReceivedShare202Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Delete a received share */\nexport interface ReceivedSharesDeleteReceivedShare202Response extends HttpResponse {\n status: \"202\";\n body: OperationResponseOutput;\n headers: RawHttpHeaders & ReceivedSharesDeleteReceivedShare202Headers;\n}\n\nexport interface ReceivedSharesDeleteReceivedShareDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Delete a received share */\nexport interface ReceivedSharesDeleteReceivedShareDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesDeleteReceivedShareDefaultHeaders;\n}\n\n/** List attached received shares */\nexport interface ReceivedSharesGetAllAttachedReceivedShares200Response extends HttpResponse {\n status: \"200\";\n body: ReceivedShareListOutput;\n}\n\nexport interface ReceivedSharesGetAllAttachedReceivedSharesDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** List attached received shares */\nexport interface ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesGetAllAttachedReceivedSharesDefaultHeaders;\n}\n\n/** List detached received shares */\nexport interface ReceivedSharesGetAllDetachedReceivedShares200Response extends HttpResponse {\n status: \"200\";\n body: ReceivedShareListOutput;\n}\n\nexport interface ReceivedSharesGetAllDetachedReceivedSharesDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** List detached received shares */\nexport interface ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesGetAllDetachedReceivedSharesDefaultHeaders;\n}\n\n/** Activates the email registration for current tenant */\nexport interface ReceivedSharesActivateTenantEmailRegistration200Response extends HttpResponse {\n status: \"200\";\n body: TenantEmailRegistrationOutput;\n}\n\nexport interface ReceivedSharesActivateTenantEmailRegistrationDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Activates the email registration for current tenant */\nexport interface ReceivedSharesActivateTenantEmailRegistrationDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesActivateTenantEmailRegistrationDefaultHeaders;\n}\n\n/** Register an email for the current tenant */\nexport interface ReceivedSharesRegisterTenantEmailRegistration200Response extends HttpResponse {\n status: \"200\";\n body: TenantEmailRegistrationOutput;\n}\n\nexport interface ReceivedSharesRegisterTenantEmailRegistrationDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Register an email for the current tenant */\nexport interface ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & ReceivedSharesRegisterTenantEmailRegistrationDefaultHeaders;\n}\n\n/** List sent shares */\nexport interface SentSharesGetAllSentShares200Response extends HttpResponse {\n status: \"200\";\n body: SentShareListOutput;\n}\n\nexport interface SentSharesGetAllSentSharesDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** List sent shares */\nexport interface SentSharesGetAllSentSharesDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesGetAllSentSharesDefaultHeaders;\n}\n\n/** Get a sent share */\nexport interface SentSharesGetSentShare200Response extends HttpResponse {\n status: \"200\";\n body: SentShareOutput;\n}\n\nexport interface SentSharesGetSentShareDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Get a sent share */\nexport interface SentSharesGetSentShareDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesGetSentShareDefaultHeaders;\n}\n\nexport interface SentSharesCreateOrReplace200Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Create or replace a sent share */\nexport interface SentSharesCreateOrReplace200Response extends HttpResponse {\n status: \"200\";\n body: SentShareOutput;\n headers: RawHttpHeaders & SentSharesCreateOrReplace200Headers;\n}\n\nexport interface SentSharesCreateOrReplace201Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Create or replace a sent share */\nexport interface SentSharesCreateOrReplace201Response extends HttpResponse {\n status: \"201\";\n body: SentShareOutput;\n headers: RawHttpHeaders & SentSharesCreateOrReplace201Headers;\n}\n\nexport interface SentSharesCreateOrReplaceDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Create or replace a sent share */\nexport interface SentSharesCreateOrReplaceDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesCreateOrReplaceDefaultHeaders;\n}\n\nexport interface SentSharesDeleteSentShare202Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Delete a sent share */\nexport interface SentSharesDeleteSentShare202Response extends HttpResponse {\n status: \"202\";\n body: OperationResponseOutput;\n headers: RawHttpHeaders & SentSharesDeleteSentShare202Headers;\n}\n\nexport interface SentSharesDeleteSentShareDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Delete a sent share */\nexport interface SentSharesDeleteSentShareDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesDeleteSentShareDefaultHeaders;\n}\n\n/** List sent share recipients */\nexport interface SentSharesGetAllSentShareInvitations200Response extends HttpResponse {\n status: \"200\";\n body: SentShareInvitationListOutput;\n}\n\nexport interface SentSharesGetAllSentShareInvitationsDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** List sent share recipients */\nexport interface SentSharesGetAllSentShareInvitationsDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesGetAllSentShareInvitationsDefaultHeaders;\n}\n\n/** Get recipient for a given sent share */\nexport interface SentSharesGetSentShareInvitation200Response extends HttpResponse {\n status: \"200\";\n body: SentShareInvitationOutput;\n}\n\nexport interface SentSharesGetSentShareInvitationDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Get recipient for a given sent share */\nexport interface SentSharesGetSentShareInvitationDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesGetSentShareInvitationDefaultHeaders;\n}\n\n/** Create a recipient for a given sent share */\nexport interface SentSharesCreateSentShareInvitation201Response extends HttpResponse {\n status: \"201\";\n body: SentShareInvitationOutput;\n}\n\nexport interface SentSharesCreateSentShareInvitationDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Create a recipient for a given sent share */\nexport interface SentSharesCreateSentShareInvitationDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesCreateSentShareInvitationDefaultHeaders;\n}\n\nexport interface SentSharesDeleteSentShareInvitation202Headers {\n /** The URL to track the status of the long running operation. */\n \"operation-location\"?: string;\n}\n\n/** Delete a sent share invitation */\nexport interface SentSharesDeleteSentShareInvitation202Response extends HttpResponse {\n status: \"202\";\n body: OperationResponseOutput;\n headers: RawHttpHeaders & SentSharesDeleteSentShareInvitation202Headers;\n}\n\nexport interface SentSharesDeleteSentShareInvitationDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Delete a sent share invitation */\nexport interface SentSharesDeleteSentShareInvitationDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesDeleteSentShareInvitationDefaultHeaders;\n}\n\n/** Notifies the user recipient of the sent share invitation, does not apply to service invitations. */\nexport interface SentSharesNotifyUserSentShareInvitation200Response extends HttpResponse {\n status: \"200\";\n body: SentShareInvitationOutput;\n}\n\nexport interface SentSharesNotifyUserSentShareInvitationDefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Notifies the user recipient of the sent share invitation, does not apply to service invitations. */\nexport interface SentSharesNotifyUserSentShareInvitationDefaultResponse extends HttpResponse {\n status: string;\n body: PurviewShareErrorOutput;\n headers: RawHttpHeaders & SentSharesNotifyUserSentShareInvitationDefaultHeaders;\n}\n"]}