@amerged/ohmyhost-mcp 0.1.28 → 0.1.30
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/README.md +1 -1
- package/THIRD_PARTY_NOTICES.md +1419 -0
- package/dist/{chunk-GIP4M4CK.js → chunk-MVT76LJ5.js} +92 -28
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +24153 -2354
- package/package.json +1 -1
- package/src/apps/mcp/package.json +1 -1
- package/src/apps/mcp/src/local-client.ts +12 -2
- package/src/apps/mcp/src/local-server.ts +333 -4
- package/src/apps/product-cli/package.json +4 -2
- package/src/apps/product-cli/src/cli.ts +312 -2
- package/src/apps/product-cli/src/command.ts +261 -0
- package/src/apps/product-cli/src/composition.ts +74 -4
- package/src/apps/product-cli/src/index.ts +6 -0
- package/src/apps/product-cli/src/product-api.ts +5 -0
- package/src/apps/product-cli/src/project-link-store.ts +92 -1
- package/src/apps/product-cli/src/repository-init.ts +2 -2
- package/src/apps/product-cli/src/runtime-contract.ts +34 -1
- package/src/apps/product-cli/src/source-managed-client.ts +189 -0
- package/src/apps/product-cli/src/source-publication-store.ts +563 -0
- package/src/apps/product-cli/src/source-publisher.ts +195 -0
- package/src/apps/product-cli/src/source-workspace.ts +552 -0
- package/src/packages/agent-skills/src/generated-skill-resources.ts +43 -15
- package/src/packages/contracts/package.json +10 -0
- package/src/packages/contracts/src/database-migration-admission.ts +65 -125
- package/src/packages/contracts/src/database-migration-errors.ts +14 -0
- package/src/packages/contracts/src/database-migration-lexical.ts +180 -0
- package/src/packages/contracts/src/database-migration-policies.ts +150 -0
- package/src/packages/contracts/src/framework-admission.ts +1 -1
- package/src/packages/contracts/src/framework-build-script.mjs +1 -2
- package/src/packages/contracts/src/managed-sources.ts +582 -0
- package/src/packages/contracts/src/mcp-source-codec.ts +150 -0
- package/src/packages/contracts/src/operation-failure.ts +22 -6
- package/src/packages/contracts/src/problem-policy.ts +61 -14
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +92 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +541 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +911 -4
- package/src/packages/workos-auth-contracts/src/tokens.ts +61 -4
|
@@ -15,8 +15,13 @@ import type {
|
|
|
15
15
|
ApplyPaidProjectDomainResponses,
|
|
16
16
|
ChangeDatabaseComputeErrors,
|
|
17
17
|
ChangeDatabaseComputeResponses,
|
|
18
|
+
ChangeManagedSourceErrors,
|
|
19
|
+
ChangeManagedSourceResponses,
|
|
18
20
|
ChangeProjectHandleErrors,
|
|
19
21
|
ChangeProjectHandleResponses,
|
|
22
|
+
CommitManagedSourceUploadErrors,
|
|
23
|
+
CommitManagedSourceUploadResponses,
|
|
24
|
+
CommitSha,
|
|
20
25
|
CompleteCloudflareDnsAuthorizationErrors,
|
|
21
26
|
CompleteCloudflareDnsAuthorizationResponses,
|
|
22
27
|
CompleteGithubSourceAuthorizationErrors,
|
|
@@ -43,6 +48,8 @@ import type {
|
|
|
43
48
|
CreateDeploymentErrors,
|
|
44
49
|
CreateDeploymentRequest,
|
|
45
50
|
CreateDeploymentResponses,
|
|
51
|
+
CreateManagedSourceUploadErrors,
|
|
52
|
+
CreateManagedSourceUploadResponses,
|
|
46
53
|
CreateOrganizationErrors,
|
|
47
54
|
CreateOrganizationRequest,
|
|
48
55
|
CreateOrganizationResponses,
|
|
@@ -67,6 +74,8 @@ import type {
|
|
|
67
74
|
DeletePaidProjectDomainResponses,
|
|
68
75
|
DeleteProjectErrors,
|
|
69
76
|
DeleteProjectResponses,
|
|
77
|
+
DiffManagedSourceErrors,
|
|
78
|
+
DiffManagedSourceResponses,
|
|
70
79
|
DisableManagedMailReceivingErrors,
|
|
71
80
|
DisableManagedMailReceivingResponses,
|
|
72
81
|
EnsureProjectDevShareLinkErrors,
|
|
@@ -100,6 +109,8 @@ import type {
|
|
|
100
109
|
GetManagedMailDomainResponses,
|
|
101
110
|
GetManagedMailMessageErrors,
|
|
102
111
|
GetManagedMailMessageResponses,
|
|
112
|
+
GetManagedSourceUploadErrors,
|
|
113
|
+
GetManagedSourceUploadResponses,
|
|
103
114
|
GetOperationErrors,
|
|
104
115
|
GetOperationResponses,
|
|
105
116
|
GetOrganizationAccountErrors,
|
|
@@ -132,6 +143,8 @@ import type {
|
|
|
132
143
|
GetProjectStatusResponses,
|
|
133
144
|
GetPublicDeploymentStatsErrors,
|
|
134
145
|
GetPublicDeploymentStatsResponses,
|
|
146
|
+
InitializeManagedSourceErrors,
|
|
147
|
+
InitializeManagedSourceResponses,
|
|
135
148
|
LinkProjectSourceErrors,
|
|
136
149
|
LinkProjectSourceRequest,
|
|
137
150
|
LinkProjectSourceResponses,
|
|
@@ -145,6 +158,10 @@ import type {
|
|
|
145
158
|
ListFunctionRunsResponses,
|
|
146
159
|
ListManagedMailMessagesErrors,
|
|
147
160
|
ListManagedMailMessagesResponses,
|
|
161
|
+
ListManagedSourceFilesErrors,
|
|
162
|
+
ListManagedSourceFilesResponses,
|
|
163
|
+
ListManagedSourceVersionsErrors,
|
|
164
|
+
ListManagedSourceVersionsResponses,
|
|
148
165
|
ListProjectDatabaseAccessErrors,
|
|
149
166
|
ListProjectDatabaseAccessResponses,
|
|
150
167
|
ListProjectsErrors,
|
|
@@ -153,6 +170,14 @@ import type {
|
|
|
153
170
|
ListUserApiKeysResponses,
|
|
154
171
|
ManagedMailDomainRequest,
|
|
155
172
|
ManagedMailWebhookRequest,
|
|
173
|
+
ManagedSourceBlobRequest,
|
|
174
|
+
ManagedSourceChangesRequest,
|
|
175
|
+
ManagedSourceFinalizeRequest,
|
|
176
|
+
ManagedSourceInitializeRequest,
|
|
177
|
+
ManagedSourcePath,
|
|
178
|
+
ManagedSourceRestoreRequest,
|
|
179
|
+
ManagedSourceSwitchRequest,
|
|
180
|
+
ManagedSourceUploadRequest,
|
|
156
181
|
PaidDomainRequest,
|
|
157
182
|
PlanDeploymentErrors,
|
|
158
183
|
PlanDeploymentPromotionErrors,
|
|
@@ -178,6 +203,8 @@ import type {
|
|
|
178
203
|
PutEnvironmentSecretErrors,
|
|
179
204
|
PutEnvironmentSecretRequest,
|
|
180
205
|
PutEnvironmentSecretResponses,
|
|
206
|
+
PutManagedSourceBlobErrors,
|
|
207
|
+
PutManagedSourceBlobResponses,
|
|
181
208
|
QueryProjectDatabaseErrors,
|
|
182
209
|
QueryProjectDatabaseResponses,
|
|
183
210
|
ReconcileOperationErrors,
|
|
@@ -186,6 +213,8 @@ import type {
|
|
|
186
213
|
RecordSignupSourceResponses,
|
|
187
214
|
RegisterFeatureInterestErrors,
|
|
188
215
|
RegisterFeatureInterestResponses,
|
|
216
|
+
RestoreManagedSourceErrors,
|
|
217
|
+
RestoreManagedSourceResponses,
|
|
189
218
|
RetryManagedMailMessageErrors,
|
|
190
219
|
RetryManagedMailMessageResponses,
|
|
191
220
|
RevokeCurrentSessionErrors,
|
|
@@ -221,6 +250,8 @@ import type {
|
|
|
221
250
|
SubmitContactRequestResponses,
|
|
222
251
|
SubmitFeedbackErrors,
|
|
223
252
|
SubmitFeedbackResponses,
|
|
253
|
+
SwitchManagedSourceErrors,
|
|
254
|
+
SwitchManagedSourceResponses,
|
|
224
255
|
Ulid,
|
|
225
256
|
UserApiKeyId,
|
|
226
257
|
VerifyManagedMailWebhookErrors,
|
|
@@ -2248,11 +2279,14 @@ export const linkProjectSource = <ThrowOnError extends boolean = true>(
|
|
|
2248
2279
|
|
|
2249
2280
|
/**
|
|
2250
2281
|
* Get the linked source status
|
|
2282
|
+
*
|
|
2283
|
+
* GitHub sources use the unchanged released projection by default. Set include_binding=true to request the exact GitHub source connection ID and generation. Managed sources always return their full source binding. The explicit projections are strict; binding fields are never inferred from a legacy response.
|
|
2251
2284
|
*/
|
|
2252
2285
|
export const getProjectSource = <ThrowOnError extends boolean = true>(
|
|
2253
2286
|
parameters: {
|
|
2254
2287
|
"X-Request-Id"?: string;
|
|
2255
2288
|
project_id: Ulid;
|
|
2289
|
+
include_binding?: boolean;
|
|
2256
2290
|
},
|
|
2257
2291
|
options?: Options<never, ThrowOnError>,
|
|
2258
2292
|
): RequestResult<GetProjectSourceResponses, GetProjectSourceErrors, ThrowOnError, "data"> => {
|
|
@@ -2263,6 +2297,7 @@ export const getProjectSource = <ThrowOnError extends boolean = true>(
|
|
|
2263
2297
|
args: [
|
|
2264
2298
|
{ in: "headers", key: "X-Request-Id" },
|
|
2265
2299
|
{ in: "path", key: "project_id" },
|
|
2300
|
+
{ in: "query", key: "include_binding" },
|
|
2266
2301
|
],
|
|
2267
2302
|
},
|
|
2268
2303
|
],
|
|
@@ -2281,6 +2316,512 @@ export const getProjectSource = <ThrowOnError extends boolean = true>(
|
|
|
2281
2316
|
});
|
|
2282
2317
|
};
|
|
2283
2318
|
|
|
2319
|
+
/**
|
|
2320
|
+
* Initialize a managed Cloudflare Git source
|
|
2321
|
+
*/
|
|
2322
|
+
export const initializeManagedSource = <ThrowOnError extends boolean = true>(
|
|
2323
|
+
parameters: {
|
|
2324
|
+
"X-Request-Id"?: string;
|
|
2325
|
+
"Idempotency-Key": string;
|
|
2326
|
+
project_id: Ulid;
|
|
2327
|
+
managedSourceInitializeRequest: ManagedSourceInitializeRequest;
|
|
2328
|
+
},
|
|
2329
|
+
options?: Options<never, ThrowOnError>,
|
|
2330
|
+
): RequestResult<
|
|
2331
|
+
InitializeManagedSourceResponses,
|
|
2332
|
+
InitializeManagedSourceErrors,
|
|
2333
|
+
ThrowOnError,
|
|
2334
|
+
"data"
|
|
2335
|
+
> => {
|
|
2336
|
+
const params = buildClientParams(
|
|
2337
|
+
[parameters],
|
|
2338
|
+
[
|
|
2339
|
+
{
|
|
2340
|
+
args: [
|
|
2341
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2342
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2343
|
+
{ in: "path", key: "project_id" },
|
|
2344
|
+
{ key: "managedSourceInitializeRequest", map: "body" },
|
|
2345
|
+
],
|
|
2346
|
+
},
|
|
2347
|
+
],
|
|
2348
|
+
);
|
|
2349
|
+
return (options?.client ?? client).post<
|
|
2350
|
+
InitializeManagedSourceResponses,
|
|
2351
|
+
InitializeManagedSourceErrors,
|
|
2352
|
+
ThrowOnError,
|
|
2353
|
+
"data"
|
|
2354
|
+
>({
|
|
2355
|
+
responseStyle: "data",
|
|
2356
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2357
|
+
url: "/v1/projects/{project_id}/source:initialize",
|
|
2358
|
+
...options,
|
|
2359
|
+
...params,
|
|
2360
|
+
headers: {
|
|
2361
|
+
"Content-Type": "application/json",
|
|
2362
|
+
...options?.headers,
|
|
2363
|
+
...params.headers,
|
|
2364
|
+
},
|
|
2365
|
+
});
|
|
2366
|
+
};
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Read managed source files
|
|
2370
|
+
*/
|
|
2371
|
+
export const listManagedSourceFiles = <ThrowOnError extends boolean = true>(
|
|
2372
|
+
parameters: {
|
|
2373
|
+
"X-Request-Id"?: string;
|
|
2374
|
+
project_id: Ulid;
|
|
2375
|
+
commit_sha?: CommitSha;
|
|
2376
|
+
path?: ManagedSourcePath;
|
|
2377
|
+
},
|
|
2378
|
+
options?: Options<never, ThrowOnError>,
|
|
2379
|
+
): RequestResult<
|
|
2380
|
+
ListManagedSourceFilesResponses,
|
|
2381
|
+
ListManagedSourceFilesErrors,
|
|
2382
|
+
ThrowOnError,
|
|
2383
|
+
"data"
|
|
2384
|
+
> => {
|
|
2385
|
+
const params = buildClientParams(
|
|
2386
|
+
[parameters],
|
|
2387
|
+
[
|
|
2388
|
+
{
|
|
2389
|
+
args: [
|
|
2390
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2391
|
+
{ in: "path", key: "project_id" },
|
|
2392
|
+
{ in: "query", key: "commit_sha" },
|
|
2393
|
+
{ in: "query", key: "path" },
|
|
2394
|
+
],
|
|
2395
|
+
},
|
|
2396
|
+
],
|
|
2397
|
+
);
|
|
2398
|
+
return (options?.client ?? client).get<
|
|
2399
|
+
ListManagedSourceFilesResponses,
|
|
2400
|
+
ListManagedSourceFilesErrors,
|
|
2401
|
+
ThrowOnError,
|
|
2402
|
+
"data"
|
|
2403
|
+
>({
|
|
2404
|
+
responseStyle: "data",
|
|
2405
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2406
|
+
url: "/v1/projects/{project_id}/source/files",
|
|
2407
|
+
...options,
|
|
2408
|
+
...params,
|
|
2409
|
+
});
|
|
2410
|
+
};
|
|
2411
|
+
|
|
2412
|
+
/**
|
|
2413
|
+
* Read managed source version history
|
|
2414
|
+
*/
|
|
2415
|
+
export const listManagedSourceVersions = <ThrowOnError extends boolean = true>(
|
|
2416
|
+
parameters: {
|
|
2417
|
+
"X-Request-Id"?: string;
|
|
2418
|
+
project_id: Ulid;
|
|
2419
|
+
limit?: number;
|
|
2420
|
+
before_commit_sha?: CommitSha;
|
|
2421
|
+
},
|
|
2422
|
+
options?: Options<never, ThrowOnError>,
|
|
2423
|
+
): RequestResult<
|
|
2424
|
+
ListManagedSourceVersionsResponses,
|
|
2425
|
+
ListManagedSourceVersionsErrors,
|
|
2426
|
+
ThrowOnError,
|
|
2427
|
+
"data"
|
|
2428
|
+
> => {
|
|
2429
|
+
const params = buildClientParams(
|
|
2430
|
+
[parameters],
|
|
2431
|
+
[
|
|
2432
|
+
{
|
|
2433
|
+
args: [
|
|
2434
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2435
|
+
{ in: "path", key: "project_id" },
|
|
2436
|
+
{ in: "query", key: "limit" },
|
|
2437
|
+
{ in: "query", key: "before_commit_sha" },
|
|
2438
|
+
],
|
|
2439
|
+
},
|
|
2440
|
+
],
|
|
2441
|
+
);
|
|
2442
|
+
return (options?.client ?? client).get<
|
|
2443
|
+
ListManagedSourceVersionsResponses,
|
|
2444
|
+
ListManagedSourceVersionsErrors,
|
|
2445
|
+
ThrowOnError,
|
|
2446
|
+
"data"
|
|
2447
|
+
>({
|
|
2448
|
+
responseStyle: "data",
|
|
2449
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2450
|
+
url: "/v1/projects/{project_id}/source/versions",
|
|
2451
|
+
...options,
|
|
2452
|
+
...params,
|
|
2453
|
+
});
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* Compare two managed source versions
|
|
2458
|
+
*/
|
|
2459
|
+
export const diffManagedSource = <ThrowOnError extends boolean = true>(
|
|
2460
|
+
parameters: {
|
|
2461
|
+
"X-Request-Id"?: string;
|
|
2462
|
+
project_id: Ulid;
|
|
2463
|
+
from_commit_sha: CommitSha;
|
|
2464
|
+
to_commit_sha: CommitSha;
|
|
2465
|
+
},
|
|
2466
|
+
options?: Options<never, ThrowOnError>,
|
|
2467
|
+
): RequestResult<DiffManagedSourceResponses, DiffManagedSourceErrors, ThrowOnError, "data"> => {
|
|
2468
|
+
const params = buildClientParams(
|
|
2469
|
+
[parameters],
|
|
2470
|
+
[
|
|
2471
|
+
{
|
|
2472
|
+
args: [
|
|
2473
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2474
|
+
{ in: "path", key: "project_id" },
|
|
2475
|
+
{ in: "query", key: "from_commit_sha" },
|
|
2476
|
+
{ in: "query", key: "to_commit_sha" },
|
|
2477
|
+
],
|
|
2478
|
+
},
|
|
2479
|
+
],
|
|
2480
|
+
);
|
|
2481
|
+
return (options?.client ?? client).get<
|
|
2482
|
+
DiffManagedSourceResponses,
|
|
2483
|
+
DiffManagedSourceErrors,
|
|
2484
|
+
ThrowOnError,
|
|
2485
|
+
"data"
|
|
2486
|
+
>({
|
|
2487
|
+
responseStyle: "data",
|
|
2488
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2489
|
+
url: "/v1/projects/{project_id}/source/diff",
|
|
2490
|
+
...options,
|
|
2491
|
+
...params,
|
|
2492
|
+
});
|
|
2493
|
+
};
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* Save an atomic managed source file batch
|
|
2497
|
+
*/
|
|
2498
|
+
export const changeManagedSource = <ThrowOnError extends boolean = true>(
|
|
2499
|
+
parameters: {
|
|
2500
|
+
"X-Request-Id"?: string;
|
|
2501
|
+
"Idempotency-Key": string;
|
|
2502
|
+
project_id: Ulid;
|
|
2503
|
+
managedSourceChangesRequest: ManagedSourceChangesRequest;
|
|
2504
|
+
},
|
|
2505
|
+
options?: Options<never, ThrowOnError>,
|
|
2506
|
+
): RequestResult<ChangeManagedSourceResponses, ChangeManagedSourceErrors, ThrowOnError, "data"> => {
|
|
2507
|
+
const params = buildClientParams(
|
|
2508
|
+
[parameters],
|
|
2509
|
+
[
|
|
2510
|
+
{
|
|
2511
|
+
args: [
|
|
2512
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2513
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2514
|
+
{ in: "path", key: "project_id" },
|
|
2515
|
+
{ key: "managedSourceChangesRequest", map: "body" },
|
|
2516
|
+
],
|
|
2517
|
+
},
|
|
2518
|
+
],
|
|
2519
|
+
);
|
|
2520
|
+
return (options?.client ?? client).post<
|
|
2521
|
+
ChangeManagedSourceResponses,
|
|
2522
|
+
ChangeManagedSourceErrors,
|
|
2523
|
+
ThrowOnError,
|
|
2524
|
+
"data"
|
|
2525
|
+
>({
|
|
2526
|
+
responseStyle: "data",
|
|
2527
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2528
|
+
url: "/v1/projects/{project_id}/source/changes",
|
|
2529
|
+
...options,
|
|
2530
|
+
...params,
|
|
2531
|
+
headers: {
|
|
2532
|
+
"Content-Type": "application/json",
|
|
2533
|
+
...options?.headers,
|
|
2534
|
+
...params.headers,
|
|
2535
|
+
},
|
|
2536
|
+
});
|
|
2537
|
+
};
|
|
2538
|
+
|
|
2539
|
+
/**
|
|
2540
|
+
* Restore an earlier file tree as a new version
|
|
2541
|
+
*/
|
|
2542
|
+
export const restoreManagedSource = <ThrowOnError extends boolean = true>(
|
|
2543
|
+
parameters: {
|
|
2544
|
+
"X-Request-Id"?: string;
|
|
2545
|
+
"Idempotency-Key": string;
|
|
2546
|
+
project_id: Ulid;
|
|
2547
|
+
managedSourceRestoreRequest: ManagedSourceRestoreRequest;
|
|
2548
|
+
},
|
|
2549
|
+
options?: Options<never, ThrowOnError>,
|
|
2550
|
+
): RequestResult<
|
|
2551
|
+
RestoreManagedSourceResponses,
|
|
2552
|
+
RestoreManagedSourceErrors,
|
|
2553
|
+
ThrowOnError,
|
|
2554
|
+
"data"
|
|
2555
|
+
> => {
|
|
2556
|
+
const params = buildClientParams(
|
|
2557
|
+
[parameters],
|
|
2558
|
+
[
|
|
2559
|
+
{
|
|
2560
|
+
args: [
|
|
2561
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2562
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2563
|
+
{ in: "path", key: "project_id" },
|
|
2564
|
+
{ key: "managedSourceRestoreRequest", map: "body" },
|
|
2565
|
+
],
|
|
2566
|
+
},
|
|
2567
|
+
],
|
|
2568
|
+
);
|
|
2569
|
+
return (options?.client ?? client).post<
|
|
2570
|
+
RestoreManagedSourceResponses,
|
|
2571
|
+
RestoreManagedSourceErrors,
|
|
2572
|
+
ThrowOnError,
|
|
2573
|
+
"data"
|
|
2574
|
+
>({
|
|
2575
|
+
responseStyle: "data",
|
|
2576
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2577
|
+
url: "/v1/projects/{project_id}/source:restore",
|
|
2578
|
+
...options,
|
|
2579
|
+
...params,
|
|
2580
|
+
headers: {
|
|
2581
|
+
"Content-Type": "application/json",
|
|
2582
|
+
...options?.headers,
|
|
2583
|
+
...params.headers,
|
|
2584
|
+
},
|
|
2585
|
+
});
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2588
|
+
/**
|
|
2589
|
+
* Start a stable managed source snapshot upload
|
|
2590
|
+
*/
|
|
2591
|
+
export const createManagedSourceUpload = <ThrowOnError extends boolean = true>(
|
|
2592
|
+
parameters: {
|
|
2593
|
+
"X-Request-Id"?: string;
|
|
2594
|
+
"Idempotency-Key": string;
|
|
2595
|
+
project_id: Ulid;
|
|
2596
|
+
managedSourceUploadRequest: ManagedSourceUploadRequest;
|
|
2597
|
+
},
|
|
2598
|
+
options?: Options<never, ThrowOnError>,
|
|
2599
|
+
): RequestResult<
|
|
2600
|
+
CreateManagedSourceUploadResponses,
|
|
2601
|
+
CreateManagedSourceUploadErrors,
|
|
2602
|
+
ThrowOnError,
|
|
2603
|
+
"data"
|
|
2604
|
+
> => {
|
|
2605
|
+
const params = buildClientParams(
|
|
2606
|
+
[parameters],
|
|
2607
|
+
[
|
|
2608
|
+
{
|
|
2609
|
+
args: [
|
|
2610
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2611
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2612
|
+
{ in: "path", key: "project_id" },
|
|
2613
|
+
{ key: "managedSourceUploadRequest", map: "body" },
|
|
2614
|
+
],
|
|
2615
|
+
},
|
|
2616
|
+
],
|
|
2617
|
+
);
|
|
2618
|
+
return (options?.client ?? client).post<
|
|
2619
|
+
CreateManagedSourceUploadResponses,
|
|
2620
|
+
CreateManagedSourceUploadErrors,
|
|
2621
|
+
ThrowOnError,
|
|
2622
|
+
"data"
|
|
2623
|
+
>({
|
|
2624
|
+
responseStyle: "data",
|
|
2625
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2626
|
+
url: "/v1/projects/{project_id}/source/uploads",
|
|
2627
|
+
...options,
|
|
2628
|
+
...params,
|
|
2629
|
+
headers: {
|
|
2630
|
+
"Content-Type": "application/json",
|
|
2631
|
+
...options?.headers,
|
|
2632
|
+
...params.headers,
|
|
2633
|
+
},
|
|
2634
|
+
});
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
/**
|
|
2638
|
+
* Read a managed source upload receipt
|
|
2639
|
+
*/
|
|
2640
|
+
export const getManagedSourceUpload = <ThrowOnError extends boolean = true>(
|
|
2641
|
+
parameters: {
|
|
2642
|
+
"X-Request-Id"?: string;
|
|
2643
|
+
project_id: Ulid;
|
|
2644
|
+
operation_id: Ulid;
|
|
2645
|
+
},
|
|
2646
|
+
options?: Options<never, ThrowOnError>,
|
|
2647
|
+
): RequestResult<
|
|
2648
|
+
GetManagedSourceUploadResponses,
|
|
2649
|
+
GetManagedSourceUploadErrors,
|
|
2650
|
+
ThrowOnError,
|
|
2651
|
+
"data"
|
|
2652
|
+
> => {
|
|
2653
|
+
const params = buildClientParams(
|
|
2654
|
+
[parameters],
|
|
2655
|
+
[
|
|
2656
|
+
{
|
|
2657
|
+
args: [
|
|
2658
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2659
|
+
{ in: "path", key: "project_id" },
|
|
2660
|
+
{ in: "path", key: "operation_id" },
|
|
2661
|
+
],
|
|
2662
|
+
},
|
|
2663
|
+
],
|
|
2664
|
+
);
|
|
2665
|
+
return (options?.client ?? client).get<
|
|
2666
|
+
GetManagedSourceUploadResponses,
|
|
2667
|
+
GetManagedSourceUploadErrors,
|
|
2668
|
+
ThrowOnError,
|
|
2669
|
+
"data"
|
|
2670
|
+
>({
|
|
2671
|
+
responseStyle: "data",
|
|
2672
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2673
|
+
url: "/v1/projects/{project_id}/source/uploads/{operation_id}",
|
|
2674
|
+
...options,
|
|
2675
|
+
...params,
|
|
2676
|
+
});
|
|
2677
|
+
};
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* Upload one source file with its content hash
|
|
2681
|
+
*/
|
|
2682
|
+
export const putManagedSourceBlob = <ThrowOnError extends boolean = true>(
|
|
2683
|
+
parameters: {
|
|
2684
|
+
"X-Request-Id"?: string;
|
|
2685
|
+
"Idempotency-Key": string;
|
|
2686
|
+
project_id: Ulid;
|
|
2687
|
+
operation_id: Ulid;
|
|
2688
|
+
managedSourceBlobRequest: ManagedSourceBlobRequest;
|
|
2689
|
+
},
|
|
2690
|
+
options?: Options<never, ThrowOnError>,
|
|
2691
|
+
): RequestResult<
|
|
2692
|
+
PutManagedSourceBlobResponses,
|
|
2693
|
+
PutManagedSourceBlobErrors,
|
|
2694
|
+
ThrowOnError,
|
|
2695
|
+
"data"
|
|
2696
|
+
> => {
|
|
2697
|
+
const params = buildClientParams(
|
|
2698
|
+
[parameters],
|
|
2699
|
+
[
|
|
2700
|
+
{
|
|
2701
|
+
args: [
|
|
2702
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2703
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2704
|
+
{ in: "path", key: "project_id" },
|
|
2705
|
+
{ in: "path", key: "operation_id" },
|
|
2706
|
+
{ key: "managedSourceBlobRequest", map: "body" },
|
|
2707
|
+
],
|
|
2708
|
+
},
|
|
2709
|
+
],
|
|
2710
|
+
);
|
|
2711
|
+
return (options?.client ?? client).put<
|
|
2712
|
+
PutManagedSourceBlobResponses,
|
|
2713
|
+
PutManagedSourceBlobErrors,
|
|
2714
|
+
ThrowOnError,
|
|
2715
|
+
"data"
|
|
2716
|
+
>({
|
|
2717
|
+
responseStyle: "data",
|
|
2718
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2719
|
+
url: "/v1/projects/{project_id}/source/uploads/{operation_id}/files",
|
|
2720
|
+
...options,
|
|
2721
|
+
...params,
|
|
2722
|
+
headers: {
|
|
2723
|
+
"Content-Type": "application/json",
|
|
2724
|
+
...options?.headers,
|
|
2725
|
+
...params.headers,
|
|
2726
|
+
},
|
|
2727
|
+
});
|
|
2728
|
+
};
|
|
2729
|
+
|
|
2730
|
+
/**
|
|
2731
|
+
* Commit one complete uploaded source snapshot
|
|
2732
|
+
*/
|
|
2733
|
+
export const commitManagedSourceUpload = <ThrowOnError extends boolean = true>(
|
|
2734
|
+
parameters: {
|
|
2735
|
+
"X-Request-Id"?: string;
|
|
2736
|
+
"Idempotency-Key": string;
|
|
2737
|
+
project_id: Ulid;
|
|
2738
|
+
operation_id: Ulid;
|
|
2739
|
+
managedSourceFinalizeRequest: ManagedSourceFinalizeRequest;
|
|
2740
|
+
},
|
|
2741
|
+
options?: Options<never, ThrowOnError>,
|
|
2742
|
+
): RequestResult<
|
|
2743
|
+
CommitManagedSourceUploadResponses,
|
|
2744
|
+
CommitManagedSourceUploadErrors,
|
|
2745
|
+
ThrowOnError,
|
|
2746
|
+
"data"
|
|
2747
|
+
> => {
|
|
2748
|
+
const params = buildClientParams(
|
|
2749
|
+
[parameters],
|
|
2750
|
+
[
|
|
2751
|
+
{
|
|
2752
|
+
args: [
|
|
2753
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2754
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2755
|
+
{ in: "path", key: "project_id" },
|
|
2756
|
+
{ in: "path", key: "operation_id" },
|
|
2757
|
+
{ key: "managedSourceFinalizeRequest", map: "body" },
|
|
2758
|
+
],
|
|
2759
|
+
},
|
|
2760
|
+
],
|
|
2761
|
+
);
|
|
2762
|
+
return (options?.client ?? client).post<
|
|
2763
|
+
CommitManagedSourceUploadResponses,
|
|
2764
|
+
CommitManagedSourceUploadErrors,
|
|
2765
|
+
ThrowOnError,
|
|
2766
|
+
"data"
|
|
2767
|
+
>({
|
|
2768
|
+
responseStyle: "data",
|
|
2769
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2770
|
+
url: "/v1/projects/{project_id}/source/uploads/{operation_id}:commit",
|
|
2771
|
+
...options,
|
|
2772
|
+
...params,
|
|
2773
|
+
headers: {
|
|
2774
|
+
"Content-Type": "application/json",
|
|
2775
|
+
...options?.headers,
|
|
2776
|
+
...params.headers,
|
|
2777
|
+
},
|
|
2778
|
+
});
|
|
2779
|
+
};
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* Switch an existing GitHub project to a prepared managed source
|
|
2783
|
+
*/
|
|
2784
|
+
export const switchManagedSource = <ThrowOnError extends boolean = true>(
|
|
2785
|
+
parameters: {
|
|
2786
|
+
"X-Request-Id"?: string;
|
|
2787
|
+
"Idempotency-Key": string;
|
|
2788
|
+
project_id: Ulid;
|
|
2789
|
+
managedSourceSwitchRequest: ManagedSourceSwitchRequest;
|
|
2790
|
+
},
|
|
2791
|
+
options?: Options<never, ThrowOnError>,
|
|
2792
|
+
): RequestResult<SwitchManagedSourceResponses, SwitchManagedSourceErrors, ThrowOnError, "data"> => {
|
|
2793
|
+
const params = buildClientParams(
|
|
2794
|
+
[parameters],
|
|
2795
|
+
[
|
|
2796
|
+
{
|
|
2797
|
+
args: [
|
|
2798
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2799
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
2800
|
+
{ in: "path", key: "project_id" },
|
|
2801
|
+
{ key: "managedSourceSwitchRequest", map: "body" },
|
|
2802
|
+
],
|
|
2803
|
+
},
|
|
2804
|
+
],
|
|
2805
|
+
);
|
|
2806
|
+
return (options?.client ?? client).post<
|
|
2807
|
+
SwitchManagedSourceResponses,
|
|
2808
|
+
SwitchManagedSourceErrors,
|
|
2809
|
+
ThrowOnError,
|
|
2810
|
+
"data"
|
|
2811
|
+
>({
|
|
2812
|
+
responseStyle: "data",
|
|
2813
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2814
|
+
url: "/v1/projects/{project_id}/source:switch",
|
|
2815
|
+
...options,
|
|
2816
|
+
...params,
|
|
2817
|
+
headers: {
|
|
2818
|
+
"Content-Type": "application/json",
|
|
2819
|
+
...options?.headers,
|
|
2820
|
+
...params.headers,
|
|
2821
|
+
},
|
|
2822
|
+
});
|
|
2823
|
+
};
|
|
2824
|
+
|
|
2284
2825
|
/**
|
|
2285
2826
|
* Get automatic GitHub push deployment status
|
|
2286
2827
|
*/
|