zpan-cloud-sdk 1.0.0 → 1.0.2

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,105 @@
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, commercePaymentSchema, 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, productPriceSchema, 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, deliverableSchema, membershipStripeChannelSchema, orderListQuerySchema, paginationQuerySchema, productMetadataSchema, 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 ProductPrice = z.infer<typeof productPriceSchema>;
24
+ type CommerceProduct = z.infer<typeof commerceProductSchema>;
25
+ type CommercePayment = z.infer<typeof commercePaymentSchema>;
26
+ type CommerceOrder = z.infer<typeof commerceOrderSchema>;
27
+ type ProductType$1 = CommerceProduct['type'];
28
+ type ProductListQuery = Partial<Record<keyof z.infer<typeof productListQuerySchema>, string>>;
29
+ type CreateProductInput = z.infer<typeof createProductSchema>;
30
+ type UpdateProductInput = z.infer<typeof updateProductSchema>;
31
+ type OrderListQuery = PaginationQuery & {
32
+ paymentStatus?: CommerceOrder['paymentStatus'];
33
+ fulfillmentStatus?: CommerceOrder['fulfillmentStatus'];
34
+ customerId?: string;
176
35
  };
177
- type CreateGiftCardRequest = {
178
- amount: number;
179
- currency: string;
180
- expires_at?: string | null;
181
- campaignId?: string | null;
36
+ type CreateOrderInput = z.infer<typeof createOrderSchema>;
37
+ type CreateOrderRequest = CreateOrderInput;
38
+ type OrderPatchRequest = z.infer<typeof orderPatchSchema>;
39
+ type PaymentCreateRequest = z.infer<typeof paymentSchema>;
40
+ type CreatePaymentRequest = PaymentCreateRequest;
41
+ type PaymentCreateResponse = z.infer<typeof paymentCreateResponseSchema>;
42
+ type BillingPortalSessionRequest = z.infer<typeof billingPortalSessionSchema>;
43
+ type BillingPortalSessionResponse = z.infer<typeof billingPortalSessionResponseSchema>;
44
+ type StoreGiftCard = z.infer<typeof storeGiftCardSchema>;
45
+ type GiftCardCampaign = z.infer<typeof giftCardCampaignSchema>;
46
+ type GiftCardListQuery = PaginationQuery & {
47
+ status?: StoreGiftCard['status'];
48
+ campaignId?: string;
182
49
  };
183
- type CreateGiftCardsRequest = CreateGiftCardRequest & {
184
- count?: number;
50
+ type GiftCardCampaignListQuery = PaginationQuery & {
51
+ status?: GiftCardCampaign['status'];
52
+ };
53
+ type GiftCardCreateRequest = z.infer<typeof giftCardCreateSchema>;
54
+ type GiftCardPatchRequest = z.infer<typeof giftCardPatchSchema>;
55
+ type GiftCardCampaignCreateRequest = z.infer<typeof giftCardCampaignCreateSchema>;
56
+ type GiftCardListInput = z.infer<typeof giftCardListQuerySchema>;
57
+ type GiftCardCampaignListInput = z.infer<typeof giftCardCampaignListQuerySchema>;
58
+ type UsageEventCreateRequest = z.infer<typeof usageEventCreateSchema>;
59
+ type UsageEventCreateResponse = z.infer<typeof usageEventCreateResponseSchema>;
60
+ type UsageSummaryResponse = z.infer<typeof usageSummarySchema>;
61
+ type UsageSummary = UsageSummaryResponse;
62
+ type WalletBalance = z.infer<typeof walletBalanceSchema>;
63
+ type WalletLedgerEntry = z.infer<typeof walletLedgerEntrySchema>;
64
+ type WalletRedemptionRequest = z.infer<typeof walletRedemptionSchema>;
65
+ type WalletRedemptionResponse = z.infer<typeof walletRedemptionResponseSchema>;
66
+ type StorePatchRequest = z.infer<typeof storePatchSchema>;
67
+ type AdminUser = z.infer<typeof adminUserListResponseSchema>['items'][number];
68
+ type AdminUserListQuery = PaginationQuery & {
69
+ search?: string;
70
+ membershipTier?: AdminUser['membershipTier'];
185
71
  };
72
+ type AdminUserPatchRequest = z.infer<typeof adminUserPatchSchema>;
73
+ type AdminUserListInput = z.infer<typeof adminUserListQuerySchema>;
74
+ type AdminLicenseListQuery = PaginationQuery & {
75
+ accountId?: string;
76
+ host?: string;
77
+ };
78
+ type BoundLicense = z.infer<typeof boundLicenseSchema>;
79
+ type LicenseAssertionResponse = z.infer<typeof licenseAssertionSchema>;
80
+ type AccountOverviewResponse = z.infer<typeof accountOverviewResponseSchema>;
81
+ type AccountMembershipResponse = z.infer<typeof accountMembershipResponseSchema>;
82
+ type AccountBillingResponse = z.infer<typeof accountBillingResponseSchema>;
83
+ type AccountWalletResponse = z.infer<typeof accountWalletResponseSchema>;
84
+ type MembershipTier = AccountMembershipResponse['tier'];
85
+ type AccountOverview = AccountOverviewResponse;
86
+ type MembershipOverview = AccountMembershipResponse;
87
+ type BillingOverview = AccountBillingResponse;
88
+ type AccountWallet = AccountWalletResponse;
89
+ type BillingRecord = AccountBillingResponse['items'][number];
90
+ type LicenseListResponse = z.infer<typeof licenseListResponseSchema>;
91
+ type StoreListResponse = z.infer<typeof storeListResponseSchema>;
92
+ type ProductListResponse = z.infer<typeof productListResponseSchema>;
93
+ type OrderListResponse = z.infer<typeof orderListResponseSchema>;
94
+ type GiftCardListResponse = z.infer<typeof giftCardListResponseSchema>;
95
+ type GiftCardCampaignListResponse = z.infer<typeof giftCardCampaignListResponseSchema>;
96
+ type WalletBalanceListResponse = z.infer<typeof walletBalanceListResponseSchema>;
97
+ type WalletLedgerResponse = z.infer<typeof walletLedgerResponseSchema>;
98
+
99
+ type StoreType = 'cloud' | 'instance';
100
+ type StoreStatus = 'active' | 'disabled';
101
+ type ProductType = 'store_item';
102
+ type PaymentProvider = 'stripe' | 'gift_card' | 'wallet';
186
103
 
187
104
  declare const pairingsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
188
105
  "/": {
@@ -229,7 +146,7 @@ declare const pairingsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
229
146
  };
230
147
  };
231
148
  output: {
232
- status: Extract<PairingStatus, "pending" | "denied" | "expired">;
149
+ status: "pending" | "denied" | "expired";
233
150
  } | {
234
151
  status: "approved";
235
152
  refreshToken: string;
@@ -262,7 +179,7 @@ declare const pairingsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
262
179
  };
263
180
  };
