@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/resources/content/models/models.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,E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1,54 +0,0 @@
|
|
|
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.Models = void 0;
|
|
5
|
-
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
-
const resource_1 = require("../../../core/resource.js");
|
|
7
|
-
const FieldsAPI = tslib_1.__importStar(require("./fields.js"));
|
|
8
|
-
const fields_1 = require("./fields.js");
|
|
9
|
-
const pagination_1 = require("../../../core/pagination.js");
|
|
10
|
-
const path_1 = require("../../../internal/utils/path.js");
|
|
11
|
-
class Models extends resource_1.APIResource {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.fields = new FieldsAPI.Fields(this._client);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Creates a new content model with optional initial fields. Content models define
|
|
18
|
-
* the schema for entries. Example models: 'Blog Post', 'Product', 'Author'.
|
|
19
|
-
*/
|
|
20
|
-
create(body, options) {
|
|
21
|
-
return this._client.post('/v1/content/models', { body, ...options });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Updates an existing content model. Use this to modify the name, description, or
|
|
25
|
-
* lock status. The api_id cannot be changed after creation.
|
|
26
|
-
*/
|
|
27
|
-
update(modelID, body = {}, options) {
|
|
28
|
-
return this._client.patch((0, path_1.path) `/v1/content/models/${modelID}`, { body, ...options });
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Retrieves a paginated list of content models. Content models define the
|
|
32
|
-
* schema/structure for content entries.
|
|
33
|
-
*/
|
|
34
|
-
list(query = {}, options) {
|
|
35
|
-
return this._client.getAPIList('/v1/content/models', (pagination_1.CursorIDPage), { query, ...options });
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Archives a content model, hiding it from the API. Existing entries are
|
|
39
|
-
* preserved. Use this instead of deletion to maintain data integrity.
|
|
40
|
-
*/
|
|
41
|
-
archive(modelID, options) {
|
|
42
|
-
return this._client.delete((0, path_1.path) `/v1/content/models/${modelID}`, options);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Retrieves a content model by ID. Returns the model object including all field
|
|
46
|
-
* definitions.
|
|
47
|
-
*/
|
|
48
|
-
get(modelID, options) {
|
|
49
|
-
return this._client.get((0, path_1.path) `/v1/content/models/${modelID}`, options);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.Models = Models;
|
|
53
|
-
Models.Fields = fields_1.Fields;
|
|
54
|
-
//# sourceMappingURL=models.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/resources/content/models/models.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,+DAAsC;AACtC,wCAA2F;AAE3F,4DAA8F;AAE9F,0DAAoD;AAEpD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAgDhE,CAAC;IA9CC;;;OAGG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,OAAe,EACf,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,sBAAsB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,yBAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,OAAe,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,sBAAsB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAe,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,sBAAsB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAjDD,wBAiDC;AAsWD,MAAM,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
import * as FieldsAPI from "./fields.mjs";
|
|
4
|
-
import { Fields } from "./fields.mjs";
|
|
5
|
-
import { CursorIDPage } from "../../../core/pagination.mjs";
|
|
6
|
-
import { path } from "../../../internal/utils/path.mjs";
|
|
7
|
-
export class Models extends APIResource {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.fields = new FieldsAPI.Fields(this._client);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Creates a new content model with optional initial fields. Content models define
|
|
14
|
-
* the schema for entries. Example models: 'Blog Post', 'Product', 'Author'.
|
|
15
|
-
*/
|
|
16
|
-
create(body, options) {
|
|
17
|
-
return this._client.post('/v1/content/models', { body, ...options });
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Updates an existing content model. Use this to modify the name, description, or
|
|
21
|
-
* lock status. The api_id cannot be changed after creation.
|
|
22
|
-
*/
|
|
23
|
-
update(modelID, body = {}, options) {
|
|
24
|
-
return this._client.patch(path `/v1/content/models/${modelID}`, { body, ...options });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves a paginated list of content models. Content models define the
|
|
28
|
-
* schema/structure for content entries.
|
|
29
|
-
*/
|
|
30
|
-
list(query = {}, options) {
|
|
31
|
-
return this._client.getAPIList('/v1/content/models', (CursorIDPage), { query, ...options });
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Archives a content model, hiding it from the API. Existing entries are
|
|
35
|
-
* preserved. Use this instead of deletion to maintain data integrity.
|
|
36
|
-
*/
|
|
37
|
-
archive(modelID, options) {
|
|
38
|
-
return this._client.delete(path `/v1/content/models/${modelID}`, options);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves a content model by ID. Returns the model object including all field
|
|
42
|
-
* definitions.
|
|
43
|
-
*/
|
|
44
|
-
get(modelID, options) {
|
|
45
|
-
return this._client.get(path `/v1/content/models/${modelID}`, options);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
Models.Fields = Fields;
|
|
49
|
-
//# sourceMappingURL=models.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../../../src/resources/content/models/models.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAA2D,MAAM,EAAE;OAEnE,EAAE,YAAY,EAAwC;OAEtD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAgDhE,CAAC;IA9CC;;;OAGG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,OAAe,EACf,OAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,sBAAsB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,YAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,OAAe,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,sBAAsB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAe,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAsWD,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.mts","sourceRoot":"","sources":["../../src/resources/content/models.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/resources/content/models.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/resources/content/models.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.mjs","sourceRoot":"","sources":["../../src/resources/content/models.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|