@azure/arm-powerbiembedded 1.2.0 → 2.0.0
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/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +75 -77
- package/dist/index.js +1266 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +226 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +24 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +19 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +183 -228
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +15 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +113 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +10 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/workspaceCollections.d.ts +110 -0
- package/dist-esm/src/operations/workspaceCollections.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaceCollections.js +456 -0
- package/dist-esm/src/operations/workspaceCollections.js.map +1 -0
- package/dist-esm/src/operations/workspaces.d.ts +30 -0
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaces.js +99 -0
- package/dist-esm/src/operations/workspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +10 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaceCollections.d.ts +87 -0
- package/dist-esm/src/operationsInterfaces/workspaceCollections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaceCollections.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaceCollections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
- package/dist-esm/src/powerBIEmbeddedManagementClient.d.ts +25 -0
- package/dist-esm/src/powerBIEmbeddedManagementClient.d.ts.map +1 -0
- package/dist-esm/src/powerBIEmbeddedManagementClient.js +80 -0
- package/dist-esm/src/powerBIEmbeddedManagementClient.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +78 -34
- package/review/arm-powerbiembedded.api.md +304 -0
- package/rollup.config.js +184 -27
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +275 -0
- package/{lib → src}/models/mappers.ts +185 -231
- package/src/models/parameters.ts +137 -0
- package/{lib → src}/operations/index.ts +3 -5
- package/src/operations/workspaceCollections.ts +595 -0
- package/src/operations/workspaces.ts +135 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/workspaceCollections.ts +163 -0
- package/src/operationsInterfaces/workspaces.ts +26 -0
- package/src/powerBIEmbeddedManagementClient.ts +116 -0
- package/tsconfig.json +6 -5
- package/types/arm-powerbiembedded.d.ts +394 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-powerbiembedded.js +0 -1247
- package/dist/arm-powerbiembedded.js.map +0 -1
- package/dist/arm-powerbiembedded.min.js +0 -1
- package/dist/arm-powerbiembedded.min.js.map +0 -1
- package/esm/models/index.d.ts +0 -493
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -21
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -8
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -70
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/workspaceCollectionsMappers.d.ts +0 -2
- package/esm/models/workspaceCollectionsMappers.d.ts.map +0 -1
- package/esm/models/workspaceCollectionsMappers.js +0 -11
- package/esm/models/workspaceCollectionsMappers.js.map +0 -1
- package/esm/models/workspacesMappers.d.ts +0 -2
- package/esm/models/workspacesMappers.d.ts.map +0 -1
- package/esm/models/workspacesMappers.js +0 -11
- package/esm/models/workspacesMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -12
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/workspaceCollections.d.ts +0 -222
- package/esm/operations/workspaceCollections.d.ts.map +0 -1
- package/esm/operations/workspaceCollections.js +0 -367
- package/esm/operations/workspaceCollections.js.map +0 -1
- package/esm/operations/workspaces.d.ts +0 -34
- package/esm/operations/workspaces.d.ts.map +0 -1
- package/esm/operations/workspaces.js +0 -58
- package/esm/operations/workspaces.js.map +0 -1
- package/esm/powerBIEmbeddedManagementClient.d.ts +0 -35
- package/esm/powerBIEmbeddedManagementClient.d.ts.map +0 -1
- package/esm/powerBIEmbeddedManagementClient.js +0 -62
- package/esm/powerBIEmbeddedManagementClient.js.map +0 -1
- package/esm/powerBIEmbeddedManagementClientContext.d.ts +0 -17
- package/esm/powerBIEmbeddedManagementClientContext.d.ts.map +0 -1
- package/esm/powerBIEmbeddedManagementClientContext.js +0 -57
- package/esm/powerBIEmbeddedManagementClientContext.js.map +0 -1
- package/lib/models/index.ts +0 -529
- package/lib/models/parameters.ts +0 -72
- package/lib/models/workspaceCollectionsMappers.ts +0 -25
- package/lib/models/workspacesMappers.ts +0 -17
- package/lib/operations/workspaceCollections.ts +0 -628
- package/lib/operations/workspaces.ts +0 -87
- package/lib/powerBIEmbeddedManagementClient.ts +0 -90
- package/lib/powerBIEmbeddedManagementClientContext.ts +0 -63
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
## API Report File for "@azure/arm-powerbiembedded"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import * as coreAuth from '@azure/core-auth';
|
|
8
|
+
import * as coreClient from '@azure/core-client';
|
|
9
|
+
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
10
|
+
import { PollerLike } from '@azure/core-lro';
|
|
11
|
+
import { PollOperationState } from '@azure/core-lro';
|
|
12
|
+
|
|
13
|
+
// @public
|
|
14
|
+
export type AccessKeyName = "key1" | "key2";
|
|
15
|
+
|
|
16
|
+
// @public (undocumented)
|
|
17
|
+
export interface AzureSku {
|
|
18
|
+
name: AzureSkuName;
|
|
19
|
+
tier: AzureSkuTier;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// @public
|
|
23
|
+
export type AzureSkuName = string;
|
|
24
|
+
|
|
25
|
+
// @public
|
|
26
|
+
export type AzureSkuTier = string;
|
|
27
|
+
|
|
28
|
+
// @public
|
|
29
|
+
export type CheckNameReason = string;
|
|
30
|
+
|
|
31
|
+
// @public (undocumented)
|
|
32
|
+
export interface CheckNameRequest {
|
|
33
|
+
name?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// @public (undocumented)
|
|
38
|
+
export interface CheckNameResponse {
|
|
39
|
+
message?: string;
|
|
40
|
+
nameAvailable?: boolean;
|
|
41
|
+
reason?: CheckNameReason;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
export interface CreateWorkspaceCollectionRequest {
|
|
46
|
+
location?: string;
|
|
47
|
+
// (undocumented)
|
|
48
|
+
sku?: AzureSku;
|
|
49
|
+
tags?: {
|
|
50
|
+
[propertyName: string]: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// @public (undocumented)
|
|
55
|
+
export interface Display {
|
|
56
|
+
description?: string;
|
|
57
|
+
operation?: string;
|
|
58
|
+
origin?: string;
|
|
59
|
+
provider?: string;
|
|
60
|
+
resource?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
export interface ErrorDetail {
|
|
65
|
+
// (undocumented)
|
|
66
|
+
code?: string;
|
|
67
|
+
// (undocumented)
|
|
68
|
+
message?: string;
|
|
69
|
+
// (undocumented)
|
|
70
|
+
target?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// @public (undocumented)
|
|
74
|
+
export interface ErrorModel {
|
|
75
|
+
// (undocumented)
|
|
76
|
+
code?: string;
|
|
77
|
+
// (undocumented)
|
|
78
|
+
details?: ErrorDetail[];
|
|
79
|
+
// (undocumented)
|
|
80
|
+
message?: string;
|
|
81
|
+
// (undocumented)
|
|
82
|
+
target?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// @public
|
|
86
|
+
export interface GetAvailableOperationsOptionalParams extends coreClient.OperationOptions {
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// @public
|
|
90
|
+
export type GetAvailableOperationsResponse = OperationList;
|
|
91
|
+
|
|
92
|
+
// @public
|
|
93
|
+
export enum KnownAzureSkuName {
|
|
94
|
+
// (undocumented)
|
|
95
|
+
S1 = "S1"
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// @public
|
|
99
|
+
export enum KnownAzureSkuTier {
|
|
100
|
+
// (undocumented)
|
|
101
|
+
Standard = "Standard"
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// @public
|
|
105
|
+
export enum KnownCheckNameReason {
|
|
106
|
+
// (undocumented)
|
|
107
|
+
Invalid = "Invalid",
|
|
108
|
+
// (undocumented)
|
|
109
|
+
Unavailable = "Unavailable"
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// @public (undocumented)
|
|
113
|
+
export interface MigrateWorkspaceCollectionRequest {
|
|
114
|
+
// (undocumented)
|
|
115
|
+
resources?: string[];
|
|
116
|
+
targetResourceGroup?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// @public (undocumented)
|
|
120
|
+
export interface Operation {
|
|
121
|
+
// (undocumented)
|
|
122
|
+
display?: Display;
|
|
123
|
+
name?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// @public (undocumented)
|
|
127
|
+
export interface OperationList {
|
|
128
|
+
// (undocumented)
|
|
129
|
+
value?: Operation[];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// @public (undocumented)
|
|
133
|
+
export class PowerBIEmbeddedManagementClient extends coreClient.ServiceClient {
|
|
134
|
+
// (undocumented)
|
|
135
|
+
$host: string;
|
|
136
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: PowerBIEmbeddedManagementClientOptionalParams);
|
|
137
|
+
// (undocumented)
|
|
138
|
+
apiVersion: string;
|
|
139
|
+
getAvailableOperations(options?: GetAvailableOperationsOptionalParams): Promise<GetAvailableOperationsResponse>;
|
|
140
|
+
// (undocumented)
|
|
141
|
+
subscriptionId: string;
|
|
142
|
+
// (undocumented)
|
|
143
|
+
workspaceCollections: WorkspaceCollections;
|
|
144
|
+
// (undocumented)
|
|
145
|
+
workspaces: Workspaces;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// @public
|
|
149
|
+
export interface PowerBIEmbeddedManagementClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
150
|
+
$host?: string;
|
|
151
|
+
apiVersion?: string;
|
|
152
|
+
endpoint?: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// @public (undocumented)
|
|
156
|
+
export interface UpdateWorkspaceCollectionRequest {
|
|
157
|
+
// (undocumented)
|
|
158
|
+
sku?: AzureSku;
|
|
159
|
+
tags?: {
|
|
160
|
+
[propertyName: string]: string;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// @public (undocumented)
|
|
165
|
+
export interface Workspace {
|
|
166
|
+
id?: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
properties?: Record<string, unknown>;
|
|
169
|
+
type?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// @public (undocumented)
|
|
173
|
+
export interface WorkspaceCollection {
|
|
174
|
+
id?: string;
|
|
175
|
+
location?: string;
|
|
176
|
+
name?: string;
|
|
177
|
+
properties?: Record<string, unknown>;
|
|
178
|
+
// (undocumented)
|
|
179
|
+
sku?: AzureSku;
|
|
180
|
+
tags?: {
|
|
181
|
+
[propertyName: string]: string;
|
|
182
|
+
};
|
|
183
|
+
type?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// @public (undocumented)
|
|
187
|
+
export interface WorkspaceCollectionAccessKey {
|
|
188
|
+
keyName?: AccessKeyName;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// @public (undocumented)
|
|
192
|
+
export interface WorkspaceCollectionAccessKeys {
|
|
193
|
+
key1?: string;
|
|
194
|
+
key2?: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// @public (undocumented)
|
|
198
|
+
export interface WorkspaceCollectionList {
|
|
199
|
+
// (undocumented)
|
|
200
|
+
value?: WorkspaceCollection[];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// @public
|
|
204
|
+
export interface WorkspaceCollections {
|
|
205
|
+
beginDelete(resourceGroupName: string, workspaceCollectionName: string, options?: WorkspaceCollectionsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
206
|
+
beginDeleteAndWait(resourceGroupName: string, workspaceCollectionName: string, options?: WorkspaceCollectionsDeleteOptionalParams): Promise<void>;
|
|
207
|
+
checkNameAvailability(location: string, body: CheckNameRequest, options?: WorkspaceCollectionsCheckNameAvailabilityOptionalParams): Promise<WorkspaceCollectionsCheckNameAvailabilityResponse>;
|
|
208
|
+
create(resourceGroupName: string, workspaceCollectionName: string, body: CreateWorkspaceCollectionRequest, options?: WorkspaceCollectionsCreateOptionalParams): Promise<WorkspaceCollectionsCreateResponse>;
|
|
209
|
+
getAccessKeys(resourceGroupName: string, workspaceCollectionName: string, options?: WorkspaceCollectionsGetAccessKeysOptionalParams): Promise<WorkspaceCollectionsGetAccessKeysResponse>;
|
|
210
|
+
getByName(resourceGroupName: string, workspaceCollectionName: string, options?: WorkspaceCollectionsGetByNameOptionalParams): Promise<WorkspaceCollectionsGetByNameResponse>;
|
|
211
|
+
listByResourceGroup(resourceGroupName: string, options?: WorkspaceCollectionsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<WorkspaceCollection>;
|
|
212
|
+
listBySubscription(options?: WorkspaceCollectionsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<WorkspaceCollection>;
|
|
213
|
+
migrate(resourceGroupName: string, body: MigrateWorkspaceCollectionRequest, options?: WorkspaceCollectionsMigrateOptionalParams): Promise<void>;
|
|
214
|
+
regenerateKey(resourceGroupName: string, workspaceCollectionName: string, body: WorkspaceCollectionAccessKey, options?: WorkspaceCollectionsRegenerateKeyOptionalParams): Promise<WorkspaceCollectionsRegenerateKeyResponse>;
|
|
215
|
+
update(resourceGroupName: string, workspaceCollectionName: string, body: UpdateWorkspaceCollectionRequest, options?: WorkspaceCollectionsUpdateOptionalParams): Promise<WorkspaceCollectionsUpdateResponse>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// @public
|
|
219
|
+
export interface WorkspaceCollectionsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// @public
|
|
223
|
+
export type WorkspaceCollectionsCheckNameAvailabilityResponse = CheckNameResponse;
|
|
224
|
+
|
|
225
|
+
// @public
|
|
226
|
+
export interface WorkspaceCollectionsCreateOptionalParams extends coreClient.OperationOptions {
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// @public
|
|
230
|
+
export type WorkspaceCollectionsCreateResponse = WorkspaceCollection;
|
|
231
|
+
|
|
232
|
+
// @public
|
|
233
|
+
export interface WorkspaceCollectionsDeleteOptionalParams extends coreClient.OperationOptions {
|
|
234
|
+
resumeFrom?: string;
|
|
235
|
+
updateIntervalInMs?: number;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// @public
|
|
239
|
+
export interface WorkspaceCollectionsGetAccessKeysOptionalParams extends coreClient.OperationOptions {
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// @public
|
|
243
|
+
export type WorkspaceCollectionsGetAccessKeysResponse = WorkspaceCollectionAccessKeys;
|
|
244
|
+
|
|
245
|
+
// @public
|
|
246
|
+
export interface WorkspaceCollectionsGetByNameOptionalParams extends coreClient.OperationOptions {
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// @public
|
|
250
|
+
export type WorkspaceCollectionsGetByNameResponse = WorkspaceCollection;
|
|
251
|
+
|
|
252
|
+
// @public
|
|
253
|
+
export interface WorkspaceCollectionsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// @public
|
|
257
|
+
export type WorkspaceCollectionsListByResourceGroupResponse = WorkspaceCollectionList;
|
|
258
|
+
|
|
259
|
+
// @public
|
|
260
|
+
export interface WorkspaceCollectionsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// @public
|
|
264
|
+
export type WorkspaceCollectionsListBySubscriptionResponse = WorkspaceCollectionList;
|
|
265
|
+
|
|
266
|
+
// @public
|
|
267
|
+
export interface WorkspaceCollectionsMigrateOptionalParams extends coreClient.OperationOptions {
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// @public
|
|
271
|
+
export interface WorkspaceCollectionsRegenerateKeyOptionalParams extends coreClient.OperationOptions {
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// @public
|
|
275
|
+
export type WorkspaceCollectionsRegenerateKeyResponse = WorkspaceCollectionAccessKeys;
|
|
276
|
+
|
|
277
|
+
// @public
|
|
278
|
+
export interface WorkspaceCollectionsUpdateOptionalParams extends coreClient.OperationOptions {
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// @public
|
|
282
|
+
export type WorkspaceCollectionsUpdateResponse = WorkspaceCollection;
|
|
283
|
+
|
|
284
|
+
// @public (undocumented)
|
|
285
|
+
export interface WorkspaceList {
|
|
286
|
+
// (undocumented)
|
|
287
|
+
value?: Workspace[];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// @public
|
|
291
|
+
export interface Workspaces {
|
|
292
|
+
list(resourceGroupName: string, workspaceCollectionName: string, options?: WorkspacesListOptionalParams): PagedAsyncIterableIterator<Workspace>;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// @public
|
|
296
|
+
export interface WorkspacesListOptionalParams extends coreClient.OperationOptions {
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// @public
|
|
300
|
+
export type WorkspacesListResponse = WorkspaceList;
|
|
301
|
+
|
|
302
|
+
// (No @packageDocumentation comment for this package)
|
|
303
|
+
|
|
304
|
+
```
|
package/rollup.config.js
CHANGED
|
@@ -1,31 +1,188 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
10
|
+
import cjs from "@rollup/plugin-commonjs";
|
|
11
|
+
import sourcemaps from "rollup-plugin-sourcemaps";
|
|
12
|
+
import multiEntry from "@rollup/plugin-multi-entry";
|
|
13
|
+
import json from "@rollup/plugin-json";
|
|
14
|
+
|
|
15
|
+
import nodeBuiltins from "builtin-modules";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
|
19
|
+
*
|
|
20
|
+
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
|
21
|
+
* __exportStar downleveled helper function to declare its exports which confuses
|
|
22
|
+
* rollup's automatic discovery mechanism.
|
|
23
|
+
*
|
|
24
|
+
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
|
25
|
+
*/
|
|
26
|
+
export function openTelemetryCommonJs() {
|
|
27
|
+
const namedExports = {};
|
|
28
|
+
|
|
29
|
+
for (const key of [
|
|
30
|
+
"@opentelemetry/api",
|
|
31
|
+
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
|
32
|
+
]) {
|
|
33
|
+
namedExports[key] = [
|
|
34
|
+
"SpanKind",
|
|
35
|
+
"TraceFlags",
|
|
36
|
+
"getSpan",
|
|
37
|
+
"setSpan",
|
|
38
|
+
"SpanStatusCode",
|
|
39
|
+
"getSpanContext",
|
|
40
|
+
"setSpanContext"
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
|
45
|
+
|
|
46
|
+
for (const version of releasedOpenTelemetryVersions) {
|
|
47
|
+
namedExports[
|
|
48
|
+
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
|
49
|
+
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
|
50
|
+
] = [
|
|
51
|
+
"SpanKind",
|
|
52
|
+
"TraceFlags",
|
|
53
|
+
"getSpan",
|
|
54
|
+
"setSpan",
|
|
55
|
+
"StatusCode",
|
|
56
|
+
"CanonicalCode",
|
|
57
|
+
"getSpanContext",
|
|
58
|
+
"setSpanContext"
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return namedExports;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// #region Warning Handler
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* A function that can determine whether a rollupwarning should be ignored. If
|
|
69
|
+
* the function returns `true`, then the warning will not be displayed.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
function ignoreNiseSinonEvalWarnings(warning) {
|
|
73
|
+
return (
|
|
74
|
+
warning.code === "EVAL" &&
|
|
75
|
+
warning.id &&
|
|
76
|
+
(warning.id.includes("node_modules/nise") ||
|
|
77
|
+
warning.id.includes("node_modules/sinon")) === true
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function ignoreChaiCircularDependencyWarnings(warning) {
|
|
82
|
+
return (
|
|
83
|
+
warning.code === "CIRCULAR_DEPENDENCY" &&
|
|
84
|
+
warning.importer && warning.importer.includes("node_modules/chai") === true
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const warningInhibitors = [
|
|
89
|
+
ignoreChaiCircularDependencyWarnings,
|
|
90
|
+
ignoreNiseSinonEvalWarnings
|
|
91
|
+
];
|
|
92
|
+
|
|
2
93
|
/**
|
|
3
|
-
*
|
|
94
|
+
* Construct a warning handler for the shared rollup configuration
|
|
95
|
+
* that ignores certain warnings that are not relevant to testing.
|
|
4
96
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
97
|
+
function makeOnWarnForTesting() {
|
|
98
|
+
return (warning, warn) => {
|
|
99
|
+
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
|
|
100
|
+
if (warningInhibitors.every((inhib) => !inhib(warning))) {
|
|
101
|
+
warn(warning);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// #endregion
|
|
107
|
+
|
|
108
|
+
function makeBrowserTestConfig() {
|
|
109
|
+
const config = {
|
|
110
|
+
input: {
|
|
111
|
+
include: ["dist-esm/test/**/*.spec.js"],
|
|
112
|
+
exclude: ["dist-esm/test/**/node/**"]
|
|
16
113
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
114
|
+
output: {
|
|
115
|
+
file: `dist-test/index.browser.js`,
|
|
116
|
+
format: "umd",
|
|
117
|
+
sourcemap: true
|
|
118
|
+
},
|
|
119
|
+
preserveSymlinks: false,
|
|
120
|
+
plugins: [
|
|
121
|
+
multiEntry({ exports: false }),
|
|
122
|
+
nodeResolve({
|
|
123
|
+
mainFields: ["module", "browser"]
|
|
124
|
+
}),
|
|
125
|
+
cjs({
|
|
126
|
+
namedExports: {
|
|
127
|
+
// Chai's strange internal architecture makes it impossible to statically
|
|
128
|
+
// analyze its exports.
|
|
129
|
+
chai: [
|
|
130
|
+
"version",
|
|
131
|
+
"use",
|
|
132
|
+
"util",
|
|
133
|
+
"config",
|
|
134
|
+
"expect",
|
|
135
|
+
"should",
|
|
136
|
+
"assert"
|
|
137
|
+
],
|
|
138
|
+
...openTelemetryCommonJs()
|
|
139
|
+
}
|
|
140
|
+
}),
|
|
141
|
+
json(),
|
|
142
|
+
sourcemaps()
|
|
143
|
+
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
|
144
|
+
],
|
|
145
|
+
onwarn: makeOnWarnForTesting(),
|
|
146
|
+
// Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
|
|
147
|
+
// rollup started respecting the "sideEffects" field in package.json. Since
|
|
148
|
+
// our package.json sets "sideEffects=false", this also applies to test
|
|
149
|
+
// code, which causes all tests to be removed by tree-shaking.
|
|
150
|
+
treeshake: false
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return config;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const defaultConfigurationOptions = {
|
|
157
|
+
disableBrowserBundle: false
|
|
30
158
|
};
|
|
31
|
-
|
|
159
|
+
|
|
160
|
+
export function makeConfig(pkg, options) {
|
|
161
|
+
options = {
|
|
162
|
+
...defaultConfigurationOptions,
|
|
163
|
+
...(options || {})
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const baseConfig = {
|
|
167
|
+
// Use the package's module field if it has one
|
|
168
|
+
input: pkg["module"] || "dist-esm/src/index.js",
|
|
169
|
+
external: [
|
|
170
|
+
...nodeBuiltins,
|
|
171
|
+
...Object.keys(pkg.dependencies),
|
|
172
|
+
...Object.keys(pkg.devDependencies)
|
|
173
|
+
],
|
|
174
|
+
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
|
175
|
+
preserveSymlinks: false,
|
|
176
|
+
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const config = [baseConfig];
|
|
180
|
+
|
|
181
|
+
if (!options.disableBrowserBundle) {
|
|
182
|
+
config.push(makeBrowserTestConfig());
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return config;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export default makeConfig(require("./package.json"));
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/// <reference lib="esnext.asynciterable" />
|
|
10
|
+
export * from "./models";
|
|
11
|
+
export { PowerBIEmbeddedManagementClient } from "./powerBIEmbeddedManagementClient";
|
|
12
|
+
export * from "./operationsInterfaces";
|
package/src/lroImpl.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
10
|
+
|
|
11
|
+
export class LroImpl<T> implements LongRunningOperation<T> {
|
|
12
|
+
constructor(
|
|
13
|
+
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
|
|
14
|
+
private args: Record<string, unknown>,
|
|
15
|
+
private spec: {
|
|
16
|
+
readonly requestBody?: unknown;
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
readonly httpMethod: string;
|
|
19
|
+
} & Record<string, any>,
|
|
20
|
+
public requestPath: string = spec.path!,
|
|
21
|
+
public requestMethod: string = spec.httpMethod
|
|
22
|
+
) {}
|
|
23
|
+
public async sendInitialRequest(): Promise<LroResponse<T>> {
|
|
24
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
25
|
+
}
|
|
26
|
+
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
|
|
27
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
28
|
+
return this.sendOperationFn(this.args, {
|
|
29
|
+
...restSpec,
|
|
30
|
+
path,
|
|
31
|
+
httpMethod: "GET"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|