zpan-cloud-sdk 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,188 +1,103 @@
1
1
  import { hc } from 'hono/client';
2
2
  import { z } from 'zod';
3
- import { S as StoreType, a as StoreStatus, P as ProductType, D as Deliverable, C as CommerceOrder, b as PaymentProvider, c as adminUserListQuerySchema, d as adminUserPatchSchema, e as billingPortalSessionSchema, f as createOrderSchema, g as createProductSchema, h as giftCardCampaignCreateSchema, i as giftCardCampaignListQuerySchema, j as giftCardCreateSchema, k as giftCardListQuerySchema, l as giftCardPatchSchema, o as orderPatchSchema, p as pairingActionSchema, m as createPairingSchema, n as paymentSchema, q as productListQuerySchema, r as CommerceProduct, s as CommerceStore, t as storePatchSchema, u as updateProductSchema, v as usageEventCreateSchema, w as walletRedemptionSchema } from './schemas-R0lkMmfq.js';
4
- export { x as CommerceOrderItem, y as CommercePayment, z as CreateOrderRequest, A as CreatePaymentRequest, B as CreateProductRequest, E as ProductMetadata, F as ProductPrice, U as UpdateProductRequest, G as accountBillingQuerySchema, H as accountUsagePeriodSchema, I as accountUsageQuerySchema, J as deliverableSchema, K as orderListQuerySchema, L as paginationQuerySchema, M as productMetadataSchema, N as productPriceSchema } from './schemas-R0lkMmfq.js';
3
+ import { accountBillingResponseSchema, accountMembershipResponseSchema, accountOverviewResponseSchema, accountWalletResponseSchema, adminUserListResponseSchema, adminUserListQuerySchema, adminUserPatchSchema, giftCardCampaignSchema, storeGiftCardSchema, commerceOrderSchema, billingPortalSessionSchema, billingPortalSessionResponseSchema, boundLicenseSchema, commerceProductSchema, commerceStoreSchema, createOrderSchema, paymentSchema, createProductSchema, entitlementRefreshResponseSchema, giftCardCampaignCreateSchema, giftCardCampaignListQuerySchema, giftCardCampaignListResponseSchema, giftCardCreateSchema, giftCardListQuerySchema, giftCardListResponseSchema, giftCardPatchSchema, licenseAssertionSchema, licenseListResponseSchema, orderListResponseSchema, orderPatchSchema, pageSchema, pairingActionSchema, pairingActionResponseSchema, createPairingSchema, pairingCreateResponseSchema, pairingPollResponseSchema, pairingPreviewSchema, paymentCreateResponseSchema, productListQuerySchema, productListResponseSchema, storeListResponseSchema, storePatchSchema, updateProductSchema, usageEventCreateSchema, usageEventCreateResponseSchema, usageSummarySchema, walletBalanceSchema, walletBalanceListResponseSchema, walletLedgerEntrySchema, walletLedgerResponseSchema, walletRedemptionSchema, walletRedemptionResponseSchema } from './schemas.js';
4
+ export { accountBillingQuerySchema, accountUsagePeriodSchema, accountUsageQuerySchema, adminUserSchema, billingRecordItemSchema, billingRecordSchema, billingSummarySchema, commerceOrderItemSchema, commercePaymentSchema, deliverableSchema, membershipStripeChannelSchema, orderListQuerySchema, paginationQuerySchema, productMetadataSchema, productPriceSchema, usageResourceSummarySchema } from './schemas.js';
5
5
  import * as hono_utils_types from 'hono/utils/types';
6
6
  import * as hono_hono_base from 'hono/hono-base';
7
7
  import * as hono_utils_http_status from 'hono/utils/http-status';
8
8
  import * as hono_types from 'hono/types';
9
9
 
