@01.software/sdk 0.1.2 → 0.1.3

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.
@@ -29,6 +29,8 @@ interface Config {
29
29
  'tenant-logos': TenantLogo;
30
30
  'tenant-og-images': TenantOgImage;
31
31
  'api-usage': ApiUsage;
32
+ subscriptions: Subscription;
33
+ 'billing-history': BillingHistory;
32
34
  products: Product;
33
35
  'product-variants': ProductVariant;
34
36
  'product-options': ProductOption;
@@ -95,6 +97,8 @@ interface Config {
95
97
  'tenant-logos': TenantLogosSelect<false> | TenantLogosSelect<true>;
96
98
  'tenant-og-images': TenantOgImagesSelect<false> | TenantOgImagesSelect<true>;
97
99
  'api-usage': ApiUsageSelect<false> | ApiUsageSelect<true>;
100
+ subscriptions: SubscriptionsSelect<false> | SubscriptionsSelect<true>;
101
+ 'billing-history': BillingHistorySelect<false> | BillingHistorySelect<true>;
98
102
  products: ProductsSelect<false> | ProductsSelect<true>;
99
103
  'product-variants': ProductVariantsSelect<false> | ProductVariantsSelect<true>;
100
104
  'product-options': ProductOptionsSelect<false> | ProductOptionsSelect<true>;
@@ -650,6 +654,126 @@ interface ApiUsage {
650
654
  updatedAt: string;
651
655
  createdAt: string;
652
656
  }
657
+ /**
658
+ * This interface was referenced by `Config`'s JSON-Schema
659
+ * via the `definition` "subscriptions".
660
+ */
661
+ interface Subscription {
662
+ id: number;
663
+ provider: 'toss' | 'polar';
664
+ currency: 'KRW' | 'USD';
665
+ tenant: number | Tenant;
666
+ plan: 'starter' | 'basic' | 'pro';
667
+ billingCycle: 'monthly' | 'yearly';
668
+ /**
669
+ * 결제 금액 (KRW)
670
+ */
671
+ amount: number;
672
+ status: 'active' | 'past_due' | 'canceled' | 'expired' | 'suspended';
673
+ /**
674
+ * 토스 빌링키 (AES-256-GCM 암호화)
675
+ */
676
+ billingKey?: string | null;
677
+ /**
678
+ * 토스 고객키 (UUID)
679
+ */
680
+ customerKey?: string | null;
681
+ /**
682
+ * 등록된 카드 정보
683
+ */
684
+ cardInfo?: {
685
+ issuerCode?: string | null;
686
+ /**
687
+ * 마스킹된 카드번호
688
+ */
689
+ number?: string | null;
690
+ cardType?: string | null;
691
+ };
692
+ /**
693
+ * Polar subscription ID
694
+ */
695
+ polarSubscriptionId?: string | null;
696
+ /**
697
+ * Polar customer ID
698
+ */
699
+ polarCustomerId?: string | null;
700
+ /**
701
+ * Polar product ID
702
+ */
703
+ polarProductId?: string | null;
704
+ currentPeriodStart?: string | null;
705
+ currentPeriodEnd?: string | null;
706
+ nextBillingDate?: string | null;
707
+ cancelAtPeriodEnd?: boolean | null;
708
+ canceledAt?: string | null;
709
+ cancelReason?: string | null;
710
+ retryCount?: number | null;
711
+ graceDeadline?: string | null;
712
+ lastPaymentError?: string | null;
713
+ pendingPlanChange?: {
714
+ targetPlan?: ('starter' | 'basic' | 'pro') | null;
715
+ targetAmount?: number | null;
716
+ effectiveDate?: string | null;
717
+ };
718
+ updatedAt: string;
719
+ createdAt: string;
720
+ }
721
+ /**
722
+ * This interface was referenced by `Config`'s JSON-Schema
723
+ * via the `definition` "billing-history".
724
+ */
725
+ interface BillingHistory {
726
+ id: number;
727
+ provider: 'toss' | 'polar';
728
+ currency: 'KRW' | 'USD';
729
+ tenant: number | Tenant;
730
+ subscription?: (number | null) | Subscription;
731
+ type: 'payment' | 'refund' | 'plan_change';
732
+ status: 'success' | 'failed' | 'refunded' | 'partial_refund';
733
+ /**
734
+ * 금액 (KRW)
735
+ */
736
+ amount: number;
737
+ /**
738
+ * 토스 결제키
739
+ */
740
+ paymentKey?: string | null;
741
+ /**
742
+ * 고유 주문번호
743
+ */
744
+ orderId: string;
745
+ orderName?: string | null;
746
+ /**
747
+ * 결제 시점 플랜
748
+ */
749
+ plan?: string | null;
750
+ billingCycle?: ('monthly' | 'yearly') | null;
751
+ periodStart?: string | null;
752
+ periodEnd?: string | null;
753
+ /**
754
+ * 토스 API 전체 응답
755
+ */
756
+ tossResponse?: {
757
+ [k: string]: unknown;
758
+ } | unknown[] | string | number | boolean | null;
759
+ /**
760
+ * Polar order ID
761
+ */
762
+ polarOrderId?: string | null;
763
+ /**
764
+ * Polar API 전체 응답
765
+ */
766
+ polarResponse?: {
767
+ [k: string]: unknown;
768
+ } | unknown[] | string | number | boolean | null;
769
+ errorMessage?: string | null;
770
+ /**
771
+ * 재시도 원본 결제 내역
772
+ */
773
+ retryOf?: (number | null) | BillingHistory;
774
+ updatedAt: string;
775
+ createdAt: string;
776
+ }
653
777
  /**
654
778
  * This interface was referenced by `Config`'s JSON-Schema
655
779
  * via the `definition` "products".
@@ -1684,6 +1808,12 @@ interface PayloadLockedDocument {
1684
1808
  } | null) | ({
1685
1809
  relationTo: 'api-usage';
1686
1810
  value: number | ApiUsage;
1811
+ } | null) | ({
1812
+ relationTo: 'subscriptions';
1813
+ value: number | Subscription;
1814
+ } | null) | ({
1815
+ relationTo: 'billing-history';
1816
+ value: number | BillingHistory;
1687
1817
  } | null) | ({
1688
1818
  relationTo: 'products';
1689
1819
  value: number | Product;
@@ -2038,6 +2168,72 @@ interface ApiUsageSelect<T extends boolean = true> {
2038
2168
  updatedAt?: T;
2039
2169
  createdAt?: T;
2040
2170
  }
2171
+ /**
2172
+ * This interface was referenced by `Config`'s JSON-Schema
2173
+ * via the `definition` "subscriptions_select".
2174
+ */
2175
+ interface SubscriptionsSelect<T extends boolean = true> {
2176
+ provider?: T;
2177
+ currency?: T;
2178
+ tenant?: T;
2179
+ plan?: T;
2180
+ billingCycle?: T;
2181
+ amount?: T;
2182
+ status?: T;
2183
+ billingKey?: T;
2184
+ customerKey?: T;
2185
+ cardInfo?: T | {
2186
+ issuerCode?: T;
2187
+ number?: T;
2188
+ cardType?: T;
2189
+ };
2190
+ polarSubscriptionId?: T;
2191
+ polarCustomerId?: T;
2192
+ polarProductId?: T;
2193
+ currentPeriodStart?: T;
2194
+ currentPeriodEnd?: T;
2195
+ nextBillingDate?: T;
2196
+ cancelAtPeriodEnd?: T;
2197
+ canceledAt?: T;
2198
+ cancelReason?: T;
2199
+ retryCount?: T;
2200
+ graceDeadline?: T;
2201
+ lastPaymentError?: T;
2202
+ pendingPlanChange?: T | {
2203
+ targetPlan?: T;
2204
+ targetAmount?: T;
2205
+ effectiveDate?: T;
2206
+ };
2207
+ updatedAt?: T;
2208
+ createdAt?: T;
2209
+ }
2210
+ /**
2211
+ * This interface was referenced by `Config`'s JSON-Schema
2212
+ * via the `definition` "billing-history_select".
2213
+ */
2214
+ interface BillingHistorySelect<T extends boolean = true> {
2215
+ provider?: T;
2216
+ currency?: T;
2217
+ tenant?: T;
2218
+ subscription?: T;
2219
+ type?: T;
2220
+ status?: T;
2221
+ amount?: T;
2222
+ paymentKey?: T;
2223
+ orderId?: T;
2224
+ orderName?: T;
2225
+ plan?: T;
2226
+ billingCycle?: T;
2227
+ periodStart?: T;
2228
+ periodEnd?: T;
2229
+ tossResponse?: T;
2230
+ polarOrderId?: T;
2231
+ polarResponse?: T;
2232
+ errorMessage?: T;
2233
+ retryOf?: T;
2234
+ updatedAt?: T;
2235
+ createdAt?: T;
2236
+ }
2041
2237
  /**
2042
2238
  * This interface was referenced by `Config`'s JSON-Schema
2043
2239
  * via the `definition` "products_select".
@@ -2901,4 +3097,4 @@ declare module 'payload' {
2901
3097
  }
2902
3098
  }
2903
3099
 
2904
- export type { TenantLogosSelect as $, Audience as A, BrandLogo as B, Config as C, Document as D, EmailLog as E, GalleryImage as F, Gallery as G, Form as H, IframeBlock as I, FormSubmission as J, PayloadKv as K, PayloadLockedDocument as L, Media as M, PayloadPreference as N, Order as O, ProductOption as P, PayloadMigration as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, UsersSelect as V, MediaSelect as W, AudiencesSelect as X, EmailLogsSelect as Y, TenantsSelect as Z, TenantMetadataSelect as _, OrderProduct as a, TenantOgImagesSelect as a0, ApiUsageSelect as a1, ProductsSelect as a2, ProductVariantsSelect as a3, ProductOptionsSelect as a4, ProductCategoriesSelect as a5, ProductTagsSelect as a6, ProductImagesSelect as a7, BrandsSelect as a8, BrandLogosSelect as a9, OrdersSelect as aa, OrderProductsSelect as ab, ReturnsSelect as ac, ReturnProductsSelect as ad, TransactionsSelect as ae, PostsSelect as af, PostCategoriesSelect as ag, PostTagsSelect as ah, PostImagesSelect as ai, AuthorsSelect as aj, DocumentsSelect as ak, DocumentCategoriesSelect as al, DocumentImagesSelect as am, PlaylistsSelect as an, PlaylistImagesSelect as ao, MusicsSelect as ap, GalleriesSelect as aq, GalleryImagesSelect as ar, FormsSelect as as, FormSubmissionsSelect as at, PayloadKvSelect as au, PayloadLockedDocumentsSelect as av, PayloadPreferencesSelect as aw, PayloadMigrationsSelect as ax, Auth as ay, PlayerBlock as b, CodeBlock as c, User as d, Tenant as e, TenantMetadatum as f, TenantOgImage as g, TenantLogo as h, ApiUsage as i, Product as j, ProductImage as k, ProductCategory as l, ProductTag as m, Brand as n, ProductVariant as o, ReturnProduct as p, Post as q, PostImage as r, Author as s, PostCategory as t, PostTag as u, DocumentCategory as v, DocumentImage as w, Playlist as x, PlaylistImage as y, Music as z };
3100
+ export type { TenantsSelect as $, Audience as A, BrandLogo as B, Config as C, Document as D, EmailLog as E, PlaylistImage as F, Music as G, Gallery as H, IframeBlock as I, GalleryImage as J, Form as K, FormSubmission as L, Media as M, PayloadKv as N, Order as O, ProductOption as P, PayloadLockedDocument as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, PayloadPreference as V, PayloadMigration as W, UsersSelect as X, MediaSelect as Y, AudiencesSelect as Z, EmailLogsSelect as _, OrderProduct as a, TenantMetadataSelect as a0, TenantLogosSelect as a1, TenantOgImagesSelect as a2, ApiUsageSelect as a3, SubscriptionsSelect as a4, BillingHistorySelect as a5, ProductsSelect as a6, ProductVariantsSelect as a7, ProductOptionsSelect as a8, ProductCategoriesSelect as a9, PayloadPreferencesSelect as aA, PayloadMigrationsSelect as aB, Auth as aC, ProductTagsSelect as aa, ProductImagesSelect as ab, BrandsSelect as ac, BrandLogosSelect as ad, OrdersSelect as ae, OrderProductsSelect as af, ReturnsSelect as ag, ReturnProductsSelect as ah, TransactionsSelect as ai, PostsSelect as aj, PostCategoriesSelect as ak, PostTagsSelect as al, PostImagesSelect as am, AuthorsSelect as an, DocumentsSelect as ao, DocumentCategoriesSelect as ap, DocumentImagesSelect as aq, PlaylistsSelect as ar, PlaylistImagesSelect as as, MusicsSelect as at, GalleriesSelect as au, GalleryImagesSelect as av, FormsSelect as aw, FormSubmissionsSelect as ax, PayloadKvSelect as ay, PayloadLockedDocumentsSelect as az, PlayerBlock as b, CodeBlock as c, User as d, Tenant as e, TenantMetadatum as f, TenantOgImage as g, TenantLogo as h, ApiUsage as i, Subscription as j, BillingHistory as k, Product as l, ProductImage as m, ProductCategory as n, ProductTag as o, Brand as p, ProductVariant as q, ReturnProduct as r, Post as s, PostImage as t, Author as u, PostCategory as v, PostTag as w, DocumentCategory as x, DocumentImage as y, Playlist as z };
@@ -29,6 +29,8 @@ interface Config {
29
29
  'tenant-logos': TenantLogo;
30
30
  'tenant-og-images': TenantOgImage;
31
31
  'api-usage': ApiUsage;
32
+ subscriptions: Subscription;
33
+ 'billing-history': BillingHistory;
32
34
  products: Product;
33
35
  'product-variants': ProductVariant;
34
36
  'product-options': ProductOption;
@@ -95,6 +97,8 @@ interface Config {
95
97
  'tenant-logos': TenantLogosSelect<false> | TenantLogosSelect<true>;
96
98
  'tenant-og-images': TenantOgImagesSelect<false> | TenantOgImagesSelect<true>;
97
99
  'api-usage': ApiUsageSelect<false> | ApiUsageSelect<true>;
100
+ subscriptions: SubscriptionsSelect<false> | SubscriptionsSelect<true>;
101
+ 'billing-history': BillingHistorySelect<false> | BillingHistorySelect<true>;
98
102
  products: ProductsSelect<false> | ProductsSelect<true>;
99
103
  'product-variants': ProductVariantsSelect<false> | ProductVariantsSelect<true>;
100
104
  'product-options': ProductOptionsSelect<false> | ProductOptionsSelect<true>;
@@ -650,6 +654,126 @@ interface ApiUsage {
650
654
  updatedAt: string;
651
655
  createdAt: string;
652
656
  }
657
+ /**
658
+ * This interface was referenced by `Config`'s JSON-Schema
659
+ * via the `definition` "subscriptions".
660
+ */
661
+ interface Subscription {
662
+ id: number;
663
+ provider: 'toss' | 'polar';
664
+ currency: 'KRW' | 'USD';
665
+ tenant: number | Tenant;
666
+ plan: 'starter' | 'basic' | 'pro';
667
+ billingCycle: 'monthly' | 'yearly';
668
+ /**
669
+ * 결제 금액 (KRW)
670
+ */
671
+ amount: number;
672
+ status: 'active' | 'past_due' | 'canceled' | 'expired' | 'suspended';
673
+ /**
674
+ * 토스 빌링키 (AES-256-GCM 암호화)
675
+ */
676
+ billingKey?: string | null;
677
+ /**
678
+ * 토스 고객키 (UUID)
679
+ */
680
+ customerKey?: string | null;
681
+ /**
682
+ * 등록된 카드 정보
683
+ */
684
+ cardInfo?: {
685
+ issuerCode?: string | null;
686
+ /**
687
+ * 마스킹된 카드번호
688
+ */
689
+ number?: string | null;
690
+ cardType?: string | null;
691
+ };
692
+ /**
693
+ * Polar subscription ID
694
+ */
695
+ polarSubscriptionId?: string | null;
696
+ /**
697
+ * Polar customer ID
698
+ */
699
+ polarCustomerId?: string | null;
700
+ /**
701
+ * Polar product ID
702
+ */
703
+ polarProductId?: string | null;
704
+ currentPeriodStart?: string | null;
705
+ currentPeriodEnd?: string | null;
706
+ nextBillingDate?: string | null;
707
+ cancelAtPeriodEnd?: boolean | null;
708
+ canceledAt?: string | null;
709
+ cancelReason?: string | null;
710
+ retryCount?: number | null;
711
+ graceDeadline?: string | null;
712
+ lastPaymentError?: string | null;
713
+ pendingPlanChange?: {
714
+ targetPlan?: ('starter' | 'basic' | 'pro') | null;
715
+ targetAmount?: number | null;
716
+ effectiveDate?: string | null;
717
+ };
718
+ updatedAt: string;
719
+ createdAt: string;
720
+ }
721
+ /**
722
+ * This interface was referenced by `Config`'s JSON-Schema
723
+ * via the `definition` "billing-history".
724
+ */
725
+ interface BillingHistory {
726
+ id: number;
727
+ provider: 'toss' | 'polar';
728
+ currency: 'KRW' | 'USD';
729
+ tenant: number | Tenant;
730
+ subscription?: (number | null) | Subscription;
731
+ type: 'payment' | 'refund' | 'plan_change';
732
+ status: 'success' | 'failed' | 'refunded' | 'partial_refund';
733
+ /**
734
+ * 금액 (KRW)
735
+ */
736
+ amount: number;
737
+ /**
738
+ * 토스 결제키
739
+ */
740
+ paymentKey?: string | null;
741
+ /**
742
+ * 고유 주문번호
743
+ */
744
+ orderId: string;
745
+ orderName?: string | null;
746
+ /**
747
+ * 결제 시점 플랜
748
+ */
749
+ plan?: string | null;
750
+ billingCycle?: ('monthly' | 'yearly') | null;
751
+ periodStart?: string | null;
752
+ periodEnd?: string | null;
753
+ /**
754
+ * 토스 API 전체 응답
755
+ */
756
+ tossResponse?: {
757
+ [k: string]: unknown;
758
+ } | unknown[] | string | number | boolean | null;
759
+ /**
760
+ * Polar order ID
761
+ */
762
+ polarOrderId?: string | null;
763
+ /**
764
+ * Polar API 전체 응답
765
+ */
766
+ polarResponse?: {
767
+ [k: string]: unknown;
768
+ } | unknown[] | string | number | boolean | null;
769
+ errorMessage?: string | null;
770
+ /**
771
+ * 재시도 원본 결제 내역
772
+ */
773
+ retryOf?: (number | null) | BillingHistory;
774
+ updatedAt: string;
775
+ createdAt: string;
776
+ }
653
777
  /**
654
778
  * This interface was referenced by `Config`'s JSON-Schema
655
779
  * via the `definition` "products".
@@ -1684,6 +1808,12 @@ interface PayloadLockedDocument {
1684
1808
  } | null) | ({
1685
1809
  relationTo: 'api-usage';
1686
1810
  value: number | ApiUsage;
1811
+ } | null) | ({
1812
+ relationTo: 'subscriptions';
1813
+ value: number | Subscription;
1814
+ } | null) | ({
1815
+ relationTo: 'billing-history';
1816
+ value: number | BillingHistory;
1687
1817
  } | null) | ({
1688
1818
  relationTo: 'products';
1689
1819
  value: number | Product;
@@ -2038,6 +2168,72 @@ interface ApiUsageSelect<T extends boolean = true> {
2038
2168
  updatedAt?: T;
2039
2169
  createdAt?: T;
2040
2170
  }
2171
+ /**
2172
+ * This interface was referenced by `Config`'s JSON-Schema
2173
+ * via the `definition` "subscriptions_select".
2174
+ */
2175
+ interface SubscriptionsSelect<T extends boolean = true> {
2176
+ provider?: T;
2177
+ currency?: T;
2178
+ tenant?: T;
2179
+ plan?: T;
2180
+ billingCycle?: T;
2181
+ amount?: T;
2182
+ status?: T;
2183
+ billingKey?: T;
2184
+ customerKey?: T;
2185
+ cardInfo?: T | {
2186
+ issuerCode?: T;
2187
+ number?: T;
2188
+ cardType?: T;
2189
+ };
2190
+ polarSubscriptionId?: T;
2191
+ polarCustomerId?: T;
2192
+ polarProductId?: T;
2193
+ currentPeriodStart?: T;
2194
+ currentPeriodEnd?: T;
2195
+ nextBillingDate?: T;
2196
+ cancelAtPeriodEnd?: T;
2197
+ canceledAt?: T;
2198
+ cancelReason?: T;
2199
+ retryCount?: T;
2200
+ graceDeadline?: T;
2201
+ lastPaymentError?: T;
2202
+ pendingPlanChange?: T | {
2203
+ targetPlan?: T;
2204
+ targetAmount?: T;
2205
+ effectiveDate?: T;
2206
+ };
2207
+ updatedAt?: T;
2208
+ createdAt?: T;
2209
+ }
2210
+ /**
2211
+ * This interface was referenced by `Config`'s JSON-Schema
2212
+ * via the `definition` "billing-history_select".
2213
+ */
2214
+ interface BillingHistorySelect<T extends boolean = true> {
2215
+ provider?: T;
2216
+ currency?: T;
2217
+ tenant?: T;
2218
+ subscription?: T;
2219
+ type?: T;
2220
+ status?: T;
2221
+ amount?: T;
2222
+ paymentKey?: T;
2223
+ orderId?: T;
2224
+ orderName?: T;
2225
+ plan?: T;
2226
+ billingCycle?: T;
2227
+ periodStart?: T;
2228
+ periodEnd?: T;
2229
+ tossResponse?: T;
2230
+ polarOrderId?: T;
2231
+ polarResponse?: T;
2232
+ errorMessage?: T;
2233
+ retryOf?: T;
2234
+ updatedAt?: T;
2235
+ createdAt?: T;
2236
+ }
2041
2237
  /**
2042
2238
  * This interface was referenced by `Config`'s JSON-Schema
2043
2239
  * via the `definition` "products_select".
@@ -2901,4 +3097,4 @@ declare module 'payload' {
2901
3097
  }
2902
3098
  }
2903
3099
 
2904
- export type { TenantLogosSelect as $, Audience as A, BrandLogo as B, Config as C, Document as D, EmailLog as E, GalleryImage as F, Gallery as G, Form as H, IframeBlock as I, FormSubmission as J, PayloadKv as K, PayloadLockedDocument as L, Media as M, PayloadPreference as N, Order as O, ProductOption as P, PayloadMigration as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, UsersSelect as V, MediaSelect as W, AudiencesSelect as X, EmailLogsSelect as Y, TenantsSelect as Z, TenantMetadataSelect as _, OrderProduct as a, TenantOgImagesSelect as a0, ApiUsageSelect as a1, ProductsSelect as a2, ProductVariantsSelect as a3, ProductOptionsSelect as a4, ProductCategoriesSelect as a5, ProductTagsSelect as a6, ProductImagesSelect as a7, BrandsSelect as a8, BrandLogosSelect as a9, OrdersSelect as aa, OrderProductsSelect as ab, ReturnsSelect as ac, ReturnProductsSelect as ad, TransactionsSelect as ae, PostsSelect as af, PostCategoriesSelect as ag, PostTagsSelect as ah, PostImagesSelect as ai, AuthorsSelect as aj, DocumentsSelect as ak, DocumentCategoriesSelect as al, DocumentImagesSelect as am, PlaylistsSelect as an, PlaylistImagesSelect as ao, MusicsSelect as ap, GalleriesSelect as aq, GalleryImagesSelect as ar, FormsSelect as as, FormSubmissionsSelect as at, PayloadKvSelect as au, PayloadLockedDocumentsSelect as av, PayloadPreferencesSelect as aw, PayloadMigrationsSelect as ax, Auth as ay, PlayerBlock as b, CodeBlock as c, User as d, Tenant as e, TenantMetadatum as f, TenantOgImage as g, TenantLogo as h, ApiUsage as i, Product as j, ProductImage as k, ProductCategory as l, ProductTag as m, Brand as n, ProductVariant as o, ReturnProduct as p, Post as q, PostImage as r, Author as s, PostCategory as t, PostTag as u, DocumentCategory as v, DocumentImage as w, Playlist as x, PlaylistImage as y, Music as z };
3100
+ export type { TenantsSelect as $, Audience as A, BrandLogo as B, Config as C, Document as D, EmailLog as E, PlaylistImage as F, Music as G, Gallery as H, IframeBlock as I, GalleryImage as J, Form as K, FormSubmission as L, Media as M, PayloadKv as N, Order as O, ProductOption as P, PayloadLockedDocument as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, PayloadPreference as V, PayloadMigration as W, UsersSelect as X, MediaSelect as Y, AudiencesSelect as Z, EmailLogsSelect as _, OrderProduct as a, TenantMetadataSelect as a0, TenantLogosSelect as a1, TenantOgImagesSelect as a2, ApiUsageSelect as a3, SubscriptionsSelect as a4, BillingHistorySelect as a5, ProductsSelect as a6, ProductVariantsSelect as a7, ProductOptionsSelect as a8, ProductCategoriesSelect as a9, PayloadPreferencesSelect as aA, PayloadMigrationsSelect as aB, Auth as aC, ProductTagsSelect as aa, ProductImagesSelect as ab, BrandsSelect as ac, BrandLogosSelect as ad, OrdersSelect as ae, OrderProductsSelect as af, ReturnsSelect as ag, ReturnProductsSelect as ah, TransactionsSelect as ai, PostsSelect as aj, PostCategoriesSelect as ak, PostTagsSelect as al, PostImagesSelect as am, AuthorsSelect as an, DocumentsSelect as ao, DocumentCategoriesSelect as ap, DocumentImagesSelect as aq, PlaylistsSelect as ar, PlaylistImagesSelect as as, MusicsSelect as at, GalleriesSelect as au, GalleryImagesSelect as av, FormsSelect as aw, FormSubmissionsSelect as ax, PayloadKvSelect as ay, PayloadLockedDocumentsSelect as az, PlayerBlock as b, CodeBlock as c, User as d, Tenant as e, TenantMetadatum as f, TenantOgImage as g, TenantLogo as h, ApiUsage as i, Subscription as j, BillingHistory as k, Product as l, ProductImage as m, ProductCategory as n, ProductTag as o, Brand as p, ProductVariant as q, ReturnProduct as r, Post as s, PostImage as t, Author as u, PostCategory as v, PostTag as w, DocumentCategory as x, DocumentImage as y, Playlist as z };
@@ -1,4 +1,4 @@
1
- import { C as Config } from './payload-types-DFzDtXGO.js';
1
+ import { C as Config } from './payload-types-D-pPck9V.js';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -6,20 +6,15 @@ import { C as Config } from './payload-types-DFzDtXGO.js';
6
6
  */
7
7
  type Collection = keyof Config['collections'];
8
8
  /**
9
- * Internal Payload collections that should not be exposed via SDK.
9
+ * Array of all public collection names for runtime use (e.g., Zod enum validation).
10
+ * This is the single source of truth for which collections are publicly accessible via SDK.
10
11
  */
11
- declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations"];
12
- type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
12
+ declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "tenant-og-images", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "transactions", "documents", "document-categories", "document-images", "posts", "post-categories", "post-tags", "post-images", "playlists", "playlist-images", "musics", "galleries", "gallery-images", "forms", "form-submissions", "media"];
13
13
  /**
14
14
  * Public collections available for SDK access.
15
- * Excludes internal Payload system collections.
16
- */
17
- type PublicCollection = Exclude<Collection, InternalCollection>;
18
- /**
19
- * Array of all public collection names for runtime use (e.g., Zod enum validation).
20
- * This is derived from Config to ensure type safety.
15
+ * Derived from the COLLECTIONS array (single source of truth).
21
16
  */
22
- declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "tenant-og-images", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "transactions", "documents", "document-categories", "document-images", "posts", "post-categories", "post-tags", "post-images", "playlists", "playlist-images", "musics", "galleries", "gallery-images", "forms", "form-submissions", "media"];
17
+ type PublicCollection = (typeof COLLECTIONS)[number];
23
18
 
