@azure/arm-devhub 1.0.0-beta.1
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 +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +1512 -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/samples-dev/gitHubOAuthCallbackSample.d.ts +2 -0
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.js +32 -0
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.js.map +1 -0
- package/dist-esm/samples-dev/gitHubOAuthSample.d.ts +2 -0
- package/dist-esm/samples-dev/gitHubOAuthSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/gitHubOAuthSample.js +34 -0
- package/dist-esm/samples-dev/gitHubOAuthSample.js.map +1 -0
- package/dist-esm/samples-dev/listGitHubOAuthSample.d.ts +2 -0
- package/dist-esm/samples-dev/listGitHubOAuthSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/listGitHubOAuthSample.js +30 -0
- package/dist-esm/samples-dev/listGitHubOAuthSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +29 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.js +56 -0
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/workflowDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/workflowDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workflowDeleteSample.js +31 -0
- package/dist-esm/samples-dev/workflowDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/workflowGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/workflowGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workflowGetSample.js +31 -0
- package/dist-esm/samples-dev/workflowGetSample.js.map +1 -0
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.js +48 -0
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/workflowListSample.d.ts +2 -0
- package/dist-esm/samples-dev/workflowListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workflowListSample.js +43 -0
- package/dist-esm/samples-dev/workflowListSample.js.map +1 -0
- package/dist-esm/samples-dev/workflowUpdateTagsSample.d.ts +2 -0
- package/dist-esm/samples-dev/workflowUpdateTagsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workflowUpdateTagsSample.js +34 -0
- package/dist-esm/samples-dev/workflowUpdateTagsSample.js.map +1 -0
- package/dist-esm/src/developerHubServiceClient.d.ts +41 -0
- package/dist-esm/src/developerHubServiceClient.d.ts.map +1 -0
- package/dist-esm/src/developerHubServiceClient.js +196 -0
- package/dist-esm/src/developerHubServiceClient.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/models/index.d.ts +458 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +56 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +24 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +650 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +17 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +160 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +3 -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/operations.d.ts +18 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +46 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/workflowOperations.d.ts +83 -0
- package/dist-esm/src/operations/workflowOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/workflowOperations.js +361 -0
- package/dist-esm/src/operations/workflowOperations.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/operations.d.ts +10 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workflowOperations.d.ts +47 -0
- package/dist-esm/src/operationsInterfaces/workflowOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workflowOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/workflowOperations.js.map +1 -0
- package/dist-esm/test/devhub_examples.spec.d.ts +4 -0
- package/dist-esm/test/devhub_examples.spec.d.ts.map +1 -0
- package/dist-esm/test/devhub_examples.spec.js +67 -0
- package/dist-esm/test/devhub_examples.spec.js.map +1 -0
- package/package.json +120 -0
- package/review/arm-devhub.api.md +355 -0
- package/rollup.config.js +122 -0
- package/src/developerHubServiceClient.ts +270 -0
- package/src/index.ts +12 -0
- package/src/models/index.ts +518 -0
- package/src/models/mappers.ts +699 -0
- package/src/models/parameters.ts +186 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/operations.ts +59 -0
- package/src/operations/workflowOperations.ts +449 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/operations.ts +21 -0
- package/src/operationsInterfaces/workflowOperations.ts +92 -0
- package/tsconfig.json +33 -0
- package/types/arm-devhub.d.ts +609 -0
- package/types/tsdoc-metadata.json +11 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1512 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* Copyright (c) Microsoft Corporation.
|
|
32
|
+
* Licensed under the MIT License.
|
|
33
|
+
*
|
|
34
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
35
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
36
|
+
*/
|
|
37
|
+
/** Known values of {@link Origin} that the service accepts. */
|
|
38
|
+
exports.KnownOrigin = void 0;
|
|
39
|
+
(function (KnownOrigin) {
|
|
40
|
+
/** User */
|
|
41
|
+
KnownOrigin["User"] = "user";
|
|
42
|
+
/** System */
|
|
43
|
+
KnownOrigin["System"] = "system";
|
|
44
|
+
/** UserSystem */
|
|
45
|
+
KnownOrigin["UserSystem"] = "user,system";
|
|
46
|
+
})(exports.KnownOrigin || (exports.KnownOrigin = {}));
|
|
47
|
+
/** Known values of {@link ActionType} that the service accepts. */
|
|
48
|
+
exports.KnownActionType = void 0;
|
|
49
|
+
(function (KnownActionType) {
|
|
50
|
+
/** Internal */
|
|
51
|
+
KnownActionType["Internal"] = "Internal";
|
|
52
|
+
})(exports.KnownActionType || (exports.KnownActionType = {}));
|
|
53
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
54
|
+
exports.KnownCreatedByType = void 0;
|
|
55
|
+
(function (KnownCreatedByType) {
|
|
56
|
+
/** User */
|
|
57
|
+
KnownCreatedByType["User"] = "User";
|
|
58
|
+
/** Application */
|
|
59
|
+
KnownCreatedByType["Application"] = "Application";
|
|
60
|
+
/** ManagedIdentity */
|
|
61
|
+
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
62
|
+
/** Key */
|
|
63
|
+
KnownCreatedByType["Key"] = "Key";
|
|
64
|
+
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
65
|
+
/** Known values of {@link ManifestType} that the service accepts. */
|
|
66
|
+
exports.KnownManifestType = void 0;
|
|
67
|
+
(function (KnownManifestType) {
|
|
68
|
+
/** Repositories using helm */
|
|
69
|
+
KnownManifestType["Helm"] = "helm";
|
|
70
|
+
/** Repositories using kubernetes manifests */
|
|
71
|
+
KnownManifestType["Kube"] = "kube";
|
|
72
|
+
})(exports.KnownManifestType || (exports.KnownManifestType = {}));
|
|
73
|
+
/** Known values of {@link PullRequestStatus} that the service accepts. */
|
|
74
|
+
exports.KnownPullRequestStatus = void 0;
|
|
75
|
+
(function (KnownPullRequestStatus) {
|
|
76
|
+
/** Pull Request state unknown. */
|
|
77
|
+
KnownPullRequestStatus["Unknown"] = "unknown";
|
|
78
|
+
/** Pull Request submitted to repository. */
|
|
79
|
+
KnownPullRequestStatus["Submitted"] = "submitted";
|
|
80
|
+
/** Pull Request merged into repository. */
|
|
81
|
+
KnownPullRequestStatus["Merged"] = "merged";
|
|
82
|
+
/** Workflow no longer found within repository. */
|
|
83
|
+
KnownPullRequestStatus["Removed"] = "removed";
|
|
84
|
+
})(exports.KnownPullRequestStatus || (exports.KnownPullRequestStatus = {}));
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* Copyright (c) Microsoft Corporation.
|
|
88
|
+
* Licensed under the MIT License.
|
|
89
|
+
*
|
|
90
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
91
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
92
|
+
*/
|
|
93
|
+
const OperationListResult = {
|
|
94
|
+
type: {
|
|
95
|
+
name: "Composite",
|
|
96
|
+
className: "OperationListResult",
|
|
97
|
+
modelProperties: {
|
|
98
|
+
value: {
|
|
99
|
+
serializedName: "value",
|
|
100
|
+
readOnly: true,
|
|
101
|
+
type: {
|
|
102
|
+
name: "Sequence",
|
|
103
|
+
element: {
|
|
104
|
+
type: {
|
|
105
|
+
name: "Composite",
|
|
106
|
+
className: "Operation"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
nextLink: {
|
|
112
|
+
serializedName: "nextLink",
|
|
113
|
+
readOnly: true,
|
|
114
|
+
type: {
|
|
115
|
+
name: "String"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const Operation = {
|
|
122
|
+
type: {
|
|
123
|
+
name: "Composite",
|
|
124
|
+
className: "Operation",
|
|
125
|
+
modelProperties: {
|
|
126
|
+
name: {
|
|
127
|
+
serializedName: "name",
|
|
128
|
+
readOnly: true,
|
|
129
|
+
type: {
|
|
130
|
+
name: "String"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
isDataAction: {
|
|
134
|
+
serializedName: "isDataAction",
|
|
135
|
+
readOnly: true,
|
|
136
|
+
type: {
|
|
137
|
+
name: "Boolean"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
display: {
|
|
141
|
+
serializedName: "display",
|
|
142
|
+
type: {
|
|
143
|
+
name: "Composite",
|
|
144
|
+
className: "OperationDisplay"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
origin: {
|
|
148
|
+
serializedName: "origin",
|
|
149
|
+
readOnly: true,
|
|
150
|
+
type: {
|
|
151
|
+
name: "String"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
actionType: {
|
|
155
|
+
serializedName: "actionType",
|
|
156
|
+
readOnly: true,
|
|
157
|
+
type: {
|
|
158
|
+
name: "String"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const OperationDisplay = {
|
|
165
|
+
type: {
|
|
166
|
+
name: "Composite",
|
|
167
|
+
className: "OperationDisplay",
|
|
168
|
+
modelProperties: {
|
|
169
|
+
provider: {
|
|
170
|
+
serializedName: "provider",
|
|
171
|
+
readOnly: true,
|
|
172
|
+
type: {
|
|
173
|
+
name: "String"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
resource: {
|
|
177
|
+
serializedName: "resource",
|
|
178
|
+
readOnly: true,
|
|
179
|
+
type: {
|
|
180
|
+
name: "String"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
operation: {
|
|
184
|
+
serializedName: "operation",
|
|
185
|
+
readOnly: true,
|
|
186
|
+
type: {
|
|
187
|
+
name: "String"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
description: {
|
|
191
|
+
serializedName: "description",
|
|
192
|
+
readOnly: true,
|
|
193
|
+
type: {
|
|
194
|
+
name: "String"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const ErrorResponse = {
|
|
201
|
+
type: {
|
|
202
|
+
name: "Composite",
|
|
203
|
+
className: "ErrorResponse",
|
|
204
|
+
modelProperties: {
|
|
205
|
+
error: {
|
|
206
|
+
serializedName: "error",
|
|
207
|
+
type: {
|
|
208
|
+
name: "Composite",
|
|
209
|
+
className: "ErrorDetail"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const ErrorDetail = {
|
|
216
|
+
type: {
|
|
217
|
+
name: "Composite",
|
|
218
|
+
className: "ErrorDetail",
|
|
219
|
+
modelProperties: {
|
|
220
|
+
code: {
|
|
221
|
+
serializedName: "code",
|
|
222
|
+
readOnly: true,
|
|
223
|
+
type: {
|
|
224
|
+
name: "String"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
message: {
|
|
228
|
+
serializedName: "message",
|
|
229
|
+
readOnly: true,
|
|
230
|
+
type: {
|
|
231
|
+
name: "String"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
target: {
|
|
235
|
+
serializedName: "target",
|
|
236
|
+
readOnly: true,
|
|
237
|
+
type: {
|
|
238
|
+
name: "String"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
details: {
|
|
242
|
+
serializedName: "details",
|
|
243
|
+
readOnly: true,
|
|
244
|
+
type: {
|
|
245
|
+
name: "Sequence",
|
|
246
|
+
element: {
|
|
247
|
+
type: {
|
|
248
|
+
name: "Composite",
|
|
249
|
+
className: "ErrorDetail"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
additionalInfo: {
|
|
255
|
+
serializedName: "additionalInfo",
|
|
256
|
+
readOnly: true,
|
|
257
|
+
type: {
|
|
258
|
+
name: "Sequence",
|
|
259
|
+
element: {
|
|
260
|
+
type: {
|
|
261
|
+
name: "Composite",
|
|
262
|
+
className: "ErrorAdditionalInfo"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
const ErrorAdditionalInfo = {
|
|
271
|
+
type: {
|
|
272
|
+
name: "Composite",
|
|
273
|
+
className: "ErrorAdditionalInfo",
|
|
274
|
+
modelProperties: {
|
|
275
|
+
type: {
|
|
276
|
+
serializedName: "type",
|
|
277
|
+
readOnly: true,
|
|
278
|
+
type: {
|
|
279
|
+
name: "String"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
info: {
|
|
283
|
+
serializedName: "info",
|
|
284
|
+
readOnly: true,
|
|
285
|
+
type: {
|
|
286
|
+
name: "Dictionary",
|
|
287
|
+
value: { type: { name: "any" } }
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
const GitHubOAuthCallRequest = {
|
|
294
|
+
type: {
|
|
295
|
+
name: "Composite",
|
|
296
|
+
className: "GitHubOAuthCallRequest",
|
|
297
|
+
modelProperties: {
|
|
298
|
+
redirectUrl: {
|
|
299
|
+
serializedName: "redirectUrl",
|
|
300
|
+
type: {
|
|
301
|
+
name: "String"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
const GitHubOAuthInfoResponse = {
|
|
308
|
+
type: {
|
|
309
|
+
name: "Composite",
|
|
310
|
+
className: "GitHubOAuthInfoResponse",
|
|
311
|
+
modelProperties: {
|
|
312
|
+
authURL: {
|
|
313
|
+
serializedName: "authURL",
|
|
314
|
+
type: {
|
|
315
|
+
name: "String"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
token: {
|
|
319
|
+
serializedName: "token",
|
|
320
|
+
type: {
|
|
321
|
+
name: "String"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
const Resource = {
|
|
328
|
+
type: {
|
|
329
|
+
name: "Composite",
|
|
330
|
+
className: "Resource",
|
|
331
|
+
modelProperties: {
|
|
332
|
+
id: {
|
|
333
|
+
serializedName: "id",
|
|
334
|
+
readOnly: true,
|
|
335
|
+
type: {
|
|
336
|
+
name: "String"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
name: {
|
|
340
|
+
serializedName: "name",
|
|
341
|
+
readOnly: true,
|
|
342
|
+
type: {
|
|
343
|
+
name: "String"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
type: {
|
|
347
|
+
serializedName: "type",
|
|
348
|
+
readOnly: true,
|
|
349
|
+
type: {
|
|
350
|
+
name: "String"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
systemData: {
|
|
354
|
+
serializedName: "systemData",
|
|
355
|
+
type: {
|
|
356
|
+
name: "Composite",
|
|
357
|
+
className: "SystemData"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
const SystemData = {
|
|
364
|
+
type: {
|
|
365
|
+
name: "Composite",
|
|
366
|
+
className: "SystemData",
|
|
367
|
+
modelProperties: {
|
|
368
|
+
createdBy: {
|
|
369
|
+
serializedName: "createdBy",
|
|
370
|
+
type: {
|
|
371
|
+
name: "String"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
createdByType: {
|
|
375
|
+
serializedName: "createdByType",
|
|
376
|
+
type: {
|
|
377
|
+
name: "String"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
createdAt: {
|
|
381
|
+
serializedName: "createdAt",
|
|
382
|
+
type: {
|
|
383
|
+
name: "DateTime"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
lastModifiedBy: {
|
|
387
|
+
serializedName: "lastModifiedBy",
|
|
388
|
+
type: {
|
|
389
|
+
name: "String"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
lastModifiedByType: {
|
|
393
|
+
serializedName: "lastModifiedByType",
|
|
394
|
+
type: {
|
|
395
|
+
name: "String"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
lastModifiedAt: {
|
|
399
|
+
serializedName: "lastModifiedAt",
|
|
400
|
+
type: {
|
|
401
|
+
name: "DateTime"
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
const GitHubOAuthListResponse = {
|
|
408
|
+
type: {
|
|
409
|
+
name: "Composite",
|
|
410
|
+
className: "GitHubOAuthListResponse",
|
|
411
|
+
modelProperties: {
|
|
412
|
+
value: {
|
|
413
|
+
serializedName: "value",
|
|
414
|
+
type: {
|
|
415
|
+
name: "Sequence",
|
|
416
|
+
element: {
|
|
417
|
+
type: {
|
|
418
|
+
name: "Composite",
|
|
419
|
+
className: "GitHubOAuthResponse"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const WorkflowListResult = {
|
|
428
|
+
type: {
|
|
429
|
+
name: "Composite",
|
|
430
|
+
className: "WorkflowListResult",
|
|
431
|
+
modelProperties: {
|
|
432
|
+
value: {
|
|
433
|
+
serializedName: "value",
|
|
434
|
+
type: {
|
|
435
|
+
name: "Sequence",
|
|
436
|
+
element: {
|
|
437
|
+
type: {
|
|
438
|
+
name: "Composite",
|
|
439
|
+
className: "Workflow"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
nextLink: {
|
|
445
|
+
serializedName: "nextLink",
|
|
446
|
+
readOnly: true,
|
|
447
|
+
type: {
|
|
448
|
+
name: "String"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
const DeploymentProperties = {
|
|
455
|
+
type: {
|
|
456
|
+
name: "Composite",
|
|
457
|
+
className: "DeploymentProperties",
|
|
458
|
+
modelProperties: {
|
|
459
|
+
manifestType: {
|
|
460
|
+
serializedName: "manifestType",
|
|
461
|
+
type: {
|
|
462
|
+
name: "String"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
kubeManifestLocations: {
|
|
466
|
+
serializedName: "kubeManifestLocations",
|
|
467
|
+
type: {
|
|
468
|
+
name: "Sequence",
|
|
469
|
+
element: {
|
|
470
|
+
type: {
|
|
471
|
+
name: "String"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
helmChartPath: {
|
|
477
|
+
serializedName: "helmChartPath",
|
|
478
|
+
type: {
|
|
479
|
+
name: "String"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
helmValues: {
|
|
483
|
+
serializedName: "helmValues",
|
|
484
|
+
type: {
|
|
485
|
+
name: "String"
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
overrides: {
|
|
489
|
+
serializedName: "overrides",
|
|
490
|
+
type: {
|
|
491
|
+
name: "Dictionary",
|
|
492
|
+
value: { type: { name: "String" } }
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
const Acr = {
|
|
499
|
+
type: {
|
|
500
|
+
name: "Composite",
|
|
501
|
+
className: "Acr",
|
|
502
|
+
modelProperties: {
|
|
503
|
+
acrSubscriptionId: {
|
|
504
|
+
serializedName: "acrSubscriptionId",
|
|
505
|
+
type: {
|
|
506
|
+
name: "String"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
acrResourceGroup: {
|
|
510
|
+
serializedName: "acrResourceGroup",
|
|
511
|
+
type: {
|
|
512
|
+
name: "String"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
acrRegistryName: {
|
|
516
|
+
serializedName: "acrRegistryName",
|
|
517
|
+
type: {
|
|
518
|
+
name: "String"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
acrRepositoryName: {
|
|
522
|
+
serializedName: "acrRepositoryName",
|
|
523
|
+
type: {
|
|
524
|
+
name: "String"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
const GitHubWorkflowProfileOidcCredentials = {
|
|
531
|
+
type: {
|
|
532
|
+
name: "Composite",
|
|
533
|
+
className: "GitHubWorkflowProfileOidcCredentials",
|
|
534
|
+
modelProperties: {
|
|
535
|
+
azureClientId: {
|
|
536
|
+
serializedName: "azureClientId",
|
|
537
|
+
type: {
|
|
538
|
+
name: "String"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
azureTenantId: {
|
|
542
|
+
serializedName: "azureTenantId",
|
|
543
|
+
type: {
|
|
544
|
+
name: "String"
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
const WorkflowRun = {
|
|
551
|
+
type: {
|
|
552
|
+
name: "Composite",
|
|
553
|
+
className: "WorkflowRun",
|
|
554
|
+
modelProperties: {
|
|
555
|
+
succeeded: {
|
|
556
|
+
serializedName: "succeeded",
|
|
557
|
+
readOnly: true,
|
|
558
|
+
type: {
|
|
559
|
+
name: "Boolean"
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
workflowRunURL: {
|
|
563
|
+
serializedName: "workflowRunURL",
|
|
564
|
+
readOnly: true,
|
|
565
|
+
type: {
|
|
566
|
+
name: "String"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
lastRunAt: {
|
|
570
|
+
serializedName: "lastRunAt",
|
|
571
|
+
readOnly: true,
|
|
572
|
+
type: {
|
|
573
|
+
name: "DateTime"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
const DeleteWorkflowResponse = {
|
|
580
|
+
type: {
|
|
581
|
+
name: "Composite",
|
|
582
|
+
className: "DeleteWorkflowResponse",
|
|
583
|
+
modelProperties: {
|
|
584
|
+
status: {
|
|
585
|
+
serializedName: "status",
|
|
586
|
+
type: {
|
|
587
|
+
name: "String"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
const TagsObject = {
|
|
594
|
+
type: {
|
|
595
|
+
name: "Composite",
|
|
596
|
+
className: "TagsObject",
|
|
597
|
+
modelProperties: {
|
|
598
|
+
tags: {
|
|
599
|
+
serializedName: "tags",
|
|
600
|
+
type: {
|
|
601
|
+
name: "Dictionary",
|
|
602
|
+
value: { type: { name: "String" } }
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
const ProxyResource = {
|
|
609
|
+
type: {
|
|
610
|
+
name: "Composite",
|
|
611
|
+
className: "ProxyResource",
|
|
612
|
+
modelProperties: Object.assign({}, Resource.type.modelProperties)
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
const TrackedResource = {
|
|
616
|
+
type: {
|
|
617
|
+
name: "Composite",
|
|
618
|
+
className: "TrackedResource",
|
|
619
|
+
modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
|
|
620
|
+
serializedName: "tags",
|
|
621
|
+
type: {
|
|
622
|
+
name: "Dictionary",
|
|
623
|
+
value: { type: { name: "String" } }
|
|
624
|
+
}
|
|
625
|
+
}, location: {
|
|
626
|
+
serializedName: "location",
|
|
627
|
+
required: true,
|
|
628
|
+
type: {
|
|
629
|
+
name: "String"
|
|
630
|
+
}
|
|
631
|
+
} })
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
const GitHubOAuthResponse = {
|
|
635
|
+
type: {
|
|
636
|
+
name: "Composite",
|
|
637
|
+
className: "GitHubOAuthResponse",
|
|
638
|
+
modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { username: {
|
|
639
|
+
serializedName: "properties.username",
|
|
640
|
+
type: {
|
|
641
|
+
name: "String"
|
|
642
|
+
}
|
|
643
|
+
} })
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
const Workflow = {
|
|
647
|
+
type: {
|
|
648
|
+
name: "Composite",
|
|
649
|
+
className: "Workflow",
|
|
650
|
+
modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { repositoryOwner: {
|
|
651
|
+
serializedName: "properties.githubWorkflowProfile.repositoryOwner",
|
|
652
|
+
type: {
|
|
653
|
+
name: "String"
|
|
654
|
+
}
|
|
655
|
+
}, repositoryName: {
|
|
656
|
+
serializedName: "properties.githubWorkflowProfile.repositoryName",
|
|
657
|
+
type: {
|
|
658
|
+
name: "String"
|
|
659
|
+
}
|
|
660
|
+
}, branchName: {
|
|
661
|
+
serializedName: "properties.githubWorkflowProfile.branchName",
|
|
662
|
+
type: {
|
|
663
|
+
name: "String"
|
|
664
|
+
}
|
|
665
|
+
}, dockerfile: {
|
|
666
|
+
serializedName: "properties.githubWorkflowProfile.dockerfile",
|
|
667
|
+
type: {
|
|
668
|
+
name: "String"
|
|
669
|
+
}
|
|
670
|
+
}, dockerBuildContext: {
|
|
671
|
+
serializedName: "properties.githubWorkflowProfile.dockerBuildContext",
|
|
672
|
+
type: {
|
|
673
|
+
name: "String"
|
|
674
|
+
}
|
|
675
|
+
}, deploymentProperties: {
|
|
676
|
+
serializedName: "properties.githubWorkflowProfile.deploymentProperties",
|
|
677
|
+
type: {
|
|
678
|
+
name: "Composite",
|
|
679
|
+
className: "DeploymentProperties"
|
|
680
|
+
}
|
|
681
|
+
}, namespace: {
|
|
682
|
+
serializedName: "properties.githubWorkflowProfile.namespace",
|
|
683
|
+
type: {
|
|
684
|
+
name: "String"
|
|
685
|
+
}
|
|
686
|
+
}, acr: {
|
|
687
|
+
serializedName: "properties.githubWorkflowProfile.acr",
|
|
688
|
+
type: {
|
|
689
|
+
name: "Composite",
|
|
690
|
+
className: "Acr"
|
|
691
|
+
}
|
|
692
|
+
}, oidcCredentials: {
|
|
693
|
+
serializedName: "properties.githubWorkflowProfile.oidcCredentials",
|
|
694
|
+
type: {
|
|
695
|
+
name: "Composite",
|
|
696
|
+
className: "GitHubWorkflowProfileOidcCredentials"
|
|
697
|
+
}
|
|
698
|
+
}, aksResourceId: {
|
|
699
|
+
serializedName: "properties.githubWorkflowProfile.aksResourceId",
|
|
700
|
+
type: {
|
|
701
|
+
name: "String"
|
|
702
|
+
}
|
|
703
|
+
}, prURL: {
|
|
704
|
+
serializedName: "properties.githubWorkflowProfile.prURL",
|
|
705
|
+
readOnly: true,
|
|
706
|
+
type: {
|
|
707
|
+
name: "String"
|
|
708
|
+
}
|
|
709
|
+
}, pullNumber: {
|
|
710
|
+
serializedName: "properties.githubWorkflowProfile.pullNumber",
|
|
711
|
+
readOnly: true,
|
|
712
|
+
type: {
|
|
713
|
+
name: "Number"
|
|
714
|
+
}
|
|
715
|
+
}, prStatus: {
|
|
716
|
+
serializedName: "properties.githubWorkflowProfile.prStatus",
|
|
717
|
+
readOnly: true,
|
|
718
|
+
type: {
|
|
719
|
+
name: "String"
|
|
720
|
+
}
|
|
721
|
+
}, lastWorkflowRun: {
|
|
722
|
+
serializedName: "properties.githubWorkflowProfile.lastWorkflowRun",
|
|
723
|
+
type: {
|
|
724
|
+
name: "Composite",
|
|
725
|
+
className: "WorkflowRun"
|
|
726
|
+
}
|
|
727
|
+
}, authStatus: {
|
|
728
|
+
serializedName: "properties.githubWorkflowProfile.authStatus",
|
|
729
|
+
type: {
|
|
730
|
+
name: "String"
|
|
731
|
+
}
|
|
732
|
+
} })
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
737
|
+
__proto__: null,
|
|
738
|
+
OperationListResult: OperationListResult,
|
|
739
|
+
Operation: Operation,
|
|
740
|
+
OperationDisplay: OperationDisplay,
|
|
741
|
+
ErrorResponse: ErrorResponse,
|
|
742
|
+
ErrorDetail: ErrorDetail,
|
|
743
|
+
ErrorAdditionalInfo: ErrorAdditionalInfo,
|
|
744
|
+
GitHubOAuthCallRequest: GitHubOAuthCallRequest,
|
|
745
|
+
GitHubOAuthInfoResponse: GitHubOAuthInfoResponse,
|
|
746
|
+
Resource: Resource,
|
|
747
|
+
SystemData: SystemData,
|
|
748
|
+
GitHubOAuthListResponse: GitHubOAuthListResponse,
|
|
749
|
+
WorkflowListResult: WorkflowListResult,
|
|
750
|
+
DeploymentProperties: DeploymentProperties,
|
|
751
|
+
Acr: Acr,
|
|
752
|
+
GitHubWorkflowProfileOidcCredentials: GitHubWorkflowProfileOidcCredentials,
|
|
753
|
+
WorkflowRun: WorkflowRun,
|
|
754
|
+
DeleteWorkflowResponse: DeleteWorkflowResponse,
|
|
755
|
+
TagsObject: TagsObject,
|
|
756
|
+
ProxyResource: ProxyResource,
|
|
757
|
+
TrackedResource: TrackedResource,
|
|
758
|
+
GitHubOAuthResponse: GitHubOAuthResponse,
|
|
759
|
+
Workflow: Workflow
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
/*
|
|
763
|
+
* Copyright (c) Microsoft Corporation.
|
|
764
|
+
* Licensed under the MIT License.
|
|
765
|
+
*
|
|
766
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
767
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
768
|
+
*/
|
|
769
|
+
const accept = {
|
|
770
|
+
parameterPath: "accept",
|
|
771
|
+
mapper: {
|
|
772
|
+
defaultValue: "application/json",
|
|
773
|
+
isConstant: true,
|
|
774
|
+
serializedName: "Accept",
|
|
775
|
+
type: {
|
|
776
|
+
name: "String"
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
const $host = {
|
|
781
|
+
parameterPath: "$host",
|
|
782
|
+
mapper: {
|
|
783
|
+
serializedName: "$host",
|
|
784
|
+
required: true,
|
|
785
|
+
type: {
|
|
786
|
+
name: "String"
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
skipEncoding: true
|
|
790
|
+
};
|
|
791
|
+
const apiVersion = {
|
|
792
|
+
parameterPath: "apiVersion",
|
|
793
|
+
mapper: {
|
|
794
|
+
defaultValue: "2022-04-01-preview",
|
|
795
|
+
isConstant: true,
|
|
796
|
+
serializedName: "api-version",
|
|
797
|
+
type: {
|
|
798
|
+
name: "String"
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
const contentType = {
|
|
803
|
+
parameterPath: ["options", "contentType"],
|
|
804
|
+
mapper: {
|
|
805
|
+
defaultValue: "application/json",
|
|
806
|
+
isConstant: true,
|
|
807
|
+
serializedName: "Content-Type",
|
|
808
|
+
type: {
|
|
809
|
+
name: "String"
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
const parameters = {
|
|
814
|
+
parameterPath: ["options", "parameters"],
|
|
815
|
+
mapper: GitHubOAuthCallRequest
|
|
816
|
+
};
|
|
817
|
+
const subscriptionId = {
|
|
818
|
+
parameterPath: "subscriptionId",
|
|
819
|
+
mapper: {
|
|
820
|
+
constraints: {
|
|
821
|
+
MinLength: 1
|
|
822
|
+
},
|
|
823
|
+
serializedName: "subscriptionId",
|
|
824
|
+
required: true,
|
|
825
|
+
type: {
|
|
826
|
+
name: "String"
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
const location = {
|
|
831
|
+
parameterPath: "location",
|
|
832
|
+
mapper: {
|
|
833
|
+
constraints: {
|
|
834
|
+
MinLength: 1
|
|
835
|
+
},
|
|
836
|
+
serializedName: "location",
|
|
837
|
+
required: true,
|
|
838
|
+
type: {
|
|
839
|
+
name: "String"
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
const code = {
|
|
844
|
+
parameterPath: "code",
|
|
845
|
+
mapper: {
|
|
846
|
+
serializedName: "code",
|
|
847
|
+
required: true,
|
|
848
|
+
type: {
|
|
849
|
+
name: "String"
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
const state = {
|
|
854
|
+
parameterPath: "state",
|
|
855
|
+
mapper: {
|
|
856
|
+
serializedName: "state",
|
|
857
|
+
required: true,
|
|
858
|
+
type: {
|
|
859
|
+
name: "String"
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
};
|
|
863
|
+
const resourceGroupName = {
|
|
864
|
+
parameterPath: "resourceGroupName",
|
|
865
|
+
mapper: {
|
|
866
|
+
constraints: {
|
|
867
|
+
MaxLength: 90,
|
|
868
|
+
MinLength: 1
|
|
869
|
+
},
|
|
870
|
+
serializedName: "resourceGroupName",
|
|
871
|
+
required: true,
|
|
872
|
+
type: {
|
|
873
|
+
name: "String"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
const managedClusterResource = {
|
|
878
|
+
parameterPath: ["options", "managedClusterResource"],
|
|
879
|
+
mapper: {
|
|
880
|
+
serializedName: "managedClusterResource",
|
|
881
|
+
type: {
|
|
882
|
+
name: "String"
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
const workflowName = {
|
|
887
|
+
parameterPath: "workflowName",
|
|
888
|
+
mapper: {
|
|
889
|
+
constraints: {
|
|
890
|
+
Pattern: new RegExp("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"),
|
|
891
|
+
MaxLength: 63,
|
|
892
|
+
MinLength: 1
|
|
893
|
+
},
|
|
894
|
+
serializedName: "workflowName",
|
|
895
|
+
required: true,
|
|
896
|
+
type: {
|
|
897
|
+
name: "String"
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
const parameters1 = {
|
|
902
|
+
parameterPath: "parameters",
|
|
903
|
+
mapper: Workflow
|
|
904
|
+
};
|
|
905
|
+
const parameters2 = {
|
|
906
|
+
parameterPath: "parameters",
|
|
907
|
+
mapper: TagsObject
|
|
908
|
+
};
|
|
909
|
+
const nextLink = {
|
|
910
|
+
parameterPath: "nextLink",
|
|
911
|
+
mapper: {
|
|
912
|
+
serializedName: "nextLink",
|
|
913
|
+
required: true,
|
|
914
|
+
type: {
|
|
915
|
+
name: "String"
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
skipEncoding: true
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
/*
|
|
922
|
+
* Copyright (c) Microsoft Corporation.
|
|
923
|
+
* Licensed under the MIT License.
|
|
924
|
+
*
|
|
925
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
926
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
927
|
+
*/
|
|
928
|
+
/** Class containing Operations operations. */
|
|
929
|
+
class OperationsImpl {
|
|
930
|
+
/**
|
|
931
|
+
* Initialize a new instance of the class Operations class.
|
|
932
|
+
* @param client Reference to the service client
|
|
933
|
+
*/
|
|
934
|
+
constructor(client) {
|
|
935
|
+
this.client = client;
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Returns list of operations.
|
|
939
|
+
* @param options The options parameters.
|
|
940
|
+
*/
|
|
941
|
+
list(options) {
|
|
942
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$1);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
// Operation Specifications
|
|
946
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
947
|
+
const listOperationSpec$1 = {
|
|
948
|
+
path: "/providers/Microsoft.DevHub/operations",
|
|
949
|
+
httpMethod: "GET",
|
|
950
|
+
responses: {
|
|
951
|
+
200: {
|
|
952
|
+
bodyMapper: OperationListResult
|
|
953
|
+
},
|
|
954
|
+
default: {
|
|
955
|
+
bodyMapper: ErrorResponse
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
queryParameters: [apiVersion],
|
|
959
|
+
urlParameters: [$host],
|
|
960
|
+
headerParameters: [accept],
|
|
961
|
+
serializer: serializer$2
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
/*
|
|
965
|
+
* Copyright (c) Microsoft Corporation.
|
|
966
|
+
* Licensed under the MIT License.
|
|
967
|
+
*
|
|
968
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
969
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
970
|
+
*/
|
|
971
|
+
/// <reference lib="esnext.asynciterable" />
|
|
972
|
+
/** Class containing WorkflowOperations operations. */
|
|
973
|
+
class WorkflowOperationsImpl {
|
|
974
|
+
/**
|
|
975
|
+
* Initialize a new instance of the class WorkflowOperations class.
|
|
976
|
+
* @param client Reference to the service client
|
|
977
|
+
*/
|
|
978
|
+
constructor(client) {
|
|
979
|
+
this.client = client;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Gets a list of workflows associated with the specified subscription.
|
|
983
|
+
* @param options The options parameters.
|
|
984
|
+
*/
|
|
985
|
+
list(options) {
|
|
986
|
+
const iter = this.listPagingAll(options);
|
|
987
|
+
return {
|
|
988
|
+
next() {
|
|
989
|
+
return iter.next();
|
|
990
|
+
},
|
|
991
|
+
[Symbol.asyncIterator]() {
|
|
992
|
+
return this;
|
|
993
|
+
},
|
|
994
|
+
byPage: () => {
|
|
995
|
+
return this.listPagingPage(options);
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
listPagingPage(options) {
|
|
1000
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1001
|
+
let result = yield tslib.__await(this._list(options));
|
|
1002
|
+
yield yield tslib.__await(result.value || []);
|
|
1003
|
+
let continuationToken = result.nextLink;
|
|
1004
|
+
while (continuationToken) {
|
|
1005
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1006
|
+
continuationToken = result.nextLink;
|
|
1007
|
+
yield yield tslib.__await(result.value || []);
|
|
1008
|
+
}
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
listPagingAll(options) {
|
|
1012
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1013
|
+
var e_1, _a;
|
|
1014
|
+
try {
|
|
1015
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1016
|
+
const page = _c.value;
|
|
1017
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1021
|
+
finally {
|
|
1022
|
+
try {
|
|
1023
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1024
|
+
}
|
|
1025
|
+
finally { if (e_1) throw e_1.error; }
|
|
1026
|
+
}
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Gets a list of workflows within a resource group.
|
|
1031
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1032
|
+
* @param options The options parameters.
|
|
1033
|
+
*/
|
|
1034
|
+
listByResourceGroup(resourceGroupName, options) {
|
|
1035
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
1036
|
+
return {
|
|
1037
|
+
next() {
|
|
1038
|
+
return iter.next();
|
|
1039
|
+
},
|
|
1040
|
+
[Symbol.asyncIterator]() {
|
|
1041
|
+
return this;
|
|
1042
|
+
},
|
|
1043
|
+
byPage: () => {
|
|
1044
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
1049
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1050
|
+
let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1051
|
+
yield yield tslib.__await(result.value || []);
|
|
1052
|
+
let continuationToken = result.nextLink;
|
|
1053
|
+
while (continuationToken) {
|
|
1054
|
+
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1055
|
+
continuationToken = result.nextLink;
|
|
1056
|
+
yield yield tslib.__await(result.value || []);
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
1061
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
1062
|
+
var e_2, _a;
|
|
1063
|
+
try {
|
|
1064
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1065
|
+
const page = _c.value;
|
|
1066
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1070
|
+
finally {
|
|
1071
|
+
try {
|
|
1072
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1073
|
+
}
|
|
1074
|
+
finally { if (e_2) throw e_2.error; }
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Gets a list of workflows associated with the specified subscription.
|
|
1080
|
+
* @param options The options parameters.
|
|
1081
|
+
*/
|
|
1082
|
+
_list(options) {
|
|
1083
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Gets a list of workflows within a resource group.
|
|
1087
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1088
|
+
* @param options The options parameters.
|
|
1089
|
+
*/
|
|
1090
|
+
_listByResourceGroup(resourceGroupName, options) {
|
|
1091
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Gets a workflow.
|
|
1095
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1096
|
+
* @param workflowName The name of the workflow resource.
|
|
1097
|
+
* @param options The options parameters.
|
|
1098
|
+
*/
|
|
1099
|
+
get(resourceGroupName, workflowName, options) {
|
|
1100
|
+
return this.client.sendOperationRequest({ resourceGroupName, workflowName, options }, getOperationSpec);
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Creates or updates a workflow
|
|
1104
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1105
|
+
* @param workflowName The name of the workflow resource.
|
|
1106
|
+
* @param parameters Resource representation of a workflow
|
|
1107
|
+
* @param options The options parameters.
|
|
1108
|
+
*/
|
|
1109
|
+
createOrUpdate(resourceGroupName, workflowName, parameters, options) {
|
|
1110
|
+
return this.client.sendOperationRequest({ resourceGroupName, workflowName, parameters, options }, createOrUpdateOperationSpec);
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Deletes a workflow
|
|
1114
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1115
|
+
* @param workflowName The name of the workflow resource.
|
|
1116
|
+
* @param options The options parameters.
|
|
1117
|
+
*/
|
|
1118
|
+
delete(resourceGroupName, workflowName, options) {
|
|
1119
|
+
return this.client.sendOperationRequest({ resourceGroupName, workflowName, options }, deleteOperationSpec);
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Updates tags on a workflow.
|
|
1123
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1124
|
+
* @param workflowName The name of the workflow resource.
|
|
1125
|
+
* @param parameters Parameters supplied to the Update Workflow Tags operation.
|
|
1126
|
+
* @param options The options parameters.
|
|
1127
|
+
*/
|
|
1128
|
+
updateTags(resourceGroupName, workflowName, parameters, options) {
|
|
1129
|
+
return this.client.sendOperationRequest({ resourceGroupName, workflowName, parameters, options }, updateTagsOperationSpec);
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* ListNext
|
|
1133
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1134
|
+
* @param options The options parameters.
|
|
1135
|
+
*/
|
|
1136
|
+
_listNext(nextLink, options) {
|
|
1137
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* ListByResourceGroupNext
|
|
1141
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1142
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
1143
|
+
* @param options The options parameters.
|
|
1144
|
+
*/
|
|
1145
|
+
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
1146
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
// Operation Specifications
|
|
1150
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1151
|
+
const listOperationSpec = {
|
|
1152
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/workflows",
|
|
1153
|
+
httpMethod: "GET",
|
|
1154
|
+
responses: {
|
|
1155
|
+
200: {
|
|
1156
|
+
bodyMapper: WorkflowListResult
|
|
1157
|
+
},
|
|
1158
|
+
default: {
|
|
1159
|
+
bodyMapper: ErrorResponse
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
queryParameters: [apiVersion],
|
|
1163
|
+
urlParameters: [$host, subscriptionId],
|
|
1164
|
+
headerParameters: [accept],
|
|
1165
|
+
serializer: serializer$1
|
|
1166
|
+
};
|
|
1167
|
+
const listByResourceGroupOperationSpec = {
|
|
1168
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevHub/workflows",
|
|
1169
|
+
httpMethod: "GET",
|
|
1170
|
+
responses: {
|
|
1171
|
+
200: {
|
|
1172
|
+
bodyMapper: WorkflowListResult
|
|
1173
|
+
},
|
|
1174
|
+
default: {
|
|
1175
|
+
bodyMapper: ErrorResponse
|
|
1176
|
+
}
|
|
1177
|
+
},
|
|
1178
|
+
queryParameters: [apiVersion, managedClusterResource],
|
|
1179
|
+
urlParameters: [
|
|
1180
|
+
$host,
|
|
1181
|
+
subscriptionId,
|
|
1182
|
+
resourceGroupName
|
|
1183
|
+
],
|
|
1184
|
+
headerParameters: [accept],
|
|
1185
|
+
serializer: serializer$1
|
|
1186
|
+
};
|
|
1187
|
+
const getOperationSpec = {
|
|
1188
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevHub/workflows/{workflowName}",
|
|
1189
|
+
httpMethod: "GET",
|
|
1190
|
+
responses: {
|
|
1191
|
+
200: {
|
|
1192
|
+
bodyMapper: Workflow
|
|
1193
|
+
},
|
|
1194
|
+
default: {
|
|
1195
|
+
bodyMapper: ErrorResponse
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
queryParameters: [apiVersion],
|
|
1199
|
+
urlParameters: [
|
|
1200
|
+
$host,
|
|
1201
|
+
subscriptionId,
|
|
1202
|
+
resourceGroupName,
|
|
1203
|
+
workflowName
|
|
1204
|
+
],
|
|
1205
|
+
headerParameters: [accept],
|
|
1206
|
+
serializer: serializer$1
|
|
1207
|
+
};
|
|
1208
|
+
const createOrUpdateOperationSpec = {
|
|
1209
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevHub/workflows/{workflowName}",
|
|
1210
|
+
httpMethod: "PUT",
|
|
1211
|
+
responses: {
|
|
1212
|
+
200: {
|
|
1213
|
+
bodyMapper: Workflow
|
|
1214
|
+
},
|
|
1215
|
+
201: {
|
|
1216
|
+
bodyMapper: Workflow
|
|
1217
|
+
},
|
|
1218
|
+
default: {
|
|
1219
|
+
bodyMapper: ErrorResponse
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
requestBody: parameters1,
|
|
1223
|
+
queryParameters: [apiVersion],
|
|
1224
|
+
urlParameters: [
|
|
1225
|
+
$host,
|
|
1226
|
+
subscriptionId,
|
|
1227
|
+
resourceGroupName,
|
|
1228
|
+
workflowName
|
|
1229
|
+
],
|
|
1230
|
+
headerParameters: [accept, contentType],
|
|
1231
|
+
mediaType: "json",
|
|
1232
|
+
serializer: serializer$1
|
|
1233
|
+
};
|
|
1234
|
+
const deleteOperationSpec = {
|
|
1235
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevHub/workflows/{workflowName}",
|
|
1236
|
+
httpMethod: "DELETE",
|
|
1237
|
+
responses: {
|
|
1238
|
+
200: {
|
|
1239
|
+
bodyMapper: DeleteWorkflowResponse
|
|
1240
|
+
},
|
|
1241
|
+
204: {},
|
|
1242
|
+
default: {
|
|
1243
|
+
bodyMapper: ErrorResponse
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
queryParameters: [apiVersion],
|
|
1247
|
+
urlParameters: [
|
|
1248
|
+
$host,
|
|
1249
|
+
subscriptionId,
|
|
1250
|
+
resourceGroupName,
|
|
1251
|
+
workflowName
|
|
1252
|
+
],
|
|
1253
|
+
headerParameters: [accept],
|
|
1254
|
+
serializer: serializer$1
|
|
1255
|
+
};
|
|
1256
|
+
const updateTagsOperationSpec = {
|
|
1257
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevHub/workflows/{workflowName}",
|
|
1258
|
+
httpMethod: "PATCH",
|
|
1259
|
+
responses: {
|
|
1260
|
+
200: {
|
|
1261
|
+
bodyMapper: Workflow
|
|
1262
|
+
},
|
|
1263
|
+
default: {
|
|
1264
|
+
bodyMapper: ErrorResponse
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
requestBody: parameters2,
|
|
1268
|
+
queryParameters: [apiVersion],
|
|
1269
|
+
urlParameters: [
|
|
1270
|
+
$host,
|
|
1271
|
+
subscriptionId,
|
|
1272
|
+
resourceGroupName,
|
|
1273
|
+
workflowName
|
|
1274
|
+
],
|
|
1275
|
+
headerParameters: [accept, contentType],
|
|
1276
|
+
mediaType: "json",
|
|
1277
|
+
serializer: serializer$1
|
|
1278
|
+
};
|
|
1279
|
+
const listNextOperationSpec = {
|
|
1280
|
+
path: "{nextLink}",
|
|
1281
|
+
httpMethod: "GET",
|
|
1282
|
+
responses: {
|
|
1283
|
+
200: {
|
|
1284
|
+
bodyMapper: WorkflowListResult
|
|
1285
|
+
},
|
|
1286
|
+
default: {
|
|
1287
|
+
bodyMapper: ErrorResponse
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
queryParameters: [apiVersion],
|
|
1291
|
+
urlParameters: [
|
|
1292
|
+
$host,
|
|
1293
|
+
subscriptionId,
|
|
1294
|
+
nextLink
|
|
1295
|
+
],
|
|
1296
|
+
headerParameters: [accept],
|
|
1297
|
+
serializer: serializer$1
|
|
1298
|
+
};
|
|
1299
|
+
const listByResourceGroupNextOperationSpec = {
|
|
1300
|
+
path: "{nextLink}",
|
|
1301
|
+
httpMethod: "GET",
|
|
1302
|
+
responses: {
|
|
1303
|
+
200: {
|
|
1304
|
+
bodyMapper: WorkflowListResult
|
|
1305
|
+
},
|
|
1306
|
+
default: {
|
|
1307
|
+
bodyMapper: ErrorResponse
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
queryParameters: [apiVersion, managedClusterResource],
|
|
1311
|
+
urlParameters: [
|
|
1312
|
+
$host,
|
|
1313
|
+
subscriptionId,
|
|
1314
|
+
resourceGroupName,
|
|
1315
|
+
nextLink
|
|
1316
|
+
],
|
|
1317
|
+
headerParameters: [accept],
|
|
1318
|
+
serializer: serializer$1
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
/*
|
|
1322
|
+
* Copyright (c) Microsoft Corporation.
|
|
1323
|
+
* Licensed under the MIT License.
|
|
1324
|
+
*
|
|
1325
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1326
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1327
|
+
*/
|
|
1328
|
+
class DeveloperHubServiceClient extends coreClient__namespace.ServiceClient {
|
|
1329
|
+
/**
|
|
1330
|
+
* Initializes a new instance of the DeveloperHubServiceClient class.
|
|
1331
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1332
|
+
* @param subscriptionId The ID of the target subscription.
|
|
1333
|
+
* @param options The parameter options
|
|
1334
|
+
*/
|
|
1335
|
+
constructor(credentials, subscriptionId, options) {
|
|
1336
|
+
var _a, _b;
|
|
1337
|
+
if (credentials === undefined) {
|
|
1338
|
+
throw new Error("'credentials' cannot be null");
|
|
1339
|
+
}
|
|
1340
|
+
if (subscriptionId === undefined) {
|
|
1341
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
1342
|
+
}
|
|
1343
|
+
// Initializing default values for options
|
|
1344
|
+
if (!options) {
|
|
1345
|
+
options = {};
|
|
1346
|
+
}
|
|
1347
|
+
const defaults = {
|
|
1348
|
+
requestContentType: "application/json; charset=utf-8",
|
|
1349
|
+
credential: credentials
|
|
1350
|
+
};
|
|
1351
|
+
const packageDetails = `azsdk-js-arm-devhub/1.0.0-beta.1`;
|
|
1352
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1353
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1354
|
+
: `${packageDetails}`;
|
|
1355
|
+
if (!options.credentialScopes) {
|
|
1356
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1357
|
+
}
|
|
1358
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1359
|
+
userAgentPrefix
|
|
1360
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1361
|
+
super(optionsWithDefaults);
|
|
1362
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
1363
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1364
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1365
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1366
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1367
|
+
}
|
|
1368
|
+
if (!options ||
|
|
1369
|
+
!options.pipeline ||
|
|
1370
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
1371
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
1372
|
+
this.pipeline.removePolicy({
|
|
1373
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1374
|
+
});
|
|
1375
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1376
|
+
credential: credentials,
|
|
1377
|
+
scopes: `${optionsWithDefaults.credentialScopes}`,
|
|
1378
|
+
challengeCallbacks: {
|
|
1379
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1380
|
+
}
|
|
1381
|
+
}));
|
|
1382
|
+
}
|
|
1383
|
+
// Parameter assignments
|
|
1384
|
+
this.subscriptionId = subscriptionId;
|
|
1385
|
+
// Assigning values to Constant parameters
|
|
1386
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
1387
|
+
this.apiVersion = options.apiVersion || "2022-04-01-preview";
|
|
1388
|
+
this.operations = new OperationsImpl(this);
|
|
1389
|
+
this.workflowOperations = new WorkflowOperationsImpl(this);
|
|
1390
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1391
|
+
}
|
|
1392
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1393
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1394
|
+
if (!apiVersion) {
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
const apiVersionPolicy = {
|
|
1398
|
+
name: "CustomApiVersionPolicy",
|
|
1399
|
+
sendRequest(request, next) {
|
|
1400
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1401
|
+
const param = request.url.split("?");
|
|
1402
|
+
if (param.length > 1) {
|
|
1403
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1404
|
+
if (item.indexOf("api-version") > -1) {
|
|
1405
|
+
return "api-version=" + apiVersion;
|
|
1406
|
+
}
|
|
1407
|
+
else {
|
|
1408
|
+
return item;
|
|
1409
|
+
}
|
|
1410
|
+
});
|
|
1411
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1412
|
+
}
|
|
1413
|
+
return next(request);
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
};
|
|
1417
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1418
|
+
}
|
|
1419
|
+
/**
|
|
1420
|
+
* Gets GitHubOAuth info used to authenticate users with the Developer Hub GitHub App.
|
|
1421
|
+
* @param location The name of Azure region.
|
|
1422
|
+
* @param options The options parameters.
|
|
1423
|
+
*/
|
|
1424
|
+
gitHubOAuth(location, options) {
|
|
1425
|
+
return this.sendOperationRequest({ location, options }, gitHubOAuthOperationSpec);
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.
|
|
1429
|
+
* @param location The name of Azure region.
|
|
1430
|
+
* @param code The code response from authenticating the GitHub App.
|
|
1431
|
+
* @param state The state response from authenticating the GitHub App.
|
|
1432
|
+
* @param options The options parameters.
|
|
1433
|
+
*/
|
|
1434
|
+
gitHubOAuthCallback(location, code, state, options) {
|
|
1435
|
+
return this.sendOperationRequest({ location, code, state, options }, gitHubOAuthCallbackOperationSpec);
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Callback URL to hit once authenticated with GitHub App to have the service store the OAuth token.
|
|
1439
|
+
* @param location The name of Azure region.
|
|
1440
|
+
* @param options The options parameters.
|
|
1441
|
+
*/
|
|
1442
|
+
listGitHubOAuth(location, options) {
|
|
1443
|
+
return this.sendOperationRequest({ location, options }, listGitHubOAuthOperationSpec);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
// Operation Specifications
|
|
1447
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1448
|
+
const gitHubOAuthOperationSpec = {
|
|
1449
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth/default/getGitHubOAuthInfo",
|
|
1450
|
+
httpMethod: "POST",
|
|
1451
|
+
responses: {
|
|
1452
|
+
200: {
|
|
1453
|
+
bodyMapper: GitHubOAuthInfoResponse
|
|
1454
|
+
},
|
|
1455
|
+
default: {
|
|
1456
|
+
bodyMapper: ErrorResponse
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
requestBody: parameters,
|
|
1460
|
+
queryParameters: [apiVersion],
|
|
1461
|
+
urlParameters: [
|
|
1462
|
+
$host,
|
|
1463
|
+
subscriptionId,
|
|
1464
|
+
location
|
|
1465
|
+
],
|
|
1466
|
+
headerParameters: [accept, contentType],
|
|
1467
|
+
mediaType: "json",
|
|
1468
|
+
serializer
|
|
1469
|
+
};
|
|
1470
|
+
const gitHubOAuthCallbackOperationSpec = {
|
|
1471
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth/default",
|
|
1472
|
+
httpMethod: "GET",
|
|
1473
|
+
responses: {
|
|
1474
|
+
200: {
|
|
1475
|
+
bodyMapper: GitHubOAuthResponse
|
|
1476
|
+
},
|
|
1477
|
+
default: {
|
|
1478
|
+
bodyMapper: ErrorResponse
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
queryParameters: [apiVersion, code, state],
|
|
1482
|
+
urlParameters: [
|
|
1483
|
+
$host,
|
|
1484
|
+
subscriptionId,
|
|
1485
|
+
location
|
|
1486
|
+
],
|
|
1487
|
+
headerParameters: [accept],
|
|
1488
|
+
serializer
|
|
1489
|
+
};
|
|
1490
|
+
const listGitHubOAuthOperationSpec = {
|
|
1491
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/githuboauth",
|
|
1492
|
+
httpMethod: "GET",
|
|
1493
|
+
responses: {
|
|
1494
|
+
200: {
|
|
1495
|
+
bodyMapper: GitHubOAuthListResponse
|
|
1496
|
+
},
|
|
1497
|
+
default: {
|
|
1498
|
+
bodyMapper: ErrorResponse
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
queryParameters: [apiVersion],
|
|
1502
|
+
urlParameters: [
|
|
1503
|
+
$host,
|
|
1504
|
+
subscriptionId,
|
|
1505
|
+
location
|
|
1506
|
+
],
|
|
1507
|
+
headerParameters: [accept],
|
|
1508
|
+
serializer
|
|
1509
|
+
};
|
|
1510
|
+
|
|
1511
|
+
exports.DeveloperHubServiceClient = DeveloperHubServiceClient;
|
|
1512
|
+
//# sourceMappingURL=index.js.map
|