10
- type UsageResource = 'traffic_egress';
11
- interface UsageResourceSummary {
12
- used: number;
13
- included: number;
14
- overageBytes: number;
15
- overageGb: number;
16
- }
17
- interface UsageSummary {
18
- period: string;
19
- resources: Record<UsageResource, UsageResourceSummary>;
20
- nextReset: string;
21
- }
22
-
23
- type MembershipTier = 'none' | 'silver' | 'gold' | 'premier';
24
- type PairingStatus = 'pending' | 'approved' | 'denied' | 'expired';
25
- interface LicenseAssertion {
26
- type: 'zpan.license';
27
- issuer: string;
28
- subject: string;
29
- accountId: string;
30
- instanceId: string;
31
- storeId: string;
32
- edition: 'pro';
33
- authorizedHosts: string[];
34
- licenseValidUntil: number;
35
- issuedAt: number;
36
- notBefore: number;
37
- expiresAt: number;
38
- }
39
-
40
- interface AccountOverview {
41
- activeLicenses: number;
42
- membershipTier: MembershipTier;
43
- latestBillingDate: string | null;
44
- }
45
- interface BoundLicense {
46
- id: string;
47
- name: string;
48
- url: string;
49
- version: string | null;
50
- plan: string;
51
- lastSeenAt: string | null;
52
- }
53
- type MembershipViewState = 'inactive' | 'active' | 'renewal_due' | 'expired';
54
- type MembershipStatus = 'inactive' | 'active' | 'expired';
55
- type MembershipPrimaryAction = 'subscribe' | 'renew' | 'manage';
56
- interface MembershipStripeChannel {
57
- status: string;
58
- billingInterval: string | null;
59
- renewsAt: string | null;
60
- cancelAtPeriodEnd: boolean;
61
- }
62
- interface MembershipOverview {
63
- state: MembershipViewState;
64
- tier: MembershipTier;
65
- membershipStatus: MembershipStatus;
66
- expiresAt: string | null;
67
- cumulativeMonths: number;
68
- proIncluded: boolean;
69
- primaryAction: MembershipPrimaryAction;
70
- stripeSubscription: MembershipStripeChannel | null;
71
- channel: 'stripe' | 'gift';
72
- }
73
- type BillingOrderStatus = 'pending' | 'paid' | 'fulfilled' | 'failed' | 'canceled' | 'refunded';
74
- type BillingOrderPaymentStatus = 'unpaid' | 'pending' | 'paid' | 'failed' | 'refunded' | 'canceled';
75
- type BillingOrderFulfillmentStatus = 'pending' | 'fulfilled' | 'failed' | 'canceled';
76
- type BillingRecordKind = 'store_item' | 'store_subscription' | 'mixed_order';
77
- interface BillingRecordItem {
78
- name: string;
79
- productType: string;
80
- quantity: number;
81
- deliverable: Record<string, unknown>;
82
- recurring: boolean;
83
- }
84
- interface BillingRecord {
85
- id: string;
86
- title: string;
87
- kind: BillingRecordKind;
88
- items: BillingRecordItem[];
89
- orderStatus: BillingOrderStatus;
90
- paymentStatus: BillingOrderPaymentStatus;
91
- fulfillmentStatus: BillingOrderFulfillmentStatus;
92
- amountLabel: string | null;
93
- occurredAt: string;
94
- paidAt: string | null;
95
- fulfilledAt: string | null;
96
- }
97
- interface BillingSummary {
98
- totalRecords: number;
99
- stripeRecords: number;
100
- walletBalanceAmount: number;
101
- walletCurrency: string | null;
102
- latestAt: string | null;
103
- }
104
- interface WalletBalance {
105
- id: string;
106
- walletId: string | null;
107
- storeId: string;
108
- customerId: string | null;
109
- currency: string;
110
- availableAmount: number;
111
- pendingAmount: number;
112
- stripeCustomerId: string | null;
113
- updatedAt: string;
114
- }
115
- interface WalletLedgerEntry {
116
- id: string;
117
- walletId: string | null;
118
- storeId: string;
119
- customerId: string | null;
120
- currency: string;
121
- amount: number;
122
- direction: 'credit' | 'debit';
123
- status: 'posted' | 'pending' | 'released' | 'refunded';
124
- sourceType: 'gift_card_redemption' | 'order_payment' | 'stripe_invoice' | 'adjustment' | 'refund';
125
- sourceId: string | null;
126
- orderId: string | null;
127
- paymentId: string | null;
128
- stripeCustomerBalanceTransactionId: string | null;
129
- createdAt: string;
130
- }
131
- interface OffsetPage<T> {
132
- items: T[];
133
- total: number;
134
- limit: number;
135
- offset: number;
136
- }
137
- interface AccountWallet extends OffsetPage<WalletLedgerEntry> {
138
- balances: WalletBalance[];
139
- }
140
- interface BillingOverview {
141
- summary: BillingSummary;
142
- walletBalances: WalletBalance[];
143
- walletLedger: OffsetPage<WalletLedgerEntry>;
144
- items: BillingRecord[];
145
- total: number;
146
- limit: number;
147
- offset: number;
148
- }
149
-
150
- type StoreGiftCard = {
151
- id: string;
152
- storeId: string;
153
- campaignId: string | null;
154
- code: string | null;
155
- codeLast4: string;
156
- amount: number;
157
- currency: string;
158
- status: 'active' | 'redeemed' | 'disabled' | 'expired' | 'revoked';
159
- expiresAt: string | null;
160
- createdAt: string;
161
- updatedAt: string;
162
- disabledAt: string | null;
163
- revokedAt: string | null;
164
- createdByAdmin: string;
10
+ type Page<T> = z.infer<ReturnType<typeof pageSchema<z.ZodType<T>>>>;
11
+ type PaginationQuery = {
12
+ limit?: string;
13
+ offset?: string;
165
14
  };
166
- type GiftCardCampaign = {
167
- id: string;
168
- storeId: string;
169
- name: string;
170
- status: 'active' | 'disabled' | 'ended';
171
- startsAt: string | null;
172
- expiresAt: string | null;
173
- createdByAdmin: string;
174
- createdAt: string;
175
- updatedAt: string;
15
+ type PairingCreateRequest = z.infer<typeof createPairingSchema>;
16
+ type PairingCreateResponse = z.infer<typeof pairingCreateResponseSchema>;
17
+ type PairingPreview = z.infer<typeof pairingPreviewSchema>;
18
+ type PairingPollResponse = z.infer<typeof pairingPollResponseSchema>;
19
+ type PairingActionRequest = z.infer<typeof pairingActionSchema>;
20
+ type PairingActionResponse = z.infer<typeof pairingActionResponseSchema>;
21
+ type EntitlementRefreshResponse = z.infer<typeof entitlementRefreshResponseSchema>;
22
+ type CommerceStore = z.infer<typeof commerceStoreSchema>;
23
+ type CommerceProduct = z.infer<typeof commerceProductSchema>;
24
+ type CommerceOrder = z.infer<typeof commerceOrderSchema>;
25
+ type ProductType$1 = CommerceProduct['type'];
26
+ type ProductListQuery = Partial<Record<keyof z.infer<typeof productListQuerySchema>, string>>;
27
+ type CreateProductInput = z.infer<typeof createProductSchema>;
28
+ type UpdateProductInput = z.infer<typeof updateProductSchema>;
29
+ type OrderListQuery = PaginationQuery & {
30
+ paymentStatus?: CommerceOrder['paymentStatus'];
31
+ fulfillmentStatus?: CommerceOrder['fulfillmentStatus'];
32
+ customerId?: string;
176
33
  };
177
- type CreateGiftCardRequest = {
178
- amount: number;
179
- currency: string;
180
- expires_at?: string | null;
181
- campaignId?: string | null;
34
+ type CreateOrderInput = z.infer<typeof createOrderSchema>;
35
+ type CreateOrderRequest = CreateOrderInput;
36
+ type OrderPatchRequest = z.infer<typeof orderPatchSchema>;
37
+ type PaymentCreateRequest = z.infer<typeof paymentSchema>;
38
+ type CreatePaymentRequest = PaymentCreateRequest;
39
+ type PaymentCreateResponse = z.infer<typeof paymentCreateResponseSchema>;
40
+ type BillingPortalSessionRequest = z.infer<typeof billingPortalSessionSchema>;
41
+ type BillingPortalSessionResponse = z.infer<typeof billingPortalSessionResponseSchema>;
42
+ type StoreGiftCard = z.infer<typeof storeGiftCardSchema>;
43
+ type GiftCardCampaign = z.infer<typeof giftCardCampaignSchema>;
44
+ type GiftCardListQuery = PaginationQuery & {
45
+ status?: StoreGiftCard['status'];
46
+ campaignId?: string;
182
47
  };
183
- type CreateGiftCardsRequest = CreateGiftCardRequest & {
184
- count?: number;
48
+ type GiftCardCampaignListQuery = PaginationQuery & {
49
+ status?: GiftCardCampaign['status'];
50
+ };
51
+ type GiftCardCreateRequest = z.infer<typeof giftCardCreateSchema>;
52
+ type GiftCardPatchRequest = z.infer<typeof giftCardPatchSchema>;
53
+ type GiftCardCampaignCreateRequest = z.infer<typeof giftCardCampaignCreateSchema>;
54
+ type GiftCardListInput = z.infer<typeof giftCardListQuerySchema>;
55
+ type GiftCardCampaignListInput = z.infer<typeof giftCardCampaignListQuerySchema>;
56
+ type UsageEventCreateRequest = z.infer<typeof usageEventCreateSchema>;
57
+ type UsageEventCreateResponse = z.infer<typeof usageEventCreateResponseSchema>;
58
+ type UsageSummaryResponse = z.infer<typeof usageSummarySchema>;
59
+ type UsageSummary = UsageSummaryResponse;
60
+ type WalletBalance = z.infer<typeof walletBalanceSchema>;
61
+ type WalletLedgerEntry = z.infer<typeof walletLedgerEntrySchema>;
62
+ type WalletRedemptionRequest = z.infer<typeof walletRedemptionSchema>;
63
+ type WalletRedemptionResponse = z.infer<typeof walletRedemptionResponseSchema>;
64
+ type StorePatchRequest = z.infer<typeof storePatchSchema>;
65
+ type AdminUser = z.infer<typeof adminUserListResponseSchema>['items'][number];
66
+ type AdminUserListQuery = PaginationQuery & {
67
+ search?: string;
68
+ membershipTier?: AdminUser['membershipTier'];
185
69
  };
70
+ type AdminUserPatchRequest = z.infer<typeof adminUserPatchSchema>;
71
+ type AdminUserListInput = z.infer<typeof adminUserListQuerySchema>;
72
+ type AdminLicenseListQuery = PaginationQuery & {
73
+ accountId?: string;
74
+ host?: string;
75
+ };
76
+ type BoundLicense = z.infer<typeof boundLicenseSchema>;
77
+ type LicenseAssertionResponse = z.infer<typeof licenseAssertionSchema>;
78
+ type AccountOverviewResponse = z.infer<typeof accountOverviewResponseSchema>;
79
+ type AccountMembershipResponse = z.infer<typeof accountMembershipResponseSchema>;
80
+ type AccountBillingResponse = z.infer<typeof accountBillingResponseSchema>;
81
+ type AccountWalletResponse = z.infer<typeof accountWalletResponseSchema>;
82
+ type MembershipTier = AccountMembershipResponse['tier'];
83
+ type AccountOverview = AccountOverviewResponse;
84
+ type MembershipOverview = AccountMembershipResponse;
85
+ type BillingOverview = AccountBillingResponse;
86
+ type AccountWallet = AccountWalletResponse;
87
+ type BillingRecord = AccountBillingResponse['items'][number];
88
+ type LicenseListResponse = z.infer<typeof licenseListResponseSchema>;
89
+ type StoreListResponse = z.infer<typeof storeListResponseSchema>;
90
+ type ProductListResponse = z.infer<typeof productListResponseSchema>;
91
+ type OrderListResponse = z.infer<typeof orderListResponseSchema>;
92
+ type GiftCardListResponse = z.infer<typeof giftCardListResponseSchema>;
93
+ type GiftCardCampaignListResponse = z.infer<typeof giftCardCampaignListResponseSchema>;
94
+ type WalletBalanceListResponse = z.infer<typeof walletBalanceListResponseSchema>;
95
+ type WalletLedgerResponse = z.infer<typeof walletLedgerResponseSchema>;
96
+
97
+ type StoreType = 'cloud' | 'instance';
98
+ type StoreStatus = 'active' | 'disabled';
99
+ type ProductType = 'store_item';
100
+ type PaymentProvider = 'stripe' | 'gift_card' | 'wallet';
186
101
 
187
102
  declare const pairingsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
188
103
  "/": {
@@ -229,7 +144,7 @@ declare const pairingsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
229
144
  };
230
145
  };
231
146
  output: {
232
- status: Extract<PairingStatus, "pending" | "denied" | "expired">;
147
+ status: "pending" | "expired" | "denied";
233
148
  } | {
234
149
  status: "approved";
235
150
  refreshToken: string;
@@ -262,7 +177,7 @@ declare const pairingsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
262
177
  };
263
178
  };
264
179
  output: {
265
- status: "approved" | "denied";
180
+ status: "denied" | "approved";
266
181
  };
267
182
  outputFormat: "json";
268
183
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -339,7 +254,7 @@ declare const accountOverviewRouter: hono_hono_base.HonoBase<hono_types.BlankEnv
339
254
  input: {};
340
255
  output: {
341
256
  activeLicenses: number;
342
- membershipTier: MembershipTier;
257
+ membershipTier: "none" | "silver" | "gold" | "premier";
343
258
  latestBillingDate: string | null;
344
259
  };
345
260
  outputFormat: "json";
@@ -352,13 +267,13 @@ declare const accountMembershipRouter: hono_hono_base.HonoBase<hono_types.BlankE
352
267
  $get: {
353
268
  input: {};
354
269
  output: {
355
- state: MembershipViewState;
356
- tier: MembershipTier;
357
- membershipStatus: MembershipStatus;
270
+ state: "active" | "expired" | "inactive" | "renewal_due";
271
+ tier: "none" | "silver" | "gold" | "premier";
272
+ membershipStatus: "active" | "expired" | "inactive";
358
273
  expiresAt: string | null;
359
274
  cumulativeMonths: number;
360
275
  proIncluded: boolean;
361
- primaryAction: MembershipPrimaryAction;
276
+ primaryAction: "subscribe" | "renew" | "manage";
362
277
  stripeSubscription: {
363
278
  status: string;
364
279
  billingInterval: string | null;
@@ -409,7 +324,7 @@ declare const accountBillingRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
409
324
  currency: string;
410
325
  amount: number;
411
326
  direction: "credit" | "debit";
412
- status: "posted" | "pending" | "released" | "refunded";
327
+ status: "pending" | "refunded" | "posted" | "released";
413
328
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
414
329
  sourceId: string | null;
415
330
  orderId: string | null;
@@ -424,7 +339,7 @@ declare const accountBillingRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
424
339
  items: {
425
340
  id: string;
426
341
  title: string;
427
- kind: BillingRecordKind;
342
+ kind: "store_item" | "store_subscription" | "mixed_order";
428
343
  items: {
429
344
  name: string;
430
345
  productType: string;
@@ -434,9 +349,9 @@ declare const accountBillingRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
434
349
  };
435
350
  recurring: boolean;
436
351
  }[];
437
- orderStatus: BillingOrderStatus;
438
- paymentStatus: BillingOrderPaymentStatus;
439
- fulfillmentStatus: BillingOrderFulfillmentStatus;
352
+ orderStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
353
+ paymentStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "unpaid";
354
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
440
355
  amountLabel: string | null;
441
356
  occurredAt: string;
442
357
  paidAt: string | null;
@@ -514,17 +429,6 @@ declare const accountWalletRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
514
429
  };
515
430
  };
516
431
  output: {
517
- balances: {
518
- id: string;
519
- walletId: string | null;
520
- storeId: string;
521
- customerId: string | null;
522
- currency: string;
523
- availableAmount: number;
524
- pendingAmount: number;
525
- stripeCustomerId: string | null;
526
- updatedAt: string;
527
- }[];
528
432
  items: {
529
433
  id: string;
530
434
  walletId: string | null;
@@ -533,7 +437,7 @@ declare const accountWalletRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
533
437
  currency: string;
534
438
  amount: number;
535
439
  direction: "credit" | "debit";
536
- status: "posted" | "pending" | "released" | "refunded";
440
+ status: "pending" | "refunded" | "posted" | "released";
537
441
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
538
442
  sourceId: string | null;
539
443
  orderId: string | null;
@@ -544,6 +448,17 @@ declare const accountWalletRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
544
448
  total: number;
545
449
  limit: number;
546
450
  offset: number;
451
+ balances: {
452
+ id: string;
453
+ walletId: string | null;
454
+ storeId: string;
455
+ customerId: string | null;
456
+ currency: string;
457
+ availableAmount: number;
458
+ pendingAmount: number;
459
+ stripeCustomerId: string | null;
460
+ updatedAt: string;
461
+ }[];
547
462
  };
548
463
  outputFormat: "json";
549
464
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -585,7 +500,7 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
585
500
  items: {
586
501
  id: string;
587
502
  storeId: string;
588
- type: ProductType;
503
+ type: "store_item";
589
504
  name: string;
590
505
  description: string | null;
591
506
  active: boolean;
@@ -596,9 +511,9 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
596
511
  };
597
512
  };
598
513
  prices: {
599
- id?: string | undefined;
600
514
  currency: string;
601
515
  amount: number;
516
+ id?: string | undefined;
602
517
  lookupKey?: string | null | undefined;
603
518
  nickname?: string | null | undefined;
604
519
  recurring?: {
@@ -629,7 +544,7 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
629
544
  type: "store_item";
630
545
  name: string;
631
546
  metadata: {
632
- deliverable: Deliverable;
547
+ deliverable: Record<string, unknown>;
633
548
  };
634
549
  prices: {
635
550
  currency: string;
@@ -738,7 +653,7 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
738
653
  active?: boolean | undefined;
739
654
  sortOrder?: number | undefined;
740
655
  metadata?: {
741
- deliverable: Deliverable;
656
+ deliverable: Record<string, unknown>;
742
657
  } | undefined;
743
658
  prices?: {
744
659
  currency: string;
@@ -883,7 +798,7 @@ declare const storeGiftCardsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
883
798
  codeLast4: string;
884
799
  amount: number;
885
800
  currency: string;
886
- status: "active" | "redeemed" | "disabled" | "expired" | "revoked";
801
+ status: "active" | "disabled" | "redeemed" | "expired" | "revoked";
887
802
  expiresAt: string | null;
888
803
  createdAt: string;
889
804
  updatedAt: string;
@@ -1005,7 +920,7 @@ declare const usageEventsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1005
920
  };
1006
921
  };
1007
922
  output: {
1008
- resource: UsageResource;
923
+ resource: "traffic_egress";
1009
924
  quantity: number;
1010
925
  duplicate: boolean;
1011
926
  };
@@ -1034,9 +949,9 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1034
949
  target: {
1035
950
  [x: string]: hono_utils_types.JSONValue;
1036
951
  } | null;
1037
- status: "pending" | "paid" | "fulfilled" | "failed" | "canceled" | "refunded";
1038
- paymentStatus: "unpaid" | "pending" | "paid" | "failed" | "refunded" | "canceled";
1039
- fulfillmentStatus: "pending" | "fulfilled" | "failed" | "canceled";
952
+ status: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
953
+ paymentStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "unpaid";
954
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
1040
955
  subtotalAmount: number;
1041
956
  discountAmount: number;
1042
957
  totalAmount: number;
@@ -1055,10 +970,14 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1055
970
  [x: string]: hono_utils_types.JSONValue;
1056
971
  };
1057
972
  }[];
973
+ createdAt: string;
974
+ paidAt: string | null;
975
+ fulfilledAt: string | null;
976
+ canceledAt: string | null;
1058
977
  payments?: {
1059
978
  id: string;
1060
979
  orderId: string;
1061
- provider: PaymentProvider;
980
+ provider: "stripe" | "gift_card" | "wallet";
1062
981
  amount: number;
1063
982
  currency: string;
1064
983
  status: "pending" | "paid" | "failed" | "refunded" | "canceled";
@@ -1067,10 +986,6 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1067
986
  createdAt: string;
1068
987
  paidAt: string | null;
1069
988
  }[] | undefined;
1070
- createdAt: string;
1071
- paidAt: string | null;
1072
- fulfilledAt: string | null;
1073
- canceledAt: string | null;
1074
989
  }[];
1075
990
  total: number;
1076
991
  limit: number;
@@ -1277,10 +1192,16 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1277
1192
  };
1278
1193
  };