24
19
  type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
25
20
 
@@ -37,4 +32,4 @@ declare function isValidWebhookEvent(data: unknown): data is WebhookEvent;
37
32
  declare function handleWebhook<T extends Collection = Collection>(request: Request, handler: WebhookHandler<T>, options?: WebhookOptions): Promise<Response>;
38
33
  declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
39
34
 
40
- export { type Collection as C, type PublicCollection as P, type WebhookOperation as W, type CollectionType as a, COLLECTIONS as b, type WebhookEvent as c, type WebhookHandler as d, type WebhookOptions as e, createTypedWebhookHandler as f, handleWebhook as h, isValidWebhookEvent as i };
35
+ export { type CollectionType as C, type PublicCollection as P, type WebhookOperation as W, type Collection as a, COLLECTIONS as b, type WebhookEvent as c, type WebhookHandler as d, type WebhookOptions as e, createTypedWebhookHandler as f, handleWebhook as h, isValidWebhookEvent as i };
@@ -1,4 +1,4 @@
1
- import { C as Config } from './payload-types-DFzDtXGO.cjs';
1
+ import { C as Config } from './payload-types-D-pPck9V.cjs';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -6,20 +6,15 @@ import { C as Config } from './payload-types-DFzDtXGO.cjs';
6
6
  */
