@datocms/cma-client 5.0.0-alpha.0 → 5.0.1
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/cjs/generated/resources/Upload.js +0 -69
- package/dist/cjs/generated/resources/Upload.js.map +1 -1
- package/dist/cjs/generated/resources/UploadRequest.js +2 -2
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/Client.js.map +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +15 -77
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +16 -56
- package/dist/esm/generated/resources/Upload.d.ts +0 -44
- package/dist/esm/generated/resources/Upload.js +0 -69
- package/dist/esm/generated/resources/Upload.js.map +1 -1
- package/dist/esm/generated/resources/UploadRequest.d.ts +2 -2
- package/dist/esm/generated/resources/UploadRequest.js +2 -2
- package/dist/types/generated/SchemaTypes.d.ts +15 -77
- package/dist/types/generated/SimpleSchemaTypes.d.ts +16 -56
- package/dist/types/generated/resources/Upload.d.ts +0 -44
- package/dist/types/generated/resources/UploadRequest.d.ts +2 -2
- package/package.json +4 -4
- package/resources.json +1 -39
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +15 -82
- package/src/generated/SimpleSchemaTypes.ts +16 -57
- package/src/generated/resources/Upload.ts +0 -88
- package/src/generated/resources/UploadRequest.ts +2 -2
|
@@ -21,7 +21,7 @@ var UploadRequest = /** @class */ (function (_super) {
|
|
|
21
21
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Request a new upload
|
|
24
|
+
* Request a new permission to upload a file
|
|
25
25
|
*
|
|
26
26
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
27
27
|
*
|
|
@@ -38,7 +38,7 @@ var UploadRequest = /** @class */ (function (_super) {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
|
-
* Request a new upload
|
|
41
|
+
* Request a new permission to upload a file
|
|
42
42
|
*
|
|
43
43
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
44
44
|
*
|
|
@@ -886,28 +886,6 @@ export type UploadInstancesHrefSchema = {
|
|
|
886
886
|
};
|
|
887
887
|
[k: string]: unknown;
|
|
888
888
|
};
|
|
889
|
-
/**
|
|
890
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
891
|
-
* via the `batch_add_tags.hrefSchema` link.
|
|
892
|
-
*/
|
|
893
|
-
export type UploadBatchAddTagsHrefSchema = {
|
|
894
|
-
/**
|
|
895
|
-
* IDs to tag, comma separated
|
|
896
|
-
*/
|
|
897
|
-
'filter[ids]'?: string;
|
|
898
|
-
[k: string]: unknown;
|
|
899
|
-
};
|
|
900
|
-
/**
|
|
901
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
902
|
-
* via the `batch_destroy.hrefSchema` link.
|
|
903
|
-
*/
|
|
904
|
-
export type UploadBatchDestroyHrefSchema = {
|
|
905
|
-
/**
|
|
906
|
-
* IDs to destroy, comma separated
|
|
907
|
-
*/
|
|
908
|
-
'filter[ids]'?: string;
|
|
909
|
-
[k: string]: unknown;
|
|
910
|
-
};
|
|
911
889
|
/**
|
|
912
890
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
913
891
|
* via the `references.hrefSchema` link.
|
|
@@ -4938,7 +4916,7 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
4938
4916
|
* | Code | `structured_text` |
|
|
4939
4917
|
* | Built-in editors for the field | `structured_text` |
|
|
4940
4918
|
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
4941
|
-
* | Other validators available | `length`
|
|
4919
|
+
* | Other validators available | `length`, `structured_text_inline_blocks` |
|
|
4942
4920
|
*
|
|
4943
4921
|
* </details>
|
|
4944
4922
|
*
|
|
@@ -5274,6 +5252,17 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5274
5252
|
* </details>
|
|
5275
5253
|
*
|
|
5276
5254
|
* <details>
|
|
5255
|
+
* <summary><code>structured_text_inline_blocks</code></summary>
|
|
5256
|
+
*
|
|
5257
|
+
* Only accept references to block records of the specified block models.
|
|
5258
|
+
*
|
|
5259
|
+
* | Parameter | Type | Required | Description |
|
|
5260
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5261
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5262
|
+
*
|
|
5263
|
+
* </details>
|
|
5264
|
+
*
|
|
5265
|
+
* <details>
|
|
5277
5266
|
* <summary><code>structured_text_links</code></summary>
|
|
5278
5267
|
*
|
|
5279
5268
|
* Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
|
|
@@ -7611,7 +7600,7 @@ export type ItemBulkMoveToStageJobSchema = {
|
|
|
7611
7600
|
};
|
|
7612
7601
|
};
|
|
7613
7602
|
/**
|
|
7614
|
-
*
|
|
7603
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7615
7604
|
*
|
|
7616
7605
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7617
7606
|
* via the `definition` "upload".
|
|
@@ -8041,57 +8030,6 @@ export type UploadUpdateTargetSchema = {
|
|
|
8041
8030
|
export type UploadUpdateJobSchema = {
|
|
8042
8031
|
data: Upload;
|
|
8043
8032
|
};
|
|
8044
|
-
/**
|
|
8045
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8046
|
-
* via the `batch_add_tags.schema` link.
|
|
8047
|
-
*/
|
|
8048
|
-
export type UploadBatchAddTagsSchema = {
|
|
8049
|
-
data: {
|
|
8050
|
-
type: UploadType;
|
|
8051
|
-
attributes: {
|
|
8052
|
-
/**
|
|
8053
|
-
* Tags
|
|
8054
|
-
*/
|
|
8055
|
-
tags: string[];
|
|
8056
|
-
};
|
|
8057
|
-
};
|
|
8058
|
-
};
|
|
8059
|
-
/**
|
|
8060
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8061
|
-
* via the `batch_add_tags.targetSchema` link.
|
|
8062
|
-
*/
|
|
8063
|
-
export type UploadBatchAddTagsTargetSchema = {
|
|
8064
|
-
data: Job;
|
|
8065
|
-
};
|
|
8066
|
-
/**
|
|
8067
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8068
|
-
* via the `batch_add_tags.jobSchema` link.
|
|
8069
|
-
*/
|
|
8070
|
-
export type UploadBatchAddTagsJobSchema = {
|
|
8071
|
-
data: unknown[];
|
|
8072
|
-
meta: {
|
|
8073
|
-
successful: number;
|
|
8074
|
-
failed: number;
|
|
8075
|
-
};
|
|
8076
|
-
};
|
|
8077
|
-
/**
|
|
8078
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8079
|
-
* via the `batch_destroy.targetSchema` link.
|
|
8080
|
-
*/
|
|
8081
|
-
export type UploadBatchDestroyTargetSchema = {
|
|
8082
|
-
data: Job;
|
|
8083
|
-
};
|
|
8084
|
-
/**
|
|
8085
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8086
|
-
* via the `batch_destroy.jobSchema` link.
|
|
8087
|
-
*/
|
|
8088
|
-
export type UploadBatchDestroyJobSchema = {
|
|
8089
|
-
data: unknown[];
|
|
8090
|
-
meta: {
|
|
8091
|
-
successful: number;
|
|
8092
|
-
failed: number;
|
|
8093
|
-
};
|
|
8094
|
-
};
|
|
8095
8033
|
/**
|
|
8096
8034
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8097
8035
|
* via the `references.targetSchema` link.
|
|
@@ -8220,7 +8158,7 @@ export type UploadBulkDestroyJobSchema = {
|
|
|
8220
8158
|
};
|
|
8221
8159
|
};
|
|
8222
8160
|
/**
|
|
8223
|
-
* To upload a file
|
|
8161
|
+
* To upload a file with the Content Management API, first you need to obtain an upload permission. The `upload_request` entity contains the S3-like URL where you will be able to upload the file with a raw/binary PUT request.
|
|
8224
8162
|
*
|
|
8225
8163
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8226
8164
|
* via the `definition` "upload_request".
|
|
@@ -8238,7 +8176,7 @@ export type UploadRequest = {
|
|
|
8238
8176
|
*/
|
|
8239
8177
|
export type UploadRequestAttributes = {
|
|
8240
8178
|
/**
|
|
8241
|
-
* The URL to use to upload the file with a
|
|
8179
|
+
* The URL to use to upload the file with a raw/binary PUT request
|
|
8242
8180
|
*/
|
|
8243
8181
|
url: string;
|
|
8244
8182
|
/**
|
|
@@ -1102,38 +1102,6 @@ export type UploadInstancesHrefSchema = {
|
|
|
1102
1102
|
};
|
|
1103
1103
|
[k: string]: unknown;
|
|
1104
1104
|
};
|
|
1105
|
-
/**
|
|
1106
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1107
|
-
* via the `batch_add_tags.jobSchema` link.
|
|
1108
|
-
*/
|
|
1109
|
-
export type UploadBatchAddTagsJobSchema = unknown[];
|
|
1110
|
-
/**
|
|
1111
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1112
|
-
* via the `batch_add_tags.hrefSchema` link.
|
|
1113
|
-
*/
|
|
1114
|
-
export type UploadBatchAddTagsHrefSchema = {
|
|
1115
|
-
/**
|
|
1116
|
-
* IDs to tag, comma separated
|
|
1117
|
-
*/
|
|
1118
|
-
'filter[ids]'?: string;
|
|
1119
|
-
[k: string]: unknown;
|
|
1120
|
-
};
|
|
1121
|
-
/**
|
|
1122
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1123
|
-
* via the `batch_destroy.jobSchema` link.
|
|
1124
|
-
*/
|
|
1125
|
-
export type UploadBatchDestroyJobSchema = unknown[];
|
|
1126
|
-
/**
|
|
1127
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1128
|
-
* via the `batch_destroy.hrefSchema` link.
|
|
1129
|
-
*/
|
|
1130
|
-
export type UploadBatchDestroyHrefSchema = {
|
|
1131
|
-
/**
|
|
1132
|
-
* IDs to destroy, comma separated
|
|
1133
|
-
*/
|
|
1134
|
-
'filter[ids]'?: string;
|
|
1135
|
-
[k: string]: unknown;
|
|
1136
|
-
};
|
|
1137
1105
|
/**
|
|
1138
1106
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
1139
1107
|
* via the `references.targetSchema` link.
|
|
@@ -4216,12 +4184,6 @@ export type MenuItemUpdateSchema = {
|
|
|
4216
4184
|
* via the `update.targetSchema` link.
|
|
4217
4185
|
*
|
|
4218
4186
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4219
|
-
* via the `batch_add_tags.targetSchema` link.
|
|
4220
|
-
*
|
|
4221
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4222
|
-
* via the `batch_destroy.targetSchema` link.
|
|
4223
|
-
*
|
|
4224
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4225
4187
|
* via the `bulk_tag.targetSchema` link.
|
|
4226
4188
|
*
|
|
4227
4189
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
@@ -4271,8 +4233,6 @@ export type ItemBulkMoveToStageTargetSchema = Job;
|
|
|
4271
4233
|
export type ItemVersionRestoreTargetSchema = Job;
|
|
4272
4234
|
export type UploadCreateTargetSchema = Job;
|
|
4273
4235
|
export type UploadUpdateTargetSchema = Job;
|
|
4274
|
-
export type UploadBatchAddTagsTargetSchema = Job;
|
|
4275
|
-
export type UploadBatchDestroyTargetSchema = Job;
|
|
4276
4236
|
export type UploadBulkTagTargetSchema = Job;
|
|
4277
4237
|
export type UploadBulkSetUploadCollectionTargetSchema = Job;
|
|
4278
4238
|
export type UploadBulkDestroyTargetSchema = Job;
|
|
@@ -5219,7 +5179,7 @@ export type ItemTypeUpdateSchema = {
|
|
|
5219
5179
|
* | Code | `structured_text` |
|
|
5220
5180
|
* | Built-in editors for the field | `structured_text` |
|
|
5221
5181
|
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
5222
|
-
* | Other validators available | `length`
|
|
5182
|
+
* | Other validators available | `length`, `structured_text_inline_blocks` |
|
|
5223
5183
|
*
|
|
5224
5184
|
* </details>
|
|
5225
5185
|
*
|
|
@@ -5555,6 +5515,17 @@ export type ItemTypeUpdateSchema = {
|
|
|
5555
5515
|
* </details>
|
|
5556
5516
|
*
|
|
5557
5517
|
* <details>
|
|
5518
|
+
* <summary><code>structured_text_inline_blocks</code></summary>
|
|
5519
|
+
*
|
|
5520
|
+
* Only accept references to block records of the specified block models.
|
|
5521
|
+
*
|
|
5522
|
+
* | Parameter | Type | Required | Description |
|
|
5523
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5524
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5525
|
+
*
|
|
5526
|
+
* </details>
|
|
5527
|
+
*
|
|
5528
|
+
* <details>
|
|
5558
5529
|
* <summary><code>structured_text_links</code></summary>
|
|
5559
5530
|
*
|
|
5560
5531
|
* Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
|
|
@@ -7308,7 +7279,7 @@ export type ItemVersionRelationships = {
|
|
|
7308
7279
|
editor: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
|
|
7309
7280
|
};
|
|
7310
7281
|
/**
|
|
7311
|
-
*
|
|
7282
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7312
7283
|
*
|
|
7313
7284
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7314
7285
|
* via the `definition` "upload".
|
|
@@ -7812,17 +7783,6 @@ export type UploadUpdateSchema = {
|
|
|
7812
7783
|
creator?: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
|
|
7813
7784
|
upload_collection?: UploadCollectionData | null;
|
|
7814
7785
|
};
|
|
7815
|
-
/**
|
|
7816
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
7817
|
-
* via the `batch_add_tags.schema` link.
|
|
7818
|
-
*/
|
|
7819
|
-
export type UploadBatchAddTagsSchema = {
|
|
7820
|
-
type?: UploadType;
|
|
7821
|
-
/**
|
|
7822
|
-
* Tags
|
|
7823
|
-
*/
|
|
7824
|
-
tags: string[];
|
|
7825
|
-
};
|
|
7826
7786
|
/**
|
|
7827
7787
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
7828
7788
|
* via the `bulk_tag.schema` link.
|
|
@@ -7853,7 +7813,7 @@ export type UploadBulkDestroySchema = {
|
|
|
7853
7813
|
uploads: UploadData[];
|
|
7854
7814
|
};
|
|
7855
7815
|
/**
|
|
7856
|
-
* To upload a file
|
|
7816
|
+
* To upload a file with the Content Management API, first you need to obtain an upload permission. The `upload_request` entity contains the S3-like URL where you will be able to upload the file with a raw/binary PUT request.
|
|
7857
7817
|
*
|
|
7858
7818
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7859
7819
|
* via the `definition` "upload_request".
|
|
@@ -7862,7 +7822,7 @@ export type UploadRequest = {
|
|
|
7862
7822
|
id: UploadRequestIdentity;
|
|
7863
7823
|
type: UploadRequestType;
|
|
7864
7824
|
/**
|
|
7865
|
-
* The URL to use to upload the file with a
|
|
7825
|
+
* The URL to use to upload the file with a raw/binary PUT request
|
|
7866
7826
|
*/
|
|
7867
7827
|
url: string;
|
|
7868
7828
|
/**
|
|
@@ -7881,7 +7841,7 @@ export type UploadRequestCreateTargetSchema = UploadRequest;
|
|
|
7881
7841
|
*/
|
|
7882
7842
|
export type UploadRequestAttributes = {
|
|
7883
7843
|
/**
|
|
7884
|
-
* The URL to use to upload the file with a
|
|
7844
|
+
* The URL to use to upload the file with a raw/binary PUT request
|
|
7885
7845
|
*/
|
|
7886
7846
|
url: string;
|
|
7887
7847
|
/**
|
|
@@ -112,50 +112,6 @@ export default class Upload extends BaseResource {
|
|
|
112
112
|
* @throws {TimeoutError}
|
|
113
113
|
*/
|
|
114
114
|
rawUpdate(uploadId: string, body: SchemaTypes.UploadUpdateSchema): Promise<SchemaTypes.UploadUpdateJobSchema>;
|
|
115
|
-
/**
|
|
116
|
-
* Batch add tags to uploads
|
|
117
|
-
*
|
|
118
|
-
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_add_tags
|
|
119
|
-
*
|
|
120
|
-
* @throws {ApiError}
|
|
121
|
-
* @throws {TimeoutError}
|
|
122
|
-
*
|
|
123
|
-
* @deprecated This API call is to be considered private and might change without notice
|
|
124
|
-
*/
|
|
125
|
-
batchAddTags(body: SimpleSchemaTypes.UploadBatchAddTagsSchema, queryParams?: SimpleSchemaTypes.UploadBatchAddTagsHrefSchema): Promise<SimpleSchemaTypes.UploadBatchAddTagsJobSchema>;
|
|
126
|
-
/**
|
|
127
|
-
* Batch add tags to uploads
|
|
128
|
-
*
|
|
129
|
-
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_add_tags
|
|
130
|
-
*
|
|
131
|
-
* @throws {ApiError}
|
|
132
|
-
* @throws {TimeoutError}
|
|
133
|
-
*
|
|
134
|
-
* @deprecated This API call is to be considered private and might change without notice
|
|
135
|
-
*/
|
|
136
|
-
rawBatchAddTags(body: SchemaTypes.UploadBatchAddTagsSchema, queryParams?: SchemaTypes.UploadBatchAddTagsHrefSchema): Promise<SchemaTypes.UploadBatchAddTagsJobSchema>;
|
|
137
|
-
/**
|
|
138
|
-
* Delete multiple uploads
|
|
139
|
-
*
|
|
140
|
-
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_destroy
|
|
141
|
-
*
|
|
142
|
-
* @throws {ApiError}
|
|
143
|
-
* @throws {TimeoutError}
|
|
144
|
-
*
|
|
145
|
-
* @deprecated This API call is to be considered private and might change without notice
|
|
146
|
-
*/
|
|
147
|
-
batchDestroy(queryParams?: SimpleSchemaTypes.UploadBatchDestroyHrefSchema): Promise<SimpleSchemaTypes.UploadBatchDestroyJobSchema>;
|
|
148
|
-
/**
|
|
149
|
-
* Delete multiple uploads
|
|
150
|
-
*
|
|
151
|
-
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload/batch_destroy
|
|
152
|
-
*
|
|
153
|
-
* @throws {ApiError}
|
|
154
|
-
* @throws {TimeoutError}
|
|
155
|
-
*
|
|
156
|
-
* @deprecated This API call is to be considered private and might change without notice
|
|
157
|
-
*/
|
|
158
|
-
rawBatchDestroy(queryParams?: SchemaTypes.UploadBatchDestroyHrefSchema): Promise<SchemaTypes.UploadBatchDestroyJobSchema>;
|
|
159
115
|
/**
|
|
160
116
|
* Referenced records
|
|
161
117
|
*
|
|
@@ -4,7 +4,7 @@ import type * as SimpleSchemaTypes from '../SimpleSchemaTypes';
|
|
|
4
4
|
export default class UploadRequest extends BaseResource {
|
|
5
5
|
static readonly TYPE: "upload_request";
|
|
6
6
|
/**
|
|
7
|
-
* Request a new upload
|
|
7
|
+
* Request a new permission to upload a file
|
|
8
8
|
*
|
|
9
9
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
10
10
|
*
|
|
@@ -13,7 +13,7 @@ export default class UploadRequest extends BaseResource {
|
|
|
13
13
|
*/
|
|
14
14
|
create(body: SimpleSchemaTypes.UploadRequestCreateSchema): Promise<SimpleSchemaTypes.UploadRequest>;
|
|
15
15
|
/**
|
|
16
|
-
* Request a new upload
|
|
16
|
+
* Request a new permission to upload a file
|
|
17
17
|
*
|
|
18
18
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
19
19
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
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": "^5.0.0
|
|
40
|
+
"@datocms/rest-client-utils": "^5.0.0",
|
|
41
41
|
"uuid": "^9.0.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@datocms/dashboard-client": "^5.0.0
|
|
44
|
+
"@datocms/dashboard-client": "^5.0.0",
|
|
45
45
|
"@types/uuid": "^9.0.7"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "51532eca9288ec685005e47f6bcc78df9bc20e19"
|
|
48
48
|
}
|
package/resources.json
CHANGED
|
@@ -2601,44 +2601,6 @@
|
|
|
2601
2601
|
"name": "update",
|
|
2602
2602
|
"rawName": "rawUpdate"
|
|
2603
2603
|
},
|
|
2604
|
-
{
|
|
2605
|
-
"returnsCollection": false,
|
|
2606
|
-
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/upload/batch_add_tags",
|
|
2607
|
-
"rel": "batch_add_tags",
|
|
2608
|
-
"urlTemplate": "/uploads/batch-add-tags",
|
|
2609
|
-
"method": "PUT",
|
|
2610
|
-
"comment": "Batch add tags to uploads",
|
|
2611
|
-
"urlPlaceholders": [],
|
|
2612
|
-
"requestBodyType": "UploadBatchAddTagsSchema",
|
|
2613
|
-
"optionalRequestBody": false,
|
|
2614
|
-
"requestStructure": {
|
|
2615
|
-
"type": "upload",
|
|
2616
|
-
"attributes": ["tags"],
|
|
2617
|
-
"relationships": []
|
|
2618
|
-
},
|
|
2619
|
-
"queryParamsType": "UploadBatchAddTagsHrefSchema",
|
|
2620
|
-
"queryParamsRequired": false,
|
|
2621
|
-
"responseType": "UploadBatchAddTagsJobSchema",
|
|
2622
|
-
"deprecated": "This API call is to be considered private and might change without notice",
|
|
2623
|
-
"name": "batchAddTags",
|
|
2624
|
-
"rawName": "rawBatchAddTags"
|
|
2625
|
-
},
|
|
2626
|
-
{
|
|
2627
|
-
"returnsCollection": false,
|
|
2628
|
-
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/upload/batch_destroy",
|
|
2629
|
-
"rel": "batch_destroy",
|
|
2630
|
-
"urlTemplate": "/uploads/batch-destroy",
|
|
2631
|
-
"method": "DELETE",
|
|
2632
|
-
"comment": "Delete multiple uploads",
|
|
2633
|
-
"urlPlaceholders": [],
|
|
2634
|
-
"optionalRequestBody": false,
|
|
2635
|
-
"queryParamsType": "UploadBatchDestroyHrefSchema",
|
|
2636
|
-
"queryParamsRequired": false,
|
|
2637
|
-
"responseType": "UploadBatchDestroyJobSchema",
|
|
2638
|
-
"deprecated": "This API call is to be considered private and might change without notice",
|
|
2639
|
-
"name": "batchDestroy",
|
|
2640
|
-
"rawName": "rawBatchDestroy"
|
|
2641
|
-
},
|
|
2642
2604
|
{
|
|
2643
2605
|
"returnsCollection": false,
|
|
2644
2606
|
"docUrl": "https://www.datocms.com/docs/content-management-api/resources/upload/references",
|
|
@@ -2738,7 +2700,7 @@
|
|
|
2738
2700
|
"rel": "create",
|
|
2739
2701
|
"urlTemplate": "/upload-requests",
|
|
2740
2702
|
"method": "POST",
|
|
2741
|
-
"comment": "Request a new upload",
|
|
2703
|
+
"comment": "Request a new permission to upload a file",
|
|
2742
2704
|
"urlPlaceholders": [],
|
|
2743
2705
|
"requestBodyType": "UploadRequestCreateSchema",
|
|
2744
2706
|
"optionalRequestBody": false,
|
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.0.
|
|
150
|
+
userAgent: '@datocms/cma-client v5.0.1',
|
|
151
151
|
baseUrl: this.baseUrl,
|
|
152
152
|
preCallStack: new Error().stack,
|
|
153
153
|
extraHeaders: {
|
|
@@ -903,28 +903,6 @@ export type UploadInstancesHrefSchema = {
|
|
|
903
903
|
};
|
|
904
904
|
[k: string]: unknown;
|
|
905
905
|
};
|
|
906
|
-
/**
|
|
907
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
908
|
-
* via the `batch_add_tags.hrefSchema` link.
|
|
909
|
-
*/
|
|
910
|
-
export type UploadBatchAddTagsHrefSchema = {
|
|
911
|
-
/**
|
|
912
|
-
* IDs to tag, comma separated
|
|
913
|
-
*/
|
|
914
|
-
'filter[ids]'?: string;
|
|
915
|
-
[k: string]: unknown;
|
|
916
|
-
};
|
|
917
|
-
/**
|
|
918
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
919
|
-
* via the `batch_destroy.hrefSchema` link.
|
|
920
|
-
*/
|
|
921
|
-
export type UploadBatchDestroyHrefSchema = {
|
|
922
|
-
/**
|
|
923
|
-
* IDs to destroy, comma separated
|
|
924
|
-
*/
|
|
925
|
-
'filter[ids]'?: string;
|
|
926
|
-
[k: string]: unknown;
|
|
927
|
-
};
|
|
928
906
|
/**
|
|
929
907
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
930
908
|
* via the `references.hrefSchema` link.
|
|
@@ -5285,7 +5263,7 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5285
5263
|
* | Code | `structured_text` |
|
|
5286
5264
|
* | Built-in editors for the field | `structured_text` |
|
|
5287
5265
|
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
5288
|
-
* | Other validators available | `length`
|
|
5266
|
+
* | Other validators available | `length`, `structured_text_inline_blocks` |
|
|
5289
5267
|
*
|
|
5290
5268
|
* </details>
|
|
5291
5269
|
*
|
|
@@ -5621,6 +5599,17 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5621
5599
|
* </details>
|
|
5622
5600
|
*
|
|
5623
5601
|
* <details>
|
|
5602
|
+
* <summary><code>structured_text_inline_blocks</code></summary>
|
|
5603
|
+
*
|
|
5604
|
+
* Only accept references to block records of the specified block models.
|
|
5605
|
+
*
|
|
5606
|
+
* | Parameter | Type | Required | Description |
|
|
5607
|
+
* | ------------ | ----------------------- | -------- | ------------------------------ |
|
|
5608
|
+
* | `item_types` | `Array<Block Model ID>` | ✅ | Set of allowed Block Model IDs |
|
|
5609
|
+
*
|
|
5610
|
+
* </details>
|
|
5611
|
+
*
|
|
5612
|
+
* <details>
|
|
5624
5613
|
* <summary><code>structured_text_links</code></summary>
|
|
5625
5614
|
*
|
|
5626
5615
|
* Only accept `itemLink` to `inlineItem` nodes for records of the specified models.
|
|
@@ -8240,7 +8229,7 @@ export type ItemBulkMoveToStageJobSchema = {
|
|
|
8240
8229
|
};
|
|
8241
8230
|
|
|
8242
8231
|
/**
|
|
8243
|
-
*
|
|
8232
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
8244
8233
|
*
|
|
8245
8234
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8246
8235
|
* via the `definition` "upload".
|
|
@@ -8693,62 +8682,6 @@ export type UploadUpdateJobSchema = {
|
|
|
8693
8682
|
data: Upload;
|
|
8694
8683
|
};
|
|
8695
8684
|
|
|
8696
|
-
/**
|
|
8697
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8698
|
-
* via the `batch_add_tags.schema` link.
|
|
8699
|
-
*/
|
|
8700
|
-
export type UploadBatchAddTagsSchema = {
|
|
8701
|
-
data: {
|
|
8702
|
-
type: UploadType;
|
|
8703
|
-
attributes: {
|
|
8704
|
-
/**
|
|
8705
|
-
* Tags
|
|
8706
|
-
*/
|
|
8707
|
-
tags: string[];
|
|
8708
|
-
};
|
|
8709
|
-
};
|
|
8710
|
-
};
|
|
8711
|
-
|
|
8712
|
-
/**
|
|
8713
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8714
|
-
* via the `batch_add_tags.targetSchema` link.
|
|
8715
|
-
*/
|
|
8716
|
-
export type UploadBatchAddTagsTargetSchema = {
|
|
8717
|
-
data: Job;
|
|
8718
|
-
};
|
|
8719
|
-
|
|
8720
|
-
/**
|
|
8721
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8722
|
-
* via the `batch_add_tags.jobSchema` link.
|
|
8723
|
-
*/
|
|
8724
|
-
export type UploadBatchAddTagsJobSchema = {
|
|
8725
|
-
data: unknown[];
|
|
8726
|
-
meta: {
|
|
8727
|
-
successful: number;
|
|
8728
|
-
failed: number;
|
|
8729
|
-
};
|
|
8730
|
-
};
|
|
8731
|
-
|
|
8732
|
-
/**
|
|
8733
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8734
|
-
* via the `batch_destroy.targetSchema` link.
|
|
8735
|
-
*/
|
|
8736
|
-
export type UploadBatchDestroyTargetSchema = {
|
|
8737
|
-
data: Job;
|
|
8738
|
-
};
|
|
8739
|
-
|
|
8740
|
-
/**
|
|
8741
|
-
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8742
|
-
* via the `batch_destroy.jobSchema` link.
|
|
8743
|
-
*/
|
|
8744
|
-
export type UploadBatchDestroyJobSchema = {
|
|
8745
|
-
data: unknown[];
|
|
8746
|
-
meta: {
|
|
8747
|
-
successful: number;
|
|
8748
|
-
failed: number;
|
|
8749
|
-
};
|
|
8750
|
-
};
|
|
8751
|
-
|
|
8752
8685
|
/**
|
|
8753
8686
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
8754
8687
|
* via the `references.targetSchema` link.
|
|
@@ -8887,7 +8820,7 @@ export type UploadBulkDestroyJobSchema = {
|
|
|
8887
8820
|
};
|
|
8888
8821
|
|
|
8889
8822
|
/**
|
|
8890
|
-
* To upload a file
|
|
8823
|
+
* To upload a file with the Content Management API, first you need to obtain an upload permission. The `upload_request` entity contains the S3-like URL where you will be able to upload the file with a raw/binary PUT request.
|
|
8891
8824
|
*
|
|
8892
8825
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8893
8826
|
* via the `definition` "upload_request".
|
|
@@ -8906,7 +8839,7 @@ export type UploadRequest = {
|
|
|
8906
8839
|
*/
|
|
8907
8840
|
export type UploadRequestAttributes = {
|
|
8908
8841
|
/**
|
|
8909
|
-
* The URL to use to upload the file with a
|
|
8842
|
+
* The URL to use to upload the file with a raw/binary PUT request
|
|
8910
8843
|
*/
|
|
8911
8844
|
url: string;
|
|
8912
8845
|
/**
|