1279
1194
  output: {
1280
- paymentId?: string | undefined;
1195
+ status: "pending";
1196
+ paymentId: string;
1197
+ orderId: string;
1198
+ url: string;
1199
+ reused?: boolean | undefined;
1200
+ } | {
1201
+ status: "paid";
1281
1202
  orderId: string;
1282
1203
  url: string | null;
1283
- status: "pending" | "paid";
1204
+ paymentId?: string | undefined;
1284
1205
  reused?: boolean | undefined;
1285
1206
  };
1286
1207
  outputFormat: "json";
@@ -1342,11 +1263,11 @@ declare const adminStoresRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1342
1263
  output: {
1343
1264
  items: {
1344
1265
  id: string;
1345
- type: StoreType;
1266
+ type: "cloud" | "instance";
1346
1267
  name: string;
1347
1268
  ownerAccountId: string | null;
1348
1269
  boundLicenseId: string | null;
1349
- status: StoreStatus;
1270
+ status: "active" | "disabled";
1350
1271
  createdAt: string;
1351
1272
  updatedAt: string;
1352
1273
  }[];
@@ -1416,7 +1337,7 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1416
1337
  limit?: string | undefined;
1417
1338
  offset?: string | undefined;
1418
1339
  search?: string | undefined;
1419
- membershipTier?: MembershipTier | undefined;
1340
+ membershipTier?: AdminUser["membershipTier"] | undefined;
1420
1341
  };
