@usehercules/sdk 1.14.0 → 1.14.2
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 +39 -0
- package/README.md +9 -0
- package/client.d.mts +13 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -4
- package/client.d.ts.map +1 -1
- package/client.js +21 -5
- package/client.js.map +1 -1
- package/client.mjs +21 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/content/{models/models.d.mts → collections/collections.d.mts} +88 -87
- package/resources/content/collections/collections.d.mts.map +1 -0
- package/resources/content/{models/models.d.ts → collections/collections.d.ts} +88 -87
- package/resources/content/collections/collections.d.ts.map +1 -0
- package/resources/content/collections/collections.js +58 -0
- package/resources/content/collections/collections.js.map +1 -0
- package/resources/content/collections/collections.mjs +53 -0
- package/resources/content/collections/collections.mjs.map +1 -0
- package/resources/content/{models → collections}/fields.d.mts +23 -22
- package/resources/content/collections/fields.d.mts.map +1 -0
- package/resources/content/{models → collections}/fields.d.ts +23 -22
- package/resources/content/collections/fields.d.ts.map +1 -0
- package/resources/content/collections/fields.js +41 -0
- package/resources/content/collections/fields.js.map +1 -0
- package/resources/content/collections/fields.mjs +37 -0
- package/resources/content/collections/fields.mjs.map +1 -0
- package/resources/content/collections/index.d.mts +3 -0
- package/resources/content/collections/index.d.mts.map +1 -0
- package/resources/content/collections/index.d.ts +3 -0
- package/resources/content/collections/index.d.ts.map +1 -0
- package/resources/content/{models → collections}/index.js +3 -3
- package/resources/content/collections/index.js.map +1 -0
- package/resources/content/{models → collections}/index.mjs +1 -1
- package/resources/content/collections/index.mjs.map +1 -0
- package/resources/content/collections.d.mts +2 -0
- package/resources/content/collections.d.mts.map +1 -0
- package/resources/content/collections.d.ts +2 -0
- package/resources/content/collections.d.ts.map +1 -0
- package/resources/content/{models.js → collections.js} +2 -2
- package/resources/content/collections.js.map +1 -0
- package/resources/content/{models.mjs → collections.mjs} +2 -2
- package/resources/content/collections.mjs.map +1 -0
- package/resources/content/content.d.mts +4 -4
- package/resources/content/content.d.mts.map +1 -1
- package/resources/content/content.d.ts +4 -4
- package/resources/content/content.d.ts.map +1 -1
- package/resources/content/content.js +4 -4
- package/resources/content/content.js.map +1 -1
- package/resources/content/content.mjs +4 -4
- package/resources/content/content.mjs.map +1 -1
- package/resources/content/entries.d.mts +18 -18
- package/resources/content/entries.d.mts.map +1 -1
- package/resources/content/entries.d.ts +18 -18
- package/resources/content/entries.d.ts.map +1 -1
- package/resources/content/entries.js +2 -2
- package/resources/content/entries.mjs +2 -2
- package/resources/content/index.d.mts +1 -1
- package/resources/content/index.d.mts.map +1 -1
- package/resources/content/index.d.ts +1 -1
- package/resources/content/index.d.ts.map +1 -1
- package/resources/content/index.js +3 -3
- package/resources/content/index.js.map +1 -1
- package/resources/content/index.mjs +1 -1
- package/resources/content/index.mjs.map +1 -1
- package/resources/domains.d.mts +54 -0
- package/resources/domains.d.mts.map +1 -0
- package/resources/domains.d.ts +54 -0
- package/resources/domains.d.ts.map +1 -0
- package/resources/domains.js +21 -0
- package/resources/domains.js.map +1 -0
- package/resources/domains.mjs +17 -0
- package/resources/domains.mjs.map +1 -0
- package/resources/files.d.mts +8 -6
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +8 -6
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +3 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +3 -2
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +34 -7
- package/src/internal/parse.ts +6 -0
- package/src/resources/content/{models/models.ts → collections/collections.ts} +112 -108
- package/src/resources/content/{models → collections}/fields.ts +39 -27
- package/src/resources/content/{models → collections}/index.ts +8 -8
- package/src/resources/content/{models.ts → collections.ts} +1 -1
- package/src/resources/content/content.ts +16 -16
- package/src/resources/content/entries.ts +20 -20
- package/src/resources/content/index.ts +9 -9
- package/src/resources/domains.ts +74 -0
- package/src/resources/files.ts +8 -6
- package/src/resources/index.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/content/models/fields.d.mts.map +0 -1
- package/resources/content/models/fields.d.ts.map +0 -1
- package/resources/content/models/fields.js +0 -37
- package/resources/content/models/fields.js.map +0 -1
- package/resources/content/models/fields.mjs +0 -33
- package/resources/content/models/fields.mjs.map +0 -1
- package/resources/content/models/index.d.mts +0 -3
- package/resources/content/models/index.d.mts.map +0 -1
- package/resources/content/models/index.d.ts +0 -3
- package/resources/content/models/index.d.ts.map +0 -1
- package/resources/content/models/index.js.map +0 -1
- package/resources/content/models/index.mjs.map +0 -1
- package/resources/content/models/models.d.mts.map +0 -1
- package/resources/content/models/models.d.ts.map +0 -1
- package/resources/content/models/models.js +0 -54
- package/resources/content/models/models.js.map +0 -1
- package/resources/content/models/models.mjs +0 -49
- package/resources/content/models/models.mjs.map +0 -1
- package/resources/content/models.d.mts +0 -2
- package/resources/content/models.d.mts.map +0 -1
- package/resources/content/models.d.ts +0 -2
- package/resources/content/models.d.ts.map +0 -1
- package/resources/content/models.js.map +0 -1
- package/resources/content/models.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","sourceRoot":"","sources":["../../src/resources/content/content.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAKL,MAAM,GAEP;OACM,KAAK,UAAU;OACf,EACL,OAAO,GAOR;OACM,KAAK,UAAU;OACf,EAKL,OAAO,GAER;OACM,KAAK,
|
|
1
|
+
{"version":3,"file":"content.mjs","sourceRoot":"","sources":["../../src/resources/content/content.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAKL,MAAM,GAEP;OACM,KAAK,UAAU;OACf,EACL,OAAO,GAOR;OACM,KAAK,UAAU;OACf,EAKL,OAAO,GAER;OACM,KAAK,cAAc;OACnB,EAKL,WAAW,GAGZ;OACM,KAAK,WAAW;OAChB,EAOL,QAAQ,GAET;AAED;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;CAAA;AAED,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;AACxB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/p
|
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
5
|
export declare class Entries extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Creates a new content entry for a given
|
|
7
|
+
* Creates a new content entry for a given collection. Entries start as drafts by
|
|
8
8
|
* default. Use the publish endpoint to make entries publicly accessible.
|
|
9
9
|
*/
|
|
10
10
|
create(body: EntryCreateParams, options?: RequestOptions): APIPromise<Entry>;
|
|
@@ -15,7 +15,7 @@ export declare class Entries extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
update(entryID: string, body?: EntryUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Entry>;
|
|
17
17
|
/**
|
|
18
|
-
* Retrieves a paginated list of content entries. Supports filtering by
|
|
18
|
+
* Retrieves a paginated list of content entries. Supports filtering by collection,
|
|
19
19
|
* status, locale, and custom field queries. Use the 'where' parameter for
|
|
20
20
|
* field-based filtering with operators like $eq, $contains, $gt, etc.
|
|
21
21
|
*/
|
|
@@ -44,14 +44,18 @@ export declare class Entries extends APIResource {
|
|
|
44
44
|
}
|
|
45
45
|
export type EntriesCursorIDPage = CursorIDPage<Entry>;
|
|
46
46
|
/**
|
|
47
|
-
* A content entry containing field values based on its
|
|
48
|
-
* be drafts, published, or archived.
|
|
47
|
+
* A content entry containing field values based on its collection schema. Entries
|
|
48
|
+
* can be drafts, published, or archived.
|
|
49
49
|
*/
|
|
50
50
|
export interface Entry {
|
|
51
51
|
/**
|
|
52
52
|
* Unique identifier for the entry
|
|
53
53
|
*/
|
|
54
54
|
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* ID of the content collection this entry belongs to
|
|
57
|
+
*/
|
|
58
|
+
collection_id: string;
|
|
55
59
|
/**
|
|
56
60
|
* Timestamp when the entry was created
|
|
57
61
|
*/
|
|
@@ -67,10 +71,6 @@ export interface Entry {
|
|
|
67
71
|
* Primary locale for this entry
|
|
68
72
|
*/
|
|
69
73
|
locale: string;
|
|
70
|
-
/**
|
|
71
|
-
* ID of the content model this entry belongs to
|
|
72
|
-
*/
|
|
73
|
-
model_id: string;
|
|
74
74
|
/**
|
|
75
75
|
* Publishing status: draft, published, or archived
|
|
76
76
|
*/
|
|
@@ -84,13 +84,13 @@ export interface Entry {
|
|
|
84
84
|
*/
|
|
85
85
|
version: number;
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* API ID of the content collection (included when populated)
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
collection_api_id?: string;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Timestamp when first published
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
first_published_at?: string | null;
|
|
94
94
|
/**
|
|
95
95
|
* Timestamp when last published
|
|
96
96
|
*/
|
|
@@ -106,9 +106,9 @@ export interface Entry {
|
|
|
106
106
|
}
|
|
107
107
|
export interface EntryCreateParams {
|
|
108
108
|
/**
|
|
109
|
-
* API ID of the content
|
|
109
|
+
* API ID of the content collection (e.g., 'blogPost')
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
collection: string;
|
|
112
112
|
/**
|
|
113
113
|
* Optional custom ID for the entry. Must start with 'ce\_'. If not provided, one
|
|
114
114
|
* will be generated.
|
|
@@ -148,6 +148,10 @@ export interface EntryUpdateParams {
|
|
|
148
148
|
version?: number;
|
|
149
149
|
}
|
|
150
150
|
export interface EntryListParams extends CursorIDPageParams {
|
|
151
|
+
/**
|
|
152
|
+
* Filter by content collection API ID (e.g., 'blogPost')
|
|
153
|
+
*/
|
|
154
|
+
collection?: string;
|
|
151
155
|
/**
|
|
152
156
|
* Filter by creation date
|
|
153
157
|
*/
|
|
@@ -160,10 +164,6 @@ export interface EntryListParams extends CursorIDPageParams {
|
|
|
160
164
|
* Filter by primary locale
|
|
161
165
|
*/
|
|
162
166
|
locale?: string;
|
|
163
|
-
/**
|
|
164
|
-
* Filter by content model API ID (e.g., 'blogPost')
|
|
165
|
-
*/
|
|
166
|
-
model?: string;
|
|
167
167
|
/**
|
|
168
168
|
* JSON-encoded sort order. Example: {"field":"publishedAt","direction":"desc"}
|
|
169
169
|
*/
|
|
@@ -1 +1 @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;IAED;;OAEG;IACH,UAAiB,SAAS;QACxB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;IAED;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -4,7 +4,7 @@ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/p
|
|
|
4
4
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
5
|
export declare class Entries extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Creates a new content entry for a given
|
|
7
|
+
* Creates a new content entry for a given collection. Entries start as drafts by
|
|
8
8
|
* default. Use the publish endpoint to make entries publicly accessible.
|
|
9
9
|
*/
|
|
10
10
|
create(body: EntryCreateParams, options?: RequestOptions): APIPromise<Entry>;
|
|
@@ -15,7 +15,7 @@ export declare class Entries extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
update(entryID: string, body?: EntryUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Entry>;
|
|
17
17
|
/**
|
|
18
|
-
* Retrieves a paginated list of content entries. Supports filtering by
|
|
18
|
+
* Retrieves a paginated list of content entries. Supports filtering by collection,
|
|
19
19
|
* status, locale, and custom field queries. Use the 'where' parameter for
|
|
20
20
|
* field-based filtering with operators like $eq, $contains, $gt, etc.
|
|
21
21
|
*/
|
|
@@ -44,14 +44,18 @@ export declare class Entries extends APIResource {
|
|
|
44
44
|
}
|
|
45
45
|
export type EntriesCursorIDPage = CursorIDPage<Entry>;
|
|
46
46
|
/**
|
|
47
|
-
* A content entry containing field values based on its
|
|
48
|
-
* be drafts, published, or archived.
|
|
47
|
+
* A content entry containing field values based on its collection schema. Entries
|
|
48
|
+
* can be drafts, published, or archived.
|
|
49
49
|
*/
|
|
50
50
|
export interface Entry {
|
|
51
51
|
/**
|
|
52
52
|
* Unique identifier for the entry
|
|
53
53
|
*/
|
|
54
54
|
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* ID of the content collection this entry belongs to
|
|
57
|
+
*/
|
|
58
|
+
collection_id: string;
|
|
55
59
|
/**
|
|
56
60
|
* Timestamp when the entry was created
|
|
57
61
|
*/
|
|
@@ -67,10 +71,6 @@ export interface Entry {
|
|
|
67
71
|
* Primary locale for this entry
|
|
68
72
|
*/
|
|
69
73
|
locale: string;
|
|
70
|
-
/**
|
|
71
|
-
* ID of the content model this entry belongs to
|
|
72
|
-
*/
|
|
73
|
-
model_id: string;
|
|
74
74
|
/**
|
|
75
75
|
* Publishing status: draft, published, or archived
|
|
76
76
|
*/
|
|
@@ -84,13 +84,13 @@ export interface Entry {
|
|
|
84
84
|
*/
|
|
85
85
|
version: number;
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* API ID of the content collection (included when populated)
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
collection_api_id?: string;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Timestamp when first published
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
first_published_at?: string | null;
|
|
94
94
|
/**
|
|
95
95
|
* Timestamp when last published
|
|
96
96
|
*/
|
|
@@ -106,9 +106,9 @@ export interface Entry {
|
|
|
106
106
|
}
|
|
107
107
|
export interface EntryCreateParams {
|
|
108
108
|
/**
|
|
109
|
-
* API ID of the content
|
|
109
|
+
* API ID of the content collection (e.g., 'blogPost')
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
collection: string;
|
|
112
112
|
/**
|
|
113
113
|
* Optional custom ID for the entry. Must start with 'ce\_'. If not provided, one
|
|
114
114
|
* will be generated.
|
|
@@ -148,6 +148,10 @@ export interface EntryUpdateParams {
|
|
|
148
148
|
version?: number;
|
|
149
149
|
}
|
|
150
150
|
export interface EntryListParams extends CursorIDPageParams {
|
|
151
|
+
/**
|
|
152
|
+
* Filter by content collection API ID (e.g., 'blogPost')
|
|
153
|
+
*/
|
|
154
|
+
collection?: string;
|
|
151
155
|
/**
|
|
152
156
|
* Filter by creation date
|
|
153
157
|
*/
|
|
@@ -160,10 +164,6 @@ export interface EntryListParams extends CursorIDPageParams {
|
|
|
160
164
|
* Filter by primary locale
|
|
161
165
|
*/
|
|
162
166
|
locale?: string;
|
|
163
|
-
/**
|
|
164
|
-
* Filter by content model API ID (e.g., 'blogPost')
|
|
165
|
-
*/
|
|
166
|
-
model?: string;
|
|
167
167
|
/**
|
|
168
168
|
* JSON-encoded sort order. Example: {"field":"publishedAt","direction":"desc"}
|
|
169
169
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/resources/content/entries.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;I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tB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -7,7 +7,7 @@ const pagination_1 = require("../../core/pagination.js");
|
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
8
|
class Entries extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Creates a new content entry for a given
|
|
10
|
+
* Creates a new content entry for a given collection. Entries start as drafts by
|
|
11
11
|
* default. Use the publish endpoint to make entries publicly accessible.
|
|
12
12
|
*/
|
|
13
13
|
create(body, options) {
|
|
@@ -22,7 +22,7 @@ class Entries extends resource_1.APIResource {
|
|
|
22
22
|
return this._client.patch((0, path_1.path) `/v1/content/entries/${entryID}`, { body, ...options });
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Retrieves a paginated list of content entries. Supports filtering by
|
|
25
|
+
* Retrieves a paginated list of content entries. Supports filtering by collection,
|
|
26
26
|
* status, locale, and custom field queries. Use the 'where' parameter for
|
|
27
27
|
* field-based filtering with operators like $eq, $contains, $gt, etc.
|
|
28
28
|
*/
|
|
@@ -4,7 +4,7 @@ import { CursorIDPage } from "../../core/pagination.mjs";
|
|
|
4
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
5
|
export class Entries extends APIResource {
|
|
6
6
|
/**
|
|
7
|
-
* Creates a new content entry for a given
|
|
7
|
+
* Creates a new content entry for a given collection. Entries start as drafts by
|
|
8
8
|
* default. Use the publish endpoint to make entries publicly accessible.
|
|
9
9
|
*/
|
|
10
10
|
create(body, options) {
|
|
@@ -19,7 +19,7 @@ export class Entries extends APIResource {
|
|
|
19
19
|
return this._client.patch(path `/v1/content/entries/${entryID}`, { body, ...options });
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Retrieves a paginated list of content entries. Supports filtering by
|
|
22
|
+
* Retrieves a paginated list of content entries. Supports filtering by collection,
|
|
23
23
|
* status, locale, and custom field queries. Use the 'where' parameter for
|
|
24
24
|
* field-based filtering with operators like $eq, $contains, $gt, etc.
|
|
25
25
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Assets, type Asset, type AssetCreateParams, type AssetUpdateParams, type AssetListParams, type AssetsCursorIDPage, } from "./assets.mjs";
|
|
2
|
+
export { Collections, type Collection, type Field, type CollectionCreateParams, type CollectionUpdateParams, type CollectionListParams, type CollectionsCursorIDPage, } from "./collections/index.mjs";
|
|
2
3
|
export { Content } from "./content.mjs";
|
|
3
4
|
export { Entries, type Entry, type EntryCreateParams, type EntryUpdateParams, type EntryListParams, type EntryPublishParams, type EntriesCursorIDPage, } from "./entries.mjs";
|
|
4
5
|
export { Locales, type Locale, type LocaleCreateParams, type LocaleUpdateParams, type LocaleListParams, type LocalesCursorIDPage, } from "./locales.mjs";
|
|
5
|
-
export { Models, type Field, type Model, type ModelCreateParams, type ModelUpdateParams, type ModelListParams, type ModelsCursorIDPage, } from "./models/index.mjs";
|
|
6
6
|
export { Releases, type Release, type ReleaseItem, type ReleaseCreateParams, type ReleaseUpdateParams, type ReleaseListParams, type ReleaseScheduleParams, type ReleasesCursorIDPage, } from "./releases/index.mjs";
|
|
7
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,OAAO,EAAE;OACX,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB;OACM,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GAC7B;OACM,EAAE,OAAO,EAAE;OACX,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Assets, type Asset, type AssetCreateParams, type AssetUpdateParams, type AssetListParams, type AssetsCursorIDPage, } from "./assets.js";
|
|
2
|
+
export { Collections, type Collection, type Field, type CollectionCreateParams, type CollectionUpdateParams, type CollectionListParams, type CollectionsCursorIDPage, } from "./collections/index.js";
|
|
2
3
|
export { Content } from "./content.js";
|
|
3
4
|
export { Entries, type Entry, type EntryCreateParams, type EntryUpdateParams, type EntryListParams, type EntryPublishParams, type EntriesCursorIDPage, } from "./entries.js";
|
|
4
5
|
export { Locales, type Locale, type LocaleCreateParams, type LocaleUpdateParams, type LocaleListParams, type LocalesCursorIDPage, } from "./locales.js";
|
|
5
|
-
export { Models, type Field, type Model, type ModelCreateParams, type ModelUpdateParams, type ModelListParams, type ModelsCursorIDPage, } from "./models/index.js";
|
|
6
6
|
export { Releases, type Release, type ReleaseItem, type ReleaseCreateParams, type ReleaseUpdateParams, type ReleaseListParams, type ReleaseScheduleParams, type ReleasesCursorIDPage, } from "./releases/index.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,OAAO,EAAE;OACX,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB;OACM,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GAC7B;OACM,EAAE,OAAO,EAAE;OACX,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB;OACM,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Releases = exports.
|
|
4
|
+
exports.Releases = exports.Locales = exports.Entries = exports.Content = exports.Collections = exports.Assets = void 0;
|
|
5
5
|
var assets_1 = require("./assets.js");
|
|
6
6
|
Object.defineProperty(exports, "Assets", { enumerable: true, get: function () { return assets_1.Assets; } });
|
|
7
|
+
var index_1 = require("./collections/index.js");
|
|
8
|
+
Object.defineProperty(exports, "Collections", { enumerable: true, get: function () { return index_1.Collections; } });
|
|
7
9
|
var content_1 = require("./content.js");
|
|
8
10
|
Object.defineProperty(exports, "Content", { enumerable: true, get: function () { return content_1.Content; } });
|
|
9
11
|
var entries_1 = require("./entries.js");
|
|
10
12
|
Object.defineProperty(exports, "Entries", { enumerable: true, get: function () { return entries_1.Entries; } });
|
|
11
13
|
var locales_1 = require("./locales.js");
|
|
12
14
|
Object.defineProperty(exports, "Locales", { enumerable: true, get: function () { return locales_1.Locales; } });
|
|
13
|
-
var index_1 = require("./models/index.js");
|
|
14
|
-
Object.defineProperty(exports, "Models", { enumerable: true, get: function () { return index_1.Models; } });
|
|
15
15
|
var index_2 = require("./releases/index.js");
|
|
16
16
|
Object.defineProperty(exports, "Releases", { enumerable: true, get: function () { return index_2.Releases; } });
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAOkB;AANhB,gGAAA,MAAM,OAAA;AAOR,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAOkB;AANhB,gGAAA,MAAM,OAAA;AAOR,gDAQ6B;AAP3B,oGAAA,WAAW,OAAA;AAQb,wCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,6CAS0B;AARxB,iGAAA,QAAQ,OAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export { Assets, } from "./assets.mjs";
|
|
3
|
+
export { Collections, } from "./collections/index.mjs";
|
|
3
4
|
export { Content } from "./content.mjs";
|
|
4
5
|
export { Entries, } from "./entries.mjs";
|
|
5
6
|
export { Locales, } from "./locales.mjs";
|
|
6
|
-
export { Models, } from "./models/index.mjs";
|
|
7
7
|
export { Releases, } from "./releases/index.mjs";
|
|
8
8
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAMP;OACM,EAAE,OAAO,EAAE;OACX,EACL,OAAO,GAOR;OACM,EACL,OAAO,GAMR;OACM,EACL,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/content/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAMP;OACM,EACL,WAAW,GAOZ;OACM,EAAE,OAAO,EAAE;OACX,EACL,OAAO,GAOR;OACM,EACL,OAAO,GAMR;OACM,EACL,QAAQ,GAQT"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../core/pagination.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* List custom domains linked to a website, including Cloudflare verification
|
|
6
|
+
* and SSL status.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Domains extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a paginated list of custom domains linked to the website, including
|
|
11
|
+
* Cloudflare verification and SSL status.
|
|
12
|
+
*/
|
|
13
|
+
list(query?: DomainListParams | null | undefined, options?: RequestOptions): PagePromise<DomainsCursorIDPage, Domain>;
|
|
14
|
+
}
|
|
15
|
+
export type DomainsCursorIDPage = CursorIDPage<Domain>;
|
|
16
|
+
/**
|
|
17
|
+
* A custom domain linked to a website.
|
|
18
|
+
*/
|
|
19
|
+
export interface Domain {
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier for the domain
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Timestamp when the domain was created
|
|
26
|
+
*/
|
|
27
|
+
created: string;
|
|
28
|
+
/**
|
|
29
|
+
* The custom domain hostname (e.g., 'app.example.com')
|
|
30
|
+
*/
|
|
31
|
+
hostname: string;
|
|
32
|
+
/**
|
|
33
|
+
* Timestamp when the domain was last updated
|
|
34
|
+
*/
|
|
35
|
+
updated: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether this is a wildcard domain
|
|
38
|
+
*/
|
|
39
|
+
wildcard: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* SSL certificate status (e.g., 'active', 'pending_validation')
|
|
42
|
+
*/
|
|
43
|
+
ssl_status?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Cloudflare verification status (e.g., 'active', 'pending')
|
|
46
|
+
*/
|
|
47
|
+
status?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface DomainListParams extends CursorIDPageParams {
|
|
50
|
+
}
|
|
51
|
+
export declare namespace Domains {
|
|
52
|
+
export { type Domain as Domain, type DomainsCursorIDPage as DomainsCursorIDPage, type DomainListParams as DomainListParams, };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=domains.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.d.mts","sourceRoot":"","sources":["../src/resources/domains.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAEzB;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mBAAmB,EAAE,MAAM,CAAC;CAG5C;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;CAAG;AAE/D,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../core/pagination.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* List custom domains linked to a website, including Cloudflare verification
|
|
6
|
+
* and SSL status.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Domains extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a paginated list of custom domains linked to the website, including
|
|
11
|
+
* Cloudflare verification and SSL status.
|
|
12
|
+
*/
|
|
13
|
+
list(query?: DomainListParams | null | undefined, options?: RequestOptions): PagePromise<DomainsCursorIDPage, Domain>;
|
|
14
|
+
}
|
|
15
|
+
export type DomainsCursorIDPage = CursorIDPage<Domain>;
|
|
16
|
+
/**
|
|
17
|
+
* A custom domain linked to a website.
|
|
18
|
+
*/
|
|
19
|
+
export interface Domain {
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier for the domain
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Timestamp when the domain was created
|
|
26
|
+
*/
|
|
27
|
+
created: string;
|
|
28
|
+
/**
|
|
29
|
+
* The custom domain hostname (e.g., 'app.example.com')
|
|
30
|
+
*/
|
|
31
|
+
hostname: string;
|
|
32
|
+
/**
|
|
33
|
+
* Timestamp when the domain was last updated
|
|
34
|
+
*/
|
|
35
|
+
updated: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether this is a wildcard domain
|
|
38
|
+
*/
|
|
39
|
+
wildcard: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* SSL certificate status (e.g., 'active', 'pending_validation')
|
|
42
|
+
*/
|
|
43
|
+
ssl_status?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Cloudflare verification status (e.g., 'active', 'pending')
|
|
46
|
+
*/
|
|
47
|
+
status?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface DomainListParams extends CursorIDPageParams {
|
|
50
|
+
}
|
|
51
|
+
export declare namespace Domains {
|
|
52
|
+
export { type Domain as Domain, type DomainsCursorIDPage as DomainsCursorIDPage, type DomainListParams as DomainListParams, };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=domains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../src/resources/domains.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAEzB;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,mBAAmB,EAAE,MAAM,CAAC;CAG5C;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;CAAG;AAE/D,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Domains = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
/**
|
|
8
|
+
* List custom domains linked to a website, including Cloudflare verification
|
|
9
|
+
* and SSL status.
|
|
10
|
+
*/
|
|
11
|
+
class Domains extends resource_1.APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a paginated list of custom domains linked to the website, including
|
|
14
|
+
* Cloudflare verification and SSL status.
|
|
15
|
+
*/
|
|
16
|
+
list(query = {}, options) {
|
|
17
|
+
return this._client.getAPIList('/v1/domains', (pagination_1.CursorIDPage), { query, ...options });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.Domains = Domains;
|
|
21
|
+
//# sourceMappingURL=domains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../src/resources/domains.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAwF;AAGxF;;;GAGG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;OAGG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,yBAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF;AAXD,0BAWC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorIDPage } from "../core/pagination.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* List custom domains linked to a website, including Cloudflare verification
|
|
6
|
+
* and SSL status.
|
|
7
|
+
*/
|
|
8
|
+
export class Domains extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves a paginated list of custom domains linked to the website, including
|
|
11
|
+
* Cloudflare verification and SSL status.
|
|
12
|
+
*/
|
|
13
|
+
list(query = {}, options) {
|
|
14
|
+
return this._client.getAPIList('/v1/domains', (CursorIDPage), { query, ...options });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=domains.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.mjs","sourceRoot":"","sources":["../src/resources/domains.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,YAAY,EAAwC;AAG7D;;;GAGG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;OAGG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,YAAoB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF"}
|
package/resources/files.d.mts
CHANGED
|
@@ -4,8 +4,9 @@ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../core/pagi
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
5
|
/**
|
|
6
6
|
* Upload, retrieve, and list files and media associated with a website.
|
|
7
|
-
* Upload is a two-step process: first create
|
|
8
|
-
* then
|
|
7
|
+
* Upload is a two-step process: first call create to get an upload URL,
|
|
8
|
+
* then PUT the file content to that URL. The PUT response returns the
|
|
9
|
+
* completed MediaFile object. No separate complete call is needed.
|
|
9
10
|
*/
|
|
10
11
|
export declare class Files extends APIResource {
|
|
11
12
|
/**
|
|
@@ -67,12 +68,12 @@ export interface File {
|
|
|
67
68
|
path?: string | null;
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
* Response containing
|
|
71
|
-
*
|
|
71
|
+
* Response containing an upload URL. PUT the file content to upload_url with the
|
|
72
|
+
* provided headers. The PUT response will contain the completed MediaFile object.
|
|
72
73
|
*/
|
|
73
74
|
export interface Upload {
|
|
74
75
|
/**
|
|
75
|
-
* File ID to
|
|
76
|
+
* File ID assigned to this upload
|
|
76
77
|
*/
|
|
77
78
|
id: string;
|
|
78
79
|
/**
|
|
@@ -82,7 +83,8 @@ export interface Upload {
|
|
|
82
83
|
[key: string]: string;
|
|
83
84
|
};
|
|
84
85
|
/**
|
|
85
|
-
*
|
|
86
|
+
* URL to PUT the file content to. The upload proxy will store the file, create
|
|
87
|
+
* database records, and return the completed MediaFile object in the PUT response.
|
|
86
88
|
*/
|
|
87
89
|
upload_url: string;
|
|
88
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB
|
|
1
|
+
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB;;;;;GAKG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;OAGG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,iBAAiB,EAAE,IAAI,CAAC;IAIvC;;OAEG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAGhE;AAED,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAE7C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,cAAc,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yBAAiB,cAAc,CAAC;IAC9B;;OAEG;IACH,UAAiB,OAAO;QACtB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/resources/files.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../core/pagi
|
|
|
4
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
5
|
/**
|
|
6
6
|
* Upload, retrieve, and list files and media associated with a website.
|
|
7
|
-
* Upload is a two-step process: first create
|
|
8
|
-
* then
|
|
7
|
+
* Upload is a two-step process: first call create to get an upload URL,
|
|
8
|
+
* then PUT the file content to that URL. The PUT response returns the
|
|
9
|
+
* completed MediaFile object. No separate complete call is needed.
|
|
9
10
|
*/
|
|
10
11
|
export declare class Files extends APIResource {
|
|
11
12
|
/**
|
|
@@ -67,12 +68,12 @@ export interface File {
|
|
|
67
68
|
path?: string | null;
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
* Response containing
|
|
71
|
-
*
|
|
71
|
+
* Response containing an upload URL. PUT the file content to upload_url with the
|
|
72
|
+
* provided headers. The PUT response will contain the completed MediaFile object.
|
|
72
73
|
*/
|
|
73
74
|
export interface Upload {
|
|
74
75
|
/**
|
|
75
|
-
* File ID to
|
|
76
|
+
* File ID assigned to this upload
|
|
76
77
|
*/
|
|
77
78
|
id: string;
|
|
78
79
|
/**
|
|
@@ -82,7 +83,8 @@ export interface Upload {
|
|
|
82
83
|
[key: string]: string;
|
|
83
84
|
};
|
|
84
85
|
/**
|
|
85
|
-
*
|
|
86
|
+
* URL to PUT the file content to. The upload proxy will store the file, create
|
|
87
|
+
* database records, and return the completed MediaFile object in the PUT response.
|
|
86
88
|
*/
|
|
87
89
|
upload_url: string;
|
|
88
90
|
}
|
package/resources/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf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