@datocms/cma-client 3.3.0 → 3.3.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 +2 -1
- package/dist/cjs/generated/Client.js.map +1 -1
- package/dist/cjs/generated/resources/UploadTrack.js +183 -0
- package/dist/cjs/generated/resources/UploadTrack.js.map +1 -0
- package/dist/cjs/generated/resources/index.js +3 -1
- package/dist/cjs/generated/resources/index.js.map +1 -1
- package/dist/esm/generated/Client.d.ts +1 -0
- package/dist/esm/generated/Client.js +2 -1
- package/dist/esm/generated/Client.js.map +1 -1
- package/dist/esm/generated/SchemaTypes.d.ts +183 -0
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +165 -0
- package/dist/esm/generated/resources/UploadTrack.d.ts +82 -0
- package/dist/esm/generated/resources/UploadTrack.js +155 -0
- package/dist/esm/generated/resources/UploadTrack.js.map +1 -0
- package/dist/esm/generated/resources/index.d.ts +1 -0
- package/dist/esm/generated/resources/index.js +1 -0
- package/dist/esm/generated/resources/index.js.map +1 -1
- package/dist/types/generated/Client.d.ts +1 -0
- package/dist/types/generated/SchemaTypes.d.ts +183 -0
- package/dist/types/generated/SimpleSchemaTypes.d.ts +165 -0
- package/dist/types/generated/resources/UploadTrack.d.ts +82 -0
- package/dist/types/generated/resources/index.d.ts +1 -0
- package/package.json +4 -4
- package/resources.json +955 -153
- package/src/generated/Client.ts +3 -1
- package/src/generated/SchemaTypes.ts +196 -0
- package/src/generated/SimpleSchemaTypes.ts +170 -0
- package/src/generated/resources/UploadTrack.ts +186 -0
- package/src/generated/resources/index.ts +1 -0
|
@@ -1066,6 +1066,26 @@ export type UploadRequestIdentity = string;
|
|
|
1066
1066
|
* via the `definition` "type".
|
|
1067
1067
|
*/
|
|
1068
1068
|
export type UploadRequestType = 'upload_request';
|
|
1069
|
+
/**
|
|
1070
|
+
* ID of the upload track
|
|
1071
|
+
*
|
|
1072
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
1073
|
+
* via the `definition` "identity".
|
|
1074
|
+
*
|
|
1075
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
1076
|
+
* via the `definition` "id".
|
|
1077
|
+
*/
|
|
1078
|
+
export type UploadTrackIdentity = string;
|
|
1079
|
+
/**
|
|
1080
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
1081
|
+
* via the `definition` "type".
|
|
1082
|
+
*/
|
|
1083
|
+
export type UploadTrackType = 'upload_track';
|
|
1084
|
+
/**
|
|
1085
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
1086
|
+
* via the `instances.targetSchema` link.
|
|
1087
|
+
*/
|
|
1088
|
+
export type UploadTrackInstancesTargetSchema = UploadTrack[];
|
|
1069
1089
|
/**
|
|
1070
1090
|
* ID of result
|
|
1071
1091
|
*
|
|
@@ -1653,6 +1673,7 @@ export type DatoApi = {
|
|
|
1653
1673
|
item_version?: ItemVersion;
|
|
1654
1674
|
upload?: Upload;
|
|
1655
1675
|
upload_request?: UploadRequest;
|
|
1676
|
+
upload_track?: UploadTrack;
|
|
1656
1677
|
scheduled_publication?: ScheduledPublication;
|
|
1657
1678
|
scheduled_unpublishing?: ScheduledUnpublishing;
|
|
1658
1679
|
search_result?: SearchResult;
|
|
@@ -4502,6 +4523,15 @@ export type ItemTypeUpdateSchema = {
|
|
|
4502
4523
|
* This interface was referenced by `Upload`'s JSON-Schema
|
|
4503
4524
|
* via the `bulk_destroy.targetSchema` link.
|
|
4504
4525
|
*
|
|
4526
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
4527
|
+
* via the `create.targetSchema` link.
|
|
4528
|
+
*
|
|
4529
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
4530
|
+
* via the `destroy.targetSchema` link.
|
|
4531
|
+
*
|
|
4532
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
4533
|
+
* via the `generate_subtitles.targetSchema` link.
|
|
4534
|
+
*
|
|
4505
4535
|
* This interface was referenced by `Site`'s JSON-Schema
|
|
4506
4536
|
* via the `update.targetSchema` link.
|
|
4507
4537
|
*
|
|
@@ -4537,6 +4567,9 @@ export type UploadBatchAddTagsTargetSchema = Job;
|
|
|
4537
4567
|
export type UploadBatchDestroyTargetSchema = Job;
|
|
4538
4568
|
export type UploadBulkTagTargetSchema = Job;
|
|
4539
4569
|
export type UploadBulkDestroyTargetSchema = Job;
|
|
4570
|
+
export type UploadTrackCreateTargetSchema = Job;
|
|
4571
|
+
export type UploadTrackDestroyTargetSchema = Job;
|
|
4572
|
+
export type UploadTrackGenerateSubtitlesTargetSchema = Job;
|
|
4540
4573
|
export type SiteUpdateTargetSchema = Job;
|
|
4541
4574
|
export type SiteActivateImprovedTimezoneManagementTargetSchema = Job;
|
|
4542
4575
|
/**
|
|
@@ -7504,6 +7537,138 @@ export type UploadRequestCreateSchema = {
|
|
|
7504
7537
|
*/
|
|
7505
7538
|
filename?: string;
|
|
7506
7539
|
};
|
|
7540
|
+
/**
|
|
7541
|
+
* If the asset linked to an Upload entity is a video file, you have the option to include additional audio tracks and subtitle tracks to it.
|
|
7542
|
+
*
|
|
7543
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7544
|
+
* via the `definition` "upload_track".
|
|
7545
|
+
*/
|
|
7546
|
+
export type UploadTrack = {
|
|
7547
|
+
id: UploadTrackIdentity;
|
|
7548
|
+
/**
|
|
7549
|
+
* The type of track (audio or subtitles)
|
|
7550
|
+
*/
|
|
7551
|
+
type: 'subtitles' | 'audio';
|
|
7552
|
+
/**
|
|
7553
|
+
* The human-readable name of the track
|
|
7554
|
+
*/
|
|
7555
|
+
name: string;
|
|
7556
|
+
/**
|
|
7557
|
+
* A valid BCP 47 specification compliant language code
|
|
7558
|
+
*/
|
|
7559
|
+
language_code: string;
|
|
7560
|
+
/**
|
|
7561
|
+
* When status is `errored`, explains the reason for the error
|
|
7562
|
+
*/
|
|
7563
|
+
error: null | string;
|
|
7564
|
+
/**
|
|
7565
|
+
* The status of the asset
|
|
7566
|
+
*/
|
|
7567
|
+
status: 'preparing' | 'ready' | 'errored';
|
|
7568
|
+
/**
|
|
7569
|
+
* Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
|
|
7570
|
+
*/
|
|
7571
|
+
closed_captions: null | boolean;
|
|
7572
|
+
upload: UploadData;
|
|
7573
|
+
};
|
|
7574
|
+
export type UploadTrackCreateJobSchema = UploadTrack;
|
|
7575
|
+
export type UploadTrackDestroyJobSchema = UploadTrack;
|
|
7576
|
+
export type UploadTrackGenerateSubtitlesJobSchema = UploadTrack;
|
|
7577
|
+
/**
|
|
7578
|
+
* JSON API data
|
|
7579
|
+
*
|
|
7580
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
7581
|
+
* via the `definition` "data".
|
|
7582
|
+
*/
|
|
7583
|
+
export type UploadTrackData = {
|
|
7584
|
+
/**
|
|
7585
|
+
* The type of track (audio or subtitles)
|
|
7586
|
+
*/
|
|
7587
|
+
type: 'subtitles' | 'audio';
|
|
7588
|
+
id: UploadTrackIdentity;
|
|
7589
|
+
};
|
|
7590
|
+
/**
|
|
7591
|
+
* JSON API attributes
|
|
7592
|
+
*
|
|
7593
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
7594
|
+
* via the `definition` "attributes".
|
|
7595
|
+
*/
|
|
7596
|
+
export type UploadTrackAttributes = {
|
|
7597
|
+
/**
|
|
7598
|
+
* The type of track (audio or subtitles)
|
|
7599
|
+
*/
|
|
7600
|
+
type: 'subtitles' | 'audio';
|
|
7601
|
+
/**
|
|
7602
|
+
* The human-readable name of the track
|
|
7603
|
+
*/
|
|
7604
|
+
name: string;
|
|
7605
|
+
/**
|
|
7606
|
+
* A valid BCP 47 specification compliant language code
|
|
7607
|
+
*/
|
|
7608
|
+
language_code: string;
|
|
7609
|
+
/**
|
|
7610
|
+
* When status is `errored`, explains the reason for the error
|
|
7611
|
+
*/
|
|
7612
|
+
error: null | string;
|
|
7613
|
+
/**
|
|
7614
|
+
* The status of the asset
|
|
7615
|
+
*/
|
|
7616
|
+
status: 'preparing' | 'ready' | 'errored';
|
|
7617
|
+
/**
|
|
7618
|
+
* Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
|
|
7619
|
+
*/
|
|
7620
|
+
closed_captions: null | boolean;
|
|
7621
|
+
};
|
|
7622
|
+
/**
|
|
7623
|
+
* JSON API links
|
|
7624
|
+
*
|
|
7625
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
7626
|
+
* via the `definition` "relationships".
|
|
7627
|
+
*/
|
|
7628
|
+
export type UploadTrackRelationships = {
|
|
7629
|
+
upload: UploadData;
|
|
7630
|
+
};
|
|
7631
|
+
/**
|
|
7632
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
7633
|
+
* via the `create.schema` link.
|
|
7634
|
+
*/
|
|
7635
|
+
export type UploadTrackCreateSchema = {
|
|
7636
|
+
/**
|
|
7637
|
+
* The type of track (audio or subtitles)
|
|
7638
|
+
*/
|
|
7639
|
+
type: 'subtitles' | 'audio';
|
|
7640
|
+
/**
|
|
7641
|
+
* Either an URL to download, or the ID of an upload request
|
|
7642
|
+
*/
|
|
7643
|
+
url_or_upload_request_id: string;
|
|
7644
|
+
/**
|
|
7645
|
+
* The human-readable name of the track
|
|
7646
|
+
*/
|
|
7647
|
+
name?: string;
|
|
7648
|
+
/**
|
|
7649
|
+
* A valid BCP 47 specification compliant language code
|
|
7650
|
+
*/
|
|
7651
|
+
language_code: string;
|
|
7652
|
+
/**
|
|
7653
|
+
* Indicates if the track provides subtitles for the Deaf or Hard-of-hearing (SDH)
|
|
7654
|
+
*/
|
|
7655
|
+
closed_captions?: null | boolean;
|
|
7656
|
+
};
|
|
7657
|
+
/**
|
|
7658
|
+
* This interface was referenced by `UploadTrack`'s JSON-Schema
|
|
7659
|
+
* via the `generate_subtitles.schema` link.
|
|
7660
|
+
*/
|
|
7661
|
+
export type UploadTrackGenerateSubtitlesSchema = {
|
|
7662
|
+
type?: UploadTrackType;
|
|
7663
|
+
/**
|
|
7664
|
+
* The human-readable name of the track
|
|
7665
|
+
*/
|
|
7666
|
+
name?: string;
|
|
7667
|
+
/**
|
|
7668
|
+
* A valid BCP 47 specification compliant language code
|
|
7669
|
+
*/
|
|
7670
|
+
language_code: string;
|
|
7671
|
+
};
|
|
7507
7672
|
/**
|
|
7508
7673
|
* You can create scheduled publication to publish records in the future
|
|
7509
7674
|
*
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import BaseResource from '../../BaseResource';
|
|
2
|
+
import type * as SchemaTypes from '../SchemaTypes';
|
|
3
|
+
import type * as SimpleSchemaTypes from '../SimpleSchemaTypes';
|
|
4
|
+
export default class UploadTrack extends BaseResource {
|
|
5
|
+
static readonly TYPE: "upload_track";
|
|
6
|
+
/**
|
|
7
|
+
* Create a new upload track
|
|
8
|
+
*
|
|
9
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/create
|
|
10
|
+
*
|
|
11
|
+
* @throws {ApiError}
|
|
12
|
+
* @throws {TimeoutError}
|
|
13
|
+
*/
|
|
14
|
+
create(uploadId: string | SimpleSchemaTypes.UploadData, body: SimpleSchemaTypes.UploadTrackCreateSchema): Promise<SimpleSchemaTypes.UploadTrack>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new upload track
|
|
17
|
+
*
|
|
18
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/create
|
|
19
|
+
*
|
|
20
|
+
* @throws {ApiError}
|
|
21
|
+
* @throws {TimeoutError}
|
|
22
|
+
*/
|
|
23
|
+
rawCreate(uploadId: string, body: SchemaTypes.UploadTrackCreateSchema): Promise<SchemaTypes.UploadTrackCreateJobSchema>;
|
|
24
|
+
/**
|
|
25
|
+
* List upload tracks
|
|
26
|
+
*
|
|
27
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/instances
|
|
28
|
+
*
|
|
29
|
+
* @throws {ApiError}
|
|
30
|
+
* @throws {TimeoutError}
|
|
31
|
+
*/
|
|
32
|
+
list(uploadId: string | SimpleSchemaTypes.UploadData): Promise<SimpleSchemaTypes.UploadTrackInstancesTargetSchema>;
|
|
33
|
+
/**
|
|
34
|
+
* List upload tracks
|
|
35
|
+
*
|
|
36
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/instances
|
|
37
|
+
*
|
|
38
|
+
* @throws {ApiError}
|
|
39
|
+
* @throws {TimeoutError}
|
|
40
|
+
*/
|
|
41
|
+
rawList(uploadId: string): Promise<SchemaTypes.UploadTrackInstancesTargetSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete an upload track
|
|
44
|
+
*
|
|
45
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/destroy
|
|
46
|
+
*
|
|
47
|
+
* @throws {ApiError}
|
|
48
|
+
* @throws {TimeoutError}
|
|
49
|
+
*/
|
|
50
|
+
destroy(uploadId: string | SimpleSchemaTypes.UploadData, uploadTrackId: string | SimpleSchemaTypes.UploadTrackData): Promise<SimpleSchemaTypes.UploadTrack>;
|
|
51
|
+
/**
|
|
52
|
+
* Delete an upload track
|
|
53
|
+
*
|
|
54
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/destroy
|
|
55
|
+
*
|
|
56
|
+
* @throws {ApiError}
|
|
57
|
+
* @throws {TimeoutError}
|
|
58
|
+
*/
|
|
59
|
+
rawDestroy(uploadId: string, uploadTrackId: string): Promise<SchemaTypes.UploadTrackDestroyJobSchema>;
|
|
60
|
+
/**
|
|
61
|
+
* Automatically generate a subtitles track
|
|
62
|
+
*
|
|
63
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/generate_subtitles
|
|
64
|
+
*
|
|
65
|
+
* @throws {ApiError}
|
|
66
|
+
* @throws {TimeoutError}
|
|
67
|
+
*
|
|
68
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
69
|
+
*/
|
|
70
|
+
generateSubtitles(uploadId: string | SimpleSchemaTypes.UploadData, body: SimpleSchemaTypes.UploadTrackGenerateSubtitlesSchema): Promise<SimpleSchemaTypes.UploadTrack>;
|
|
71
|
+
/**
|
|
72
|
+
* Automatically generate a subtitles track
|
|
73
|
+
*
|
|
74
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/upload-track/generate_subtitles
|
|
75
|
+
*
|
|
76
|
+
* @throws {ApiError}
|
|
77
|
+
* @throws {TimeoutError}
|
|
78
|
+
*
|
|
79
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
80
|
+
*/
|
|
81
|
+
rawGenerateSubtitles(uploadId: string, body: SchemaTypes.UploadTrackGenerateSubtitlesSchema): Promise<SchemaTypes.UploadTrackGenerateSubtitlesJobSchema>;
|
|
82
|
+
}
|
|
@@ -18,6 +18,7 @@ export { default as Item } from './Item';
|
|
|
18
18
|
export { default as ItemVersion } from './ItemVersion';
|
|
19
19
|
export { default as Upload } from './Upload';
|
|
20
20
|
export { default as UploadRequest } from './UploadRequest';
|
|
21
|
+
export { default as UploadTrack } from './UploadTrack';
|
|
21
22
|
export { default as ScheduledPublication } from './ScheduledPublication';
|
|
22
23
|
export { default as ScheduledUnpublishing } from './ScheduledUnpublishing';
|
|
23
24
|
export { default as SearchResult } from './SearchResult';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datocms/cma-client",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "JS client for DatoCMS REST Content Management API",
|
|
5
5
|
"keywords": ["datocms", "client"],
|
|
6
6
|
"author": "Stefano Verna <s.verna@datocms.com>",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"url": "https://github.com/datocms/js-rest-api-clients/issues"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@datocms/rest-client-utils": "^3.3.
|
|
33
|
+
"@datocms/rest-client-utils": "^3.3.1",
|
|
34
34
|
"uuid": "^9.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@datocms/dashboard-client": "^3.3.
|
|
37
|
+
"@datocms/dashboard-client": "^3.3.1",
|
|
38
38
|
"@types/uuid": "^9.0.7"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "72d7577fe8451175d705bfec742f271351b7de30"
|
|
41
41
|
}
|