@datocms/cma-client 4.0.2 → 5.0.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/dist/cjs/generated/Client.js +1 -1
- package/dist/esm/buildBlockRecord.d.ts +1 -0
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +8 -0
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +8 -0
- package/dist/types/buildBlockRecord.d.ts +1 -0
- package/dist/types/generated/SchemaTypes.d.ts +8 -0
- package/dist/types/generated/SimpleSchemaTypes.d.ts +8 -0
- package/package.json +4 -4
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +8 -0
- package/src/generated/SimpleSchemaTypes.ts +8 -0
|
@@ -131,7 +131,7 @@ var Client = /** @class */ (function () {
|
|
|
131
131
|
});
|
|
132
132
|
Client.prototype.request = function (options) {
|
|
133
133
|
var _this = this;
|
|
134
|
-
return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client
|
|
134
|
+
return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.0.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
135
135
|
? { 'X-Environment': this.config.environment }
|
|
136
136
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
|
|
137
137
|
return _this.jobResultsFetcher
|
|
@@ -19,6 +19,7 @@ export declare function buildBlockRecord(body: SimpleSchemaTypes.ItemUpdateSchem
|
|
|
19
19
|
is_current_version_valid?: boolean | null | undefined;
|
|
20
20
|
is_published_version_valid?: boolean | null | undefined;
|
|
21
21
|
stage?: string | null | undefined;
|
|
22
|
+
has_children?: boolean | null | undefined;
|
|
22
23
|
} | undefined;
|
|
23
24
|
relationships?: {
|
|
24
25
|
item_type?: {
|
|
@@ -105,7 +105,7 @@ var Client = /** @class */ (function () {
|
|
|
105
105
|
});
|
|
106
106
|
Client.prototype.request = function (options) {
|
|
107
107
|
var _this = this;
|
|
108
|
-
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client
|
|
108
|
+
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.0.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
109
109
|
? { 'X-Environment': this.config.environment }
|
|
110
110
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
|
|
111
111
|
return _this.jobResultsFetcher
|
|
@@ -6757,6 +6757,10 @@ export type ItemMeta = {
|
|
|
6757
6757
|
* Workflow stage in which the item is
|
|
6758
6758
|
*/
|
|
6759
6759
|
stage: null | string;
|
|
6760
|
+
/**
|
|
6761
|
+
* When the records can be organized in a tree, indicates whether the record has children
|
|
6762
|
+
*/
|
|
6763
|
+
has_children: null | boolean;
|
|
6760
6764
|
};
|
|
6761
6765
|
/**
|
|
6762
6766
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
@@ -6991,6 +6995,10 @@ export type ItemUpdateSchema = {
|
|
|
6991
6995
|
* The new stage to move the record to
|
|
6992
6996
|
*/
|
|
6993
6997
|
stage?: string | null;
|
|
6998
|
+
/**
|
|
6999
|
+
* Whether the record has children or not
|
|
7000
|
+
*/
|
|
7001
|
+
has_children?: null | boolean;
|
|
6994
7002
|
};
|
|
6995
7003
|
relationships?: {
|
|
6996
7004
|
/**
|
|
@@ -6917,6 +6917,10 @@ export type ItemMeta = {
|
|
|
6917
6917
|
* Workflow stage in which the item is
|
|
6918
6918
|
*/
|
|
6919
6919
|
stage: null | string;
|
|
6920
|
+
/**
|
|
6921
|
+
* When the records can be organized in a tree, indicates whether the record has children
|
|
6922
|
+
*/
|
|
6923
|
+
has_children: null | boolean;
|
|
6920
6924
|
};
|
|
6921
6925
|
/**
|
|
6922
6926
|
* The JSON data associated to the record
|
|
@@ -7075,6 +7079,10 @@ export type ItemUpdateSchema = {
|
|
|
7075
7079
|
* The new stage to move the record to
|
|
7076
7080
|
*/
|
|
7077
7081
|
stage?: string | null;
|
|
7082
|
+
/**
|
|
7083
|
+
* Whether the record has children or not
|
|
7084
|
+
*/
|
|
7085
|
+
has_children?: null | boolean;
|
|
7078
7086
|
};
|
|
7079
7087
|
[k: string]: unknown;
|
|
7080
7088
|
};
|
|
@@ -19,6 +19,7 @@ export declare function buildBlockRecord(body: SimpleSchemaTypes.ItemUpdateSchem
|
|
|
19
19
|
is_current_version_valid?: boolean | null | undefined;
|
|
20
20
|
is_published_version_valid?: boolean | null | undefined;
|
|
21
21
|
stage?: string | null | undefined;
|
|
22
|
+
has_children?: boolean | null | undefined;
|
|
22
23
|
} | undefined;
|
|
23
24
|
relationships?: {
|
|
24
25
|
item_type?: {
|
|
@@ -6757,6 +6757,10 @@ export type ItemMeta = {
|
|
|
6757
6757
|
* Workflow stage in which the item is
|
|
6758
6758
|
*/
|
|
6759
6759
|
stage: null | string;
|
|
6760
|
+
/**
|
|
6761
|
+
* When the records can be organized in a tree, indicates whether the record has children
|
|
6762
|
+
*/
|
|
6763
|
+
has_children: null | boolean;
|
|
6760
6764
|
};
|
|
6761
6765
|
/**
|
|
6762
6766
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
@@ -6991,6 +6995,10 @@ export type ItemUpdateSchema = {
|
|
|
6991
6995
|
* The new stage to move the record to
|
|
6992
6996
|
*/
|
|
6993
6997
|
stage?: string | null;
|
|
6998
|
+
/**
|
|
6999
|
+
* Whether the record has children or not
|
|
7000
|
+
*/
|
|
7001
|
+
has_children?: null | boolean;
|
|
6994
7002
|
};
|
|
6995
7003
|
relationships?: {
|
|
6996
7004
|
/**
|
|
@@ -6917,6 +6917,10 @@ export type ItemMeta = {
|
|
|
6917
6917
|
* Workflow stage in which the item is
|
|
6918
6918
|
*/
|
|
6919
6919
|
stage: null | string;
|
|
6920
|
+
/**
|
|
6921
|
+
* When the records can be organized in a tree, indicates whether the record has children
|
|
6922
|
+
*/
|
|
6923
|
+
has_children: null | boolean;
|
|
6920
6924
|
};
|
|
6921
6925
|
/**
|
|
6922
6926
|
* The JSON data associated to the record
|
|
@@ -7075,6 +7079,10 @@ export type ItemUpdateSchema = {
|
|
|
7075
7079
|
* The new stage to move the record to
|
|
7076
7080
|
*/
|
|
7077
7081
|
stage?: string | null;
|
|
7082
|
+
/**
|
|
7083
|
+
* Whether the record has children or not
|
|
7084
|
+
*/
|
|
7085
|
+
has_children?: null | boolean;
|
|
7078
7086
|
};
|
|
7079
7087
|
[k: string]: unknown;
|
|
7080
7088
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"url": "https://github.com/datocms/js-rest-api-clients/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@datocms/rest-client-utils": "^
|
|
40
|
+
"@datocms/rest-client-utils": "^5.0.0",
|
|
41
41
|
"uuid": "^9.0.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@datocms/dashboard-client": "^
|
|
44
|
+
"@datocms/dashboard-client": "^5.0.0",
|
|
45
45
|
"@types/uuid": "^9.0.7"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "2666eec2e03d70568737148464574c11cec02987"
|
|
48
48
|
}
|
package/src/generated/Client.ts
CHANGED
|
@@ -147,7 +147,7 @@ export class Client {
|
|
|
147
147
|
...this.config,
|
|
148
148
|
...options,
|
|
149
149
|
logFn: this.config.logFn || console.log,
|
|
150
|
-
userAgent: '@datocms/cma-client
|
|
150
|
+
userAgent: '@datocms/cma-client v5.0.0',
|
|
151
151
|
baseUrl: this.baseUrl,
|
|
152
152
|
preCallStack: new Error().stack,
|
|
153
153
|
extraHeaders: {
|
|
@@ -7305,6 +7305,10 @@ export type ItemMeta = {
|
|
|
7305
7305
|
* Workflow stage in which the item is
|
|
7306
7306
|
*/
|
|
7307
7307
|
stage: null | string;
|
|
7308
|
+
/**
|
|
7309
|
+
* When the records can be organized in a tree, indicates whether the record has children
|
|
7310
|
+
*/
|
|
7311
|
+
has_children: null | boolean;
|
|
7308
7312
|
};
|
|
7309
7313
|
|
|
7310
7314
|
/**
|
|
@@ -7562,6 +7566,10 @@ export type ItemUpdateSchema = {
|
|
|
7562
7566
|
* The new stage to move the record to
|
|
7563
7567
|
*/
|
|
7564
7568
|
stage?: string | null;
|
|
7569
|
+
/**
|
|
7570
|
+
* Whether the record has children or not
|
|
7571
|
+
*/
|
|
7572
|
+
has_children?: null | boolean;
|
|
7565
7573
|
};
|
|
7566
7574
|
relationships?: {
|
|
7567
7575
|
/**
|
|
@@ -7464,6 +7464,10 @@ export type ItemMeta = {
|
|
|
7464
7464
|
* Workflow stage in which the item is
|
|
7465
7465
|
*/
|
|
7466
7466
|
stage: null | string;
|
|
7467
|
+
/**
|
|
7468
|
+
* When the records can be organized in a tree, indicates whether the record has children
|
|
7469
|
+
*/
|
|
7470
|
+
has_children: null | boolean;
|
|
7467
7471
|
};
|
|
7468
7472
|
|
|
7469
7473
|
/**
|
|
@@ -7653,6 +7657,10 @@ export type ItemUpdateSchema = {
|
|
|
7653
7657
|
* The new stage to move the record to
|
|
7654
7658
|
*/
|
|
7655
7659
|
stage?: string | null;
|
|
7660
|
+
/**
|
|
7661
|
+
* Whether the record has children or not
|
|
7662
|
+
*/
|
|
7663
|
+
has_children?: null | boolean;
|
|
7656
7664
|
};
|
|
7657
7665
|
[k: string]: unknown;
|
|
7658
7666
|
};
|