1421
1342
  };
1422
1343
  output: {
@@ -1429,8 +1350,8 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1429
1350
  createdAt: string;
1430
1351
  updatedAt: string;
1431
1352
  role: "user" | "admin";
1432
- membershipTier: MembershipTier;
1433
- membershipStatus: "active" | "inactive" | "expired";
1353
+ membershipTier: "none" | "silver" | "gold" | "premier";
1354
+ membershipStatus: "active" | "expired" | "inactive";
1434
1355
  }[];
1435
1356
  total: number;
1436
1357
  limit: number;
@@ -1447,7 +1368,7 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1447
1368
  json: {
1448
1369
  role?: "user" | "admin" | undefined;
1449
1370
  membershipTier?: "none" | "silver" | "gold" | "premier" | undefined;
1450
- membershipStatus?: "active" | "inactive" | "expired" | undefined;
1371
+ membershipStatus?: "active" | "expired" | "inactive" | undefined;
1451
1372
  };
1452
1373
  } & {
1453
1374
  param: {
@@ -1463,8 +1384,8 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1463
1384
  createdAt: string;
1464
1385
  updatedAt: string;
1465
1386
  role: "user" | "admin";
1466
- membershipTier: MembershipTier;
1467
- membershipStatus: "active" | "inactive" | "expired";
1387
+ membershipTier: "none" | "silver" | "gold" | "premier";
1388
+ membershipStatus: "active" | "expired" | "inactive";
1468
1389
  };
1469
1390
  outputFormat: "json";
1470
1391
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -1516,7 +1437,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1516
1437
  };