264
181
  output: {
265
- status: "approved" | "denied";
182
+ status: "denied" | "approved";
266
183
  };
267
184
  outputFormat: "json";
268
185
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -339,7 +256,7 @@ declare const accountOverviewRouter: hono_hono_base.HonoBase<hono_types.BlankEnv
339
256
  input: {};
340
257
  output: {
341
258
  activeLicenses: number;
342
- membershipTier: MembershipTier;
259
+ membershipTier: "none" | "silver" | "gold" | "premier";
343
260
  latestBillingDate: string | null;
344
261
  };
345
262
  outputFormat: "json";
@@ -352,13 +269,13 @@ declare const accountMembershipRouter: hono_hono_base.HonoBase<hono_types.BlankE
352
269
  $get: {
353
270
  input: {};
354
271
  output: {
355
- state: MembershipViewState;
356
- tier: MembershipTier;
357
- membershipStatus: MembershipStatus;
272
+ state: "expired" | "active" | "inactive" | "renewal_due";
273
+ tier: "none" | "silver" | "gold" | "premier";
274
+ membershipStatus: "expired" | "active" | "inactive";
358
275
  expiresAt: string | null;
359
276
  cumulativeMonths: number;
360
277
  proIncluded: boolean;
361
- primaryAction: MembershipPrimaryAction;
278
+ primaryAction: "subscribe" | "renew" | "manage";
362
279
  stripeSubscription: {
363
280
  status: string;
364
281
  billingInterval: string | null;
@@ -409,7 +326,7 @@ declare const accountBillingRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
409
326
  currency: string;
410
327
  amount: number;
411
328
  direction: "credit" | "debit";
412
- status: "posted" | "pending" | "released" | "refunded";
329
+ status: "pending" | "refunded" | "posted" | "released";
413
330
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
414
331
  sourceId: string | null;
415
332
  orderId: string | null;
@@ -424,7 +341,7 @@ declare const accountBillingRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
424
341
  items: {
425
342
  id: string;
426
343
  title: string;
427
- kind: BillingRecordKind;
344
+ kind: "store_item" | "store_subscription" | "mixed_order";
428
345
  items: {
429
346
  name: string;
430
347
  productType: string;
@@ -434,9 +351,9 @@ declare const accountBillingRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
434
351
  };
435
352
  recurring: boolean;
436
353
  }[];
437
- orderStatus: BillingOrderStatus;
438
- paymentStatus: BillingOrderPaymentStatus;
439
- fulfillmentStatus: BillingOrderFulfillmentStatus;
354
+ orderStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
355
+ paymentStatus: "pending" | "unpaid" | "paid" | "failed" | "refunded" | "canceled";
356
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
440
357
  amountLabel: string | null;
441
358
  occurredAt: string;
442
359
  paidAt: string | null;
@@ -514,17 +431,6 @@ declare const accountWalletRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
514
431
  };
515
432
  };
516
433
  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
434
  items: {
529
435
  id: string;
530
436
  walletId: string | null;
@@ -533,7 +439,7 @@ declare const accountWalletRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
533
439
  currency: string;
534
440
  amount: number;
535
441
  direction: "credit" | "debit";
536
- status: "posted" | "pending" | "released" | "refunded";
442
+ status: "pending" | "refunded" | "posted" | "released";
537
443
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
538
444
  sourceId: string | null;
539
445
  orderId: string | null;
@@ -544,6 +450,17 @@ declare const accountWalletRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
544
450
  total: number;
545
451
  limit: number;
546
452
  offset: number;
453
+ balances: {
454
+ id: string;
455
+ walletId: string | null;
456
+ storeId: string;
457
+ customerId: string | null;
458
+ currency: string;
459
+ availableAmount: number;
460
+ pendingAmount: number;
461
+ stripeCustomerId: string | null;
462
+ updatedAt: string;
463
+ }[];
547
464
  };
548
465
  outputFormat: "json";
549
466
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -585,7 +502,7 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
585
502
  items: {
586
503
  id: string;
587
504
  storeId: string;
588
- type: ProductType;
505
+ type: "store_item";
589
506
  name: string;
590
507
  description: string | null;
591
508
  active: boolean;
@@ -596,9 +513,9 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
596
513
  };
597
514
  };
