@waffo/pancake-ts 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -325,9 +325,28 @@ interface NotificationSettings {
325
325
  emailSubscriptionCanceled: boolean;
326
326
  emailSubscriptionRevoked: boolean;
327
327
  emailSubscriptionPastDue: boolean;
328
+ emailTrialStarted: boolean;
329
+ emailTrialEnding: boolean;
328
330
  notifyNewOrders: boolean;
329
331
  notifyNewSubscriptions: boolean;
332
+ notifySubscriptionCanceled: boolean;
333
+ notifySubscriptionEnded: boolean;
334
+ notifySubscriptionPastDue: boolean;
335
+ notifySubscriptionRenewed: boolean;
336
+ notifySubscriptionUncanceled: boolean;
337
+ notifySubscriptionUpdated: boolean;
338
+ notifyChargeback: boolean;
339
+ notifyPayoutCompleted: boolean;
340
+ notifyPayoutFailed: boolean;
330
341
  }
342
+ /**
343
+ * Merchant-writable subset of {@link NotificationSettings}.
344
+ *
345
+ * Consumer-email toggles (`email*`) are managed by the PANCAKE platform (admin-only
346
+ * via DB) and **not** writable from this SDK; they would be silently dropped by the
347
+ * `update-store` endpoint if included. Use this type for any merchant-side update.
348
+ */
349
+ type MerchantWritableNotificationSettings = Pick<NotificationSettings, "notifyNewOrders" | "notifyNewSubscriptions" | "notifySubscriptionCanceled" | "notifySubscriptionEnded" | "notifySubscriptionPastDue" | "notifySubscriptionRenewed" | "notifySubscriptionUncanceled" | "notifySubscriptionUpdated" | "notifyChargeback" | "notifyPayoutCompleted" | "notifyPayoutFailed">;
331
350
  /**
332
351
  * Single-theme checkout page styling.
333
352
  * @see waffo-pancake-store-service/app/lib/types.ts
@@ -398,7 +417,7 @@ interface UpdateStoreParams {
398
417
  /** Store website URL (set to `null` to remove) */
399
418
  website?: string | null;
400
419
  /** Notification preferences (partial update — omitted fields keep existing values, set to `null` to clear all) */
401
- notificationSettings?: Partial<NotificationSettings> | null;
420
+ notificationSettings?: Partial<MerchantWritableNotificationSettings> | null;
402
421
  /** Checkout page theme configuration (partial update — omitted fields keep existing values, set to `null` to clear all) */
403
422
  checkoutSettings?: Partial<CheckoutSettings> | null;
404
423
  }
@@ -518,9 +537,9 @@ interface CreateOnetimeProductParams {
518
537
  storeId: string;
519
538
  name: string;
520
539
  prices: Prices;
521
- description?: string;
540
+ description?: string | null;
522
541
  media?: MediaItem[];
523
- successUrl?: string;
542
+ successUrl?: string | null;
524
543
  metadata?: Record<string, unknown>;
525
544
  }
526
545
  /**
@@ -531,9 +550,9 @@ interface UpdateOnetimeProductParams {
531
550
  id: string;
532
551
  name?: string;
533
552
  prices?: Prices;
534
- description?: string;
553
+ description?: string | null;
535
554
  media?: MediaItem[];
536
- successUrl?: string;
555
+ successUrl?: string | null;
537
556
  metadata?: Record<string, unknown>;
538
557
  }
539
558
  /** Parameters for publishing a one-time product's test version to production. */
@@ -576,9 +595,9 @@ interface CreateSubscriptionProductParams {
576
595
  name: string;
577
596
  billingPeriod: BillingPeriod;
578
597
  prices: Prices;
579
- description?: string;
598
+ description?: string | null;
580
599
  media?: MediaItem[];
581
- successUrl?: string;
600
+ successUrl?: string | null;
582
601
  metadata?: Record<string, unknown>;
583
602
  }
584
603
  /**
@@ -590,9 +609,9 @@ interface UpdateSubscriptionProductParams {
590
609
  name?: string;
591
610
  billingPeriod?: BillingPeriod;
592
611
  prices?: Prices;
593
- description?: string;
612
+ description?: string | null;
594
613
  media?: MediaItem[];
595
- successUrl?: string;
614
+ successUrl?: string | null;
596
615
  metadata?: Record<string, unknown>;
597
616
  }
598
617
  /** Parameters for publishing a subscription product's test version to production. */