1517
1438
  };
1518
1439
  output: {
1519
- status: Extract<PairingStatus, "pending" | "denied" | "expired">;
1440
+ status: "pending" | "expired" | "denied";
1520
1441
  } | {
1521
1442
  status: "approved";
1522
1443
  refreshToken: string;
@@ -1549,7 +1470,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1549
1470
  };
1550
1471
  };
1551
1472
  output: {
1552
- status: "approved" | "denied";
1473
+ status: "denied" | "approved";
1553
1474
  };
1554
1475
  outputFormat: "json";
1555
1476
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -1583,13 +1504,13 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1583
1504
  $get: {
1584
1505
  input: {};
1585
1506
  output: {
1586
- state: MembershipViewState;
1587
- tier: MembershipTier;
1588
- membershipStatus: MembershipStatus;
1507
+ state: "active" | "expired" | "inactive" | "renewal_due";
1508
+ tier: "none" | "silver" | "gold" | "premier";
1509
+ membershipStatus: "active" | "expired" | "inactive";
1589
1510
  expiresAt: string | null;
1590
1511
  cumulativeMonths: number;
1591
1512
  proIncluded: boolean;
1592
- primaryAction: MembershipPrimaryAction;
1513
+ primaryAction: "subscribe" | "renew" | "manage";
1593
1514
  stripeSubscription: {
1594
1515
  status: string;
1595
1516
  billingInterval: string | null;
@@ -1639,7 +1560,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1639
1560
  currency: string;
1640
1561
  amount: number;
1641
1562
  direction: "credit" | "debit";
1642
- status: "posted" | "pending" | "released" | "refunded";
1563
+ status: "pending" | "refunded" | "posted" | "released";
1643
1564
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
1644
1565
  sourceId: string | null;
1645
1566
  orderId: string | null;
@@ -1654,7 +1575,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1654
1575
  items: {
1655
1576
  id: string;
1656
1577
  title: string;
1657
- kind: BillingRecordKind;
1578
+ kind: "store_item" | "store_subscription" | "mixed_order";
1658
1579
  items: {
1659
1580
  name: string;
1660
1581
  productType: string;
@@ -1664,9 +1585,9 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1664
1585
  };
1665
1586
  recurring: boolean;
1666
1587
  }[];
1667
- orderStatus: BillingOrderStatus;
1668
- paymentStatus: BillingOrderPaymentStatus;
1669
- fulfillmentStatus: BillingOrderFulfillmentStatus;
1588
+ orderStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
1589
+ paymentStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "unpaid";
1590
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
1670
1591
  amountLabel: string | null;
1671
1592
  occurredAt: string;
1672
1593
  paidAt: string | null;
@@ -1742,17 +1663,6 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1742
1663
  };
1743
1664
  };
1744
1665
  output: {
1745
- balances: {
1746
- id: string;
1747
- walletId: string | null;
1748
- storeId: string;
1749
- customerId: string | null;
1750
- currency: string;
1751
- availableAmount: number;
1752
- pendingAmount: number;
1753
- stripeCustomerId: string | null;
1754
- updatedAt: string;
1755
- }[];
1756
1666
  items: {
1757
1667
  id: string;
1758
1668
  walletId: string | null;
@@ -1761,7 +1671,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1761
1671
  currency: string;
1762
1672
  amount: number;
1763
1673
  direction: "credit" | "debit";
1764
- status: "posted" | "pending" | "released" | "refunded";
1674
+ status: "pending" | "refunded" | "posted" | "released";
1765
1675
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
1766
1676
  sourceId: string | null;
1767
1677
  orderId: string | null;
@@ -1772,6 +1682,17 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1772
1682
  total: number;
1773
1683
  limit: number;
1774
1684
  offset: number;
1685
+ balances: {
1686
+ id: string;
1687
+ walletId: string | null;
1688
+ storeId: string;
1689
+ customerId: string | null;
1690
+ currency: string;
1691
+ availableAmount: number;
1692
+ pendingAmount: number;
1693
+ stripeCustomerId: string | null;
1694
+ updatedAt: string;
1695
+ }[];
1775
1696
  };
1776
1697
  outputFormat: "json";
1777
1698
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -1842,7 +1763,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1842
1763
  input: {};
1843
1764
  output: {
1844
1765
  activeLicenses: number;
1845
- membershipTier: MembershipTier;
1766
+ membershipTier: "none" | "silver" | "gold" | "premier";
1846
1767
  latestBillingDate: string | null;
1847
1768
  };
1848
1769
  outputFormat: "json";
@@ -1864,7 +1785,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1864
1785
  items: {
1865
1786
  id: string;
1866
1787
  storeId: string;
1867
- type: ProductType;
1788
+ type: "store_item";
1868
1789
  name: string;
1869
1790
  description: string | null;
1870
1791
  active: boolean;
@@ -1875,9 +1796,9 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1875
1796
  };
1876
1797
  };
1877
1798
  prices: {
1878
- id?: string | undefined;
1879
1799
  currency: string;
1880
1800
  amount: number;
1801
+ id?: string | undefined;
1881
1802
  lookupKey?: string | null | undefined;
1882
1803
  nickname?: string | null | undefined;
1883
1804
  recurring?: {
@@ -1908,7 +1829,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1908
1829
  type: "store_item";
1909
1830
  name: string;
1910
1831
  metadata: {
1911
- deliverable: Deliverable;
1832
+ deliverable: Record<string, unknown>;
1912
1833
  };
1913
1834
  prices: {
1914
1835
  currency: string;
@@ -2017,7 +1938,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2017
1938
  active?: boolean | undefined;
2018
1939
  sortOrder?: number | undefined;
2019
1940
  metadata?: {
2020
- deliverable: Deliverable;
1941
+ deliverable: Record<string, unknown>;
2021
1942
  } | undefined;
2022
1943
  prices?: {
2023
1944
  currency: string;
@@ -2161,7 +2082,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2161
2082
  codeLast4: string;
2162
2083
  amount: number;
2163
2084
  currency: string;
2164
- status: "active" | "redeemed" | "disabled" | "expired" | "revoked";
2085
+ status: "active" | "disabled" | "redeemed" | "expired" | "revoked";
2165
2086
  expiresAt: string | null;
2166
2087
  createdAt: string;
2167
2088
  updatedAt: string;
@@ -2282,7 +2203,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2282
2203
  };
2283
2204
  };
2284
2205
  output: {
2285
- resource: UsageResource;
2206
+ resource: "traffic_egress";
2286
2207
  quantity: number;
2287
2208
  duplicate: boolean;
2288
2209
  };
@@ -2310,9 +2231,9 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2310
2231
  target: {
2311
2232
  [x: string]: hono_utils_types.JSONValue;
2312
2233
  } | null;
2313
- status: "pending" | "paid" | "fulfilled" | "failed" | "canceled" | "refunded";
2314
- paymentStatus: "unpaid" | "pending" | "paid" | "failed" | "refunded" | "canceled";
2315
- fulfillmentStatus: "pending" | "fulfilled" | "failed" | "canceled";
2234
+ status: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
2235
+ paymentStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "unpaid";
2236
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
2316
2237
  subtotalAmount: number;
2317
2238
  discountAmount: number;
2318
2239
  totalAmount: number;
@@ -2331,10 +2252,14 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2331
2252
  [x: string]: hono_utils_types.JSONValue;
2332
2253
  };
2333
2254
  }[];
2255
+ createdAt: string;
2256
+ paidAt: string | null;
2257
+ fulfilledAt: string | null;
2258
+ canceledAt: string | null;
2334
2259
  payments?: {
2335
2260
  id: string;
2336
2261
  orderId: string;
2337
- provider: PaymentProvider;
2262
+ provider: "stripe" | "gift_card" | "wallet";
2338
2263
  amount: number;
2339
2264
  currency: string;
2340
2265
  status: "pending" | "paid" | "failed" | "refunded" | "canceled";
@@ -2343,10 +2268,6 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2343
2268
  createdAt: string;
2344
2269
  paidAt: string | null;
2345
2270
  }[] | undefined;
2346
- createdAt: string;
2347
- paidAt: string | null;
2348
- fulfilledAt: string | null;
2349
- canceledAt: string | null;
2350
2271
  }[];