598
515
  prices: {
599
- id?: string | undefined;
600
516
  currency: string;
601
517
  amount: number;
518
+ id?: string | undefined;
602
519
  lookupKey?: string | null | undefined;
603
520
  nickname?: string | null | undefined;
604
521
  recurring?: {
@@ -629,7 +546,7 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
629
546
  type: "store_item";
630
547
  name: string;
631
548
  metadata: {
632
- deliverable: Deliverable;
549
+ deliverable: Record<string, unknown>;
633
550
  };
634
551
  prices: {
635
552
  currency: string;
@@ -738,7 +655,7 @@ declare const storeProductsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
738
655
  active?: boolean | undefined;
739
656
  sortOrder?: number | undefined;
740
657
  metadata?: {
741
- deliverable: Deliverable;
658
+ deliverable: Record<string, unknown>;
742
659
  } | undefined;
743
660
  prices?: {
744
661
  currency: string;
@@ -883,7 +800,7 @@ declare const storeGiftCardsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv,
883
800
  codeLast4: string;
884
801
  amount: number;
885
802
  currency: string;
886
- status: "active" | "redeemed" | "disabled" | "expired" | "revoked";
803
+ status: "expired" | "active" | "disabled" | "revoked" | "redeemed";
887
804
  expiresAt: string | null;
888
805
  createdAt: string;
889
806
  updatedAt: string;
@@ -1005,7 +922,7 @@ declare const usageEventsRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1005
922
  };
1006
923
  };
1007
924
  output: {
1008
- resource: UsageResource;
925
+ resource: "traffic_egress";
1009
926
  quantity: number;
1010
927
  duplicate: boolean;
1011
928
  };
@@ -1034,9 +951,9 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1034
951
  target: {
1035
952
  [x: string]: hono_utils_types.JSONValue;
1036
953
  } | null;
1037
- status: "pending" | "paid" | "fulfilled" | "failed" | "canceled" | "refunded";
1038
- paymentStatus: "unpaid" | "pending" | "paid" | "failed" | "refunded" | "canceled";
1039
- fulfillmentStatus: "pending" | "fulfilled" | "failed" | "canceled";
954
+ status: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
955
+ paymentStatus: "pending" | "unpaid" | "paid" | "failed" | "refunded" | "canceled";
956
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
1040
957
  subtotalAmount: number;
1041
958
  discountAmount: number;
1042
959
  totalAmount: number;
@@ -1055,10 +972,14 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1055
972
  [x: string]: hono_utils_types.JSONValue;
1056
973
  };
1057
974
  }[];