7
7
  type Collection = keyof Config['collections'];
8
8
  /**
9
- * Internal Payload collections that should not be exposed via SDK.
9
+ * Array of all public collection names for runtime use (e.g., Zod enum validation).
10
+ * This is the single source of truth for which collections are publicly accessible via SDK.
10
11
  */
11
- declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations"];
12
- type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
12
+ declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "tenant-og-images", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "transactions", "documents", "document-categories", "document-images", "posts", "post-categories", "post-tags", "post-images", "playlists", "playlist-images", "musics", "galleries", "gallery-images", "forms", "form-submissions", "media"];
13
13
  /**
14
14
  * Public collections available for SDK access.
15
- * Excludes internal Payload system collections.
16
- */
17
- type PublicCollection = Exclude<Collection, InternalCollection>;
18
- /**
19
- * Array of all public collection names for runtime use (e.g., Zod enum validation).
20
- * This is derived from Config to ensure type safety.
15
+ * Derived from the COLLECTIONS array (single source of truth).
21
16
  */
22
- declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "tenant-og-images", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-images", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "transactions", "documents", "document-categories", "document-images", "posts", "post-categories", "post-tags", "post-images", "playlists", "playlist-images", "musics", "galleries", "gallery-images", "forms", "form-submissions", "media"];
17
+ type PublicCollection = (typeof COLLECTIONS)[number];
23
18
 
