@outseta/api-client 0.3.24 → 0.3.26

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": "@outseta/api-client",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "description": "Generated API client for the Outseta REST API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type CampaignGetAllBroadcastEmailsParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type CategoryGetAllCategoriesParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type DefinitionGetAllDefinitionsParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type DripCampaignGetAllDripCampaignsParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -536,6 +536,7 @@ export * from './planWebhookEntityPlanAddOnsItemAddOn';
536
536
  export * from './planWebhookEntityPlanAddOnsItemAddOnBillingAddOnType';
537
537
  export * from './planWebhookEntityPlanFamily';
538
538
  export * from './processCodePayload';
539
+ export * from './publicEmailListAddSubscriptionBody';
539
540
  export * from './qcount';
540
541
  export * from './qcountAllOf';
541
542
  export * from './qcountConfig';
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type InvoiceGetAllInvoicesParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  /**
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  /**
4
- * Maximum number of records per page.
4
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
5
5
  */
6
6
  export type LimitParameter = number;
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
 
3
3
  /**
4
- * Zero-based page index.
4
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
5
5
  */
6
6
  export type OffsetParameter = number;
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type PlanFamilyGetAllPlanFamiliesParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type PlanGetAllPlansParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -0,0 +1,7 @@
1
+ // @ts-nocheck
2
+ import type { EmailListPerson } from './emailListPerson';
3
+
4
+ /**
5
+ * @nullable
6
+ */
7
+ export type PublicEmailListAddSubscriptionBody = EmailListPerson | null;
@@ -13,6 +13,12 @@ export type StripePriceAllOf = {
13
13
  * @nullable
14
14
  */
15
15
  Currency?: string | null;
16
+ /** @nullable */
17
+ CustomUnitAmount_Maximum?: number | null;
18
+ /** @nullable */
19
+ CustomUnitAmount_Minimum?: number | null;
20
+ /** @nullable */
21
+ CustomUnitAmount_Preset?: number | null;
16
22
  IsActive?: boolean;
17
23
  /**
18
24
  * @maxLength 250
@@ -40,6 +46,11 @@ export type StripePriceAllOf = {
40
46
  * @nullable
41
47
  */
42
48
  TaxBehavior?: string | null;
49
+ /**
50
+ * @maxLength 36
51
+ * @nullable
52
+ */
53
+ TiersMode?: string | null;
43
54
  /** @nullable */
44
55
  TransformQuantity_DivideBy?: number | null;
45
56
  /**
@@ -4,11 +4,11 @@ import type { OffsetParameter } from './offsetParameter';
4
4
 
5
5
  export type TransactionsGetAllTransactionsByAccountIdParams = {
6
6
  /**
7
- * Maximum number of records per page.
7
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
8
8
  */
9
9
  limit?: LimitParameter;
10
10
  /**
11
- * Zero-based page index.
11
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
12
12
  */
13
13
  offset?: OffsetParameter;
14
14
  };
@@ -4,6 +4,7 @@ import type {
4
4
  AuthResendTwoFactorParams,
5
5
  AuthSwitchTwoFactorMechanismParams,
6
6
  AuthVerifyTwoFactorRecoveryParams,
7
+ PublicEmailListAddSubscriptionBody,
7
8
  TokenPayload,
8
9
  TokenTwoFactorEnrollmentBeginEmailParams,
9
10
  TokenTwoFactorEnrollmentBeginTotpParams,
@@ -17,6 +18,84 @@ import type {
17
18
 
18
19
  import { customFetch } from '../../client';
19
20
 
21
+ // https://stackoverflow.com/questions/49579094/typescript-conditional-types-filter-out-readonly-properties-pick-only-requir/49579497#49579497
22
+ type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <
23
+ T,
24
+ >() => T extends Y ? 1 : 2
25
+ ? A
26
+ : B;
27
+
28
+ type WritableKeys<T> = {
29
+ [P in keyof T]-?: IfEquals<
30
+ { [Q in P]: T[P] },
31
+ { -readonly [Q in P]: T[P] },
32
+ P
33
+ >;
34
+ }[keyof T];
35
+
36
+ type UnionToIntersection<U> =
37
+ (U extends any ? (k: U)=>void : never) extends ((k: infer I)=>void) ? I : never;
38
+ type DistributeReadOnlyOverUnions<T> = T extends any ? NonReadonly<T> : never;
39
+
40
+ type Writable<T> = Pick<T, WritableKeys<T>>;
41
+ type NonReadonly<T> = [T] extends [UnionToIntersection<T>] ? {
42
+ [P in keyof Writable<T>]: T[P] extends object
43
+ ? NonReadonly<NonNullable<T[P]>>
44
+ : T[P];
45
+ } : DistributeReadOnlyOverUnions<T>;
46
+
47
+
48
+ /**
49
+ * This endpoint does not require authentication. The email list must be public, and the
50
+ subscription is subject to bot protection and the list's double opt-in settings.
51
+ * @summary Publicly subscribe a person to an email list.
52
+ */
53
+ export type publicEmailListAddSubscriptionResponse200 = {
54
+ data: Blob
55
+ status: 200
56
+ }
57
+
58
+ export type publicEmailListAddSubscriptionResponse400 = {
59
+ data: void
60
+ status: 400
61
+ }
62
+
63
+ export type publicEmailListAddSubscriptionResponse404 = {
64
+ data: void
65
+ status: 404
66
+ }
67
+
68
+ export type publicEmailListAddSubscriptionResponseSuccess = (publicEmailListAddSubscriptionResponse200) & {
69
+ headers: Headers;
70
+ };
71
+ export type publicEmailListAddSubscriptionResponseError = (publicEmailListAddSubscriptionResponse400 | publicEmailListAddSubscriptionResponse404) & {
72
+ headers: Headers;
73
+ };
74
+
75
+ export type publicEmailListAddSubscriptionResponse = (publicEmailListAddSubscriptionResponseSuccess | publicEmailListAddSubscriptionResponseError)
76
+
77
+ export const getPublicEmailListAddSubscriptionUrl = (emailListUid: string | null,) => {
78
+
79
+
80
+
81
+
82
+ return `/api/v1/public/email/lists/${emailListUid}/subscriptions`
83
+ }
84
+
85
+ export const publicEmailListAddSubscription = async (emailListUid: string | null,
86
+ publicEmailListAddSubscriptionBody: NonReadonly<PublicEmailListAddSubscriptionBody>, options?: RequestInit): Promise<publicEmailListAddSubscriptionResponse> => {
87
+
88
+ return customFetch<publicEmailListAddSubscriptionResponse>(getPublicEmailListAddSubscriptionUrl(emailListUid),
89
+ {
90
+ ...options,
91
+ method: 'POST',
92
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
93
+ body: JSON.stringify(
94
+ publicEmailListAddSubscriptionBody,)
95
+ }
96
+ );}
97
+
98
+
20
99
  /**
21
100
  * Authenticates a user and returns a JWT access token (plus a refresh token).
22
101