@azure-rest/purview-sharing 1.0.0-beta.1 → 1.0.0-beta.4

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/CHANGELOG.md +28 -0
  2. package/LICENSE +4 -4
  3. package/README.md +74 -3
  4. package/dist/browser/clientDefinitions.d.ts +87 -0
  5. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  6. package/dist/browser/clientDefinitions.js +4 -0
  7. package/dist/browser/clientDefinitions.js.map +1 -0
  8. package/dist/browser/index.d.ts +12 -0
  9. package/dist/browser/index.d.ts.map +1 -0
  10. package/dist/browser/index.js +15 -0
  11. package/dist/browser/index.js.map +1 -0
  12. package/dist/browser/isUnexpected.d.ts +19 -0
  13. package/dist/browser/isUnexpected.d.ts.map +1 -0
  14. package/{dist-esm/src → dist/browser}/isUnexpected.js +6 -6
  15. package/dist/browser/isUnexpected.js.map +1 -0
  16. package/dist/browser/logger.d.ts +2 -0
  17. package/dist/browser/logger.d.ts.map +1 -0
  18. package/dist/browser/logger.js +5 -0
  19. package/dist/browser/logger.js.map +1 -0
  20. package/dist/browser/models.d.ts +201 -0
  21. package/dist/browser/models.d.ts.map +1 -0
  22. package/dist/browser/models.js +4 -0
  23. package/dist/browser/models.js.map +1 -0
  24. package/dist/browser/outputModels.d.ts +352 -0
  25. package/dist/browser/outputModels.d.ts.map +1 -0
  26. package/dist/browser/outputModels.js +4 -0
  27. package/dist/browser/outputModels.js.map +1 -0
  28. package/dist/browser/package.json +3 -0
  29. package/dist/browser/paginateHelper.d.ts +68 -0
  30. package/dist/browser/paginateHelper.d.ts.map +1 -0
  31. package/{dist-esm/src → dist/browser}/paginateHelper.js +70 -3
  32. package/dist/browser/paginateHelper.js.map +1 -0
  33. package/dist/browser/parameters.d.ts +123 -0
  34. package/dist/browser/parameters.d.ts.map +1 -0
  35. package/dist/browser/parameters.js +4 -0
  36. package/dist/browser/parameters.js.map +1 -0
  37. package/dist/browser/pollingHelper.d.ts +76 -0
  38. package/dist/browser/pollingHelper.d.ts.map +1 -0
  39. package/dist/browser/pollingHelper.js +107 -0
  40. package/dist/browser/pollingHelper.js.map +1 -0
  41. package/dist/browser/purviewSharing.d.ts +16 -0
  42. package/dist/browser/purviewSharing.d.ts.map +1 -0
  43. package/dist/browser/purviewSharing.js +45 -0
  44. package/dist/browser/purviewSharing.js.map +1 -0
  45. package/dist/browser/responses.d.ts +304 -0
  46. package/dist/browser/responses.d.ts.map +1 -0
  47. package/dist/browser/responses.js +4 -0
  48. package/dist/browser/responses.js.map +1 -0
  49. package/dist/commonjs/clientDefinitions.d.ts +87 -0
  50. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  51. package/dist/commonjs/clientDefinitions.js +5 -0
  52. package/dist/commonjs/clientDefinitions.js.map +1 -0
  53. package/dist/commonjs/index.d.ts +12 -0
  54. package/dist/commonjs/index.d.ts.map +1 -0
  55. package/dist/commonjs/index.js +18 -0
  56. package/dist/commonjs/index.js.map +1 -0
  57. package/dist/commonjs/isUnexpected.d.ts +19 -0
  58. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  59. package/dist/commonjs/isUnexpected.js +88 -0
  60. package/dist/commonjs/isUnexpected.js.map +1 -0
  61. package/dist/commonjs/logger.d.ts +2 -0
  62. package/dist/commonjs/logger.d.ts.map +1 -0
  63. package/dist/commonjs/logger.js +8 -0
  64. package/dist/commonjs/logger.js.map +1 -0
  65. package/dist/commonjs/models.d.ts +201 -0
  66. package/dist/commonjs/models.d.ts.map +1 -0
  67. package/dist/commonjs/models.js +5 -0
  68. package/dist/commonjs/models.js.map +1 -0
  69. package/dist/commonjs/outputModels.d.ts +352 -0
  70. package/dist/commonjs/outputModels.d.ts.map +1 -0
  71. package/dist/commonjs/outputModels.js +5 -0
  72. package/dist/commonjs/outputModels.js.map +1 -0
  73. package/dist/commonjs/package.json +3 -0
  74. package/dist/commonjs/paginateHelper.d.ts +68 -0
  75. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  76. package/dist/commonjs/paginateHelper.js +140 -0
  77. package/dist/commonjs/paginateHelper.js.map +1 -0
  78. package/dist/commonjs/parameters.d.ts +123 -0
  79. package/dist/commonjs/parameters.d.ts.map +1 -0
  80. package/dist/commonjs/parameters.js +5 -0
  81. package/dist/commonjs/parameters.js.map +1 -0
  82. package/dist/commonjs/pollingHelper.d.ts +76 -0
  83. package/dist/commonjs/pollingHelper.d.ts.map +1 -0
  84. package/dist/commonjs/pollingHelper.js +110 -0
  85. package/dist/commonjs/pollingHelper.js.map +1 -0
  86. package/dist/commonjs/purviewSharing.d.ts +16 -0
  87. package/dist/commonjs/purviewSharing.d.ts.map +1 -0
  88. package/dist/commonjs/purviewSharing.js +48 -0
  89. package/dist/commonjs/purviewSharing.js.map +1 -0
  90. package/dist/commonjs/responses.d.ts +304 -0
  91. package/dist/commonjs/responses.d.ts.map +1 -0
  92. package/dist/commonjs/responses.js +5 -0
  93. package/dist/commonjs/responses.js.map +1 -0
  94. package/dist/commonjs/tsdoc-metadata.json +11 -0
  95. package/dist/esm/clientDefinitions.d.ts +87 -0
  96. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  97. package/dist/esm/clientDefinitions.js +4 -0
  98. package/dist/esm/clientDefinitions.js.map +1 -0
  99. package/dist/esm/index.d.ts +12 -0
  100. package/dist/esm/index.d.ts.map +1 -0
  101. package/dist/esm/index.js +15 -0
  102. package/dist/esm/index.js.map +1 -0
  103. package/dist/esm/isUnexpected.d.ts +19 -0
  104. package/dist/esm/isUnexpected.d.ts.map +1 -0
  105. package/dist/esm/isUnexpected.js +85 -0
  106. package/dist/esm/isUnexpected.js.map +1 -0
  107. package/dist/esm/logger.d.ts +2 -0
  108. package/dist/esm/logger.d.ts.map +1 -0
  109. package/dist/esm/logger.js +5 -0
  110. package/dist/esm/logger.js.map +1 -0
  111. package/dist/esm/models.d.ts +201 -0
  112. package/dist/esm/models.d.ts.map +1 -0
  113. package/dist/esm/models.js +4 -0
  114. package/dist/esm/models.js.map +1 -0
  115. package/dist/esm/outputModels.d.ts +352 -0
  116. package/dist/esm/outputModels.d.ts.map +1 -0
  117. package/dist/esm/outputModels.js +4 -0
  118. package/dist/esm/outputModels.js.map +1 -0
  119. package/dist/esm/package.json +3 -0
  120. package/dist/esm/paginateHelper.d.ts +68 -0
  121. package/dist/esm/paginateHelper.d.ts.map +1 -0
  122. package/dist/esm/paginateHelper.js +137 -0
  123. package/dist/esm/paginateHelper.js.map +1 -0
  124. package/dist/esm/parameters.d.ts +123 -0
  125. package/dist/esm/parameters.d.ts.map +1 -0
  126. package/dist/esm/parameters.js +4 -0
  127. package/dist/esm/parameters.js.map +1 -0
  128. package/dist/esm/pollingHelper.d.ts +76 -0
  129. package/dist/esm/pollingHelper.d.ts.map +1 -0
  130. package/dist/esm/pollingHelper.js +107 -0
  131. package/dist/esm/pollingHelper.js.map +1 -0
  132. package/dist/esm/purviewSharing.d.ts +16 -0
  133. package/dist/esm/purviewSharing.d.ts.map +1 -0
  134. package/dist/esm/purviewSharing.js +45 -0
  135. package/dist/esm/purviewSharing.js.map +1 -0
  136. package/dist/esm/responses.d.ts +304 -0
  137. package/dist/esm/responses.d.ts.map +1 -0
  138. package/dist/esm/responses.js +4 -0
  139. package/dist/esm/responses.js.map +1 -0
  140. package/dist/react-native/clientDefinitions.d.ts +87 -0
  141. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  142. package/dist/react-native/clientDefinitions.js +4 -0
  143. package/dist/react-native/clientDefinitions.js.map +1 -0
  144. package/dist/react-native/index.d.ts +12 -0
  145. package/dist/react-native/index.d.ts.map +1 -0
  146. package/dist/react-native/index.js +15 -0
  147. package/dist/react-native/index.js.map +1 -0
  148. package/dist/react-native/isUnexpected.d.ts +19 -0
  149. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  150. package/dist/react-native/isUnexpected.js +85 -0
  151. package/dist/react-native/isUnexpected.js.map +1 -0
  152. package/dist/react-native/logger.d.ts +2 -0
  153. package/dist/react-native/logger.d.ts.map +1 -0
  154. package/dist/react-native/logger.js +5 -0
  155. package/dist/react-native/logger.js.map +1 -0
  156. package/dist/react-native/models.d.ts +201 -0
  157. package/dist/react-native/models.d.ts.map +1 -0
  158. package/dist/react-native/models.js +4 -0
  159. package/dist/react-native/models.js.map +1 -0
  160. package/dist/react-native/outputModels.d.ts +352 -0
  161. package/dist/react-native/outputModels.d.ts.map +1 -0
  162. package/dist/react-native/outputModels.js +4 -0
  163. package/dist/react-native/outputModels.js.map +1 -0
  164. package/dist/react-native/package.json +3 -0
  165. package/dist/react-native/paginateHelper.d.ts +68 -0
  166. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  167. package/dist/react-native/paginateHelper.js +137 -0
  168. package/dist/react-native/paginateHelper.js.map +1 -0
  169. package/dist/react-native/parameters.d.ts +123 -0
  170. package/dist/react-native/parameters.d.ts.map +1 -0
  171. package/dist/react-native/parameters.js +4 -0
  172. package/dist/react-native/parameters.js.map +1 -0
  173. package/dist/react-native/pollingHelper.d.ts +76 -0
  174. package/dist/react-native/pollingHelper.d.ts.map +1 -0
  175. package/dist/react-native/pollingHelper.js +107 -0
  176. package/dist/react-native/pollingHelper.js.map +1 -0
  177. package/dist/react-native/purviewSharing.d.ts +16 -0
  178. package/dist/react-native/purviewSharing.d.ts.map +1 -0
  179. package/dist/react-native/purviewSharing.js +45 -0
  180. package/dist/react-native/purviewSharing.js.map +1 -0
  181. package/dist/react-native/responses.d.ts +304 -0
  182. package/dist/react-native/responses.d.ts.map +1 -0
  183. package/dist/react-native/responses.js +4 -0
  184. package/dist/react-native/responses.js.map +1 -0
  185. package/package.json +86 -78
  186. package/review/{purview-sharing.api.md → purview-sharing-node.api.md} +123 -19
  187. package/dist/index.js +0 -240
  188. package/dist/index.js.map +0 -1
  189. package/dist-esm/src/clientDefinitions.js +0 -4
  190. package/dist-esm/src/clientDefinitions.js.map +0 -1
  191. package/dist-esm/src/index.js +0 -14
  192. package/dist-esm/src/index.js.map +0 -1
  193. package/dist-esm/src/isUnexpected.js.map +0 -1
  194. package/dist-esm/src/models.js +0 -4
  195. package/dist-esm/src/models.js.map +0 -1
  196. package/dist-esm/src/outputModels.js +0 -4
  197. package/dist-esm/src/outputModels.js.map +0 -1
  198. package/dist-esm/src/paginateHelper.js.map +0 -1
  199. package/dist-esm/src/parameters.js +0 -4
  200. package/dist-esm/src/parameters.js.map +0 -1
  201. package/dist-esm/src/pollingHelper.js +0 -50
  202. package/dist-esm/src/pollingHelper.js.map +0 -1
  203. package/dist-esm/src/purviewSharing.js +0 -27
  204. package/dist-esm/src/purviewSharing.js.map +0 -1
  205. package/dist-esm/src/responses.js +0 -4
  206. package/dist-esm/src/responses.js.map +0 -1
  207. package/types/purview-sharing.d.ts +0 -1270