@@ -2103,4 +2122,4 @@ declare class WaffoPancakeError extends Error {
2103
2122
  */
2104
2123
  declare function verifyWebhook<T = Record<string, unknown>>(payload: string, signatureHeader: string | undefined | null, options?: VerifyWebhookOptions): WebhookEvent<T>;
2105
2124
 
2106
- export { type AddMerchantParams, type AddMerchantResult, type AddWebhookParams, type AnonymousCheckoutParams, type ApiError, type AuthenticatedCheckoutParams, type AuthenticatedCheckoutResult, type BillingDetail, BillingPeriod, type CancelOnetimeOrderParams, type CancelOnetimeOrderResult, type CancelSubscriptionParams, type CancelSubscriptionResult, type CheckoutSessionResult, type CheckoutSettings, type CheckoutThemeSettings, type CreateCheckoutSessionParams, type CreateOnetimeProductParams, type CreateRefundTicketParams, type CreateStoreParams, type CreateSubscriptionProductGroupParams, type CreateSubscriptionProductParams, type DeleteStoreParams, type DeleteSubscriptionProductGroupParams, EntityStatus, type Envelope, Environment, ErrorLayer, type GraphQLParams, type GraphQLResponse, type GroupRules, type IssueSessionTokenParams, type MediaItem, MediaType, type Notice, type NotificationSettings, OnetimeOrderStatus, type OnetimeProductDetail, PaymentStatus, type PostResult, type PriceInfo, type Prices, ProductVersionStatus, type PublishOnetimeProductParams, type PublishSubscriptionProductGroupParams, type PublishSubscriptionProductParams, type ReactivateSubscriptionParams, type ReactivateSubscriptionResult, RefundStatus, type RefundTicket, RefundTicketStatus, type RefundTicketVersionData, type RemoveMerchantParams, type RemoveMerchantResult, type RemoveWebhookParams, type RequestedAmount, type ResubmitRefundTicketParams, type SessionToken, type Store, StoreRole, type StoreWebhook, SubscriptionOrderStatus, type SubscriptionProductDetail, type SubscriptionProductGroup, TaxCategory, type UpdateOnetimeProductParams, type UpdateOnetimeStatusParams, type UpdateRoleParams, type UpdateRoleResult, type UpdateStoreParams, type UpdateSubscriptionProductGroupParams, type UpdateSubscriptionProductParams, type UpdateSubscriptionStatusParams, type UpdateWebhookParams, type VerifyWebhookOptions, WaffoPancake, type WaffoPancakeConfig, WaffoPancakeError, type WebhookChannel, type WebhookEvent, type WebhookEventData, WebhookEventType, type WebhookPublicKeys, verifyWebhook };
2125
+ export { type AddMerchantParams, type AddMerchantResult, type AddWebhookParams, type AnonymousCheckoutParams, type ApiError, type AuthenticatedCheckoutParams, type AuthenticatedCheckoutResult, type BillingDetail, BillingPeriod, type CancelOnetimeOrderParams, type CancelOnetimeOrderResult, type CancelSubscriptionParams, type CancelSubscriptionResult, type CheckoutSessionResult, type CheckoutSettings, type CheckoutThemeSettings, type CreateCheckoutSessionParams, type CreateOnetimeProductParams, type CreateRefundTicketParams, type CreateStoreParams, type CreateSubscriptionProductGroupParams, type CreateSubscriptionProductParams, type DeleteStoreParams, type DeleteSubscriptionProductGroupParams, EntityStatus, type Envelope, Environment, ErrorLayer, type GraphQLParams, type GraphQLResponse, type GroupRules, type IssueSessionTokenParams, type MediaItem, MediaType, type MerchantWritableNotificationSettings, type Notice, type NotificationSettings, OnetimeOrderStatus, type OnetimeProductDetail, PaymentStatus, type PostResult, type PriceInfo, type Prices, ProductVersionStatus, type PublishOnetimeProductParams, type PublishSubscriptionProductGroupParams, type PublishSubscriptionProductParams, type ReactivateSubscriptionParams, type ReactivateSubscriptionResult, RefundStatus, type RefundTicket, RefundTicketStatus, type RefundTicketVersionData, type RemoveMerchantParams, type RemoveMerchantResult, type RemoveWebhookParams, type RequestedAmount, type ResubmitRefundTicketParams, type SessionToken, type Store, StoreRole, type StoreWebhook, SubscriptionOrderStatus, type SubscriptionProductDetail, type SubscriptionProductGroup, TaxCategory, type UpdateOnetimeProductParams, type UpdateOnetimeStatusParams, type UpdateRoleParams, type UpdateRoleResult, type UpdateStoreParams, type UpdateSubscriptionProductGroupParams, type UpdateSubscriptionProductParams, type UpdateSubscriptionStatusParams, type UpdateWebhookParams, type VerifyWebhookOptions, WaffoPancake, type WaffoPancakeConfig, WaffoPancakeError, type WebhookChannel, type WebhookEvent, type WebhookEventData, WebhookEventType, type WebhookPublicKeys, verifyWebhook };
package/dist/index.d.ts CHANGED
@@ -325,9 +325,28 @@ interface NotificationSettings {
325
325
  emailSubscriptionCanceled: boolean;
326
326
  emailSubscriptionRevoked: boolean;
327
327
  emailSubscriptionPastDue: boolean;
328
+ emailTrialStarted: boolean;
329
+ emailTrialEnding: boolean;
328
330
  notifyNewOrders: boolean;
329
331
  notifyNewSubscriptions: boolean;
332
+ notifySubscriptionCanceled: boolean;
333
+ notifySubscriptionEnded: boolean;
334
+ notifySubscriptionPastDue: boolean;
335
+ notifySubscriptionRenewed: boolean;
336
+ notifySubscriptionUncanceled: boolean;
337
+ notifySubscriptionUpdated: boolean;
338
+ notifyChargeback: boolean;
339
+ notifyPayoutCompleted: boolean;
340
+ notifyPayoutFailed: boolean;
330
341
  }
342
+ /**
343
+ * Merchant-writable subset of {@link NotificationSettings}.
344
+ *
345
+ * Consumer-email toggles (`email*`) are managed by the PANCAKE platform (admin-only
346
+ * via DB) and **not** writable from this SDK; they would be silently dropped by the
347
+ * `update-store` endpoint if included. Use this type for any merchant-side update.
348
+ */
349
+ type MerchantWritableNotificationSettings = Pick<NotificationSettings, "notifyNewOrders" | "notifyNewSubscriptions" | "notifySubscriptionCanceled" | "notifySubscriptionEnded" | "notifySubscriptionPastDue" | "notifySubscriptionRenewed" | "notifySubscriptionUncanceled" | "notifySubscriptionUpdated" | "notifyChargeback" | "notifyPayoutCompleted" | "notifyPayoutFailed">;
331
350
  /**
332
351
  * Single-theme checkout page styling.
333
352
  * @see waffo-pancake-store-service/app/lib/types.ts
@@ -398,7 +417,7 @@ interface UpdateStoreParams {
398
417
  /** Store website URL (set to `null` to remove) */
399
418
  website?: string | null;
400
419
  /** Notification preferences (partial update — omitted fields keep existing values, set to `null` to clear all) */
401
- notificationSettings?: Partial<NotificationSettings> | null;
420
+ notificationSettings?: Partial<MerchantWritableNotificationSettings> | null;
402
421
  /** Checkout page theme configuration (partial update — omitted fields keep existing values, set to `null` to clear all) */
403
422
  checkoutSettings?: Partial<CheckoutSettings> | null;
404
423
  }