975
+ createdAt: string;
976
+ paidAt: string | null;
977
+ fulfilledAt: string | null;
978
+ canceledAt: string | null;
1058
979
  payments?: {
1059
980
  id: string;
1060
981
  orderId: string;
1061
- provider: PaymentProvider;
982
+ provider: "stripe" | "gift_card" | "wallet";
1062
983
  amount: number;
1063
984
  currency: string;
1064
985
  status: "pending" | "paid" | "failed" | "refunded" | "canceled";
@@ -1067,10 +988,6 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1067
988
  createdAt: string;
1068
989
  paidAt: string | null;
1069
990
  }[] | undefined;
1070
- createdAt: string;
1071
- paidAt: string | null;
1072
- fulfilledAt: string | null;
1073
- canceledAt: string | null;
1074
991
  }[];
1075
992
  total: number;
1076
993
  limit: number;
@@ -1277,10 +1194,16 @@ declare const storeOrdersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1277
1194
  };
1278
1195
  };
1279
1196
  output: {
1280
- paymentId?: string | undefined;
1197
+ status: "pending";
1198
+ paymentId: string;
1199
+ orderId: string;
1200
+ url: string;
1201
+ reused?: boolean | undefined;
1202
+ } | {
1203
+ status: "paid";
1281
1204
  orderId: string;
1282
1205
  url: string | null;
1283
- status: "pending" | "paid";
1206
+ paymentId?: string | undefined;
1284
1207
  reused?: boolean | undefined;
1285
1208
  };
1286
1209
  outputFormat: "json";
@@ -1342,11 +1265,11 @@ declare const adminStoresRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1342
1265
  output: {
1343
1266
  items: {
1344
1267
  id: string;
1345
- type: StoreType;
1268
+ type: "cloud" | "instance";
1346
1269
  name: string;
1347
1270
  ownerAccountId: string | null;
1348
1271
  boundLicenseId: string | null;
1349
- status: StoreStatus;
1272
+ status: "active" | "disabled";
1350
1273
  createdAt: string;
1351
1274
  updatedAt: string;
1352
1275
  }[];
@@ -1416,7 +1339,7 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1416
1339
  limit?: string | undefined;
1417
1340
  offset?: string | undefined;
1418
1341
  search?: string | undefined;
1419
- membershipTier?: MembershipTier | undefined;
1342
+ membershipTier?: AdminUser["membershipTier"] | undefined;
1420
1343
  };
1421
1344
  };
1422
1345
  output: {
@@ -1429,8 +1352,8 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1429
1352
  createdAt: string;
1430
1353
  updatedAt: string;
1431
1354
  role: "user" | "admin";
1432
- membershipTier: MembershipTier;
1433
- membershipStatus: "active" | "inactive" | "expired";
1355
+ membershipTier: "none" | "silver" | "gold" | "premier";
1356
+ membershipStatus: "expired" | "active" | "inactive";
1434
1357
  }[];
1435
1358
  total: number;
1436
1359
  limit: number;
@@ -1447,7 +1370,7 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1447
1370
  json: {
1448
1371
  role?: "user" | "admin" | undefined;
1449
1372
  membershipTier?: "none" | "silver" | "gold" | "premier" | undefined;
1450
- membershipStatus?: "active" | "inactive" | "expired" | undefined;
1373
+ membershipStatus?: "expired" | "active" | "inactive" | undefined;
1451
1374
  };
1452
1375
  } & {
1453
1376
  param: {
@@ -1463,8 +1386,8 @@ declare const adminUsersRouter: hono_hono_base.HonoBase<hono_types.BlankEnv, {
1463
1386
  createdAt: string;
1464
1387
  updatedAt: string;
1465
1388
  role: "user" | "admin";
1466
- membershipTier: MembershipTier;
1467
- membershipStatus: "active" | "inactive" | "expired";
1389
+ membershipTier: "none" | "silver" | "gold" | "premier";
1390
+ membershipStatus: "expired" | "active" | "inactive";
1468
1391
  };
1469
1392
  outputFormat: "json";
1470
1393
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -1516,7 +1439,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1516
1439
  };
1517
1440
  };
1518
1441
  output: {
1519
- status: Extract<PairingStatus, "pending" | "denied" | "expired">;
1442
+ status: "pending" | "denied" | "expired";
1520
1443
  } | {
1521
1444
  status: "approved";
1522
1445
  refreshToken: string;
@@ -1549,7 +1472,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1549
1472
  };
1550
1473
  };
1551
1474
  output: {
1552
- status: "approved" | "denied";
1475
+ status: "denied" | "approved";
1553
1476
  };
1554
1477
  outputFormat: "json";
1555
1478
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -1583,13 +1506,13 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1583
1506
  $get: {
1584
1507
  input: {};
1585
1508
  output: {
1586
- state: MembershipViewState;
1587
- tier: MembershipTier;
1588
- membershipStatus: MembershipStatus;
1509
+ state: "expired" | "active" | "inactive" | "renewal_due";
1510
+ tier: "none" | "silver" | "gold" | "premier";
1511
+ membershipStatus: "expired" | "active" | "inactive";
1589
1512
  expiresAt: string | null;
1590
1513
  cumulativeMonths: number;
1591
1514
  proIncluded: boolean;
1592
- primaryAction: MembershipPrimaryAction;
1515
+ primaryAction: "subscribe" | "renew" | "manage";
1593
1516
  stripeSubscription: {
1594
1517
  status: string;
1595
1518
  billingInterval: string | null;
@@ -1639,7 +1562,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1639
1562
  currency: string;
1640
1563
  amount: number;
1641
1564
  direction: "credit" | "debit";
1642
- status: "posted" | "pending" | "released" | "refunded";
1565
+ status: "pending" | "refunded" | "posted" | "released";
1643
1566
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
1644
1567
  sourceId: string | null;
1645
1568
  orderId: string | null;
@@ -1654,7 +1577,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1654
1577
  items: {
1655
1578
  id: string;
1656
1579
  title: string;
1657
- kind: BillingRecordKind;
1580
+ kind: "store_item" | "store_subscription" | "mixed_order";
1658
1581
  items: {
1659
1582
  name: string;
1660
1583
  productType: string;
@@ -1664,9 +1587,9 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1664
1587
  };
1665
1588
  recurring: boolean;
1666
1589
  }[];
1667
- orderStatus: BillingOrderStatus;
1668
- paymentStatus: BillingOrderPaymentStatus;
1669
- fulfillmentStatus: BillingOrderFulfillmentStatus;
1590
+ orderStatus: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
1591
+ paymentStatus: "pending" | "unpaid" | "paid" | "failed" | "refunded" | "canceled";
1592
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
1670
1593
  amountLabel: string | null;
1671
1594
  occurredAt: string;
1672
1595
  paidAt: string | null;
@@ -1742,17 +1665,6 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1742
1665
  };
1743
1666
  };
1744
1667
  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
1668
  items: {
1757
1669
  id: string;
1758
1670
  walletId: string | null;
@@ -1761,7 +1673,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1761
1673
  currency: string;
1762
1674
  amount: number;
1763
1675
  direction: "credit" | "debit";
1764
- status: "posted" | "pending" | "released" | "refunded";
1676
+ status: "pending" | "refunded" | "posted" | "released";
1765
1677
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
1766
1678
  sourceId: string | null;
1767
1679
  orderId: string | null;
@@ -1772,6 +1684,17 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1772
1684
  total: number;
1773
1685
  limit: number;
1774
1686
  offset: number;
1687
+ balances: {
1688
+ id: string;
1689
+ walletId: string | null;
1690
+ storeId: string;
1691
+ customerId: string | null;
1692
+ currency: string;
1693
+ availableAmount: number;
1694
+ pendingAmount: number;
1695
+ stripeCustomerId: string | null;
1696
+ updatedAt: string;
1697
+ }[];
1775
1698
  };
1776
1699
  outputFormat: "json";
1777
1700
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -1842,7 +1765,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1842
1765
  input: {};
1843
1766
  output: {
1844
1767
  activeLicenses: number;
1845
- membershipTier: MembershipTier;
1768
+ membershipTier: "none" | "silver" | "gold" | "premier";
1846
1769
  latestBillingDate: string | null;
1847
1770
  };
1848
1771
  outputFormat: "json";
@@ -1864,7 +1787,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1864
1787
  items: {
1865
1788
  id: string;
1866
1789
  storeId: string;
1867
- type: ProductType;
1790
+ type: "store_item";
1868
1791
  name: string;
1869
1792
  description: string | null;
1870
1793
  active: boolean;
@@ -1875,9 +1798,9 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1875
1798
  };
1876
1799
  };
1877
1800
  prices: {
1878
- id?: string | undefined;
1879
1801
  currency: string;
1880
1802
  amount: number;
1803
+ id?: string | undefined;
1881
1804
  lookupKey?: string | null | undefined;
1882
1805
  nickname?: string | null | undefined;
1883
1806
  recurring?: {
@@ -1908,7 +1831,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
1908
1831
  type: "store_item";
1909
1832
  name: string;
1910
1833
  metadata: {
1911
- deliverable: Deliverable;
1834
+ deliverable: Record<string, unknown>;
1912
1835
  };
1913
1836
  prices: {
1914
1837
  currency: string;
@@ -2017,7 +1940,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2017
1940
  active?: boolean | undefined;
2018
1941
  sortOrder?: number | undefined;
2019
1942
  metadata?: {
2020
- deliverable: Deliverable;
1943
+ deliverable: Record<string, unknown>;
2021
1944
  } | undefined;
2022
1945
  prices?: {
2023
1946
  currency: string;
@@ -2161,7 +2084,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2161
2084
  codeLast4: string;
2162
2085
  amount: number;
2163
2086
  currency: string;
2164
- status: "active" | "redeemed" | "disabled" | "expired" | "revoked";
2087
+ status: "expired" | "active" | "disabled" | "revoked" | "redeemed";
2165
2088
  expiresAt: string | null;
2166
2089
  createdAt: string;
2167
2090
  updatedAt: string;
@@ -2282,7 +2205,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2282
2205
  };
2283
2206
  };
2284
2207
  output: {
2285
- resource: UsageResource;
2208
+ resource: "traffic_egress";
2286
2209
  quantity: number;
2287
2210
  duplicate: boolean;
2288
2211
  };
@@ -2310,9 +2233,9 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2310
2233
  target: {
2311
2234
  [x: string]: hono_utils_types.JSONValue;
2312
2235
  } | null;
2313
- status: "pending" | "paid" | "fulfilled" | "failed" | "canceled" | "refunded";
2314
- paymentStatus: "unpaid" | "pending" | "paid" | "failed" | "refunded" | "canceled";
2315
- fulfillmentStatus: "pending" | "fulfilled" | "failed" | "canceled";
2236
+ status: "pending" | "paid" | "failed" | "refunded" | "canceled" | "fulfilled";
2237
+ paymentStatus: "pending" | "unpaid" | "paid" | "failed" | "refunded" | "canceled";
2238
+ fulfillmentStatus: "pending" | "failed" | "canceled" | "fulfilled";
2316
2239
  subtotalAmount: number;
2317
2240
  discountAmount: number;
2318
2241
  totalAmount: number;
@@ -2331,10 +2254,14 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2331
2254
  [x: string]: hono_utils_types.JSONValue;
2332
2255
  };
2333
2256
  }[];
2257
+ createdAt: string;
2258
+ paidAt: string | null;
2259
+ fulfilledAt: string | null;
2260
+ canceledAt: string | null;
2334
2261
  payments?: {
2335
2262
  id: string;
2336
2263
  orderId: string;
2337
- provider: PaymentProvider;
2264
+ provider: "stripe" | "gift_card" | "wallet";
2338
2265
  amount: number;
2339
2266
  currency: string;
2340
2267
  status: "pending" | "paid" | "failed" | "refunded" | "canceled";
@@ -2343,10 +2270,6 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2343
2270
  createdAt: string;
2344
2271
  paidAt: string | null;
2345
2272
  }[] | undefined;
2346
- createdAt: string;
2347
- paidAt: string | null;
2348
- fulfilledAt: string | null;
2349
- canceledAt: string | null;
2350
2273
  }[];
2351
2274
  total: number;
2352
2275
  limit: number;
@@ -2553,10 +2476,16 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2553
2476
  };
2554
2477
  };
2555
2478
  output: {
2556
- paymentId?: string | undefined;
2479
+ status: "pending";
2480
+ paymentId: string;
2481
+ orderId: string;
2482
+ url: string;
2483
+ reused?: boolean | undefined;
2484
+ } | {
2485
+ status: "paid";
2557
2486
  orderId: string;
2558
2487
  url: string | null;
2559
- status: "pending" | "paid";
2488
+ paymentId?: string | undefined;
2560
2489
  reused?: boolean | undefined;
2561
2490
  };
2562
2491
  outputFormat: "json";
@@ -2574,6 +2503,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2574
2503
  };
2575
2504
  output: {
2576
2505
  url: string;
2506
+ stripeSubscriptionId: string;
2577
2507
  };
2578
2508
  outputFormat: "json";
2579
2509
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -2626,7 +2556,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2626
2556
  currency: string;
2627
2557
  amount: number;
2628
2558
  direction: "credit" | "debit";
2629
- status: "posted" | "pending" | "released" | "refunded";
2559
+ status: "pending" | "refunded" | "posted" | "released";
2630
2560
  sourceType: "gift_card_redemption" | "order_payment" | "stripe_invoice" | "adjustment" | "refund";
2631
2561
  sourceId: string | null;
2632
2562
  orderId: string | null;
@@ -2715,11 +2645,11 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2715
2645
  output: {
2716
2646
  items: {
2717
2647
  id: string;
2718
- type: StoreType;
2648
+ type: "cloud" | "instance";
2719
2649
  name: string;
2720
2650
  ownerAccountId: string | null;
2721
2651
  boundLicenseId: string | null;
2722
- status: StoreStatus;
2652
+ status: "active" | "disabled";
2723
2653
  createdAt: string;
2724
2654
  updatedAt: string;
2725
2655
  }[];
@@ -2788,7 +2718,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2788
2718
  limit?: string | undefined;
2789
2719
  offset?: string | undefined;
2790
2720
  search?: string | undefined;
2791
- membershipTier?: MembershipTier | undefined;
2721
+ membershipTier?: AdminUser["membershipTier"] | undefined;
2792
2722
  };
2793
2723
  };
2794
2724
  output: {
@@ -2801,8 +2731,8 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2801
2731
  createdAt: string;
2802
2732
  updatedAt: string;
2803
2733
  role: "user" | "admin";
2804
- membershipTier: MembershipTier;
2805
- membershipStatus: "active" | "inactive" | "expired";
2734
+ membershipTier: "none" | "silver" | "gold" | "premier";
2735
+ membershipStatus: "expired" | "active" | "inactive";
2806
2736
  }[];
2807
2737
  total: number;
2808
2738
  limit: number;
@@ -2819,7 +2749,7 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2819
2749
  json: {
2820
2750
  role?: "user" | "admin" | undefined;
2821
2751
  membershipTier?: "none" | "silver" | "gold" | "premier" | undefined;
2822
- membershipStatus?: "active" | "inactive" | "expired" | undefined;
2752
+ membershipStatus?: "expired" | "active" | "inactive" | undefined;
2823
2753
  };
2824
2754
  } & {
2825
2755
  param: {
@@ -2835,8 +2765,8 @@ declare const apiApp: hono_hono_base.HonoBase<hono_types.BlankEnv, hono_types.Bl
2835
2765
  createdAt: string;
2836
2766
  updatedAt: string;
2837
2767
  role: "user" | "admin";
2838
- membershipTier: MembershipTier;
2839
- membershipStatus: "active" | "inactive" | "expired";
2768
+ membershipTier: "none" | "silver" | "gold" | "premier";
2769
+ membershipStatus: "expired" | "active" | "inactive";
2840
2770
  };
2841
2771
  outputFormat: "json";
2842
2772
  status: hono_utils_http_status.ContentfulStatusCode;
@@ -2937,175 +2867,7 @@ declare const zpanCloudEventSchema: z.ZodObject<{
2937
2867
  }, z.core.$strip>;
2938
2868
  occurredAt: z.ZodString;
2939
2869
  }, 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
- };
2870
+ type StoreFulfillmentEvent = z.infer<typeof storeFulfillmentEventSchema>;
3109
2871
  type ZpanCloudEvent = StoreFulfillmentEvent;
3110
2872
 
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 };
2873
+ 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 CommercePayment, 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 ProductPrice, 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, commercePaymentSchema, 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, productPriceSchema, storeFulfillmentEventSchema, storeGiftCardSchema, storeListResponseSchema, storePatchSchema, updateProductSchema, usageEventCreateResponseSchema, usageEventCreateSchema, usageSummarySchema, walletBalanceListResponseSchema, walletBalanceSchema, walletLedgerEntrySchema, walletLedgerResponseSchema, walletRedemptionResponseSchema, walletRedemptionSchema, zpanCloudEventSchema };