@amerged/ohmyhost-sdk 0.1.43 → 0.1.45
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/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sdk.gen.d.ts +37 -4
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +80 -3
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +242 -5
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +25 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +153 -3
- package/src/packages/sdk-ts/src/generated/types.gen.ts +274 -4
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ export {
|
|
|
23
23
|
createOrganization,
|
|
24
24
|
createProject,
|
|
25
25
|
createProjectDatabaseAccess,
|
|
26
|
+
createProjectDatabaseWatch,
|
|
26
27
|
createProjectDatabaseWebhook,
|
|
27
28
|
createProjectDataChange,
|
|
28
29
|
createProjectDevAccessTicket,
|
|
@@ -35,6 +36,7 @@ export {
|
|
|
35
36
|
deletePaidProjectDomain,
|
|
36
37
|
deleteProject,
|
|
37
38
|
deleteProjectDatabaseSchedule,
|
|
39
|
+
deleteProjectDatabaseWatch,
|
|
38
40
|
deleteProjectDatabaseWebhook,
|
|
39
41
|
detachProjectMailDomainBinding,
|
|
40
42
|
diffManagedSource,
|
|
@@ -91,6 +93,7 @@ export {
|
|
|
91
93
|
listProjectDatabaseAccess,
|
|
92
94
|
listProjectDatabaseScheduleRuns,
|
|
93
95
|
listProjectDatabaseSchedules,
|
|
96
|
+
listProjectDatabaseWatches,
|
|
94
97
|
listProjectDatabaseWebhookDeliveries,
|
|
95
98
|
listProjectDatabaseWebhooks,
|
|
96
99
|
listProjects,
|
|
@@ -271,6 +274,11 @@ export type {
|
|
|
271
274
|
CreateProjectDatabaseAccessErrors,
|
|
272
275
|
CreateProjectDatabaseAccessResponse,
|
|
273
276
|
CreateProjectDatabaseAccessResponses,
|
|
277
|
+
CreateProjectDatabaseWatchData,
|
|
278
|
+
CreateProjectDatabaseWatchError,
|
|
279
|
+
CreateProjectDatabaseWatchErrors,
|
|
280
|
+
CreateProjectDatabaseWatchResponse,
|
|
281
|
+
CreateProjectDatabaseWatchResponses,
|
|
274
282
|
CreateProjectDatabaseWebhookData,
|
|
275
283
|
CreateProjectDatabaseWebhookError,
|
|
276
284
|
CreateProjectDatabaseWebhookErrors,
|
|
@@ -325,6 +333,11 @@ export type {
|
|
|
325
333
|
DatabaseScheduleRunAccepted,
|
|
326
334
|
DatabaseScheduleRunPage,
|
|
327
335
|
DatabaseScheduleSetRequest,
|
|
336
|
+
DatabaseWatch,
|
|
337
|
+
DatabaseWatchCreateRequest,
|
|
338
|
+
DatabaseWatchDeleted,
|
|
339
|
+
DatabaseWatchId,
|
|
340
|
+
DatabaseWatchPage,
|
|
328
341
|
DatabaseWebhook,
|
|
329
342
|
DatabaseWebhookCreated,
|
|
330
343
|
DatabaseWebhookCreateRequest,
|
|
@@ -332,6 +345,8 @@ export type {
|
|
|
332
345
|
DatabaseWebhookDelivery,
|
|
333
346
|
DatabaseWebhookDeliveryId,
|
|
334
347
|
DatabaseWebhookDeliveryPage,
|
|
348
|
+
DatabaseWebhookEventPattern,
|
|
349
|
+
DatabaseWebhookEventPatternWritable,
|
|
335
350
|
DatabaseWebhookEventType,
|
|
336
351
|
DatabaseWebhookId,
|
|
337
352
|
DatabaseWebhookPage,
|
|
@@ -364,6 +379,11 @@ export type {
|
|
|
364
379
|
DeleteProjectDatabaseScheduleErrors,
|
|
365
380
|
DeleteProjectDatabaseScheduleResponse,
|
|
366
381
|
DeleteProjectDatabaseScheduleResponses,
|
|
382
|
+
DeleteProjectDatabaseWatchData,
|
|
383
|
+
DeleteProjectDatabaseWatchError,
|
|
384
|
+
DeleteProjectDatabaseWatchErrors,
|
|
385
|
+
DeleteProjectDatabaseWatchResponse,
|
|
386
|
+
DeleteProjectDatabaseWatchResponses,
|
|
367
387
|
DeleteProjectDatabaseWebhookData,
|
|
368
388
|
DeleteProjectDatabaseWebhookError,
|
|
369
389
|
DeleteProjectDatabaseWebhookErrors,
|
|
@@ -685,6 +705,11 @@ export type {
|
|
|
685
705
|
ListProjectDatabaseSchedulesErrors,
|
|
686
706
|
ListProjectDatabaseSchedulesResponse,
|
|
687
707
|
ListProjectDatabaseSchedulesResponses,
|
|
708
|
+
ListProjectDatabaseWatchesData,
|
|
709
|
+
ListProjectDatabaseWatchesError,
|
|
710
|
+
ListProjectDatabaseWatchesErrors,
|
|
711
|
+
ListProjectDatabaseWatchesResponse,
|
|
712
|
+
ListProjectDatabaseWatchesResponses,
|
|
688
713
|
ListProjectDatabaseWebhookDeliveriesData,
|
|
689
714
|
ListProjectDatabaseWebhookDeliveriesError,
|
|
690
715
|
ListProjectDatabaseWebhookDeliveriesErrors,
|
|
@@ -60,6 +60,8 @@ import type {
|
|
|
60
60
|
CreateOrganizationResponses,
|
|
61
61
|
CreateProjectDatabaseAccessErrors,
|
|
62
62
|
CreateProjectDatabaseAccessResponses,
|
|
63
|
+
CreateProjectDatabaseWatchErrors,
|
|
64
|
+
CreateProjectDatabaseWatchResponses,
|
|
63
65
|
CreateProjectDatabaseWebhookErrors,
|
|
64
66
|
CreateProjectDatabaseWebhookResponses,
|
|
65
67
|
CreateProjectDataChangeErrors,
|
|
@@ -77,6 +79,7 @@ import type {
|
|
|
77
79
|
CreateWorkspaceMailDomainRequest,
|
|
78
80
|
CreateWorkspaceMailDomainResponses,
|
|
79
81
|
DatabaseScheduleSetRequest,
|
|
82
|
+
DatabaseWatchCreateRequest,
|
|
80
83
|
DatabaseWebhookCreateRequest,
|
|
81
84
|
DeclareApplicationDomainIdentityErrors,
|
|
82
85
|
DeclareApplicationDomainIdentityResponses,
|
|
@@ -88,6 +91,8 @@ import type {
|
|
|
88
91
|
DeletePaidProjectDomainResponses,
|
|
89
92
|
DeleteProjectDatabaseScheduleErrors,
|
|
90
93
|
DeleteProjectDatabaseScheduleResponses,
|
|
94
|
+
DeleteProjectDatabaseWatchErrors,
|
|
95
|
+
DeleteProjectDatabaseWatchResponses,
|
|
91
96
|
DeleteProjectDatabaseWebhookErrors,
|
|
92
97
|
DeleteProjectDatabaseWebhookResponses,
|
|
93
98
|
DeleteProjectErrors,
|
|
@@ -204,6 +209,8 @@ import type {
|
|
|
204
209
|
ListProjectDatabaseScheduleRunsResponses,
|
|
205
210
|
ListProjectDatabaseSchedulesErrors,
|
|
206
211
|
ListProjectDatabaseSchedulesResponses,
|
|
212
|
+
ListProjectDatabaseWatchesErrors,
|
|
213
|
+
ListProjectDatabaseWatchesResponses,
|
|
207
214
|
ListProjectDatabaseWebhookDeliveriesErrors,
|
|
208
215
|
ListProjectDatabaseWebhookDeliveriesResponses,
|
|
209
216
|
ListProjectDatabaseWebhooksErrors,
|
|
@@ -4759,6 +4766,149 @@ export const revokeProjectDatabaseAccess = <ThrowOnError extends boolean = true>
|
|
|
4759
4766
|
});
|
|
4760
4767
|
};
|
|
4761
4768
|
|
|
4769
|
+
/**
|
|
4770
|
+
* List the project's database watches
|
|
4771
|
+
*
|
|
4772
|
+
* Returns every watch of the selected environment. Listing wakes a sleeping database.
|
|
4773
|
+
*/
|
|
4774
|
+
export const listProjectDatabaseWatches = <ThrowOnError extends boolean = true>(
|
|
4775
|
+
parameters: {
|
|
4776
|
+
"X-Request-Id"?: string;
|
|
4777
|
+
project_id: Ulid;
|
|
4778
|
+
environment?: "dev" | "prod";
|
|
4779
|
+
},
|
|
4780
|
+
options?: Options<never, ThrowOnError>,
|
|
4781
|
+
): RequestResult<
|
|
4782
|
+
ListProjectDatabaseWatchesResponses,
|
|
4783
|
+
ListProjectDatabaseWatchesErrors,
|
|
4784
|
+
ThrowOnError,
|
|
4785
|
+
"data"
|
|
4786
|
+
> => {
|
|
4787
|
+
const params = buildClientParams(
|
|
4788
|
+
[parameters],
|
|
4789
|
+
[
|
|
4790
|
+
{
|
|
4791
|
+
args: [
|
|
4792
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4793
|
+
{ in: "path", key: "project_id" },
|
|
4794
|
+
{ in: "query", key: "environment" },
|
|
4795
|
+
],
|
|
4796
|
+
},
|
|
4797
|
+
],
|
|
4798
|
+
);
|
|
4799
|
+
return (options?.client ?? client).get<
|
|
4800
|
+
ListProjectDatabaseWatchesResponses,
|
|
4801
|
+
ListProjectDatabaseWatchesErrors,
|
|
4802
|
+
ThrowOnError,
|
|
4803
|
+
"data"
|
|
4804
|
+
>({
|
|
4805
|
+
responseStyle: "data",
|
|
4806
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4807
|
+
url: "/v1/projects/{project_id}/database/watches",
|
|
4808
|
+
...options,
|
|
4809
|
+
...params,
|
|
4810
|
+
});
|
|
4811
|
+
};
|
|
4812
|
+
|
|
4813
|
+
/**
|
|
4814
|
+
* Watch the columns of one table for data events
|
|
4815
|
+
*
|
|
4816
|
+
* Attaches the pgcf.capture trigger that publishes only the listed columns of the table as data events of one environment. Subscribe to the returned event_type with a database webhook. The request wakes a sleeping database. Repeating an identical request leaves the watch unchanged; repeating it with other columns or operations replaces the trigger. A reached Stop budget refuses with project_budget_exceeded (402). At most 100 watches exist per database.
|
|
4817
|
+
*/
|
|
4818
|
+
export const createProjectDatabaseWatch = <ThrowOnError extends boolean = true>(
|
|
4819
|
+
parameters: {
|
|
4820
|
+
"X-Request-Id"?: string;
|
|
4821
|
+
"Idempotency-Key": string;
|
|
4822
|
+
project_id: Ulid;
|
|
4823
|
+
databaseWatchCreateRequest: DatabaseWatchCreateRequest;
|
|
4824
|
+
},
|
|
4825
|
+
options?: Options<never, ThrowOnError>,
|
|
4826
|
+
): RequestResult<
|
|
4827
|
+
CreateProjectDatabaseWatchResponses,
|
|
4828
|
+
CreateProjectDatabaseWatchErrors,
|
|
4829
|
+
ThrowOnError,
|
|
4830
|
+
"data"
|
|
4831
|
+
> => {
|
|
4832
|
+
const params = buildClientParams(
|
|
4833
|
+
[parameters],
|
|
4834
|
+
[
|
|
4835
|
+
{
|
|
4836
|
+
args: [
|
|
4837
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4838
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
4839
|
+
{ in: "path", key: "project_id" },
|
|
4840
|
+
{ key: "databaseWatchCreateRequest", map: "body" },
|
|
4841
|
+
],
|
|
4842
|
+
},
|
|
4843
|
+
],
|
|
4844
|
+
);
|
|
4845
|
+
return (options?.client ?? client).post<
|
|
4846
|
+
CreateProjectDatabaseWatchResponses,
|
|
4847
|
+
CreateProjectDatabaseWatchErrors,
|
|
4848
|
+
ThrowOnError,
|
|
4849
|
+
"data"
|
|
4850
|
+
>({
|
|
4851
|
+
responseStyle: "data",
|
|
4852
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4853
|
+
url: "/v1/projects/{project_id}/database/watches",
|
|
4854
|
+
...options,
|
|
4855
|
+
...params,
|
|
4856
|
+
headers: {
|
|
4857
|
+
"Content-Type": "application/json",
|
|
4858
|
+
...options?.headers,
|
|
4859
|
+
...params.headers,
|
|
4860
|
+
},
|
|
4861
|
+
});
|
|
4862
|
+
};
|
|
4863
|
+
|
|
4864
|
+
/**
|
|
4865
|
+
* Delete one database watch
|
|
4866
|
+
*
|
|
4867
|
+
* Removes the capture trigger of the watch, so its table publishes no more data events. Deleting an already deleted watch answers not found. A reached Stop budget refuses with project_budget_exceeded (402).
|
|
4868
|
+
*/
|
|
4869
|
+
export const deleteProjectDatabaseWatch = <ThrowOnError extends boolean = true>(
|
|
4870
|
+
parameters: {
|
|
4871
|
+
"X-Request-Id"?: string;
|
|
4872
|
+
"Idempotency-Key": string;
|
|
4873
|
+
project_id: Ulid;
|
|
4874
|
+
watch_id: string;
|
|
4875
|
+
environment: "dev" | "prod";
|
|
4876
|
+
},
|
|
4877
|
+
options?: Options<never, ThrowOnError>,
|
|
4878
|
+
): RequestResult<
|
|
4879
|
+
DeleteProjectDatabaseWatchResponses,
|
|
4880
|
+
DeleteProjectDatabaseWatchErrors,
|
|
4881
|
+
ThrowOnError,
|
|
4882
|
+
"data"
|
|
4883
|
+
> => {
|
|
4884
|
+
const params = buildClientParams(
|
|
4885
|
+
[parameters],
|
|
4886
|
+
[
|
|
4887
|
+
{
|
|
4888
|
+
args: [
|
|
4889
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4890
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
4891
|
+
{ in: "path", key: "project_id" },
|
|
4892
|
+
{ in: "path", key: "watch_id" },
|
|
4893
|
+
{ in: "query", key: "environment" },
|
|
4894
|
+
],
|
|
4895
|
+
},
|
|
4896
|
+
],
|
|
4897
|
+
);
|
|
4898
|
+
return (options?.client ?? client).delete<
|
|
4899
|
+
DeleteProjectDatabaseWatchResponses,
|
|
4900
|
+
DeleteProjectDatabaseWatchErrors,
|
|
4901
|
+
ThrowOnError,
|
|
4902
|
+
"data"
|
|
4903
|
+
>({
|
|
4904
|
+
responseStyle: "data",
|
|
4905
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4906
|
+
url: "/v1/projects/{project_id}/database/watches/{watch_id}",
|
|
4907
|
+
...options,
|
|
4908
|
+
...params,
|
|
4909
|
+
});
|
|
4910
|
+
};
|
|
4911
|
+
|
|
4762
4912
|
/**
|
|
4763
4913
|
* List the project's database webhooks
|
|
4764
4914
|
*
|
|
@@ -5227,7 +5377,7 @@ export const getProjectDatabaseSchedule = <ThrowOnError extends boolean = true>(
|
|
|
5227
5377
|
/**
|
|
5228
5378
|
* Create or replace one database schedule
|
|
5229
5379
|
*
|
|
5230
|
-
* Creates the named schedule or replaces it. Each run executes the statements as the application's own runtime role, so row-level security applies as for the application. A run that does not finish within timeout_ms is cancelled.
|
|
5380
|
+
* Creates the named schedule or replaces it. Each run executes the statements as the application's own runtime role, so row-level security applies as for the application. A run that does not finish within timeout_ms is cancelled. A reached Stop budget (or exhausted credit past its grace) refuses an enabled schedule with project_budget_exceeded (402); disabling the schedule is never refused.
|
|
5231
5381
|
*/
|
|
5232
5382
|
export const setProjectDatabaseSchedule = <ThrowOnError extends boolean = true>(
|
|
5233
5383
|
parameters: {
|
|
@@ -5328,7 +5478,7 @@ export const listProjectDatabaseScheduleRuns = <ThrowOnError extends boolean = t
|
|
|
5328
5478
|
/**
|
|
5329
5479
|
* Queue one immediate run of a database schedule
|
|
5330
5480
|
*
|
|
5331
|
-
* Queues one manual run. The run is refused while the schedule is disabled or while a run is already queued.
|
|
5481
|
+
* 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).
|
|
5332
5482
|
*/
|
|
5333
5483
|
export const runProjectDatabaseSchedule = <ThrowOnError extends boolean = true>(
|
|
5334
5484
|
parameters: {
|
|
@@ -5374,7 +5524,7 @@ export const runProjectDatabaseSchedule = <ThrowOnError extends boolean = true>(
|
|
|
5374
5524
|
/**
|
|
5375
5525
|
* Read metered database execution usage
|
|
5376
5526
|
*
|
|
5377
|
-
* Returns schedule runs and webhook attempts per time window. Only completed windows are final; the current window may still change. Windows are UTC and at most 31 days long.
|
|
5527
|
+
* Returns schedule runs and webhook attempts per time window. Only completed windows are final; the current window may still change. Windows are UTC and at most 31 days long. The counts are counters only; executions have no price of their own, and the awake compute time of the database is what is billed.
|
|
5378
5528
|
*/
|
|
5379
5529
|
export const getProjectDatabaseExecutionUsage = <ThrowOnError extends boolean = true>(
|
|
5380
5530
|
parameters: {
|
|
@@ -957,12 +957,63 @@ export type DatabaseWebhookEventType =
|
|
|
957
957
|
| "database.resized"
|
|
958
958
|
| "database.deleted";
|
|
959
959
|
|
|
960
|
+
/**
|
|
961
|
+
* A platform event type, data.<topic> for the rows of one watched table, or data.* for every watched table. A bare * is not accepted and never matches data events.
|
|
962
|
+
*/
|
|
963
|
+
export type DatabaseWebhookEventPattern = DatabaseWebhookEventType | string;
|
|
964
|
+
|
|
965
|
+
export type DatabaseWatchCreateRequest = {
|
|
966
|
+
environment: "dev" | "prod";
|
|
967
|
+
/**
|
|
968
|
+
* Schema of the table, public when omitted. The schemas pgcf, ohmyhost, information_schema and pg_* cannot be watched.
|
|
969
|
+
*/
|
|
970
|
+
schema?: string;
|
|
971
|
+
/**
|
|
972
|
+
* Ordinary table owned by the application, created by a deployed migration.
|
|
973
|
+
*/
|
|
974
|
+
table: string;
|
|
975
|
+
/**
|
|
976
|
+
* Columns published with every event, exactly as written; names are case-sensitive.
|
|
977
|
+
*/
|
|
978
|
+
columns: Array<string>;
|
|
979
|
+
/**
|
|
980
|
+
* Row changes that publish an event; all three when omitted.
|
|
981
|
+
*/
|
|
982
|
+
operations?: Array<"insert" | "update" | "delete">;
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
export type DatabaseWatch = {
|
|
986
|
+
id: string;
|
|
987
|
+
environment: "dev" | "prod";
|
|
988
|
+
schema: string;
|
|
989
|
+
table: string;
|
|
990
|
+
columns: Array<string>;
|
|
991
|
+
operations: Array<"insert" | "update" | "delete">;
|
|
992
|
+
/**
|
|
993
|
+
* Topic of the watched table, derived by the platform from its name.
|
|
994
|
+
*/
|
|
995
|
+
topic: string;
|
|
996
|
+
/**
|
|
997
|
+
* Event type of the rows of the table; pass it to a database webhook.
|
|
998
|
+
*/
|
|
999
|
+
event_type: string;
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
export type DatabaseWatchPage = {
|
|
1003
|
+
items: Array<DatabaseWatch>;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
export type DatabaseWatchDeleted = {
|
|
1007
|
+
id: string;
|
|
1008
|
+
deleted: true;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
960
1011
|
export type DatabaseWebhookCreateRequest = {
|
|
961
1012
|
/**
|
|
962
1013
|
* HTTPS receiver URL.
|
|
963
1014
|
*/
|
|
964
1015
|
url: string;
|
|
965
|
-
event_types: Array<
|
|
1016
|
+
event_types: Array<DatabaseWebhookEventPattern>;
|
|
966
1017
|
/**
|
|
967
1018
|
* Extra headers sent with every delivery. Names are case-insensitive and must be unique; content-type, host, content-length, connection, transfer-encoding, user-agent, te, upgrade, expect and any name starting with pgcf-, cf- or x-forwarded- are refused.
|
|
968
1019
|
*/
|
|
@@ -975,7 +1026,7 @@ export type DatabaseWebhook = {
|
|
|
975
1026
|
id: string;
|
|
976
1027
|
environment: "dev" | "prod";
|
|
977
1028
|
url: string;
|
|
978
|
-
event_types: Array<
|
|
1029
|
+
event_types: Array<DatabaseWebhookEventPattern>;
|
|
979
1030
|
/**
|
|
980
1031
|
* Names of the extra headers only; their values are never returned.
|
|
981
1032
|
*/
|
|
@@ -987,7 +1038,7 @@ export type DatabaseWebhookCreated = {
|
|
|
987
1038
|
id: string;
|
|
988
1039
|
environment: "dev" | "prod";
|
|
989
1040
|
url: string;
|
|
990
|
-
event_types: Array<
|
|
1041
|
+
event_types: Array<DatabaseWebhookEventPattern>;
|
|
991
1042
|
header_names: Array<string>;
|
|
992
1043
|
created_at: string;
|
|
993
1044
|
/**
|
|
@@ -1008,7 +1059,7 @@ export type DatabaseWebhookDeleted = {
|
|
|
1008
1059
|
export type DatabaseWebhookDelivery = {
|
|
1009
1060
|
id: string;
|
|
1010
1061
|
event_id: string;
|
|
1011
|
-
event_type: DatabaseWebhookEventType;
|
|
1062
|
+
event_type: DatabaseWebhookEventType | string;
|
|
1012
1063
|
webhook_id: string;
|
|
1013
1064
|
state: "pending" | "delivered" | "dead_lettered";
|
|
1014
1065
|
attempts: number;
|
|
@@ -1605,6 +1656,11 @@ export type ProblemDetails = {
|
|
|
1605
1656
|
| "database_schedule_limit"
|
|
1606
1657
|
| "database_schedule_not_runnable"
|
|
1607
1658
|
| "database_webhook_delivery_pending"
|
|
1659
|
+
| "database_watch_limit"
|
|
1660
|
+
| "database_watch_table_unavailable"
|
|
1661
|
+
| "database_watch_column_unavailable"
|
|
1662
|
+
| "database_watch_events_unavailable"
|
|
1663
|
+
| "database_watch_conflict"
|
|
1608
1664
|
| "compute_change_pending"
|
|
1609
1665
|
| "compute_change_conflict"
|
|
1610
1666
|
| "billing_purchase_conflict"
|
|
@@ -1910,6 +1966,11 @@ export type ProjectDataChangePlan = {
|
|
|
1910
1966
|
expires_at: string;
|
|
1911
1967
|
};
|
|
1912
1968
|
|
|
1969
|
+
/**
|
|
1970
|
+
* A platform event type, data.<topic> for the rows of one watched table, or data.* for every watched table. A bare * is not accepted and never matches data events.
|
|
1971
|
+
*/
|
|
1972
|
+
export type DatabaseWebhookEventPatternWritable = DatabaseWebhookEventType | string;
|
|
1973
|
+
|
|
1913
1974
|
/**
|
|
1914
1975
|
* Immutable pre-build deployment plan. It expires exactly 24 hours after creation.
|
|
1915
1976
|
*/
|
|
@@ -2004,6 +2065,11 @@ export type DatabaseWebhookId = string;
|
|
|
2004
2065
|
*/
|
|
2005
2066
|
export type DatabaseWebhookDeliveryId = string;
|
|
2006
2067
|
|
|
2068
|
+
/**
|
|
2069
|
+
* Database watch identifier, derived from the watched schema and table.
|
|
2070
|
+
*/
|
|
2071
|
+
export type DatabaseWatchId = string;
|
|
2072
|
+
|
|
2007
2073
|
/**
|
|
2008
2074
|
* Database schedule name, unique per project environment.
|
|
2009
2075
|
*/
|
|
@@ -8116,6 +8182,202 @@ export type RevokeProjectDatabaseAccessResponses = {
|
|
|
8116
8182
|
export type RevokeProjectDatabaseAccessResponse =
|
|
8117
8183
|
RevokeProjectDatabaseAccessResponses[keyof RevokeProjectDatabaseAccessResponses];
|
|
8118
8184
|
|
|
8185
|
+
export type ListProjectDatabaseWatchesData = {
|
|
8186
|
+
body?: never;
|
|
8187
|
+
headers?: {
|
|
8188
|
+
/**
|
|
8189
|
+
* Optional caller-provided correlation identifier.
|
|
8190
|
+
*/
|
|
8191
|
+
"X-Request-Id"?: string;
|
|
8192
|
+
};
|
|
8193
|
+
path: {
|
|
8194
|
+
/**
|
|
8195
|
+
* Project identifier.
|
|
8196
|
+
*/
|
|
8197
|
+
project_id: Ulid;
|
|
8198
|
+
};
|
|
8199
|
+
query?: {
|
|
8200
|
+
/**
|
|
8201
|
+
* Application environment to read; dev when omitted.
|
|
8202
|
+
*/
|
|
8203
|
+
environment?: "dev" | "prod";
|
|
8204
|
+
};
|
|
8205
|
+
url: "/v1/projects/{project_id}/database/watches";
|
|
8206
|
+
};
|
|
8207
|
+
|
|
8208
|
+
export type ListProjectDatabaseWatchesErrors = {
|
|
8209
|
+
/**
|
|
8210
|
+
* The request failed.
|
|
8211
|
+
*/
|
|
8212
|
+
400: ProblemDetails;
|
|
8213
|
+
/**
|
|
8214
|
+
* The request failed.
|
|
8215
|
+
*/
|
|
8216
|
+
401: ProblemDetails;
|
|
8217
|
+
/**
|
|
8218
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
8219
|
+
*/
|
|
8220
|
+
404: ProblemDetails;
|
|
8221
|
+
/**
|
|
8222
|
+
* The request failed.
|
|
8223
|
+
*/
|
|
8224
|
+
429: ProblemDetails;
|
|
8225
|
+
/**
|
|
8226
|
+
* The request failed.
|
|
8227
|
+
*/
|
|
8228
|
+
503: ProblemDetails;
|
|
8229
|
+
};
|
|
8230
|
+
|
|
8231
|
+
export type ListProjectDatabaseWatchesError =
|
|
8232
|
+
ListProjectDatabaseWatchesErrors[keyof ListProjectDatabaseWatchesErrors];
|
|
8233
|
+
|
|
8234
|
+
export type ListProjectDatabaseWatchesResponses = {
|
|
8235
|
+
/**
|
|
8236
|
+
* The database watches of the environment.
|
|
8237
|
+
*/
|
|
8238
|
+
200: DatabaseWatchPage;
|
|
8239
|
+
};
|
|
8240
|
+
|
|
8241
|
+
export type ListProjectDatabaseWatchesResponse =
|
|
8242
|
+
ListProjectDatabaseWatchesResponses[keyof ListProjectDatabaseWatchesResponses];
|
|
8243
|
+
|
|
8244
|
+
export type CreateProjectDatabaseWatchData = {
|
|
8245
|
+
body: DatabaseWatchCreateRequest;
|
|
8246
|
+
headers: {
|
|
8247
|
+
/**
|
|
8248
|
+
* Optional caller-provided correlation identifier.
|
|
8249
|
+
*/
|
|
8250
|
+
"X-Request-Id"?: string;
|
|
8251
|
+
/**
|
|
8252
|
+
* Identifies one mutation and its canonical request payload.
|
|
8253
|
+
*/
|
|
8254
|
+
"Idempotency-Key": string;
|
|
8255
|
+
};
|
|
8256
|
+
path: {
|
|
8257
|
+
/**
|
|
8258
|
+
* Project identifier.
|
|
8259
|
+
*/
|
|
8260
|
+
project_id: Ulid;
|
|
8261
|
+
};
|
|
8262
|
+
query?: never;
|
|
8263
|
+
url: "/v1/projects/{project_id}/database/watches";
|
|
8264
|
+
};
|
|
8265
|
+
|
|
8266
|
+
export type CreateProjectDatabaseWatchErrors = {
|
|
8267
|
+
/**
|
|
8268
|
+
* The request failed.
|
|
8269
|
+
*/
|
|
8270
|
+
400: ProblemDetails;
|
|
8271
|
+
/**
|
|
8272
|
+
* The request failed.
|
|
8273
|
+
*/
|
|
8274
|
+
401: ProblemDetails;
|
|
8275
|
+
/**
|
|
8276
|
+
* The request failed.
|
|
8277
|
+
*/
|
|
8278
|
+
402: ProblemDetails;
|
|
8279
|
+
/**
|
|
8280
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
8281
|
+
*/
|
|
8282
|
+
404: ProblemDetails;
|
|
8283
|
+
/**
|
|
8284
|
+
* The request failed.
|
|
8285
|
+
*/
|
|
8286
|
+
409: ProblemDetails;
|
|
8287
|
+
/**
|
|
8288
|
+
* The request failed.
|
|
8289
|
+
*/
|
|
8290
|
+
429: ProblemDetails;
|
|
8291
|
+
/**
|
|
8292
|
+
* The request failed.
|
|
8293
|
+
*/
|
|
8294
|
+
503: ProblemDetails;
|
|
8295
|
+
};
|
|
8296
|
+
|
|
8297
|
+
export type CreateProjectDatabaseWatchError =
|
|
8298
|
+
CreateProjectDatabaseWatchErrors[keyof CreateProjectDatabaseWatchErrors];
|
|
8299
|
+
|
|
8300
|
+
export type CreateProjectDatabaseWatchResponses = {
|
|
8301
|
+
/**
|
|
8302
|
+
* The watch with the event type its deliveries carry.
|
|
8303
|
+
*/
|
|
8304
|
+
201: DatabaseWatch;
|
|
8305
|
+
};
|
|
8306
|
+
|
|
8307
|
+
export type CreateProjectDatabaseWatchResponse =
|
|
8308
|
+
CreateProjectDatabaseWatchResponses[keyof CreateProjectDatabaseWatchResponses];
|
|
8309
|
+
|
|
8310
|
+
export type DeleteProjectDatabaseWatchData = {
|
|
8311
|
+
body?: never;
|
|
8312
|
+
headers: {
|
|
8313
|
+
/**
|
|
8314
|
+
* Optional caller-provided correlation identifier.
|
|
8315
|
+
*/
|
|
8316
|
+
"X-Request-Id"?: string;
|
|
8317
|
+
/**
|
|
8318
|
+
* Identifies one mutation and its canonical request payload.
|
|
8319
|
+
*/
|
|
8320
|
+
"Idempotency-Key": string;
|
|
8321
|
+
};
|
|
8322
|
+
path: {
|
|
8323
|
+
/**
|
|
8324
|
+
* Project identifier.
|
|
8325
|
+
*/
|
|
8326
|
+
project_id: Ulid;
|
|
8327
|
+
/**
|
|
8328
|
+
* Database watch identifier, derived from the watched schema and table.
|
|
8329
|
+
*/
|
|
8330
|
+
watch_id: string;
|
|
8331
|
+
};
|
|
8332
|
+
query: {
|
|
8333
|
+
/**
|
|
8334
|
+
* Application environment the mutation applies to.
|
|
8335
|
+
*/
|
|
8336
|
+
environment: "dev" | "prod";
|
|
8337
|
+
};
|
|
8338
|
+
url: "/v1/projects/{project_id}/database/watches/{watch_id}";
|
|
8339
|
+
};
|
|
8340
|
+
|
|
8341
|
+
export type DeleteProjectDatabaseWatchErrors = {
|
|
8342
|
+
/**
|
|
8343
|
+
* The request failed.
|
|
8344
|
+
*/
|
|
8345
|
+
400: ProblemDetails;
|
|
8346
|
+
/**
|
|
8347
|
+
* The request failed.
|
|
8348
|
+
*/
|
|
8349
|
+
401: ProblemDetails;
|
|
8350
|
+
/**
|
|
8351
|
+
* The request failed.
|
|
8352
|
+
*/
|
|
8353
|
+
402: ProblemDetails;
|
|
8354
|
+
/**
|
|
8355
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
8356
|
+
*/
|
|
8357
|
+
404: ProblemDetails;
|
|
8358
|
+
/**
|
|
8359
|
+
* The request failed.
|
|
8360
|
+
*/
|
|
8361
|
+
429: ProblemDetails;
|
|
8362
|
+
/**
|
|
8363
|
+
* The request failed.
|
|
8364
|
+
*/
|
|
8365
|
+
503: ProblemDetails;
|
|
8366
|
+
};
|
|
8367
|
+
|
|
8368
|
+
export type DeleteProjectDatabaseWatchError =
|
|
8369
|
+
DeleteProjectDatabaseWatchErrors[keyof DeleteProjectDatabaseWatchErrors];
|
|
8370
|
+
|
|
8371
|
+
export type DeleteProjectDatabaseWatchResponses = {
|
|
8372
|
+
/**
|
|
8373
|
+
* The identifier of the deleted watch.
|
|
8374
|
+
*/
|
|
8375
|
+
200: DatabaseWatchDeleted;
|
|
8376
|
+
};
|
|
8377
|
+
|
|
8378
|
+
export type DeleteProjectDatabaseWatchResponse =
|
|
8379
|
+
DeleteProjectDatabaseWatchResponses[keyof DeleteProjectDatabaseWatchResponses];
|
|
8380
|
+
|
|
8119
8381
|
export type ListProjectDatabaseWebhooksData = {
|
|
8120
8382
|
body?: never;
|
|
8121
8383
|
headers?: {
|
|
@@ -8790,6 +9052,10 @@ export type SetProjectDatabaseScheduleErrors = {
|
|
|
8790
9052
|
* The request failed.
|
|
8791
9053
|
*/
|
|
8792
9054
|
401: ProblemDetails;
|
|
9055
|
+
/**
|
|
9056
|
+
* The request failed.
|
|
9057
|
+
*/
|
|
9058
|
+
402: ProblemDetails;
|
|
8793
9059
|
/**
|
|
8794
9060
|
* The resource does not exist or is not visible to the authenticated principal.
|
|
8795
9061
|
*/
|
|
@@ -8924,6 +9190,10 @@ export type RunProjectDatabaseScheduleErrors = {
|
|
|
8924
9190
|
* The request failed.
|
|
8925
9191
|
*/
|
|
8926
9192
|
401: ProblemDetails;
|
|
9193
|
+
/**
|
|
9194
|
+
* The request failed.
|
|
9195
|
+
*/
|
|
9196
|
+
402: ProblemDetails;
|
|
8927
9197
|
/**
|
|
8928
9198
|
* The resource does not exist or is not visible to the authenticated principal.
|
|
8929
9199
|
*/
|