@datocms/cma-client 5.0.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/resources/UploadRequest.js +2 -2
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +3 -3
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +4 -4
- 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 +3 -3
- package/dist/types/generated/SimpleSchemaTypes.d.ts +4 -4
- package/dist/types/generated/resources/UploadRequest.d.ts +2 -2
- package/package.json +2 -2
- package/resources.json +1 -1
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +3 -3
- package/src/generated/SimpleSchemaTypes.ts +4 -4
- package/src/generated/resources/UploadRequest.ts +2 -2
|
@@ -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 v5.0.
|
|
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.1', 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
|
|
@@ -49,7 +49,7 @@ var UploadRequest = /** @class */ (function (_super) {
|
|
|
49
49
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Request a new upload
|
|
52
|
+
* Request a new permission to upload a file
|
|
53
53
|
*
|
|
54
54
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
55
55
|
*
|
|
@@ -66,7 +66,7 @@ var UploadRequest = /** @class */ (function (_super) {
|
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* Request a new upload
|
|
69
|
+
* Request a new permission to upload a file
|
|
70
70
|
*
|
|
71
71
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
72
72
|
*
|
|
@@ -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 v5.0.
|
|
108
|
+
return request(__assign(__assign(__assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.0.1', 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
|
|
@@ -7600,7 +7600,7 @@ export type ItemBulkMoveToStageJobSchema = {
|
|
|
7600
7600
|
};
|
|
7601
7601
|
};
|
|
7602
7602
|
/**
|
|
7603
|
-
*
|
|
7603
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7604
7604
|
*
|
|
7605
7605
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7606
7606
|
* via the `definition` "upload".
|
|
@@ -8158,7 +8158,7 @@ export type UploadBulkDestroyJobSchema = {
|
|
|
8158
8158
|
};
|
|
8159
8159
|
};
|
|
8160
8160
|
/**
|
|
8161
|
-
* 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.
|
|
8162
8162
|
*
|
|
8163
8163
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8164
8164
|
* via the `definition` "upload_request".
|
|
@@ -8176,7 +8176,7 @@ export type UploadRequest = {
|
|
|
8176
8176
|
*/
|
|
8177
8177
|
export type UploadRequestAttributes = {
|
|
8178
8178
|
/**
|
|
8179
|
-
* 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
|
|
8180
8180
|
*/
|
|
8181
8181
|
url: string;
|
|
8182
8182
|
/**
|
|
@@ -7279,7 +7279,7 @@ export type ItemVersionRelationships = {
|
|
|
7279
7279
|
editor: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
|
|
7280
7280
|
};
|
|
7281
7281
|
/**
|
|
7282
|
-
*
|
|
7282
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7283
7283
|
*
|
|
7284
7284
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7285
7285
|
* via the `definition` "upload".
|
|
@@ -7813,7 +7813,7 @@ export type UploadBulkDestroySchema = {
|
|
|
7813
7813
|
uploads: UploadData[];
|
|
7814
7814
|
};
|
|
7815
7815
|
/**
|
|
7816
|
-
* 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.
|
|
7817
7817
|
*
|
|
7818
7818
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7819
7819
|
* via the `definition` "upload_request".
|
|
@@ -7822,7 +7822,7 @@ export type UploadRequest = {
|
|
|
7822
7822
|
id: UploadRequestIdentity;
|
|
7823
7823
|
type: UploadRequestType;
|
|
7824
7824
|
/**
|
|
7825
|
-
* 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
|
|
7826
7826
|
*/
|
|
7827
7827
|
url: string;
|
|
7828
7828
|
/**
|
|
@@ -7841,7 +7841,7 @@ export type UploadRequestCreateTargetSchema = UploadRequest;
|
|
|
7841
7841
|
*/
|
|
7842
7842
|
export type UploadRequestAttributes = {
|
|
7843
7843
|
/**
|
|
7844
|
-
* 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
|
|
7845
7845
|
*/
|
|
7846
7846
|
url: string;
|
|
7847
7847
|
/**
|
|
@@ -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
|
*
|
|
@@ -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
|
*
|
|
@@ -7600,7 +7600,7 @@ export type ItemBulkMoveToStageJobSchema = {
|
|
|
7600
7600
|
};
|
|
7601
7601
|
};
|
|
7602
7602
|
/**
|
|
7603
|
-
*
|
|
7603
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7604
7604
|
*
|
|
7605
7605
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7606
7606
|
* via the `definition` "upload".
|
|
@@ -8158,7 +8158,7 @@ export type UploadBulkDestroyJobSchema = {
|
|
|
8158
8158
|
};
|
|
8159
8159
|
};
|
|
8160
8160
|
/**
|
|
8161
|
-
* 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.
|
|
8162
8162
|
*
|
|
8163
8163
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8164
8164
|
* via the `definition` "upload_request".
|
|
@@ -8176,7 +8176,7 @@ export type UploadRequest = {
|
|
|
8176
8176
|
*/
|
|
8177
8177
|
export type UploadRequestAttributes = {
|
|
8178
8178
|
/**
|
|
8179
|
-
* 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
|
|
8180
8180
|
*/
|
|
8181
8181
|
url: string;
|
|
8182
8182
|
/**
|
|
@@ -7279,7 +7279,7 @@ export type ItemVersionRelationships = {
|
|
|
7279
7279
|
editor: AccountData | AccessTokenData | UserData | SsoUserData | OrganizationData;
|
|
7280
7280
|
};
|
|
7281
7281
|
/**
|
|
7282
|
-
*
|
|
7282
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7283
7283
|
*
|
|
7284
7284
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7285
7285
|
* via the `definition` "upload".
|
|
@@ -7813,7 +7813,7 @@ export type UploadBulkDestroySchema = {
|
|
|
7813
7813
|
uploads: UploadData[];
|
|
7814
7814
|
};
|
|
7815
7815
|
/**
|
|
7816
|
-
* 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.
|
|
7817
7817
|
*
|
|
7818
7818
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7819
7819
|
* via the `definition` "upload_request".
|
|
@@ -7822,7 +7822,7 @@ export type UploadRequest = {
|
|
|
7822
7822
|
id: UploadRequestIdentity;
|
|
7823
7823
|
type: UploadRequestType;
|
|
7824
7824
|
/**
|
|
7825
|
-
* 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
|
|
7826
7826
|
*/
|
|
7827
7827
|
url: string;
|
|
7828
7828
|
/**
|
|
@@ -7841,7 +7841,7 @@ export type UploadRequestCreateTargetSchema = UploadRequest;
|
|
|
7841
7841
|
*/
|
|
7842
7842
|
export type UploadRequestAttributes = {
|
|
7843
7843
|
/**
|
|
7844
|
-
* 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
|
|
7845
7845
|
*/
|
|
7846
7846
|
url: string;
|
|
7847
7847
|
/**
|
|
@@ -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",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
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
|
@@ -2700,7 +2700,7 @@
|
|
|
2700
2700
|
"rel": "create",
|
|
2701
2701
|
"urlTemplate": "/upload-requests",
|
|
2702
2702
|
"method": "POST",
|
|
2703
|
-
"comment": "Request a new upload",
|
|
2703
|
+
"comment": "Request a new permission to upload a file",
|
|
2704
2704
|
"urlPlaceholders": [],
|
|
2705
2705
|
"requestBodyType": "UploadRequestCreateSchema",
|
|
2706
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: {
|
|
@@ -8229,7 +8229,7 @@ export type ItemBulkMoveToStageJobSchema = {
|
|
|
8229
8229
|
};
|
|
8230
8230
|
|
|
8231
8231
|
/**
|
|
8232
|
-
*
|
|
8232
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
8233
8233
|
*
|
|
8234
8234
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8235
8235
|
* via the `definition` "upload".
|
|
@@ -8820,7 +8820,7 @@ export type UploadBulkDestroyJobSchema = {
|
|
|
8820
8820
|
};
|
|
8821
8821
|
|
|
8822
8822
|
/**
|
|
8823
|
-
* 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.
|
|
8824
8824
|
*
|
|
8825
8825
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8826
8826
|
* via the `definition` "upload_request".
|
|
@@ -8839,7 +8839,7 @@ export type UploadRequest = {
|
|
|
8839
8839
|
*/
|
|
8840
8840
|
export type UploadRequestAttributes = {
|
|
8841
8841
|
/**
|
|
8842
|
-
* 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
|
|
8843
8843
|
*/
|
|
8844
8844
|
url: string;
|
|
8845
8845
|
/**
|
|
@@ -7882,7 +7882,7 @@ export type ItemVersionRelationships = {
|
|
|
7882
7882
|
};
|
|
7883
7883
|
|
|
7884
7884
|
/**
|
|
7885
|
-
*
|
|
7885
|
+
* Each media object you upload to the Media Area of your DatoCMS project is represented as an `upload` entity.
|
|
7886
7886
|
*
|
|
7887
7887
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7888
7888
|
* via the `definition` "upload".
|
|
@@ -8439,7 +8439,7 @@ export type UploadBulkDestroySchema = {
|
|
|
8439
8439
|
};
|
|
8440
8440
|
|
|
8441
8441
|
/**
|
|
8442
|
-
* To upload a file
|
|
8442
|
+
* 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.
|
|
8443
8443
|
*
|
|
8444
8444
|
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
8445
8445
|
* via the `definition` "upload_request".
|
|
@@ -8448,7 +8448,7 @@ export type UploadRequest = {
|
|
|
8448
8448
|
id: UploadRequestIdentity;
|
|
8449
8449
|
type: UploadRequestType;
|
|
8450
8450
|
/**
|
|
8451
|
-
* The URL to use to upload the file with a
|
|
8451
|
+
* The URL to use to upload the file with a raw/binary PUT request
|
|
8452
8452
|
*/
|
|
8453
8453
|
url: string;
|
|
8454
8454
|
/**
|
|
@@ -8467,7 +8467,7 @@ export type UploadRequestCreateTargetSchema = UploadRequest;
|
|
|
8467
8467
|
*/
|
|
8468
8468
|
export type UploadRequestAttributes = {
|
|
8469
8469
|
/**
|
|
8470
|
-
* The URL to use to upload the file with a
|
|
8470
|
+
* The URL to use to upload the file with a raw/binary PUT request
|
|
8471
8471
|
*/
|
|
8472
8472
|
url: string;
|
|
8473
8473
|
/**
|
|
@@ -7,7 +7,7 @@ export default class UploadRequest extends BaseResource {
|
|
|
7
7
|
static readonly TYPE = 'upload_request' as const;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Request a new upload
|
|
10
|
+
* Request a new permission to upload a file
|
|
11
11
|
*
|
|
12
12
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
13
13
|
*
|
|
@@ -29,7 +29,7 @@ export default class UploadRequest extends BaseResource {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Request a new upload
|
|
32
|
+
* Request a new permission to upload a file
|
|
33
33
|
*
|
|
34
34
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-request/create
|
|
35
35
|
*
|