@amerged/ohmyhost-cli 0.1.54 → 0.1.55
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/dist/bin.js +1 -1
- package/dist/{chunk-ZEKUTE7M.js → chunk-4OAAJX5B.js} +297 -54
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/cli.ts +70 -25
- package/src/apps/product-cli/src/command.ts +52 -5
- package/src/apps/product-cli/src/product-api.ts +36 -2
- package/src/apps/product-cli/src/repository-init.ts +46 -9
- package/src/apps/product-cli/src/runtime-contract.ts +14 -4
- package/src/packages/contracts/package.json +5 -0
- package/src/packages/contracts/src/database-events.ts +1 -0
- package/src/packages/contracts/src/database-migration-admission.ts +33 -3
- package/src/packages/contracts/src/database-migration-errors.ts +10 -2
- package/src/packages/contracts/src/feedback.ts +9 -0
- package/src/packages/contracts/src/framework-admission.ts +4 -0
- package/src/packages/contracts/src/framework-source-rules.ts +55 -0
- package/src/packages/contracts/src/operation-failure.ts +8 -0
- package/src/packages/contracts/src/problem-policy.ts +74 -2
- package/src/packages/contracts/src/project-exports.ts +30 -0
- package/src/packages/contracts/src/wfp-dispatch.ts +43 -0
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +33 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +253 -13
- package/src/packages/sdk-ts/src/generated/types.gen.ts +385 -11
- package/src/packages/workos-auth-contracts/src/webhooks.ts +7 -0
|
@@ -73,6 +73,8 @@ import type {
|
|
|
73
73
|
CreateProjectDevAccessTicketErrors,
|
|
74
74
|
CreateProjectDevAccessTicketResponses,
|
|
75
75
|
CreateProjectErrors,
|
|
76
|
+
CreateProjectExportDownloadLinkErrors,
|
|
77
|
+
CreateProjectExportDownloadLinkResponses,
|
|
76
78
|
CreateProjectExportErrors,
|
|
77
79
|
CreateProjectExportResponses,
|
|
78
80
|
CreateProjectRequest,
|
|
@@ -110,6 +112,8 @@ import type {
|
|
|
110
112
|
DiffManagedSourceResponses,
|
|
111
113
|
DisableManagedMailReceivingErrors,
|
|
112
114
|
DisableManagedMailReceivingResponses,
|
|
115
|
+
DisconnectGithubOrganizationErrors,
|
|
116
|
+
DisconnectGithubOrganizationResponses,
|
|
113
117
|
EnsureProjectDevShareLinkErrors,
|
|
114
118
|
EnsureProjectDevShareLinkResponses,
|
|
115
119
|
FeedbackSubmission,
|
|
@@ -218,6 +222,8 @@ import type {
|
|
|
218
222
|
ListManagedSourceVersionsResponses,
|
|
219
223
|
ListNativeAuthUsersErrors,
|
|
220
224
|
ListNativeAuthUsersResponses,
|
|
225
|
+
ListOrganizationMcpConnectionsErrors,
|
|
226
|
+
ListOrganizationMcpConnectionsResponses,
|
|
221
227
|
ListProjectDatabaseAccessErrors,
|
|
222
228
|
ListProjectDatabaseAccessResponses,
|
|
223
229
|
ListProjectDatabaseScheduleRunsErrors,
|
|
@@ -308,6 +314,8 @@ import type {
|
|
|
308
314
|
RevokeCurrentSessionResponses,
|
|
309
315
|
RevokeNativeAuthUserSessionsErrors,
|
|
310
316
|
RevokeNativeAuthUserSessionsResponses,
|
|
317
|
+
RevokeOrganizationMcpConnectionErrors,
|
|
318
|
+
RevokeOrganizationMcpConnectionResponses,
|
|
311
319
|
RevokeProjectDatabaseAccessErrors,
|
|
312
320
|
RevokeProjectDatabaseAccessResponses,
|
|
313
321
|
RevokeProjectDevShareLinkErrors,
|
|
@@ -318,6 +326,8 @@ import type {
|
|
|
318
326
|
RevokeWorkspaceMailDomainDnsAuthorizationResponses,
|
|
319
327
|
RollbackDeploymentErrors,
|
|
320
328
|
RollbackDeploymentResponses,
|
|
329
|
+
RotateManagedMailWebhookSecretErrors,
|
|
330
|
+
RotateManagedMailWebhookSecretResponses,
|
|
321
331
|
RotateProjectDevShareLinkErrors,
|
|
322
332
|
RotateProjectDevShareLinkResponses,
|
|
323
333
|
RunProjectDatabaseScheduleErrors,
|
|
@@ -1892,6 +1902,48 @@ export const connectGithubOrganization = <ThrowOnError extends boolean = true>(
|
|
|
1892
1902
|
});
|
|
1893
1903
|
};
|
|
1894
1904
|
|
|
1905
|
+
/**
|
|
1906
|
+
* Disconnect the workspace GitHub connection
|
|
1907
|
+
*
|
|
1908
|
+
* Owner only. Revokes the workspace connection and every GitHub repository grant under it, so auto-deploy and linked sources stop at once. The GitHub App stays installed for other workspaces; reconnecting starts a new connection.
|
|
1909
|
+
*/
|
|
1910
|
+
export const disconnectGithubOrganization = <ThrowOnError extends boolean = true>(
|
|
1911
|
+
parameters: {
|
|
1912
|
+
"X-Request-Id"?: string;
|
|
1913
|
+
organization_id: Ulid;
|
|
1914
|
+
},
|
|
1915
|
+
options?: Options<never, ThrowOnError>,
|
|
1916
|
+
): RequestResult<
|
|
1917
|
+
DisconnectGithubOrganizationResponses,
|
|
1918
|
+
DisconnectGithubOrganizationErrors,
|
|
1919
|
+
ThrowOnError,
|
|
1920
|
+
"data"
|
|
1921
|
+
> => {
|
|
1922
|
+
const params = buildClientParams(
|
|
1923
|
+
[parameters],
|
|
1924
|
+
[
|
|
1925
|
+
{
|
|
1926
|
+
args: [
|
|
1927
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
1928
|
+
{ in: "path", key: "organization_id" },
|
|
1929
|
+
],
|
|
1930
|
+
},
|
|
1931
|
+
],
|
|
1932
|
+
);
|
|
1933
|
+
return (options?.client ?? client).delete<
|
|
1934
|
+
DisconnectGithubOrganizationResponses,
|
|
1935
|
+
DisconnectGithubOrganizationErrors,
|
|
1936
|
+
ThrowOnError,
|
|
1937
|
+
"data"
|
|
1938
|
+
>({
|
|
1939
|
+
responseStyle: "data",
|
|
1940
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1941
|
+
url: "/v1/organizations/{organization_id}/github",
|
|
1942
|
+
...options,
|
|
1943
|
+
...params,
|
|
1944
|
+
});
|
|
1945
|
+
};
|
|
1946
|
+
|
|
1895
1947
|
/**
|
|
1896
1948
|
* Read the workspace GitHub connection
|
|
1897
1949
|
*/
|
|
@@ -1932,6 +1984,92 @@ export const getGithubOrganizationConnection = <ThrowOnError extends boolean = t
|
|
|
1932
1984
|
});
|
|
1933
1985
|
};
|
|
1934
1986
|
|
|
1987
|
+
/**
|
|
1988
|
+
* List the MCP clients connected to the workspace
|
|
1989
|
+
*
|
|
1990
|
+
* Owner only. Lists each connected MCP client and the member who connected it, once per member, client and consent. Consents already disconnected are not listed.
|
|
1991
|
+
*/
|
|
1992
|
+
export const listOrganizationMcpConnections = <ThrowOnError extends boolean = true>(
|
|
1993
|
+
parameters: {
|
|
1994
|
+
"X-Request-Id"?: string;
|
|
1995
|
+
organization_id: Ulid;
|
|
1996
|
+
},
|
|
1997
|
+
options?: Options<never, ThrowOnError>,
|
|
1998
|
+
): RequestResult<
|
|
1999
|
+
ListOrganizationMcpConnectionsResponses,
|
|
2000
|
+
ListOrganizationMcpConnectionsErrors,
|
|
2001
|
+
ThrowOnError,
|
|
2002
|
+
"data"
|
|
2003
|
+
> => {
|
|
2004
|
+
const params = buildClientParams(
|
|
2005
|
+
[parameters],
|
|
2006
|
+
[
|
|
2007
|
+
{
|
|
2008
|
+
args: [
|
|
2009
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2010
|
+
{ in: "path", key: "organization_id" },
|
|
2011
|
+
],
|
|
2012
|
+
},
|
|
2013
|
+
],
|
|
2014
|
+
);
|
|
2015
|
+
return (options?.client ?? client).get<
|
|
2016
|
+
ListOrganizationMcpConnectionsResponses,
|
|
2017
|
+
ListOrganizationMcpConnectionsErrors,
|
|
2018
|
+
ThrowOnError,
|
|
2019
|
+
"data"
|
|
2020
|
+
>({
|
|
2021
|
+
responseStyle: "data",
|
|
2022
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2023
|
+
url: "/v1/organizations/{organization_id}/mcp-connections",
|
|
2024
|
+
...options,
|
|
2025
|
+
...params,
|
|
2026
|
+
});
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
/**
|
|
2030
|
+
* Disconnect an MCP client from the workspace
|
|
2031
|
+
*
|
|
2032
|
+
* Owner only. Disconnects the client's consent from this workspace only; the member's other workspaces are unaffected. Answers pending while an active provider use of the consent drains. Repeat the request until it answers revoked.
|
|
2033
|
+
*/
|
|
2034
|
+
export const revokeOrganizationMcpConnection = <ThrowOnError extends boolean = true>(
|
|
2035
|
+
parameters: {
|
|
2036
|
+
"X-Request-Id"?: string;
|
|
2037
|
+
organization_id: Ulid;
|
|
2038
|
+
connection_id: string;
|
|
2039
|
+
},
|
|
2040
|
+
options?: Options<never, ThrowOnError>,
|
|
2041
|
+
): RequestResult<
|
|
2042
|
+
RevokeOrganizationMcpConnectionResponses,
|
|
2043
|
+
RevokeOrganizationMcpConnectionErrors,
|
|
2044
|
+
ThrowOnError,
|
|
2045
|
+
"data"
|
|
2046
|
+
> => {
|
|
2047
|
+
const params = buildClientParams(
|
|
2048
|
+
[parameters],
|
|
2049
|
+
[
|
|
2050
|
+
{
|
|
2051
|
+
args: [
|
|
2052
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
2053
|
+
{ in: "path", key: "organization_id" },
|
|
2054
|
+
{ in: "path", key: "connection_id" },
|
|
2055
|
+
],
|
|
2056
|
+
},
|
|
2057
|
+
],
|
|
2058
|
+
);
|
|
2059
|
+
return (options?.client ?? client).delete<
|
|
2060
|
+
RevokeOrganizationMcpConnectionResponses,
|
|
2061
|
+
RevokeOrganizationMcpConnectionErrors,
|
|
2062
|
+
ThrowOnError,
|
|
2063
|
+
"data"
|
|
2064
|
+
>({
|
|
2065
|
+
responseStyle: "data",
|
|
2066
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2067
|
+
url: "/v1/organizations/{organization_id}/mcp-connections/{connection_id}",
|
|
2068
|
+
...options,
|
|
2069
|
+
...params,
|
|
2070
|
+
});
|
|
2071
|
+
};
|
|
2072
|
+
|
|
1935
2073
|
/**
|
|
1936
2074
|
* Read the workspace's referral link
|
|
1937
2075
|
*
|
|
@@ -2366,7 +2504,7 @@ export const getFeedback = <ThrowOnError extends boolean = true>(
|
|
|
2366
2504
|
/**
|
|
2367
2505
|
* Complete the bound GitHub browser authorization
|
|
2368
2506
|
*
|
|
2369
|
-
* Browser callback only. Revalidates the original user session or user API key, workspace Owner/Admin authority and authorization expiry, then privately verifies the GitHub account and installation. A valid installation callback without an OAuth code continues automatically through OAuth. Completion records the workspace connection without building or returning provider credentials. Previously issued project authorizations remain supported during rollout.
|
|
2507
|
+
* Browser callback only. Requires the portal session of the same user who started the authorization (a browser with no session, another user's session or an unknown state is answered as an unknown state and consumes nothing). Revalidates the original user session or user API key, workspace Owner/Admin authority and authorization expiry, then privately verifies the GitHub account and installation. A valid installation callback without an OAuth code continues automatically through OAuth. Completion records the workspace connection without building or returning provider credentials. Previously issued project authorizations remain supported during rollout.
|
|
2370
2508
|
*/
|
|
2371
2509
|
export const completeGithubSourceAuthorization = <ThrowOnError extends boolean = true>(
|
|
2372
2510
|
parameters: {
|
|
@@ -2412,7 +2550,7 @@ export const completeGithubSourceAuthorization = <ThrowOnError extends boolean =
|
|
|
2412
2550
|
/**
|
|
2413
2551
|
* Complete one Cloudflare DNS authorization
|
|
2414
2552
|
*
|
|
2415
|
-
* Successful callbacks require code and state and complete one previously authenticated project authorization. Provider rejection instead supplies error and optional error_description, error_uri and state; it returns a static actionable problem without completing authorization or reflecting provider input. Success and error parameters cannot be combined. This callback grants no general unauthenticated product access.
|
|
2553
|
+
* Successful callbacks require code and state and complete one previously authenticated project authorization, only in a browser signed in to the portal as the user who started it; without that session the callback answers a confirmation problem and consumes nothing. Provider rejection instead supplies error and optional error_description, error_uri and state; it returns a static actionable problem without completing authorization or reflecting provider input. Success and error parameters cannot be combined. This callback grants no general unauthenticated product access.
|
|
2416
2554
|
*/
|
|
2417
2555
|
export const completeCloudflareDnsAuthorization = <ThrowOnError extends boolean = true>(
|
|
2418
2556
|
parameters?: {
|
|
@@ -2936,7 +3074,7 @@ export const createProjectExport = <ThrowOnError extends boolean = true>(
|
|
|
2936
3074
|
/**
|
|
2937
3075
|
* Read export progress and its verified 24-hour download capability
|
|
2938
3076
|
*
|
|
2939
|
-
* Owner-only, including at zero credits. Poll queued/running jobs after next_poll_after_seconds. A verified SQL ZIP is retained seven days.
|
|
3077
|
+
* Owner-only, including at zero credits. Poll queued/running jobs after next_poll_after_seconds. A verified SQL ZIP is retained seven days. This read never signs a download URL, so download_url and download_expires_at are always null here. Request a link with POST download-links. Neither the password nor any permanent storage credential can be retrieved. Generic operation reads never contain a download capability.
|
|
2940
3078
|
*/
|
|
2941
3079
|
export const getProjectExport = <ThrowOnError extends boolean = true>(
|
|
2942
3080
|
parameters: {
|
|
@@ -2972,6 +3110,50 @@ export const getProjectExport = <ThrowOnError extends boolean = true>(
|
|
|
2972
3110
|
});
|
|
2973
3111
|
};
|
|
2974
3112
|
|
|
3113
|
+
/**
|
|
3114
|
+
* Sign one 24-hour download link of a ready SQL export
|
|
3115
|
+
*
|
|
3116
|
+
* Owner-only. Each link is audited under the caller before it is signed, and an organization may take six links a minute; a seventh is refused with 429 and a retry after 60 seconds. Treat the returned URL as a secret bearer capability; never store it in files, notes or source. The link is not idempotent, so a repeated request signs another link and is audited again. Requires at least 24 hours of retention left on the archive, otherwise 409.
|
|
3117
|
+
*/
|
|
3118
|
+
export const createProjectExportDownloadLink = <ThrowOnError extends boolean = true>(
|
|
3119
|
+
parameters: {
|
|
3120
|
+
"X-Request-Id"?: string;
|
|
3121
|
+
project_id: Ulid;
|
|
3122
|
+
export_id: Ulid;
|
|
3123
|
+
},
|
|
3124
|
+
options?: Options<never, ThrowOnError>,
|
|
3125
|
+
): RequestResult<
|
|
3126
|
+
CreateProjectExportDownloadLinkResponses,
|
|
3127
|
+
CreateProjectExportDownloadLinkErrors,
|
|
3128
|
+
ThrowOnError,
|
|
3129
|
+
"data"
|
|
3130
|
+
> => {
|
|
3131
|
+
const params = buildClientParams(
|
|
3132
|
+
[parameters],
|
|
3133
|
+
[
|
|
3134
|
+
{
|
|
3135
|
+
args: [
|
|
3136
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
3137
|
+
{ in: "path", key: "project_id" },
|
|
3138
|
+
{ in: "path", key: "export_id" },
|
|
3139
|
+
],
|
|
3140
|
+
},
|
|
3141
|
+
],
|
|
3142
|
+
);
|
|
3143
|
+
return (options?.client ?? client).post<
|
|
3144
|
+
CreateProjectExportDownloadLinkResponses,
|
|
3145
|
+
CreateProjectExportDownloadLinkErrors,
|
|
3146
|
+
ThrowOnError,
|
|
3147
|
+
"data"
|
|
3148
|
+
>({
|
|
3149
|
+
responseStyle: "data",
|
|
3150
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3151
|
+
url: "/v1/projects/{project_id}/exports/{export_id}/download-links",
|
|
3152
|
+
...options,
|
|
3153
|
+
...params,
|
|
3154
|
+
});
|
|
3155
|
+
};
|
|
3156
|
+
|
|
2975
3157
|
/**
|
|
2976
3158
|
* Read a project's optional monthly credit budget
|
|
2977
3159
|
*
|
|
@@ -3670,6 +3852,7 @@ export const setProjectPoweredByFlag = <ThrowOnError extends boolean = true>(
|
|
|
3670
3852
|
export const createProjectDevAccessTicket = <ThrowOnError extends boolean = true>(
|
|
3671
3853
|
parameters: {
|
|
3672
3854
|
"X-Request-Id"?: string;
|
|
3855
|
+
"Idempotency-Key"?: string;
|
|
3673
3856
|
project_id: Ulid;
|
|
3674
3857
|
},
|
|
3675
3858
|
options?: Options<never, ThrowOnError>,
|
|
@@ -3685,6 +3868,7 @@ export const createProjectDevAccessTicket = <ThrowOnError extends boolean = true
|
|
|
3685
3868
|
{
|
|
3686
3869
|
args: [
|
|
3687
3870
|
{ in: "headers", key: "X-Request-Id" },
|
|
3871
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
3688
3872
|
{ in: "path", key: "project_id" },
|
|
3689
3873
|
],
|
|
3690
3874
|
},
|
|
@@ -5283,11 +5467,12 @@ export const listProjectDatabaseAccess = <ThrowOnError extends boolean = true>(
|
|
|
5283
5467
|
/**
|
|
5284
5468
|
* Issue one time-bound PostgreSQL credential for Dev or Prod
|
|
5285
5469
|
*
|
|
5286
|
-
* Owner-authorized direct PostgreSQL login for the project's own database, returned exactly once and never retrievable again. Mode read joins the read-only role, mode write joins the same restricted runtime role the application uses; neither can change schema, and application
|
|
5470
|
+
* Owner-authorized direct PostgreSQL login for the project's own database, returned exactly once and never retrievable again. Mode read joins the read-only role, mode write joins the same restricted runtime role the application uses; neither can change schema. The login gets no implicit row bypass, but its holder can set ohmyhost.request_claims and so act as any application user; treat a credential as read (or write) access to all application rows. The lifetime is 5 minutes to 24 hours (3600 seconds by default) and PostgreSQL refuses new logins after it; the platform ends remaining sessions within 15 minutes after expiry, at the latest. At most three active credentials exist per project environment. Database compute wakes and is metered normally, and existing credit grace and Stop budgets apply. Revoke the credential as soon as the work is finished and never store the connection URI in files, notes or source.
|
|
5287
5471
|
*/
|
|
5288
5472
|
export const createProjectDatabaseAccess = <ThrowOnError extends boolean = true>(
|
|
5289
5473
|
parameters: {
|
|
5290
5474
|
"X-Request-Id"?: string;
|
|
5475
|
+
"Idempotency-Key"?: string;
|
|
5291
5476
|
project_id: Ulid;
|
|
5292
5477
|
projectDatabaseAccessRequest: ProjectDatabaseAccessRequest;
|
|
5293
5478
|
},
|
|
@@ -5304,6 +5489,7 @@ export const createProjectDatabaseAccess = <ThrowOnError extends boolean = true>
|
|
|
5304
5489
|
{
|
|
5305
5490
|
args: [
|
|
5306
5491
|
{ in: "headers", key: "X-Request-Id" },
|
|
5492
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
5307
5493
|
{ in: "path", key: "project_id" },
|
|
5308
5494
|
{ key: "projectDatabaseAccessRequest", map: "body" },
|
|
5309
5495
|
],
|
|
@@ -5427,7 +5613,7 @@ export const createProjectDatabaseTable = <ThrowOnError extends boolean = true>(
|
|
|
5427
5613
|
/**
|
|
5428
5614
|
* List the project's database watches
|
|
5429
5615
|
*
|
|
5430
|
-
* Returns every watch of the selected environment. Listing wakes a sleeping database.
|
|
5616
|
+
* Returns every watch of the selected environment. Listing wakes a sleeping database, so while the project's Stop budget is reached it is refused with 402, as create and delete are.
|
|
5431
5617
|
*/
|
|
5432
5618
|
export const listProjectDatabaseWatches = <ThrowOnError extends boolean = true>(
|
|
5433
5619
|
parameters: {
|
|
@@ -5570,7 +5756,7 @@ export const deleteProjectDatabaseWatch = <ThrowOnError extends boolean = true>(
|
|
|
5570
5756
|
/**
|
|
5571
5757
|
* List the project's database webhooks
|
|
5572
5758
|
*
|
|
5573
|
-
* Returns every webhook of the selected environment without signing secrets.
|
|
5759
|
+
* Returns every webhook of the selected environment without signing secrets. Callers without projects:write see only the origin of each receiver URL.
|
|
5574
5760
|
*/
|
|
5575
5761
|
export const listProjectDatabaseWebhooks = <ThrowOnError extends boolean = true>(
|
|
5576
5762
|
parameters: {
|
|
@@ -5667,11 +5853,12 @@ export const createProjectDatabaseWebhook = <ThrowOnError extends boolean = true
|
|
|
5667
5853
|
/**
|
|
5668
5854
|
* Delete one database webhook
|
|
5669
5855
|
*
|
|
5670
|
-
* Stops deliveries to the webhook. Deleting an already deleted webhook answers not found.
|
|
5856
|
+
* Stops deliveries to the webhook. Deleting an already deleted webhook answers not found. A retry with the same Idempotency-Key and request returns the stored answer; the same key with another request answers 409 idempotency_key_reused.
|
|
5671
5857
|
*/
|
|
5672
5858
|
export const deleteProjectDatabaseWebhook = <ThrowOnError extends boolean = true>(
|
|
5673
5859
|
parameters: {
|
|
5674
5860
|
"X-Request-Id"?: string;
|
|
5861
|
+
"Idempotency-Key": string;
|
|
5675
5862
|
project_id: Ulid;
|
|
5676
5863
|
webhook_id: string;
|
|
5677
5864
|
environment: "dev" | "prod";
|
|
@@ -5689,6 +5876,7 @@ export const deleteProjectDatabaseWebhook = <ThrowOnError extends boolean = true
|
|
|
5689
5876
|
{
|
|
5690
5877
|
args: [
|
|
5691
5878
|
{ in: "headers", key: "X-Request-Id" },
|
|
5879
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
5692
5880
|
{ in: "path", key: "project_id" },
|
|
5693
5881
|
{ in: "path", key: "webhook_id" },
|
|
5694
5882
|
{ in: "query", key: "environment" },
|
|
@@ -5713,7 +5901,7 @@ export const deleteProjectDatabaseWebhook = <ThrowOnError extends boolean = true
|
|
|
5713
5901
|
/**
|
|
5714
5902
|
* Read one database webhook
|
|
5715
5903
|
*
|
|
5716
|
-
* Returns one webhook without its signing secret.
|
|
5904
|
+
* Returns one webhook without its signing secret. Callers without projects:write see only the origin of the receiver URL.
|
|
5717
5905
|
*/
|
|
5718
5906
|
export const getProjectDatabaseWebhook = <ThrowOnError extends boolean = true>(
|
|
5719
5907
|
parameters: {
|
|
@@ -5759,11 +5947,12 @@ export const getProjectDatabaseWebhook = <ThrowOnError extends boolean = true>(
|
|
|
5759
5947
|
/**
|
|
5760
5948
|
* Send one test delivery to a database webhook
|
|
5761
5949
|
*
|
|
5762
|
-
* Sends one signed test request to the webhook URL and reports the outcome synchronously.
|
|
5950
|
+
* Sends one signed test request to the webhook URL and reports the outcome synchronously. A retry with the same Idempotency-Key and request returns the stored outcome without sending again; a new key sends another request. The platform allows one test per webhook every five seconds.
|
|
5763
5951
|
*/
|
|
5764
5952
|
export const testProjectDatabaseWebhook = <ThrowOnError extends boolean = true>(
|
|
5765
5953
|
parameters: {
|
|
5766
5954
|
"X-Request-Id"?: string;
|
|
5955
|
+
"Idempotency-Key": string;
|
|
5767
5956
|
project_id: Ulid;
|
|
5768
5957
|
webhook_id: string;
|
|
5769
5958
|
environment: "dev" | "prod";
|
|
@@ -5781,6 +5970,7 @@ export const testProjectDatabaseWebhook = <ThrowOnError extends boolean = true>(
|
|
|
5781
5970
|
{
|
|
5782
5971
|
args: [
|
|
5783
5972
|
{ in: "headers", key: "X-Request-Id" },
|
|
5973
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
5784
5974
|
{ in: "path", key: "project_id" },
|
|
5785
5975
|
{ in: "path", key: "webhook_id" },
|
|
5786
5976
|
{ in: "query", key: "environment" },
|
|
@@ -5855,11 +6045,12 @@ export const listProjectDatabaseWebhookDeliveries = <ThrowOnError extends boolea
|
|
|
5855
6045
|
/**
|
|
5856
6046
|
* Replay one database webhook delivery
|
|
5857
6047
|
*
|
|
5858
|
-
* Queues a new attempt for a delivery that is no longer being retried.
|
|
6048
|
+
* Queues a new attempt for a delivery that is no longer being retried. A retry with the same Idempotency-Key and request returns the stored answer without queuing again; a new key queues one more attempt, and the delivery returns to pending until it is delivered or dead-lettered again.
|
|
5859
6049
|
*/
|
|
5860
6050
|
export const replayProjectDatabaseWebhookDelivery = <ThrowOnError extends boolean = true>(
|
|
5861
6051
|
parameters: {
|
|
5862
6052
|
"X-Request-Id"?: string;
|
|
6053
|
+
"Idempotency-Key": string;
|
|
5863
6054
|
project_id: Ulid;
|
|
5864
6055
|
delivery_id: string;
|
|
5865
6056
|
environment: "dev" | "prod";
|
|
@@ -5877,6 +6068,7 @@ export const replayProjectDatabaseWebhookDelivery = <ThrowOnError extends boolea
|
|
|
5877
6068
|
{
|
|
5878
6069
|
args: [
|
|
5879
6070
|
{ in: "headers", key: "X-Request-Id" },
|
|
6071
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
5880
6072
|
{ in: "path", key: "project_id" },
|
|
5881
6073
|
{ in: "path", key: "delivery_id" },
|
|
5882
6074
|
{ in: "query", key: "environment" },
|
|
@@ -5901,7 +6093,7 @@ export const replayProjectDatabaseWebhookDelivery = <ThrowOnError extends boolea
|
|
|
5901
6093
|
/**
|
|
5902
6094
|
* List the project's database schedules
|
|
5903
6095
|
*
|
|
5904
|
-
* Returns every schedule of the selected environment.
|
|
6096
|
+
* Returns every schedule of the selected environment. Callers without projects:write see a sha256 digest of each statement instead of its SQL text.
|
|
5905
6097
|
*/
|
|
5906
6098
|
export const listProjectDatabaseSchedules = <ThrowOnError extends boolean = true>(
|
|
5907
6099
|
parameters: {
|
|
@@ -6136,11 +6328,12 @@ export const listProjectDatabaseScheduleRuns = <ThrowOnError extends boolean = t
|
|
|
6136
6328
|
/**
|
|
6137
6329
|
* Queue one immediate run of a database schedule
|
|
6138
6330
|
*
|
|
6139
|
-
* Queues one manual run. The run is refused while the schedule is disabled or while a run is already queued. A reached Stop budget (or exhausted credit past its grace) refuses the run with project_budget_exceeded (402).
|
|
6331
|
+
* Queues one manual run. The run is refused while the schedule is disabled or while a run is already queued. A retry with the same Idempotency-Key and request returns the stored answer without queuing a second run. A reached Stop budget (or exhausted credit past its grace) refuses the run with project_budget_exceeded (402).
|
|
6140
6332
|
*/
|
|
6141
6333
|
export const runProjectDatabaseSchedule = <ThrowOnError extends boolean = true>(
|
|
6142
6334
|
parameters: {
|
|
6143
6335
|
"X-Request-Id"?: string;
|
|
6336
|
+
"Idempotency-Key": string;
|
|
6144
6337
|
project_id: Ulid;
|
|
6145
6338
|
name: string;
|
|
6146
6339
|
environment: "dev" | "prod";
|
|
@@ -6158,6 +6351,7 @@ export const runProjectDatabaseSchedule = <ThrowOnError extends boolean = true>(
|
|
|
6158
6351
|
{
|
|
6159
6352
|
args: [
|
|
6160
6353
|
{ in: "headers", key: "X-Request-Id" },
|
|
6354
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
6161
6355
|
{ in: "path", key: "project_id" },
|
|
6162
6356
|
{ in: "path", key: "name" },
|
|
6163
6357
|
{ in: "query", key: "environment" },
|
|
@@ -6635,7 +6829,7 @@ export const getOperation = <ThrowOnError extends boolean = true>(
|
|
|
6635
6829
|
/**
|
|
6636
6830
|
* Reconcile an uncertain platform delivery or provider mutation
|
|
6637
6831
|
*
|
|
6638
|
-
* Owner-only, idempotent recovery for an operation retained after an uncertain platform delivery or provider mutation. The control plane derives the exact recovery decision, including any deterministic internal Workflow handoff; the request has no body. Exhausted lifecycle recovery returns reconciliation_exhausted (409, retryable false); stop retries and report the original operation through feedback.
|
|
6832
|
+
* Owner-only, idempotent recovery for an operation retained after an uncertain platform delivery or provider mutation. The control plane derives the exact recovery decision, including any deterministic internal Workflow handoff; the request has no body. Exhausted lifecycle recovery returns reconciliation_exhausted (409, retryable false); stop retries and report the original operation through feedback. An operation with no uncertain delivery or provider mutation pending returns reconciliation_not_pending (409, retryable false).
|
|
6639
6833
|
*/
|
|
6640
6834
|
export const reconcileOperation = <ThrowOnError extends boolean = true>(
|
|
6641
6835
|
parameters: {
|
|
@@ -6993,6 +7187,52 @@ export const prepareManagedMailWebhook = <ThrowOnError extends boolean = true>(
|
|
|
6993
7187
|
});
|
|
6994
7188
|
};
|
|
6995
7189
|
|
|
7190
|
+
/**
|
|
7191
|
+
* Rotate the customer webhook signing secret
|
|
7192
|
+
*
|
|
7193
|
+
* Owner-only. Issues a new signing secret for the same endpoint and ends receiving until the endpoint verifies the new secret. Earlier secrets stop verifying at once. Repeating the same idempotency key after an uncertain response returns the current secret.
|
|
7194
|
+
*/
|
|
7195
|
+
export const rotateManagedMailWebhookSecret = <ThrowOnError extends boolean = true>(
|
|
7196
|
+
parameters: {
|
|
7197
|
+
"X-Request-Id"?: string;
|
|
7198
|
+
"Idempotency-Key": string;
|
|
7199
|
+
project_id: Ulid;
|
|
7200
|
+
environment_id: Ulid;
|
|
7201
|
+
},
|
|
7202
|
+
options?: Options<never, ThrowOnError>,
|
|
7203
|
+
): RequestResult<
|
|
7204
|
+
RotateManagedMailWebhookSecretResponses,
|
|
7205
|
+
RotateManagedMailWebhookSecretErrors,
|
|
7206
|
+
ThrowOnError,
|
|
7207
|
+
"data"
|
|
7208
|
+
> => {
|
|
7209
|
+
const params = buildClientParams(
|
|
7210
|
+
[parameters],
|
|
7211
|
+
[
|
|
7212
|
+
{
|
|
7213
|
+
args: [
|
|
7214
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
7215
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
7216
|
+
{ in: "path", key: "project_id" },
|
|
7217
|
+
{ in: "path", key: "environment_id" },
|
|
7218
|
+
],
|
|
7219
|
+
},
|
|
7220
|
+
],
|
|
7221
|
+
);
|
|
7222
|
+
return (options?.client ?? client).post<
|
|
7223
|
+
RotateManagedMailWebhookSecretResponses,
|
|
7224
|
+
RotateManagedMailWebhookSecretErrors,
|
|
7225
|
+
ThrowOnError,
|
|
7226
|
+
"data"
|
|
7227
|
+
>({
|
|
7228
|
+
responseStyle: "data",
|
|
7229
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
7230
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/mail-webhook:rotate",
|
|
7231
|
+
...options,
|
|
7232
|
+
...params,
|
|
7233
|
+
});
|
|
7234
|
+
};
|
|
7235
|
+
|
|
6996
7236
|
/**
|
|
6997
7237
|
* Verify the customer endpoint and enable receiving
|
|
6998
7238
|
*
|