washday-sdk 1.6.60 → 1.6.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "1.6.60",
3
+ "version": "1.6.61",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -33,13 +33,17 @@ export interface UpdateCompanySubscriptionBillingInfoPayload {
33
33
 
34
34
  export type CFDIBillingMode = "none" | "separate_subscription" | "main_subscription_item";
35
35
  export type CFDIMigrationStatus = "none" | "pending_cycle_end" | "migrated";
36
+ export type CFDIBillingStatus = "inactive" | "active" | "cancel_scheduled";
36
37
 
37
38
  export interface CFDIAddonStatus {
38
39
  enabled: boolean;
39
40
  billingMode: CFDIBillingMode;
40
41
  migrationStatus: CFDIMigrationStatus;
42
+ billingStatus: CFDIBillingStatus;
43
+ scheduledDisableAt: string | null;
41
44
  isLegacy: boolean;
42
45
  canToggleFromUI: boolean;
46
+ canCancelScheduledDisable: boolean;
43
47
  }
44
48
 
45
49
  export interface CFDIAddonToggleRequest {
@@ -55,6 +59,9 @@ export interface IStripeSettings {
55
59
  stripeCFDISubItemID: string | null;
56
60
  cfdiBillingMode?: CFDIBillingMode;
57
61
  cfdiMigrationStatus?: CFDIMigrationStatus;
62
+ cfdiBillingStatus?: CFDIBillingStatus;
63
+ cfdiScheduledDisableAt?: Date | string | null;
64
+ stripeCFDIDisableScheduleID?: string | null;
58
65
  legacyStripeCFDISubID?: string | null;
59
66
  legacyStripeCFDISubItemID?: string | null;
60
67
  }
@@ -3,6 +3,7 @@ import {
3
3
  enableCFDIAddon,
4
4
  } from "../src/api/companies/post";
5
5
  import { getCFDIAddonStatus } from "../src/api/companies/get";
6
+ import type { CFDIAddonStatus } from "../src/interfaces/Company";
6
7
 
7
8
  describe("CFDI billing add-on company endpoints", () => {
8
9
  it("enables the CFDI add-on through the billing endpoint", async () => {
@@ -51,4 +52,19 @@ describe("CFDI billing add-on company endpoints", () => {
51
52
  { headers: { Authorization: "Bearer token-1" } },
52
53
  );
53
54
  });
55
+
56
+ it("types scheduled disable status fields", () => {
57
+ const status: CFDIAddonStatus = {
58
+ enabled: false,
59
+ billingMode: "main_subscription_item",
60
+ migrationStatus: "migrated",
61
+ billingStatus: "cancel_scheduled",
62
+ scheduledDisableAt: "2026-06-01T00:00:00.000Z",
63
+ canCancelScheduledDisable: true,
64
+ isLegacy: false,
65
+ canToggleFromUI: true,
66
+ };
67
+
68
+ expect(status.billingStatus).toBe("cancel_scheduled");
69
+ });
54
70
  });