@veroxm/sdk 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/content.d.ts +18 -6
- package/dist/content.js +23 -10
- package/dist/generated/api.d.ts +234 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
- Writes to database content models (public API 2.11): `create`, `update` and `delete` work on a model that allows
|
|
6
|
+
them, with its writable fields. `update(id)` and `delete(id)` take a text key too, and all three take `userId` and
|
|
7
|
+
`ctx` (sent as `?userId=` and `?ctx.<name>=`) for a model limited to the caller's rows, from a project key on your
|
|
8
|
+
server.
|
|
9
|
+
|
|
10
|
+
## 1.7.0
|
|
11
|
+
|
|
12
|
+
- Database content models (public API 2.10): `app.content(slug)` reads them like any collection; their entries come
|
|
13
|
+
from a connected database, with related rows nested. `get(id)` takes a text key too, and `list`, `search`, `count`
|
|
14
|
+
and `get` take `userId` and `ctx` (sent as `?userId=` and `?ctx.<name>=`) for a model limited to the caller's rows,
|
|
15
|
+
from a project key on your server.
|
|
16
|
+
|
|
3
17
|
## 1.6.0
|
|
4
18
|
|
|
5
19
|
- Forms in several languages (public API 2.8): `embedForm({ lang: "fr" })` (or `data-lang="fr"`) shows the form in that
|
package/dist/content.d.ts
CHANGED
|
@@ -28,6 +28,13 @@ export interface ListOptions {
|
|
|
28
28
|
* explicit last resort.
|
|
29
29
|
*/
|
|
30
30
|
locale?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A database content model limited to the caller's rows: whose rows (project keys on your server; an end user's
|
|
33
|
+
* login is always themselves). Sent as `?userId=`.
|
|
34
|
+
*/
|
|
35
|
+
userId?: string;
|
|
36
|
+
/** A database content model limited by a value your server passes: `{ tenant: 'acme' }` is sent as `?ctx.tenant=acme`. */
|
|
37
|
+
ctx?: Record<string, string>;
|
|
31
38
|
}
|
|
32
39
|
/**
|
|
33
40
|
* Typed access to one content collection's entries. `T` is whatever
|
|
@@ -58,18 +65,23 @@ export declare class ContentResource<T = Record<string, unknown>> {
|
|
|
58
65
|
* a specific locale's entry, filter list()/search() by whatever field
|
|
59
66
|
* identifies the logical entry (e.g. `slug`) plus `locale`, not by id.
|
|
60
67
|
*/
|
|
61
|
-
get(id: number, options?: {
|
|
68
|
+
get(id: number | string, options?: {
|
|
62
69
|
timestamps?: boolean;
|
|
63
|
-
}): Promise<T>;
|
|
64
|
-
/**
|
|
65
|
-
|
|
70
|
+
} & Pick<ListOptions, 'userId' | 'ctx'>): Promise<T>;
|
|
71
|
+
/**
|
|
72
|
+
* Fields are sent flat (no wrapper). Pass `draft: true` to create without publishing; omit it (or pass false) to
|
|
73
|
+
* publish immediately. A database content model that allows creating entries takes its writable fields (and `id` when
|
|
74
|
+
* it takes the key from you); `userId` / `ctx` say whose row it is for a model limited to the caller's rows.
|
|
75
|
+
*/
|
|
76
|
+
create(data: Record<string, unknown>, options?: Pick<ListOptions, 'userId' | 'ctx'>): Promise<T>;
|
|
66
77
|
/**
|
|
67
78
|
* A partial update -- only the fields present in `data` are changed.
|
|
68
79
|
* Publish state follows the same rule as create(): omitting `draft` (or
|
|
69
80
|
* passing `draft: false`) PUBLISHES the record immediately, even if it
|
|
70
81
|
* was previously a draft and this update doesn't touch content fields.
|
|
71
82
|
* Pass `draft: true` explicitly to keep (or return) it unpublished.
|
|
83
|
+
* (A database content model has no drafts: its writable fields only.)
|
|
72
84
|
*/
|
|
73
|
-
update(id: number, data: Record<string, unknown>): Promise<T>;
|
|
74
|
-
delete(id: number): Promise<void>;
|
|
85
|
+
update(id: number | string, data: Record<string, unknown>, options?: Pick<ListOptions, 'userId' | 'ctx'>): Promise<T>;
|
|
86
|
+
delete(id: number | string, options?: Pick<ListOptions, 'userId' | 'ctx'>): Promise<void>;
|
|
75
87
|
}
|
package/dist/content.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** Who the rows are for (userId, ctx.<name>), as query parameters. */
|
|
2
|
+
function callerQuery(options) {
|
|
3
|
+
return { userId: options.userId, ...Object.fromEntries(Object.entries(options.ctx ?? {}).map(([k, v]) => [`ctx.${k}`, v])) };
|
|
4
|
+
}
|
|
1
5
|
/**
|
|
2
6
|
* Typed access to one content collection's entries. `T` is whatever
|
|
3
7
|
* shape you expect back (the API's actual response is a plain object per
|
|
@@ -24,15 +28,18 @@ export class ContentResource {
|
|
|
24
28
|
count: options.count ? '1' : undefined,
|
|
25
29
|
timestamps: options.timestamps ? '1' : undefined,
|
|
26
30
|
locale: options.locale,
|
|
31
|
+
...callerQuery(options),
|
|
27
32
|
},
|
|
28
33
|
});
|
|
29
34
|
}
|
|
30
35
|
/** Same filters as list(), sent as a JSON body -- use this for `where`/`whereRelation`, which are awkward to express as query-string params. */
|
|
31
36
|
async search(options) {
|
|
37
|
+
const { userId, ctx, ...body } = options;
|
|
32
38
|
return this.app.request({
|
|
33
39
|
method: 'POST',
|
|
34
40
|
path: `${this.root()}/search`,
|
|
35
|
-
|
|
41
|
+
query: callerQuery({ userId, ctx }),
|
|
42
|
+
json: body,
|
|
36
43
|
});
|
|
37
44
|
}
|
|
38
45
|
/** A typed shortcut for search({...options, count: true}) -- the API returns a bare number for a counting query, not a list. */
|
|
@@ -53,14 +60,19 @@ export class ContentResource {
|
|
|
53
60
|
* identifies the logical entry (e.g. `slug`) plus `locale`, not by id.
|
|
54
61
|
*/
|
|
55
62
|
async get(id, options = {}) {
|
|
63
|
+
// A database content model's key can be text.
|
|
56
64
|
return this.app.request({
|
|
57
|
-
path: `${this.root()}/${id}`,
|
|
58
|
-
query: { timestamps: options.timestamps ? '1' : undefined },
|
|
65
|
+
path: `${this.root()}/${encodeURIComponent(String(id))}`,
|
|
66
|
+
query: { timestamps: options.timestamps ? '1' : undefined, ...callerQuery(options) },
|
|
59
67
|
});
|
|
60
68
|
}
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Fields are sent flat (no wrapper). Pass `draft: true` to create without publishing; omit it (or pass false) to
|
|
71
|
+
* publish immediately. A database content model that allows creating entries takes its writable fields (and `id` when
|
|
72
|
+
* it takes the key from you); `userId` / `ctx` say whose row it is for a model limited to the caller's rows.
|
|
73
|
+
*/
|
|
74
|
+
async create(data, options = {}) {
|
|
75
|
+
return this.app.request({ method: 'POST', path: this.root(), query: callerQuery(options), json: data });
|
|
64
76
|
}
|
|
65
77
|
/**
|
|
66
78
|
* A partial update -- only the fields present in `data` are changed.
|
|
@@ -68,11 +80,12 @@ export class ContentResource {
|
|
|
68
80
|
* passing `draft: false`) PUBLISHES the record immediately, even if it
|
|
69
81
|
* was previously a draft and this update doesn't touch content fields.
|
|
70
82
|
* Pass `draft: true` explicitly to keep (or return) it unpublished.
|
|
83
|
+
* (A database content model has no drafts: its writable fields only.)
|
|
71
84
|
*/
|
|
72
|
-
async update(id, data) {
|
|
73
|
-
return this.app.request({ method: 'PATCH', path: `${this.root()}/${id}`, json: data });
|
|
85
|
+
async update(id, data, options = {}) {
|
|
86
|
+
return this.app.request({ method: 'PATCH', path: `${this.root()}/${encodeURIComponent(String(id))}`, query: callerQuery(options), json: data });
|
|
74
87
|
}
|
|
75
|
-
async delete(id) {
|
|
76
|
-
await this.app.request({ method: 'DELETE', path: `${this.root()}/${id}
|
|
88
|
+
async delete(id, options = {}) {
|
|
89
|
+
await this.app.request({ method: 'DELETE', path: `${this.root()}/${encodeURIComponent(String(id))}`, query: callerQuery(options) });
|
|
77
90
|
}
|
|
78
91
|
}
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -540,11 +540,14 @@ export interface paths {
|
|
|
540
540
|
};
|
|
541
541
|
/**
|
|
542
542
|
* A collection's entries
|
|
543
|
-
* @description Flags are on when present (`?count`, `?timestamps`). With `count` the answer is a number.
|
|
543
|
+
* @description Flags are on when present (`?count`, `?timestamps`). With `count` the answer is a number. The slug can also name a database content model (entries read from a connected database): the key then also needs database:<db>:read, `filter.<field>[.<op>]=` filters, `userId=` or `ctx.<name>=` say whose rows for a model limited to the caller’s, and `state`, `locale` and `timestamps` don’t apply.
|
|
544
544
|
*/
|
|
545
545
|
get: operations["listEntries"];
|
|
546
546
|
put?: never;
|
|
547
|
-
/**
|
|
547
|
+
/**
|
|
548
|
+
* Create an entry
|
|
549
|
+
* @description A database content model takes this when it allows creating entries (405 `read_only` otherwise): the key also needs database:<db>:write, `userId=` or `ctx.<name>=` say whose row for a model limited to the caller’s (it is set to them), and the answer is the new entry as read back.
|
|
550
|
+
*/
|
|
548
551
|
post: operations["createEntry"];
|
|
549
552
|
delete?: never;
|
|
550
553
|
options?: never;
|
|
@@ -580,11 +583,17 @@ export interface paths {
|
|
|
580
583
|
get: operations["getEntry"];
|
|
581
584
|
put?: never;
|
|
582
585
|
post?: never;
|
|
583
|
-
/**
|
|
586
|
+
/**
|
|
587
|
+
* Delete an entry
|
|
588
|
+
* @description A database content model takes this when it allows deleting entries (405 `read_only` otherwise): the key also needs database:<db>:write, and only the caller’s rows are deleted. A row other rows still point at is 409 `in_use`.
|
|
589
|
+
*/
|
|
584
590
|
delete: operations["deleteEntry"];
|
|
585
591
|
options?: never;
|
|
586
592
|
head?: never;
|
|
587
|
-
/**
|
|
593
|
+
/**
|
|
594
|
+
* Change some fields of an entry
|
|
595
|
+
* @description A database content model takes this when it allows changing entries (405 `read_only` otherwise): the key also needs database:<db>:write, only the caller’s rows are changed (404 for any other), and the answer is the entry as read back.
|
|
596
|
+
*/
|
|
588
597
|
patch: operations["updateEntry"];
|
|
589
598
|
trace?: never;
|
|
590
599
|
};
|
|
@@ -760,6 +769,43 @@ export interface paths {
|
|
|
760
769
|
patch?: never;
|
|
761
770
|
trace?: never;
|
|
762
771
|
};
|
|
772
|
+
"/projects/{uuid}/databases/{db}/{table}": {
|
|
773
|
+
parameters: {
|
|
774
|
+
query?: never;
|
|
775
|
+
header?: never;
|
|
776
|
+
path?: never;
|
|
777
|
+
cookie?: never;
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* A page of rows from an exposed table of a connected database
|
|
781
|
+
* @description Needs database:<db>:read. Filters are filter.<column>=value or filter.<column>.<op>=value (eq, ne, gt, gte, lt, lte, in (comma-separated), contains, null (true/false)), on columns the table lets you filter. A table limited to the caller’s rows takes userId= or ctx.<name>= from a project key; an end user’s login is always themselves.
|
|
782
|
+
*/
|
|
783
|
+
get: operations["listDatabaseRows"];
|
|
784
|
+
put?: never;
|
|
785
|
+
post?: never;
|
|
786
|
+
delete?: never;
|
|
787
|
+
options?: never;
|
|
788
|
+
head?: never;
|
|
789
|
+
patch?: never;
|
|
790
|
+
trace?: never;
|
|
791
|
+
};
|
|
792
|
+
"/projects/{uuid}/databases/{db}/{table}/{key}": {
|
|
793
|
+
parameters: {
|
|
794
|
+
query?: never;
|
|
795
|
+
header?: never;
|
|
796
|
+
path?: never;
|
|
797
|
+
cookie?: never;
|
|
798
|
+
};
|
|
799
|
+
/** One row by its primary key */
|
|
800
|
+
get: operations["getDatabaseRow"];
|
|
801
|
+
put?: never;
|
|
802
|
+
post?: never;
|
|
803
|
+
delete?: never;
|
|
804
|
+
options?: never;
|
|
805
|
+
head?: never;
|
|
806
|
+
patch?: never;
|
|
807
|
+
trace?: never;
|
|
808
|
+
};
|
|
763
809
|
"/projects/{uuid}/setup": {
|
|
764
810
|
parameters: {
|
|
765
811
|
query?: never;
|
|
@@ -1320,9 +1366,10 @@ export interface components {
|
|
|
1320
1366
|
};
|
|
1321
1367
|
SessionWithRecoveryCodes: components["schemas"]["Session"] & components["schemas"]["MaybeRecoveryCodes"];
|
|
1322
1368
|
SessionWithPasskey: components["schemas"]["Session"] & components["schemas"]["PasskeyAdded"];
|
|
1323
|
-
/** @description An entry: its id and the collection's fields, by field name. */
|
|
1369
|
+
/** @description An entry: its id and the collection's fields, by field name. A database content model's entry also has its relations: an object (or null) or a list. */
|
|
1324
1370
|
Entry: {
|
|
1325
|
-
|
|
1371
|
+
/** @description A number; for a database content model, its key column as stored (a number or text). */
|
|
1372
|
+
id: number | string;
|
|
1326
1373
|
locale?: string | null;
|
|
1327
1374
|
/** Format: date-time */
|
|
1328
1375
|
published_at?: string;
|
|
@@ -1362,7 +1409,7 @@ export interface components {
|
|
|
1362
1409
|
/** @description One locale's entries; omitted = the default locale. */
|
|
1363
1410
|
locale?: string;
|
|
1364
1411
|
};
|
|
1365
|
-
/** @description Field values by name. `draft: true` keeps the entry unpublished; anything else publishes it. */
|
|
1412
|
+
/** @description Field values by name. `draft: true` keeps the entry unpublished; anything else publishes it. For a database content model that takes writes: only its writable fields (no `draft` or `locale`), and `id` only when the model takes the key from the caller. */
|
|
1366
1413
|
EntryWrite: {
|
|
1367
1414
|
[key: string]: unknown;
|
|
1368
1415
|
};
|
|
@@ -1504,6 +1551,19 @@ export interface components {
|
|
|
1504
1551
|
[key: string]: unknown;
|
|
1505
1552
|
};
|
|
1506
1553
|
};
|
|
1554
|
+
DatabaseRows: {
|
|
1555
|
+
data: {
|
|
1556
|
+
[key: string]: unknown;
|
|
1557
|
+
}[];
|
|
1558
|
+
/** @description Pass as page_token for the next page; null on the last page. */
|
|
1559
|
+
next_page_token: string | null;
|
|
1560
|
+
};
|
|
1561
|
+
DatabaseRow: {
|
|
1562
|
+
/** @description The row: the columns the table exposes. */
|
|
1563
|
+
data: {
|
|
1564
|
+
[key: string]: unknown;
|
|
1565
|
+
};
|
|
1566
|
+
};
|
|
1507
1567
|
StartedRun: {
|
|
1508
1568
|
runId: number;
|
|
1509
1569
|
};
|
|
@@ -1949,6 +2009,15 @@ export interface components {
|
|
|
1949
2009
|
"application/json": components["schemas"]["Error"];
|
|
1950
2010
|
};
|
|
1951
2011
|
};
|
|
2012
|
+
/** @description Not allowed: a database content model is read only */
|
|
2013
|
+
E405: {
|
|
2014
|
+
headers: {
|
|
2015
|
+
[name: string]: unknown;
|
|
2016
|
+
};
|
|
2017
|
+
content: {
|
|
2018
|
+
"application/json": components["schemas"]["Error"];
|
|
2019
|
+
};
|
|
2020
|
+
};
|
|
1952
2021
|
/** @description It conflicts with the current state */
|
|
1953
2022
|
E409: {
|
|
1954
2023
|
headers: {
|
|
@@ -1976,7 +2045,7 @@ export interface components {
|
|
|
1976
2045
|
"application/json": components["schemas"]["Error"];
|
|
1977
2046
|
};
|
|
1978
2047
|
};
|
|
1979
|
-
/** @description Too many requests; see Retry-After */
|
|
2048
|
+
/** @description Too many requests, or a plan limit reached; see Retry-After */
|
|
1980
2049
|
E429: {
|
|
1981
2050
|
headers: {
|
|
1982
2051
|
[name: string]: unknown;
|
|
@@ -1985,6 +2054,33 @@ export interface components {
|
|
|
1985
2054
|
"application/json": components["schemas"]["Error"];
|
|
1986
2055
|
};
|
|
1987
2056
|
};
|
|
2057
|
+
/** @description The system behind this answered with an error */
|
|
2058
|
+
E502: {
|
|
2059
|
+
headers: {
|
|
2060
|
+
[name: string]: unknown;
|
|
2061
|
+
};
|
|
2062
|
+
content: {
|
|
2063
|
+
"application/json": components["schemas"]["Error"];
|
|
2064
|
+
};
|
|
2065
|
+
};
|
|
2066
|
+
/** @description Not available right now; see Retry-After */
|
|
2067
|
+
E503: {
|
|
2068
|
+
headers: {
|
|
2069
|
+
[name: string]: unknown;
|
|
2070
|
+
};
|
|
2071
|
+
content: {
|
|
2072
|
+
"application/json": components["schemas"]["Error"];
|
|
2073
|
+
};
|
|
2074
|
+
};
|
|
2075
|
+
/** @description The system behind this did not answer in time */
|
|
2076
|
+
E504: {
|
|
2077
|
+
headers: {
|
|
2078
|
+
[name: string]: unknown;
|
|
2079
|
+
};
|
|
2080
|
+
content: {
|
|
2081
|
+
"application/json": components["schemas"]["Error"];
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
1988
2084
|
};
|
|
1989
2085
|
parameters: never;
|
|
1990
2086
|
requestBodies: never;
|
|
@@ -3020,6 +3116,8 @@ export interface operations {
|
|
|
3020
3116
|
count?: string;
|
|
3021
3117
|
timestamps?: string;
|
|
3022
3118
|
locale?: string;
|
|
3119
|
+
/** @description A database content model limited to the caller's rows: whose (project keys). */
|
|
3120
|
+
userId?: string;
|
|
3023
3121
|
};
|
|
3024
3122
|
header?: never;
|
|
3025
3123
|
path: {
|
|
@@ -3046,11 +3144,17 @@ export interface operations {
|
|
|
3046
3144
|
403: components["responses"]["E403"];
|
|
3047
3145
|
404: components["responses"]["E404"];
|
|
3048
3146
|
429: components["responses"]["E429"];
|
|
3147
|
+
502: components["responses"]["E502"];
|
|
3148
|
+
503: components["responses"]["E503"];
|
|
3149
|
+
504: components["responses"]["E504"];
|
|
3049
3150
|
};
|
|
3050
3151
|
};
|
|
3051
3152
|
createEntry: {
|
|
3052
3153
|
parameters: {
|
|
3053
|
-
query?:
|
|
3154
|
+
query?: {
|
|
3155
|
+
/** @description A database content model limited to the caller's rows: whose (project keys). */
|
|
3156
|
+
userId?: string;
|
|
3157
|
+
};
|
|
3054
3158
|
header?: never;
|
|
3055
3159
|
path: {
|
|
3056
3160
|
/** @description The project's UUID. */
|
|
@@ -3078,13 +3182,20 @@ export interface operations {
|
|
|
3078
3182
|
401: components["responses"]["E401"];
|
|
3079
3183
|
403: components["responses"]["E403"];
|
|
3080
3184
|
404: components["responses"]["E404"];
|
|
3185
|
+
405: components["responses"]["E405"];
|
|
3081
3186
|
409: components["responses"]["E409"];
|
|
3082
3187
|
429: components["responses"]["E429"];
|
|
3188
|
+
502: components["responses"]["E502"];
|
|
3189
|
+
503: components["responses"]["E503"];
|
|
3190
|
+
504: components["responses"]["E504"];
|
|
3083
3191
|
};
|
|
3084
3192
|
};
|
|
3085
3193
|
searchEntries: {
|
|
3086
3194
|
parameters: {
|
|
3087
|
-
query?:
|
|
3195
|
+
query?: {
|
|
3196
|
+
/** @description A database content model limited to the caller's rows: whose (project keys). `ctx.<name>=` likewise. */
|
|
3197
|
+
userId?: string;
|
|
3198
|
+
};
|
|
3088
3199
|
header?: never;
|
|
3089
3200
|
path: {
|
|
3090
3201
|
/** @description The project's UUID. */
|
|
@@ -3113,6 +3224,9 @@ export interface operations {
|
|
|
3113
3224
|
403: components["responses"]["E403"];
|
|
3114
3225
|
404: components["responses"]["E404"];
|
|
3115
3226
|
429: components["responses"]["E429"];
|
|
3227
|
+
502: components["responses"]["E502"];
|
|
3228
|
+
503: components["responses"]["E503"];
|
|
3229
|
+
504: components["responses"]["E504"];
|
|
3116
3230
|
};
|
|
3117
3231
|
};
|
|
3118
3232
|
getEntry: {
|
|
@@ -3121,13 +3235,16 @@ export interface operations {
|
|
|
3121
3235
|
timestamps?: string;
|
|
3122
3236
|
/** @description Present: answer with the A/B test variant's entry, plus `experiment` and `variant`. */
|
|
3123
3237
|
experiment?: string;
|
|
3238
|
+
/** @description A database content model limited to the caller's rows: whose (project keys). */
|
|
3239
|
+
userId?: string;
|
|
3124
3240
|
};
|
|
3125
3241
|
header?: never;
|
|
3126
3242
|
path: {
|
|
3127
3243
|
/** @description The project's UUID. */
|
|
3128
3244
|
uuid: string;
|
|
3129
3245
|
slug: string;
|
|
3130
|
-
id: number
|
|
3246
|
+
/** @description The entry's id: a number, or a database content model's key. */
|
|
3247
|
+
id: string;
|
|
3131
3248
|
};
|
|
3132
3249
|
cookie?: never;
|
|
3133
3250
|
};
|
|
@@ -3147,17 +3264,24 @@ export interface operations {
|
|
|
3147
3264
|
403: components["responses"]["E403"];
|
|
3148
3265
|
404: components["responses"]["E404"];
|
|
3149
3266
|
429: components["responses"]["E429"];
|
|
3267
|
+
502: components["responses"]["E502"];
|
|
3268
|
+
503: components["responses"]["E503"];
|
|
3269
|
+
504: components["responses"]["E504"];
|
|
3150
3270
|
};
|
|
3151
3271
|
};
|
|
3152
3272
|
deleteEntry: {
|
|
3153
3273
|
parameters: {
|
|
3154
|
-
query?:
|
|
3274
|
+
query?: {
|
|
3275
|
+
/** @description A database content model limited to the caller's rows: whose (project keys). */
|
|
3276
|
+
userId?: string;
|
|
3277
|
+
};
|
|
3155
3278
|
header?: never;
|
|
3156
3279
|
path: {
|
|
3157
3280
|
/** @description The project's UUID. */
|
|
3158
3281
|
uuid: string;
|
|
3159
3282
|
slug: string;
|
|
3160
|
-
id: number
|
|
3283
|
+
/** @description The entry's id: a number, or a database content model's key. */
|
|
3284
|
+
id: string;
|
|
3161
3285
|
};
|
|
3162
3286
|
cookie?: never;
|
|
3163
3287
|
};
|
|
@@ -3176,18 +3300,27 @@ export interface operations {
|
|
|
3176
3300
|
401: components["responses"]["E401"];
|
|
3177
3301
|
403: components["responses"]["E403"];
|
|
3178
3302
|
404: components["responses"]["E404"];
|
|
3303
|
+
405: components["responses"]["E405"];
|
|
3304
|
+
409: components["responses"]["E409"];
|
|
3179
3305
|
429: components["responses"]["E429"];
|
|
3306
|
+
502: components["responses"]["E502"];
|
|
3307
|
+
503: components["responses"]["E503"];
|
|
3308
|
+
504: components["responses"]["E504"];
|
|
3180
3309
|
};
|
|
3181
3310
|
};
|
|
3182
3311
|
updateEntry: {
|
|
3183
3312
|
parameters: {
|
|
3184
|
-
query?:
|
|
3313
|
+
query?: {
|
|
3314
|
+
/** @description A database content model limited to the caller's rows: whose (project keys). */
|
|
3315
|
+
userId?: string;
|
|
3316
|
+
};
|
|
3185
3317
|
header?: never;
|
|
3186
3318
|
path: {
|
|
3187
3319
|
/** @description The project's UUID. */
|
|
3188
3320
|
uuid: string;
|
|
3189
3321
|
slug: string;
|
|
3190
|
-
id: number
|
|
3322
|
+
/** @description The entry's id: a number, or a database content model's key. */
|
|
3323
|
+
id: string;
|
|
3191
3324
|
};
|
|
3192
3325
|
cookie?: never;
|
|
3193
3326
|
};
|
|
@@ -3210,8 +3343,12 @@ export interface operations {
|
|
|
3210
3343
|
401: components["responses"]["E401"];
|
|
3211
3344
|
403: components["responses"]["E403"];
|
|
3212
3345
|
404: components["responses"]["E404"];
|
|
3346
|
+
405: components["responses"]["E405"];
|
|
3213
3347
|
409: components["responses"]["E409"];
|
|
3214
3348
|
429: components["responses"]["E429"];
|
|
3349
|
+
502: components["responses"]["E502"];
|
|
3350
|
+
503: components["responses"]["E503"];
|
|
3351
|
+
504: components["responses"]["E504"];
|
|
3215
3352
|
};
|
|
3216
3353
|
};
|
|
3217
3354
|
listMedia: {
|
|
@@ -3654,6 +3791,88 @@ export interface operations {
|
|
|
3654
3791
|
429: components["responses"]["E429"];
|
|
3655
3792
|
};
|
|
3656
3793
|
};
|
|
3794
|
+
listDatabaseRows: {
|
|
3795
|
+
parameters: {
|
|
3796
|
+
query?: {
|
|
3797
|
+
/** @description Up to 3 columns, like name,-created_at. */
|
|
3798
|
+
sort?: string;
|
|
3799
|
+
/** @description Rows per page: default 25, at most the connection's limit. */
|
|
3800
|
+
limit?: number;
|
|
3801
|
+
/** @description next_page_token from the previous page, with the same filters and sort. */
|
|
3802
|
+
page_token?: string;
|
|
3803
|
+
/** @description Whose rows, for a table limited to the caller's rows (project keys). */
|
|
3804
|
+
userId?: string;
|
|
3805
|
+
};
|
|
3806
|
+
header?: never;
|
|
3807
|
+
path: {
|
|
3808
|
+
/** @description The project's UUID. */
|
|
3809
|
+
uuid: string;
|
|
3810
|
+
/** @description The database's name in the project. */
|
|
3811
|
+
db: string;
|
|
3812
|
+
/** @description The table's URL name. */
|
|
3813
|
+
table: string;
|
|
3814
|
+
};
|
|
3815
|
+
cookie?: never;
|
|
3816
|
+
};
|
|
3817
|
+
requestBody?: never;
|
|
3818
|
+
responses: {
|
|
3819
|
+
/** @description OK */
|
|
3820
|
+
200: {
|
|
3821
|
+
headers: {
|
|
3822
|
+
[name: string]: unknown;
|
|
3823
|
+
};
|
|
3824
|
+
content: {
|
|
3825
|
+
"application/json": components["schemas"]["DatabaseRows"];
|
|
3826
|
+
};
|
|
3827
|
+
};
|
|
3828
|
+
400: components["responses"]["E400"];
|
|
3829
|
+
401: components["responses"]["E401"];
|
|
3830
|
+
403: components["responses"]["E403"];
|
|
3831
|
+
404: components["responses"]["E404"];
|
|
3832
|
+
429: components["responses"]["E429"];
|
|
3833
|
+
502: components["responses"]["E502"];
|
|
3834
|
+
503: components["responses"]["E503"];
|
|
3835
|
+
504: components["responses"]["E504"];
|
|
3836
|
+
};
|
|
3837
|
+
};
|
|
3838
|
+
getDatabaseRow: {
|
|
3839
|
+
parameters: {
|
|
3840
|
+
query?: {
|
|
3841
|
+
/** @description Whose rows, for a table limited to the caller's rows (project keys). */
|
|
3842
|
+
userId?: string;
|
|
3843
|
+
};
|
|
3844
|
+
header?: never;
|
|
3845
|
+
path: {
|
|
3846
|
+
/** @description The project's UUID. */
|
|
3847
|
+
uuid: string;
|
|
3848
|
+
db: string;
|
|
3849
|
+
table: string;
|
|
3850
|
+
/** @description The row's primary key value. */
|
|
3851
|
+
key: string;
|
|
3852
|
+
};
|
|
3853
|
+
cookie?: never;
|
|
3854
|
+
};
|
|
3855
|
+
requestBody?: never;
|
|
3856
|
+
responses: {
|
|
3857
|
+
/** @description OK */
|
|
3858
|
+
200: {
|
|
3859
|
+
headers: {
|
|
3860
|
+
[name: string]: unknown;
|
|
3861
|
+
};
|
|
3862
|
+
content: {
|
|
3863
|
+
"application/json": components["schemas"]["DatabaseRow"];
|
|
3864
|
+
};
|
|
3865
|
+
};
|
|
3866
|
+
400: components["responses"]["E400"];
|
|
3867
|
+
401: components["responses"]["E401"];
|
|
3868
|
+
403: components["responses"]["E403"];
|
|
3869
|
+
404: components["responses"]["E404"];
|
|
3870
|
+
429: components["responses"]["E429"];
|
|
3871
|
+
502: components["responses"]["E502"];
|
|
3872
|
+
503: components["responses"]["E503"];
|
|
3873
|
+
504: components["responses"]["E504"];
|
|
3874
|
+
};
|
|
3875
|
+
};
|
|
3657
3876
|
exportSetup: {
|
|
3658
3877
|
parameters: {
|
|
3659
3878
|
query?: never;
|