@amerged/ohmyhost-sdk 0.1.44 → 0.1.46
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 +45 -1
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +106 -0
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +350 -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 +37 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +204 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +407 -4
package/package.json
CHANGED
|
@@ -23,6 +23,8 @@ export {
|
|
|
23
23
|
createOrganization,
|
|
24
24
|
createProject,
|
|
25
25
|
createProjectDatabaseAccess,
|
|
26
|
+
createProjectDatabaseTable,
|
|
27
|
+
createProjectDatabaseWatch,
|
|
26
28
|
createProjectDatabaseWebhook,
|
|
27
29
|
createProjectDataChange,
|
|
28
30
|
createProjectDevAccessTicket,
|
|
@@ -35,6 +37,7 @@ export {
|
|
|
35
37
|
deletePaidProjectDomain,
|
|
36
38
|
deleteProject,
|
|
37
39
|
deleteProjectDatabaseSchedule,
|
|
40
|
+
deleteProjectDatabaseWatch,
|
|
38
41
|
deleteProjectDatabaseWebhook,
|
|
39
42
|
detachProjectMailDomainBinding,
|
|
40
43
|
diffManagedSource,
|
|
@@ -91,6 +94,7 @@ export {
|
|
|
91
94
|
listProjectDatabaseAccess,
|
|
92
95
|
listProjectDatabaseScheduleRuns,
|
|
93
96
|
listProjectDatabaseSchedules,
|
|
97
|
+
listProjectDatabaseWatches,
|
|
94
98
|
listProjectDatabaseWebhookDeliveries,
|
|
95
99
|
listProjectDatabaseWebhooks,
|
|
96
100
|
listProjects,
|
|
@@ -271,6 +275,16 @@ export type {
|
|
|
271
275
|
CreateProjectDatabaseAccessErrors,
|
|
272
276
|
CreateProjectDatabaseAccessResponse,
|
|
273
277
|
CreateProjectDatabaseAccessResponses,
|
|
278
|
+
CreateProjectDatabaseTableData,
|
|
279
|
+
CreateProjectDatabaseTableError,
|
|
280
|
+
CreateProjectDatabaseTableErrors,
|
|
281
|
+
CreateProjectDatabaseTableResponse,
|
|
282
|
+
CreateProjectDatabaseTableResponses,
|
|
283
|
+
CreateProjectDatabaseWatchData,
|
|
284
|
+
CreateProjectDatabaseWatchError,
|
|
285
|
+
CreateProjectDatabaseWatchErrors,
|
|
286
|
+
CreateProjectDatabaseWatchResponse,
|
|
287
|
+
CreateProjectDatabaseWatchResponses,
|
|
274
288
|
CreateProjectDatabaseWebhookData,
|
|
275
289
|
CreateProjectDatabaseWebhookError,
|
|
276
290
|
CreateProjectDatabaseWebhookErrors,
|
|
@@ -325,6 +339,17 @@ export type {
|
|
|
325
339
|
DatabaseScheduleRunAccepted,
|
|
326
340
|
DatabaseScheduleRunPage,
|
|
327
341
|
DatabaseScheduleSetRequest,
|
|
342
|
+
DatabaseTable,
|
|
343
|
+
DatabaseTableColumn,
|
|
344
|
+
DatabaseTableColumnRequest,
|
|
345
|
+
DatabaseTableColumnType,
|
|
346
|
+
DatabaseTableCreated,
|
|
347
|
+
DatabaseTableCreateRequest,
|
|
348
|
+
DatabaseWatch,
|
|
349
|
+
DatabaseWatchCreateRequest,
|
|
350
|
+
DatabaseWatchDeleted,
|
|
351
|
+
DatabaseWatchId,
|
|
352
|
+
DatabaseWatchPage,
|
|
328
353
|
DatabaseWebhook,
|
|
329
354
|
DatabaseWebhookCreated,
|
|
330
355
|
DatabaseWebhookCreateRequest,
|
|
@@ -332,6 +357,8 @@ export type {
|
|
|
332
357
|
DatabaseWebhookDelivery,
|
|
333
358
|
DatabaseWebhookDeliveryId,
|
|
334
359
|
DatabaseWebhookDeliveryPage,
|
|
360
|
+
DatabaseWebhookEventPattern,
|
|
361
|
+
DatabaseWebhookEventPatternWritable,
|
|
335
362
|
DatabaseWebhookEventType,
|
|
336
363
|
DatabaseWebhookId,
|
|
337
364
|
DatabaseWebhookPage,
|
|
@@ -364,6 +391,11 @@ export type {
|
|
|
364
391
|
DeleteProjectDatabaseScheduleErrors,
|
|
365
392
|
DeleteProjectDatabaseScheduleResponse,
|
|
366
393
|
DeleteProjectDatabaseScheduleResponses,
|
|
394
|
+
DeleteProjectDatabaseWatchData,
|
|
395
|
+
DeleteProjectDatabaseWatchError,
|
|
396
|
+
DeleteProjectDatabaseWatchErrors,
|
|
397
|
+
DeleteProjectDatabaseWatchResponse,
|
|
398
|
+
DeleteProjectDatabaseWatchResponses,
|
|
367
399
|
DeleteProjectDatabaseWebhookData,
|
|
368
400
|
DeleteProjectDatabaseWebhookError,
|
|
369
401
|
DeleteProjectDatabaseWebhookErrors,
|
|
@@ -685,6 +717,11 @@ export type {
|
|
|
685
717
|
ListProjectDatabaseSchedulesErrors,
|
|
686
718
|
ListProjectDatabaseSchedulesResponse,
|
|
687
719
|
ListProjectDatabaseSchedulesResponses,
|
|
720
|
+
ListProjectDatabaseWatchesData,
|
|
721
|
+
ListProjectDatabaseWatchesError,
|
|
722
|
+
ListProjectDatabaseWatchesErrors,
|
|
723
|
+
ListProjectDatabaseWatchesResponse,
|
|
724
|
+
ListProjectDatabaseWatchesResponses,
|
|
688
725
|
ListProjectDatabaseWebhookDeliveriesData,
|
|
689
726
|
ListProjectDatabaseWebhookDeliveriesError,
|
|
690
727
|
ListProjectDatabaseWebhookDeliveriesErrors,
|
|
@@ -60,6 +60,10 @@ import type {
|
|
|
60
60
|
CreateOrganizationResponses,
|
|
61
61
|
CreateProjectDatabaseAccessErrors,
|
|
62
62
|
CreateProjectDatabaseAccessResponses,
|
|
63
|
+
CreateProjectDatabaseTableErrors,
|
|
64
|
+
CreateProjectDatabaseTableResponses,
|
|
65
|
+
CreateProjectDatabaseWatchErrors,
|
|
66
|
+
CreateProjectDatabaseWatchResponses,
|
|
63
67
|
CreateProjectDatabaseWebhookErrors,
|
|
64
68
|
CreateProjectDatabaseWebhookResponses,
|
|
65
69
|
CreateProjectDataChangeErrors,
|
|
@@ -77,6 +81,8 @@ import type {
|
|
|
77
81
|
CreateWorkspaceMailDomainRequest,
|
|
78
82
|
CreateWorkspaceMailDomainResponses,
|
|
79
83
|
DatabaseScheduleSetRequest,
|
|
84
|
+
DatabaseTableCreateRequest,
|
|
85
|
+
DatabaseWatchCreateRequest,
|
|
80
86
|
DatabaseWebhookCreateRequest,
|
|
81
87
|
DeclareApplicationDomainIdentityErrors,
|
|
82
88
|
DeclareApplicationDomainIdentityResponses,
|
|
@@ -88,6 +94,8 @@ import type {
|
|
|
88
94
|
DeletePaidProjectDomainResponses,
|
|
89
95
|
DeleteProjectDatabaseScheduleErrors,
|
|
90
96
|
DeleteProjectDatabaseScheduleResponses,
|
|
97
|
+
DeleteProjectDatabaseWatchErrors,
|
|
98
|
+
DeleteProjectDatabaseWatchResponses,
|
|
91
99
|
DeleteProjectDatabaseWebhookErrors,
|
|
92
100
|
DeleteProjectDatabaseWebhookResponses,
|
|
93
101
|
DeleteProjectErrors,
|
|
@@ -204,6 +212,8 @@ import type {
|
|
|
204
212
|
ListProjectDatabaseScheduleRunsResponses,
|
|
205
213
|
ListProjectDatabaseSchedulesErrors,
|
|
206
214
|
ListProjectDatabaseSchedulesResponses,
|
|
215
|
+
ListProjectDatabaseWatchesErrors,
|
|
216
|
+
ListProjectDatabaseWatchesResponses,
|
|
207
217
|
ListProjectDatabaseWebhookDeliveriesErrors,
|
|
208
218
|
ListProjectDatabaseWebhookDeliveriesResponses,
|
|
209
219
|
ListProjectDatabaseWebhooksErrors,
|
|
@@ -4759,6 +4769,200 @@ export const revokeProjectDatabaseAccess = <ThrowOnError extends boolean = true>
|
|
|
4759
4769
|
});
|
|
4760
4770
|
};
|
|
4761
4771
|
|
|
4772
|
+
/**
|
|
4773
|
+
* Create a table in the project's database
|
|
4774
|
+
*
|
|
4775
|
+
* Creates one ordinary table in the public schema of one environment's database, with the columns and the primary key the request names. Repeating an identical request answers the existing table with 200; a table of the same name with another definition is refused with database_table_conflict (409). The request wakes a sleeping database. A reached Stop budget refuses with project_budget_exceeded (402). At most 100 tables exist per database.
|
|
4776
|
+
*/
|
|
4777
|
+
export const createProjectDatabaseTable = <ThrowOnError extends boolean = true>(
|
|
4778
|
+
parameters: {
|
|
4779
|
+
"X-Request-Id"?: string;
|
|
4780
|
+
"Idempotency-Key": string;
|
|
4781
|
+
project_id: Ulid;
|
|
4782
|
+
databaseTableCreateRequest: DatabaseTableCreateRequest;
|
|
4783
|
+
},
|
|
4784
|
+
options?: Options<never, ThrowOnError>,
|
|
4785
|
+
): RequestResult<
|
|
4786
|
+
CreateProjectDatabaseTableResponses,
|
|
4787
|
+
CreateProjectDatabaseTableErrors,
|
|
4788
|
+
ThrowOnError,
|
|
4789
|
+
"data"
|
|
4790
|
+
> => {
|
|
4791
|
+
const params = buildClientParams(
|
|
4792
|
+
[parameters],
|
|
4793
|
+
[
|
|
4794
|
+
{
|
|
4795
|
+
args: [
|
|
4796
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4797
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
4798
|
+
{ in: "path", key: "project_id" },
|
|
4799
|
+
{ key: "databaseTableCreateRequest", map: "body" },
|
|
4800
|
+
],
|
|
4801
|
+
},
|
|
4802
|
+
],
|
|
4803
|
+
);
|
|
4804
|
+
return (options?.client ?? client).post<
|
|
4805
|
+
CreateProjectDatabaseTableResponses,
|
|
4806
|
+
CreateProjectDatabaseTableErrors,
|
|
4807
|
+
ThrowOnError,
|
|
4808
|
+
"data"
|
|
4809
|
+
>({
|
|
4810
|
+
responseStyle: "data",
|
|
4811
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4812
|
+
url: "/v1/projects/{project_id}/database/tables",
|
|
4813
|
+
...options,
|
|
4814
|
+
...params,
|
|
4815
|
+
headers: {
|
|
4816
|
+
"Content-Type": "application/json",
|
|
4817
|
+
...options?.headers,
|
|
4818
|
+
...params.headers,
|
|
4819
|
+
},
|
|
4820
|
+
});
|
|
4821
|
+
};
|
|
4822
|
+
|
|
4823
|
+
/**
|
|
4824
|
+
* List the project's database watches
|
|
4825
|
+
*
|
|
4826
|
+
* Returns every watch of the selected environment. Listing wakes a sleeping database.
|
|
4827
|
+
*/
|
|
4828
|
+
export const listProjectDatabaseWatches = <ThrowOnError extends boolean = true>(
|
|
4829
|
+
parameters: {
|
|
4830
|
+
"X-Request-Id"?: string;
|
|
4831
|
+
project_id: Ulid;
|
|
4832
|
+
environment?: "dev" | "prod";
|
|
4833
|
+
},
|
|
4834
|
+
options?: Options<never, ThrowOnError>,
|
|
4835
|
+
): RequestResult<
|
|
4836
|
+
ListProjectDatabaseWatchesResponses,
|
|
4837
|
+
ListProjectDatabaseWatchesErrors,
|
|
4838
|
+
ThrowOnError,
|
|
4839
|
+
"data"
|
|
4840
|
+
> => {
|
|
4841
|
+
const params = buildClientParams(
|
|
4842
|
+
[parameters],
|
|
4843
|
+
[
|
|
4844
|
+
{
|
|
4845
|
+
args: [
|
|
4846
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4847
|
+
{ in: "path", key: "project_id" },
|
|
4848
|
+
{ in: "query", key: "environment" },
|
|
4849
|
+
],
|
|
4850
|
+
},
|
|
4851
|
+
],
|
|
4852
|
+
);
|
|
4853
|
+
return (options?.client ?? client).get<
|
|
4854
|
+
ListProjectDatabaseWatchesResponses,
|
|
4855
|
+
ListProjectDatabaseWatchesErrors,
|
|
4856
|
+
ThrowOnError,
|
|
4857
|
+
"data"
|
|
4858
|
+
>({
|
|
4859
|
+
responseStyle: "data",
|
|
4860
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4861
|
+
url: "/v1/projects/{project_id}/database/watches",
|
|
4862
|
+
...options,
|
|
4863
|
+
...params,
|
|
4864
|
+
});
|
|
4865
|
+
};
|
|
4866
|
+
|
|
4867
|
+
/**
|
|
4868
|
+
* Watch the columns of one table for data events
|
|
4869
|
+
*
|
|
4870
|
+
* 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.
|
|
4871
|
+
*/
|
|
4872
|
+
export const createProjectDatabaseWatch = <ThrowOnError extends boolean = true>(
|
|
4873
|
+
parameters: {
|
|
4874
|
+
"X-Request-Id"?: string;
|
|
4875
|
+
"Idempotency-Key": string;
|
|
4876
|
+
project_id: Ulid;
|
|
4877
|
+
databaseWatchCreateRequest: DatabaseWatchCreateRequest;
|
|
4878
|
+
},
|
|
4879
|
+
options?: Options<never, ThrowOnError>,
|
|
4880
|
+
): RequestResult<
|
|
4881
|
+
CreateProjectDatabaseWatchResponses,
|
|
4882
|
+
CreateProjectDatabaseWatchErrors,
|
|
4883
|
+
ThrowOnError,
|
|
4884
|
+
"data"
|
|
4885
|
+
> => {
|
|
4886
|
+
const params = buildClientParams(
|
|
4887
|
+
[parameters],
|
|
4888
|
+
[
|
|
4889
|
+
{
|
|
4890
|
+
args: [
|
|
4891
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4892
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
4893
|
+
{ in: "path", key: "project_id" },
|
|
4894
|
+
{ key: "databaseWatchCreateRequest", map: "body" },
|
|
4895
|
+
],
|
|
4896
|
+
},
|
|
4897
|
+
],
|
|
4898
|
+
);
|
|
4899
|
+
return (options?.client ?? client).post<
|
|
4900
|
+
CreateProjectDatabaseWatchResponses,
|
|
4901
|
+
CreateProjectDatabaseWatchErrors,
|
|
4902
|
+
ThrowOnError,
|
|
4903
|
+
"data"
|
|
4904
|
+
>({
|
|
4905
|
+
responseStyle: "data",
|
|
4906
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4907
|
+
url: "/v1/projects/{project_id}/database/watches",
|
|
4908
|
+
...options,
|
|
4909
|
+
...params,
|
|
4910
|
+
headers: {
|
|
4911
|
+
"Content-Type": "application/json",
|
|
4912
|
+
...options?.headers,
|
|
4913
|
+
...params.headers,
|
|
4914
|
+
},
|
|
4915
|
+
});
|
|
4916
|
+
};
|
|
4917
|
+
|
|
4918
|
+
/**
|
|
4919
|
+
* Delete one database watch
|
|
4920
|
+
*
|
|
4921
|
+
* 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).
|
|
4922
|
+
*/
|
|
4923
|
+
export const deleteProjectDatabaseWatch = <ThrowOnError extends boolean = true>(
|
|
4924
|
+
parameters: {
|
|
4925
|
+
"X-Request-Id"?: string;
|
|
4926
|
+
"Idempotency-Key": string;
|
|
4927
|
+
project_id: Ulid;
|
|
4928
|
+
watch_id: string;
|
|
4929
|
+
environment: "dev" | "prod";
|
|
4930
|
+
},
|
|
4931
|
+
options?: Options<never, ThrowOnError>,
|
|
4932
|
+
): RequestResult<
|
|
4933
|
+
DeleteProjectDatabaseWatchResponses,
|
|
4934
|
+
DeleteProjectDatabaseWatchErrors,
|
|
4935
|
+
ThrowOnError,
|
|
4936
|
+
"data"
|
|
4937
|
+
> => {
|
|
4938
|
+
const params = buildClientParams(
|
|
4939
|
+
[parameters],
|
|
4940
|
+
[
|
|
4941
|
+
{
|
|
4942
|
+
args: [
|
|
4943
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
4944
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
4945
|
+
{ in: "path", key: "project_id" },
|
|
4946
|
+
{ in: "path", key: "watch_id" },
|
|
4947
|
+
{ in: "query", key: "environment" },
|
|
4948
|
+
],
|
|
4949
|
+
},
|
|
4950
|
+
],
|
|
4951
|
+
);
|
|
4952
|
+
return (options?.client ?? client).delete<
|
|
4953
|
+
DeleteProjectDatabaseWatchResponses,
|
|
4954
|
+
DeleteProjectDatabaseWatchErrors,
|
|
4955
|
+
ThrowOnError,
|
|
4956
|
+
"data"
|
|
4957
|
+
>({
|
|
4958
|
+
responseStyle: "data",
|
|
4959
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4960
|
+
url: "/v1/projects/{project_id}/database/watches/{watch_id}",
|
|
4961
|
+
...options,
|
|
4962
|
+
...params,
|
|
4963
|
+
});
|
|
4964
|
+
};
|
|
4965
|
+
|
|
4762
4966
|
/**
|
|
4763
4967
|
* List the project's database webhooks
|
|
4764
4968
|
*
|