@@ -518,9 +537,9 @@ interface CreateOnetimeProductParams {
518
537
  storeId: string;
519
538
  name: string;
520
539
  prices: Prices;
521
- description?: string;
540
+ description?: string | null;
522
541
  media?: MediaItem[];
523
- successUrl?: string;
542
+ successUrl?: string | null;
524
543
  metadata?: Record<string, unknown>;
525
544
  }
526
545
  /**
@@ -531,9 +550,9 @@ interface UpdateOnetimeProductParams {
531
550
  id: string;
532
551
  name?: string;
533
552
  prices?: Prices;
534
- description?: string;
553
+ description?: string | null;
535
554
  media?: MediaItem[];
536
- successUrl?: string;
555
+ successUrl?: string | null;
537
556
  metadata?: Record<string, unknown>;
538
557
  }
539
558
  /** Parameters for publishing a one-time product's test version to production. */
@@ -576,9 +595,9 @@ interface CreateSubscriptionProductParams {
576
595
  name: string;
577
596
  billingPeriod: BillingPeriod;
578
597
  prices: Prices;
579
- description?: string;
598
+ description?: string | null;
580
599
  media?: MediaItem[];
581
- successUrl?: string;
600
+ successUrl?: string | null;
582
601
  metadata?: Record<string, unknown>;
583
602
  }
584
603
  /**
@@ -590,9 +609,9 @@ interface UpdateSubscriptionProductParams {
590
609
  name?: string;
591
610
  billingPeriod?: BillingPeriod;
592
611
  prices?: Prices;
593
- description?: string;
612
+ description?: string | null;
594
613
  media?: MediaItem[];
595
- successUrl?: string;
614
+ successUrl?: string | null;
596
615
  metadata?: Record<string, unknown>;
597
616
  }
598
617
  /** Parameters for publishing a subscription product's test version to production. */
