@wix/auto_sdk_blog_draft-posts 1.0.90 → 1.0.91

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.
@@ -82,6 +82,25 @@ interface DraftPost {
82
82
  * @format LANGUAGE_TAG
83
83
  */
84
84
  language?: string | null;
85
+ /**
86
+ * Reserved for internal use.
87
+ * @internal
88
+ * @readonly
89
+ */
90
+ changeOrigin?: OriginWithLiterals;
91
+ /**
92
+ * Reserved for internal use.
93
+ * @internal
94
+ * @readonly
95
+ * @maxLength 24
96
+ */
97
+ contentId?: string | null;
98
+ /**
99
+ * Reserved for internal use.
100
+ * @internal
101
+ * @format GUID
102
+ */
103
+ editingSessionId?: string | null;
85
104
  /**
86
105
  * Draft Post rich content.
87
106
  *
@@ -97,6 +116,13 @@ interface DraftPost {
97
116
  status?: StatusWithLiterals;
98
117
  /** Details of the draft post in review. Only relevant to posts submitted by guest writers. */
99
118
  moderationDetails?: ModerationDetails;
119
+ /**
120
+ * Reserved for internal use.
121
+ * @internal
122
+ * @readonly
123
+ * @format GUID
124
+ */
125
+ mostRecentContributorId?: string | null;
100
126
  /**
101
127
  * Indicates if there are changes made to the draft post that have not yet been published.
102
128
  * @readonly
@@ -112,10 +138,23 @@ interface DraftPost {
112
138
  * @readonly
113
139
  */
114
140
  scheduledPublishDate?: Date | null;
141
+ /**
142
+ * Reserved for internal use.
143
+ * @internal
144
+ */
145
+ content?: Record<string, any> | null;
115
146
  /** Date the post was first published. */
116
147
  firstPublishedDate?: Date | null;
117
148
  /** SEO data. */
118
149
  seoData?: SeoSchema;
150
+ /**
151
+ * Reserved for internal use.
152
+ * @internal
153
+ * @readonly
154
+ * @maxSize 5000
155
+ * @maxLength 100
156
+ */
157
+ slugs?: string[];
119
158
  /**
120
159
  * Draft post URL preview. What the URL will look like once the post is published.
121
160
  * @readonly
@@ -135,6 +174,32 @@ interface DraftPost {
135
174
  media?: Media;
136
175
  /** Number of paragraphs to display in a paid content preview for non-paying users. */
137
176
  previewTextParagraph?: number | null;
177
+ /**
178
+ * List of the post's translated posts.
179
+ * @internal
180
+ * @readonly
181
+ * @maxSize 1000
182
+ */
183
+ translations?: DraftPostTranslation[];
184
+ /**
185
+ * Reserved for internal use, not included in base response.
186
+ * @internal
187
+ * @format GUID
188
+ */
189
+ originPostId?: string | null;
190
+ /**
191
+ * Reserved for internal use, not included in base response.
192
+ * @internal
193
+ * @format GUID
194
+ */
195
+ originPostInstanceId?: string | null;
196
+ /**
197
+ * Reserved for internal use.
198
+ * @internal
199
+ * @readonly
200
+ * @maxLength 24
201
+ */
202
+ internalId?: string | null;
138
203
  }