2351
2272
  total: number;
2352
2273
  limit: number;
@@ -2553,10 +2474,16 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2553
2474
  };
2554
2475
  };
2555
2476
  output: {
2556
- paymentId?: string | undefined;
2477
+ status: "pending";
2478
+ paymentId: string;
2479
+ orderId: string;
2480
+ url: string;
2481
+ reused?: boolean | undefined;
2482
+ } | {
2483
+ status: "paid";
2557
2484
  orderId: string;
2558
2485
  url: string | null;
2559
- status: "pending" | "paid";
2486
+ paymentId?: string | undefined;
2560
2487
  reused?: boolean | undefined;
2561
2488
  };
2562
2489
  outputFormat: "json";
@@ -2574,6 +2501,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2574
2501
  };
2575
2502
  output: {
2576
2503
  url: string;
2504
+ stripeSubscriptionId: string;
2577
2505
  };
2578
2506
  outputFormat: "json";
2579
2507
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -2626,7 +2554,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2626
2554
  currency: string;
2627
2555
  amount: number;
2628
2556
  direction: "credit" | "debit";
2629
- status: "posted" | "pending" | "released" | "refunded";
2557
+ status: "pending" | "refunded" | "posted" | "released";
2630
2558
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
2631
2559
  sourceId: string | null;
2632
2560
  orderId: string | null;
@@ -2715,11 +2643,11 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2715
2643
  output: {
2716
2644
  items: {
2717
2645
  id: string;
2718
- type: StoreType;
2646
+ type: "cloud" | "instance";
2719
2647
  name: string;
2720
2648
  ownerAccountId: string | null;
2721
2649
  boundLicenseId: string | null;
2722
- status: StoreStatus;
2650
+ status: "active" | "disabled";
2723
2651
  createdAt: string;
2724
2652
  updatedAt: string;
2725
2653
  }[];
@@ -2788,7 +2716,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2788
2716
  limit?: string | undefined;
2789
2717
  offset?: string | undefined;
2790
2718
  search?: string | undefined;
2791
- membershipTier?: MembershipTier | undefined;
2719
+ membershipTier?: AdminUser["membershipTier"] | undefined;
2792
2720
  };
2793
2721
  };
2794
2722
  output: {
@@ -2801,8 +2729,8 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2801
2729
  createdAt: string;
2802
2730
  updatedAt: string;
2803
2731
  role: "user" | "admin";
2804
- membershipTier: MembershipTier;
2805
- membershipStatus: "active" | "inactive" | "expired";
2732
+ membershipTier: "none" | "silver" | "gold" | "premier";
2733
+ membershipStatus: "active" | "expired" | "inactive";
2806
2734
  }[];
2807
2735
  total: number;
2808
2736
  limit: number;
@@ -2819,7 +2747,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2819
2747
  json: {
2820
2748
  role?: "user" | "admin" | undefined;
2821
2749
  membershipTier?: "none" | "silver" | "gold" | "premier" | undefined;
2822
- membershipStatus?: "active" | "inactive" | "expired" | undefined;
2750
+ membershipStatus?: "active" | "expired" | "inactive" | undefined;
2823
2751
  };
2824
2752
  } & {
2825
2753
  param: {
@@ -2835,8 +2763,8 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2835
2763
  createdAt: string;
2836
2764
  updatedAt: string;
2837
2765
  role: "user" | "admin";
2838
- membershipTier: MembershipTier;
2839
- membershipStatus: "active" | "inactive" | "expired";
2766
+ membershipTier: "none" | "silver" | "gold" | "premier";
2767
+ membershipStatus: "active" | "expired" | "inactive";
2840
2768
  };
2841
2769
  outputFormat: "json";
2842
2770
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -2937,175 +2865,7 @@ declare const zpanCloudEventSchema: z.ZodObject<{
2937
2865
  }, z.core.$strip>;
2938
2866
  occurredAt: z.ZodString;
2939
2867
  }, z.core.$strip>;