@@ -2103,4 +2122,4 @@ declare class WaffoPancakeError extends Error {
2103
2122
  */
2104
2123
  declare function verifyWebhook<T = Record<string, unknown>>(payload: string, signatureHeader: string | undefined | null, options?: VerifyWebhookOptions): WebhookEvent<T>;
2105
2124
 
2106
- export { type AddMerchantParams, type AddMerchantResult, type AddWebhookParams, type AnonymousCheckoutParams, type ApiError, type AuthenticatedCheckoutParams, type AuthenticatedCheckoutResult, type BillingDetail, BillingPeriod, type CancelOnetimeOrderParams, type CancelOnetimeOrderResult, type CancelSubscriptionParams, type CancelSubscriptionResult, type CheckoutSessionResult, type CheckoutSettings, type CheckoutThemeSettings, type CreateCheckoutSessionParams, type CreateOnetimeProductParams, type CreateRefundTicketParams, type CreateStoreParams, type CreateSubscriptionProductGroupParams, type CreateSubscriptionProductParams, type DeleteStoreParams, type DeleteSubscriptionProductGroupParams, EntityStatus, type Envelope, Environment, ErrorLayer, type GraphQLParams, type GraphQLResponse, type GroupRules, type IssueSessionTokenParams, type MediaItem, MediaType, type Notice, type NotificationSettings, OnetimeOrderStatus, type OnetimeProductDetail, PaymentStatus, type PostResult, type PriceInfo, type Prices, ProductVersionStatus, type PublishOnetimeProductParams, type PublishSubscriptionProductGroupParams, type PublishSubscriptionProductParams, type ReactivateSubscriptionParams, type ReactivateSubscriptionResult, RefundStatus, type RefundTicket, RefundTicketStatus, type RefundTicketVersionData, type RemoveMerchantParams, type RemoveMerchantResult, type RemoveWebhookParams, type RequestedAmount, type ResubmitRefundTicketParams, type SessionToken, type Store, StoreRole, type StoreWebhook, SubscriptionOrderStatus, type SubscriptionProductDetail, type SubscriptionProductGroup, TaxCategory, type UpdateOnetimeProductParams, type UpdateOnetimeStatusParams, type UpdateRoleParams, type UpdateRoleResult, type UpdateStoreParams, type UpdateSubscriptionProductGroupParams, type UpdateSubscriptionProductParams, type UpdateSubscriptionStatusParams, type UpdateWebhookParams, type VerifyWebhookOptions, WaffoPancake, type WaffoPancakeConfig, WaffoPancakeError, type WebhookChannel, type WebhookEvent, type WebhookEventData, WebhookEventType, type WebhookPublicKeys, verifyWebhook };
2125
+ export { type AddMerchantParams, type AddMerchantResult, type AddWebhookParams, type AnonymousCheckoutParams, type ApiError, type AuthenticatedCheckoutParams, type AuthenticatedCheckoutResult, type BillingDetail, BillingPeriod, type CancelOnetimeOrderParams, type CancelOnetimeOrderResult, type CancelSubscriptionParams, type CancelSubscriptionResult, type CheckoutSessionResult, type CheckoutSettings, type CheckoutThemeSettings, type CreateCheckoutSessionParams, type CreateOnetimeProductParams, type CreateRefundTicketParams, type CreateStoreParams, type CreateSubscriptionProductGroupParams, type CreateSubscriptionProductParams, type DeleteStoreParams, type DeleteSubscriptionProductGroupParams, EntityStatus, type Envelope, Environment, ErrorLayer, type GraphQLParams, type GraphQLResponse, type GroupRules, type IssueSessionTokenParams, type MediaItem, MediaType, type MerchantWritableNotificationSettings, type Notice, type NotificationSettings, OnetimeOrderStatus, type OnetimeProductDetail, PaymentStatus, type PostResult, type PriceInfo, type Prices, ProductVersionStatus, type PublishOnetimeProductParams, type PublishSubscriptionProductGroupParams, type PublishSubscriptionProductParams, type ReactivateSubscriptionParams, type ReactivateSubscriptionResult, RefundStatus, type RefundTicket, RefundTicketStatus, type RefundTicketVersionData, type RemoveMerchantParams, type RemoveMerchantResult, type RemoveWebhookParams, type RequestedAmount, type ResubmitRefundTicketParams, type SessionToken, type Store, StoreRole, type StoreWebhook, SubscriptionOrderStatus, type SubscriptionProductDetail, type SubscriptionProductGroup, TaxCategory, type UpdateOnetimeProductParams, type UpdateOnetimeStatusParams, type UpdateRoleParams, type UpdateRoleResult, type UpdateStoreParams, type UpdateSubscriptionProductGroupParams, type UpdateSubscriptionProductParams, type UpdateSubscriptionStatusParams, type UpdateWebhookParams, type VerifyWebhookOptions, WaffoPancake, type WaffoPancakeConfig, WaffoPancakeError, type WebhookChannel, type WebhookEvent, type WebhookEventData, WebhookEventType, type WebhookPublicKeys, verifyWebhook };