@datocms/cma-client 2.2.6 → 3.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/cjs/generated/Client.js.map +1 -1
- package/dist/esm/generated/Client.d.ts +3 -1
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/Client.js.map +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +12 -12
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +12 -12
- package/dist/types/generated/Client.d.ts +3 -1
- package/dist/types/generated/SchemaTypes.d.ts +12 -12
- package/dist/types/generated/SimpleSchemaTypes.d.ts +12 -12
- package/package.json +4 -4
- package/src/generated/Client.ts +3 -1
- package/src/generated/SchemaTypes.ts +12 -12
- package/src/generated/SimpleSchemaTypes.ts +12 -12
|
@@ -127,7 +127,7 @@ var Client = /** @class */ (function () {
|
|
|
127
127
|
});
|
|
128
128
|
Client.prototype.request = function (options) {
|
|
129
129
|
var _this = this;
|
|
130
|
-
return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client
|
|
130
|
+
return (0, rest_client_utils_1.request)(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.0.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
131
131
|
? { 'X-Environment': this.config.environment }
|
|
132
132
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
|
|
133
133
|
return _this.jobResultsFetcher
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/generated/Client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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BAE9B,sBAAO,IAAI,CAAC,uBAAuB,EAAC;;;;KACrC;IArIe,qBAAc,GAAG,8BAA8B,CAAC;IAsIlE,aAAC;CAAA,AAvID,IAuIC;AAvIY,wBAAM"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Resources from './resources';
|
|
2
|
-
import { LogLevel } from '@datocms/rest-client-utils';
|
|
2
|
+
import { request, LogLevel } from '@datocms/rest-client-utils';
|
|
3
3
|
import { JobResult } from './SimpleSchemaTypes';
|
|
4
4
|
export declare type RequestOptions = {
|
|
5
5
|
method: 'GET' | 'PUT' | 'POST' | 'DELETE';
|
|
@@ -25,6 +25,8 @@ export declare type ClientConfigOptions = {
|
|
|
25
25
|
logFn?: (message: string) => void;
|
|
26
26
|
/** Whether to automatically retry failed requests (ie. timeout, rate-limiting, etc.), with a linear incremental backoff. Defaults to `true` */
|
|
27
27
|
autoRetry?: boolean;
|
|
28
|
+
/** If fetch() is not available in your environment, you can provide it */
|
|
29
|
+
fetchFn?: Parameters<typeof request>[0]['fetchFn'];
|
|
28
30
|
};
|
|
29
31
|
export declare class Client {
|
|
30
32
|
static readonly defaultBaseUrl = "https://site-api.datocms.com";
|
|
@@ -101,7 +101,7 @@ var Client = /** @class */ (function () {
|
|
|
101
101
|
});
|
|
102
102
|
Client.prototype.request = function (options) {
|
|
103
103
|
var _this = this;
|
|
104
|
-
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client
|
|
104
|
+
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v3.0.0', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: __assign(__assign(__assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
105
105
|
? { 'X-Environment': this.config.environment }
|
|
106
106
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: function (jobId) {
|
|
107
107
|
return _this.jobResultsFetcher
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/generated/Client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAY,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/generated/Client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAY,MAAM,4BAA4B,CAAC;AAgC9E;IAkDE,gBAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,cAAc,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,SAAS,CAAC,OA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CAAA,SAAyB,CAAA,KAA9B;wBAElB,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW;4BACpD,CAAC,CAAC,uBAAgB,IAAI,CAAC,EAAE,0BAAgB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAE;4BAClE,CAAC,CAAC,uBAAgB,IAAI,CAAC,EAAE,CAAE,CAAC;wBAE9B,sBAAO,IAAI,CAAC,uBAAuB,EAAC;;;;KACrC;IArIe,qBAAc,GAAG,8BAA8B,CAAC;IAsIlE,aAAC;CAAA,AAvID,IAuIC;SAvIY,MAAM"}
|
|
@@ -19,7 +19,7 @@ export declare type RoleType = 'role';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare type RoleIdentity = string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
23
23
|
*
|
|
24
24
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
25
25
|
* via the `definition` "identity".
|
|
@@ -29,7 +29,7 @@ export declare type RoleIdentity = string;
|
|
|
29
29
|
*/
|
|
30
30
|
export declare type ItemTypeIdentity = string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* RFC 4122 UUID of workflow expressed in URL-safe base64 format
|
|
33
33
|
*
|
|
34
34
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
35
35
|
* via the `definition` "identity".
|
|
@@ -269,7 +269,7 @@ export declare type SitePlanIdentity = string;
|
|
|
269
269
|
*/
|
|
270
270
|
export declare type MenuItemType = 'menu_item';
|
|
271
271
|
/**
|
|
272
|
-
*
|
|
272
|
+
* RFC 4122 UUID of menu item expressed in URL-safe base64 format
|
|
273
273
|
*
|
|
274
274
|
* This interface was referenced by `MenuItem`'s JSON-Schema
|
|
275
275
|
* via the `definition` "identity".
|
|
@@ -293,7 +293,7 @@ export declare type ItemTypeType = 'item_type';
|
|
|
293
293
|
*/
|
|
294
294
|
export declare type ItemTypeFilterType = 'item_type_filter';
|
|
295
295
|
/**
|
|
296
|
-
*
|
|
296
|
+
* RFC 4122 UUID of filter expressed in URL-safe base64 format
|
|
297
297
|
*
|
|
298
298
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
299
299
|
* via the `definition` "identity".
|
|
@@ -322,7 +322,7 @@ export declare type MenuItemInstancesHrefSchema = {
|
|
|
322
322
|
*/
|
|
323
323
|
export declare type ItemType1 = 'item';
|
|
324
324
|
/**
|
|
325
|
-
*
|
|
325
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
326
326
|
*
|
|
327
327
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
328
328
|
* via the `definition` "identity".
|
|
@@ -339,7 +339,7 @@ export declare type ItemIdentity = string;
|
|
|
339
339
|
*/
|
|
340
340
|
export declare type FieldType = 'field';
|
|
341
341
|
/**
|
|
342
|
-
*
|
|
342
|
+
* RFC 4122 UUID of field expressed in URL-safe base64 format
|
|
343
343
|
*
|
|
344
344
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
345
345
|
* via the `definition` "identity".
|
|
@@ -356,7 +356,7 @@ export declare type FieldIdentity = string;
|
|
|
356
356
|
*/
|
|
357
357
|
export declare type FieldsetType = 'fieldset';
|
|
358
358
|
/**
|
|
359
|
-
*
|
|
359
|
+
* RFC 4122 UUID of fieldset expressed in URL-safe base64 format
|
|
360
360
|
*
|
|
361
361
|
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
362
362
|
* via the `definition` "identity".
|
|
@@ -436,7 +436,7 @@ export declare type SessionIdentity = string;
|
|
|
436
436
|
*/
|
|
437
437
|
export declare type PluginType = 'plugin';
|
|
438
438
|
/**
|
|
439
|
-
*
|
|
439
|
+
* RFC 4122 UUID of plugin expressed in URL-safe base64 format
|
|
440
440
|
*
|
|
441
441
|
* This interface was referenced by `Plugin`'s JSON-Schema
|
|
442
442
|
* via the `definition` "identity".
|
|
@@ -623,7 +623,7 @@ export declare type ItemSelfHrefSchema = {
|
|
|
623
623
|
*/
|
|
624
624
|
export declare type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state';
|
|
625
625
|
/**
|
|
626
|
-
*
|
|
626
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
627
627
|
*
|
|
628
628
|
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
629
629
|
* via the `definition` "identity".
|
|
@@ -674,7 +674,7 @@ export declare type ScheduledUnpublishingIdentity = string;
|
|
|
674
674
|
*/
|
|
675
675
|
export declare type ItemVersionType = 'item_version';
|
|
676
676
|
/**
|
|
677
|
-
*
|
|
677
|
+
* RFC 4122 UUID of redord version expressed in URL-safe base64 format
|
|
678
678
|
*
|
|
679
679
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
680
680
|
* via the `definition` "identity".
|
|
@@ -808,7 +808,7 @@ export declare type ItemUnpublishHrefSchema = {
|
|
|
808
808
|
*/
|
|
809
809
|
export declare type UploadType = 'upload';
|
|
810
810
|
/**
|
|
811
|
-
*
|
|
811
|
+
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
812
812
|
*
|
|
813
813
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
814
814
|
* via the `definition` "identity".
|
|
@@ -1097,7 +1097,7 @@ export declare type WebhookCallInstancesHrefSchema = {
|
|
|
1097
1097
|
*/
|
|
1098
1098
|
export declare type UploadFilterType = 'upload_filter';
|
|
1099
1099
|
/**
|
|
1100
|
-
*
|
|
1100
|
+
* RFC 4122 UUID of upload filter expressed in URL-safe base64 format
|
|
1101
1101
|
*
|
|
1102
1102
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
1103
1103
|
* via the `definition` "identity".
|
|
@@ -19,7 +19,7 @@ export declare type RoleIdentity = string;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare type RoleType = 'role';
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
23
23
|
*
|
|
24
24
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
25
25
|
* via the `definition` "identity".
|
|
@@ -29,7 +29,7 @@ export declare type RoleType = 'role';
|
|
|
29
29
|
*/
|
|
30
30
|
export declare type ItemTypeIdentity = string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* RFC 4122 UUID of workflow expressed in URL-safe base64 format
|
|
33
33
|
*
|
|
34
34
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
35
35
|
* via the `definition` "identity".
|
|
@@ -297,7 +297,7 @@ export declare type SitePlanIdentity = string;
|
|
|
297
297
|
*/
|
|
298
298
|
export declare type SitePlanType = 'site_plan';
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
300
|
+
* RFC 4122 UUID of menu item expressed in URL-safe base64 format
|
|
301
301
|
*
|
|
302
302
|
* This interface was referenced by `MenuItem`'s JSON-Schema
|
|
303
303
|
* via the `definition` "identity".
|
|
@@ -328,7 +328,7 @@ export declare type ItemTypeType = 'item_type';
|
|
|
328
328
|
*/
|
|
329
329
|
export declare type ItemTypeFilterType = 'item_type_filter';
|
|
330
330
|
/**
|
|
331
|
-
*
|
|
331
|
+
* RFC 4122 UUID of filter expressed in URL-safe base64 format
|
|
332
332
|
*
|
|
333
333
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
334
334
|
* via the `definition` "identity".
|
|
@@ -362,7 +362,7 @@ export declare type MenuItemInstancesHrefSchema = {
|
|
|
362
362
|
*/
|
|
363
363
|
export declare type ItemType1 = 'item';
|
|
364
364
|
/**
|
|
365
|
-
*
|
|
365
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
366
366
|
*
|
|
367
367
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
368
368
|
* via the `definition` "identity".
|
|
@@ -379,7 +379,7 @@ export declare type ItemIdentity = string;
|
|
|
379
379
|
*/
|
|
380
380
|
export declare type FieldType = 'field';
|
|
381
381
|
/**
|
|
382
|
-
*
|
|
382
|
+
* RFC 4122 UUID of field expressed in URL-safe base64 format
|
|
383
383
|
*
|
|
384
384
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
385
385
|
* via the `definition` "identity".
|
|
@@ -396,7 +396,7 @@ export declare type FieldIdentity = string;
|
|
|
396
396
|
*/
|
|
397
397
|
export declare type FieldsetType = 'fieldset';
|
|
398
398
|
/**
|
|
399
|
-
*
|
|
399
|
+
* RFC 4122 UUID of fieldset expressed in URL-safe base64 format
|
|
400
400
|
*
|
|
401
401
|
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
402
402
|
* via the `definition` "identity".
|
|
@@ -494,7 +494,7 @@ export declare type SessionIdentity = string;
|
|
|
494
494
|
*/
|
|
495
495
|
export declare type SessionType = 'session';
|
|
496
496
|
/**
|
|
497
|
-
*
|
|
497
|
+
* RFC 4122 UUID of plugin expressed in URL-safe base64 format
|
|
498
498
|
*
|
|
499
499
|
* This interface was referenced by `Plugin`'s JSON-Schema
|
|
500
500
|
* via the `definition` "identity".
|
|
@@ -716,7 +716,7 @@ export declare type ItemSelfHrefSchema = {
|
|
|
716
716
|
[k: string]: unknown;
|
|
717
717
|
};
|
|
718
718
|
/**
|
|
719
|
-
*
|
|
719
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
720
720
|
*
|
|
721
721
|
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
722
722
|
* via the `definition` "identity".
|
|
@@ -774,7 +774,7 @@ export declare type ScheduledUnpublishingIdentity = string;
|
|
|
774
774
|
*/
|
|
775
775
|
export declare type ItemVersionType = 'item_version';
|
|
776
776
|
/**
|
|
777
|
-
*
|
|
777
|
+
* RFC 4122 UUID of redord version expressed in URL-safe base64 format
|
|
778
778
|
*
|
|
779
779
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
780
780
|
* via the `definition` "identity".
|
|
@@ -938,7 +938,7 @@ export declare type ItemVersionInstancesHrefSchema = {
|
|
|
938
938
|
[k: string]: unknown;
|
|
939
939
|
};
|
|
940
940
|
/**
|
|
941
|
-
*
|
|
941
|
+
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
942
942
|
*
|
|
943
943
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
944
944
|
* via the `definition` "identity".
|
|
@@ -1297,7 +1297,7 @@ export declare type BuildTriggerInstancesTargetSchema = BuildTrigger[];
|
|
|
1297
1297
|
*/
|
|
1298
1298
|
export declare type ItemTypeFilterInstancesTargetSchema = ItemTypeFilter[];
|
|
1299
1299
|
/**
|
|
1300
|
-
*
|
|
1300
|
+
* RFC 4122 UUID of upload filter expressed in URL-safe base64 format
|
|
1301
1301
|
*
|
|
1302
1302
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
1303
1303
|
* via the `definition` "identity".
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Resources from './resources';
|
|
2
|
-
import { LogLevel } from '@datocms/rest-client-utils';
|
|
2
|
+
import { request, LogLevel } from '@datocms/rest-client-utils';
|
|
3
3
|
import { JobResult } from './SimpleSchemaTypes';
|
|
4
4
|
export declare type RequestOptions = {
|
|
5
5
|
method: 'GET' | 'PUT' | 'POST' | 'DELETE';
|
|
@@ -25,6 +25,8 @@ export declare type ClientConfigOptions = {
|
|
|
25
25
|
logFn?: (message: string) => void;
|
|
26
26
|
/** Whether to automatically retry failed requests (ie. timeout, rate-limiting, etc.), with a linear incremental backoff. Defaults to `true` */
|
|
27
27
|
autoRetry?: boolean;
|
|
28
|
+
/** If fetch() is not available in your environment, you can provide it */
|
|
29
|
+
fetchFn?: Parameters<typeof request>[0]['fetchFn'];
|
|
28
30
|
};
|
|
29
31
|
export declare class Client {
|
|
30
32
|
static readonly defaultBaseUrl = "https://site-api.datocms.com";
|
|
@@ -19,7 +19,7 @@ export declare type RoleType = 'role';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare type RoleIdentity = string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
23
23
|
*
|
|
24
24
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
25
25
|
* via the `definition` "identity".
|
|
@@ -29,7 +29,7 @@ export declare type RoleIdentity = string;
|
|
|
29
29
|
*/
|
|
30
30
|
export declare type ItemTypeIdentity = string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* RFC 4122 UUID of workflow expressed in URL-safe base64 format
|
|
33
33
|
*
|
|
34
34
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
35
35
|
* via the `definition` "identity".
|
|
@@ -269,7 +269,7 @@ export declare type SitePlanIdentity = string;
|
|
|
269
269
|
*/
|
|
270
270
|
export declare type MenuItemType = 'menu_item';
|
|
271
271
|
/**
|
|
272
|
-
*
|
|
272
|
+
* RFC 4122 UUID of menu item expressed in URL-safe base64 format
|
|
273
273
|
*
|
|
274
274
|
* This interface was referenced by `MenuItem`'s JSON-Schema
|
|
275
275
|
* via the `definition` "identity".
|
|
@@ -293,7 +293,7 @@ export declare type ItemTypeType = 'item_type';
|
|
|
293
293
|
*/
|
|
294
294
|
export declare type ItemTypeFilterType = 'item_type_filter';
|
|
295
295
|
/**
|
|
296
|
-
*
|
|
296
|
+
* RFC 4122 UUID of filter expressed in URL-safe base64 format
|
|
297
297
|
*
|
|
298
298
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
299
299
|
* via the `definition` "identity".
|
|
@@ -322,7 +322,7 @@ export declare type MenuItemInstancesHrefSchema = {
|
|
|
322
322
|
*/
|
|
323
323
|
export declare type ItemType1 = 'item';
|
|
324
324
|
/**
|
|
325
|
-
*
|
|
325
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
326
326
|
*
|
|
327
327
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
328
328
|
* via the `definition` "identity".
|
|
@@ -339,7 +339,7 @@ export declare type ItemIdentity = string;
|
|
|
339
339
|
*/
|
|
340
340
|
export declare type FieldType = 'field';
|
|
341
341
|
/**
|
|
342
|
-
*
|
|
342
|
+
* RFC 4122 UUID of field expressed in URL-safe base64 format
|
|
343
343
|
*
|
|
344
344
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
345
345
|
* via the `definition` "identity".
|
|
@@ -356,7 +356,7 @@ export declare type FieldIdentity = string;
|
|
|
356
356
|
*/
|
|
357
357
|
export declare type FieldsetType = 'fieldset';
|
|
358
358
|
/**
|
|
359
|
-
*
|
|
359
|
+
* RFC 4122 UUID of fieldset expressed in URL-safe base64 format
|
|
360
360
|
*
|
|
361
361
|
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
362
362
|
* via the `definition` "identity".
|
|
@@ -436,7 +436,7 @@ export declare type SessionIdentity = string;
|
|
|
436
436
|
*/
|
|
437
437
|
export declare type PluginType = 'plugin';
|
|
438
438
|
/**
|
|
439
|
-
*
|
|
439
|
+
* RFC 4122 UUID of plugin expressed in URL-safe base64 format
|
|
440
440
|
*
|
|
441
441
|
* This interface was referenced by `Plugin`'s JSON-Schema
|
|
442
442
|
* via the `definition` "identity".
|
|
@@ -623,7 +623,7 @@ export declare type ItemSelfHrefSchema = {
|
|
|
623
623
|
*/
|
|
624
624
|
export declare type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state';
|
|
625
625
|
/**
|
|
626
|
-
*
|
|
626
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
627
627
|
*
|
|
628
628
|
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
629
629
|
* via the `definition` "identity".
|
|
@@ -674,7 +674,7 @@ export declare type ScheduledUnpublishingIdentity = string;
|
|
|
674
674
|
*/
|
|
675
675
|
export declare type ItemVersionType = 'item_version';
|
|
676
676
|
/**
|
|
677
|
-
*
|
|
677
|
+
* RFC 4122 UUID of redord version expressed in URL-safe base64 format
|
|
678
678
|
*
|
|
679
679
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
680
680
|
* via the `definition` "identity".
|
|
@@ -808,7 +808,7 @@ export declare type ItemUnpublishHrefSchema = {
|
|
|
808
808
|
*/
|
|
809
809
|
export declare type UploadType = 'upload';
|
|
810
810
|
/**
|
|
811
|
-
*
|
|
811
|
+
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
812
812
|
*
|
|
813
813
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
814
814
|
* via the `definition` "identity".
|
|
@@ -1097,7 +1097,7 @@ export declare type WebhookCallInstancesHrefSchema = {
|
|
|
1097
1097
|
*/
|
|
1098
1098
|
export declare type UploadFilterType = 'upload_filter';
|
|
1099
1099
|
/**
|
|
1100
|
-
*
|
|
1100
|
+
* RFC 4122 UUID of upload filter expressed in URL-safe base64 format
|
|
1101
1101
|
*
|
|
1102
1102
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
1103
1103
|
* via the `definition` "identity".
|
|
@@ -19,7 +19,7 @@ export declare type RoleIdentity = string;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare type RoleType = 'role';
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
23
23
|
*
|
|
24
24
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
25
25
|
* via the `definition` "identity".
|
|
@@ -29,7 +29,7 @@ export declare type RoleType = 'role';
|
|
|
29
29
|
*/
|
|
30
30
|
export declare type ItemTypeIdentity = string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* RFC 4122 UUID of workflow expressed in URL-safe base64 format
|
|
33
33
|
*
|
|
34
34
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
35
35
|
* via the `definition` "identity".
|
|
@@ -297,7 +297,7 @@ export declare type SitePlanIdentity = string;
|
|
|
297
297
|
*/
|
|
298
298
|
export declare type SitePlanType = 'site_plan';
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
300
|
+
* RFC 4122 UUID of menu item expressed in URL-safe base64 format
|
|
301
301
|
*
|
|
302
302
|
* This interface was referenced by `MenuItem`'s JSON-Schema
|
|
303
303
|
* via the `definition` "identity".
|
|
@@ -328,7 +328,7 @@ export declare type ItemTypeType = 'item_type';
|
|
|
328
328
|
*/
|
|
329
329
|
export declare type ItemTypeFilterType = 'item_type_filter';
|
|
330
330
|
/**
|
|
331
|
-
*
|
|
331
|
+
* RFC 4122 UUID of filter expressed in URL-safe base64 format
|
|
332
332
|
*
|
|
333
333
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
334
334
|
* via the `definition` "identity".
|
|
@@ -362,7 +362,7 @@ export declare type MenuItemInstancesHrefSchema = {
|
|
|
362
362
|
*/
|
|
363
363
|
export declare type ItemType1 = 'item';
|
|
364
364
|
/**
|
|
365
|
-
*
|
|
365
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
366
366
|
*
|
|
367
367
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
368
368
|
* via the `definition` "identity".
|
|
@@ -379,7 +379,7 @@ export declare type ItemIdentity = string;
|
|
|
379
379
|
*/
|
|
380
380
|
export declare type FieldType = 'field';
|
|
381
381
|
/**
|
|
382
|
-
*
|
|
382
|
+
* RFC 4122 UUID of field expressed in URL-safe base64 format
|
|
383
383
|
*
|
|
384
384
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
385
385
|
* via the `definition` "identity".
|
|
@@ -396,7 +396,7 @@ export declare type FieldIdentity = string;
|
|
|
396
396
|
*/
|
|
397
397
|
export declare type FieldsetType = 'fieldset';
|
|
398
398
|
/**
|
|
399
|
-
*
|
|
399
|
+
* RFC 4122 UUID of fieldset expressed in URL-safe base64 format
|
|
400
400
|
*
|
|
401
401
|
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
402
402
|
* via the `definition` "identity".
|
|
@@ -494,7 +494,7 @@ export declare type SessionIdentity = string;
|
|
|
494
494
|
*/
|
|
495
495
|
export declare type SessionType = 'session';
|
|
496
496
|
/**
|
|
497
|
-
*
|
|
497
|
+
* RFC 4122 UUID of plugin expressed in URL-safe base64 format
|
|
498
498
|
*
|
|
499
499
|
* This interface was referenced by `Plugin`'s JSON-Schema
|
|
500
500
|
* via the `definition` "identity".
|
|
@@ -716,7 +716,7 @@ export declare type ItemSelfHrefSchema = {
|
|
|
716
716
|
[k: string]: unknown;
|
|
717
717
|
};
|
|
718
718
|
/**
|
|
719
|
-
*
|
|
719
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
720
720
|
*
|
|
721
721
|
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
722
722
|
* via the `definition` "identity".
|
|
@@ -774,7 +774,7 @@ export declare type ScheduledUnpublishingIdentity = string;
|
|
|
774
774
|
*/
|
|
775
775
|
export declare type ItemVersionType = 'item_version';
|
|
776
776
|
/**
|
|
777
|
-
*
|
|
777
|
+
* RFC 4122 UUID of redord version expressed in URL-safe base64 format
|
|
778
778
|
*
|
|
779
779
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
780
780
|
* via the `definition` "identity".
|
|
@@ -938,7 +938,7 @@ export declare type ItemVersionInstancesHrefSchema = {
|
|
|
938
938
|
[k: string]: unknown;
|
|
939
939
|
};
|
|
940
940
|
/**
|
|
941
|
-
*
|
|
941
|
+
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
942
942
|
*
|
|
943
943
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
944
944
|
* via the `definition` "identity".
|
|
@@ -1297,7 +1297,7 @@ export declare type BuildTriggerInstancesTargetSchema = BuildTrigger[];
|
|
|
1297
1297
|
*/
|
|
1298
1298
|
export declare type ItemTypeFilterInstancesTargetSchema = ItemTypeFilter[];
|
|
1299
1299
|
/**
|
|
1300
|
-
*
|
|
1300
|
+
* RFC 4122 UUID of upload filter expressed in URL-safe base64 format
|
|
1301
1301
|
*
|
|
1302
1302
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
1303
1303
|
* via the `definition` "identity".
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datocms",
|
|
@@ -37,10 +37,10 @@
|
|
|
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": "^3.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@datocms/dashboard-client": "^
|
|
43
|
+
"@datocms/dashboard-client": "^3.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "5a6f58cc816ea526350913a5ad49bf9c5cb968ea"
|
|
46
46
|
}
|
package/src/generated/Client.ts
CHANGED
|
@@ -27,6 +27,8 @@ export type ClientConfigOptions = {
|
|
|
27
27
|
logFn?: (message: string) => void;
|
|
28
28
|
/** Whether to automatically retry failed requests (ie. timeout, rate-limiting, etc.), with a linear incremental backoff. Defaults to `true` */
|
|
29
29
|
autoRetry?: boolean;
|
|
30
|
+
/** If fetch() is not available in your environment, you can provide it */
|
|
31
|
+
fetchFn?: Parameters<typeof request>[0]['fetchFn'];
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
export class Client {
|
|
@@ -133,7 +135,7 @@ export class Client {
|
|
|
133
135
|
...this.config,
|
|
134
136
|
...options,
|
|
135
137
|
logFn: this.config.logFn || console.log,
|
|
136
|
-
userAgent: '@datocms/cma-client
|
|
138
|
+
userAgent: '@datocms/cma-client v3.0.0',
|
|
137
139
|
baseUrl: this.baseUrl,
|
|
138
140
|
preCallStack: new Error().stack,
|
|
139
141
|
extraHeaders: {
|
|
@@ -21,7 +21,7 @@ export type RoleType = 'role';
|
|
|
21
21
|
*/
|
|
22
22
|
export type RoleIdentity = string;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
25
25
|
*
|
|
26
26
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
27
27
|
* via the `definition` "identity".
|
|
@@ -31,7 +31,7 @@ export type RoleIdentity = string;
|
|
|
31
31
|
*/
|
|
32
32
|
export type ItemTypeIdentity = string;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* RFC 4122 UUID of workflow expressed in URL-safe base64 format
|
|
35
35
|
*
|
|
36
36
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
37
37
|
* via the `definition` "identity".
|
|
@@ -271,7 +271,7 @@ export type SitePlanIdentity = string;
|
|
|
271
271
|
*/
|
|
272
272
|
export type MenuItemType = 'menu_item';
|
|
273
273
|
/**
|
|
274
|
-
*
|
|
274
|
+
* RFC 4122 UUID of menu item expressed in URL-safe base64 format
|
|
275
275
|
*
|
|
276
276
|
* This interface was referenced by `MenuItem`'s JSON-Schema
|
|
277
277
|
* via the `definition` "identity".
|
|
@@ -295,7 +295,7 @@ export type ItemTypeType = 'item_type';
|
|
|
295
295
|
*/
|
|
296
296
|
export type ItemTypeFilterType = 'item_type_filter';
|
|
297
297
|
/**
|
|
298
|
-
*
|
|
298
|
+
* RFC 4122 UUID of filter expressed in URL-safe base64 format
|
|
299
299
|
*
|
|
300
300
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
301
301
|
* via the `definition` "identity".
|
|
@@ -324,7 +324,7 @@ export type MenuItemInstancesHrefSchema = {
|
|
|
324
324
|
*/
|
|
325
325
|
export type ItemType1 = 'item';
|
|
326
326
|
/**
|
|
327
|
-
*
|
|
327
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
328
328
|
*
|
|
329
329
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
330
330
|
* via the `definition` "identity".
|
|
@@ -341,7 +341,7 @@ export type ItemIdentity = string;
|
|
|
341
341
|
*/
|
|
342
342
|
export type FieldType = 'field';
|
|
343
343
|
/**
|
|
344
|
-
*
|
|
344
|
+
* RFC 4122 UUID of field expressed in URL-safe base64 format
|
|
345
345
|
*
|
|
346
346
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
347
347
|
* via the `definition` "identity".
|
|
@@ -358,7 +358,7 @@ export type FieldIdentity = string;
|
|
|
358
358
|
*/
|
|
359
359
|
export type FieldsetType = 'fieldset';
|
|
360
360
|
/**
|
|
361
|
-
*
|
|
361
|
+
* RFC 4122 UUID of fieldset expressed in URL-safe base64 format
|
|
362
362
|
*
|
|
363
363
|
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
364
364
|
* via the `definition` "identity".
|
|
@@ -438,7 +438,7 @@ export type SessionIdentity = string;
|
|
|
438
438
|
*/
|
|
439
439
|
export type PluginType = 'plugin';
|
|
440
440
|
/**
|
|
441
|
-
*
|
|
441
|
+
* RFC 4122 UUID of plugin expressed in URL-safe base64 format
|
|
442
442
|
*
|
|
443
443
|
* This interface was referenced by `Plugin`'s JSON-Schema
|
|
444
444
|
* via the `definition` "identity".
|
|
@@ -625,7 +625,7 @@ export type ItemSelfHrefSchema = {
|
|
|
625
625
|
*/
|
|
626
626
|
export type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state';
|
|
627
627
|
/**
|
|
628
|
-
*
|
|
628
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
629
629
|
*
|
|
630
630
|
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
631
631
|
* via the `definition` "identity".
|
|
@@ -676,7 +676,7 @@ export type ScheduledUnpublishingIdentity = string;
|
|
|
676
676
|
*/
|
|
677
677
|
export type ItemVersionType = 'item_version';
|
|
678
678
|
/**
|
|
679
|
-
*
|
|
679
|
+
* RFC 4122 UUID of redord version expressed in URL-safe base64 format
|
|
680
680
|
*
|
|
681
681
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
682
682
|
* via the `definition` "identity".
|
|
@@ -810,7 +810,7 @@ export type ItemUnpublishHrefSchema = {
|
|
|
810
810
|
*/
|
|
811
811
|
export type UploadType = 'upload';
|
|
812
812
|
/**
|
|
813
|
-
*
|
|
813
|
+
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
814
814
|
*
|
|
815
815
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
816
816
|
* via the `definition` "identity".
|
|
@@ -1099,7 +1099,7 @@ export type WebhookCallInstancesHrefSchema = {
|
|
|
1099
1099
|
*/
|
|
1100
1100
|
export type UploadFilterType = 'upload_filter';
|
|
1101
1101
|
/**
|
|
1102
|
-
*
|
|
1102
|
+
* RFC 4122 UUID of upload filter expressed in URL-safe base64 format
|
|
1103
1103
|
*
|
|
1104
1104
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
1105
1105
|
* via the `definition` "identity".
|
|
@@ -21,7 +21,7 @@ export type RoleIdentity = string;
|
|
|
21
21
|
*/
|
|
22
22
|
export type RoleType = 'role';
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* RFC 4122 UUID of item type expressed in URL-safe base64 format
|
|
25
25
|
*
|
|
26
26
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
27
27
|
* via the `definition` "identity".
|
|
@@ -31,7 +31,7 @@ export type RoleType = 'role';
|
|
|
31
31
|
*/
|
|
32
32
|
export type ItemTypeIdentity = string;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* RFC 4122 UUID of workflow expressed in URL-safe base64 format
|
|
35
35
|
*
|
|
36
36
|
* This interface was referenced by `Workflow`'s JSON-Schema
|
|
37
37
|
* via the `definition` "identity".
|
|
@@ -299,7 +299,7 @@ export type SitePlanIdentity = string;
|
|
|
299
299
|
*/
|
|
300
300
|
export type SitePlanType = 'site_plan';
|
|
301
301
|
/**
|
|
302
|
-
*
|
|
302
|
+
* RFC 4122 UUID of menu item expressed in URL-safe base64 format
|
|
303
303
|
*
|
|
304
304
|
* This interface was referenced by `MenuItem`'s JSON-Schema
|
|
305
305
|
* via the `definition` "identity".
|
|
@@ -330,7 +330,7 @@ export type ItemTypeType = 'item_type';
|
|
|
330
330
|
*/
|
|
331
331
|
export type ItemTypeFilterType = 'item_type_filter';
|
|
332
332
|
/**
|
|
333
|
-
*
|
|
333
|
+
* RFC 4122 UUID of filter expressed in URL-safe base64 format
|
|
334
334
|
*
|
|
335
335
|
* This interface was referenced by `ItemTypeFilter`'s JSON-Schema
|
|
336
336
|
* via the `definition` "identity".
|
|
@@ -364,7 +364,7 @@ export type MenuItemInstancesHrefSchema = {
|
|
|
364
364
|
*/
|
|
365
365
|
export type ItemType1 = 'item';
|
|
366
366
|
/**
|
|
367
|
-
*
|
|
367
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
368
368
|
*
|
|
369
369
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
370
370
|
* via the `definition` "identity".
|
|
@@ -381,7 +381,7 @@ export type ItemIdentity = string;
|
|
|
381
381
|
*/
|
|
382
382
|
export type FieldType = 'field';
|
|
383
383
|
/**
|
|
384
|
-
*
|
|
384
|
+
* RFC 4122 UUID of field expressed in URL-safe base64 format
|
|
385
385
|
*
|
|
386
386
|
* This interface was referenced by `Field`'s JSON-Schema
|
|
387
387
|
* via the `definition` "identity".
|
|
@@ -398,7 +398,7 @@ export type FieldIdentity = string;
|
|
|
398
398
|
*/
|
|
399
399
|
export type FieldsetType = 'fieldset';
|
|
400
400
|
/**
|
|
401
|
-
*
|
|
401
|
+
* RFC 4122 UUID of fieldset expressed in URL-safe base64 format
|
|
402
402
|
*
|
|
403
403
|
* This interface was referenced by `Fieldset`'s JSON-Schema
|
|
404
404
|
* via the `definition` "identity".
|
|
@@ -496,7 +496,7 @@ export type SessionIdentity = string;
|
|
|
496
496
|
*/
|
|
497
497
|
export type SessionType = 'session';
|
|
498
498
|
/**
|
|
499
|
-
*
|
|
499
|
+
* RFC 4122 UUID of plugin expressed in URL-safe base64 format
|
|
500
500
|
*
|
|
501
501
|
* This interface was referenced by `Plugin`'s JSON-Schema
|
|
502
502
|
* via the `definition` "identity".
|
|
@@ -718,7 +718,7 @@ export type ItemSelfHrefSchema = {
|
|
|
718
718
|
[k: string]: unknown;
|
|
719
719
|
};
|
|
720
720
|
/**
|
|
721
|
-
*
|
|
721
|
+
* RFC 4122 UUID of record expressed in URL-safe base64 format
|
|
722
722
|
*
|
|
723
723
|
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
724
724
|
* via the `definition` "identity".
|
|
@@ -776,7 +776,7 @@ export type ScheduledUnpublishingIdentity = string;
|
|
|
776
776
|
*/
|
|
777
777
|
export type ItemVersionType = 'item_version';
|
|
778
778
|
/**
|
|
779
|
-
*
|
|
779
|
+
* RFC 4122 UUID of redord version expressed in URL-safe base64 format
|
|
780
780
|
*
|
|
781
781
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
782
782
|
* via the `definition` "identity".
|
|
@@ -940,7 +940,7 @@ export type ItemVersionInstancesHrefSchema = {
|
|
|
940
940
|
[k: string]: unknown;
|
|
941
941
|
};
|
|
942
942
|
/**
|
|
943
|
-
*
|
|
943
|
+
* RFC 4122 UUID of upload expressed in URL-safe base64 format
|
|
944
944
|
*
|
|
945
945
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
946
946
|
* via the `definition` "identity".
|
|
@@ -1299,7 +1299,7 @@ export type BuildTriggerInstancesTargetSchema = BuildTrigger[];
|
|
|
1299
1299
|
*/
|
|
1300
1300
|
export type ItemTypeFilterInstancesTargetSchema = ItemTypeFilter[];
|
|
1301
1301
|
/**
|
|
1302
|
-
*
|
|
1302
|
+
* RFC 4122 UUID of upload filter expressed in URL-safe base64 format
|
|
1303
1303
|
*
|
|
1304
1304
|
* This interface was referenced by `UploadFilter`'s JSON-Schema
|
|
1305
1305
|
* via the `definition` "identity".
|