24
19
  type CollectionType<T extends Collection> = T extends keyof Config['collections'] ? Config['collections'][T] : never;
25
20
 
@@ -37,4 +32,4 @@ declare function isValidWebhookEvent(data: unknown): data is WebhookEvent;
37
32
  declare function handleWebhook<T extends Collection = Collection>(request: Request, handler: WebhookHandler<T>, options?: WebhookOptions): Promise<Response>;
38
33
  declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
39
34
 
40
- export { type Collection as C, type PublicCollection as P, type WebhookOperation as W, type CollectionType as a, COLLECTIONS as b, type WebhookEvent as c, type WebhookHandler as d, type WebhookOptions as e, createTypedWebhookHandler as f, handleWebhook as h, isValidWebhookEvent as i };
35
+ export { type CollectionType as C, type PublicCollection as P, type WebhookOperation as W, type Collection as a, COLLECTIONS as b, type WebhookEvent as c, type WebhookHandler as d, type WebhookOptions as e, createTypedWebhookHandler as f, handleWebhook as h, isValidWebhookEvent as i };
@@ -1,2 +1,2 @@
1
- export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-DJCQSO6S.cjs';
2
- import './payload-types-DFzDtXGO.cjs';
1
+ export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-CeKIz4r5.cjs';
2
+ import './payload-types-D-pPck9V.cjs';
package/dist/webhook.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-CGpSMkNA.js';
2
- import './payload-types-DFzDtXGO.js';
1
+ export { c as WebhookEvent, d as WebhookHandler, W as WebhookOperation, e as WebhookOptions, f as createTypedWebhookHandler, h as handleWebhook, i as isValidWebhookEvent } from './webhook-CC3SGR_a.js';
2
+ import './payload-types-D-pPck9V.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@01.software/sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "01.software SDK",
5
5
  "author": "<office@01.works>",
6
6
  "keywords": [],