@01.software/sdk 0.21.0 → 0.23.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.
@@ -51,6 +51,7 @@ interface Config {
51
51
  'shipping-policies': ShippingPolicy;
52
52
  customers: Customer;
53
53
  'customer-profiles': CustomerProfile;
54
+ 'customer-profile-lists': CustomerProfileList;
54
55
  'customer-addresses': CustomerAddress;
55
56
  'customer-groups': CustomerGroup;
56
57
  carts: Cart;
@@ -103,6 +104,7 @@ interface Config {
103
104
  'event-tags': EventTag;
104
105
  'event-occurrences': EventOccurrence;
105
106
  'event-registrations': EventRegistration;
107
+ 'direct-upload-sessions': DirectUploadSession;
106
108
  forms: Form;
107
109
  'form-submissions': FormSubmission;
108
110
  'payload-kv': PayloadKv;
@@ -198,6 +200,7 @@ interface Config {
198
200
  'shipping-policies': ShippingPoliciesSelect<false> | ShippingPoliciesSelect<true>;
199
201
  customers: CustomersSelect<false> | CustomersSelect<true>;
200
202
  'customer-profiles': CustomerProfilesSelect<false> | CustomerProfilesSelect<true>;
203
+ 'customer-profile-lists': CustomerProfileListsSelect<false> | CustomerProfileListsSelect<true>;
201
204
  'customer-addresses': CustomerAddressesSelect<false> | CustomerAddressesSelect<true>;
202
205
  'customer-groups': CustomerGroupsSelect<false> | CustomerGroupsSelect<true>;
203
206
  carts: CartsSelect<false> | CartsSelect<true>;
@@ -250,6 +253,7 @@ interface Config {
250
253
  'event-tags': EventTagsSelect<false> | EventTagsSelect<true>;
251
254
  'event-occurrences': EventOccurrencesSelect<false> | EventOccurrencesSelect<true>;
252
255
  'event-registrations': EventRegistrationsSelect<false> | EventRegistrationsSelect<true>;
256
+ 'direct-upload-sessions': DirectUploadSessionsSelect<false> | DirectUploadSessionsSelect<true>;
253
257
  forms: FormsSelect<false> | FormsSelect<true>;
254
258
  'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
255
259
  'payload-kv': PayloadKvSelect<false> | PayloadKvSelect<true>;
@@ -425,6 +429,10 @@ interface Tenant {
425
429
  * Only features checked above will be enabled for this tenant.
426
430
  */
427
431
  enabledFeatures?: ('ecommerce' | 'customers' | 'playlists' | 'galleries' | 'links' | 'forms' | 'articles' | 'documents' | 'canvas' | 'videos' | 'live-streaming' | 'community' | 'events')[] | null;
432
+ /**
433
+ * Only selected relationship recipes are active for this tenant. Recipes whose required features are disabled keep their stored intent but remain inactive at runtime.
434
+ */
435
+ enabledRelationshipRecipes?: ('event-commerce' | 'shoppable-content' | 'product-content-access' | 'form-context' | 'document-acceptance')[] | null;
428
436
  featureVersion?: number | null;
429
437
  /**
430
438
  * Dev mode shows configuration tools like the field settings panel. Turn off after setup for a clean production UI.
@@ -518,6 +526,9 @@ interface Image {
518
526
  lightMuted?: string | null;
519
527
  };
520
528
  prefix?: string | null;
529
+ uploadStatus?: ('ready' | 'finalizing' | 'failed') | null;
530
+ processingStatus?: ('ready' | 'processing' | 'failed') | null;
531
+ processingError?: string | null;
521
532
  updatedAt: string;
522
533
  createdAt: string;
523
534
  deletedAt?: string | null;
@@ -580,7 +591,7 @@ interface Image {
580
591
  interface FieldConfig {
581
592
  id: string;
582
593
  tenant?: (string | null) | Tenant;
583
- collectionSlug: 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-collections' | 'product-categories' | 'product-tags' | 'brands' | 'discounts' | 'shipping-policies' | 'orders' | 'carts' | 'transactions' | 'fulfillments' | 'returns' | 'customers' | 'customer-groups' | 'customer-profiles' | 'article-authors' | 'articles' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-categories' | 'gallery-tags' | 'gallery-items' | 'links' | 'link-categories' | 'link-tags' | 'canvases' | 'canvas-categories' | 'canvas-tags' | 'canvas-node-types' | 'canvas-edge-types' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'forms' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'event-calendars' | 'events' | 'event-categories' | 'event-tags' | 'event-occurrences' | 'event-registrations';
594
+ collectionSlug: 'products' | 'product-variants' | 'product-options' | 'product-option-values' | 'product-collections' | 'product-categories' | 'product-tags' | 'brands' | 'discounts' | 'shipping-policies' | 'orders' | 'carts' | 'transactions' | 'fulfillments' | 'returns' | 'customers' | 'customer-groups' | 'customer-profiles' | 'customer-profile-lists' | 'article-authors' | 'articles' | 'article-categories' | 'article-tags' | 'documents' | 'document-categories' | 'document-types' | 'playlists' | 'playlist-categories' | 'playlist-tags' | 'tracks' | 'track-categories' | 'track-tags' | 'galleries' | 'gallery-categories' | 'gallery-tags' | 'gallery-items' | 'links' | 'link-categories' | 'link-tags' | 'canvases' | 'canvas-categories' | 'canvas-tags' | 'canvas-node-types' | 'canvas-edge-types' | 'videos' | 'video-categories' | 'video-tags' | 'live-streams' | 'forms' | 'posts' | 'comments' | 'reactions' | 'reaction-types' | 'bookmarks' | 'post-categories' | 'event-calendars' | 'events' | 'event-categories' | 'event-tags' | 'event-occurrences' | 'event-registrations';
584
595
  isHidden?: boolean | null;
585
596
  hiddenFields?: {
586
597
  [k: string]: unknown;
@@ -1968,7 +1979,7 @@ interface ProductVariant {
1968
1979
  isUnlimited?: boolean | null;
1969
1980
  stock?: number | null;
1970
1981
  /**
1971
- * Paid orders in transit (informational stock alone gates new purchases)
1982
+ * Paid orders in transit (available quantity is stock - reservedStock)
1972
1983
  */
1973
1984
  reservedStock?: number | null;
1974
1985
  /**
@@ -2011,11 +2022,17 @@ interface ProductOptionValue {
2011
2022
  * Display label (e.g. Black, S)
2012
2023
  */
2013
2024
  value: string;
2025
+ /**
2026
+ * Color swatch for this option value (for example #111111)
2027
+ */
2028
+ swatchColor?: string | null;
2014
2029
  /**
2015
2030
  * When enabled, the slug will auto-generate from the title field on save and autosave.
2016
2031
  */
2017
2032
  generateSlug?: boolean | null;
2018
2033
  slug?: string | null;
2034
+ thumbnail?: (string | null) | Image;
2035
+ images?: (string | Image)[] | null;
2019
2036
  metadata?: {
2020
2037
  [k: string]: unknown;
2021
2038
  } | unknown[] | string | number | boolean | null;
@@ -2580,6 +2597,29 @@ interface CustomerGroup {
2580
2597
  color?: string | null;
2581
2598
  image?: (string | null) | Image;
2582
2599
  isActive?: boolean | null;
2600
+ /**
2601
+ * Show this group as a customer-facing membership badge. The group collection itself remains private.
2602
+ */
2603
+ customerVisible?: boolean | null;
2604
+ /**
2605
+ * Customer-facing label. Falls back to title when empty.
2606
+ */
2607
+ publicTitle?: string | null;
2608
+ publicDescription?: string | null;
2609
+ publicBenefits?: {
2610
+ title?: string | null;
2611
+ description?: string | null;
2612
+ id?: string | null;
2613
+ }[] | null;
2614
+ /**
2615
+ * Customer-facing badge color. Example: #2563eb
2616
+ */
2617
+ badgeColor?: string | null;
2618
+ badgeImage?: (string | null) | Image;
2619
+ /**
2620
+ * Customer membership display order. Lower values appear first.
2621
+ */
2622
+ displayOrder?: number | null;
2583
2623
  metadata?: {
2584
2624
  [k: string]: unknown;
2585
2625
  } | unknown[] | string | number | boolean | null;
@@ -2921,6 +2961,47 @@ interface OrderStatusLog {
2921
2961
  updatedAt: string;
2922
2962
  createdAt: string;
2923
2963
  }
2964
+ /**
2965
+ * This interface was referenced by `Config`'s JSON-Schema
2966
+ * via the `definition` "customer-profile-lists".
2967
+ */
2968
+ interface CustomerProfileList {
2969
+ id: string;
2970
+ _order?: string | null;
2971
+ tenant?: (string | null) | Tenant;
2972
+ title: string;
2973
+ /**
2974
+ * When enabled, the slug will auto-generate from the title field on save and autosave.
2975
+ */
2976
+ generateSlug?: boolean | null;
2977
+ slug?: string | null;
2978
+ /**
2979
+ * Short summary for listing/cards
2980
+ */
2981
+ description?: string | null;
2982
+ isActive?: boolean | null;
2983
+ visibility?: ('public' | 'private') | null;
2984
+ displayMode?: ('grid' | 'list' | 'ranking') | null;
2985
+ sortMode?: ('manual' | 'score') | null;
2986
+ entries?: {
2987
+ profile?: (string | null) | CustomerProfile;
2988
+ label?: string | null;
2989
+ caption?: string | null;
2990
+ score?: number | null;
2991
+ badgeColor?: string | null;
2992
+ badgeImage?: (string | null) | Image;
2993
+ publicMetadata?: {
2994
+ [k: string]: unknown;
2995
+ } | unknown[] | string | number | boolean | null;
2996
+ id?: string | null;
2997
+ }[] | null;
2998
+ metadata?: {
2999
+ [k: string]: unknown;
3000
+ } | unknown[] | string | number | boolean | null;
3001
+ updatedAt: string;
3002
+ createdAt: string;
3003
+ deletedAt?: string | null;
3004
+ }
2924
3005
  /**
2925
3006
  * This interface was referenced by `Config`'s JSON-Schema
2926
3007
  * via the `definition` "carts".
@@ -4021,7 +4102,7 @@ interface Canvase {
4021
4102
  */
4022
4103
  description?: string | null;
4023
4104
  videos?: (string | Video)[] | null;
4024
- canvas: {
4105
+ canvas?: {
4025
4106
  [k: string]: unknown;
4026
4107
  } | unknown[] | string | number | boolean | null;
4027
4108
  categories?: (string | CanvasCategory)[] | null;
@@ -4303,7 +4384,7 @@ interface Post {
4303
4384
  id: string;
4304
4385
  _order?: string | null;
4305
4386
  tenant?: (string | null) | Tenant;
4306
- title: string;
4387
+ title?: string | null;
4307
4388
  content?: {
4308
4389
  root: {
4309
4390
  type: string;
@@ -4328,6 +4409,7 @@ interface Post {
4328
4409
  hasNextPage?: boolean;
4329
4410
  totalDocs?: number;
4330
4411
  };
4412
+ displayTitle?: string | null;
4331
4413
  status?: ('draft' | 'published' | 'archived') | null;
4332
4414
  /**
4333
4415
  * When enabled, the slug will auto-generate from the title field on save and autosave.
@@ -4335,9 +4417,9 @@ interface Post {
4335
4417
  generateSlug?: boolean | null;
4336
4418
  slug?: string | null;
4337
4419
  thumbnail?: (string | null) | Image;
4338
- authorProfile: string | CustomerProfile;
4339
- authorSnapshot: {
4340
- displayName: string;
4420
+ authorProfile?: (string | null) | CustomerProfile;
4421
+ authorSnapshot?: {
4422
+ displayName?: string | null;
4341
4423
  handle?: string | null;
4342
4424
  avatar?: (string | null) | Image;
4343
4425
  avatarUrl?: string | null;
@@ -4682,6 +4764,10 @@ interface Event {
4682
4764
  } | null;
4683
4765
  categories?: (string | EventCategory)[] | null;
4684
4766
  tags?: (string | EventTag)[] | null;
4767
+ /**
4768
+ * Products shown with this event. Available only when the Event commerce recipe is active for the tenant.
4769
+ */
4770
+ products?: (string | Product)[] | null;
4685
4771
  organizer?: {
4686
4772
  name?: string | null;
4687
4773
  url?: string | null;
@@ -4715,7 +4801,7 @@ interface Event {
4715
4801
  privateNote?: string | null;
4716
4802
  };
4717
4803
  registrationPolicy?: ('none' | 'rsvp' | 'approval' | 'external') | null;
4718
- waitlistPolicy: 'disabled' | 'auto_waitlist';
4804
+ waitlistPolicy?: ('disabled' | 'auto_waitlist') | null;
4719
4805
  externalRegistrationUrl?: string | null;
4720
4806
  seo?: {
4721
4807
  /**
@@ -4757,7 +4843,7 @@ interface Event {
4757
4843
  status: 'draft' | 'published' | 'archived' | 'canceled';
4758
4844
  coverImage?: (string | null) | Image;
4759
4845
  visibility: 'inherit' | 'public' | 'unlisted' | 'members' | 'private';
4760
- sourceType: 'native' | 'external';
4846
+ sourceType?: ('native' | 'external') | null;
4761
4847
  externalSource?: {
4762
4848
  provider?: string | null;
4763
4849
  sourceId?: string | null;
@@ -4945,6 +5031,33 @@ interface EventRegistration {
4945
5031
  createdAt: string;
4946
5032
  deletedAt?: string | null;
4947
5033
  }
5034
+ /**
5035
+ * This interface was referenced by `Config`'s JSON-Schema
5036
+ * via the `definition` "direct-upload-sessions".
5037
+ */
5038
+ interface DirectUploadSession {
5039
+ id: string;
5040
+ tenant?: (string | null) | Tenant;
5041
+ collectionSlug: string;
5042
+ status: 'created' | 'uploading' | 'uploaded' | 'hydrating' | 'finalizing' | 'ready' | 'aborted' | 'expired' | 'errored';
5043
+ originalFilename: string;
5044
+ safeFilename: string;
5045
+ finalFilename: string;
5046
+ mimeType: string;
5047
+ expectedBytes: number;
5048
+ actualBytes?: number | null;
5049
+ temporaryObjectKey: string;
5050
+ finalObjectKey: string;
5051
+ quotaReservedBytes?: number | null;
5052
+ quotaAdjustmentBytes?: number | null;
5053
+ expiresAt: string;
5054
+ createdBy?: (string | null) | User;
5055
+ completedAt?: string | null;
5056
+ abortedAt?: string | null;
5057
+ error?: string | null;
5058
+ updatedAt: string;
5059
+ createdAt: string;
5060
+ }
4948
5061
  /**
4949
5062
  * This interface was referenced by `Config`'s JSON-Schema
4950
5063
  * via the `definition` "forms".
@@ -5277,6 +5390,9 @@ interface PayloadLockedDocument {
5277
5390
  } | null) | ({
5278
5391
  relationTo: 'customer-profiles';
5279
5392
  value: string | CustomerProfile;
5393
+ } | null) | ({
5394
+ relationTo: 'customer-profile-lists';
5395
+ value: string | CustomerProfileList;
5280
5396
  } | null) | ({
5281
5397
  relationTo: 'customer-addresses';
5282
5398
  value: string | CustomerAddress;
@@ -5433,6 +5549,9 @@ interface PayloadLockedDocument {
5433
5549
  } | null) | ({
5434
5550
  relationTo: 'event-registrations';
5435
5551
  value: string | EventRegistration;
5552
+ } | null) | ({
5553
+ relationTo: 'direct-upload-sessions';
5554
+ value: string | DirectUploadSession;
5436
5555
  } | null) | ({
5437
5556
  relationTo: 'forms';
5438
5557
  value: string | Form;
@@ -5559,6 +5678,9 @@ interface ImagesSelect<T extends boolean = true> {
5559
5678
  lightMuted?: T;
5560
5679
  };
5561
5680
  prefix?: T;
5681
+ uploadStatus?: T;
5682
+ processingStatus?: T;
5683
+ processingError?: T;
5562
5684
  updatedAt?: T;
5563
5685
  createdAt?: T;
5564
5686
  deletedAt?: T;
@@ -5765,6 +5887,7 @@ interface TenantsSelect<T extends boolean = true> {
5765
5887
  slug?: T;
5766
5888
  owner?: T;
5767
5889
  enabledFeatures?: T;
5890
+ enabledRelationshipRecipes?: T;
5768
5891
  featureVersion?: T;
5769
5892
  isDevMode?: T;
5770
5893
  status?: T;
@@ -6287,8 +6410,11 @@ interface ProductOptionValuesSelect<T extends boolean = true> {
6287
6410
  tenant?: T;
6288
6411
  option?: T;
6289
6412
  value?: T;
6413
+ swatchColor?: T;
6290
6414
  generateSlug?: T;
6291
6415
  slug?: T;
6416
+ thumbnail?: T;
6417
+ images?: T;
6292
6418
  metadata?: T;
6293
6419
  updatedAt?: T;
6294
6420
  createdAt?: T;
@@ -6820,6 +6946,36 @@ interface CustomerProfilesSelect<T extends boolean = true> {
6820
6946
  anonymizedAt?: T;
6821
6947
  metadata?: T;
6822
6948
  }
6949
+ /**
6950
+ * This interface was referenced by `Config`'s JSON-Schema
6951
+ * via the `definition` "customer-profile-lists_select".
6952
+ */
6953
+ interface CustomerProfileListsSelect<T extends boolean = true> {
6954
+ _order?: T;
6955
+ tenant?: T;
6956
+ title?: T;
6957
+ generateSlug?: T;
6958
+ slug?: T;
6959
+ description?: T;
6960
+ isActive?: T;
6961
+ visibility?: T;
6962
+ displayMode?: T;
6963
+ sortMode?: T;
6964
+ entries?: T | {
6965
+ profile?: T;
6966
+ label?: T;
6967
+ caption?: T;
6968
+ score?: T;
6969
+ badgeColor?: T;
6970
+ badgeImage?: T;
6971
+ publicMetadata?: T;
6972
+ id?: T;
6973
+ };
6974
+ metadata?: T;
6975
+ updatedAt?: T;
6976
+ createdAt?: T;
6977
+ deletedAt?: T;
6978
+ }
6823
6979
  /**
6824
6980
  * This interface was referenced by `Config`'s JSON-Schema
6825
6981
  * via the `definition` "customer-addresses_select".
@@ -6859,6 +7015,17 @@ interface CustomerGroupsSelect<T extends boolean = true> {
6859
7015
  color?: T;
6860
7016
  image?: T;
6861
7017
  isActive?: T;
7018
+ customerVisible?: T;
7019
+ publicTitle?: T;
7020
+ publicDescription?: T;
7021
+ publicBenefits?: T | {
7022
+ title?: T;
7023
+ description?: T;
7024
+ id?: T;
7025
+ };
7026
+ badgeColor?: T;
7027
+ badgeImage?: T;
7028
+ displayOrder?: T;
6862
7029
  metadata?: T;
6863
7030
  customers?: T;
6864
7031
  updatedAt?: T;
@@ -7796,6 +7963,7 @@ interface PostsSelect<T extends boolean = true> {
7796
7963
  content?: T;
7797
7964
  categories?: T;
7798
7965
  comments?: T;
7966
+ displayTitle?: T;
7799
7967
  status?: T;
7800
7968
  generateSlug?: T;
7801
7969
  slug?: T;
@@ -7999,6 +8167,7 @@ interface EventsSelect<T extends boolean = true> {
7999
8167
  content?: T;
8000
8168
  categories?: T;
8001
8169
  tags?: T;
8170
+ products?: T;
8002
8171
  organizer?: T | {
8003
8172
  name?: T;
8004
8173
  url?: T;
@@ -8177,6 +8346,32 @@ interface EventRegistrationsSelect<T extends boolean = true> {
8177
8346
  createdAt?: T;
8178
8347
  deletedAt?: T;
8179
8348
  }
8349
+ /**
8350
+ * This interface was referenced by `Config`'s JSON-Schema
8351
+ * via the `definition` "direct-upload-sessions_select".
8352
+ */
8353
+ interface DirectUploadSessionsSelect<T extends boolean = true> {
8354
+ tenant?: T;
8355
+ collectionSlug?: T;
8356
+ status?: T;
8357
+ originalFilename?: T;
8358
+ safeFilename?: T;
8359
+ finalFilename?: T;
8360
+ mimeType?: T;
8361
+ expectedBytes?: T;
8362
+ actualBytes?: T;
8363
+ temporaryObjectKey?: T;
8364
+ finalObjectKey?: T;
8365
+ quotaReservedBytes?: T;
8366
+ quotaAdjustmentBytes?: T;
8367
+ expiresAt?: T;
8368
+ createdBy?: T;
8369
+ completedAt?: T;
8370
+ abortedAt?: T;
8371
+ error?: T;
8372
+ updatedAt?: T;
8373
+ createdAt?: T;
8374
+ }
8180
8375
  /**
8181
8376
  * This interface was referenced by `Config`'s JSON-Schema
8182
8377
  * via the `definition` "forms_select".
@@ -8363,4 +8558,4 @@ declare module 'payload' {
8363
8558
  }
8364
8559
  }
8365
8560
 
8366
- export type { Article as A, Config as C, Document as D, Form as F, Image as I, Order as O, Product as P, Return as R, Transaction as T, Video as V, Cart as a, CartItem as b, OrderItem as c, Fulfillment as d, ArticleAuthor as e, ArticleCategory as f, ArticleTag as g, Post as h, PostCategory as i, ProductVariant as j, Tenant as k, CustomerProfile as l, Comment as m, Reaction as n };
8561
+ export type { Article as A, CustomerProfile as C, Document as D, Form as F, Image as I, Order as O, Post as P, Reaction as R, Tenant as T, Video as V, CustomerProfileList as a, Comment as b, Config as c, Cart as d, CartItem as e, Product as f, ArticleAuthor as g, ArticleCategory as h, ArticleTag as i, PostCategory as j, ProductVariant as k, OrderItem as l, Transaction as m, Fulfillment as n, Return as o };