@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.
- package/README.md +6 -2
- package/dist/cjs/Client.d.ts +9 -0
- package/dist/cjs/Client.js +29 -14
- package/dist/cjs/api/resources/checkouts/client/Client.d.ts +84 -0
- package/dist/cjs/api/resources/checkouts/client/Client.js +350 -0
- package/dist/cjs/api/resources/checkouts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/checkouts/client/index.js +17 -0
- package/dist/cjs/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.d.ts +9 -0
- package/dist/cjs/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.js +3 -0
- package/dist/cjs/api/resources/checkouts/client/requests/CreateCheckoutRequest.d.ts +23 -0
- package/dist/cjs/api/resources/checkouts/client/requests/CreateCheckoutRequest.js +3 -0
- package/dist/cjs/api/resources/checkouts/client/requests/GetCheckoutRequest.d.ts +9 -0
- package/dist/cjs/api/resources/checkouts/client/requests/GetCheckoutRequest.js +3 -0
- package/dist/cjs/api/resources/checkouts/client/requests/ListCheckoutsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/checkouts/client/requests/ListCheckoutsRequest.js +3 -0
- package/dist/cjs/api/resources/checkouts/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/checkouts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/checkouts/index.d.ts +2 -0
- package/dist/cjs/api/resources/checkouts/index.js +18 -0
- package/dist/cjs/api/resources/checkouts/types/ListCheckoutsRequestStatus.d.ts +6 -0
- package/dist/cjs/api/resources/checkouts/types/ListCheckoutsRequestStatus.js +9 -0
- package/dist/cjs/api/resources/checkouts/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/checkouts/types/index.js +17 -0
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +0 -2
- package/dist/cjs/api/resources/contacts/client/Client.js +0 -2
- package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +13 -4
- package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.js +11 -0
- package/dist/cjs/api/resources/credits/client/Client.d.ts +27 -0
- package/dist/cjs/api/resources/credits/client/Client.js +123 -0
- package/dist/cjs/api/resources/credits/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/credits/client/index.js +2 -0
- package/dist/cjs/api/resources/credits/index.d.ts +1 -0
- package/dist/cjs/api/resources/credits/index.js +17 -0
- package/dist/cjs/api/resources/customerPortals/client/Client.d.ts +30 -0
- package/dist/cjs/api/resources/customerPortals/client/Client.js +133 -0
- package/dist/cjs/api/resources/customerPortals/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortals/client/index.js +17 -0
- package/dist/cjs/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.d.ts +12 -0
- package/dist/cjs/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.js +3 -0
- package/dist/cjs/api/resources/customerPortals/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortals/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customerPortals/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortals/index.js +17 -0
- package/dist/cjs/api/resources/customers/client/Client.d.ts +34 -0
- package/dist/cjs/api/resources/customers/client/Client.js +136 -0
- package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.js +3 -0
- package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.js +3 -0
- package/dist/cjs/api/resources/customers/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.d.ts +6 -0
- package/dist/cjs/api/resources/index.js +7 -1
- package/dist/cjs/api/resources/orders/client/requests/CreateOrderRequest.d.ts +12 -7
- package/dist/cjs/api/resources/orders/client/requests/UpdateOrderRequest.d.ts +10 -7
- package/dist/cjs/api/types/Checkout.d.ts +18 -0
- package/dist/cjs/api/types/Checkout.js +3 -0
- package/dist/cjs/api/types/CheckoutListResponse.d.ts +5 -0
- package/dist/cjs/api/types/CheckoutListResponse.js +3 -0
- package/dist/cjs/api/types/CheckoutProduct.d.ts +3 -0
- package/dist/cjs/api/types/CheckoutProduct.js +3 -0
- package/dist/cjs/api/types/CheckoutProductInput.d.ts +3 -0
- package/dist/cjs/api/types/CheckoutProductInput.js +3 -0
- package/dist/cjs/api/types/CheckoutStatus.d.ts +7 -0
- package/dist/cjs/api/types/CheckoutStatus.js +10 -0
- package/dist/cjs/api/types/Contact.d.ts +11 -0
- package/dist/cjs/api/types/Contact.js +11 -0
- package/dist/cjs/api/types/CreateOrderLineAttributeRequest.d.ts +120 -0
- package/dist/cjs/api/types/CreateOrderLineAttributeRequest.js +73 -0
- package/dist/cjs/api/types/CreateOrderLineRequest.d.ts +9 -0
- package/dist/cjs/api/types/CreateOrderLineRequest.js +3 -0
- package/dist/cjs/api/types/CreditBalance.d.ts +19 -0
- package/dist/cjs/api/types/CreditBalance.js +11 -0
- package/dist/cjs/api/types/CreditBalanceListResponse.d.ts +4 -0
- package/dist/cjs/api/types/CreditBalanceListResponse.js +3 -0
- package/dist/cjs/api/types/CreditCurrency.d.ts +9 -0
- package/dist/cjs/api/types/CreditCurrency.js +3 -0
- package/dist/cjs/api/types/CreditCurrencyListResponse.d.ts +4 -0
- package/dist/cjs/api/types/CreditCurrencyListResponse.js +3 -0
- package/dist/cjs/api/types/CustomerPortal.d.ts +10 -0
- package/dist/cjs/api/types/CustomerPortal.js +3 -0
- package/dist/cjs/api/types/CustomerPortalStatus.d.ts +5 -0
- package/dist/cjs/api/types/CustomerPortalStatus.js +8 -0
- package/dist/cjs/api/types/Order.d.ts +3 -0
- package/dist/cjs/api/types/Signal.d.ts +2 -0
- package/dist/cjs/api/types/UpdateContactRequest.d.ts +11 -0
- package/dist/cjs/api/types/UpdateContactRequest.js +11 -0
- package/dist/cjs/api/types/index.d.ts +13 -0
- package/dist/cjs/api/types/index.js +13 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +9 -0
- package/dist/esm/Client.mjs +17 -2
- package/dist/esm/api/resources/checkouts/client/Client.d.mts +84 -0
- package/dist/esm/api/resources/checkouts/client/Client.mjs +313 -0
- package/dist/esm/api/resources/checkouts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/checkouts/client/index.mjs +1 -0
- package/dist/esm/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.d.mts +9 -0
- package/dist/esm/api/resources/checkouts/client/requests/ArchiveCheckoutRequest.mjs +2 -0
- package/dist/esm/api/resources/checkouts/client/requests/CreateCheckoutRequest.d.mts +23 -0
- package/dist/esm/api/resources/checkouts/client/requests/CreateCheckoutRequest.mjs +2 -0
- package/dist/esm/api/resources/checkouts/client/requests/GetCheckoutRequest.d.mts +9 -0
- package/dist/esm/api/resources/checkouts/client/requests/GetCheckoutRequest.mjs +2 -0
- package/dist/esm/api/resources/checkouts/client/requests/ListCheckoutsRequest.d.mts +10 -0
- package/dist/esm/api/resources/checkouts/client/requests/ListCheckoutsRequest.mjs +2 -0
- package/dist/esm/api/resources/checkouts/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/checkouts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/checkouts/index.d.mts +2 -0
- package/dist/esm/api/resources/checkouts/index.mjs +2 -0
- package/dist/esm/api/resources/checkouts/types/ListCheckoutsRequestStatus.d.mts +6 -0
- package/dist/esm/api/resources/checkouts/types/ListCheckoutsRequestStatus.mjs +6 -0
- package/dist/esm/api/resources/checkouts/types/index.d.mts +1 -0
- package/dist/esm/api/resources/checkouts/types/index.mjs +1 -0
- package/dist/esm/api/resources/contacts/client/Client.d.mts +0 -2
- package/dist/esm/api/resources/contacts/client/Client.mjs +0 -2
- package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +13 -4
- package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.mjs +10 -1
- package/dist/esm/api/resources/credits/client/Client.d.mts +27 -0
- package/dist/esm/api/resources/credits/client/Client.mjs +86 -0
- package/dist/esm/api/resources/credits/client/index.d.mts +1 -0
- package/dist/esm/api/resources/credits/client/index.mjs +1 -0
- package/dist/esm/api/resources/credits/index.d.mts +1 -0
- package/dist/esm/api/resources/credits/index.mjs +1 -0
- package/dist/esm/api/resources/customerPortals/client/Client.d.mts +30 -0
- package/dist/esm/api/resources/customerPortals/client/Client.mjs +96 -0
- package/dist/esm/api/resources/customerPortals/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customerPortals/client/index.mjs +1 -0
- package/dist/esm/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.d.mts +12 -0
- package/dist/esm/api/resources/customerPortals/client/requests/CreateCustomerPortalRequest.mjs +2 -0
- package/dist/esm/api/resources/customerPortals/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/customerPortals/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customerPortals/index.d.mts +1 -0
- package/dist/esm/api/resources/customerPortals/index.mjs +1 -0
- package/dist/esm/api/resources/customers/client/Client.d.mts +34 -0
- package/dist/esm/api/resources/customers/client/Client.mjs +136 -0
- package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.d.mts +9 -0
- package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesByExternalIdRequest.mjs +2 -0
- package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.d.mts +9 -0
- package/dist/esm/api/resources/customers/client/requests/GetCustomerCreditBalancesRequest.mjs +2 -0
- package/dist/esm/api/resources/customers/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/index.d.mts +6 -0
- package/dist/esm/api/resources/index.mjs +6 -0
- package/dist/esm/api/resources/orders/client/requests/CreateOrderRequest.d.mts +12 -7
- package/dist/esm/api/resources/orders/client/requests/UpdateOrderRequest.d.mts +10 -7
- package/dist/esm/api/types/Checkout.d.mts +18 -0
- package/dist/esm/api/types/Checkout.mjs +2 -0
- package/dist/esm/api/types/CheckoutListResponse.d.mts +5 -0
- package/dist/esm/api/types/CheckoutListResponse.mjs +2 -0
- package/dist/esm/api/types/CheckoutProduct.d.mts +3 -0
- package/dist/esm/api/types/CheckoutProduct.mjs +2 -0
- package/dist/esm/api/types/CheckoutProductInput.d.mts +3 -0
- package/dist/esm/api/types/CheckoutProductInput.mjs +2 -0
- package/dist/esm/api/types/CheckoutStatus.d.mts +7 -0
- package/dist/esm/api/types/CheckoutStatus.mjs +7 -0
- package/dist/esm/api/types/Contact.d.mts +11 -0
- package/dist/esm/api/types/Contact.mjs +10 -1
- package/dist/esm/api/types/CreateOrderLineAttributeRequest.d.mts +120 -0
- package/dist/esm/api/types/CreateOrderLineAttributeRequest.mjs +70 -0
- package/dist/esm/api/types/CreateOrderLineRequest.d.mts +9 -0
- package/dist/esm/api/types/CreateOrderLineRequest.mjs +2 -0
- package/dist/esm/api/types/CreditBalance.d.mts +19 -0
- package/dist/esm/api/types/CreditBalance.mjs +8 -0
- package/dist/esm/api/types/CreditBalanceListResponse.d.mts +4 -0
- package/dist/esm/api/types/CreditBalanceListResponse.mjs +2 -0
- package/dist/esm/api/types/CreditCurrency.d.mts +9 -0
- package/dist/esm/api/types/CreditCurrency.mjs +2 -0
- package/dist/esm/api/types/CreditCurrencyListResponse.d.mts +4 -0
- package/dist/esm/api/types/CreditCurrencyListResponse.mjs +2 -0
- package/dist/esm/api/types/CustomerPortal.d.mts +10 -0
- package/dist/esm/api/types/CustomerPortal.mjs +2 -0
- package/dist/esm/api/types/CustomerPortalStatus.d.mts +5 -0
- package/dist/esm/api/types/CustomerPortalStatus.mjs +5 -0
- package/dist/esm/api/types/Order.d.mts +3 -0
- package/dist/esm/api/types/Signal.d.mts +2 -0
- package/dist/esm/api/types/UpdateContactRequest.d.mts +11 -0
- package/dist/esm/api/types/UpdateContactRequest.mjs +10 -1
- package/dist/esm/api/types/index.d.mts +13 -0
- package/dist/esm/api/types/index.mjs +13 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +215 -215
- package/reference.md +512 -2
|
@@ -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
|
|
10
|
+
billingCustomerId?: string;
|
|
11
11
|
billingContactIds?: string[];
|
|
12
12
|
name?: string;
|
|
13
13
|
startDate?: string;
|
|
14
|
-
endDate?: string
|
|
15
|
-
subscriptionTerms?: number
|
|
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
|
|
19
|
-
paymentTerms?: string
|
|
20
|
-
externalId?: string
|
|
21
|
-
metadata?: Record<string, unknown
|
|
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
|
|
13
|
-
subscriptionTerms?: number
|
|
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
|
|
17
|
-
paymentTerms?: string
|
|
18
|
-
externalId?: string
|
|
19
|
-
metadata?: Record<string, unknown
|
|
20
|
-
billingCustomerId?: string
|
|
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
|
+
}
|
|
@@ -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,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
|
+
}
|
|
@@ -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";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0
|
|
1
|
+
export declare const SDK_VERSION = "1.2.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0
|
|
1
|
+
export const SDK_VERSION = "1.2.0";
|