@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
@@ -0,0 +1,352 @@
1
+ /** A received share data transfer object. */
2
+ export interface ReceivedShareOutputParent extends ProxyResourceOutput {
3
+ shareKind: "ReceivedShare" | "InPlace";
4
+ }
5
+ /** Base data transfer object implementation for proxy resources. */
6
+ export interface ProxyResourceOutput {
7
+ /** The unique id of the resource. */
8
+ readonly id?: string;
9
+ /** Type of the resource. */
10
+ readonly type?: string;
11
+ }
12
+ /** The purview share error model. */
13
+ export interface PurviewShareErrorOutput {
14
+ /** The purview share error body model. */
15
+ error: PurviewShareErrorInfoOutput;
16
+ }
17
+ /** The purview share error body model. */
18
+ export interface PurviewShareErrorInfoOutput {
19
+ /** Code of the error */
20
+ code: string;
21
+ /** Nested details of the error model */
22
+ details?: Array<PurviewShareErrorInfoOutput>;
23
+ /** Message of the error */
24
+ message: string;
25
+ /** Target of the error */
26
+ target?: string;
27
+ }
28
+ /** Response for long running operation. */
29
+ export interface OperationResponseOutput {
30
+ /** End time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
31
+ endTime?: string;
32
+ /** The purview share error body model. */
33
+ error?: PurviewShareErrorInfoOutput;
34
+ /** Job id of the long running operation */
35
+ id?: string;
36
+ /** Start time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
37
+ startTime?: string;
38
+ /** States for long running operations. */
39
+ status: "Running" | "TransientFailure" | "Succeeded" | "Failed" | "NotStarted";
40
+ }
41
+ /** List of received shares. */
42
+ export interface ReceivedShareListOutput {
43
+ /**
44
+ * The Url of next result page.
45
+ *
46
+ * Value may contain a URL
47
+ */
48
+ nextLink?: string;
49
+ /** Collection of items of type ReceivedShare */
50
+ value: Array<ReceivedShareOutput>;
51
+ }
52
+ /** List of sent shares. */
53
+ export interface SentShareListOutput {
54
+ /**
55
+ * The Url of next result page.
56
+ *
57
+ * Value may contain a URL
58
+ */
59
+ nextLink?: string;
60
+ /** Collection of items of type SentShare */
61
+ value: Array<SentShareOutput>;
62
+ }
63
+ /** A sent share data transfer object. */
64
+ export interface SentShareOutputParent extends ProxyResourceOutput {
65
+ shareKind: "SentShare" | "InPlace";
66
+ }
67
+ /** List of the sent share invitations */
68
+ export interface SentShareInvitationListOutput {
69
+ /**
70
+ * The Url of next result page.
71
+ *
72
+ * Value may contain a URL
73
+ */
74
+ nextLink?: string;
75
+ /** Collection of items of type SentShareInvitation */
76
+ value: Array<SentShareInvitationOutput>;
77
+ }
78
+ /** A sent share invitation data transfer object. */
79
+ export interface SentShareInvitationOutputParent extends ProxyResourceOutput {
80
+ invitationKind: "SentShareInvitation" | "Service" | "User";
81
+ }
82
+ /** A page of ShareResource results. */
83
+ export interface ShareResourceListOutput {
84
+ /**
85
+ * The Url of next result page.
86
+ *
87
+ * Value may contain a URL
88
+ */
89
+ nextLink?: string;
90
+ /** Collection of items of type ShareResource */
91
+ value: Array<ShareResourceOutput>;
92
+ }
93
+ /** A share resource. */
94
+ export interface ShareResourceOutput extends ProxyResourceOutput {
95
+ /** A count of Received Shares associated with the Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. */
96
+ receivedSharesCount?: number;
97
+ /** A count of Sent Shares associated with the Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. */
98
+ sentSharesCount?: number;
99
+ /** The types of asset. */
100
+ storeKind?: "AdlsGen2Account" | "BlobAccount";
101
+ /** A Store Reference for an artifact or sink. */
102
+ storeReference?: StoreReferenceOutput;
103
+ }
104
+ /** A Store Reference for an artifact or sink. */
105
+ export interface StoreReferenceOutput {
106
+ /** Reference name for resource associated with the sink or artifact. */
107
+ referenceName?: string;
108
+ /** Defines the type of resource being shared */
109
+ type?: "ArmResourceReference";
110
+ }
111
+ /** A tenant email registration data transfer object. */
112
+ export interface TenantEmailRegistrationOutput extends ProxyResourceOutput {
113
+ /** Tenant email registration property bag. */
114
+ properties?: TenantEmailRegistrationPropertiesOutput;
115
+ }
116
+ /** Tenant email registration property bag. */
117
+ export interface TenantEmailRegistrationPropertiesOutput {
118
+ /** Activation code for the registration. */
119
+ activationCode: string;
120
+ /** Date of the activation expiration. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
121
+ readonly activationExpiration?: string;
122
+ /** The email to register. */
123
+ readonly email?: string;
124
+ /** Defines the supported types for registration. */
125
+ readonly registrationStatus?: "ActivationPending" | "Activated" | "ActivationAttemptsExhausted";
126
+ /** State of the resource */
127
+ readonly state?: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed";
128
+ /** The tenant id to register. */
129
+ readonly tenantId?: string;
130
+ }
131
+ /** AdlsGen2 Sink */
132
+ export interface AdlsGen2AccountSinkOutput extends SinkOutputParent {
133
+ /** Properties for AdlsGen2 storage account */
134
+ properties: AdlsGen2AccountSinkPropertiesOutput;
135
+ storeKind: "AdlsGen2Account";
136
+ }
137
+ /** Properties for AdlsGen2 storage account */
138
+ export interface AdlsGen2AccountSinkPropertiesOutput {
139
+ /** Adls Gen 2 Container Name */
140
+ containerName: string;
141
+ /** Adls Gen 2 Folder */
142
+ folder: string;
143
+ /** Adls Gen 2 Location */
144
+ readonly location?: string;
145
+ /** Adls Gen 2 Mount Path */
146
+ mountPath?: string;
147
+ }
148
+ /** Holds details on the destination of the mapped artifact */
149
+ export interface SinkOutputParent {
150
+ /** A Store Reference for an artifact or sink. */
151
+ storeReference: StoreReferenceOutput;
152
+ storeKind: "Sink" | "AdlsGen2Account" | "BlobAccount";
153
+ }
154
+ /** An Adls Gen2 storage account artifact. */
155
+ export interface AdlsGen2ArtifactOutput extends ArtifactOutputParent {
156
+ /** Properties for Adls Gen2 storage account. */
157
+ properties: AdlsGen2ArtifactPropertiesOutput;
158
+ storeKind: "AdlsGen2Account";
159
+ }
160
+ /** Properties for Adls Gen2 storage account. */
161
+ export interface AdlsGen2ArtifactPropertiesOutput {
162
+ /** Location of the storage account. */
163
+ readonly location?: string;
164
+ /** A list of Adls Gen2 storage account paths. */
165
+ paths: Array<StorageAccountPathOutput>;
166
+ }
167
+ /** Defines a single StorageAccountPath path */
168
+ export interface StorageAccountPathOutput {
169
+ /** Gets or sets the container name */
170
+ containerName: string;
171
+ /** Gets or sets the path on the receiver side where the artifact is to be mapped */
172
+ receiverPath?: string;
173
+ /** Gets or sets the path to file/folder within the container to be shared */
174
+ senderPath?: string;
175
+ }
176
+ /** A class for sent share artifact. */
177
+ export interface ArtifactOutputParent {
178
+ /** A Store Reference for an artifact or sink. */
179
+ storeReference: StoreReferenceOutput;
180
+ storeKind: "Artifact" | "AdlsGen2Account" | "BlobAccount";
181
+ }
182
+ /** Blob Sink */
183
+ export interface BlobAccountSinkOutput extends SinkOutputParent {
184
+ /** Properties for blob storage account */
185
+ properties: BlobAccountSinkPropertiesOutput;
186
+ storeKind: "BlobAccount";
187
+ }
188
+ /** Properties for blob storage account */
189
+ export interface BlobAccountSinkPropertiesOutput {
190
+ /** Blob Container Name */
191
+ containerName: string;
192
+ /** Blob Folder */
193
+ folder: string;
194
+ /** Blob Location */
195
+ readonly location?: string;
196
+ /** Blob Mount Path */
197
+ mountPath?: string;
198
+ }
199
+ /** Blob storage account artifact. */
200
+ export interface BlobStorageArtifactOutput extends ArtifactOutputParent {
201
+ /** Properties for blob storage account. */
202
+ properties: BlobStorageArtifactPropertiesOutput;
203
+ storeKind: "BlobAccount";
204
+ }
205
+ /** Properties for blob storage account. */
206
+ export interface BlobStorageArtifactPropertiesOutput {
207
+ /** Location of the storage account. */
208
+ readonly location?: string;
209
+ /** A list of blob storage account paths. */
210
+ paths: Array<StorageAccountPathOutput>;
211
+ }
212
+ /** An InPlace received share kind. */
213
+ export interface InPlaceReceivedShareOutput extends ReceivedShareOutputParent {
214
+ /** Properties of in place received share. */
215
+ properties: InPlaceReceivedSharePropertiesOutput;
216
+ shareKind: "InPlace";
217
+ }
218
+ /** Properties of in place received share. */
219
+ export interface InPlaceReceivedSharePropertiesOutput {
220
+ /** Location of the shared Asset. */
221
+ readonly assetLocation?: string;
222
+ /** The types of asset. */
223
+ assetStoreKind?: "AdlsGen2Account" | "BlobAccount";
224
+ /** Time at which the received share was created. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
225
+ readonly createdAt?: string;
226
+ /** Received Share Name */
227
+ displayName?: string;
228
+ /** The expiration date of the received share. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
229
+ readonly expirationDate?: string;
230
+ /** Email of the user/receiver who received the sent share invitation */
231
+ readonly receiverEmail?: string;
232
+ /** Name of the user/receiver who received the sent share invitation */
233
+ readonly receiverName?: string;
234
+ /** Tenant name of the user/receiver who received the sent share invitation */
235
+ readonly receiverTenantName?: string;
236
+ /** Email of the sender who created the sent share invitation */
237
+ readonly senderEmail?: string;
238
+ /** Name of the sender who created the sent share invitation */
239
+ readonly senderName?: string;
240
+ /** Tenant name of the sender who created the sent share invitation */
241
+ readonly senderTenantName?: string;
242
+ /** Share description. */
243
+ readonly sentShareDescription?: string;
244
+ /** Time at which the sent share was shared. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
245
+ readonly sharedAt?: string;
246
+ /** Share status. */
247
+ shareStatus?: "Detached" | "Attached";
248
+ /** Holds details on the destination of the mapped artifact */
249
+ sink?: SinkOutput;
250
+ /** State of the resource */
251
+ readonly state?: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed";
252
+ }
253
+ /** An InPlace share kind. */
254
+ export interface InPlaceSentShareOutput extends SentShareOutputParent {
255
+ /** Properties for InPlace sent share. */
256
+ properties: InPlaceSentSharePropertiesOutput;
257
+ shareKind: "InPlace";
258
+ }
259
+ /** Properties for InPlace sent share. */
260
+ export interface InPlaceSentSharePropertiesOutput {
261
+ /** A class for sent share artifact. */
262
+ artifact: ArtifactOutput;
263
+ /** Time at which the sent share was created. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
264
+ readonly createdAt?: string;
265
+ /** List of shares on which the sent share depends. */
266
+ readonly dependsOn?: Array<string>;
267
+ /** Sent share description. */
268
+ description?: string;
269
+ /** The name of the sent share */
270
+ displayName: string;
271
+ /** Email of the sender who created the sent share. */
272
+ readonly senderEmail?: string;
273
+ /** Name of the sender who created the sent share. */
274
+ readonly senderName?: string;
275
+ /** Tenant name of the sender who created the sent share. */
276
+ readonly senderTenantName?: string;
277
+ /** State of the resource */
278
+ readonly state?: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed";
279
+ }
280
+ /** An service invitation kind. */
281
+ export interface ServiceInvitationOutput extends SentShareInvitationOutputParent {
282
+ /** Properties of the service invitation type. */
283
+ properties: ServiceInvitationPropertiesOutput;
284
+ invitationKind: "Service";
285
+ }
286
+ /** Properties of the service invitation type. */
287
+ export interface ServiceInvitationPropertiesOutput {
288
+ /** The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
289
+ expirationDate?: string;
290
+ /** Email address of the sender. */
291
+ readonly senderEmail?: string;
292
+ /** Name of the sender */
293
+ readonly senderName?: string;
294
+ /** Tenant name of the sender */
295
+ readonly senderTenantName?: string;
296
+ /** Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
297
+ readonly sentAt?: string;
298
+ /** Share status. */
299
+ shareStatus?: "Detached" | "Attached";
300
+ /** State of the resource */
301
+ readonly state?: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed";
302
+ /**
303
+ * The target azure active directory id the invitation is sent to.
304
+ *
305
+ * Value may contain a UUID
306
+ */
307
+ targetActiveDirectoryId: string;
308
+ /**
309
+ * The target object id in the azure active directory the invitation is sent to.
310
+ *
311
+ * Value may contain a UUID
312
+ */
313
+ targetObjectId: string;
314
+ }
315
+ /** A user invitation kind. */
316
+ export interface UserInvitationOutput extends SentShareInvitationOutputParent {
317
+ /** Properties of the user invitation type. */
318
+ properties: UserInvitationPropertiesOutput;
319
+ invitationKind: "User";
320
+ }
321
+ /** Properties of the user invitation type. */
322
+ export interface UserInvitationPropertiesOutput {
323
+ /** The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
324
+ expirationDate?: string;
325
+ /** Whether or not the recipient was notified via email. */
326
+ notify?: boolean;
327
+ /** Email address of the sender. */
328
+ readonly senderEmail?: string;
329
+ /** Name of the sender */
330
+ readonly senderName?: string;
331
+ /** Tenant name of the sender */
332
+ readonly senderTenantName?: string;
333
+ /** Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */
334
+ readonly sentAt?: string;
335
+ /** Share status. */
336
+ shareStatus?: "Detached" | "Attached";
337
+ /** State of the resource */
338
+ readonly state?: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed";
339
+ /** The receiver email for the invitation is being sent. */
340
+ targetEmail: string;
341
+ }
342
+ /** A received share data transfer object. */
343
+ export type ReceivedShareOutput = InPlaceReceivedShareOutput;
344
+ /** A sent share data transfer object. */
345
+ export type SentShareOutput = InPlaceSentShareOutput;
346
+ /** A sent share invitation data transfer object. */
347
+ export type SentShareInvitationOutput = ServiceInvitationOutput | UserInvitationOutput;
348
+ /** Holds details on the destination of the mapped artifact */
349
+ export type SinkOutput = AdlsGen2AccountSinkOutput | BlobAccountSinkOutput;
350
+ /** A class for sent share artifact. */
351
+ export type ArtifactOutput = AdlsGen2ArtifactOutput | BlobStorageArtifactOutput;
352
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAGA,6CAA6C;AAC7C,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,SAAS,EAAE,eAAe,GAAG,SAAS,CAAC;CACxC;AAED,oEAAoE;AACpE,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qCAAqC;AACrC,MAAM,WAAW,uBAAuB;IACtC,0CAA0C;IAC1C,KAAK,EAAE,2BAA2B,CAAC;CACpC;AAED,0CAA0C;AAC1C,MAAM,WAAW,2BAA2B;IAC1C,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,OAAO,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC7C,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,2CAA2C;AAC3C,MAAM,WAAW,uBAAuB;IACtC,4JAA4J;IAC5J,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8JAA8J;IAC9J,SAAS,CAAC,EAAE,MAAM,CAAC;IACn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IACpB,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACtC,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACzF,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAC7D,yCAAyC;AACzC,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC;AACrD,oDAAoD;AACpD,MAAM,MAAM,yBAAyB,GAAG,uBAAuB,GAAG,oBAAoB,CAAC;AACvF,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GAAG,yBAAyB,GAAG,qBAAqB,CAAC;AAC3E,uCAAuC;AACvC,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=outputModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A received share data transfer object. */\nexport interface ReceivedShareOutputParent extends ProxyResourceOutput {\n shareKind: \"ReceivedShare\" | \"InPlace\";\n}\n\n/** Base data transfer object implementation for proxy resources. */\nexport interface ProxyResourceOutput {\n /** The unique id of the resource. */\n readonly id?: string;\n /** Type of the resource. */\n readonly type?: string;\n}\n\n/** The purview share error model. */\nexport interface PurviewShareErrorOutput {\n /** The purview share error body model. */\n error: PurviewShareErrorInfoOutput;\n}\n\n/** The purview share error body model. */\nexport interface PurviewShareErrorInfoOutput {\n /** Code of the error */\n code: string;\n /** Nested details of the error model */\n details?: Array<PurviewShareErrorInfoOutput>;\n /** Message of the error */\n message: string;\n /** Target of the error */\n target?: string;\n}\n\n/** Response for long running operation. */\nexport interface OperationResponseOutput {\n /** End time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n endTime?: string;\n /** The purview share error body model. */\n error?: PurviewShareErrorInfoOutput;\n /** Job id of the long running operation */\n id?: string;\n /** Start time of the long running operation. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n startTime?: string;\n /** States for long running operations. */\n status: \"Running\" | \"TransientFailure\" | \"Succeeded\" | \"Failed\" | \"NotStarted\";\n}\n\n/** List of received shares. */\nexport interface ReceivedShareListOutput {\n /**\n * The Url of next result page.\n *\n * Value may contain a URL\n */\n nextLink?: string;\n /** Collection of items of type ReceivedShare */\n value: Array<ReceivedShareOutput>;\n}\n\n/** List of sent shares. */\nexport interface SentShareListOutput {\n /**\n * The Url of next result page.\n *\n * Value may contain a URL\n */\n nextLink?: string;\n /** Collection of items of type SentShare */\n value: Array<SentShareOutput>;\n}\n\n/** A sent share data transfer object. */\nexport interface SentShareOutputParent extends ProxyResourceOutput {\n shareKind: \"SentShare\" | \"InPlace\";\n}\n\n/** List of the sent share invitations */\nexport interface SentShareInvitationListOutput {\n /**\n * The Url of next result page.\n *\n * Value may contain a URL\n */\n nextLink?: string;\n /** Collection of items of type SentShareInvitation */\n value: Array<SentShareInvitationOutput>;\n}\n\n/** A sent share invitation data transfer object. */\nexport interface SentShareInvitationOutputParent extends ProxyResourceOutput {\n invitationKind: \"SentShareInvitation\" | \"Service\" | \"User\";\n}\n\n/** A page of ShareResource results. */\nexport interface ShareResourceListOutput {\n /**\n * The Url of next result page.\n *\n * Value may contain a URL\n */\n nextLink?: string;\n /** Collection of items of type ShareResource */\n value: Array<ShareResourceOutput>;\n}\n\n/** A share resource. */\nexport interface ShareResourceOutput extends ProxyResourceOutput {\n /** A count of Received Shares associated with the Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. */\n receivedSharesCount?: number;\n /** A count of Sent Shares associated with the Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource. */\n sentSharesCount?: number;\n /** The types of asset. */\n storeKind?: \"AdlsGen2Account\" | \"BlobAccount\";\n /** A Store Reference for an artifact or sink. */\n storeReference?: StoreReferenceOutput;\n}\n\n/** A Store Reference for an artifact or sink. */\nexport interface StoreReferenceOutput {\n /** Reference name for resource associated with the sink or artifact. */\n referenceName?: string;\n /** Defines the type of resource being shared */\n type?: \"ArmResourceReference\";\n}\n\n/** A tenant email registration data transfer object. */\nexport interface TenantEmailRegistrationOutput extends ProxyResourceOutput {\n /** Tenant email registration property bag. */\n properties?: TenantEmailRegistrationPropertiesOutput;\n}\n\n/** Tenant email registration property bag. */\nexport interface TenantEmailRegistrationPropertiesOutput {\n /** Activation code for the registration. */\n activationCode: string;\n /** Date of the activation expiration. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly activationExpiration?: string;\n /** The email to register. */\n readonly email?: string;\n /** Defines the supported types for registration. */\n readonly registrationStatus?: \"ActivationPending\" | \"Activated\" | \"ActivationAttemptsExhausted\";\n /** State of the resource */\n readonly state?: \"Unknown\" | \"Succeeded\" | \"Creating\" | \"Deleting\" | \"Moving\" | \"Failed\";\n /** The tenant id to register. */\n readonly tenantId?: string;\n}\n\n/** AdlsGen2 Sink */\nexport interface AdlsGen2AccountSinkOutput extends SinkOutputParent {\n /** Properties for AdlsGen2 storage account */\n properties: AdlsGen2AccountSinkPropertiesOutput;\n storeKind: \"AdlsGen2Account\";\n}\n\n/** Properties for AdlsGen2 storage account */\nexport interface AdlsGen2AccountSinkPropertiesOutput {\n /** Adls Gen 2 Container Name */\n containerName: string;\n /** Adls Gen 2 Folder */\n folder: string;\n /** Adls Gen 2 Location */\n readonly location?: string;\n /** Adls Gen 2 Mount Path */\n mountPath?: string;\n}\n\n/** Holds details on the destination of the mapped artifact */\nexport interface SinkOutputParent {\n /** A Store Reference for an artifact or sink. */\n storeReference: StoreReferenceOutput;\n storeKind: \"Sink\" | \"AdlsGen2Account\" | \"BlobAccount\";\n}\n\n/** An Adls Gen2 storage account artifact. */\nexport interface AdlsGen2ArtifactOutput extends ArtifactOutputParent {\n /** Properties for Adls Gen2 storage account. */\n properties: AdlsGen2ArtifactPropertiesOutput;\n storeKind: \"AdlsGen2Account\";\n}\n\n/** Properties for Adls Gen2 storage account. */\nexport interface AdlsGen2ArtifactPropertiesOutput {\n /** Location of the storage account. */\n readonly location?: string;\n /** A list of Adls Gen2 storage account paths. */\n paths: Array<StorageAccountPathOutput>;\n}\n\n/** Defines a single StorageAccountPath path */\nexport interface StorageAccountPathOutput {\n /** Gets or sets the container name */\n containerName: string;\n /** Gets or sets the path on the receiver side where the artifact is to be mapped */\n receiverPath?: string;\n /** Gets or sets the path to file/folder within the container to be shared */\n senderPath?: string;\n}\n\n/** A class for sent share artifact. */\nexport interface ArtifactOutputParent {\n /** A Store Reference for an artifact or sink. */\n storeReference: StoreReferenceOutput;\n storeKind: \"Artifact\" | \"AdlsGen2Account\" | \"BlobAccount\";\n}\n\n/** Blob Sink */\nexport interface BlobAccountSinkOutput extends SinkOutputParent {\n /** Properties for blob storage account */\n properties: BlobAccountSinkPropertiesOutput;\n storeKind: \"BlobAccount\";\n}\n\n/** Properties for blob storage account */\nexport interface BlobAccountSinkPropertiesOutput {\n /** Blob Container Name */\n containerName: string;\n /** Blob Folder */\n folder: string;\n /** Blob Location */\n readonly location?: string;\n /** Blob Mount Path */\n mountPath?: string;\n}\n\n/** Blob storage account artifact. */\nexport interface BlobStorageArtifactOutput extends ArtifactOutputParent {\n /** Properties for blob storage account. */\n properties: BlobStorageArtifactPropertiesOutput;\n storeKind: \"BlobAccount\";\n}\n\n/** Properties for blob storage account. */\nexport interface BlobStorageArtifactPropertiesOutput {\n /** Location of the storage account. */\n readonly location?: string;\n /** A list of blob storage account paths. */\n paths: Array<StorageAccountPathOutput>;\n}\n\n/** An InPlace received share kind. */\nexport interface InPlaceReceivedShareOutput extends ReceivedShareOutputParent {\n /** Properties of in place received share. */\n properties: InPlaceReceivedSharePropertiesOutput;\n shareKind: \"InPlace\";\n}\n\n/** Properties of in place received share. */\nexport interface InPlaceReceivedSharePropertiesOutput {\n /** Location of the shared Asset. */\n readonly assetLocation?: string;\n /** The types of asset. */\n assetStoreKind?: \"AdlsGen2Account\" | \"BlobAccount\";\n /** Time at which the received share was created. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly createdAt?: string;\n /** Received Share Name */\n displayName?: string;\n /** The expiration date of the received share. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly expirationDate?: string;\n /** Email of the user/receiver who received the sent share invitation */\n readonly receiverEmail?: string;\n /** Name of the user/receiver who received the sent share invitation */\n readonly receiverName?: string;\n /** Tenant name of the user/receiver who received the sent share invitation */\n readonly receiverTenantName?: string;\n /** Email of the sender who created the sent share invitation */\n readonly senderEmail?: string;\n /** Name of the sender who created the sent share invitation */\n readonly senderName?: string;\n /** Tenant name of the sender who created the sent share invitation */\n readonly senderTenantName?: string;\n /** Share description. */\n readonly sentShareDescription?: string;\n /** Time at which the sent share was shared. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly sharedAt?: string;\n /** Share status. */\n shareStatus?: \"Detached\" | \"Attached\";\n /** Holds details on the destination of the mapped artifact */\n sink?: SinkOutput;\n /** State of the resource */\n readonly state?: \"Unknown\" | \"Succeeded\" | \"Creating\" | \"Deleting\" | \"Moving\" | \"Failed\";\n}\n\n/** An InPlace share kind. */\nexport interface InPlaceSentShareOutput extends SentShareOutputParent {\n /** Properties for InPlace sent share. */\n properties: InPlaceSentSharePropertiesOutput;\n shareKind: \"InPlace\";\n}\n\n/** Properties for InPlace sent share. */\nexport interface InPlaceSentSharePropertiesOutput {\n /** A class for sent share artifact. */\n artifact: ArtifactOutput;\n /** Time at which the sent share was created. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly createdAt?: string;\n /** List of shares on which the sent share depends. */\n readonly dependsOn?: Array<string>;\n /** Sent share description. */\n description?: string;\n /** The name of the sent share */\n displayName: string;\n /** Email of the sender who created the sent share. */\n readonly senderEmail?: string;\n /** Name of the sender who created the sent share. */\n readonly senderName?: string;\n /** Tenant name of the sender who created the sent share. */\n readonly senderTenantName?: string;\n /** State of the resource */\n readonly state?: \"Unknown\" | \"Succeeded\" | \"Creating\" | \"Deleting\" | \"Moving\" | \"Failed\";\n}\n\n/** An service invitation kind. */\nexport interface ServiceInvitationOutput extends SentShareInvitationOutputParent {\n /** Properties of the service invitation type. */\n properties: ServiceInvitationPropertiesOutput;\n invitationKind: \"Service\";\n}\n\n/** Properties of the service invitation type. */\nexport interface ServiceInvitationPropertiesOutput {\n /** The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n expirationDate?: string;\n /** Email address of the sender. */\n readonly senderEmail?: string;\n /** Name of the sender */\n readonly senderName?: string;\n /** Tenant name of the sender */\n readonly senderTenantName?: string;\n /** Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly sentAt?: string;\n /** Share status. */\n shareStatus?: \"Detached\" | \"Attached\";\n /** State of the resource */\n readonly state?: \"Unknown\" | \"Succeeded\" | \"Creating\" | \"Deleting\" | \"Moving\" | \"Failed\";\n /**\n * The target azure active directory id the invitation is sent to.\n *\n * Value may contain a UUID\n */\n targetActiveDirectoryId: string;\n /**\n * The target object id in the azure active directory the invitation is sent to.\n *\n * Value may contain a UUID\n */\n targetObjectId: string;\n}\n\n/** A user invitation kind. */\nexport interface UserInvitationOutput extends SentShareInvitationOutputParent {\n /** Properties of the user invitation type. */\n properties: UserInvitationPropertiesOutput;\n invitationKind: \"User\";\n}\n\n/** Properties of the user invitation type. */\nexport interface UserInvitationPropertiesOutput {\n /** The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n expirationDate?: string;\n /** Whether or not the recipient was notified via email. */\n notify?: boolean;\n /** Email address of the sender. */\n readonly senderEmail?: string;\n /** Name of the sender */\n readonly senderName?: string;\n /** Tenant name of the sender */\n readonly senderTenantName?: string;\n /** Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) */\n readonly sentAt?: string;\n /** Share status. */\n shareStatus?: \"Detached\" | \"Attached\";\n /** State of the resource */\n readonly state?: \"Unknown\" | \"Succeeded\" | \"Creating\" | \"Deleting\" | \"Moving\" | \"Failed\";\n /** The receiver email for the invitation is being sent. */\n targetEmail: string;\n}\n\n/** A received share data transfer object. */\nexport type ReceivedShareOutput = InPlaceReceivedShareOutput;\n/** A sent share data transfer object. */\nexport type SentShareOutput = InPlaceSentShareOutput;\n/** A sent share invitation data transfer object. */\nexport type SentShareInvitationOutput = ServiceInvitationOutput | UserInvitationOutput;\n/** Holds details on the destination of the mapped artifact */\nexport type SinkOutput = AdlsGen2AccountSinkOutput | BlobAccountSinkOutput;\n/** A class for sent share artifact. */\nexport type ArtifactOutput = AdlsGen2ArtifactOutput | BlobStorageArtifactOutput;\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,68 @@
1
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
+ /**
3
+ * An interface that tracks the settings for paged iteration
4
+ */
5
+ export interface PageSettings {
6
+ /**
7
+ * The token that keeps track of where to continue the iterator
8
+ */
9
+ continuationToken?: string;
10
+ }
11
+ /**
12
+ * An interface that allows async iterable iteration both to completion and by page.
13
+ */
14
+ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings = PageSettings> {
15
+ /**
16
+ * The next method, part of the iteration protocol
17
+ */
18
+ next(): Promise<IteratorResult<TElement>>;
19
+ /**
20
+ * The connection to the async iterator, part of the iteration protocol
21
+ */
22
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
23
+ /**
24
+ * Return an AsyncIterableIterator that works a page at a time
25
+ */
26
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
27
+ }
28
+ /**
29
+ * Helper type to extract the type of an array
30
+ */
31
+ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
32
+ /**
33
+ * The type of a custom function that defines how to get a page and a link to the next one if any.
34
+ */
35
+ export type GetPage<TPage> = (pageLink: string) => Promise<{
36
+ page: TPage;
37
+ nextPageLink?: string;
38
+ }>;
39
+ /**
40
+ * Options for the paging helper
41
+ */
42
+ export interface PagingOptions<TResponse> {
43
+ /**
44
+ * Custom function to extract pagination details for crating the PagedAsyncIterableIterator
45
+ */
46
+ customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
47
+ }
48
+ /**
49
+ * Helper type to infer the Type of the paged elements from the response type
50
+ * This type is generated based on the swagger information for x-ms-pageable
51
+ * specifically on the itemName property which indicates the property of the response
52
+ * where the page items are found. The default value is `value`.
53
+ * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
54
+ */
55
+ export type PaginateReturn<TResult> = TResult extends {
56
+ body: {
57
+ value?: infer TPage;
58
+ };
59
+ } ? GetArrayType<TPage> : Array<unknown>;
60
+ /**
61
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
62
+ * @param client - Client to use for sending the next page requests
63
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
64
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
65
+ * @returns - PagedAsyncIterableIterator to iterate the elements
66
+ */
67
+ export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
68
+ //# sourceMappingURL=paginateHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAuF7E;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B,CACzC,QAAQ,EACR,KAAK,GAAG,QAAQ,EAAE,EAClB,aAAa,GAAG,YAAY;IAE5B;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1C;;OAEG;IACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,0BAA0B,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACrF;;OAEG;IACH,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,aAAa,KAAK,qBAAqB,CAAC,KAAK,CAAC,CAAC;CACpE;AAyBD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,SAAS;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,OAAO,IAAI,OAAO,SAAS;IACpD,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CAC/B,GACG,YAAY,CAAC,KAAK,CAAC,GACnB,KAAK,CAAC,OAAO,CAAC,CAAC;AAEnB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,SAAS,qBAAqB,EAC9D,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,SAAS,EAC1B,OAAO,GAAE,aAAa,CAAC,SAAS,CAAM,GACrC,0BAA0B,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA0BvD"}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.paginate = paginate;
6
+ const core_client_1 = require("@azure-rest/core-client");
7
+ /**
8
+ * returns an async iterator that iterates over results. It also has a `byPage`
9
+ * method that returns pages of items at once.
10
+ *
11
+ * @param pagedResult - an object that specifies how to get pages.
12
+ * @returns a paged async iterator that iterates over results.
13
+ */
14
+ function getPagedAsyncIterator(pagedResult) {
15
+ const iter = getItemAsyncIterator(pagedResult);
16
+ return {
17
+ next() {
18
+ return iter.next();
19
+ },
20
+ [Symbol.asyncIterator]() {
21
+ return this;
22
+ },
23
+ byPage: pagedResult?.byPage ??
24
+ ((settings) => {
25
+ const { continuationToken } = settings ?? {};
26
+ return getPageAsyncIterator(pagedResult, {
27
+ pageLink: continuationToken,
28
+ });
29
+ }),
30
+ };
31
+ }
32
+ async function* getItemAsyncIterator(pagedResult) {
33
+ const pages = getPageAsyncIterator(pagedResult);
34
+ const firstVal = await pages.next();
35
+ // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
36
+ if (!Array.isArray(firstVal.value)) {
37
+ // can extract elements from this page
38
+ const { toElements } = pagedResult;
39
+ if (toElements) {
40
+ yield* toElements(firstVal.value);
41
+ for await (const page of pages) {
42
+ yield* toElements(page);
43
+ }
44
+ }
45
+ else {
46
+ yield firstVal.value;
47
+ // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case
48
+ yield* pages;
49
+ }
50
+ }
51
+ else {
52
+ yield* firstVal.value;
53
+ for await (const page of pages) {
54
+ // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,
55
+ // it must be the case that `TPage = TElement[]`
56
+ yield* page;
57
+ }
58
+ }
59
+ }
60
+ async function* getPageAsyncIterator(pagedResult, options = {}) {
61
+ const { pageLink } = options;
62
+ let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
63
+ if (!response) {
64
+ return;
65
+ }
66
+ yield response.page;
67
+ while (response.nextPageLink) {
68
+ response = await pagedResult.getPage(response.nextPageLink);
69
+ if (!response) {
70
+ return;
71
+ }
72
+ yield response.page;
73
+ }
74
+ }
75
+ /**
76
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
77
+ * @param client - Client to use for sending the next page requests
78
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
79
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
80
+ * @returns - PagedAsyncIterableIterator to iterate the elements
81
+ */
82
+ function paginate(client, initialResponse, options = {}) {
83
+ let firstRun = true;
84
+ const itemName = "value";
85
+ const nextLinkName = "nextLink";
86
+ const { customGetPage } = options;
87
+ const pagedResult = {
88
+ firstPageLink: "",
89
+ getPage: typeof customGetPage === "function"
90
+ ? customGetPage
91
+ : async (pageLink) => {
92
+ const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
93
+ firstRun = false;
94
+ checkPagingRequest(result);
95
+ const nextLink = getNextLink(result.body, nextLinkName);
96
+ const values = getElements(result.body, itemName);
97
+ return {
98
+ page: values,
99
+ nextPageLink: nextLink,
100
+ };
101
+ },
102
+ };
103
+ return getPagedAsyncIterator(pagedResult);
104
+ }
105
+ /**
106
+ * Gets for the value of nextLink in the body
107
+ */
108
+ function getNextLink(body, nextLinkName) {
109
+ if (!nextLinkName) {
110
+ return undefined;
111
+ }
112
+ const nextLink = body[nextLinkName];
113
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
114
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
115
+ }
116
+ return nextLink;
117
+ }
118
+ /**
119
+ * Gets the elements of the current request in the body.
120
+ */
121
+ function getElements(body, itemName) {
122
+ const value = body[itemName];
123
+ // value has to be an array according to the x-ms-pageable extension.
124
+ // The fact that this must be an array is used above to calculate the
125
+ // type of elements in the page in PaginateReturn
126
+ if (!Array.isArray(value)) {
127
+ throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
128
+ }
129
+ return value ?? [];
130
+ }
131
+ /**
132
+ * Checks if a request failed
133
+ */
134
+ function checkPagingRequest(response) {
135
+ const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
136
+ if (!Http2xxStatusCodes.includes(response.status)) {
137
+ throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
138
+ }
139
+ }
140
+ //# sourceMappingURL=paginateHelper.js.map