2940
-
2941
- type Page<T> = {
2942
- items: T[];
2943
- total: number;
2944
- limit: number;
2945
- offset: number;
2946
- };
2947
- type PaginationQuery = {
2948
- limit?: string;
2949
- offset?: string;
2950
- };
2951
- type PairingCreateRequest = z.infer<typeof createPairingSchema>;
2952
- type PairingCreateResponse = {
2953
- code: string;
2954
- pairingUrl: string;
2955
- expiresAt: string;
2956
- };
2957
- type PairingPreview = {
2958
- licenseId: string;
2959
- licenseName: string;
2960
- licenseHost: string;
2961
- };
2962
- type PairingPollResponse = {
2963
- status: Extract<PairingStatus, 'pending' | 'denied' | 'expired'>;
2964
- } | {
2965
- status: 'approved';
2966
- refreshToken: string;
2967
- certificate: string;
2968
- binding: {
2969
- id: string;
2970
- instanceId: string;
2971
- storeId: string;
2972
- authorizedHosts: string[];
2973
- };
2974
- account: {
2975
- id: string;
2976
- email: string;
2977
- };
2978
- };
2979
- type PairingActionRequest = z.infer<typeof pairingActionSchema>;
2980
- type PairingActionResponse = {
2981
- status: 'approved' | 'denied';
2982
- };
2983
- type EntitlementRefreshResponse = {
2984
- certificate: string;
2985
- refreshToken: string;
2986
- nextRefreshAfter: string;
2987
- binding: {
2988
- id: string;
2989
- instanceId: string;
2990
- storeId: string;
2991
- authorizedHosts: string[];
2992
- };
2993
- account: {
2994
- id: string;
2995
- email: string;
2996
- };
2997
- };
2998
- type ProductListQuery = Partial<Record<keyof z.infer<typeof productListQuerySchema>, string>>;
2999
- type CreateProductInput = z.infer<typeof createProductSchema>;
3000
- type UpdateProductInput = z.infer<typeof updateProductSchema>;
3001
- type OrderListQuery = PaginationQuery & {
3002
- paymentStatus?: CommerceOrder['paymentStatus'];
3003
- fulfillmentStatus?: CommerceOrder['fulfillmentStatus'];
3004
- customerId?: string;
3005
- };
3006
- type CreateOrderInput = z.infer<typeof createOrderSchema>;
3007
- type OrderPatchRequest = z.infer<typeof orderPatchSchema>;
3008
- type PaymentCreateResponse = {
3009
- paymentId?: string;
3010
- orderId: string;
3011
- url: string | null;
3012
- status: 'pending' | 'paid';
3013
- reused?: boolean;
3014
- };
3015
- type PaymentCreateRequest = z.infer<typeof paymentSchema>;
3016
- type BillingPortalSessionRequest = z.infer<typeof billingPortalSessionSchema>;
3017
- type BillingPortalSessionResponse = {
3018
- url: string;
3019
- };
3020
- type GiftCardListQuery = PaginationQuery & {
3021
- status?: StoreGiftCard['status'];
3022
- campaignId?: string;
3023
- };
3024
- type GiftCardCampaignListQuery = PaginationQuery & {
3025
- status?: GiftCardCampaign['status'];
3026
- };
3027
- type GiftCardCreateRequest = z.infer<typeof giftCardCreateSchema>;
3028
- type GiftCardPatchRequest = z.infer<typeof giftCardPatchSchema>;
3029
- type GiftCardCampaignCreateRequest = z.infer<typeof giftCardCampaignCreateSchema>;
3030
- type GiftCardListInput = z.infer<typeof giftCardListQuerySchema>;
3031
- type GiftCardCampaignListInput = z.infer<typeof giftCardCampaignListQuerySchema>;
3032
- type UsageEventCreateRequest = z.infer<typeof usageEventCreateSchema>;
3033
- type UsageEventCreateResponse = {
3034
- resource: UsageResource;
3035
- quantity: number;
3036
- duplicate: boolean;
3037
- };
3038
- type WalletRedemptionRequest = z.infer<typeof walletRedemptionSchema>;
3039
- type WalletRedemptionResponse = {
3040
- redeemedAmount: number;
3041
- currency: string | null;
3042
- failures: Array<{
3043
- code: string;
3044
- error: string;
3045
- }>;
3046
- };
3047
- type StorePatchRequest = z.infer<typeof storePatchSchema>;
3048
- type AdminUser = {
3049
- id: string;
3050
- name: string;
3051
- email: string;
3052
- emailVerified: boolean;
3053
- image: string | null;
3054
- createdAt: string;
3055
- updatedAt: string;
3056
- role: 'user' | 'admin';
3057
- membershipTier: MembershipTier;
3058
- membershipStatus: 'active' | 'inactive' | 'expired';
3059
- };
3060
- type AdminUserListQuery = PaginationQuery & {
3061
- search?: string;
3062
- membershipTier?: MembershipTier;
3063
- };
3064
- type AdminUserPatchRequest = z.infer<typeof adminUserPatchSchema>;
3065
- type AdminUserListInput = z.infer<typeof adminUserListQuerySchema>;
3066
- type AdminLicenseListQuery = PaginationQuery & {
3067
- accountId?: string;
3068
- host?: string;
3069
- };
3070
- type LicenseAssertionResponse = LicenseAssertion;
3071
- type AccountOverviewResponse = AccountOverview;
3072
- type AccountMembershipResponse = MembershipOverview;
3073
- type AccountBillingResponse = BillingOverview;
3074
- type AccountWalletResponse = AccountWallet;
3075
- type LicenseListResponse = Page<BoundLicense>;
3076
- type StoreListResponse = Page<CommerceStore>;
3077
- type ProductListResponse = Page<CommerceProduct>;
3078
- type OrderListResponse = Page<CommerceOrder>;
3079
- type GiftCardListResponse = Page<StoreGiftCard>;
3080
- type GiftCardCampaignListResponse = Page<GiftCardCampaign>;
3081
- type WalletBalanceListResponse = Page<WalletBalance>;
3082
- type WalletLedgerResponse = Page<WalletLedgerEntry>;
3083
- type UsageSummaryResponse = UsageSummary;
3084
-
3085
- type StoreFulfillmentEvent = {
3086
- eventId: string;
3087
- eventType: 'store.order_item.fulfilled' | 'store.subscription.renewed' | 'store.subscription.updated' | 'store.subscription.canceled' | 'store.subscription.expired';
3088
- orderId: string;
3089
- orderItemId: string;
3090
- productId: string;
3091
- productName: string;
3092
- quantity: number;
3093
- deliverable: Record<string, unknown>;
3094
- target: Record<string, unknown> | null;
3095
- context: {
3096
- storeId: string;
3097
- paymentProvider: 'stripe' | 'gift_card' | 'wallet' | null;
3098
- stripePriceId?: string | null;
3099
- stripePriceLookupKey?: string | null;
3100
- stripePriceRecurring?: unknown;
3101
- stripePriceMetadata?: Record<string, string>;
3102
- stripeSubscriptionId?: string | null;
3103
- stripeInvoiceId?: string | null;
3104
- billingPeriodStart?: string | null;
3105
- billingPeriodEnd?: string | null;
3106
- };
3107
- occurredAt: string;
3108
- };
2868
+ type StoreFulfillmentEvent = z.infer<typeof storeFulfillmentEventSchema>;
3109
2869
  type ZpanCloudEvent = StoreFulfillmentEvent;
3110
2870
 
