@paid-ai/paid-node 1.0.1 → 1.2.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.
Files changed (181) hide show
  1. package/README.md +6 -2
  2. package/dist/cjs/Client.d.ts +9 -0
  3. package/dist/cjs/Client.js +29 -14
  4. package/dist/cjs/api/resources/checkouts/client/Client.d.ts +84 -0
  5. package/dist/cjs/api/resources/checkouts/client/Client.js +350 -0
  6. package/dist/cjs/api/resources/checkouts/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/checkouts/client/index.js +17 -0
  8. package/dist/cjs/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.d.ts +9 -0
  9. package/dist/cjs/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.js +3 -0
  10. package/dist/cjs/api/resources/checkouts/client/requests/CreateCheckoutRequest.d.ts +23 -0
  11. package/dist/cjs/api/resources/checkouts/client/requests/CreateCheckoutRequest.js +3 -0
  12. package/dist/cjs/api/resources/checkouts/client/requests/GetCheckoutRequest.d.ts +9 -0
  13. package/dist/cjs/api/resources/checkouts/client/requests/GetCheckoutRequest.js +3 -0
  14. package/dist/cjs/api/resources/checkouts/client/requests/ListCheckoutsRequest.d.ts +10 -0
  15. package/dist/cjs/api/resources/checkouts/client/requests/ListCheckoutsRequest.js +3 -0
  16. package/dist/cjs/api/resources/checkouts/client/requests/index.d.ts +4 -0
  17. package/dist/cjs/api/resources/checkouts/client/requests/index.js +2 -0
  18. package/dist/cjs/api/resources/checkouts/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/checkouts/index.js +18 -0
  20. package/dist/cjs/api/resources/checkouts/types/ListCheckoutsRequestStatus.d.ts +6 -0
  21. package/dist/cjs/api/resources/checkouts/types/ListCheckoutsRequestStatus.js +9 -0
  22. package/dist/cjs/api/resources/checkouts/types/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/checkouts/types/index.js +17 -0
  24. package/dist/cjs/api/resources/contacts/client/Client.d.ts +0 -2
  25. package/dist/cjs/api/resources/contacts/client/Client.js +0 -2
  26. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +13 -4
  27. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.js +11 -0
  28. package/dist/cjs/api/resources/credits/client/Client.d.ts +27 -0
  29. package/dist/cjs/api/resources/credits/client/Client.js +123 -0
  30. package/dist/cjs/api/resources/credits/client/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/credits/client/index.js +2 -0
  32. package/dist/cjs/api/resources/credits/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/credits/index.js +17 -0
  34. package/dist/cjs/api/resources/customerPortals/client/Client.d.ts +30 -0
  35. package/dist/cjs/api/resources/customerPortals/client/Client.js +133 -0
  36. package/dist/cjs/api/resources/customerPortals/client/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/customerPortals/client/index.js +17 -0
  38. package/dist/cjs/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.d.ts +12 -0
  39. package/dist/cjs/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.js +3 -0
  40. package/dist/cjs/api/resources/customerPortals/client/requests/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/customerPortals/client/requests/index.js +2 -0
  42. package/dist/cjs/api/resources/customerPortals/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/customerPortals/index.js +17 -0
  44. package/dist/cjs/api/resources/customers/client/Client.d.ts +34 -0
  45. package/dist/cjs/api/resources/customers/client/Client.js +136 -0
  46. package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.d.ts +9 -0
  47. package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.js +3 -0
  48. package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.d.ts +9 -0
  49. package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.js +3 -0
  50. package/dist/cjs/api/resources/customers/client/requests/index.d.ts +2 -0
  51. package/dist/cjs/api/resources/index.d.ts +6 -0
  52. package/dist/cjs/api/resources/index.js +7 -1
  53. package/dist/cjs/api/resources/orders/client/requests/CreateOrderRequest.d.ts +12 -7
  54. package/dist/cjs/api/resources/orders/client/requests/UpdateOrderRequest.d.ts +10 -7
  55. package/dist/cjs/api/types/Checkout.d.ts +18 -0
  56. package/dist/cjs/api/types/Checkout.js +3 -0
  57. package/dist/cjs/api/types/CheckoutListResponse.d.ts +5 -0
  58. package/dist/cjs/api/types/CheckoutListResponse.js +3 -0
  59. package/dist/cjs/api/types/CheckoutProduct.d.ts +3 -0
  60. package/dist/cjs/api/types/CheckoutProduct.js +3 -0
  61. package/dist/cjs/api/types/CheckoutProductInput.d.ts +3 -0
  62. package/dist/cjs/api/types/CheckoutProductInput.js +3 -0
  63. package/dist/cjs/api/types/CheckoutStatus.d.ts +7 -0
  64. package/dist/cjs/api/types/CheckoutStatus.js +10 -0
  65. package/dist/cjs/api/types/Contact.d.ts +11 -0
  66. package/dist/cjs/api/types/Contact.js +11 -0
  67. package/dist/cjs/api/types/CreateOrderLineAttributeRequest.d.ts +120 -0
  68. package/dist/cjs/api/types/CreateOrderLineAttributeRequest.js +73 -0
  69. package/dist/cjs/api/types/CreateOrderLineRequest.d.ts +9 -0
  70. package/dist/cjs/api/types/CreateOrderLineRequest.js +3 -0
  71. package/dist/cjs/api/types/CreditBalance.d.ts +19 -0
  72. package/dist/cjs/api/types/CreditBalance.js +11 -0
  73. package/dist/cjs/api/types/CreditBalanceListResponse.d.ts +4 -0
  74. package/dist/cjs/api/types/CreditBalanceListResponse.js +3 -0
  75. package/dist/cjs/api/types/CreditCurrency.d.ts +9 -0
  76. package/dist/cjs/api/types/CreditCurrency.js +3 -0
  77. package/dist/cjs/api/types/CreditCurrencyListResponse.d.ts +4 -0
  78. package/dist/cjs/api/types/CreditCurrencyListResponse.js +3 -0
  79. package/dist/cjs/api/types/CustomerPortal.d.ts +10 -0
  80. package/dist/cjs/api/types/CustomerPortal.js +3 -0
  81. package/dist/cjs/api/types/CustomerPortalStatus.d.ts +5 -0
  82. package/dist/cjs/api/types/CustomerPortalStatus.js +8 -0
  83. package/dist/cjs/api/types/Order.d.ts +3 -0
  84. package/dist/cjs/api/types/Signal.d.ts +2 -0
  85. package/dist/cjs/api/types/UpdateContactRequest.d.ts +11 -0
  86. package/dist/cjs/api/types/UpdateContactRequest.js +11 -0
  87. package/dist/cjs/api/types/index.d.ts +13 -0
  88. package/dist/cjs/api/types/index.js +13 -0
  89. package/dist/cjs/version.d.ts +1 -1
  90. package/dist/cjs/version.js +1 -1
  91. package/dist/esm/Client.d.mts +9 -0
  92. package/dist/esm/Client.mjs +17 -2
  93. package/dist/esm/api/resources/checkouts/client/Client.d.mts +84 -0
  94. package/dist/esm/api/resources/checkouts/client/Client.mjs +313 -0
  95. package/dist/esm/api/resources/checkouts/client/index.d.mts +1 -0
  96. package/dist/esm/api/resources/checkouts/client/index.mjs +1 -0
  97. package/dist/esm/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.d.mts +9 -0
  98. package/dist/esm/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.mjs +2 -0
  99. package/dist/esm/api/resources/checkouts/client/requests/CreateCheckoutRequest.d.mts +23 -0
  100. package/dist/esm/api/resources/checkouts/client/requests/CreateCheckoutRequest.mjs +2 -0
  101. package/dist/esm/api/resources/checkouts/client/requests/GetCheckoutRequest.d.mts +9 -0
  102. package/dist/esm/api/resources/checkouts/client/requests/GetCheckoutRequest.mjs +2 -0
  103. package/dist/esm/api/resources/checkouts/client/requests/ListCheckoutsRequest.d.mts +10 -0
  104. package/dist/esm/api/resources/checkouts/client/requests/ListCheckoutsRequest.mjs +2 -0
  105. package/dist/esm/api/resources/checkouts/client/requests/index.d.mts +4 -0
  106. package/dist/esm/api/resources/checkouts/client/requests/index.mjs +1 -0
  107. package/dist/esm/api/resources/checkouts/index.d.mts +2 -0
  108. package/dist/esm/api/resources/checkouts/index.mjs +2 -0
  109. package/dist/esm/api/resources/checkouts/types/ListCheckoutsRequestStatus.d.mts +6 -0
  110. package/dist/esm/api/resources/checkouts/types/ListCheckoutsRequestStatus.mjs +6 -0
  111. package/dist/esm/api/resources/checkouts/types/index.d.mts +1 -0
  112. package/dist/esm/api/resources/checkouts/types/index.mjs +1 -0
  113. package/dist/esm/api/resources/contacts/client/Client.d.mts +0 -2
  114. package/dist/esm/api/resources/contacts/client/Client.mjs +0 -2
  115. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +13 -4
  116. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.mjs +10 -1
  117. package/dist/esm/api/resources/credits/client/Client.d.mts +27 -0
  118. package/dist/esm/api/resources/credits/client/Client.mjs +86 -0
  119. package/dist/esm/api/resources/credits/client/index.d.mts +1 -0
  120. package/dist/esm/api/resources/credits/client/index.mjs +1 -0
  121. package/dist/esm/api/resources/credits/index.d.mts +1 -0
  122. package/dist/esm/api/resources/credits/index.mjs +1 -0
  123. package/dist/esm/api/resources/customerPortals/client/Client.d.mts +30 -0
  124. package/dist/esm/api/resources/customerPortals/client/Client.mjs +96 -0
  125. package/dist/esm/api/resources/customerPortals/client/index.d.mts +1 -0
  126. package/dist/esm/api/resources/customerPortals/client/index.mjs +1 -0
  127. package/dist/esm/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.d.mts +12 -0
  128. package/dist/esm/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.mjs +2 -0
  129. package/dist/esm/api/resources/customerPortals/client/requests/index.d.mts +1 -0
  130. package/dist/esm/api/resources/customerPortals/client/requests/index.mjs +1 -0
  131. package/dist/esm/api/resources/customerPortals/index.d.mts +1 -0
  132. package/dist/esm/api/resources/customerPortals/index.mjs +1 -0
  133. package/dist/esm/api/resources/customers/client/Client.d.mts +34 -0
  134. package/dist/esm/api/resources/customers/client/Client.mjs +136 -0
  135. package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.d.mts +9 -0
  136. package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.mjs +2 -0
  137. package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.d.mts +9 -0
  138. package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.mjs +2 -0
  139. package/dist/esm/api/resources/customers/client/requests/index.d.mts +2 -0
  140. package/dist/esm/api/resources/index.d.mts +6 -0
  141. package/dist/esm/api/resources/index.mjs +6 -0
  142. package/dist/esm/api/resources/orders/client/requests/CreateOrderRequest.d.mts +12 -7
  143. package/dist/esm/api/resources/orders/client/requests/UpdateOrderRequest.d.mts +10 -7
  144. package/dist/esm/api/types/Checkout.d.mts +18 -0
  145. package/dist/esm/api/types/Checkout.mjs +2 -0
  146. package/dist/esm/api/types/CheckoutListResponse.d.mts +5 -0
  147. package/dist/esm/api/types/CheckoutListResponse.mjs +2 -0
  148. package/dist/esm/api/types/CheckoutProduct.d.mts +3 -0
  149. package/dist/esm/api/types/CheckoutProduct.mjs +2 -0
  150. package/dist/esm/api/types/CheckoutProductInput.d.mts +3 -0
  151. package/dist/esm/api/types/CheckoutProductInput.mjs +2 -0
  152. package/dist/esm/api/types/CheckoutStatus.d.mts +7 -0
  153. package/dist/esm/api/types/CheckoutStatus.mjs +7 -0
  154. package/dist/esm/api/types/Contact.d.mts +11 -0
  155. package/dist/esm/api/types/Contact.mjs +10 -1
  156. package/dist/esm/api/types/CreateOrderLineAttributeRequest.d.mts +120 -0
  157. package/dist/esm/api/types/CreateOrderLineAttributeRequest.mjs +70 -0
  158. package/dist/esm/api/types/CreateOrderLineRequest.d.mts +9 -0
  159. package/dist/esm/api/types/CreateOrderLineRequest.mjs +2 -0
  160. package/dist/esm/api/types/CreditBalance.d.mts +19 -0
  161. package/dist/esm/api/types/CreditBalance.mjs +8 -0
  162. package/dist/esm/api/types/CreditBalanceListResponse.d.mts +4 -0
  163. package/dist/esm/api/types/CreditBalanceListResponse.mjs +2 -0
  164. package/dist/esm/api/types/CreditCurrency.d.mts +9 -0
  165. package/dist/esm/api/types/CreditCurrency.mjs +2 -0
  166. package/dist/esm/api/types/CreditCurrencyListResponse.d.mts +4 -0
  167. package/dist/esm/api/types/CreditCurrencyListResponse.mjs +2 -0
  168. package/dist/esm/api/types/CustomerPortal.d.mts +10 -0
  169. package/dist/esm/api/types/CustomerPortal.mjs +2 -0
  170. package/dist/esm/api/types/CustomerPortalStatus.d.mts +5 -0
  171. package/dist/esm/api/types/CustomerPortalStatus.mjs +5 -0
  172. package/dist/esm/api/types/Order.d.mts +3 -0
  173. package/dist/esm/api/types/Signal.d.mts +2 -0
  174. package/dist/esm/api/types/UpdateContactRequest.d.mts +11 -0
  175. package/dist/esm/api/types/UpdateContactRequest.mjs +10 -1
  176. package/dist/esm/api/types/index.d.mts +13 -0
  177. package/dist/esm/api/types/index.mjs +13 -0
  178. package/dist/esm/version.d.mts +1 -1
  179. package/dist/esm/version.mjs +1 -1
  180. package/package.json +215 -215
  181. package/reference.md +512 -2
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * externalId: "externalId"
5
+ * }
6
+ */
7
+ export interface GetCustomerCreditBalancesByExternalIdRequest {
8
+ externalId: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface GetCustomerCreditBalancesRequest {
8
+ id: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -3,6 +3,8 @@ export type { DeleteCustomerByExternalIdRequest } from "./DeleteCustomerByExtern
3
3
  export type { DeleteCustomerByIdRequest } from "./DeleteCustomerByIdRequest.mjs";
4
4
  export type { GetCustomerByExternalIdRequest } from "./GetCustomerByExternalIdRequest.mjs";
5
5
  export type { GetCustomerByIdRequest } from "./GetCustomerByIdRequest.mjs";
6
+ export type { GetCustomerCreditBalancesByExternalIdRequest } from "./GetCustomerCreditBalancesByExternalIdRequest.mjs";
7
+ export type { GetCustomerCreditBalancesRequest } from "./GetCustomerCreditBalancesRequest.mjs";
6
8
  export type { ListCustomersRequest } from "./ListCustomersRequest.mjs";
7
9
  export type { UpdateCustomerByExternalIdRequest } from "./UpdateCustomerByExternalIdRequest.mjs";
8
10
  export type { UpdateCustomerByIdRequest } from "./UpdateCustomerByIdRequest.mjs";
@@ -1,5 +1,11 @@
1
+ export * from "./checkouts/client/requests/index.mjs";
2
+ export * as checkouts from "./checkouts/index.mjs";
3
+ export * from "./checkouts/types/index.mjs";
1
4
  export * from "./contacts/client/requests/index.mjs";
2
5
  export * as contacts from "./contacts/index.mjs";
6
+ export * as credits from "./credits/index.mjs";
7
+ export * from "./customerPortals/client/requests/index.mjs";
8
+ export * as customerPortals from "./customerPortals/index.mjs";
3
9
  export * from "./customers/client/requests/index.mjs";
4
10
  export * as customers from "./customers/index.mjs";
5
11
  export * from "./invoices/client/requests/index.mjs";
@@ -1,5 +1,11 @@
1
+ export * from "./checkouts/client/requests/index.mjs";
2
+ export * as checkouts from "./checkouts/index.mjs";
3
+ export * from "./checkouts/types/index.mjs";
1
4
  export * from "./contacts/client/requests/index.mjs";
2
5
  export * as contacts from "./contacts/index.mjs";
6
+ export * as credits from "./credits/index.mjs";
7
+ export * from "./customerPortals/client/requests/index.mjs";
8
+ export * as customerPortals from "./customerPortals/index.mjs";
3
9
  export * from "./customers/client/requests/index.mjs";
4
10
  export * as customers from "./customers/index.mjs";
5
11
  export * from "./invoices/client/requests/index.mjs";
@@ -7,16 +7,21 @@ import type * as Paid from "../../../../index.mjs";
7
7
  */
8
8
  export interface CreateOrderRequest {
9
9
  customerId: string;
10
- billingCustomerId?: string | null;
10
+ billingCustomerId?: string;
11
11
  billingContactIds?: string[];
12
12
  name?: string;
13
13
  startDate?: string;
14
- endDate?: string | null;
15
- subscriptionTerms?: number | null;
14
+ endDate?: string;
15
+ subscriptionTerms?: number;
16
16
  creationState?: Paid.OrderCreationState;
17
17
  /** Day of month for billing anchor (1-31). Defaults to start date day if not provided. */
18
- billingAnchor?: number | null;
19
- paymentTerms?: string | null;
20
- externalId?: string | null;
21
- metadata?: Record<string, unknown> | null;
18
+ billingAnchor?: number;
19
+ paymentTerms?: string;
20
+ externalId?: string;
21
+ metadata?: Record<string, unknown>;
22
+ currency?: string;
23
+ autoPostInvoices?: boolean;
24
+ autoSendBillingEmails?: boolean;
25
+ autoSendPaymentEmails?: boolean;
26
+ lines?: Paid.CreateOrderLineRequest[];
22
27
  }
@@ -9,14 +9,17 @@ export interface UpdateOrderRequest {
9
9
  id: string;
10
10
  name?: string;
11
11
  startDate?: string;
12
- endDate?: string | null;
13
- subscriptionTerms?: number | null;
12
+ endDate?: string;
13
+ subscriptionTerms?: number;
14
14
  creationState?: Paid.OrderCreationState;
15
15
  /** Day of month for billing anchor (1-31). Defaults to start date day if not provided. */
16
- billingAnchor?: number | null;
17
- paymentTerms?: string | null;
18
- externalId?: string | null;
19
- metadata?: Record<string, unknown> | null;
20
- billingCustomerId?: string | null;
16
+ billingAnchor?: number;
17
+ paymentTerms?: string;
18
+ externalId?: string;
19
+ metadata?: Record<string, unknown>;
20
+ billingCustomerId?: string;
21
21
  billingContactIds?: string[];
22
+ autoPostInvoices?: boolean;
23
+ autoSendBillingEmails?: boolean;
24
+ autoSendPaymentEmails?: boolean;
22
25
  }
@@ -0,0 +1,18 @@
1
+ import type * as Paid from "../index.mjs";
2
+ export interface Checkout {
3
+ id: string;
4
+ url: string;
5
+ status: Paid.CheckoutStatus;
6
+ products: Paid.CheckoutProduct[];
7
+ customerId: string | null;
8
+ externalCustomerId: string | null;
9
+ successUrl: string;
10
+ cancelUrl: string | null;
11
+ expiresAt: string | null;
12
+ metadata: Record<string, unknown> | null;
13
+ collectAddress: boolean;
14
+ collectPhone: boolean;
15
+ singleUse: boolean;
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as Paid from "../index.mjs";
2
+ export interface CheckoutListResponse {
3
+ data: Paid.Checkout[];
4
+ pagination: Paid.Pagination;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface CheckoutProduct {
2
+ id: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface CheckoutProductInput {
2
+ id: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare const CheckoutStatus: {
2
+ readonly Active: "active";
3
+ readonly Completed: "completed";
4
+ readonly Expired: "expired";
5
+ readonly Archived: "archived";
6
+ };
7
+ export type CheckoutStatus = (typeof CheckoutStatus)[keyof typeof CheckoutStatus];
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const CheckoutStatus = {
3
+ Active: "active",
4
+ Completed: "completed",
5
+ Expired: "expired",
6
+ Archived: "archived",
7
+ };
@@ -8,6 +8,17 @@ export interface Contact {
8
8
  phone: string | null;
9
9
  billingAddress?: Paid.ContactBillingAddress | null;
10
10
  externalId: string | null;
11
+ roles: Contact.Roles.Item[];
11
12
  createdAt: string;
12
13
  updatedAt: string;
13
14
  }
15
+ export declare namespace Contact {
16
+ type Roles = Roles.Item[];
17
+ namespace Roles {
18
+ const Item: {
19
+ readonly Billing: "BILLING";
20
+ readonly AccountsPayable: "ACCOUNTS_PAYABLE";
21
+ };
22
+ type Item = (typeof Item)[keyof typeof Item];
23
+ }
24
+ }
@@ -1,2 +1,11 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var Contact;
3
+ (function (Contact) {
4
+ let Roles;
5
+ (function (Roles) {
6
+ Roles.Item = {
7
+ Billing: "BILLING",
8
+ AccountsPayable: "ACCOUNTS_PAYABLE",
9
+ };
10
+ })(Roles = Contact.Roles || (Contact.Roles = {}));
11
+ })(Contact || (Contact = {}));
@@ -0,0 +1,120 @@
1
+ export interface CreateOrderLineAttributeRequest {
2
+ name: string;
3
+ quantity?: number;
4
+ pricing: CreateOrderLineAttributeRequest.Pricing;
5
+ }
6
+ export declare namespace CreateOrderLineAttributeRequest {
7
+ interface Pricing {
8
+ eventName?: string;
9
+ chargeType: Pricing.ChargeType;
10
+ pricePoints: Pricing.PricePoints;
11
+ pricingModel?: Pricing.PricingModel;
12
+ billingFrequency?: Pricing.BillingFrequency;
13
+ billingFrequencyCustomMonths?: number;
14
+ billingType?: Pricing.BillingType;
15
+ signalType?: Pricing.SignalType;
16
+ creditsCurrencyId?: string;
17
+ creditCost?: number;
18
+ overageUnitPrice?: number;
19
+ creditBenefits?: Pricing.CreditBenefits.Item[];
20
+ }
21
+ namespace Pricing {
22
+ const ChargeType: {
23
+ readonly Usage: "usage";
24
+ readonly Recurring: "recurring";
25
+ readonly OneTime: "oneTime";
26
+ readonly SeatBased: "seatBased";
27
+ };
28
+ type ChargeType = (typeof ChargeType)[keyof typeof ChargeType];
29
+ interface PricePoints {
30
+ currency?: string;
31
+ unitPrice: number;
32
+ minQuantity?: number;
33
+ includedQuantity?: number;
34
+ tiers?: PricePoints.Tiers.Item[];
35
+ }
36
+ namespace PricePoints {
37
+ type Tiers = Tiers.Item[];
38
+ namespace Tiers {
39
+ interface Item {
40
+ flatAmount?: number;
41
+ index?: number;
42
+ lowerBound?: number;
43
+ number?: number;
44
+ tierBillingType?: Item.TierBillingType;
45
+ unitAmount?: number;
46
+ upperBound?: number;
47
+ }
48
+ namespace Item {
49
+ const TierBillingType: {
50
+ readonly Flat: "flat";
51
+ readonly PerUnit: "perUnit";
52
+ };
53
+ type TierBillingType = (typeof TierBillingType)[keyof typeof TierBillingType];
54
+ }
55
+ }
56
+ }
57
+ const PricingModel: {
58
+ readonly PerUnit: "perUnit";
59
+ readonly VolumePricing: "volumePricing";
60
+ readonly GraduatedPricing: "graduatedPricing";
61
+ readonly PrepaidCredits: "prepaidCredits";
62
+ readonly Flat: "flat";
63
+ };
64
+ type PricingModel = (typeof PricingModel)[keyof typeof PricingModel];
65
+ const BillingFrequency: {
66
+ readonly Monthly: "monthly";
67
+ readonly Quarterly: "quarterly";
68
+ readonly SemiAnnually: "semiAnnually";
69
+ readonly Annual: "annual";
70
+ readonly Custom: "custom";
71
+ };
72
+ type BillingFrequency = (typeof BillingFrequency)[keyof typeof BillingFrequency];
73
+ const BillingType: {
74
+ readonly Advance: "advance";
75
+ readonly Arrears: "arrears";
76
+ };
77
+ type BillingType = (typeof BillingType)[keyof typeof BillingType];
78
+ const SignalType: {
79
+ readonly Activity: "activity";
80
+ readonly Outcome: "outcome";
81
+ };
82
+ type SignalType = (typeof SignalType)[keyof typeof SignalType];
83
+ type CreditBenefits = CreditBenefits.Item[];
84
+ namespace CreditBenefits {
85
+ interface Item {
86
+ id: string;
87
+ creditsCurrencyId?: string;
88
+ recipient?: Item.Recipient;
89
+ amount: number;
90
+ rolloverAmount?: number;
91
+ rolloverDuration?: number;
92
+ rolloverDurationUnit?: Item.RolloverDurationUnit;
93
+ allocationCadence?: Item.AllocationCadence;
94
+ creditGrantTiming?: Item.CreditGrantTiming;
95
+ }
96
+ namespace Item {
97
+ const Recipient: {
98
+ readonly Organization: "organization";
99
+ readonly Seat: "seat";
100
+ };
101
+ type Recipient = (typeof Recipient)[keyof typeof Recipient];
102
+ const RolloverDurationUnit: {
103
+ readonly Days: "days";
104
+ readonly Months: "months";
105
+ };
106
+ type RolloverDurationUnit = (typeof RolloverDurationUnit)[keyof typeof RolloverDurationUnit];
107
+ const AllocationCadence: {
108
+ readonly Upfront: "upfront";
109
+ readonly Monthly: "monthly";
110
+ };
111
+ type AllocationCadence = (typeof AllocationCadence)[keyof typeof AllocationCadence];
112
+ const CreditGrantTiming: {
113
+ readonly OnPayment: "on_payment";
114
+ readonly OnOrderActivation: "on_order_activation";
115
+ };
116
+ type CreditGrantTiming = (typeof CreditGrantTiming)[keyof typeof CreditGrantTiming];
117
+ }
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,70 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var CreateOrderLineAttributeRequest;
3
+ (function (CreateOrderLineAttributeRequest) {
4
+ let Pricing;
5
+ (function (Pricing) {
6
+ Pricing.ChargeType = {
7
+ Usage: "usage",
8
+ Recurring: "recurring",
9
+ OneTime: "oneTime",
10
+ SeatBased: "seatBased",
11
+ };
12
+ let PricePoints;
13
+ (function (PricePoints) {
14
+ let Tiers;
15
+ (function (Tiers) {
16
+ let Item;
17
+ (function (Item) {
18
+ Item.TierBillingType = {
19
+ Flat: "flat",
20
+ PerUnit: "perUnit",
21
+ };
22
+ })(Item = Tiers.Item || (Tiers.Item = {}));
23
+ })(Tiers = PricePoints.Tiers || (PricePoints.Tiers = {}));
24
+ })(PricePoints = Pricing.PricePoints || (Pricing.PricePoints = {}));
25
+ Pricing.PricingModel = {
26
+ PerUnit: "perUnit",
27
+ VolumePricing: "volumePricing",
28
+ GraduatedPricing: "graduatedPricing",
29
+ PrepaidCredits: "prepaidCredits",
30
+ Flat: "flat",
31
+ };
32
+ Pricing.BillingFrequency = {
33
+ Monthly: "monthly",
34
+ Quarterly: "quarterly",
35
+ SemiAnnually: "semiAnnually",
36
+ Annual: "annual",
37
+ Custom: "custom",
38
+ };
39
+ Pricing.BillingType = {
40
+ Advance: "advance",
41
+ Arrears: "arrears",
42
+ };
43
+ Pricing.SignalType = {
44
+ Activity: "activity",
45
+ Outcome: "outcome",
46
+ };
47
+ let CreditBenefits;
48
+ (function (CreditBenefits) {
49
+ let Item;
50
+ (function (Item) {
51
+ Item.Recipient = {
52
+ Organization: "organization",
53
+ Seat: "seat",
54
+ };
55
+ Item.RolloverDurationUnit = {
56
+ Days: "days",
57
+ Months: "months",
58
+ };
59
+ Item.AllocationCadence = {
60
+ Upfront: "upfront",
61
+ Monthly: "monthly",
62
+ };
63
+ Item.CreditGrantTiming = {
64
+ OnPayment: "on_payment",
65
+ OnOrderActivation: "on_order_activation",
66
+ };
67
+ })(Item = CreditBenefits.Item || (CreditBenefits.Item = {}));
68
+ })(CreditBenefits = Pricing.CreditBenefits || (Pricing.CreditBenefits = {}));
69
+ })(Pricing = CreateOrderLineAttributeRequest.Pricing || (CreateOrderLineAttributeRequest.Pricing = {}));
70
+ })(CreateOrderLineAttributeRequest || (CreateOrderLineAttributeRequest = {}));
@@ -0,0 +1,9 @@
1
+ import type * as Paid from "../index.mjs";
2
+ export interface CreateOrderLineRequest {
3
+ productId: string;
4
+ name?: string;
5
+ description?: string;
6
+ startDate?: string;
7
+ endDate?: string;
8
+ attributes?: Paid.CreateOrderLineAttributeRequest[];
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,19 @@
1
+ export interface CreditBalance {
2
+ creditsCurrencyId: string;
3
+ currencyName: string;
4
+ currencyKey: string;
5
+ available: number;
6
+ used: number;
7
+ total: number;
8
+ periodStart: string | null;
9
+ periodEnd: string | null;
10
+ rolloverEndDate: string | null;
11
+ recipient: CreditBalance.Recipient;
12
+ }
13
+ export declare namespace CreditBalance {
14
+ const Recipient: {
15
+ readonly Organization: "organization";
16
+ readonly Seat: "seat";
17
+ };
18
+ type Recipient = (typeof Recipient)[keyof typeof Recipient];
19
+ }
@@ -0,0 +1,8 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var CreditBalance;
3
+ (function (CreditBalance) {
4
+ CreditBalance.Recipient = {
5
+ Organization: "organization",
6
+ Seat: "seat",
7
+ };
8
+ })(CreditBalance || (CreditBalance = {}));
@@ -0,0 +1,4 @@
1
+ import type * as Paid from "../index.mjs";
2
+ export interface CreditBalanceListResponse {
3
+ data: Paid.CreditBalance[];
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ export interface CreditCurrency {
2
+ id: string;
3
+ name: string;
4
+ key: string;
5
+ description: string | null;
6
+ archivedAt: string | null;
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as Paid from "../index.mjs";
2
+ export interface CreditCurrencyListResponse {
3
+ data: Paid.CreditCurrency[];
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type * as Paid from "../index.mjs";
2
+ export interface CustomerPortal {
3
+ id: string;
4
+ customerId: string;
5
+ url: string;
6
+ status: Paid.CustomerPortalStatus;
7
+ returnUrl: string | null;
8
+ expiresAt: string;
9
+ createdAt: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const CustomerPortalStatus: {
2
+ readonly Active: "active";
3
+ readonly Expired: "expired";
4
+ };
5
+ export type CustomerPortalStatus = (typeof CustomerPortalStatus)[keyof typeof CustomerPortalStatus];
@@ -0,0 +1,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const CustomerPortalStatus = {
3
+ Active: "active",
4
+ Expired: "expired",
5
+ };
@@ -23,5 +23,8 @@ export interface Order {
23
23
  metadata: Record<string, unknown> | null;
24
24
  showPaymentLink: boolean | null;
25
25
  showBankDetails: boolean | null;
26
+ autoPostInvoices: boolean | null;
27
+ autoSendBillingEmails: boolean | null;
28
+ autoSendPaymentEmails: boolean | null;
26
29
  version: number;
27
30
  }
@@ -3,6 +3,8 @@ export interface Signal {
3
3
  eventName: string;
4
4
  customer: Paid.CustomerAttribution;
5
5
  attribution?: Paid.Attribution;
6
+ /** True event timestamp in RFC3339 format with timezone (e.g. 2026-01-31T23:00:00Z) */
7
+ timestamp?: string;
6
8
  data?: Record<string, unknown>;
7
9
  idempotencyKey?: string;
8
10
  }
@@ -7,4 +7,15 @@ export interface UpdateContactRequest {
7
7
  phone?: string | null;
8
8
  billingAddress?: Paid.ContactBillingAddress | null;
9
9
  externalId?: string | null;
10
+ roles?: UpdateContactRequest.Roles.Item[];
11
+ }
12
+ export declare namespace UpdateContactRequest {
13
+ type Roles = Roles.Item[];
14
+ namespace Roles {
15
+ const Item: {
16
+ readonly Billing: "BILLING";
17
+ readonly AccountsPayable: "ACCOUNTS_PAYABLE";
18
+ };
19
+ type Item = (typeof Item)[keyof typeof Item];
20
+ }
10
21
  }
@@ -1,2 +1,11 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var UpdateContactRequest;
3
+ (function (UpdateContactRequest) {
4
+ let Roles;
5
+ (function (Roles) {
6
+ Roles.Item = {
7
+ Billing: "BILLING",
8
+ AccountsPayable: "ACCOUNTS_PAYABLE",
9
+ };
10
+ })(Roles = UpdateContactRequest.Roles || (UpdateContactRequest.Roles = {}));
11
+ })(UpdateContactRequest || (UpdateContactRequest = {}));
@@ -1,8 +1,19 @@
1
1
  export * from "./Attribution.mjs";
2
2
  export * from "./BulkSignalsResponse.mjs";
3
+ export * from "./Checkout.mjs";
4
+ export * from "./CheckoutListResponse.mjs";
5
+ export * from "./CheckoutProduct.mjs";
6
+ export * from "./CheckoutProductInput.mjs";
7
+ export * from "./CheckoutStatus.mjs";
3
8
  export * from "./Contact.mjs";
4
9
  export * from "./ContactBillingAddress.mjs";
5
10
  export * from "./ContactListResponse.mjs";
11
+ export * from "./CreateOrderLineAttributeRequest.mjs";
12
+ export * from "./CreateOrderLineRequest.mjs";
13
+ export * from "./CreditBalance.mjs";
14
+ export * from "./CreditBalanceListResponse.mjs";
15
+ export * from "./CreditCurrency.mjs";
16
+ export * from "./CreditCurrencyListResponse.mjs";
6
17
  export * from "./Customer.mjs";
7
18
  export * from "./CustomerAttribution.mjs";
8
19
  export * from "./CustomerBillingAddress.mjs";
@@ -10,6 +21,8 @@ export * from "./CustomerByExternalId.mjs";
10
21
  export * from "./CustomerById.mjs";
11
22
  export * from "./CustomerCreationState.mjs";
12
23
  export * from "./CustomerListResponse.mjs";
24
+ export * from "./CustomerPortal.mjs";
25
+ export * from "./CustomerPortalStatus.mjs";
13
26
  export * from "./EmptyResponse.mjs";
14
27
  export * from "./ErrorResponse.mjs";
15
28
  export * from "./Invoice.mjs";
@@ -1,8 +1,19 @@
1
1
  export * from "./Attribution.mjs";
2
2
  export * from "./BulkSignalsResponse.mjs";
3
+ export * from "./Checkout.mjs";
4
+ export * from "./CheckoutListResponse.mjs";
5
+ export * from "./CheckoutProduct.mjs";
6
+ export * from "./CheckoutProductInput.mjs";
7
+ export * from "./CheckoutStatus.mjs";
3
8
  export * from "./Contact.mjs";
4
9
  export * from "./ContactBillingAddress.mjs";
5
10
  export * from "./ContactListResponse.mjs";
11
+ export * from "./CreateOrderLineAttributeRequest.mjs";
12
+ export * from "./CreateOrderLineRequest.mjs";
13
+ export * from "./CreditBalance.mjs";
14
+ export * from "./CreditBalanceListResponse.mjs";
15
+ export * from "./CreditCurrency.mjs";
16
+ export * from "./CreditCurrencyListResponse.mjs";
6
17
  export * from "./Customer.mjs";
7
18
  export * from "./CustomerAttribution.mjs";
8
19
  export * from "./CustomerBillingAddress.mjs";
@@ -10,6 +21,8 @@ export * from "./CustomerByExternalId.mjs";
10
21
  export * from "./CustomerById.mjs";
11
22
  export * from "./CustomerCreationState.mjs";
12
23
  export * from "./CustomerListResponse.mjs";
24
+ export * from "./CustomerPortal.mjs";
25
+ export * from "./CustomerPortalStatus.mjs";
13
26
  export * from "./EmptyResponse.mjs";
14
27
  export * from "./ErrorResponse.mjs";
15
28
  export * from "./Invoice.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.1";
1
+ export declare const SDK_VERSION = "1.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.1";
1
+ export const SDK_VERSION = "1.2.0";