@datocms/cma-client 5.1.20 → 5.1.21
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/cjs/generated/resources/ItemVersion.js +4 -3
- package/dist/cjs/generated/resources/ItemVersion.js.map +1 -1
- package/dist/esm/generated/ApiTypes.d.ts +11 -0
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/RawApiTypes.d.ts +11 -0
- package/dist/esm/generated/resources/ItemVersion.d.ts +2 -2
- package/dist/esm/generated/resources/ItemVersion.js +4 -3
- package/dist/esm/generated/resources/ItemVersion.js.map +1 -1
- package/dist/types/generated/ApiTypes.d.ts +11 -0
- package/dist/types/generated/RawApiTypes.d.ts +11 -0
- package/dist/types/generated/resources/ItemVersion.d.ts +2 -2
- package/package.json +2 -2
- package/resources.json +1 -0
- package/src/generated/ApiTypes.ts +11 -0
- package/src/generated/Client.ts +1 -1
- package/src/generated/RawApiTypes.ts +11 -0
- package/src/generated/resources/ItemVersion.ts +7 -2
|
@@ -88,7 +88,7 @@ class Client {
|
|
|
88
88
|
return this.config.baseUrl || Client.defaultBaseUrl;
|
|
89
89
|
}
|
|
90
90
|
request(options) {
|
|
91
|
-
return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.
|
|
91
|
+
return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.21', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
92
92
|
? { 'X-Environment': this.config.environment }
|
|
93
93
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
|
|
94
94
|
return this.jobResultsFetcher
|
|
@@ -155,8 +155,8 @@ class ItemVersion extends BaseResource_1.default {
|
|
|
155
155
|
* @throws {ApiError}
|
|
156
156
|
* @throws {TimeoutError}
|
|
157
157
|
*/
|
|
158
|
-
find(itemVersionId) {
|
|
159
|
-
return this.rawFind(Utils.toId(itemVersionId)).then((body) => Utils.deserializeResponseBody(body));
|
|
158
|
+
find(itemVersionId, queryParams) {
|
|
159
|
+
return this.rawFind(Utils.toId(itemVersionId), queryParams).then((body) => Utils.deserializeResponseBody(body));
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* Retrieve a record version
|
|
@@ -166,10 +166,11 @@ class ItemVersion extends BaseResource_1.default {
|
|
|
166
166
|
* @throws {ApiError}
|
|
167
167
|
* @throws {TimeoutError}
|
|
168
168
|
*/
|
|
169
|
-
rawFind(itemVersionId) {
|
|
169
|
+
rawFind(itemVersionId, queryParams) {
|
|
170
170
|
return this.client.request({
|
|
171
171
|
method: 'GET',
|
|
172
172
|
url: `/versions/${itemVersionId}`,
|
|
173
|
+
queryParams,
|
|
173
174
|
});
|
|
174
175
|
}
|
|
175
176
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemVersion.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,WAAY,SAAQ,sBAAY;IAGnD;;;;;;;OAOG;IACH,OAAO,CAAC,aAAgD;QACtD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC9D,KAAK,CAAC,uBAAuB,CAAuC,IAAI,CAAC,CAC1E,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0C;YAClE,MAAM,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CAChB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,
|
|
1
|
+
{"version":3,"file":"ItemVersion.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,WAAY,SAAQ,sBAAY;IAGnD;;;;;;;OAOG;IACH,OAAO,CAAC,aAAgD;QACtD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC9D,KAAK,CAAC,uBAAuB,CAAuC,IAAI,CAAC,CAC1E,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0C;YAClE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,aAAa,aAAa,UAAU;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,MAAkC,EAClC,WAAqD;QAErD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACjE,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,MAAc,EACd,WAAwD;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA+C;YACvE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,UAAU,MAAM,WAAW;YAChC,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,iBAAiB,CACtB,MAAkC,EAClC,WAGC,EACD,eAAuC;;;;gBAEvC,KAA4B,eAAA,KA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string]: unknown;
|
|
1060
1060
|
};
|
|
1061
|
+
/**
|
|
1062
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
1063
|
+
* via the `self.hrefSchema` link.
|
|
1064
|
+
*/
|
|
1065
|
+
export type ItemVersionSelfHrefSchema = {
|
|
1066
|
+
/**
|
|
1067
|
+
* For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
|
|
1068
|
+
*/
|
|
1069
|
+
nested?: boolean;
|
|
1070
|
+
[k: string]: unknown;
|
|
1071
|
+
};
|
|
1061
1072
|
/**
|
|
1062
1073
|
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
1063
1074
|
*
|
|
@@ -62,7 +62,7 @@ export class Client {
|
|
|
62
62
|
return this.config.baseUrl || Client.defaultBaseUrl;
|
|
63
63
|
}
|
|
64
64
|
request(options) {
|
|
65
|
-
return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.
|
|
65
|
+
return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.21', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
66
66
|
? { 'X-Environment': this.config.environment }
|
|
67
67
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
|
|
68
68
|
return this.jobResultsFetcher
|
|
@@ -796,6 +796,17 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
796
796
|
};
|
|
797
797
|
[k: string]: unknown;
|
|
798
798
|
};
|
|
799
|
+
/**
|
|
800
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
801
|
+
* via the `self.hrefSchema` link.
|
|
802
|
+
*/
|
|
803
|
+
export type ItemVersionSelfHrefSchema = {
|
|
804
|
+
/**
|
|
805
|
+
* For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
|
|
806
|
+
*/
|
|
807
|
+
nested?: boolean;
|
|
808
|
+
[k: string]: unknown;
|
|
809
|
+
};
|
|
799
810
|
/**
|
|
800
811
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
801
812
|
* via the `publish.schema` link.
|
|
@@ -68,7 +68,7 @@ export default class ItemVersion extends BaseResource {
|
|
|
68
68
|
* @throws {ApiError}
|
|
69
69
|
* @throws {TimeoutError}
|
|
70
70
|
*/
|
|
71
|
-
find(itemVersionId: string | ApiTypes.ItemVersionData): Promise<ApiTypes.ItemVersion>;
|
|
71
|
+
find(itemVersionId: string | ApiTypes.ItemVersionData, queryParams?: ApiTypes.ItemVersionSelfHrefSchema): Promise<ApiTypes.ItemVersion>;
|
|
72
72
|
/**
|
|
73
73
|
* Retrieve a record version
|
|
74
74
|
*
|
|
@@ -77,5 +77,5 @@ export default class ItemVersion extends BaseResource {
|
|
|
77
77
|
* @throws {ApiError}
|
|
78
78
|
* @throws {TimeoutError}
|
|
79
79
|
*/
|
|
80
|
-
rawFind(itemVersionId: string): Promise<RawApiTypes.ItemVersionSelfTargetSchema>;
|
|
80
|
+
rawFind(itemVersionId: string, queryParams?: RawApiTypes.ItemVersionSelfHrefSchema): Promise<RawApiTypes.ItemVersionSelfTargetSchema>;
|
|
81
81
|
}
|
|
@@ -127,8 +127,8 @@ export default class ItemVersion extends BaseResource {
|
|
|
127
127
|
* @throws {ApiError}
|
|
128
128
|
* @throws {TimeoutError}
|
|
129
129
|
*/
|
|
130
|
-
find(itemVersionId) {
|
|
131
|
-
return this.rawFind(Utils.toId(itemVersionId)).then((body) => Utils.deserializeResponseBody(body));
|
|
130
|
+
find(itemVersionId, queryParams) {
|
|
131
|
+
return this.rawFind(Utils.toId(itemVersionId), queryParams).then((body) => Utils.deserializeResponseBody(body));
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* Retrieve a record version
|
|
@@ -138,10 +138,11 @@ export default class ItemVersion extends BaseResource {
|
|
|
138
138
|
* @throws {ApiError}
|
|
139
139
|
* @throws {TimeoutError}
|
|
140
140
|
*/
|
|
141
|
-
rawFind(itemVersionId) {
|
|
141
|
+
rawFind(itemVersionId, queryParams) {
|
|
142
142
|
return this.client.request({
|
|
143
143
|
method: 'GET',
|
|
144
144
|
url: `/versions/${itemVersionId}`,
|
|
145
|
+
queryParams,
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemVersion.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IAGnD;;;;;;;OAOG;IACH,OAAO,CAAC,aAAgD;QACtD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC9D,KAAK,CAAC,uBAAuB,CAAuC,IAAI,CAAC,CAC1E,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0C;YAClE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,aAAa,aAAa,UAAU;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,MAAkC,EAClC,WAAqD;QAErD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACjE,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,MAAc,EACd,WAAwD;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA+C;YACvE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,UAAU,MAAM,WAAW;YAChC,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,iBAAiB,CACtB,MAAkC,EAClC,WAGC,EACD,eAAuC;;;;gBAEvC,KAA4B,eAAA,KAAA,cAAA,IAAI,CAAC,oBAAoB,CACnD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAClB,WAAW,EACX,eAAe,CAChB,CAAA,IAAA;oBAJ2B,cAI3B;oBAJ2B,WAI3B;;wBAJU,MAAM,OAAO,KAAA,CAAA;wBAKtB,oBAAM,KAAK,CAAC,qBAAqB,CAE/B,OAAO,CAAC,CAAA,CAAC;;;;;iBACZ;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;OAOG;IACH,oBAAoB,CAClB,MAAc,EACd,WAGC,EACD,eAAuC;QAEvC,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAExC,OAAO,KAAK,CAAC,eAAe,CAG1B;YACE,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,EAAE;SACb,EACD,CAAC,IAAwD,EAAE,EAAE,CAC3D,IAAI,CAAC,OAAO,CAAC,MAAM,kCAAO,WAAW,KAAE,IAAI,IAAG,EAChD,eAAe,CAChB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,
|
|
1
|
+
{"version":3,"file":"ItemVersion.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IAGnD;;;;;;;OAOG;IACH,OAAO,CAAC,aAAgD;QACtD,OAAO,IAA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Ac,EACd,WAGC,EACD,eAAuC;QAEvC,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAExC,OAAO,KAAK,CAAC,eAAe,CAG1B;YACE,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,EAAE;SACb,EACD,CAAC,IAAwD,EAAE,EAAE,CAC3D,IAAI,CAAC,OAAO,CAAC,MAAM,kCAAO,WAAW,KAAE,IAAI,IAAG,EAChD,eAAe,CAChB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,aAAgD,EAChD,WAAgD;QAEhD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACxE,KAAK,CAAC,uBAAuB,CAAuC,IAAI,CAAC,CAC1E,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,aAAqB,EACrB,WAAmD;QAEnD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0C;YAClE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,aAAa,aAAa,EAAE;YACjC,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;;AAnKe,gBAAI,GAAG,cAAuB,CAAC"}
|
|
@@ -1058,6 +1058,17 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
1058
1058
|
};
|
|
1059
1059
|
[k: string]: unknown;
|
|
1060
1060
|
};
|
|
1061
|
+
/**
|
|
1062
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
1063
|
+
* via the `self.hrefSchema` link.
|
|
1064
|
+
*/
|
|
1065
|
+
export type ItemVersionSelfHrefSchema = {
|
|
1066
|
+
/**
|
|
1067
|
+
* For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
|
|
1068
|
+
*/
|
|
1069
|
+
nested?: boolean;
|
|
1070
|
+
[k: string]: unknown;
|
|
1071
|
+
};
|
|
1061
1072
|
/**
|
|
1062
1073
|
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
1063
1074
|
*
|
|
@@ -796,6 +796,17 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
796
796
|
};
|
|
797
797
|
[k: string]: unknown;
|
|
798
798
|
};
|
|
799
|
+
/**
|
|
800
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
801
|
+
* via the `self.hrefSchema` link.
|
|
802
|
+
*/
|
|
803
|
+
export type ItemVersionSelfHrefSchema = {
|
|
804
|
+
/**
|
|
805
|
+
* For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
|
|
806
|
+
*/
|
|
807
|
+
nested?: boolean;
|
|
808
|
+
[k: string]: unknown;
|
|
809
|
+
};
|
|
799
810
|
/**
|
|
800
811
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
801
812
|
* via the `publish.schema` link.
|
|
@@ -68,7 +68,7 @@ export default class ItemVersion extends BaseResource {
|
|
|
68
68
|
* @throws {ApiError}
|
|
69
69
|
* @throws {TimeoutError}
|
|
70
70
|
*/
|
|
71
|
-
find(itemVersionId: string | ApiTypes.ItemVersionData): Promise<ApiTypes.ItemVersion>;
|
|
71
|
+
find(itemVersionId: string | ApiTypes.ItemVersionData, queryParams?: ApiTypes.ItemVersionSelfHrefSchema): Promise<ApiTypes.ItemVersion>;
|
|
72
72
|
/**
|
|
73
73
|
* Retrieve a record version
|
|
74
74
|
*
|
|
@@ -77,5 +77,5 @@ export default class ItemVersion extends BaseResource {
|
|
|
77
77
|
* @throws {ApiError}
|
|
78
78
|
* @throws {TimeoutError}
|
|
79
79
|
*/
|
|
80
|
-
rawFind(itemVersionId: string): Promise<RawApiTypes.ItemVersionSelfTargetSchema>;
|
|
80
|
+
rawFind(itemVersionId: string, queryParams?: RawApiTypes.ItemVersionSelfHrefSchema): Promise<RawApiTypes.ItemVersionSelfTargetSchema>;
|
|
81
81
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.21",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@datocms/dashboard-client": "^5.1.13",
|
|
46
46
|
"@types/uuid": "^9.0.7"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "f1cac3fdb16890155459b8baa346ca9223feb6a9"
|
|
49
49
|
}
|
package/resources.json
CHANGED
|
@@ -1123,6 +1123,17 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
1123
1123
|
};
|
|
1124
1124
|
[k: string]: unknown;
|
|
1125
1125
|
};
|
|
1126
|
+
/**
|
|
1127
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
1128
|
+
* via the `self.hrefSchema` link.
|
|
1129
|
+
*/
|
|
1130
|
+
export type ItemVersionSelfHrefSchema = {
|
|
1131
|
+
/**
|
|
1132
|
+
* For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
|
|
1133
|
+
*/
|
|
1134
|
+
nested?: boolean;
|
|
1135
|
+
[k: string]: unknown;
|
|
1136
|
+
};
|
|
1126
1137
|
/**
|
|
1127
1138
|
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
1128
1139
|
*
|
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 v5.1.
|
|
150
|
+
userAgent: '@datocms/cma-client v5.1.21',
|
|
151
151
|
baseUrl: this.baseUrl,
|
|
152
152
|
preCallStack: new Error().stack,
|
|
153
153
|
extraHeaders: {
|
|
@@ -841,6 +841,17 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
841
841
|
};
|
|
842
842
|
[k: string]: unknown;
|
|
843
843
|
};
|
|
844
|
+
/**
|
|
845
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
846
|
+
* via the `self.hrefSchema` link.
|
|
847
|
+
*/
|
|
848
|
+
export type ItemVersionSelfHrefSchema = {
|
|
849
|
+
/**
|
|
850
|
+
* For Modular Content, Structured Text and Single Block fields, return full payload for nested blocks instead of IDs
|
|
851
|
+
*/
|
|
852
|
+
nested?: boolean;
|
|
853
|
+
[k: string]: unknown;
|
|
854
|
+
};
|
|
844
855
|
/**
|
|
845
856
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
846
857
|
* via the `publish.schema` link.
|
|
@@ -141,8 +141,11 @@ export default class ItemVersion extends BaseResource {
|
|
|
141
141
|
* @throws {ApiError}
|
|
142
142
|
* @throws {TimeoutError}
|
|
143
143
|
*/
|
|
144
|
-
find(
|
|
145
|
-
|
|
144
|
+
find(
|
|
145
|
+
itemVersionId: string | ApiTypes.ItemVersionData,
|
|
146
|
+
queryParams?: ApiTypes.ItemVersionSelfHrefSchema,
|
|
147
|
+
) {
|
|
148
|
+
return this.rawFind(Utils.toId(itemVersionId), queryParams).then((body) =>
|
|
146
149
|
Utils.deserializeResponseBody<ApiTypes.ItemVersionSelfTargetSchema>(body),
|
|
147
150
|
);
|
|
148
151
|
}
|
|
@@ -157,10 +160,12 @@ export default class ItemVersion extends BaseResource {
|
|
|
157
160
|
*/
|
|
158
161
|
rawFind(
|
|
159
162
|
itemVersionId: string,
|
|
163
|
+
queryParams?: RawApiTypes.ItemVersionSelfHrefSchema,
|
|
160
164
|
): Promise<RawApiTypes.ItemVersionSelfTargetSchema> {
|
|
161
165
|
return this.client.request<RawApiTypes.ItemVersionSelfTargetSchema>({
|
|
162
166
|
method: 'GET',
|
|
163
167
|
url: `/versions/${itemVersionId}`,
|
|
168
|
+
queryParams,
|
|
164
169
|
});
|
|
165
170
|
}
|
|
166
171
|
}
|