@azure-rest/purview-sharing 1.0.0-beta.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4 -4
- package/README.md +2 -2
- package/dist/browser/clientDefinitions.d.ts +87 -0
- package/dist/browser/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/clientDefinitions.js +4 -0
- package/dist/browser/clientDefinitions.js.map +1 -0
- package/dist/browser/index.d.ts +12 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +15 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/isUnexpected.d.ts +19 -0
- package/dist/browser/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/isUnexpected.js +2 -1
- package/dist/browser/isUnexpected.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models.d.ts +201 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +4 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/outputModels.d.ts +352 -0
- package/dist/browser/outputModels.d.ts.map +1 -0
- package/dist/browser/outputModels.js +4 -0
- package/dist/browser/outputModels.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/paginateHelper.d.ts +68 -0
- package/dist/browser/paginateHelper.d.ts.map +1 -0
- package/dist/browser/paginateHelper.js +167 -0
- package/dist/browser/paginateHelper.js.map +1 -0
- package/dist/browser/parameters.d.ts +123 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js +4 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/pollingHelper.d.ts +76 -0
- package/dist/browser/pollingHelper.d.ts.map +1 -0
- package/dist/browser/pollingHelper.js +104 -0
- package/dist/browser/pollingHelper.js.map +1 -0
- package/dist/browser/purviewSharing.d.ts +16 -0
- package/dist/browser/purviewSharing.d.ts.map +1 -0
- package/dist/browser/purviewSharing.js +43 -0
- package/dist/browser/purviewSharing.js.map +1 -0
- package/dist/browser/responses.d.ts +304 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js +4 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/commonjs/clientDefinitions.d.ts +87 -0
- package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/clientDefinitions.js +5 -0
- package/dist/commonjs/clientDefinitions.js.map +1 -0
- package/dist/commonjs/index.d.ts +12 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +18 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/isUnexpected.d.ts +19 -0
- package/dist/commonjs/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/isUnexpected.js +89 -0
- package/dist/commonjs/isUnexpected.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +201 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/outputModels.d.ts +352 -0
- package/dist/commonjs/outputModels.d.ts.map +1 -0
- package/dist/commonjs/outputModels.js +5 -0
- package/dist/commonjs/outputModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/paginateHelper.d.ts +68 -0
- package/dist/commonjs/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/paginateHelper.js +170 -0
- package/dist/commonjs/paginateHelper.js.map +1 -0
- package/dist/commonjs/parameters.d.ts +123 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/pollingHelper.d.ts +76 -0
- package/dist/commonjs/pollingHelper.d.ts.map +1 -0
- package/dist/commonjs/pollingHelper.js +107 -0
- package/dist/commonjs/pollingHelper.js.map +1 -0
- package/dist/commonjs/purviewSharing.d.ts +16 -0
- package/dist/commonjs/purviewSharing.d.ts.map +1 -0
- package/dist/commonjs/purviewSharing.js +46 -0
- package/dist/commonjs/purviewSharing.js.map +1 -0
- package/dist/commonjs/responses.d.ts +304 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/clientDefinitions.d.ts +87 -0
- package/dist/esm/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/clientDefinitions.js +4 -0
- package/dist/esm/clientDefinitions.js.map +1 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isUnexpected.d.ts +19 -0
- package/dist/esm/isUnexpected.d.ts.map +1 -0
- package/dist/esm/isUnexpected.js +86 -0
- package/dist/esm/isUnexpected.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +201 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/outputModels.d.ts +352 -0
- package/dist/esm/outputModels.d.ts.map +1 -0
- package/dist/esm/outputModels.js +4 -0
- package/dist/esm/outputModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/paginateHelper.d.ts +68 -0
- package/dist/esm/paginateHelper.d.ts.map +1 -0
- package/dist/esm/paginateHelper.js +167 -0
- package/dist/esm/paginateHelper.js.map +1 -0
- package/dist/esm/parameters.d.ts +123 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/pollingHelper.d.ts +76 -0
- package/dist/esm/pollingHelper.d.ts.map +1 -0
- package/dist/esm/pollingHelper.js +104 -0
- package/dist/esm/pollingHelper.js.map +1 -0
- package/dist/esm/purviewSharing.d.ts +16 -0
- package/dist/esm/purviewSharing.d.ts.map +1 -0
- package/dist/esm/purviewSharing.js +43 -0
- package/dist/esm/purviewSharing.js.map +1 -0
- package/dist/esm/responses.d.ts +304 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/react-native/clientDefinitions.d.ts +87 -0
- package/dist/react-native/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/clientDefinitions.js +4 -0
- package/dist/react-native/clientDefinitions.js.map +1 -0
- package/dist/react-native/index.d.ts +12 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +15 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/isUnexpected.d.ts +19 -0
- package/dist/react-native/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/isUnexpected.js +86 -0
- package/dist/react-native/isUnexpected.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +201 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/outputModels.d.ts +352 -0
- package/dist/react-native/outputModels.d.ts.map +1 -0
- package/dist/react-native/outputModels.js +4 -0
- package/dist/react-native/outputModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/paginateHelper.d.ts +68 -0
- package/dist/react-native/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/paginateHelper.js +167 -0
- package/dist/react-native/paginateHelper.js.map +1 -0
- package/dist/react-native/parameters.d.ts +123 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/pollingHelper.d.ts +76 -0
- package/dist/react-native/pollingHelper.d.ts.map +1 -0
- package/dist/react-native/pollingHelper.js +104 -0
- package/dist/react-native/pollingHelper.js.map +1 -0
- package/dist/react-native/purviewSharing.d.ts +16 -0
- package/dist/react-native/purviewSharing.d.ts.map +1 -0
- package/dist/react-native/purviewSharing.js +43 -0
- package/dist/react-native/purviewSharing.js.map +1 -0
- package/dist/react-native/responses.d.ts +304 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/package.json +83 -69
- package/dist/index.js +0 -240
- package/dist/index.js.map +0 -1
- package/dist-esm/src/clientDefinitions.js +0 -4
- package/dist-esm/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/index.js +0 -14
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/models.js +0 -4
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/outputModels.js +0 -4
- package/dist-esm/src/outputModels.js.map +0 -1
- package/dist-esm/src/paginateHelper.js +0 -70
- package/dist-esm/src/paginateHelper.js.map +0 -1
- package/dist-esm/src/parameters.js +0 -4
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/pollingHelper.js +0 -50
- package/dist-esm/src/pollingHelper.js.map +0 -1
- package/dist-esm/src/purviewSharing.js +0 -27
- package/dist-esm/src/purviewSharing.js.map +0 -1
- package/dist-esm/src/responses.js +0 -4
- package/dist-esm/src/responses.js.map +0 -1
- package/review/purview-sharing.api.md +0 -1234
- 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,GAA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F,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GAAG,yBAAyB,GAAG,qBAAqB,CAAC;AAC3E,uCAAuC;AACvC,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG,yBAAyB,CAAC"}
|
|
@@ -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,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":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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,167 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
4
|
+
import { createRestError } from "@azure-rest/core-client";
|
|
5
|
+
/**
|
|
6
|
+
* returns an async iterator that iterates over results. It also has a `byPage`
|
|
7
|
+
* method that returns pages of items at once.
|
|
8
|
+
*
|
|
9
|
+
* @param pagedResult - an object that specifies how to get pages.
|
|
10
|
+
* @returns a paged async iterator that iterates over results.
|
|
11
|
+
*/
|
|
12
|
+
function getPagedAsyncIterator(pagedResult) {
|
|
13
|
+
var _a;
|
|
14
|
+
const iter = getItemAsyncIterator(pagedResult);
|
|
15
|
+
return {
|
|
16
|
+
next() {
|
|
17
|
+
return iter.next();
|
|
18
|
+
},
|
|
19
|
+
[Symbol.asyncIterator]() {
|
|
20
|
+
return this;
|
|
21
|
+
},
|
|
22
|
+
byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
|
|
23
|
+
const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
|
|
24
|
+
return getPageAsyncIterator(pagedResult, {
|
|
25
|
+
pageLink: continuationToken,
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function getItemAsyncIterator(pagedResult) {
|
|
31
|
+
return __asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
|
|
32
|
+
var _a, e_1, _b, _c, _d, e_2, _e, _f;
|
|
33
|
+
const pages = getPageAsyncIterator(pagedResult);
|
|
34
|
+
const firstVal = yield __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 __await(yield* __asyncDelegator(__asyncValues(toElements(firstVal.value))));
|
|
41
|
+
try {
|
|
42
|
+
for (var _g = true, pages_1 = __asyncValues(pages), pages_1_1; pages_1_1 = yield __await(pages_1.next()), _a = pages_1_1.done, !_a; _g = true) {
|
|
43
|
+
_c = pages_1_1.value;
|
|
44
|
+
_g = false;
|
|
45
|
+
const page = _c;
|
|
46
|
+
yield __await(yield* __asyncDelegator(__asyncValues(toElements(page))));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
50
|
+
finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!_g && !_a && (_b = pages_1.return)) yield __await(_b.call(pages_1));
|
|
53
|
+
}
|
|
54
|
+
finally { if (e_1) throw e_1.error; }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
yield yield __await(firstVal.value);
|
|
59
|
+
// `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case
|
|
60
|
+
yield __await(yield* __asyncDelegator(__asyncValues(pages)));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
yield __await(yield* __asyncDelegator(__asyncValues(firstVal.value)));
|
|
65
|
+
try {
|
|
66
|
+
for (var _h = true, pages_2 = __asyncValues(pages), pages_2_1; pages_2_1 = yield __await(pages_2.next()), _d = pages_2_1.done, !_d; _h = true) {
|
|
67
|
+
_f = pages_2_1.value;
|
|
68
|
+
_h = false;
|
|
69
|
+
const page = _f;
|
|
70
|
+
// pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,
|
|
71
|
+
// it must be the case that `TPage = TElement[]`
|
|
72
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
76
|
+
finally {
|
|
77
|
+
try {
|
|
78
|
+
if (!_h && !_d && (_e = pages_2.return)) yield __await(_e.call(pages_2));
|
|
79
|
+
}
|
|
80
|
+
finally { if (e_2) throw e_2.error; }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function getPageAsyncIterator(pagedResult_1) {
|
|
86
|
+
return __asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
|
|
87
|
+
const { pageLink } = options;
|
|
88
|
+
let response = yield __await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
|
|
89
|
+
if (!response) {
|
|
90
|
+
return yield __await(void 0);
|
|
91
|
+
}
|
|
92
|
+
yield yield __await(response.page);
|
|
93
|
+
while (response.nextPageLink) {
|
|
94
|
+
response = yield __await(pagedResult.getPage(response.nextPageLink));
|
|
95
|
+
if (!response) {
|
|
96
|
+
return yield __await(void 0);
|
|
97
|
+
}
|
|
98
|
+
yield yield __await(response.page);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
104
|
+
* @param client - Client to use for sending the next page requests
|
|
105
|
+
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
106
|
+
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
107
|
+
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
108
|
+
*/
|
|
109
|
+
export function paginate(client, initialResponse, options = {}) {
|
|
110
|
+
let firstRun = true;
|
|
111
|
+
const itemName = "value";
|
|
112
|
+
const nextLinkName = "nextLink";
|
|
113
|
+
const { customGetPage } = options;
|
|
114
|
+
const pagedResult = {
|
|
115
|
+
firstPageLink: "",
|
|
116
|
+
getPage: typeof customGetPage === "function"
|
|
117
|
+
? customGetPage
|
|
118
|
+
: async (pageLink) => {
|
|
119
|
+
const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
|
|
120
|
+
firstRun = false;
|
|
121
|
+
checkPagingRequest(result);
|
|
122
|
+
const nextLink = getNextLink(result.body, nextLinkName);
|
|
123
|
+
const values = getElements(result.body, itemName);
|
|
124
|
+
return {
|
|
125
|
+
page: values,
|
|
126
|
+
nextPageLink: nextLink,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
return getPagedAsyncIterator(pagedResult);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Gets for the value of nextLink in the body
|
|
134
|
+
*/
|
|
135
|
+
function getNextLink(body, nextLinkName) {
|
|
136
|
+
if (!nextLinkName) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
const nextLink = body[nextLinkName];
|
|
140
|
+
if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
|
|
141
|
+
throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
|
|
142
|
+
}
|
|
143
|
+
return nextLink;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Gets the elements of the current request in the body.
|
|
147
|
+
*/
|
|
148
|
+
function getElements(body, itemName) {
|
|
149
|
+
const value = body[itemName];
|
|
150
|
+
// value has to be an array according to the x-ms-pageable extension.
|
|
151
|
+
// The fact that this must be an array is used above to calculate the
|
|
152
|
+
// type of elements in the page in PaginateReturn
|
|
153
|
+
if (!Array.isArray(value)) {
|
|
154
|
+
throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
155
|
+
}
|
|
156
|
+
return value !== null && value !== void 0 ? value : [];
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Checks if a request failed
|
|
160
|
+
*/
|
|
161
|
+
function checkPagingRequest(response) {
|
|
162
|
+
const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
|
|
163
|
+
if (!Http2xxStatusCodes.includes(response.status)) {
|
|
164
|
+
throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=paginateHelper.js.map
|