@wix/auto_sdk_blog_posts 1.0.108 → 1.0.109

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +11 -15
  2. package/build/cjs/index.js +31 -36
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +537 -544
  5. package/build/cjs/index.typings.js +26 -26
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +364 -364
  8. package/build/cjs/meta.js +20 -20
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +11 -15
  11. package/build/es/index.mjs +31 -36
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +537 -544
  14. package/build/es/index.typings.mjs +26 -26
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +364 -364
  17. package/build/es/meta.mjs +20 -20
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +11 -15
  20. package/build/internal/cjs/index.js +31 -36
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +537 -544
  23. package/build/internal/cjs/index.typings.js +26 -26
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +364 -364
  26. package/build/internal/cjs/meta.js +20 -20
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +11 -15
  29. package/build/internal/es/index.mjs +31 -36
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +537 -544
  32. package/build/internal/es/index.typings.mjs +26 -26
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +364 -364
  35. package/build/internal/es/meta.mjs +20 -20
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -2242,285 +2242,6 @@ interface PostUnlikedInitiatorOneOf {
2242
2242
  */
2243
2243
  anonymousVisitorId?: string | null;
2244
2244
  }
2245
- /** Get Blog Publications Count Stats request */
2246
- interface QueryPublicationsCountStatsRequest {
2247
- /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2248
- rangeStart?: Date | null;
2249
- /** Non-inclusive end of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2250
- rangeEnd?: Date | null;
2251
- /** Order of the returned results. */
2252
- order?: QueryPublicationsCountStatsRequestOrderWithLiterals;
2253
- /** Number of months to include in the response. */
2254
- months?: number;
2255
- /**
2256
- * Language filter
2257
- *
2258
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2259
- * @format LANGUAGE_TAG
2260
- */
2261
- language?: string | null;
2262
- /**
2263
- * Timezone of the client.
2264
- * @minLength 3
2265
- * @maxLength 100
2266
- */
2267
- timeZone?: string | null;
2268
- }
2269
- declare enum QueryPublicationsCountStatsRequestOrder {
2270
- UNKNOWN = "UNKNOWN",
2271
- OLDEST = "OLDEST",
2272
- NEWEST = "NEWEST"
2273
- }
2274
- /** @enumType */
2275
- type QueryPublicationsCountStatsRequestOrderWithLiterals = QueryPublicationsCountStatsRequestOrder | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
2276
- /** Get Blog Publications Count Stats response */
2277
- interface QueryPublicationsCountStatsResponse {
2278
- /** Chronologically ordered list of publications. */
2279
- stats?: PeriodPublicationsCount[];
2280
- }
2281
- /** Publications count for a specific time period */
2282
- interface PeriodPublicationsCount {
2283
- /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2284
- periodStart?: Date | null;
2285
- /** Number of posts published during this month. */
2286
- publicationsCount?: number;
2287
- }
2288
- /** Get Blog Post Count Stats request */
2289
- interface QueryPostCountStatsRequest {
2290
- /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2291
- rangeStart?: Date | null;
2292
- /**
2293
- * Order of returned results.
2294
- *
2295
- * - `OLDEST`: posts by date in ascending order.
2296
- * - `NEWEST`: posts by date in descending order.
2297
- *
2298
- * Default: `OLDEST`
2299
- */
2300
- order?: OrderWithLiterals;
2301
- /** Number of months to include in response. */
2302
- months?: number;
2303
- /**
2304
- * Language filter.
2305
- *
2306
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2307
- * Pass a language to only receive the period post count for that specified language.
2308
- * @format LANGUAGE_TAG
2309
- */
2310
- language?: string | null;
2311
- /**
2312
- * Time zone to use when calculating the start of the month.
2313
- *
2314
- * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`.
2315
- * @minLength 3
2316
- * @maxLength 100
2317
- */
2318
- timeZone?: string | null;
2319
- }
2320
- declare enum Order {
2321
- UNKNOWN = "UNKNOWN",
2322
- OLDEST = "OLDEST",
2323
- NEWEST = "NEWEST"
2324
- }
2325
- /** @enumType */
2326
- type OrderWithLiterals = Order | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
2327
- /** Get Blog Post Count Stats response */
2328
- interface QueryPostCountStatsResponse {
2329
- /** List of published post counts by month. */
2330
- stats?: PeriodPostCount[];
2331
- }
2332
- /** Post count for a specific time period */
2333
- interface PeriodPostCount {
2334
- /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2335
- periodStart?: Date | null;
2336
- /** Number of posts published during this month. */
2337
- postCount?: number;
2338
- }
2339
- interface GetTotalPublicationsRequest {
2340
- /**
2341
- * Language filter
2342
- * @minLength 2
2343
- * @format LANGUAGE_TAG
2344
- */
2345
- language?: string | null;
2346
- }
2347
- interface GetTotalPublicationsResponse {
2348
- /** Total amount of publications. */
2349
- total?: number;
2350
- }
2351
- interface GetTotalPostsRequest {
2352
- /**
2353
- * Language filter.
2354
- *
2355
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2356
- * Pass a language to receive the total amount of posts in that specified language.
2357
- * @format LANGUAGE_TAG
2358
- */
2359
- language?: string | null;
2360
- }
2361
- interface GetTotalPostsResponse {
2362
- /** Total amount of published posts. */
2363
- total?: number;
2364
- }
2365
- interface DomainEvent extends DomainEventBodyOneOf {
2366
- createdEvent?: EntityCreatedEvent;
2367
- updatedEvent?: EntityUpdatedEvent;
2368
- deletedEvent?: EntityDeletedEvent;
2369
- actionEvent?: ActionEvent;
2370
- /**
2371
- * Unique event ID.
2372
- * Allows clients to ignore duplicate webhooks.
2373
- */
2374
- _id?: string;
2375
- /**
2376
- * Assumes actions are also always typed to an entity_type
2377
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2378
- */
2379
- entityFqdn?: string;
2380
- /**
2381
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2382
- * This is although the created/updated/deleted notion is duplication of the oneof types
2383
- * Example: created/updated/deleted/started/completed/email_opened
2384
- */
2385
- slug?: string;
2386
- /** ID of the entity associated with the event. */
2387
- entityId?: string;
2388
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2389
- eventTime?: Date | null;
2390
- /**
2391
- * Whether the event was triggered as a result of a privacy regulation application
2392
- * (for example, GDPR).
2393
- */
2394
- triggeredByAnonymizeRequest?: boolean | null;
2395
- /** If present, indicates the action that triggered the event. */
2396
- originatedFrom?: string | null;
2397
- /**
2398
- * A sequence number defining the order of updates to the underlying entity.
2399
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
2400
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2401
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2402
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
2403
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2404
- */
2405
- entityEventSequence?: string | null;
2406
- }
2407
- /** @oneof */
2408
- interface DomainEventBodyOneOf {
2409
- createdEvent?: EntityCreatedEvent;
2410
- updatedEvent?: EntityUpdatedEvent;
2411
- deletedEvent?: EntityDeletedEvent;
2412
- actionEvent?: ActionEvent;
2413
- }
2414
- interface EntityCreatedEvent {
2415
- entity?: string;
2416
- }
2417
- interface RestoreInfo {
2418
- deletedDate?: Date | null;
2419
- }
2420
- interface EntityUpdatedEvent {
2421
- /**
2422
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2423
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2424
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2425
- */
2426
- currentEntity?: string;
2427
- }
2428
- interface EntityDeletedEvent {
2429
- /** Entity that was deleted */
2430
- deletedEntity?: string | null;
2431
- }
2432
- interface ActionEvent {
2433
- body?: string;
2434
- }
2435
- interface MessageEnvelope {
2436
- /**
2437
- * App instance ID.
2438
- * @format GUID
2439
- */
2440
- instanceId?: string | null;
2441
- /**
2442
- * Event type.
2443
- * @maxLength 150
2444
- */
2445
- eventType?: string;
2446
- /** The identification type and identity data. */
2447
- identity?: IdentificationData;
2448
- /** Stringify payload. */
2449
- data?: string;
2450
- }
2451
- interface IdentificationData extends IdentificationDataIdOneOf {
2452
- /**
2453
- * ID of a site visitor that has not logged in to the site.
2454
- * @format GUID
2455
- */
2456
- anonymousVisitorId?: string;
2457
- /**
2458
- * ID of a site visitor that has logged in to the site.
2459
- * @format GUID
2460
- */
2461
- memberId?: string;
2462
- /**
2463
- * ID of a Wix user (site owner, contributor, etc.).
2464
- * @format GUID
2465
- */
2466
- wixUserId?: string;
2467
- /**
2468
- * ID of an app.
2469
- * @format GUID
2470
- */
2471
- appId?: string;
2472
- /** @readonly */
2473
- identityType?: WebhookIdentityTypeWithLiterals;
2474
- }
2475
- /** @oneof */
2476
- interface IdentificationDataIdOneOf {
2477
- /**
2478
- * ID of a site visitor that has not logged in to the site.
2479
- * @format GUID
2480
- */
2481
- anonymousVisitorId?: string;
2482
- /**
2483
- * ID of a site visitor that has logged in to the site.
2484
- * @format GUID
2485
- */
2486
- memberId?: string;
2487
- /**
2488
- * ID of a Wix user (site owner, contributor, etc.).
2489
- * @format GUID
2490
- */
2491
- wixUserId?: string;
2492
- /**
2493
- * ID of an app.
2494
- * @format GUID
2495
- */
2496
- appId?: string;
2497
- }
2498
- declare enum WebhookIdentityType {
2499
- UNKNOWN = "UNKNOWN",
2500
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2501
- MEMBER = "MEMBER",
2502
- WIX_USER = "WIX_USER",
2503
- APP = "APP"
2504
- }
2505
- /** @enumType */
2506
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
2507
- interface AccountInfo {
2508
- /**
2509
- * ID of the Wix account associated with the event.
2510
- * @format GUID
2511
- */
2512
- accountId?: string | null;
2513
- /**
2514
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
2515
- * @format GUID
2516
- */
2517
- parentAccountId?: string | null;
2518
- /**
2519
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
2520
- * @format GUID
2521
- */
2522
- siteId?: string | null;
2523
- }
2524
2245
  interface ListTemplatesRequest {
2525
2246
  /**
2526
2247
  * Filter post templates by given template category ids
@@ -2634,320 +2355,599 @@ interface Category {
2634
2355
  */
2635
2356
  displayPosition?: number | null;
2636
2357
  /**
2637
- * ID of the category's translations. All translations of a single category share the same `translationId`.
2358
+ * ID of the category's translations. All translations of a single category share the same `translationId`.
2359
+ * @format GUID
2360
+ */
2361
+ translationId?: string | null;
2362
+ /**
2363
+ * Category language.
2364
+ *
2365
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2366
+ * @immutable
2367
+ */
2368
+ language?: string | null;
2369
+ /**
2370
+ * Part of a category's URL that refers to a specific category. For example, the slug of `https:/example.com/blog/category/famous-cats` is `famous-cats`.
2371
+ * @maxLength 100
2372
+ */
2373
+ slug?: string;
2374
+ /** SEO data. */
2375
+ seoData?: SeoSchema;
2376
+ /** Category cover image. */
2377
+ coverImage?: string;
2378
+ /**
2379
+ * Date and time the Category was last updated.
2380
+ * @readonly
2381
+ */
2382
+ _updatedDate?: Date | null;
2383
+ }
2384
+ interface CategoryTranslation {
2385
+ /**
2386
+ * Category ID.
2387
+ * @format GUID
2388
+ */
2389
+ _id?: string;
2390
+ /**
2391
+ * Label displayed in the categories menu on the site.
2392
+ * @maxLength 100
2393
+ */
2394
+ label?: string | null;
2395
+ /**
2396
+ * Language of the category.
2397
+ * @format LANGUAGE_TAG
2398
+ */
2399
+ language?: string | null;
2400
+ /** URL of this category page. */
2401
+ url?: string;
2402
+ }
2403
+ interface GetTemplateRequest {
2404
+ /**
2405
+ * Post template id
2406
+ * @format GUID
2407
+ */
2408
+ postTemplateId?: string;
2409
+ }
2410
+ interface GetTemplateResponse {
2411
+ /** Post template */
2412
+ postTemplate?: Post;
2413
+ }
2414
+ interface CreateDraftPostFromTemplateRequest {
2415
+ /**
2416
+ * Post template id
2417
+ * @format GUID
2418
+ */
2419
+ postTemplateId?: string;
2420
+ }
2421
+ interface CreateDraftPostFromTemplateResponse {
2422
+ /** Created draft post */
2423
+ draftPost?: DraftPost;
2424
+ }
2425
+ interface DraftPost {
2426
+ /**
2427
+ * Draft post ID.
2428
+ * @readonly
2429
+ * @maxLength 38
2430
+ */
2431
+ _id?: string;
2432
+ /**
2433
+ * Draft post title.
2434
+ * @maxLength 200
2435
+ */
2436
+ title?: string;
2437
+ /**
2438
+ * Draft post excerpt.
2439
+ *
2440
+ * If no excerpt has been manually set, an excerpt is automatically generated from the post's text.
2441
+ * This can be retrieved using the `GENERATED_EXCERPT` fieldset.
2442
+ * @maxLength 500
2443
+ */
2444
+ excerpt?: string | null;
2445
+ /** Whether the draft post is marked as featured. */
2446
+ featured?: boolean | null;
2447
+ /**
2448
+ * Category IDs of the draft post.
2449
+ * @maxSize 10
2450
+ * @maxLength 38
2451
+ */
2452
+ categoryIds?: string[];
2453
+ /**
2454
+ * Draft post owner's member ID.
2455
+ * @format GUID
2456
+ */
2457
+ memberId?: string | null;
2458
+ /**
2459
+ * Hashtags in the post.
2460
+ * @maxSize 100
2461
+ * @maxLength 100
2462
+ */
2463
+ hashtags?: string[];
2464
+ /** Whether commenting on the draft post is enabled. */
2465
+ commentingEnabled?: boolean | null;
2466
+ /**
2467
+ * Estimated reading time of the draft post (calculated automatically).
2468
+ * @readonly
2469
+ */
2470
+ minutesToRead?: number;
2471
+ /** Image placed at the top of the blog page. */
2472
+ heroImage?: string;
2473
+ /**
2474
+ * Tag IDs the draft post is tagged with.
2475
+ * @maxSize 30
2476
+ * @maxLength 38
2477
+ */
2478
+ tagIds?: string[];
2479
+ /**
2480
+ * IDs of posts related to this draft post.
2481
+ * @maxSize 3
2482
+ * @maxLength 38
2483
+ */
2484
+ relatedPostIds?: string[];
2485
+ /**
2486
+ * Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan. See the Pricing Plans API for more info.
2487
+ * @maxSize 100
2488
+ * @format GUID
2489
+ */
2490
+ pricingPlanIds?: string[];
2491
+ /**
2492
+ * ID of the draft post's translations.
2493
+ *
2494
+ * All translations of a single post share the same `translationId`.
2495
+ * Available only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed.
2496
+ * @format GUID
2497
+ */
2498
+ translationId?: string | null;
2499
+ /**
2500
+ * Language the draft post is written in.
2501
+ *
2502
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2503
+ * @format LANGUAGE_TAG
2504
+ */
2505
+ language?: string | null;
2506
+ /**
2507
+ * Draft Post rich content.
2508
+ *
2509
+ * <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">
2510
+ * <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
2511
+ * </widget>
2512
+ */
2513
+ richContent?: RichContent;
2514
+ /**
2515
+ * Status of the draft post.
2516
+ * @readonly
2517
+ */
2518
+ status?: StatusWithLiterals;
2519
+ /** Details of the draft post in review. Only relevant to posts submitted by guest writers. */
2520
+ moderationDetails?: ModerationDetails;
2521
+ /**
2522
+ * Indicates if there are changes made to the draft post that have not yet been published.
2523
+ * @readonly
2524
+ */
2525
+ hasUnpublishedChanges?: boolean;
2526
+ /**
2527
+ * Date the draft post was last edited.
2528
+ * @readonly
2529
+ */
2530
+ editedDate?: Date | null;
2531
+ /**
2532
+ * Date the draft post is scheduled to be published.
2533
+ * @readonly
2534
+ */
2535
+ scheduledPublishDate?: Date | null;
2536
+ /** Date the post was first published. */
2537
+ firstPublishedDate?: Date | null;
2538
+ /** SEO data. */
2539
+ seoData?: SeoSchema;
2540
+ /**
2541
+ * Draft post URL preview. What the URL will look like once the post is published.
2542
+ * @readonly
2543
+ */
2544
+ url?: string;
2545
+ /**
2546
+ * Date the draft post was first created.
2547
+ * @readonly
2548
+ */
2549
+ _createdDate?: Date | null;
2550
+ /**
2551
+ * SEO slug.
2552
+ * @maxLength 100
2553
+ */
2554
+ seoSlug?: string | null;
2555
+ /** Post cover media. */
2556
+ media?: Media;
2557
+ /** Number of paragraphs to display in a paid content preview for non-paying users. */
2558
+ previewTextParagraph?: number | null;
2559
+ }
2560
+ declare enum Origin {
2561
+ UNKNOWN = "UNKNOWN",
2562
+ /** Changed by admin */
2563
+ ADMIN = "ADMIN",
2564
+ /** Categories were changed */
2565
+ ADD_CATEGORIES = "ADD_CATEGORIES",
2566
+ /** Saved automatically */
2567
+ AUTO_SAVE = "AUTO_SAVE",
2568
+ /** Copied from template */
2569
+ COPY_TEMPLATE = "COPY_TEMPLATE",
2570
+ /** Imported */
2571
+ IMPORT = "IMPORT",
2572
+ /** Imported in bulk */
2573
+ IMPORT_BULK = "IMPORT_BULK",
2574
+ /** Imported with html import */
2575
+ IMPORT_HTML = "IMPORT_HTML",
2576
+ /** Patch import */
2577
+ IMPORT_PATCH = "IMPORT_PATCH",
2578
+ /** Changed language */
2579
+ LANGUAGE_CHANGE = "LANGUAGE_CHANGE",
2580
+ /** Saved manually */
2581
+ MANUAL_SAVE = "MANUAL_SAVE",
2582
+ /** Affected by migration */
2583
+ MIGRATION = "MIGRATION",
2584
+ /** Affected by moderation */
2585
+ MODERATION = "MODERATION",
2586
+ /** Moved to trash */
2587
+ MOVE_TO_TRASH = "MOVE_TO_TRASH",
2588
+ /** Pricing plans were changed */
2589
+ PRICING_PLANS_CHANGE = "PRICING_PLANS_CHANGE",
2590
+ /** Was provisioned */
2591
+ PROVISION = "PROVISION",
2592
+ /** Was published */
2593
+ PUBLISH = "PUBLISH",
2594
+ /** Owner was reassigned */
2595
+ REASSIGN_OWNER = "REASSIGN_OWNER",
2596
+ /** Was reblogged */
2597
+ REBLOG = "REBLOG",
2598
+ /** Was restored */
2599
+ RESTORE = "RESTORE",
2600
+ /** Reverted to draft */
2601
+ REVERT_TO_DRAFT = "REVERT_TO_DRAFT",
2602
+ /** Was translated */
2603
+ TRANSLATION = "TRANSLATION",
2604
+ /** Was unpublished */
2605
+ UNPUBLISH = "UNPUBLISH",
2606
+ /** Was unscheduled */
2607
+ UNSCHEDULE = "UNSCHEDULE",
2608
+ /** New edit session started which updated editing_session_id id */
2609
+ NEW_EDIT_SESSION = "NEW_EDIT_SESSION",
2610
+ /** Was scheduled by Later */
2611
+ SCHEDULING_SERVICE_SCHEDULE = "SCHEDULING_SERVICE_SCHEDULE",
2612
+ /** Was unscheduled by Later */
2613
+ SCHEDULING_SERVICE_UNSCHEDULE = "SCHEDULING_SERVICE_UNSCHEDULE",
2614
+ /** Was published by Later */
2615
+ SCHEDULING_SERVICE_PUBLISH = "SCHEDULING_SERVICE_PUBLISH",
2616
+ /** Was scheduled */
2617
+ SCHEDULE = "SCHEDULE",
2618
+ /** Was removed from moderation */
2619
+ REMOVE_FROM_MODERATION = "REMOVE_FROM_MODERATION",
2620
+ /** Was rejected from moderation */
2621
+ REJECT_FROM_MODERATION = "REJECT_FROM_MODERATION",
2622
+ /** Was approved in moderation */
2623
+ APPROVE_IN_MODERATION = "APPROVE_IN_MODERATION",
2624
+ /** Tag was deleted */
2625
+ DELETE_TAG = "DELETE_TAG",
2626
+ /** Post was pinned */
2627
+ PIN = "PIN",
2628
+ /** Post was unpinned */
2629
+ UNPIN = "UNPIN",
2630
+ /** Saved automatically by AI tool. */
2631
+ AI_AUTO_SAVE = "AI_AUTO_SAVE"
2632
+ }
2633
+ /** @enumType */
2634
+ type OriginWithLiterals = Origin | 'UNKNOWN' | 'ADMIN' | 'ADD_CATEGORIES' | 'AUTO_SAVE' | 'COPY_TEMPLATE' | 'IMPORT' | 'IMPORT_BULK' | 'IMPORT_HTML' | 'IMPORT_PATCH' | 'LANGUAGE_CHANGE' | 'MANUAL_SAVE' | 'MIGRATION' | 'MODERATION' | 'MOVE_TO_TRASH' | 'PRICING_PLANS_CHANGE' | 'PROVISION' | 'PUBLISH' | 'REASSIGN_OWNER' | 'REBLOG' | 'RESTORE' | 'REVERT_TO_DRAFT' | 'TRANSLATION' | 'UNPUBLISH' | 'UNSCHEDULE' | 'NEW_EDIT_SESSION' | 'SCHEDULING_SERVICE_SCHEDULE' | 'SCHEDULING_SERVICE_UNSCHEDULE' | 'SCHEDULING_SERVICE_PUBLISH' | 'SCHEDULE' | 'REMOVE_FROM_MODERATION' | 'REJECT_FROM_MODERATION' | 'APPROVE_IN_MODERATION' | 'DELETE_TAG' | 'PIN' | 'UNPIN' | 'AI_AUTO_SAVE';
2635
+ declare enum Status {
2636
+ UNKNOWN = "UNKNOWN",
2637
+ /** Status indicating the draft post is published. */
2638
+ PUBLISHED = "PUBLISHED",
2639
+ /** Status indicating the draft post is unpublished. */
2640
+ UNPUBLISHED = "UNPUBLISHED",
2641
+ /** Status indicating the draft post is scheduled for publication. */
2642
+ SCHEDULED = "SCHEDULED",
2643
+ /** Status indicating the draft post is deleted. */
2644
+ DELETED = "DELETED",
2645
+ /** Status indicating the draft post is in review. */
2646
+ IN_REVIEW = "IN_REVIEW"
2647
+ }
2648
+ /** @enumType */
2649
+ type StatusWithLiterals = Status | 'UNKNOWN' | 'PUBLISHED' | 'UNPUBLISHED' | 'SCHEDULED' | 'DELETED' | 'IN_REVIEW';
2650
+ interface DraftPostTranslation {
2651
+ /**
2652
+ * Post ID.
2638
2653
  * @format GUID
2639
2654
  */
2640
- translationId?: string | null;
2655
+ _id?: string;
2656
+ /** Post status. */
2657
+ status?: StatusWithLiterals;
2641
2658
  /**
2642
- * Category language.
2643
- *
2644
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2645
- * @immutable
2659
+ * Language the post is written in.
2660
+ * @format LANGUAGE_TAG
2646
2661
  */
2647
2662
  language?: string | null;
2648
2663
  /**
2649
- * Part of a category's URL that refers to a specific category. For example, the slug of `https:/example.com/blog/category/famous-cats` is `famous-cats`.
2664
+ * Post slug. For example, 'post-slug'.
2650
2665
  * @maxLength 100
2651
2666
  */
2652
- slug?: string;
2667
+ slug?: string | null;
2653
2668
  /** SEO data. */
2654
2669
  seoData?: SeoSchema;
2655
- /** Category cover image. */
2656
- coverImage?: string;
2657
- /**
2658
- * Date and time the Category was last updated.
2659
- * @readonly
2660
- */
2661
- _updatedDate?: Date | null;
2670
+ /** Post URL. */
2671
+ url?: string;
2662
2672
  }