package/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Release History
2
+
3
+ ## 1.0.0-beta.4 (Unreleased)
4
+
5
+ ### Features Added
6
+
7
+ ### Breaking Changes
8
+
9
+ ### Bugs Fixed
10
+
11
+ ### Other Changes
12
+
13
+ ## 1.0.0-beta.3 (2025-02-10)
14
+
15
+ ### Features Added
16
+ - refresh @azure-rest/purview-sharing
17
+
18
+ ## 1.0.0-beta.2 (2023-06-23)
19
+
20
+ ### Features Added
21
+
22
+ - Release of GET Share Resources API.
23
+
24
+ ## 1.0.0-beta.1 (2023-03-10)
25
+
26
+ ### Features Added
27
+
28
+ - Initial release of the Purview Sharing client library for JavaScript.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ Copyright (c) Microsoft Corporation.
2
2
 
3
- Copyright (c) 2023 Microsoft
3
+ MIT License
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -8,7 +8,7 @@ Key links:
8
8
 
9
9
  - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-sharing-rest)
10
10
  - [Package (NPM)](https://www.npmjs.com/package/@azure-rest/purview-sharing)
11
- - [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/purview-sharing?view=azure-node-preview)
11
+ - [API reference documentation](https://learn.microsoft.com/javascript/api/@azure-rest/purview-sharing?view=azure-node-preview)
12
12
  - [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-sharing-rest/samples)
13
13
 
14
14
  ## Getting started
@@ -44,14 +44,85 @@ can be used to authenticate the client.
44
44
  Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
45
45
  AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
46
46
 
47
+ Use the returned token credential to authenticate the client:
48
+
49
+ ```ts snippet:ReadmeSampleCreateClient_Node
50
+ import PurviewSharingClient from "@azure-rest/purview-sharing";
51
+ import { DefaultAzureCredential } from "@azure/identity";
52
+
53
+ const client = PurviewSharingClient(
54
+ "https://<my-account-name>.purview.azure.com",
55
+ new DefaultAzureCredential(),
56
+ );
57
+ ```
58
+
59
+ ## Examples
60
+
61
+ The following sections provide several code snippets covering some of the most common Purview Sharing scenarios, including:
62
+
63
+ - Get Recipient for a Given Sent Share
64
+
65
+ ```ts snippet:ReadmeSampleGetRecipientForAGivenSentShare
66
+ import PurviewSharingClient, { isUnexpected, paginate } from "@azure-rest/purview-sharing";
67
+ import { DefaultAzureCredential } from "@azure/identity";
68
+
69
+ const client = PurviewSharingClient(
70
+ "https://<my-account-name>.purview.azure.com",
71
+ new DefaultAzureCredential(),
72
+ );
73
+
74
+ const storageAccountResourceId = "<storage-account-resource-id>";
75
+ const options = {
76
+ queryParameters: {
77
+ referenceName: storageAccountResourceId,
78
+ },
79
+ };
80
+ const initialResponse = await client.path("/sentShares").get(options);
81
+ if (isUnexpected(initialResponse)) {
82
+ throw initialResponse.body.error;
83
+ }
84
+
85
+ const pageData = paginate(client, initialResponse);
86
+ for await (const sharedInvitationOutput of pageData) {
87
+ const sharedInvitationId = sharedInvitationOutput.id;
88
+ if (sharedInvitationId) {
89
+ const sentShareResponse = await client
90
+ .path("/sentShares/{sentShareId}", sharedInvitationId)
91
+ .get();
92
+
93
+ if (isUnexpected(sentShareResponse)) {
94
+ throw sentShareResponse.body.error;
95
+ }
96
+
97
+ const sentShareId = sentShareResponse.body.id;
98
+ if (sentShareId) {
99
+ const sentShareRecipientResponse = await client
100
+ .path(
101
+ "/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}",
102
+ sentShareId,
103
+ sharedInvitationId,
104
+ )
105
+ .get();
106
+
107
+ if (isUnexpected(sentShareRecipientResponse)) {
108
+ throw sentShareRecipientResponse.body.error;
109
+ }
110
+
111
+ const sentShareRecipientId = sentShareRecipientResponse.body.id;
112
+ console.log(`Sent Share Recipient Id: ${sentShareRecipientId}`);
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
47
118
  ## Troubleshooting
48
119
 
49
120
  ### Logging
50
121
 
51
122
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
52
123
 
53
- ```javascript
54
- const { setLogLevel } = require("@azure/logger");
124
+ ```ts snippet:SetLogLevel
125
+ import { setLogLevel } from "@azure/logger";
55
126
 
56
127
  setLogLevel("info");
57
128
  ```
@@ -0,0 +1,87 @@
1
+ import type { ReceivedSharesGetReceivedShareParameters, ReceivedSharesCreateOrReplaceParameters, ReceivedSharesDeleteReceivedShareParameters, ReceivedSharesGetAllAttachedReceivedSharesParameters, ReceivedSharesGetAllDetachedReceivedSharesParameters, ReceivedSharesActivateTenantEmailRegistrationParameters, ReceivedSharesRegisterTenantEmailRegistrationParameters, SentSharesGetAllSentSharesParameters, SentSharesGetSentShareParameters, SentSharesCreateOrReplaceParameters, SentSharesDeleteSentShareParameters, SentSharesGetAllSentShareInvitationsParameters, SentSharesGetSentShareInvitationParameters, SentSharesCreateSentShareInvitationParameters, SentSharesDeleteSentShareInvitationParameters, SentSharesNotifyUserSentShareInvitationParameters, ShareResourcesGetAllShareResourcesParameters } from "./parameters.js";
2
+ import type { ReceivedSharesGetReceivedShare200Response, ReceivedSharesGetReceivedShareDefaultResponse, ReceivedSharesCreateOrReplace200Response, ReceivedSharesCreateOrReplace201Response, ReceivedSharesCreateOrReplaceDefaultResponse, ReceivedSharesDeleteReceivedShare202Response, ReceivedSharesDeleteReceivedShareDefaultResponse, ReceivedSharesGetAllAttachedReceivedShares200Response, ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse, ReceivedSharesGetAllDetachedReceivedShares200Response, ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse, ReceivedSharesActivateTenantEmailRegistration200Response, ReceivedSharesActivateTenantEmailRegistrationDefaultResponse, ReceivedSharesRegisterTenantEmailRegistration200Response, ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse, SentSharesGetAllSentShares200Response, SentSharesGetAllSentSharesDefaultResponse, SentSharesGetSentShare200Response, SentSharesGetSentShareDefaultResponse, SentSharesCreateOrReplace200Response, SentSharesCreateOrReplace201Response, SentSharesCreateOrReplaceDefaultResponse, SentSharesDeleteSentShare202Response, SentSharesDeleteSentShareDefaultResponse, SentSharesGetAllSentShareInvitations200Response, SentSharesGetAllSentShareInvitationsDefaultResponse, SentSharesGetSentShareInvitation200Response, SentSharesGetSentShareInvitationDefaultResponse, SentSharesCreateSentShareInvitation201Response, SentSharesCreateSentShareInvitationDefaultResponse, SentSharesDeleteSentShareInvitation202Response, SentSharesDeleteSentShareInvitationDefaultResponse, SentSharesNotifyUserSentShareInvitation200Response, SentSharesNotifyUserSentShareInvitationDefaultResponse, ShareResourcesGetAllShareResources200Response, ShareResourcesGetAllShareResourcesDefaultResponse } from "./responses.js";
3
+ import type { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface ReceivedSharesGetReceivedShare {
5
+ /** Get a received share */
6
+ get(options?: ReceivedSharesGetReceivedShareParameters): StreamableMethod<ReceivedSharesGetReceivedShare200Response | ReceivedSharesGetReceivedShareDefaultResponse>;
7
+ /** Update changes to a received share */
8
+ put(options: ReceivedSharesCreateOrReplaceParameters): StreamableMethod<ReceivedSharesCreateOrReplace200Response | ReceivedSharesCreateOrReplace201Response | ReceivedSharesCreateOrReplaceDefaultResponse>;
9
+ /** Delete a received share */
10
+ delete(options?: ReceivedSharesDeleteReceivedShareParameters): StreamableMethod<ReceivedSharesDeleteReceivedShare202Response | ReceivedSharesDeleteReceivedShareDefaultResponse>;
11
+ }
12
+ export interface ReceivedSharesGetAllAttachedReceivedShares {
13
+ /** List attached received shares */
14
+ get(options: ReceivedSharesGetAllAttachedReceivedSharesParameters): StreamableMethod<ReceivedSharesGetAllAttachedReceivedShares200Response | ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse>;
15
+ }
16
+ export interface ReceivedSharesGetAllDetachedReceivedShares {
17
+ /** List detached received shares */
18
+ get(options?: ReceivedSharesGetAllDetachedReceivedSharesParameters): StreamableMethod<ReceivedSharesGetAllDetachedReceivedShares200Response | ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse>;
19
+ }
20
+ export interface ReceivedSharesActivateTenantEmailRegistration {
21
+ /** Activates the email registration for current tenant */
22
+ post(options: ReceivedSharesActivateTenantEmailRegistrationParameters): StreamableMethod<ReceivedSharesActivateTenantEmailRegistration200Response | ReceivedSharesActivateTenantEmailRegistrationDefaultResponse>;
23
+ }
24
+ export interface ReceivedSharesRegisterTenantEmailRegistration {
25
+ /** Register an email for the current tenant */
26
+ post(options?: ReceivedSharesRegisterTenantEmailRegistrationParameters): StreamableMethod<ReceivedSharesRegisterTenantEmailRegistration200Response | ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse>;
27
+ }
28
+ export interface SentSharesGetAllSentShares {
29
+ /** List sent shares */
30
+ get(options: SentSharesGetAllSentSharesParameters): StreamableMethod<SentSharesGetAllSentShares200Response | SentSharesGetAllSentSharesDefaultResponse>;
31
+ }
32
+ export interface SentSharesGetSentShare {
33
+ /** Get a sent share */
34
+ get(options?: SentSharesGetSentShareParameters): StreamableMethod<SentSharesGetSentShare200Response | SentSharesGetSentShareDefaultResponse>;
35
+ /** Create or replace a sent share */
36
+ put(options: SentSharesCreateOrReplaceParameters): StreamableMethod<SentSharesCreateOrReplace200Response | SentSharesCreateOrReplace201Response | SentSharesCreateOrReplaceDefaultResponse>;
37
+ /** Delete a sent share */
38
+ delete(options?: SentSharesDeleteSentShareParameters): StreamableMethod<SentSharesDeleteSentShare202Response | SentSharesDeleteSentShareDefaultResponse>;
39
+ }
40
+ export interface SentSharesGetAllSentShareInvitations {
41
+ /** List sent share recipients */
42
+ get(options?: SentSharesGetAllSentShareInvitationsParameters): StreamableMethod<SentSharesGetAllSentShareInvitations200Response | SentSharesGetAllSentShareInvitationsDefaultResponse>;
43
+ }
44
+ export interface SentSharesGetSentShareInvitation {
45
+ /** Get recipient for a given sent share */
46
+ get(options?: SentSharesGetSentShareInvitationParameters): StreamableMethod<SentSharesGetSentShareInvitation200Response | SentSharesGetSentShareInvitationDefaultResponse>;
47
+ /** Create a recipient for a given sent share */
48
+ put(options: SentSharesCreateSentShareInvitationParameters): StreamableMethod<SentSharesCreateSentShareInvitation201Response | SentSharesCreateSentShareInvitationDefaultResponse>;
49
+ /** Delete a sent share invitation */
50
+ delete(options?: SentSharesDeleteSentShareInvitationParameters): StreamableMethod<SentSharesDeleteSentShareInvitation202Response | SentSharesDeleteSentShareInvitationDefaultResponse>;
51
+ }
52
+ export interface SentSharesNotifyUserSentShareInvitation {
53
+ /** Notifies the user recipient of the sent share invitation, does not apply to service invitations. */
54
+ post(options?: SentSharesNotifyUserSentShareInvitationParameters): StreamableMethod<SentSharesNotifyUserSentShareInvitation200Response | SentSharesNotifyUserSentShareInvitationDefaultResponse>;
55
+ }
56
+ export interface ShareResourcesGetAllShareResources {
57
+ /** List share resources */
58
+ get(options?: ShareResourcesGetAllShareResourcesParameters): StreamableMethod<ShareResourcesGetAllShareResources200Response | ShareResourcesGetAllShareResourcesDefaultResponse>;
59
+ }
60
+ export interface Routes {
61
+ /** Resource for '/receivedShares/\{receivedShareId\}' has methods for the following verbs: get, put, delete */
62
+ (path: "/receivedShares/{receivedShareId}", receivedShareId: string): ReceivedSharesGetReceivedShare;
63
+ /** Resource for '/receivedShares/attached' has methods for the following verbs: get */
64
+ (path: "/receivedShares/attached"): ReceivedSharesGetAllAttachedReceivedShares;
65
+ /** Resource for '/receivedShares/detached' has methods for the following verbs: get */
66
+ (path: "/receivedShares/detached"): ReceivedSharesGetAllDetachedReceivedShares;
67
+ /** Resource for '/emails:activate' has methods for the following verbs: post */
68
+ (path: "/emails:activate"): ReceivedSharesActivateTenantEmailRegistration;
69
+ /** Resource for '/emails:register' has methods for the following verbs: post */
70
+ (path: "/emails:register"): ReceivedSharesRegisterTenantEmailRegistration;
71
+ /** Resource for '/sentShares' has methods for the following verbs: get */
72
+ (path: "/sentShares"): SentSharesGetAllSentShares;
73
+ /** Resource for '/sentShares/\{sentShareId\}' has methods for the following verbs: get, put, delete */
74
+ (path: "/sentShares/{sentShareId}", sentShareId: string): SentSharesGetSentShare;
75
+ /** Resource for '/sentShares/\{sentShareId\}/sentShareInvitations' has methods for the following verbs: get */
76
+ (path: "/sentShares/{sentShareId}/sentShareInvitations", sentShareId: string): SentSharesGetAllSentShareInvitations;
77
+ /** Resource for '/sentShares/\{sentShareId\}/sentShareInvitations/\{sentShareInvitationId\}' has methods for the following verbs: get, put, delete */
78
+ (path: "/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}", sentShareId: string, sentShareInvitationId: string): SentSharesGetSentShareInvitation;
79
+ /** Resource for '/sentShares/\{sentShareId\}/sentShareInvitations/\{sentShareInvitationId\}:notify' has methods for the following verbs: post */
80
+ (path: "/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify", sentShareId: string, sentShareInvitationId: string): SentSharesNotifyUserSentShareInvitation;
81
+ /** Resource for '/shareResources' has methods for the following verbs: get */
82
+ (path: "/shareResources"): ShareResourcesGetAllShareResources;
83
+ }
84
+ export type PurviewSharingClient = Client & {
85
+ path: Routes;
86
+ };
87
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wCAAwC,EACxC,uCAAuC,EACvC,2CAA2C,EAC3C,oDAAoD,EACpD,oDAAoD,EACpD,uDAAuD,EACvD,uDAAuD,EACvD,oCAAoC,EACpC,gCAAgC,EAChC,mCAAmC,EACnC,mCAAmC,EACnC,8CAA8C,EAC9C,0CAA0C,EAC1C,6CAA6C,EAC7C,6CAA6C,EAC7C,iDAAiD,EACjD,4CAA4C,EAC7C,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,yCAAyC,EACzC,6CAA6C,EAC7C,wCAAwC,EACxC,wCAAwC,EACxC,4CAA4C,EAC5C,4CAA4C,EAC5C,gDAAgD,EAChD,qDAAqD,EACrD,yDAAyD,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GAAG,kCAAkC,CAAC;CAC/D;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ReceivedSharesGetReceivedShareParameters,\n ReceivedSharesCreateOrReplaceParameters,\n ReceivedSharesDeleteReceivedShareParameters,\n ReceivedSharesGetAllAttachedReceivedSharesParameters,\n ReceivedSharesGetAllDetachedReceivedSharesParameters,\n ReceivedSharesActivateTenantEmailRegistrationParameters,\n ReceivedSharesRegisterTenantEmailRegistrationParameters,\n SentSharesGetAllSentSharesParameters,\n SentSharesGetSentShareParameters,\n SentSharesCreateOrReplaceParameters,\n SentSharesDeleteSentShareParameters,\n SentSharesGetAllSentShareInvitationsParameters,\n SentSharesGetSentShareInvitationParameters,\n SentSharesCreateSentShareInvitationParameters,\n SentSharesDeleteSentShareInvitationParameters,\n SentSharesNotifyUserSentShareInvitationParameters,\n ShareResourcesGetAllShareResourcesParameters,\n} from \"./parameters.js\";\nimport type {\n ReceivedSharesGetReceivedShare200Response,\n ReceivedSharesGetReceivedShareDefaultResponse,\n ReceivedSharesCreateOrReplace200Response,\n ReceivedSharesCreateOrReplace201Response,\n ReceivedSharesCreateOrReplaceDefaultResponse,\n ReceivedSharesDeleteReceivedShare202Response,\n ReceivedSharesDeleteReceivedShareDefaultResponse,\n ReceivedSharesGetAllAttachedReceivedShares200Response,\n ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse,\n ReceivedSharesGetAllDetachedReceivedShares200Response,\n ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse,\n ReceivedSharesActivateTenantEmailRegistration200Response,\n ReceivedSharesActivateTenantEmailRegistrationDefaultResponse,\n ReceivedSharesRegisterTenantEmailRegistration200Response,\n ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse,\n SentSharesGetAllSentShares200Response,\n SentSharesGetAllSentSharesDefaultResponse,\n SentSharesGetSentShare200Response,\n SentSharesGetSentShareDefaultResponse,\n SentSharesCreateOrReplace200Response,\n SentSharesCreateOrReplace201Response,\n SentSharesCreateOrReplaceDefaultResponse,\n SentSharesDeleteSentShare202Response,\n SentSharesDeleteSentShareDefaultResponse,\n SentSharesGetAllSentShareInvitations200Response,\n SentSharesGetAllSentShareInvitationsDefaultResponse,\n SentSharesGetSentShareInvitation200Response,\n SentSharesGetSentShareInvitationDefaultResponse,\n SentSharesCreateSentShareInvitation201Response,\n SentSharesCreateSentShareInvitationDefaultResponse,\n SentSharesDeleteSentShareInvitation202Response,\n SentSharesDeleteSentShareInvitationDefaultResponse,\n SentSharesNotifyUserSentShareInvitation200Response,\n SentSharesNotifyUserSentShareInvitationDefaultResponse,\n ShareResourcesGetAllShareResources200Response,\n ShareResourcesGetAllShareResourcesDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface ReceivedSharesGetReceivedShare {\n /** Get a received share */\n get(\n options?: ReceivedSharesGetReceivedShareParameters,\n ): StreamableMethod<\n ReceivedSharesGetReceivedShare200Response | ReceivedSharesGetReceivedShareDefaultResponse\n >;\n /** Update changes to a received share */\n put(\n options: ReceivedSharesCreateOrReplaceParameters,\n ): StreamableMethod<\n | ReceivedSharesCreateOrReplace200Response\n | ReceivedSharesCreateOrReplace201Response\n | ReceivedSharesCreateOrReplaceDefaultResponse\n >;\n /** Delete a received share */\n delete(\n options?: ReceivedSharesDeleteReceivedShareParameters,\n ): StreamableMethod<\n ReceivedSharesDeleteReceivedShare202Response | ReceivedSharesDeleteReceivedShareDefaultResponse\n >;\n}\n\nexport interface ReceivedSharesGetAllAttachedReceivedShares {\n /** List attached received shares */\n get(\n options: ReceivedSharesGetAllAttachedReceivedSharesParameters,\n ): StreamableMethod<\n | ReceivedSharesGetAllAttachedReceivedShares200Response\n | ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse\n >;\n}\n\nexport interface ReceivedSharesGetAllDetachedReceivedShares {\n /** List detached received shares */\n get(\n options?: ReceivedSharesGetAllDetachedReceivedSharesParameters,\n ): StreamableMethod<\n | ReceivedSharesGetAllDetachedReceivedShares200Response\n | ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse\n >;\n}\n\nexport interface ReceivedSharesActivateTenantEmailRegistration {\n /** Activates the email registration for current tenant */\n post(\n options: ReceivedSharesActivateTenantEmailRegistrationParameters,\n ): StreamableMethod<\n | ReceivedSharesActivateTenantEmailRegistration200Response\n | ReceivedSharesActivateTenantEmailRegistrationDefaultResponse\n >;\n}\n\nexport interface ReceivedSharesRegisterTenantEmailRegistration {\n /** Register an email for the current tenant */\n post(\n options?: ReceivedSharesRegisterTenantEmailRegistrationParameters,\n ): StreamableMethod<\n | ReceivedSharesRegisterTenantEmailRegistration200Response\n | ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse\n >;\n}\n\nexport interface SentSharesGetAllSentShares {\n /** List sent shares */\n get(\n options: SentSharesGetAllSentSharesParameters,\n ): StreamableMethod<\n SentSharesGetAllSentShares200Response | SentSharesGetAllSentSharesDefaultResponse\n >;\n}\n\nexport interface SentSharesGetSentShare {\n /** Get a sent share */\n get(\n options?: SentSharesGetSentShareParameters,\n ): StreamableMethod<SentSharesGetSentShare200Response | SentSharesGetSentShareDefaultResponse>;\n /** Create or replace a sent share */\n put(\n options: SentSharesCreateOrReplaceParameters,\n ): StreamableMethod<\n | SentSharesCreateOrReplace200Response\n | SentSharesCreateOrReplace201Response\n | SentSharesCreateOrReplaceDefaultResponse\n >;\n /** Delete a sent share */\n delete(\n options?: SentSharesDeleteSentShareParameters,\n ): StreamableMethod<\n SentSharesDeleteSentShare202Response | SentSharesDeleteSentShareDefaultResponse\n >;\n}\n\nexport interface SentSharesGetAllSentShareInvitations {\n /** List sent share recipients */\n get(\n options?: SentSharesGetAllSentShareInvitationsParameters,\n ): StreamableMethod<\n | SentSharesGetAllSentShareInvitations200Response\n | SentSharesGetAllSentShareInvitationsDefaultResponse\n >;\n}\n\nexport interface SentSharesGetSentShareInvitation {\n /** Get recipient for a given sent share */\n get(\n options?: SentSharesGetSentShareInvitationParameters,\n ): StreamableMethod<\n SentSharesGetSentShareInvitation200Response | SentSharesGetSentShareInvitationDefaultResponse\n >;\n /** Create a recipient for a given sent share */\n put(\n options: SentSharesCreateSentShareInvitationParameters,\n ): StreamableMethod<\n | SentSharesCreateSentShareInvitation201Response\n | SentSharesCreateSentShareInvitationDefaultResponse\n >;\n /** Delete a sent share invitation */\n delete(\n options?: SentSharesDeleteSentShareInvitationParameters,\n ): StreamableMethod<\n | SentSharesDeleteSentShareInvitation202Response\n | SentSharesDeleteSentShareInvitationDefaultResponse\n >;\n}\n\nexport interface SentSharesNotifyUserSentShareInvitation {\n /** Notifies the user recipient of the sent share invitation, does not apply to service invitations. */\n post(\n options?: SentSharesNotifyUserSentShareInvitationParameters,\n ): StreamableMethod<\n | SentSharesNotifyUserSentShareInvitation200Response\n | SentSharesNotifyUserSentShareInvitationDefaultResponse\n >;\n}\n\nexport interface ShareResourcesGetAllShareResources {\n /** List share resources */\n get(\n options?: ShareResourcesGetAllShareResourcesParameters,\n ): StreamableMethod<\n | ShareResourcesGetAllShareResources200Response\n | ShareResourcesGetAllShareResourcesDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/receivedShares/\\{receivedShareId\\}' has methods for the following verbs: get, put, delete */\n (\n path: \"/receivedShares/{receivedShareId}\",\n receivedShareId: string,\n ): ReceivedSharesGetReceivedShare;\n /** Resource for '/receivedShares/attached' has methods for the following verbs: get */\n (path: \"/receivedShares/attached\"): ReceivedSharesGetAllAttachedReceivedShares;\n /** Resource for '/receivedShares/detached' has methods for the following verbs: get */\n (path: \"/receivedShares/detached\"): ReceivedSharesGetAllDetachedReceivedShares;\n /** Resource for '/emails:activate' has methods for the following verbs: post */\n (path: \"/emails:activate\"): ReceivedSharesActivateTenantEmailRegistration;\n /** Resource for '/emails:register' has methods for the following verbs: post */\n (path: \"/emails:register\"): ReceivedSharesRegisterTenantEmailRegistration;\n /** Resource for '/sentShares' has methods for the following verbs: get */\n (path: \"/sentShares\"): SentSharesGetAllSentShares;\n /** Resource for '/sentShares/\\{sentShareId\\}' has methods for the following verbs: get, put, delete */\n (path: \"/sentShares/{sentShareId}\", sentShareId: string): SentSharesGetSentShare;\n /** Resource for '/sentShares/\\{sentShareId\\}/sentShareInvitations' has methods for the following verbs: get */\n (\n path: \"/sentShares/{sentShareId}/sentShareInvitations\",\n sentShareId: string,\n ): SentSharesGetAllSentShareInvitations;\n /** Resource for '/sentShares/\\{sentShareId\\}/sentShareInvitations/\\{sentShareInvitationId\\}' has methods for the following verbs: get, put, delete */\n (\n path: \"/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}\",\n sentShareId: string,\n sentShareInvitationId: string,\n ): SentSharesGetSentShareInvitation;\n /** Resource for '/sentShares/\\{sentShareId\\}/sentShareInvitations/\\{sentShareInvitationId\\}:notify' has methods for the following verbs: post */\n (\n path: \"/sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify\",\n sentShareId: string,\n sentShareInvitationId: string,\n ): SentSharesNotifyUserSentShareInvitation;\n /** Resource for '/shareResources' has methods for the following verbs: get */\n (path: \"/shareResources\"): ShareResourcesGetAllShareResources;\n}\n\nexport type PurviewSharingClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import PurviewSharing from "./purviewSharing.js";
2
+ export * from "./purviewSharing.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./models.js";
8
+ export * from "./outputModels.js";
9
+ export * from "./paginateHelper.js";
10
+ export * from "./pollingHelper.js";
11
+ export default PurviewSharing;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AAGnC,eAAe,cAAc,CAAC"}
@@ -0,0 +1,15 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import PurviewSharing from "./purviewSharing.js";
4
+ export * from "./purviewSharing.js";
5
+ export * from "./parameters.js";
6
+ export * from "./responses.js";
7
+ export * from "./clientDefinitions.js";
8
+ export * from "./isUnexpected.js";
9
+ export * from "./models.js";
10
+ export * from "./outputModels.js";
11
+ export * from "./paginateHelper.js";
12
+ export * from "./pollingHelper.js";
13
+ // eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named
14
+ export default PurviewSharing;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AAEnC,kEAAkE;AAClE,eAAe,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport PurviewSharing from \"./purviewSharing.js\";\n\nexport * from \"./purviewSharing.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./paginateHelper.js\";\nexport * from \"./pollingHelper.js\";\n\n// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named\nexport default PurviewSharing;\n"]}
@@ -0,0 +1,19 @@
1
+ import type { ReceivedSharesGetReceivedShare200Response, ReceivedSharesGetReceivedShareDefaultResponse, ReceivedSharesCreateOrReplace200Response, ReceivedSharesCreateOrReplace201Response, ReceivedSharesCreateOrReplaceDefaultResponse, ReceivedSharesDeleteReceivedShare202Response, ReceivedSharesDeleteReceivedShareDefaultResponse, ReceivedSharesGetAllAttachedReceivedShares200Response, ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse, ReceivedSharesGetAllDetachedReceivedShares200Response, ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse, ReceivedSharesActivateTenantEmailRegistration200Response, ReceivedSharesActivateTenantEmailRegistrationDefaultResponse, ReceivedSharesRegisterTenantEmailRegistration200Response, ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse, SentSharesGetAllSentShares200Response, SentSharesGetAllSentSharesDefaultResponse, SentSharesGetSentShare200Response, SentSharesGetSentShareDefaultResponse, SentSharesCreateOrReplace200Response, SentSharesCreateOrReplace201Response, SentSharesCreateOrReplaceDefaultResponse, SentSharesDeleteSentShare202Response, SentSharesDeleteSentShareDefaultResponse, SentSharesGetAllSentShareInvitations200Response, SentSharesGetAllSentShareInvitationsDefaultResponse, SentSharesGetSentShareInvitation200Response, SentSharesGetSentShareInvitationDefaultResponse, SentSharesCreateSentShareInvitation201Response, SentSharesCreateSentShareInvitationDefaultResponse, SentSharesDeleteSentShareInvitation202Response, SentSharesDeleteSentShareInvitationDefaultResponse, SentSharesNotifyUserSentShareInvitation200Response, SentSharesNotifyUserSentShareInvitationDefaultResponse, ShareResourcesGetAllShareResources200Response, ShareResourcesGetAllShareResourcesDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: ReceivedSharesGetReceivedShare200Response | ReceivedSharesGetReceivedShareDefaultResponse): response is ReceivedSharesGetReceivedShareDefaultResponse;
3
+ export declare function isUnexpected(response: ReceivedSharesCreateOrReplace200Response | ReceivedSharesCreateOrReplace201Response | ReceivedSharesCreateOrReplaceDefaultResponse): response is ReceivedSharesCreateOrReplaceDefaultResponse;
4
+ export declare function isUnexpected(response: ReceivedSharesDeleteReceivedShare202Response | ReceivedSharesDeleteReceivedShareDefaultResponse): response is ReceivedSharesDeleteReceivedShareDefaultResponse;
5
+ export declare function isUnexpected(response: ReceivedSharesGetAllAttachedReceivedShares200Response | ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse): response is ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse;
6
+ export declare function isUnexpected(response: ReceivedSharesGetAllDetachedReceivedShares200Response | ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse): response is ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse;
7
+ export declare function isUnexpected(response: ReceivedSharesActivateTenantEmailRegistration200Response | ReceivedSharesActivateTenantEmailRegistrationDefaultResponse): response is ReceivedSharesActivateTenantEmailRegistrationDefaultResponse;
8
+ export declare function isUnexpected(response: ReceivedSharesRegisterTenantEmailRegistration200Response | ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse): response is ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse;
9
+ export declare function isUnexpected(response: SentSharesGetAllSentShares200Response | SentSharesGetAllSentSharesDefaultResponse): response is SentSharesGetAllSentSharesDefaultResponse;
10
+ export declare function isUnexpected(response: SentSharesGetSentShare200Response | SentSharesGetSentShareDefaultResponse): response is SentSharesGetSentShareDefaultResponse;
11
+ export declare function isUnexpected(response: SentSharesCreateOrReplace200Response | SentSharesCreateOrReplace201Response | SentSharesCreateOrReplaceDefaultResponse): response is SentSharesCreateOrReplaceDefaultResponse;
12
+ export declare function isUnexpected(response: SentSharesDeleteSentShare202Response | SentSharesDeleteSentShareDefaultResponse): response is SentSharesDeleteSentShareDefaultResponse;
13
+ export declare function isUnexpected(response: SentSharesGetAllSentShareInvitations200Response | SentSharesGetAllSentShareInvitationsDefaultResponse): response is SentSharesGetAllSentShareInvitationsDefaultResponse;
14
+ export declare function isUnexpected(response: SentSharesGetSentShareInvitation200Response | SentSharesGetSentShareInvitationDefaultResponse): response is SentSharesGetSentShareInvitationDefaultResponse;
15
+ export declare function isUnexpected(response: SentSharesCreateSentShareInvitation201Response | SentSharesCreateSentShareInvitationDefaultResponse): response is SentSharesCreateSentShareInvitationDefaultResponse;
16
+ export declare function isUnexpected(response: SentSharesDeleteSentShareInvitation202Response | SentSharesDeleteSentShareInvitationDefaultResponse): response is SentSharesDeleteSentShareInvitationDefaultResponse;
17
+ export declare function isUnexpected(response: SentSharesNotifyUserSentShareInvitation200Response | SentSharesNotifyUserSentShareInvitationDefaultResponse): response is SentSharesNotifyUserSentShareInvitationDefaultResponse;
18
+ export declare function isUnexpected(response: ShareResourcesGetAllShareResources200Response | ShareResourcesGetAllShareResourcesDefaultResponse): response is ShareResourcesGetAllShareResourcesDefaultResponse;
19
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,yCAAyC,EACzC,6CAA6C,EAC7C,wCAAwC,EACxC,wCAAwC,EACxC,4CAA4C,EAC5C,4CAA4C,EAC5C,gDAAgD,EAChD,qDAAqD,EACrD,yDAAyD,EACzD,qDAAqD,EACrD,yDAAyD,EACzD,wDAAwD,EACxD,4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C,GAAG,qCAAqC,GAClF,QAAQ,IAAI,qCAAqC,CAAC;AACrD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,oCAAoC,GACpC,oCAAoC,GACpC,wCAAwC,GAC3C,QAAQ,IAAI,wCAAwC,CAAC;AACxD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,oCAAoC,GAAG,wCAAwC,GACxF,QAAQ,IAAI,wCAAwC,CAAC;AACxD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,+CAA+C,GAC/C,mDAAmD,GACtD,QAAQ,IAAI,mDAAmD,CAAC;AACnE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,2CAA2C,GAC3C,+CAA+C,GAClD,QAAQ,IAAI,+CAA+C,CAAC;AAC/D,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,8CAA8C,GAC9C,kDAAkD,GACrD,QAAQ,IAAI,kDAAkD,CAAC;AAClE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,8CAA8C,GAC9C,kDAAkD,GACrD,QAAQ,IAAI,kDAAkD,CAAC;AAClE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,kDAAkD,GAClD,sDAAsD,GACzD,QAAQ,IAAI,sDAAsD,CAAC;AACtE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,6CAA6C,GAC7C,iDAAiD,GACpD,QAAQ,IAAI,iDAAiD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  const responseMap = {
4
4
  "GET /receivedShares/{receivedShareId}": ["200"],
5
5
  "PUT /receivedShares/{receivedShareId}": ["200", "201"],
@@ -17,10 +17,11 @@ const responseMap = {
17
17
  "PUT /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}": ["201"],
18
18
  "DELETE /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}": ["202"],
19
19
  "POST /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify": ["200"],
20
+ "GET /shareResources": ["200"],
20
21
  };
21
22
  export function isUnexpected(response) {
22
23
  const lroOriginal = response.headers["x-ms-original-url"];
23
- const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
24
+ const url = new URL(lroOriginal ?? response.request.url);
24
25
  const method = response.request.method;
25
26
  let pathDetails = responseMap[`${method} ${url.pathname}`];
26
27
  if (!pathDetails) {
@@ -29,7 +30,6 @@ export function isUnexpected(response) {
29
30
  return !pathDetails.includes(response.status);
30
31
  }
31
32
  function getParametrizedPathSuccess(method, path) {
32
- var _a, _b, _c, _d;
33
33
  const pathParts = path.split("/");
34
34
  // Traverse list to match the longest candidate
35
35
  // matchedLen: the length of candidate path
@@ -48,13 +48,13 @@ function getParametrizedPathSuccess(method, path) {
48
48
  // track if we have found a match to return the values found.
49
49
  let found = true;
50
50
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
51
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
52
- const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
51
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
52
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
53
53
  // If the current part of the candidate is a "template" part
54
54
  // Try to use the suffix of pattern to match the path
55
55
  // {guid} ==> $
56
56
  // {guid}:export ==> :export$
57
- const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
57
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
58
58
  if (!isMatched) {
59
59
  found = false;
60
60
  break;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","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,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ReceivedSharesGetReceivedShare200Response,\n ReceivedSharesGetReceivedShareDefaultResponse,\n ReceivedSharesCreateOrReplace200Response,\n ReceivedSharesCreateOrReplace201Response,\n ReceivedSharesCreateOrReplaceDefaultResponse,\n ReceivedSharesDeleteReceivedShare202Response,\n ReceivedSharesDeleteReceivedShareDefaultResponse,\n ReceivedSharesGetAllAttachedReceivedShares200Response,\n ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse,\n ReceivedSharesGetAllDetachedReceivedShares200Response,\n ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse,\n ReceivedSharesActivateTenantEmailRegistration200Response,\n ReceivedSharesActivateTenantEmailRegistrationDefaultResponse,\n ReceivedSharesRegisterTenantEmailRegistration200Response,\n ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse,\n SentSharesGetAllSentShares200Response,\n SentSharesGetAllSentSharesDefaultResponse,\n SentSharesGetSentShare200Response,\n SentSharesGetSentShareDefaultResponse,\n SentSharesCreateOrReplace200Response,\n SentSharesCreateOrReplace201Response,\n SentSharesCreateOrReplaceDefaultResponse,\n SentSharesDeleteSentShare202Response,\n SentSharesDeleteSentShareDefaultResponse,\n SentSharesGetAllSentShareInvitations200Response,\n SentSharesGetAllSentShareInvitationsDefaultResponse,\n SentSharesGetSentShareInvitation200Response,\n SentSharesGetSentShareInvitationDefaultResponse,\n SentSharesCreateSentShareInvitation201Response,\n SentSharesCreateSentShareInvitationDefaultResponse,\n SentSharesDeleteSentShareInvitation202Response,\n SentSharesDeleteSentShareInvitationDefaultResponse,\n SentSharesNotifyUserSentShareInvitation200Response,\n SentSharesNotifyUserSentShareInvitationDefaultResponse,\n ShareResourcesGetAllShareResources200Response,\n ShareResourcesGetAllShareResourcesDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /receivedShares/{receivedShareId}\": [\"200\"],\n \"PUT /receivedShares/{receivedShareId}\": [\"200\", \"201\"],\n \"DELETE /receivedShares/{receivedShareId}\": [\"202\"],\n \"GET /receivedShares/attached\": [\"200\"],\n \"GET /receivedShares/detached\": [\"200\"],\n \"POST /emails:activate\": [\"200\"],\n \"POST /emails:register\": [\"200\"],\n \"GET /sentShares\": [\"200\"],\n \"GET /sentShares/{sentShareId}\": [\"200\"],\n \"PUT /sentShares/{sentShareId}\": [\"200\", \"201\"],\n \"DELETE /sentShares/{sentShareId}\": [\"202\"],\n \"GET /sentShares/{sentShareId}/sentShareInvitations\": [\"200\"],\n \"GET /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}\": [\"200\"],\n \"PUT /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}\": [\"201\"],\n \"DELETE /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}\": [\"202\"],\n \"POST /sentShares/{sentShareId}/sentShareInvitations/{sentShareInvitationId}:notify\": [\"200\"],\n \"GET /shareResources\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | ReceivedSharesGetReceivedShare200Response\n | ReceivedSharesGetReceivedShareDefaultResponse,\n): response is ReceivedSharesGetReceivedShareDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesCreateOrReplace200Response\n | ReceivedSharesCreateOrReplace201Response\n | ReceivedSharesCreateOrReplaceDefaultResponse,\n): response is ReceivedSharesCreateOrReplaceDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesDeleteReceivedShare202Response\n | ReceivedSharesDeleteReceivedShareDefaultResponse,\n): response is ReceivedSharesDeleteReceivedShareDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesGetAllAttachedReceivedShares200Response\n | ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse,\n): response is ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesGetAllDetachedReceivedShares200Response\n | ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse,\n): response is ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesActivateTenantEmailRegistration200Response\n | ReceivedSharesActivateTenantEmailRegistrationDefaultResponse,\n): response is ReceivedSharesActivateTenantEmailRegistrationDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesRegisterTenantEmailRegistration200Response\n | ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse,\n): response is ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse;\nexport function isUnexpected(\n response: SentSharesGetAllSentShares200Response | SentSharesGetAllSentSharesDefaultResponse,\n): response is SentSharesGetAllSentSharesDefaultResponse;\nexport function isUnexpected(\n response: SentSharesGetSentShare200Response | SentSharesGetSentShareDefaultResponse,\n): response is SentSharesGetSentShareDefaultResponse;\nexport function isUnexpected(\n response:\n | SentSharesCreateOrReplace200Response\n | SentSharesCreateOrReplace201Response\n | SentSharesCreateOrReplaceDefaultResponse,\n): response is SentSharesCreateOrReplaceDefaultResponse;\nexport function isUnexpected(\n response: SentSharesDeleteSentShare202Response | SentSharesDeleteSentShareDefaultResponse,\n): response is SentSharesDeleteSentShareDefaultResponse;\nexport function isUnexpected(\n response:\n | SentSharesGetAllSentShareInvitations200Response\n | SentSharesGetAllSentShareInvitationsDefaultResponse,\n): response is SentSharesGetAllSentShareInvitationsDefaultResponse;\nexport function isUnexpected(\n response:\n | SentSharesGetSentShareInvitation200Response\n | SentSharesGetSentShareInvitationDefaultResponse,\n): response is SentSharesGetSentShareInvitationDefaultResponse;\nexport function isUnexpected(\n response:\n | SentSharesCreateSentShareInvitation201Response\n | SentSharesCreateSentShareInvitationDefaultResponse,\n): response is SentSharesCreateSentShareInvitationDefaultResponse;\nexport function isUnexpected(\n response:\n | SentSharesDeleteSentShareInvitation202Response\n | SentSharesDeleteSentShareInvitationDefaultResponse,\n): response is SentSharesDeleteSentShareInvitationDefaultResponse;\nexport function isUnexpected(\n response:\n | SentSharesNotifyUserSentShareInvitation200Response\n | SentSharesNotifyUserSentShareInvitationDefaultResponse,\n): response is SentSharesNotifyUserSentShareInvitationDefaultResponse;\nexport function isUnexpected(\n response:\n | ShareResourcesGetAllShareResources200Response\n | ShareResourcesGetAllShareResourcesDefaultResponse,\n): response is ShareResourcesGetAllShareResourcesDefaultResponse;\nexport function isUnexpected(\n response:\n | ReceivedSharesGetReceivedShare200Response\n | ReceivedSharesGetReceivedShareDefaultResponse\n | ReceivedSharesCreateOrReplace200Response\n | ReceivedSharesCreateOrReplace201Response\n | ReceivedSharesCreateOrReplaceDefaultResponse\n | ReceivedSharesDeleteReceivedShare202Response\n | ReceivedSharesDeleteReceivedShareDefaultResponse\n | ReceivedSharesGetAllAttachedReceivedShares200Response\n | ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse\n | ReceivedSharesGetAllDetachedReceivedShares200Response\n | ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse\n | ReceivedSharesActivateTenantEmailRegistration200Response\n | ReceivedSharesActivateTenantEmailRegistrationDefaultResponse\n | ReceivedSharesRegisterTenantEmailRegistration200Response\n | ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse\n | SentSharesGetAllSentShares200Response\n | SentSharesGetAllSentSharesDefaultResponse\n | SentSharesGetSentShare200Response\n | SentSharesGetSentShareDefaultResponse\n | SentSharesCreateOrReplace200Response\n | SentSharesCreateOrReplace201Response\n | SentSharesCreateOrReplaceDefaultResponse\n | SentSharesDeleteSentShare202Response\n | SentSharesDeleteSentShareDefaultResponse\n | SentSharesGetAllSentShareInvitations200Response\n | SentSharesGetAllSentShareInvitationsDefaultResponse\n | SentSharesGetSentShareInvitation200Response\n | SentSharesGetSentShareInvitationDefaultResponse\n | SentSharesCreateSentShareInvitation201Response\n | SentSharesCreateSentShareInvitationDefaultResponse\n | SentSharesDeleteSentShareInvitation202Response\n | SentSharesDeleteSentShareInvitationDefaultResponse\n | SentSharesNotifyUserSentShareInvitation200Response\n | SentSharesNotifyUserSentShareInvitationDefaultResponse\n | ShareResourcesGetAllShareResources200Response\n | ShareResourcesGetAllShareResourcesDefaultResponse,\n): response is\n | ReceivedSharesGetReceivedShareDefaultResponse\n | ReceivedSharesCreateOrReplaceDefaultResponse\n | ReceivedSharesDeleteReceivedShareDefaultResponse\n | ReceivedSharesGetAllAttachedReceivedSharesDefaultResponse\n | ReceivedSharesGetAllDetachedReceivedSharesDefaultResponse\n | ReceivedSharesActivateTenantEmailRegistrationDefaultResponse\n | ReceivedSharesRegisterTenantEmailRegistrationDefaultResponse\n | SentSharesGetAllSentSharesDefaultResponse\n | SentSharesGetSentShareDefaultResponse\n | SentSharesCreateOrReplaceDefaultResponse\n | SentSharesDeleteSentShareDefaultResponse\n | SentSharesGetAllSentShareInvitationsDefaultResponse\n | SentSharesGetSentShareInvitationDefaultResponse\n | SentSharesCreateSentShareInvitationDefaultResponse\n | SentSharesDeleteSentShareInvitationDefaultResponse\n | SentSharesNotifyUserSentShareInvitationDefaultResponse\n | ShareResourcesGetAllShareResourcesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAwC,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createClientLogger } from "@azure/logger";
4
+ export const logger = createClientLogger("purview-sharing");
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"purview-sharing\");\n"]}