3111
- export { type AccountBillingResponse, type AccountBillingRoute, type AccountMembershipResponse, type AccountMembershipRoute, type AccountOverview, type AccountOverviewResponse, type AccountOverviewRoute, type AccountUsageRoute, type AccountWallet, type AccountWalletResponse, type AccountWalletRoute, type AdminLicenseListQuery, type AdminLicensesRoute, type AdminStoresRoute, type AdminUser, type AdminUserListInput, type AdminUserListQuery, type AdminUserPatchRequest, type AdminUsersRoute, type AppType, type BillingOrderFulfillmentStatus, type BillingOrderPaymentStatus, type BillingOrderStatus, type BillingOverview, type BillingPortalSessionRequest, type BillingPortalSessionResponse, type BillingRecord, type BillingRecordItem, type BillingRecordKind, type BillingSummary, type BoundLicense, type CloudClient, type CloudClientOptions, CommerceOrder, CommerceProduct, CommerceStore, type CreateGiftCardRequest, type CreateGiftCardsRequest, type CreateOrderInput, type CreateProductInput, Deliverable, type EntitlementRefreshResponse, type EntitlementsRoute, type GiftCardCampaign, type GiftCardCampaignCreateRequest, type GiftCardCampaignListInput, type GiftCardCampaignListQuery, type GiftCardCampaignListResponse, type GiftCardCreateRequest, type GiftCardListInput, type GiftCardListQuery, type GiftCardListResponse, type GiftCardPatchRequest, type LicenseAssertion, type LicenseAssertionResponse, type LicenseListResponse, type LicensesRoute, type MembershipOverview, type MembershipPrimaryAction, type MembershipStatus, type MembershipStripeChannel, type MembershipTier, type MembershipViewState, type OffsetPage, type OrderListQuery, type OrderListResponse, type OrderPatchRequest, type Page, type PaginationQuery, type PairingActionRequest, type PairingActionResponse, type PairingCreateRequest, type PairingCreateResponse, type PairingPollResponse, type PairingPreview, type PairingStatus, type PairingsRoute, type PaymentCreateRequest, type PaymentCreateResponse, PaymentProvider, type ProductListQuery, type ProductListResponse, ProductType, type StoreFulfillmentEvent, type StoreGiftCard, type StoreGiftCardsRoute, type StoreListResponse, type StoreOrdersRoute, type StorePatchRequest, type StoreProductsRoute, StoreStatus, StoreType, type UpdateProductInput, type UsageEventCreateRequest, type UsageEventCreateResponse, type UsageEventsRoute, type UsageResource, type UsageResourceSummary, type UsageSummary, type UsageSummaryResponse, type WalletBalance, type WalletBalanceListResponse, type WalletLedgerEntry, type WalletLedgerResponse, type WalletRedemptionRequest, type WalletRedemptionResponse, type ZpanCloudEvent, adminUserListQuerySchema, adminUserPatchSchema, billingPortalSessionSchema, createCloudClient, createOrderSchema, createPairingSchema, createProductSchema, giftCardCampaignCreateSchema, giftCardCampaignListQuerySchema, giftCardCreateSchema, giftCardListQuerySchema, giftCardPatchSchema, orderPatchSchema, pairingActionSchema, paymentSchema, productListQuerySchema, storeFulfillmentEventSchema, storePatchSchema, updateProductSchema, usageEventCreateSchema, walletRedemptionSchema, zpanCloudEventSchema };
2871
+ export { type AccountBillingResponse, type AccountBillingRoute, type AccountMembershipResponse, type AccountMembershipRoute, type AccountOverview, type AccountOverviewResponse, type AccountOverviewRoute, type AccountUsageRoute, type AccountWallet, type AccountWalletResponse, type AccountWalletRoute, type AdminLicenseListQuery, type AdminLicensesRoute, type AdminStoresRoute, type AdminUser, type AdminUserListInput, type AdminUserListQuery, type AdminUserPatchRequest, type AdminUsersRoute, type AppType, type BillingOverview, type BillingPortalSessionRequest, type BillingPortalSessionResponse, type BillingRecord, type BoundLicense, type CloudClient, type CloudClientOptions, type CommerceOrder, type CommerceProduct, type CommerceStore, type CreateOrderInput, type CreateOrderRequest, type CreatePaymentRequest, type CreateProductInput, type EntitlementRefreshResponse, type EntitlementsRoute, type GiftCardCampaign, type GiftCardCampaignCreateRequest, type GiftCardCampaignListInput, type GiftCardCampaignListQuery, type GiftCardCampaignListResponse, type GiftCardCreateRequest, type GiftCardListInput, type GiftCardListQuery, type GiftCardListResponse, type GiftCardPatchRequest, type LicenseAssertionResponse, type LicenseListResponse, type LicensesRoute, type MembershipOverview, type MembershipTier, type OrderListQuery, type OrderListResponse, type OrderPatchRequest, type Page, type PaginationQuery, type PairingActionRequest, type PairingActionResponse, type PairingCreateRequest, type PairingCreateResponse, type PairingPollResponse, type PairingPreview, type PairingsRoute, type PaymentCreateRequest, type PaymentCreateResponse, type ProductListQuery, type ProductListResponse, type ProductType$1 as ProductType, type StoreFulfillmentEvent, type StoreGiftCard, type StoreGiftCardsRoute, type StoreListResponse, type StoreOrdersRoute, type StorePatchRequest, type StoreProductsRoute, type UpdateProductInput, type UsageEventCreateRequest, type UsageEventCreateResponse, type UsageEventsRoute, type UsageSummary, type UsageSummaryResponse, type WalletBalance, type WalletBalanceListResponse, type WalletLedgerEntry, type WalletLedgerResponse, type WalletRedemptionRequest, type WalletRedemptionResponse, type ZpanCloudEvent, accountBillingResponseSchema, accountMembershipResponseSchema, accountOverviewResponseSchema, accountWalletResponseSchema, adminUserListQuerySchema, adminUserListResponseSchema, adminUserPatchSchema, billingPortalSessionResponseSchema, billingPortalSessionSchema, boundLicenseSchema, commerceOrderSchema, commerceProductSchema, commerceStoreSchema, createCloudClient, createOrderSchema, createPairingSchema, createProductSchema, entitlementRefreshResponseSchema, giftCardCampaignCreateSchema, giftCardCampaignListQuerySchema, giftCardCampaignListResponseSchema, giftCardCampaignSchema, giftCardCreateSchema, giftCardListQuerySchema, giftCardListResponseSchema, giftCardPatchSchema, licenseAssertionSchema, licenseListResponseSchema, orderListResponseSchema, orderPatchSchema, pageSchema, pairingActionResponseSchema, pairingActionSchema, pairingCreateResponseSchema, pairingPollResponseSchema, pairingPreviewSchema, paymentCreateResponseSchema, paymentSchema, productListQuerySchema, productListResponseSchema, storeFulfillmentEventSchema, storeGiftCardSchema, storeListResponseSchema, storePatchSchema, updateProductSchema, usageEventCreateResponseSchema, usageEventCreateSchema, usageSummarySchema, walletBalanceListResponseSchema, walletBalanceSchema, walletLedgerEntrySchema, walletLedgerResponseSchema, walletRedemptionResponseSchema, walletRedemptionSchema, zpanCloudEventSchema };