139
204
  interface FocalPoint {
140
205
  /** X-coordinate of the focal point. */
@@ -2824,6 +2889,13 @@ declare enum Status {
2824
2889
  SCHEDULED = "SCHEDULED",
2825
2890
  /** Status indicating the draft post is deleted. */
2826
2891
  DELETED = "DELETED",
2892
+ /**
2893
+ * Deprecated. Use `IN_REVIEW` instead. Status indicating the draft post is in review.
2894
+ * Target removal date 2024-06-30
2895
+ * Reserved for internal use.
2896
+ * @internal
2897
+ */
2898
+ IN_MODERATION = "IN_MODERATION",
2827
2899
  /** Status indicating the draft post is in review. */
2828
2900
  IN_REVIEW = "IN_REVIEW"
2829
2901
  }
@@ -2948,8 +3020,68 @@ interface VideoResolution {
2948
3020
  height?: number;
2949
3021
  /** Video width. */
2950
3022
  width?: number;
3023
+ /**
3024
+ * Deprecated. Use the `posters` property in the parent entity instead.
3025
+ * @internal
3026
+ * @deprecated
3027
+ */
3028
+ poster?: string;
2951
3029
  /** Video format for example, mp4, hls. */
2952
3030
  format?: string;
3031
+ /**
3032
+ * Deprecated. Use the `urlExpirationDate` property in the parent entity instead.
3033
+ * @internal
3034
+ * @deprecated
3035
+ */
3036
+ urlExpirationDate?: Date | null;
3037
+ /**
3038
+ * Deprecated. Use the `sizeInBytes` property in the parent entity instead. Size cannot be provided per resolution.
3039
+ * @internal
3040
+ * @format DECIMAL_VALUE
3041
+ * @deprecated
3042
+ */
3043
+ sizeInBytes?: string | null;
3044
+ /**
3045
+ * Video quality. For example: 480p, 720p.
3046
+ * @internal
3047
+ */
3048
+ quality?: string | null;
3049
+ /**
3050
+ * Video filename.
3051
+ * @internal
3052
+ */
3053
+ filename?: string | null;
3054
+ /**
3055
+ * Video duration in seconds.
3056
+ * @internal
3057
+ * @readonly
3058
+ * @deprecated Video duration in seconds.
3059
+ * @replacedBy duration_in_milliseconds
3060
+ * @targetRemovalDate 2024-08-01
3061
+ */
3062
+ durationInSeconds?: number | null;
3063
+ /**
3064
+ * Video duration in milliseconds.
3065
+ * @internal
3066
+ * @readonly
3067
+ */
3068
+ durationInMilliseconds?: number | null;
3069
+ /**
3070
+ * When true, this is a protected asset, and calling the URL will return a 403 error.
3071
+ * In order to access private assets, make a request to:
3072
+ * `GenerateFileDownloadUrl` with the WixMedia id and specify the asset_key in the request
3073
+ * @internal
3074
+ * @readonly
3075
+ */
3076
+ private?: boolean | null;
3077
+ /**
3078
+ * Key to identify the video resolution's relationship to the original media in WixMedia.
3079
+ * Can be used to request a download for the specific video resolution.
3080
+ * For example: 480p.mp4, 720p.mp4, 1080p.mp4, trailer-720p.mp4, clip-720p.mp4
3081
+ * @internal
3082
+ * @readonly
3083
+ */
3084
+ assetKey?: string | null;
2953
3085
  }
2954
3086
  interface EmbedMedia {
2955
3087
  /** Thumbnail details. */
@@ -3053,6 +3185,11 @@ interface CreateDraftPostRequest {
3053
3185
  * Default: `false`
3054
3186
  */
3055
3187
  publish?: boolean;
3188
+ /**
3189
+ * Save type.
3190
+ * @internal
3191
+ */
3192
+ saveType?: TypeWithLiterals;
3056
3193
  /**
3057
3194
  * List of additional draft post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
3058
3195
  * the response in addition to the draft post's base fields. Base fields don’t include any of the supported fieldset values. By default
@@ -3081,10 +3218,21 @@ declare enum Field {
3081
3218
  UNKNOWN = "UNKNOWN",
3082
3219
  /** Includes draft post preview URL. */
3083
3220
  URL = "URL",
3221
+ /**
3222
+ * Includes internal id field.
3223
+ * Reserved for internal use.
3224
+ * @internal
3225
+ */
3226
+ INTERNAL_ID = "INTERNAL_ID",
3084
3227
  /** Includes content field. */
3085
3228
  CONTENT = "CONTENT",
3086
3229
  /** Includes rich content field. */
3087
3230
  RICH_CONTENT = "RICH_CONTENT",
3231
+ /**
3232
+ * Includes draft post translations when present.
3233
+ * @internal
3234
+ */
3235
+ TRANSLATIONS = "TRANSLATIONS",
3088
3236
  /** If the user has not set excerpt, returns the one autogenerated from content. */
3089
3237
  GENERATED_EXCERPT = "GENERATED_EXCERPT"
3090
3238
  }
@@ -3103,6 +3251,11 @@ interface BulkCreateDraftPostsRequest {
3103
3251
  draftPosts: DraftPost[];
3104
3252
  /** Whether the draft post should be published after creation. */
3105
3253
  publish?: boolean;
3254
+ /**
3255
+ * Save type.
3256
+ * @internal
3257
+ */
3258
+ saveType?: TypeWithLiterals;
3106
3259
  /** Whether to return the full created draft post entities in the response. */
3107
3260
  returnFullEntity?: boolean;
3108
3261
  /**
@@ -3166,6 +3319,11 @@ interface BulkUpdateDraftPostsRequest {
3166
3319
  action?: ActionWithLiterals;
3167
3320
  /** Posts' scheduled publish date when `action` is set to `UPDATE_SCHEDULE`. */
3168
3321
  scheduledPublishDate?: Date | null;
3322
+ /**
3323
+ * Save type.
3324
+ * @internal
3325
+ */
3326
+ saveType?: TypeWithLiterals;
3169
3327
  /** Whether to return the full updated draft post entities in the response. */
3170
3328
  returnFullEntity?: boolean;
3171
3329
  /**
@@ -3207,6 +3365,18 @@ interface BulkUpdateDraftPostsResponse {
3207
3365
  bulkActionMetadata?: BulkActionMetadata;
3208
3366
  }
3209
3367
  interface DraftPostOwnerChanged {
3368
+ /**
3369
+ * Member ID of the draft post's owner before the change.
3370
+ * @internal
3371
+ * @format GUID
3372
+ */
3373
+ oldMemberId?: string;
3374
+ /**
3375
+ * Member ID of the draft post's owner after the change.
3376
+ * @internal
3377
+ * @format GUID
3378
+ */
3379
+ newMemberId?: string;
3210
3380
  }
3211
3381
  interface ListDeletedDraftPostsRequest {
3212
3382
  /**
@@ -3287,6 +3457,13 @@ interface PagingMetadataV2 {
3287
3457
  tooManyToCount?: boolean | null;
3288
3458
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
3289
3459
  cursors?: Cursors;
3460
+ /**
3461
+ * Indicates if there are more results after the current page.
3462
+ * If `true`, another page of results can be retrieved.
3463
+ * If `false`, this is the last page.
3464
+ * @internal
3465
+ */
3466
+ hasNext?: boolean | null;
3290
3467
  }
3291
3468
  interface Cursors {
3292
3469
  /**
@@ -3343,6 +3520,16 @@ interface UpdateDraftPostContentResponse {
3343
3520
  interface UpdateDraftPostRequest {
3344
3521
  /** Draft post to update. */
3345
3522
  draftPost: DraftPost;
3523
+ /**
3524
+ * Field mask of fields to update.
3525
+ * @internal
3526
+ */
3527
+ fieldMask?: string[];
3528
+ /**
3529
+ * Save type.
3530
+ * @internal
3531
+ */
3532
+ saveType?: TypeWithLiterals;
3346
3533
  /**
3347
3534
  * Action to perform on the post.
3348
3535
  *
@@ -3523,6 +3710,20 @@ interface Sorting {
3523
3710
  fieldName?: string;
3524
3711
  /** Sort order. */
3525
3712
  order?: SortOrderWithLiterals;
3713
+ /**
3714
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
3715
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
3716
+ *
3717
+ * If multiple filters are provided, they are combined with AND operator.
3718
+ *
3719
+ * Example:
3720
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
3721
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
3722
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
3723
+ * @internal
3724
+ * @maxSize 10
3725
+ */
3726
+ selectItemsBy?: Record<string, any>[] | null;
3526
3727
  /**
3527
3728
  * Origin point for geo-distance sorting on a GEO field
3528
3729
  * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
@@ -3832,6 +4033,11 @@ interface TranslateDraftRequest {
3832
4033
  * @maxSize 10
3833
4034
  */
3834
4035
  fieldsets?: FieldWithLiterals[];
4036
+ /**
4037
+ * Performs automatic translation of the title and the content of the draft post to the target language.
4038
+ * @internal
4039
+ */
4040
+ useAutoTranslation?: boolean;
3835
4041
  }
3836
4042
  interface TranslateDraftResponse {
3837
4043
  /** Draft post. */
@@ -3927,6 +4133,15 @@ interface RevertToUnpublishedRequest {
3927
4133
  * @format GUID
3928
4134
  */
3929
4135
  postId?: string;
4136
+ /**
4137
+ * List of draft post fields to be included in the response.
4138
+ * @internal
4139
+ * @maxSize 10
4140
+ * @deprecated List of draft post fields to be included in the response.
4141
+ * @replacedBy fieldsets
4142
+ * @targetRemovalDate 2024-06-30
4143
+ */
4144
+ fieldsToInclude?: FieldWithLiterals[];
3930
4145
  /**
3931
4146
  * List of draft post fields to be included if entities are present in the response.
3932
4147
  * Base fieldset, which is default, will return all core draft post properties.
@@ -3945,6 +4160,15 @@ interface RejectDraftPostRequest {
3945
4160
  * @format GUID
3946
4161
  */
3947
4162
  postId?: string;
4163
+ /**
4164
+ * List of draft post fields to be included in the response.
4165
+ * @internal
4166
+ * @maxSize 10
4167
+ * @deprecated List of draft post fields to be included in the response.
4168
+ * @replacedBy fieldsets
4169
+ * @targetRemovalDate 2024-06-30
4170
+ */
4171
+ fieldsToInclude?: FieldWithLiterals[];
3948
4172
  /**
3949
4173
  * List of draft post fields to be included if entities are present in the response.
3950
4174
  * Base fieldset, which is default, will return all core draft post properties.
@@ -3968,6 +4192,15 @@ interface ApproveDraftPostRequest {
3968
4192
  * @maxLength 24
3969
4193
  */
3970
4194
  scheduledPublishDate?: string | null;
4195
+ /**
4196
+ * List of draft post fields to be included in the response.
4197
+ * @internal
4198
+ * @maxSize 10
4199
+ * @deprecated List of draft post fields to be included in the response.
4200
+ * @replacedBy fieldsets
4201
+ * @targetRemovalDate 2024-06-30
4202
+ */
4203
+ fieldsToInclude?: FieldWithLiterals[];
3971
4204
  /**
3972
4205
  * List of draft post fields to be included if entities are present in the response.
3973
4206
  * Base fieldset, which is default, will return all core draft post properties.
@@ -3986,6 +4219,15 @@ interface MarkPostAsInModerationRequest {
3986
4219
  * @maxLength 38
3987
4220
  */
3988
4221
  postId?: string;
4222
+ /**
4223
+ * List of draft post fields to be included in the response.
4224
+ * @internal
4225
+ * @maxSize 10
4226
+ * @deprecated List of draft post fields to be included in the response.
4227
+ * @replacedBy fieldsets
4228
+ * @targetRemovalDate 2024-06-30
4229
+ */
4230
+ fieldsToInclude?: FieldWithLiterals[];
3989
4231
  /**
3990
4232
  * List of draft post fields to be included if entities are present in the response.
3991
4233
  * Base fieldset, which is default, will return all core draft post properties.
@@ -4380,6 +4622,25 @@ interface UpdateDraftPost {
4380
4622
  * @format LANGUAGE_TAG
4381
4623
  */
4382
4624
  language?: string | null;
4625
+ /**
4626
+ * Reserved for internal use.
4627
+ * @internal
4628
+ * @readonly
4629
+ */
4630
+ changeOrigin?: OriginWithLiterals;
4631
+ /**
4632
+ * Reserved for internal use.
4633
+ * @internal
4634
+ * @readonly
4635
+ * @maxLength 24
4636
+ */
4637
+ contentId?: string | null;
4638
+ /**
4639
+ * Reserved for internal use.
4640
+ * @internal
4641
+ * @format GUID
4642
+ */
4643
+ editingSessionId?: string | null;
4383
4644
  /**
4384
4645
  * Draft Post rich content.
4385
4646
  *
@@ -4395,6 +4656,13 @@ interface UpdateDraftPost {
4395
4656
  status?: StatusWithLiterals;
4396
4657
  /** Details of the draft post in review. Only relevant to posts submitted by guest writers. */
4397
4658
  moderationDetails?: ModerationDetails;
4659
+ /**
4660
+ * Reserved for internal use.
4661
+ * @internal
4662
+ * @readonly
4663
+ * @format GUID
4664
+ */
4665
+ mostRecentContributorId?: string | null;
4398
4666
  /**
4399
4667
  * Indicates if there are changes made to the draft post that have not yet been published.
4400
4668
  * @readonly
@@ -4410,10 +4678,23 @@ interface UpdateDraftPost {
4410
4678
  * @readonly
4411
4679
  */
4412
4680
  scheduledPublishDate?: Date | null;
4681
+ /**
4682
+ * Reserved for internal use.
4683
+ * @internal
4684
+ */
4685
+ content?: Record<string, any> | null;
4413
4686
  /** Date the post was first published. */
4414
4687
  firstPublishedDate?: Date | null;
4415
4688
  /** SEO data. */
4416
4689
  seoData?: SeoSchema;
4690
+ /**
4691
+ * Reserved for internal use.
4692
+ * @internal
4693
+ * @readonly
4694
+ * @maxSize 5000
4695
+ * @maxLength 100
4696
+ */
4697
+ slugs?: string[];
4417
4698
  /**
4418
4699
  * Draft post URL preview. What the URL will look like once the post is published.
4419
4700
  * @readonly
@@ -4433,6 +4714,32 @@ interface UpdateDraftPost {
4433
4714
  media?: Media;
4434
4715
  /** Number of paragraphs to display in a paid content preview for non-paying users. */
4435
4716
  previewTextParagraph?: number | null;
4717
+ /**
4718
+ * List of the post's translated posts.
4719
+ * @internal
4720
+ * @readonly
4721
+ * @maxSize 1000
4722
+ */
4723
+ translations?: DraftPostTranslation[];
4724
+ /**
4725
+ * Reserved for internal use, not included in base response.
4726
+ * @internal
4727
+ * @format GUID
4728
+ */
4729
+ originPostId?: string | null;
4730
+ /**
4731
+ * Reserved for internal use, not included in base response.
4732
+ * @internal
4733
+ * @format GUID
4734
+ */
4735
+ originPostInstanceId?: string | null;
4736
+ /**
4737
+ * Reserved for internal use.
4738
+ * @internal
4739
+ * @readonly
4740
+ * @maxLength 24
4741
+ */
4742
+ internalId?: string | null;
4436
4743
  }
4437
4744
  interface UpdateDraftPostOptions {
4438
4745
  /**
@@ -4770,6 +5077,20 @@ type DraftPostQuery = {
4770
5077
  */
4771
5078
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
4772
5079
  /**
5080
+ When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
5081
+ a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
5082
+
5083
+ If multiple filters are provided, they are combined with AND operator.
5084
+
5085
+ Example:
5086
+ Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
5087
+ and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
5088
+ { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
5089
+ @internal: undefined,
5090
+ @maxSize: 10
5091
+ */
5092
+ selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
5093
+ /**
4773
5094
  Origin point for geo-distance sorting on a GEO field
4774
5095
  results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
4775
5096
  */
@@ -3716,6 +3716,7 @@ var Status = /* @__PURE__ */ ((Status2) => {
3716
3716
  Status2["UNPUBLISHED"] = "UNPUBLISHED";
3717
3717
  Status2["SCHEDULED"] = "SCHEDULED";
3718
3718
  Status2["DELETED"] = "DELETED";
3719
+ Status2["IN_MODERATION"] = "IN_MODERATION";
3719
3720
  Status2["IN_REVIEW"] = "IN_REVIEW";
3720
3721
  return Status2;
3721
3722
  })(Status || {});
@@ -3737,8 +3738,10 @@ var Type = /* @__PURE__ */ ((Type2) => {
3737
3738
  var Field = /* @__PURE__ */ ((Field2) => {
3738
3739
  Field2["UNKNOWN"] = "UNKNOWN";
3739
3740
  Field2["URL"] = "URL";
3741
+ Field2["INTERNAL_ID"] = "INTERNAL_ID";
3740
3742
  Field2["CONTENT"] = "CONTENT";
3741
3743
  Field2["RICH_CONTENT"] = "RICH_CONTENT";
3744
+ Field2["TRANSLATIONS"] = "TRANSLATIONS";
3742
3745
  Field2["GENERATED_EXCERPT"] = "GENERATED_EXCERPT";
3743
3746
  return Field2;
3744
3747
  })(Field || {});