@datocms/cma-client 1.3.4 → 1.3.6-alpha.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/cjs/generated/resources/Item.js +53 -6
- package/dist/cjs/generated/resources/Item.js.map +1 -1
- package/dist/cjs/generated/resources/Plugin.js +2 -2
- package/dist/cjs/generated/resources/ScheduledPublication.js +1 -1
- package/dist/cjs/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/cjs/generated/resources/ScheduledUnpublishing.js +1 -1
- package/dist/cjs/generated/resources/ScheduledUnpublishing.js.map +1 -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 +600 -422
- package/dist/esm/generated/SimpleSchemaTypes.d.ts +248 -83
- package/dist/esm/generated/resources/Item.d.ts +26 -4
- package/dist/esm/generated/resources/Item.js +53 -6
- package/dist/esm/generated/resources/Item.js.map +1 -1
- package/dist/esm/generated/resources/Plugin.d.ts +2 -2
- package/dist/esm/generated/resources/Plugin.js +2 -2
- package/dist/esm/generated/resources/ScheduledPublication.js +1 -1
- package/dist/esm/generated/resources/ScheduledPublication.js.map +1 -1
- package/dist/esm/generated/resources/ScheduledUnpublishing.js +1 -1
- package/dist/esm/generated/resources/ScheduledUnpublishing.js.map +1 -1
- package/dist/types/generated/SchemaTypes.d.ts +600 -422
- package/dist/types/generated/SimpleSchemaTypes.d.ts +248 -83
- package/dist/types/generated/resources/Item.d.ts +26 -4
- package/dist/types/generated/resources/Plugin.d.ts +2 -2
- package/package.json +3 -3
- package/resources.json +204 -3
- package/src/generated/Client.ts +1 -1
- package/src/generated/SchemaTypes.ts +626 -443
- package/src/generated/SimpleSchemaTypes.ts +255 -86
- package/src/generated/resources/Item.ts +69 -2
- package/src/generated/resources/Plugin.ts +2 -2
- package/src/generated/resources/ScheduledPublication.ts +1 -1
- package/src/generated/resources/ScheduledUnpublishing.ts +1 -1
|
@@ -717,6 +717,74 @@ export type ItemSelfHrefSchema = {
|
|
|
717
717
|
version?: string;
|
|
718
718
|
[k: string]: unknown;
|
|
719
719
|
};
|
|
720
|
+
/**
|
|
721
|
+
* ID of record
|
|
722
|
+
*
|
|
723
|
+
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
724
|
+
* via the `definition` "identity".
|
|
725
|
+
*
|
|
726
|
+
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
727
|
+
* via the `definition` "id".
|
|
728
|
+
*/
|
|
729
|
+
export type ItemCurrentVsPublishedStateIdentity = string;
|
|
730
|
+
/**
|
|
731
|
+
* JSON API type field
|
|
732
|
+
*
|
|
733
|
+
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
734
|
+
* via the `definition` "type".
|
|
735
|
+
*/
|
|
736
|
+
export type ItemCurrentVsPublishedStateType = 'item_current_vs_published_state';
|
|
737
|
+
/**
|
|
738
|
+
* JSON API type field
|
|
739
|
+
*
|
|
740
|
+
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
741
|
+
* via the `definition` "type".
|
|
742
|
+
*/
|
|
743
|
+
export type ScheduledPublicationType = 'scheduled_publication';
|
|
744
|
+
/**
|
|
745
|
+
* ID of scheduled_publication
|
|
746
|
+
*
|
|
747
|
+
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
748
|
+
* via the `definition` "identity".
|
|
749
|
+
*
|
|
750
|
+
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
751
|
+
* via the `definition` "id".
|
|
752
|
+
*/
|
|
753
|
+
export type ScheduledPublicationIdentity = string;
|
|
754
|
+
/**
|
|
755
|
+
* JSON API type field
|
|
756
|
+
*
|
|
757
|
+
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
758
|
+
* via the `definition` "type".
|
|
759
|
+
*/
|
|
760
|
+
export type ScheduledUnpublishingType = 'scheduled_unpublishing';
|
|
761
|
+
/**
|
|
762
|
+
* ID of scheduled_unpublishing
|
|
763
|
+
*
|
|
764
|
+
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
765
|
+
* via the `definition` "identity".
|
|
766
|
+
*
|
|
767
|
+
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
768
|
+
* via the `definition` "id".
|
|
769
|
+
*/
|
|
770
|
+
export type ScheduledUnpublishingIdentity = string;
|
|
771
|
+
/**
|
|
772
|
+
* JSON API type field
|
|
773
|
+
*
|
|
774
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
775
|
+
* via the `definition` "type".
|
|
776
|
+
*/
|
|
777
|
+
export type ItemVersionType = 'item_version';
|
|
778
|
+
/**
|
|
779
|
+
* ID of record version
|
|
780
|
+
*
|
|
781
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
782
|
+
* via the `definition` "identity".
|
|
783
|
+
*
|
|
784
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
785
|
+
* via the `definition` "id".
|
|
786
|
+
*/
|
|
787
|
+
export type ItemVersionIdentity = string;
|
|
720
788
|
/**
|
|
721
789
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
722
790
|
* via the `batch_destroy.jobSchema` link.
|
|
@@ -762,6 +830,24 @@ export type ItemBatchUnpublishHrefSchema = {
|
|
|
762
830
|
*/
|
|
763
831
|
'filter[ids]': string;
|
|
764
832
|
};
|
|
833
|
+
/**
|
|
834
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
835
|
+
* via the `publish.schema` link.
|
|
836
|
+
*/
|
|
837
|
+
export type ItemPublishSchema = {
|
|
838
|
+
/**
|
|
839
|
+
* JSON API type field
|
|
840
|
+
*/
|
|
841
|
+
type?: 'selective_publish_operation';
|
|
842
|
+
/**
|
|
843
|
+
* List of locales whose content will be published
|
|
844
|
+
*/
|
|
845
|
+
content_in_locales: string[];
|
|
846
|
+
/**
|
|
847
|
+
* Whether non-localized content has to be published or not
|
|
848
|
+
*/
|
|
849
|
+
non_localized_content: boolean;
|
|
850
|
+
} | null;
|
|
765
851
|
/**
|
|
766
852
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
767
853
|
* via the `publish.hrefSchema` link.
|
|
@@ -773,6 +859,20 @@ export type ItemPublishHrefSchema = {
|
|
|
773
859
|
recursive?: boolean;
|
|
774
860
|
[k: string]: unknown;
|
|
775
861
|
};
|
|
862
|
+
/**
|
|
863
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
864
|
+
* via the `unpublish.schema` link.
|
|
865
|
+
*/
|
|
866
|
+
export type ItemUnpublishSchema = {
|
|
867
|
+
/**
|
|
868
|
+
* JSON API type field
|
|
869
|
+
*/
|
|
870
|
+
type?: 'selective_unpublish_operation';
|
|
871
|
+
/**
|
|
872
|
+
* List of locales whose content will be unpublished
|
|
873
|
+
*/
|
|
874
|
+
content_in_locales: string[];
|
|
875
|
+
} | null;
|
|
776
876
|
/**
|
|
777
877
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
778
878
|
* via the `unpublish.hrefSchema` link.
|
|
@@ -804,23 +904,6 @@ export type ItemBulkDestroyJobSchema = unknown[];
|
|
|
804
904
|
* via the `bulk_move_to_stage.jobSchema` link.
|
|
805
905
|
*/
|
|
806
906
|
export type ItemBulkMoveToStageJobSchema = unknown[];
|
|
807
|
-
/**
|
|
808
|
-
* ID of record version
|
|
809
|
-
*
|
|
810
|
-
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
811
|
-
* via the `definition` "identity".
|
|
812
|
-
*
|
|
813
|
-
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
814
|
-
* via the `definition` "id".
|
|
815
|
-
*/
|
|
816
|
-
export type ItemVersionIdentity = string;
|
|
817
|
-
/**
|
|
818
|
-
* JSON API type field
|
|
819
|
-
*
|
|
820
|
-
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
821
|
-
* via the `definition` "type".
|
|
822
|
-
*/
|
|
823
|
-
export type ItemVersionType = 'item_version';
|
|
824
907
|
/**
|
|
825
908
|
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
826
909
|
* via the `restore.jobSchema` link.
|
|
@@ -1006,40 +1089,6 @@ export type UploadRequestIdentity = string;
|
|
|
1006
1089
|
* via the `definition` "type".
|
|
1007
1090
|
*/
|
|
1008
1091
|
export type UploadRequestType = 'upload_request';
|
|
1009
|
-
/**
|
|
1010
|
-
* ID of scheduled_publication
|
|
1011
|
-
*
|
|
1012
|
-
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
1013
|
-
* via the `definition` "identity".
|
|
1014
|
-
*
|
|
1015
|
-
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
1016
|
-
* via the `definition` "id".
|
|
1017
|
-
*/
|
|
1018
|
-
export type ScheduledPublicationIdentity = string;
|
|
1019
|
-
/**
|
|
1020
|
-
* JSON API type field
|
|
1021
|
-
*
|
|
1022
|
-
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
1023
|
-
* via the `definition` "type".
|
|
1024
|
-
*/
|
|
1025
|
-
export type ScheduledPublicationType = 'scheduled_publication';
|
|
1026
|
-
/**
|
|
1027
|
-
* ID of scheduled_unpublishing
|
|
1028
|
-
*
|
|
1029
|
-
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
1030
|
-
* via the `definition` "identity".
|
|
1031
|
-
*
|
|
1032
|
-
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
1033
|
-
* via the `definition` "id".
|
|
1034
|
-
*/
|
|
1035
|
-
export type ScheduledUnpublishingIdentity = string;
|
|
1036
|
-
/**
|
|
1037
|
-
* JSON API type field
|
|
1038
|
-
*
|
|
1039
|
-
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
1040
|
-
* via the `definition` "type".
|
|
1041
|
-
*/
|
|
1042
|
-
export type ScheduledUnpublishingType = 'scheduled_unpublishing';
|
|
1043
1092
|
/**
|
|
1044
1093
|
* ID of result
|
|
1045
1094
|
*
|
|
@@ -1660,6 +1709,7 @@ export type DatoApi = {
|
|
|
1660
1709
|
subscription_feature?: SubscriptionFeature;
|
|
1661
1710
|
build_event?: BuildEvent;
|
|
1662
1711
|
item?: Item;
|
|
1712
|
+
item_current_vs_published_state?: ItemCurrentVsPublishedState;
|
|
1663
1713
|
item_version?: ItemVersion;
|
|
1664
1714
|
upload?: Upload;
|
|
1665
1715
|
upload_request?: UploadRequest;
|
|
@@ -7007,6 +7057,101 @@ export type ItemUpdateSchema = {
|
|
|
7007
7057
|
[k: string]: unknown;
|
|
7008
7058
|
};
|
|
7009
7059
|
|
|
7060
|
+
/**
|
|
7061
|
+
* Information about the record
|
|
7062
|
+
*
|
|
7063
|
+
* This interface was referenced by `Item`'s JSON-Schema
|
|
7064
|
+
* via the `current_vs_published_state.targetSchema` link.
|
|
7065
|
+
*
|
|
7066
|
+
* This interface was referenced by `DatoApi`'s JSON-Schema
|
|
7067
|
+
* via the `definition` "item_current_vs_published_state".
|
|
7068
|
+
*/
|
|
7069
|
+
export type ItemCurrentVsPublishedState = {
|
|
7070
|
+
id: ItemCurrentVsPublishedStateIdentity;
|
|
7071
|
+
type: ItemCurrentVsPublishedStateType;
|
|
7072
|
+
current_version_locales: string[];
|
|
7073
|
+
published_version_locales: string[];
|
|
7074
|
+
changed_locales: string[];
|
|
7075
|
+
added_locales: string[];
|
|
7076
|
+
removed_locales: string[];
|
|
7077
|
+
non_localized_fields_changed: boolean;
|
|
7078
|
+
scheduled_publication: ScheduledPublicationData | null;
|
|
7079
|
+
scheduled_unpublishing: ScheduledUnpublishingData | null;
|
|
7080
|
+
published_version: ItemVersionData | null;
|
|
7081
|
+
};
|
|
7082
|
+
export type ItemCurrentVsPublishedStateTargetSchema =
|
|
7083
|
+
ItemCurrentVsPublishedState;
|
|
7084
|
+
/**
|
|
7085
|
+
* JSON API data
|
|
7086
|
+
*
|
|
7087
|
+
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
7088
|
+
* via the `definition` "data".
|
|
7089
|
+
*/
|
|
7090
|
+
export type ScheduledPublicationData = {
|
|
7091
|
+
type: ScheduledPublicationType;
|
|
7092
|
+
id: ScheduledPublicationIdentity;
|
|
7093
|
+
};
|
|
7094
|
+
|
|
7095
|
+
/**
|
|
7096
|
+
* JSON API data
|
|
7097
|
+
*
|
|
7098
|
+
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
7099
|
+
* via the `definition` "data".
|
|
7100
|
+
*/
|
|
7101
|
+
export type ScheduledUnpublishingData = {
|
|
7102
|
+
type: ScheduledUnpublishingType;
|
|
7103
|
+
id: ScheduledUnpublishingIdentity;
|
|
7104
|
+
};
|
|
7105
|
+
|
|
7106
|
+
/**
|
|
7107
|
+
* JSON API data
|
|
7108
|
+
*
|
|
7109
|
+
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
7110
|
+
* via the `definition` "data".
|
|
7111
|
+
*/
|
|
7112
|
+
export type ItemVersionData = {
|
|
7113
|
+
type: ItemVersionType;
|
|
7114
|
+
id: ItemVersionIdentity;
|
|
7115
|
+
};
|
|
7116
|
+
|
|
7117
|
+
/**
|
|
7118
|
+
* JSON API data
|
|
7119
|
+
*
|
|
7120
|
+
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
7121
|
+
* via the `definition` "data".
|
|
7122
|
+
*/
|
|
7123
|
+
export type ItemCurrentVsPublishedStateData = {
|
|
7124
|
+
type: ItemCurrentVsPublishedStateType;
|
|
7125
|
+
id: ItemCurrentVsPublishedStateIdentity;
|
|
7126
|
+
};
|
|
7127
|
+
|
|
7128
|
+
/**
|
|
7129
|
+
* The JSON data associated to the record
|
|
7130
|
+
*
|
|
7131
|
+
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
7132
|
+
* via the `definition` "attributes".
|
|
7133
|
+
*/
|
|
7134
|
+
export type ItemCurrentVsPublishedStateAttributes = {
|
|
7135
|
+
current_version_locales: string[];
|
|
7136
|
+
published_version_locales: string[];
|
|
7137
|
+
changed_locales: string[];
|
|
7138
|
+
added_locales: string[];
|
|
7139
|
+
removed_locales: string[];
|
|
7140
|
+
non_localized_fields_changed: boolean;
|
|
7141
|
+
};
|
|
7142
|
+
|
|
7143
|
+
/**
|
|
7144
|
+
* JSON API links
|
|
7145
|
+
*
|
|
7146
|
+
* This interface was referenced by `ItemCurrentVsPublishedState`'s JSON-Schema
|
|
7147
|
+
* via the `definition` "relationships".
|
|
7148
|
+
*/
|
|
7149
|
+
export type ItemCurrentVsPublishedStateRelationships = {
|
|
7150
|
+
scheduled_publication: ScheduledPublicationData | null;
|
|
7151
|
+
scheduled_unpublishing: ScheduledUnpublishingData | null;
|
|
7152
|
+
published_version: ItemVersionData | null;
|
|
7153
|
+
};
|
|
7154
|
+
|
|
7010
7155
|
/**
|
|
7011
7156
|
* This interface was referenced by `Item`'s JSON-Schema
|
|
7012
7157
|
* via the `bulk_publish.schema` link.
|
|
@@ -7112,17 +7257,6 @@ export type ItemVersionMeta = {
|
|
|
7112
7257
|
is_current: boolean;
|
|
7113
7258
|
};
|
|
7114
7259
|
|
|
7115
|
-
/**
|
|
7116
|
-
* JSON API data
|
|
7117
|
-
*
|
|
7118
|
-
* This interface was referenced by `ItemVersion`'s JSON-Schema
|
|
7119
|
-
* via the `definition` "data".
|
|
7120
|
-
*/
|
|
7121
|
-
export type ItemVersionData = {
|
|
7122
|
-
type: ItemVersionType;
|
|
7123
|
-
id: ItemVersionIdentity;
|
|
7124
|
-
};
|
|
7125
|
-
|
|
7126
7260
|
/**
|
|
7127
7261
|
* The JSON data associated to the record version
|
|
7128
7262
|
*
|
|
@@ -7765,20 +7899,22 @@ export type ScheduledPublication = {
|
|
|
7765
7899
|
* The future date for the publication
|
|
7766
7900
|
*/
|
|
7767
7901
|
publication_scheduled_at: string;
|
|
7902
|
+
/**
|
|
7903
|
+
* Specifies which content should be published. If null, the whole record will be published.
|
|
7904
|
+
*/
|
|
7905
|
+
selective_publication: null | {
|
|
7906
|
+
/**
|
|
7907
|
+
* List of locales whose content will be published
|
|
7908
|
+
*/
|
|
7909
|
+
content_in_locales: string[];
|
|
7910
|
+
/**
|
|
7911
|
+
* Whether the non-localized content has to be published or not
|
|
7912
|
+
*/
|
|
7913
|
+
non_localized_content: boolean;
|
|
7914
|
+
};
|
|
7768
7915
|
item: ItemData;
|
|
7769
7916
|
};
|
|
7770
7917
|
export type ScheduledPublicationCreateTargetSchema = ScheduledPublication;
|
|
7771
|
-
/**
|
|
7772
|
-
* JSON API data
|
|
7773
|
-
*
|
|
7774
|
-
* This interface was referenced by `ScheduledPublication`'s JSON-Schema
|
|
7775
|
-
* via the `definition` "data".
|
|
7776
|
-
*/
|
|
7777
|
-
export type ScheduledPublicationData = {
|
|
7778
|
-
type: ScheduledPublicationType;
|
|
7779
|
-
id: ScheduledPublicationIdentity;
|
|
7780
|
-
};
|
|
7781
|
-
|
|
7782
7918
|
/**
|
|
7783
7919
|
* JSON API attributes
|
|
7784
7920
|
*
|
|
@@ -7790,6 +7926,19 @@ export type ScheduledPublicationAttributes = {
|
|
|
7790
7926
|
* The future date for the publication
|
|
7791
7927
|
*/
|
|
7792
7928
|
publication_scheduled_at: string;
|
|
7929
|
+
/**
|
|
7930
|
+
* Specifies which content should be published. If null, the whole record will be published.
|
|
7931
|
+
*/
|
|
7932
|
+
selective_publication: null | {
|
|
7933
|
+
/**
|
|
7934
|
+
* List of locales whose content will be published
|
|
7935
|
+
*/
|
|
7936
|
+
content_in_locales: string[];
|
|
7937
|
+
/**
|
|
7938
|
+
* Whether the non-localized content has to be published or not
|
|
7939
|
+
*/
|
|
7940
|
+
non_localized_content: boolean;
|
|
7941
|
+
};
|
|
7793
7942
|
};
|
|
7794
7943
|
|
|
7795
7944
|
/**
|
|
@@ -7808,7 +7957,23 @@ export type ScheduledPublicationRelationships = {
|
|
|
7808
7957
|
*/
|
|
7809
7958
|
export type ScheduledPublicationCreateSchema = {
|
|
7810
7959
|
type?: ScheduledPublicationType;
|
|
7811
|
-
|
|
7960
|
+
/**
|
|
7961
|
+
* The future date for the publication
|
|
7962
|
+
*/
|
|
7963
|
+
publication_scheduled_at: string;
|
|
7964
|
+
/**
|
|
7965
|
+
* Specifies which content should be published. If null, the whole record will be published.
|
|
7966
|
+
*/
|
|
7967
|
+
selective_publication?: null | {
|
|
7968
|
+
/**
|
|
7969
|
+
* List of locales whose content will be published
|
|
7970
|
+
*/
|
|
7971
|
+
content_in_locales: string[];
|
|
7972
|
+
/**
|
|
7973
|
+
* Whether the non-localized content has to be published or not
|
|
7974
|
+
*/
|
|
7975
|
+
non_localized_content: boolean;
|
|
7976
|
+
};
|
|
7812
7977
|
};
|
|
7813
7978
|
|
|
7814
7979
|
/**
|
|
@@ -7824,20 +7989,13 @@ export type ScheduledUnpublishing = {
|
|
|
7824
7989
|
* The future date for the unpublishing
|
|
7825
7990
|
*/
|
|
7826
7991
|
unpublishing_scheduled_at: string;
|
|
7992
|
+
/**
|
|
7993
|
+
* List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
|
|
7994
|
+
*/
|
|
7995
|
+
content_in_locales: null | string[];
|
|
7827
7996
|
item: ItemData;
|
|
7828
7997
|
};
|
|
7829
7998
|
export type ScheduledUnpublishingCreateTargetSchema = ScheduledUnpublishing;
|
|
7830
|
-
/**
|
|
7831
|
-
* JSON API data
|
|
7832
|
-
*
|
|
7833
|
-
* This interface was referenced by `ScheduledUnpublishing`'s JSON-Schema
|
|
7834
|
-
* via the `definition` "data".
|
|
7835
|
-
*/
|
|
7836
|
-
export type ScheduledUnpublishingData = {
|
|
7837
|
-
type: ScheduledUnpublishingType;
|
|
7838
|
-
id: ScheduledUnpublishingIdentity;
|
|
7839
|
-
};
|
|
7840
|
-
|
|
7841
7999
|
/**
|
|
7842
8000
|
* JSON API attributes
|
|
7843
8001
|
*
|
|
@@ -7849,6 +8007,10 @@ export type ScheduledUnpublishingAttributes = {
|
|
|
7849
8007
|
* The future date for the unpublishing
|
|
7850
8008
|
*/
|
|
7851
8009
|
unpublishing_scheduled_at: string;
|
|
8010
|
+
/**
|
|
8011
|
+
* List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
|
|
8012
|
+
*/
|
|
8013
|
+
content_in_locales: null | string[];
|
|
7852
8014
|
};
|
|
7853
8015
|
|
|
7854
8016
|
/**
|
|
@@ -7867,7 +8029,14 @@ export type ScheduledUnpublishingRelationships = {
|
|
|
7867
8029
|
*/
|
|
7868
8030
|
export type ScheduledUnpublishingCreateSchema = {
|
|
7869
8031
|
type?: ScheduledUnpublishingType;
|
|
7870
|
-
|
|
8032
|
+
/**
|
|
8033
|
+
* The future date for the unpublishing
|
|
8034
|
+
*/
|
|
8035
|
+
unpublishing_scheduled_at: string;
|
|
8036
|
+
/**
|
|
8037
|
+
* List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
|
|
8038
|
+
*/
|
|
8039
|
+
content_in_locales?: null | string[];
|
|
7871
8040
|
};
|
|
7872
8041
|
|
|
7873
8042
|
/**
|
|
@@ -364,6 +364,45 @@ export default class Item extends BaseResource {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Retrieve information regarding changes between current and published versions of the record
|
|
369
|
+
*
|
|
370
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
|
|
371
|
+
*
|
|
372
|
+
* @throws {ApiError}
|
|
373
|
+
* @throws {TimeoutError}
|
|
374
|
+
*
|
|
375
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
376
|
+
*/
|
|
377
|
+
currentVsPublishedState(itemId: string | SimpleSchemaTypes.ItemData) {
|
|
378
|
+
return this.rawCurrentVsPublishedState(Utils.toId(itemId)).then((body) =>
|
|
379
|
+
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemCurrentVsPublishedStateTargetSchema>(
|
|
380
|
+
body,
|
|
381
|
+
),
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Retrieve information regarding changes between current and published versions of the record
|
|
387
|
+
*
|
|
388
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/item/current_vs_published_state
|
|
389
|
+
*
|
|
390
|
+
* @throws {ApiError}
|
|
391
|
+
* @throws {TimeoutError}
|
|
392
|
+
*
|
|
393
|
+
* @deprecated This API call is to be considered private and might change without notice
|
|
394
|
+
*/
|
|
395
|
+
rawCurrentVsPublishedState(
|
|
396
|
+
itemId: string,
|
|
397
|
+
): Promise<SchemaTypes.ItemCurrentVsPublishedStateTargetSchema> {
|
|
398
|
+
return this.client.request<SchemaTypes.ItemCurrentVsPublishedStateTargetSchema>(
|
|
399
|
+
{
|
|
400
|
+
method: 'GET',
|
|
401
|
+
url: `/items/${itemId}/current-vs-published-state`,
|
|
402
|
+
},
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
|
|
367
406
|
/**
|
|
368
407
|
* Delete a record
|
|
369
408
|
*
|
|
@@ -519,9 +558,21 @@ export default class Item extends BaseResource {
|
|
|
519
558
|
*/
|
|
520
559
|
publish(
|
|
521
560
|
itemId: string | SimpleSchemaTypes.ItemData,
|
|
561
|
+
body?: SimpleSchemaTypes.ItemPublishSchema,
|
|
522
562
|
queryParams?: SimpleSchemaTypes.ItemPublishHrefSchema,
|
|
523
563
|
) {
|
|
524
|
-
return this.rawPublish(
|
|
564
|
+
return this.rawPublish(
|
|
565
|
+
Utils.toId(itemId),
|
|
566
|
+
body
|
|
567
|
+
? Utils.serializeRequestBody<SchemaTypes.ItemPublishSchema>(body, {
|
|
568
|
+
id: Utils.toId(itemId),
|
|
569
|
+
type: 'selective_publish_operation',
|
|
570
|
+
attributes: ['content_in_locales', 'non_localized_content'],
|
|
571
|
+
relationships: [],
|
|
572
|
+
})
|
|
573
|
+
: null,
|
|
574
|
+
queryParams,
|
|
575
|
+
).then((body) =>
|
|
525
576
|
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemPublishTargetSchema>(
|
|
526
577
|
body,
|
|
527
578
|
),
|
|
@@ -538,11 +589,13 @@ export default class Item extends BaseResource {
|
|
|
538
589
|
*/
|
|
539
590
|
rawPublish(
|
|
540
591
|
itemId: string,
|
|
592
|
+
body?: SchemaTypes.ItemPublishSchema,
|
|
541
593
|
queryParams?: SchemaTypes.ItemPublishHrefSchema,
|
|
542
594
|
): Promise<SchemaTypes.ItemPublishTargetSchema> {
|
|
543
595
|
return this.client.request<SchemaTypes.ItemPublishTargetSchema>({
|
|
544
596
|
method: 'PUT',
|
|
545
597
|
url: `/items/${itemId}/publish`,
|
|
598
|
+
body,
|
|
546
599
|
queryParams,
|
|
547
600
|
});
|
|
548
601
|
}
|
|
@@ -557,9 +610,21 @@ export default class Item extends BaseResource {
|
|
|
557
610
|
*/
|
|
558
611
|
unpublish(
|
|
559
612
|
itemId: string | SimpleSchemaTypes.ItemData,
|
|
613
|
+
body?: SimpleSchemaTypes.ItemUnpublishSchema,
|
|
560
614
|
queryParams?: SimpleSchemaTypes.ItemUnpublishHrefSchema,
|
|
561
615
|
) {
|
|
562
|
-
return this.rawUnpublish(
|
|
616
|
+
return this.rawUnpublish(
|
|
617
|
+
Utils.toId(itemId),
|
|
618
|
+
body
|
|
619
|
+
? Utils.serializeRequestBody<SchemaTypes.ItemUnpublishSchema>(body, {
|
|
620
|
+
id: Utils.toId(itemId),
|
|
621
|
+
type: 'selective_unpublish_operation',
|
|
622
|
+
attributes: ['content_in_locales'],
|
|
623
|
+
relationships: [],
|
|
624
|
+
})
|
|
625
|
+
: null,
|
|
626
|
+
queryParams,
|
|
627
|
+
).then((body) =>
|
|
563
628
|
Utils.deserializeResponseBody<SimpleSchemaTypes.ItemUnpublishTargetSchema>(
|
|
564
629
|
body,
|
|
565
630
|
),
|
|
@@ -576,11 +641,13 @@ export default class Item extends BaseResource {
|
|
|
576
641
|
*/
|
|
577
642
|
rawUnpublish(
|
|
578
643
|
itemId: string,
|
|
644
|
+
body?: SchemaTypes.ItemUnpublishSchema,
|
|
579
645
|
queryParams?: SchemaTypes.ItemUnpublishHrefSchema,
|
|
580
646
|
): Promise<SchemaTypes.ItemUnpublishTargetSchema> {
|
|
581
647
|
return this.client.request<SchemaTypes.ItemUnpublishTargetSchema>({
|
|
582
648
|
method: 'PUT',
|
|
583
649
|
url: `/items/${itemId}/unpublish`,
|
|
650
|
+
body,
|
|
584
651
|
queryParams,
|
|
585
652
|
});
|
|
586
653
|
}
|
|
@@ -141,7 +141,7 @@ export default class Plugin extends BaseResource {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
* Retrieve a
|
|
144
|
+
* Retrieve a plugin
|
|
145
145
|
*
|
|
146
146
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self
|
|
147
147
|
*
|
|
@@ -157,7 +157,7 @@ export default class Plugin extends BaseResource {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
* Retrieve a
|
|
160
|
+
* Retrieve a plugin
|
|
161
161
|
*
|
|
162
162
|
* Read more: https://www.datocms.com/docs/content-management-api/resources/plugin/self
|
|
163
163
|
*
|
|
@@ -24,7 +24,7 @@ export default class ScheduledPublication extends BaseResource {
|
|
|
24
24
|
body,
|
|
25
25
|
{
|
|
26
26
|
type: 'scheduled_publication',
|
|
27
|
-
attributes: ['publication_scheduled_at'],
|
|
27
|
+
attributes: ['publication_scheduled_at', 'selective_publication'],
|
|
28
28
|
relationships: [],
|
|
29
29
|
},
|
|
30
30
|
),
|
|
@@ -24,7 +24,7 @@ export default class ScheduledUnpublishing extends BaseResource {
|
|
|
24
24
|
body,
|
|
25
25
|
{
|
|
26
26
|
type: 'scheduled_unpublishing',
|
|
27
|
-
attributes: ['unpublishing_scheduled_at'],
|
|
27
|
+
attributes: ['unpublishing_scheduled_at', 'content_in_locales'],
|
|
28
28
|
relationships: [],
|
|
29
29
|
},
|
|
30
30
|
),
|