2663
- interface CategoryTranslation {
2673
+ interface DomainEvent extends DomainEventBodyOneOf {
2674
+ createdEvent?: EntityCreatedEvent;
2675
+ updatedEvent?: EntityUpdatedEvent;
2676
+ deletedEvent?: EntityDeletedEvent;
2677
+ actionEvent?: ActionEvent;
2664
2678
  /**
2665
- * Category ID.
2666
- * @format GUID
2679
+ * Unique event ID.
2680
+ * Allows clients to ignore duplicate webhooks.
2667
2681
  */
2668
2682
  _id?: string;
2669
2683
  /**
2670
- * Label displayed in the categories menu on the site.
2671
- * @maxLength 100
2684
+ * Assumes actions are also always typed to an entity_type
2685
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
2672
2686
  */
2673
- label?: string | null;
2687
+ entityFqdn?: string;
2674
2688
  /**
2675
- * Language of the category.
2676
- * @format LANGUAGE_TAG
2689
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
2690
+ * This is although the created/updated/deleted notion is duplication of the oneof types
2691
+ * Example: created/updated/deleted/started/completed/email_opened
2677
2692
  */
2678
- language?: string | null;
2679
- /** URL of this category page. */
2680
- url?: string;
2681
- }
2682
- interface GetTemplateRequest {
2693
+ slug?: string;
2694
+ /** ID of the entity associated with the event. */
2695
+ entityId?: string;
2696
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2697
+ eventTime?: Date | null;
2683
2698
  /**
2684
- * Post template id
2685
- * @format GUID
2699
+ * Whether the event was triggered as a result of a privacy regulation application
2700
+ * (for example, GDPR).
2686
2701
  */
2687
- postTemplateId?: string;
2688
- }
2689
- interface GetTemplateResponse {
2690
- /** Post template */
2691
- postTemplate?: Post;
2692
- }
2693
- interface CreateDraftPostFromTemplateRequest {
2702
+ triggeredByAnonymizeRequest?: boolean | null;
2703
+ /** If present, indicates the action that triggered the event. */
2704
+ originatedFrom?: string | null;
2694
2705
  /**
2695
- * Post template id
2696
- * @format GUID
2706
+ * A sequence number defining the order of updates to the underlying entity.
2707
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
2708
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
2709
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
2710
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
2711
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
2697
2712
  */
2698
- postTemplateId?: string;
2713
+ entityEventSequence?: string | null;
2699
2714
  }
2700
- interface CreateDraftPostFromTemplateResponse {
2701
- /** Created draft post */
2702
- draftPost?: DraftPost;
2715
+ /** @oneof */
2716
+ interface DomainEventBodyOneOf {
2717
+ createdEvent?: EntityCreatedEvent;
2718
+ updatedEvent?: EntityUpdatedEvent;
2719
+ deletedEvent?: EntityDeletedEvent;
2720
+ actionEvent?: ActionEvent;
2703
2721
  }
2704
- interface DraftPost {
2705
- /**
2706
- * Draft post ID.
2707
- * @readonly
2708
- * @maxLength 38
2709
- */
2710
- _id?: string;
2722
+ interface EntityCreatedEvent {
2723
+ entity?: string;
2724
+ }
2725
+ interface RestoreInfo {
2726
+ deletedDate?: Date | null;
2727
+ }
2728
+ interface EntityUpdatedEvent {
2711
2729
  /**
2712
- * Draft post title.
2713
- * @maxLength 200
2730
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
2731
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
2732
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
2714
2733
  */
2715
- title?: string;
2734
+ currentEntity?: string;
2735
+ }
2736
+ interface EntityDeletedEvent {
2737
+ /** Entity that was deleted */
2738
+ deletedEntity?: string | null;
2739
+ }
2740
+ interface ActionEvent {
2741
+ body?: string;
2742
+ }
2743
+ interface MessageEnvelope {
2716
2744
  /**
2717
- * Draft post excerpt.
2718
- *
2719
- * If no excerpt has been manually set, an excerpt is automatically generated from the post's text.
2720
- * This can be retrieved using the `GENERATED_EXCERPT` fieldset.
2721
- * @maxLength 500
2745
+ * App instance ID.
2746
+ * @format GUID
2722
2747
  */
2723
- excerpt?: string | null;
2724
- /** Whether the draft post is marked as featured. */
2725
- featured?: boolean | null;
2748
+ instanceId?: string | null;
2726
2749
  /**
2727
- * Category IDs of the draft post.
2728
- * @maxSize 10
2729
- * @maxLength 38
2750
+ * Event type.
2751
+ * @maxLength 150
2730
2752
  */
2731
- categoryIds?: string[];
2753
+ eventType?: string;
2754
+ /** The identification type and identity data. */
2755
+ identity?: IdentificationData;
2756
+ /** Stringify payload. */
2757
+ data?: string;
2758
+ }
2759
+ interface IdentificationData extends IdentificationDataIdOneOf {
2732
2760
  /**
2733
- * Draft post owner's member ID.
2761
+ * ID of a site visitor that has not logged in to the site.
2734
2762
  * @format GUID
2735
2763
  */
2736
- memberId?: string | null;
2764
+ anonymousVisitorId?: string;
2737
2765
  /**
2738
- * Hashtags in the post.
2739
- * @maxSize 100
2740
- * @maxLength 100
2766
+ * ID of a site visitor that has logged in to the site.
2767
+ * @format GUID
2741
2768
  */
2742
- hashtags?: string[];
2743
- /** Whether commenting on the draft post is enabled. */
2744
- commentingEnabled?: boolean | null;
2769
+ memberId?: string;
2745
2770
  /**
2746
- * Estimated reading time of the draft post (calculated automatically).
2747
- * @readonly
2771
+ * ID of a Wix user (site owner, contributor, etc.).
2772
+ * @format GUID
2748
2773
  */
2749
- minutesToRead?: number;
2750
- /** Image placed at the top of the blog page. */
2751
- heroImage?: string;
2774
+ wixUserId?: string;
2752
2775
  /**
2753
- * Tag IDs the draft post is tagged with.
2754
- * @maxSize 30
2755
- * @maxLength 38
2776
+ * ID of an app.
2777
+ * @format GUID
2756
2778
  */
2757
- tagIds?: string[];
2779
+ appId?: string;
2780
+ /** @readonly */
2781
+ identityType?: WebhookIdentityTypeWithLiterals;
2782
+ }
2783
+ /** @oneof */
2784
+ interface IdentificationDataIdOneOf {
2758
2785
  /**
2759
- * IDs of posts related to this draft post.
2760
- * @maxSize 3
2761
- * @maxLength 38
2786
+ * ID of a site visitor that has not logged in to the site.
2787
+ * @format GUID
2762
2788
  */
2763
- relatedPostIds?: string[];
2789
+ anonymousVisitorId?: string;
2764
2790
  /**
2765
- * Pricing plan IDs. Only relevant if a post is assigned to a specific pricing plan. See the Pricing Plans API for more info.
2766
- * @maxSize 100
2791
+ * ID of a site visitor that has logged in to the site.
2767
2792
  * @format GUID
2768
2793
  */
2769
- pricingPlanIds?: string[];
2794
+ memberId?: string;
2770
2795
  /**
2771
- * ID of the draft post's translations.
2772
- *
2773
- * All translations of a single post share the same `translationId`.
2774
- * Available only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed.
2796
+ * ID of a Wix user (site owner, contributor, etc.).
2775
2797
  * @format GUID
2776
2798
  */
2777
- translationId?: string | null;
2799
+ wixUserId?: string;
2778
2800
  /**
2779
- * Language the draft post is written in.
2780
- *
2781
- * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2782
- * @format LANGUAGE_TAG
2801
+ * ID of an app.
2802
+ * @format GUID
2783
2803
  */
2784
- language?: string | null;
2804
+ appId?: string;
2805
+ }
2806
+ declare enum WebhookIdentityType {
2807
+ UNKNOWN = "UNKNOWN",
2808
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2809
+ MEMBER = "MEMBER",
2810
+ WIX_USER = "WIX_USER",
2811
+ APP = "APP"
2812
+ }
2813
+ /** @enumType */
2814
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
2815
+ interface AccountInfo {
2785
2816
  /**
2786
- * Draft Post rich content.
2787
- *
2788
- * <widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">
2789
- * <a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>
2790
- * </widget>
2817
+ * ID of the Wix account associated with the event.
2818
+ * @format GUID
2791
2819
  */
2792
- richContent?: RichContent;
2820
+ accountId?: string | null;
2793
2821
  /**
2794
- * Status of the draft post.
2795
- * @readonly
2822
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
2823
+ * @format GUID
2796
2824
  */
2797
- status?: StatusWithLiterals;
2798
- /** Details of the draft post in review. Only relevant to posts submitted by guest writers. */
2799
- moderationDetails?: ModerationDetails;
2825
+ parentAccountId?: string | null;
2800
2826
  /**
2801
- * Indicates if there are changes made to the draft post that have not yet been published.
2802
- * @readonly
2827
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
2828
+ * @format GUID
2803
2829
  */
2804
- hasUnpublishedChanges?: boolean;
2830
+ siteId?: string | null;
2831
+ }
2832
+ /** Get Blog Publications Count Stats request */
2833
+ interface QueryPublicationsCountStatsRequest {
2834
+ /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2835
+ rangeStart?: Date | null;
2836
+ /** Non-inclusive end of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2837
+ rangeEnd?: Date | null;
2838
+ /** Order of the returned results. */
2839
+ order?: QueryPublicationsCountStatsRequestOrderWithLiterals;
2840
+ /** Number of months to include in the response. */
2841
+ months?: number;
2805
2842
  /**
2806
- * Date the draft post was last edited.
2807
- * @readonly
2843
+ * Language filter
2844
+ *
2845
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2846
+ * @format LANGUAGE_TAG
2808
2847
  */
2809
- editedDate?: Date | null;
2848
+ language?: string | null;
2810
2849
  /**
2811
- * Date the draft post is scheduled to be published.
2812
- * @readonly
2850
+ * Timezone of the client.
2851
+ * @minLength 3
2852
+ * @maxLength 100
2813
2853
  */
2814
- scheduledPublishDate?: Date | null;
2815
- /** Date the post was first published. */
2816
- firstPublishedDate?: Date | null;
2817
- /** SEO data. */
2818
- seoData?: SeoSchema;
2854
+ timeZone?: string | null;
2855
+ }
2856
+ declare enum QueryPublicationsCountStatsRequestOrder {
2857
+ UNKNOWN = "UNKNOWN",
2858
+ OLDEST = "OLDEST",
2859
+ NEWEST = "NEWEST"
2860
+ }
2861
+ /** @enumType */
2862
+ type QueryPublicationsCountStatsRequestOrderWithLiterals = QueryPublicationsCountStatsRequestOrder | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
2863
+ /** Get Blog Publications Count Stats response */
2864
+ interface QueryPublicationsCountStatsResponse {
2865
+ /** Chronologically ordered list of publications. */
2866
+ stats?: PeriodPublicationsCount[];
2867
+ }
2868
+ /** Publications count for a specific time period */
2869
+ interface PeriodPublicationsCount {
2870
+ /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2871
+ periodStart?: Date | null;
2872
+ /** Number of posts published during this month. */
2873
+ publicationsCount?: number;
2874
+ }
2875
+ /** Get Blog Post Count Stats request */
2876
+ interface QueryPostCountStatsRequest {
2877
+ /** Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2878
+ rangeStart?: Date | null;
2819
2879
  /**
2820
- * Draft post URL preview. What the URL will look like once the post is published.
2821
- * @readonly
2880
+ * Order of returned results.
2881
+ *
2882
+ * - `OLDEST`: posts by date in ascending order.
2883
+ * - `NEWEST`: posts by date in descending order.
2884
+ *
2885
+ * Default: `OLDEST`
2822
2886
  */
2823
- url?: string;
2887
+ order?: OrderWithLiterals;
2888
+ /** Number of months to include in response. */
2889
+ months?: number;
2824
2890
  /**
2825
- * Date the draft post was first created.
2826
- * @readonly
2891
+ * Language filter.
2892
+ *
2893
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2894
+ * Pass a language to only receive the period post count for that specified language.
2895
+ * @format LANGUAGE_TAG
2827
2896
  */
2828
- _createdDate?: Date | null;
2897
+ language?: string | null;
2829
2898
  /**
2830
- * SEO slug.
2899
+ * Time zone to use when calculating the start of the month.
2900
+ *
2901
+ * [UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`.
2902
+ * @minLength 3
2831
2903
  * @maxLength 100
2832
2904
  */
2833
- seoSlug?: string | null;
2834
- /** Post cover media. */
2835
- media?: Media;
2836
- /** Number of paragraphs to display in a paid content preview for non-paying users. */
2837
- previewTextParagraph?: number | null;
2905
+ timeZone?: string | null;
2838
2906
  }
2839
- declare enum Origin {
2907
+ declare enum Order {
2840
2908
  UNKNOWN = "UNKNOWN",
2841
- /** Changed by admin */
2842
- ADMIN = "ADMIN",
2843
- /** Categories were changed */
2844
- ADD_CATEGORIES = "ADD_CATEGORIES",
2845
- /** Saved automatically */
2846
- AUTO_SAVE = "AUTO_SAVE",
2847
- /** Copied from template */
2848
- COPY_TEMPLATE = "COPY_TEMPLATE",
2849
- /** Imported */
2850
- IMPORT = "IMPORT",
2851
- /** Imported in bulk */
2852
- IMPORT_BULK = "IMPORT_BULK",
2853
- /** Imported with html import */
2854
- IMPORT_HTML = "IMPORT_HTML",
2855
- /** Patch import */
2856
- IMPORT_PATCH = "IMPORT_PATCH",
2857
- /** Changed language */
2858
- LANGUAGE_CHANGE = "LANGUAGE_CHANGE",
2859
- /** Saved manually */
2860
- MANUAL_SAVE = "MANUAL_SAVE",
2861
- /** Affected by migration */
2862
- MIGRATION = "MIGRATION",
2863
- /** Affected by moderation */
2864
- MODERATION = "MODERATION",
2865
- /** Moved to trash */
2866
- MOVE_TO_TRASH = "MOVE_TO_TRASH",
2867
- /** Pricing plans were changed */
2868
- PRICING_PLANS_CHANGE = "PRICING_PLANS_CHANGE",
2869
- /** Was provisioned */
2870
- PROVISION = "PROVISION",
2871
- /** Was published */
2872
- PUBLISH = "PUBLISH",
2873
- /** Owner was reassigned */
2874
- REASSIGN_OWNER = "REASSIGN_OWNER",
2875
- /** Was reblogged */
2876
- REBLOG = "REBLOG",
2877
- /** Was restored */
2878
- RESTORE = "RESTORE",
2879
- /** Reverted to draft */
2880
- REVERT_TO_DRAFT = "REVERT_TO_DRAFT",
2881
- /** Was translated */
2882
- TRANSLATION = "TRANSLATION",
2883
- /** Was unpublished */
2884
- UNPUBLISH = "UNPUBLISH",
2885
- /** Was unscheduled */
2886
- UNSCHEDULE = "UNSCHEDULE",
2887
- /** New edit session started which updated editing_session_id id */
2888
- NEW_EDIT_SESSION = "NEW_EDIT_SESSION",
2889
- /** Was scheduled by Later */
2890
- SCHEDULING_SERVICE_SCHEDULE = "SCHEDULING_SERVICE_SCHEDULE",
2891
- /** Was unscheduled by Later */
2892
- SCHEDULING_SERVICE_UNSCHEDULE = "SCHEDULING_SERVICE_UNSCHEDULE",
2893
- /** Was published by Later */
2894
- SCHEDULING_SERVICE_PUBLISH = "SCHEDULING_SERVICE_PUBLISH",
2895
- /** Was scheduled */
2896
- SCHEDULE = "SCHEDULE",
2897
- /** Was removed from moderation */
2898
- REMOVE_FROM_MODERATION = "REMOVE_FROM_MODERATION",
2899
- /** Was rejected from moderation */
2900
- REJECT_FROM_MODERATION = "REJECT_FROM_MODERATION",
2901
- /** Was approved in moderation */
2902
- APPROVE_IN_MODERATION = "APPROVE_IN_MODERATION",
2903
- /** Tag was deleted */
2904
- DELETE_TAG = "DELETE_TAG",
2905
- /** Post was pinned */
2906
- PIN = "PIN",
2907
- /** Post was unpinned */
2908
- UNPIN = "UNPIN",
2909
- /** Saved automatically by AI tool. */
2910
- AI_AUTO_SAVE = "AI_AUTO_SAVE"
2909
+ OLDEST = "OLDEST",
2910
+ NEWEST = "NEWEST"
2911
2911
  }
2912
2912
  /** @enumType */
2913
- type OriginWithLiterals = Origin | 'UNKNOWN' | 'ADMIN' | 'ADD_CATEGORIES' | 'AUTO_SAVE' | 'COPY_TEMPLATE' | 'IMPORT' | 'IMPORT_BULK' | 'IMPORT_HTML' | 'IMPORT_PATCH' | 'LANGUAGE_CHANGE' | 'MANUAL_SAVE' | 'MIGRATION' | 'MODERATION' | 'MOVE_TO_TRASH' | 'PRICING_PLANS_CHANGE' | 'PROVISION' | 'PUBLISH' | 'REASSIGN_OWNER' | 'REBLOG' | 'RESTORE' | 'REVERT_TO_DRAFT' | 'TRANSLATION' | 'UNPUBLISH' | 'UNSCHEDULE' | 'NEW_EDIT_SESSION' | 'SCHEDULING_SERVICE_SCHEDULE' | 'SCHEDULING_SERVICE_UNSCHEDULE' | 'SCHEDULING_SERVICE_PUBLISH' | 'SCHEDULE' | 'REMOVE_FROM_MODERATION' | 'REJECT_FROM_MODERATION' | 'APPROVE_IN_MODERATION' | 'DELETE_TAG' | 'PIN' | 'UNPIN' | 'AI_AUTO_SAVE';
2914
- declare enum Status {
2915
- UNKNOWN = "UNKNOWN",
2916
- /** Status indicating the draft post is published. */
2917
- PUBLISHED = "PUBLISHED",
2918
- /** Status indicating the draft post is unpublished. */
2919
- UNPUBLISHED = "UNPUBLISHED",
2920
- /** Status indicating the draft post is scheduled for publication. */
2921
- SCHEDULED = "SCHEDULED",
2922
- /** Status indicating the draft post is deleted. */
2923
- DELETED = "DELETED",
2924
- /** Status indicating the draft post is in review. */
2925
- IN_REVIEW = "IN_REVIEW"
2913
+ type OrderWithLiterals = Order | 'UNKNOWN' | 'OLDEST' | 'NEWEST';
2914
+ /** Get Blog Post Count Stats response */
2915
+ interface QueryPostCountStatsResponse {
2916
+ /** List of published post counts by month. */
2917
+ stats?: PeriodPostCount[];
2926
2918
  }
2927
- /** @enumType */
2928
- type StatusWithLiterals = Status | 'UNKNOWN' | 'PUBLISHED' | 'UNPUBLISHED' | 'SCHEDULED' | 'DELETED' | 'IN_REVIEW';
2929
- interface DraftPostTranslation {
2930
- /**
2931
- * Post ID.
2932
- * @format GUID
2933
- */
2934
- _id?: string;
2935
- /** Post status. */
2936
- status?: StatusWithLiterals;
2919
+ /** Post count for a specific time period */
2920
+ interface PeriodPostCount {
2921
+ /** Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format. */
2922
+ periodStart?: Date | null;
2923
+ /** Number of posts published during this month. */
2924
+ postCount?: number;
2925
+ }
2926
+ interface GetTotalPublicationsRequest {
2937
2927
  /**
2938
- * Language the post is written in.
2928
+ * Language filter
2929
+ * @minLength 2
2939
2930
  * @format LANGUAGE_TAG
2940
2931
  */
2941
2932
  language?: string | null;
2933
+ }
2934
+ interface GetTotalPublicationsResponse {
2935
+ /** Total amount of publications. */
2936
+ total?: number;
2937
+ }
2938
+ interface GetTotalPostsRequest {
2942
2939
  /**
2943
- * Post slug. For example, 'post-slug'.
2944
- * @maxLength 100
2940
+ * Language filter.
2941
+ *
2942
+ * 2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
2943
+ * Pass a language to receive the total amount of posts in that specified language.
2944
+ * @format LANGUAGE_TAG
2945
2945
  */
2946
- slug?: string | null;
2947
- /** SEO data. */
2948
- seoData?: SeoSchema;
2949
- /** Post URL. */
2950
- url?: string;
2946
+ language?: string | null;
2947
+ }
2948
+ interface GetTotalPostsResponse {
2949
+ /** Total amount of published posts. */
2950
+ total?: number;
2951
2951
  }
2952
2952
  interface GetTotalLikesPerMemberRequest {
2953
2953
  /**
@@ -3759,14 +3759,13 @@ declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => void | P
3759
3759
  /**
3760
3760
  * Retrieves the number of published posts per month within a specified time range.
3761
3761
  *
3762
- *
3763
- * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
3764
- *
3765
- * You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
3766
- *
3767
- * >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
3762
+ * The time range is set using the `rangeStart` and `months` properties.
3763
+ * The time range always starts on the 1st day of the month set in `rangeStart` and
3764
+ * includes the number of `months` following `rangeStart`.
3765
+ * For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
3766
+ * the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range always ends on the last day of the month.
3767
+ * > Note: If there are no published posts in a month within the time range, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
3768
3768
  * @public
3769
- * @param options - Options specifying time frame, sort, and filter.
3770
3769
  * @permissionId BLOG.READ-PUBLICATION
3771
3770
  * @applicableIdentity APP
3772
3771
  * @returns Get Blog Post Count Stats response
@@ -3807,7 +3806,6 @@ interface QueryPostCountStatsOptions {
3807
3806
  /**
3808
3807
  * Retrieves the total amount of published posts of the blog.
3809
3808
  * @public
3810
- * @param options - Language Options.
3811
3809
  * @permissionId BLOG.READ-PUBLICATION
3812
3810
  * @applicableIdentity APP
3813
3811
  * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
@@ -3828,12 +3826,12 @@ interface GetTotalPostsOptions {
3828
3826
  * @param postId - Post ID.
3829
3827
  * @public
3830
3828
  * @requiredField postId
3831
- * @param options - Options specifying which fields to return.
3832
3829
  * @permissionId BLOG.READ-PUBLICATION
3833
3830
  * @applicableIdentity APP
3831
+ * @returns Retrieved post info.
3834
3832
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
3835
3833
  */
3836
- declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<GetPostResponse, `post._id` | `post.title` | `post.excerpt` | `post.slug` | `post.featured` | `post.pinned` | `post.categoryIds` | `post.coverMedia.enabled` | `post.coverMedia.displayed` | `post.coverMedia.custom` | `post.memberId` | `post.hashtags` | `post.commentingEnabled` | `post.minutesToRead` | `post.tagIds` | `post.relatedPostIds` | `post.pricingPlanIds` | `post.seoData.tags` | `post.seoData.tags.${number}.type` | `post.seoData.tags.${number}.children` | `post.seoData.tags.${number}.custom` | `post.seoData.tags.${number}.disabled` | `post.seoData.settings.preventAutoRedirect` | `post.seoData.settings.keywords` | `post.seoData.settings.keywords.${number}.term` | `post.seoData.settings.keywords.${number}.isMain` | `post.preview` | `post.moderationDetails.submittedBy` | `post.moderationDetails.status` | `post.media.embedMedia.thumbnail.url` | `post.media.embedMedia.thumbnail.width` | `post.media.embedMedia.thumbnail.height` | `post.media.embedMedia.video.url` | `post.media.embedMedia.video.width` | `post.media.embedMedia.video.height` | `post.media.displayed` | `post.media.custom` | `post.hasUnpublishedChanges`, 7>>;
3834
+ declare function getPost(postId: string, options?: GetPostOptions): Promise<NonNullablePaths<Post, `_id` | `title` | `excerpt` | `slug` | `featured` | `pinned` | `categoryIds` | `coverMedia.enabled` | `coverMedia.displayed` | `coverMedia.custom` | `memberId` | `hashtags` | `commentingEnabled` | `minutesToRead` | `tagIds` | `relatedPostIds` | `pricingPlanIds` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain` | `preview` | `moderationDetails.submittedBy` | `moderationDetails.status` | `media.embedMedia.thumbnail.url` | `media.embedMedia.thumbnail.width` | `media.embedMedia.thumbnail.height` | `media.embedMedia.video.url` | `media.embedMedia.video.width` | `media.embedMedia.video.height` | `media.displayed` | `media.custom` | `hasUnpublishedChanges`, 6>>;
3837
3835
  interface GetPostOptions {
3838
3836
  /**
3839
3837
  * List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
@@ -3853,7 +3851,6 @@ interface GetPostOptions {
3853
3851
  * @param slug - Slug of the post to retrieve.
3854
3852
  * @public
3855
3853
  * @requiredField slug
3856
- * @param options - Options specifying which fields to return.
3857
3854
  * @permissionId BLOG.READ-PUBLICATION
3858
3855
  * @applicableIdentity APP
3859
3856
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
@@ -3881,7 +3878,6 @@ interface GetPostBySlugOptions {
3881
3878
  * - `paging.limit` is `50`.
3882
3879
  * - `paging.offset` is `0`.
3883
3880
  * @public
3884
- * @param options - Sort, filter, and paging options.
3885
3881
  * @permissionId BLOG.READ-PUBLICATION
3886
3882
  * @applicableIdentity APP
3887
3883
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
@@ -3952,26 +3948,23 @@ interface ListPostsOptions {
3952
3948
  fieldsets?: PostFieldFieldWithLiterals[];
3953
3949
  }
3954
3950
  /**
3955
- * Creates a query to retrieve a list of posts.
3951
+ * Retrieves a list of up to 100 posts, given the provided paging, filtering, and sorting.
3956
3952
  *
3953
+ * Query Posts runs with these defaults, which you can override:
3954
+ * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
3955
+ * - `paging.limit` is `50`.
3956
+ * - `paging.offset` is `0`.
3957
3957
  *
3958
- * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
3959
- *
3960
- * The returned object contains the query definition which is typically used to run the query using the `find()` function.
3961
- *
3962
- * You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
3963
- *
3964
- * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
3965
- * + `limit(50)`
3966
- * + `descending('firstPublishedDate')`
3967
- *
3968
- * Note that the default limit is `'50'`, but the max limit is `'100'`.
3969
- *
3970
- * To learn how to query posts, refer to the table below.
3958
+ * For field support for filters and sorting, see
3959
+ * [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
3971
3960
  *
3972
- * The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
3961
+ * To learn about working with _Query_ endpoints, see
3962
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
3963
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
3964
+ * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
3965
+ * For a detailed list of supported filters and sortable fields, see
3966
+ * [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
3973
3967
  * @public
3974
- * @param options - Options specifying which fields to return.
3975
3968
  * @permissionId BLOG.READ-PUBLICATION
3976
3969
  * @applicableIdentity APP
3977
3970
  * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts