@shoppexio/storefront 1.0.107 → 1.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/customer.cjs CHANGED
@@ -19821,6 +19821,23 @@ var customerPortalInvoiceDetailSchema = external_exports.object({
19821
19821
  currency: external_exports.string()
19822
19822
  }),
19823
19823
  currentPaymentAttemptId: nullableStringSchema,
19824
+ /**
19825
+ * The goods went to a gift recipient or wait for a reveal, so a delivered
19826
+ * line without `deliverySummary` was withheld, not empty. Optional so
19827
+ * payloads from before the field parse; absent states nothing.
19828
+ */
19829
+ deliveryWithheld: external_exports.boolean().optional(),
19830
+ /**
19831
+ * What became of money an expired order took: NONE when no payment is
19832
+ * recorded; null unless EXPIRED. Optional so payloads from before the field parse.
19833
+ */
19834
+ expiredPayment: external_exports.enum(["NONE", "IN_REVIEW", "HELD", "SETTLED", "REFUNDED"]).nullable().optional(),
19835
+ /**
19836
+ * When the paying attempt completed; null until one has. Kept on a disputed
19837
+ * or refunded order, so the status decides whether it reads as paid.
19838
+ * Optional so payloads from before the field parse.
19839
+ */
19840
+ paidAt: nullableStringSchema.optional(),
19824
19841
  lineItems: external_exports.array(external_exports.object({
19825
19842
  id: external_exports.string(),
19826
19843
  productTitle: external_exports.string(),
@@ -20101,7 +20118,23 @@ var customerPortalSubscriptionSummarySchema = external_exports.object({
20101
20118
  }).nullable().optional(),
20102
20119
  pause_limit: external_exports.object({ pauses_per_year: external_exports.number(), available_again_at: external_exports.string() }).nullable().optional(),
20103
20120
  // The Discord roles a pause takes ([] none); null when not known. Optional for deploy order.
20104
- pause_access_roles: external_exports.array(external_exports.string()).nullable().optional()
20121
+ pause_access_roles: external_exports.array(external_exports.string()).nullable().optional(),
20122
+ // The running coupon term (`SubscriptionCouponTermView`, loadSubscriptionCouponTermView); null
20123
+ // without one. Amounts are the renewal-pricing function's, in `currency`. Same deploy order.
20124
+ discount: external_exports.object({
20125
+ code: external_exports.string(),
20126
+ discount_type: external_exports.enum(["PERCENTAGE", "FIXED"]),
20127
+ discount_value: external_exports.string(),
20128
+ max_discount: nullableStringSchema,
20129
+ currency: external_exports.string(),
20130
+ duration: external_exports.enum(["ONCE", "REPEATING", "FOREVER"]),
20131
+ payments_total: external_exports.number().nullable(),
20132
+ payments_used: external_exports.number(),
20133
+ discounted_amount: external_exports.string(),
20134
+ full_amount: external_exports.string(),
20135
+ discount_amount: external_exports.string(),
20136
+ next_amount: external_exports.string()
20137
+ }).nullable().optional()
20105
20138
  });
20106
20139
  var customerLoyaltySchema = external_exports.object({
20107
20140
  enabled: external_exports.boolean(),
@@ -20160,6 +20193,12 @@ var customerPortalDashboardSchema = external_exports.object({
20160
20193
  email: external_exports.string(),
20161
20194
  name: external_exports.string()
20162
20195
  }),
20196
+ /*
20197
+ * A merchant's portal link opened this session: the redeem and sign-in routes
20198
+ * refuse it with a 403. Undeclared here, the SDK stripped it and the code
20199
+ * storefront kept offering Redeem until the confirm failed.
20200
+ */
20201
+ opened_by_portal_link: external_exports.boolean(),
20163
20202
  stats: external_exports.object({
20164
20203
  invoices_count: external_exports.number(),
20165
20204
  licenses_count: external_exports.number(),
@@ -20347,21 +20386,6 @@ var customerPortalEmailPreferencesSchema = external_exports.object({
20347
20386
  var customerPortalEmailPreferencesUpdateSchema = external_exports.object({
20348
20387
  updated: external_exports.boolean()
20349
20388
  });
20350
- var customerPortalFavoritesSchema = external_exports.object({
20351
- favorites: external_exports.array(external_exports.object({
20352
- product_uniqid: external_exports.string(),
20353
- title: external_exports.string(),
20354
- slug: nullableStringSchema2,
20355
- image_url: nullableStringSchema2,
20356
- price_display: external_exports.number(),
20357
- unavailable: external_exports.boolean(),
20358
- created_at: external_exports.string()
20359
- }))
20360
- });
20361
- var customerPortalFavoriteMutationSchema = external_exports.union([
20362
- external_exports.object({ added: external_exports.literal(true) }),
20363
- external_exports.object({ removed: external_exports.literal(true) })
20364
- ]);
20365
20389
  var customerPortalLicenseResetSchema = external_exports.object({
20366
20390
  license: external_exports.object({
20367
20391
  uniqid: external_exports.string(),
@@ -20386,7 +20410,17 @@ var customerPortalSubscriptionBillingHistorySchema = external_exports.object({
20386
20410
  status: external_exports.string(),
20387
20411
  gateway: external_exports.string(),
20388
20412
  created_at: external_exports.string(),
20389
- completed_at: external_exports.string()
20413
+ completed_at: external_exports.string(),
20414
+ // What the invoice billed, and the plan change it paid for
20415
+ // (SubscriptionService.getBillingHistory, BillingHistoryPlanChangeSchema).
20416
+ kind: external_exports.enum(["first_order", "renewal", "plan_change"]),
20417
+ plan_change: external_exports.object({
20418
+ from_plan_name: external_exports.string(),
20419
+ to_plan_name: external_exports.string(),
20420
+ source: external_exports.enum(["buyer", "merchant"]),
20421
+ days_left: external_exports.number().nullable(),
20422
+ days_total: external_exports.number().nullable()
20423
+ }).nullable()
20390
20424
  }))
20391
20425
  });
20392
20426
  var customerPortalSubscriptionCancelSchema = external_exports.object({
@@ -21076,26 +21110,6 @@ var HeadlessCustomerClient = class {
21076
21110
  schema: customerWarrantyClaimSchema
21077
21111
  });
21078
21112
  }
21079
- favorites() {
21080
- return this.request("/favorites", {
21081
- authenticated: true,
21082
- schema: customerPortalFavoritesSchema
21083
- });
21084
- }
21085
- addFavorite(productId) {
21086
- return this.request(`/favorites/${encodeURIComponent(productId)}`, {
21087
- method: "PUT",
21088
- authenticated: true,
21089
- schema: customerPortalFavoriteMutationSchema
21090
- });
21091
- }
21092
- removeFavorite(productId) {
21093
- return this.request(`/favorites/${encodeURIComponent(productId)}`, {
21094
- method: "DELETE",
21095
- authenticated: true,
21096
- schema: customerPortalFavoriteMutationSchema
21097
- });
21098
- }
21099
21113
  affiliate() {
21100
21114
  return this.request("/affiliate", {
21101
21115
  authenticated: true,