@outseta/api-client 0.3.40 → 0.3.42
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.js +24 -0
- package/package.json +1 -1
- package/src/generated/billing/billing.ts +56 -0
- package/src/generated/models/accountAllOf.ts +6 -0
- package/src/generated/models/accountAllOfStripeCheckoutMetadata.ts +6 -0
- package/src/generated/models/accountWebhookEntity.ts +3 -0
- package/src/generated/models/accountWebhookEntityCurrentStripeProductInstancesItem.ts +85 -0
- package/src/generated/models/accountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode.ts +13 -0
- package/src/generated/models/crmSettingsAllOf.ts +0 -1
- package/src/generated/models/index.ts +5 -0
- package/src/generated/models/planAddOnGetAllPlanAddOns200.ts +8 -0
- package/src/generated/models/planAddOnGetAllPlanAddOnsParams.ts +14 -0
- package/src/generated/models/stripeProductAllOf.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -550,6 +550,22 @@ var planDeletePlan = async (planUid, options) => {
|
|
|
550
550
|
method: "DELETE"
|
|
551
551
|
});
|
|
552
552
|
};
|
|
553
|
+
var getPlanAddOnGetAllPlanAddOnsUrl = (params) => {
|
|
554
|
+
const normalizedParams = new URLSearchParams;
|
|
555
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
556
|
+
if (value !== undefined) {
|
|
557
|
+
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
const stringifiedParams = normalizedParams.toString();
|
|
561
|
+
return stringifiedParams.length > 0 ? `/api/v1/billing/planaddons?${stringifiedParams}` : `/api/v1/billing/planaddons`;
|
|
562
|
+
};
|
|
563
|
+
var planAddOnGetAllPlanAddOns = async (params, options) => {
|
|
564
|
+
return customFetch(getPlanAddOnGetAllPlanAddOnsUrl(params), {
|
|
565
|
+
...options,
|
|
566
|
+
method: "GET"
|
|
567
|
+
});
|
|
568
|
+
};
|
|
553
569
|
var getPlanFamilyGetAllPlanFamiliesUrl = (params) => {
|
|
554
570
|
const normalizedParams = new URLSearchParams;
|
|
555
571
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1491,6 +1507,11 @@ var AccountWebhookEntityAccountStage = {
|
|
|
1491
1507
|
Paused: 9,
|
|
1492
1508
|
Created: 10
|
|
1493
1509
|
};
|
|
1510
|
+
// src/generated/models/accountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode.ts
|
|
1511
|
+
var AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode = {
|
|
1512
|
+
Individual: 1,
|
|
1513
|
+
Team: 2
|
|
1514
|
+
};
|
|
1494
1515
|
// src/generated/models/accountWebhookEntityCurrentSubscriptionBillingRenewalTerm.ts
|
|
1495
1516
|
var AccountWebhookEntityCurrentSubscriptionBillingRenewalTerm = {
|
|
1496
1517
|
Monthly: 1,
|
|
@@ -2092,6 +2113,7 @@ export {
|
|
|
2092
2113
|
AccountRegistrationMode,
|
|
2093
2114
|
AccountStage,
|
|
2094
2115
|
AccountWebhookEntityAccountStage,
|
|
2116
|
+
AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode,
|
|
2095
2117
|
AccountWebhookEntityCurrentSubscriptionBillingRenewalTerm,
|
|
2096
2118
|
AccountWebhookEntityCurrentSubscriptionDiscountCouponSubscriptionsItemDiscountCouponDuration,
|
|
2097
2119
|
AccountWebhookEntityCurrentSubscriptionLatestInvoiceBillingInvoiceStatus,
|
|
@@ -2317,6 +2339,7 @@ export {
|
|
|
2317
2339
|
getPersonRequestMagicLinkUrl,
|
|
2318
2340
|
getPersonSetTemporaryPasswordUrl,
|
|
2319
2341
|
getPersonUpdatePersonUrl,
|
|
2342
|
+
getPlanAddOnGetAllPlanAddOnsUrl,
|
|
2320
2343
|
getPlanAddPlanUrl,
|
|
2321
2344
|
getPlanDeletePlanUrl,
|
|
2322
2345
|
getPlanFamilyAddPlanFamilyUrl,
|
|
@@ -2370,6 +2393,7 @@ export {
|
|
|
2370
2393
|
personRequestMagicLink,
|
|
2371
2394
|
personSetTemporaryPassword,
|
|
2372
2395
|
personUpdatePerson,
|
|
2396
|
+
planAddOnGetAllPlanAddOns,
|
|
2373
2397
|
planAddPlan,
|
|
2374
2398
|
planDeletePlan,
|
|
2375
2399
|
planFamilyAddPlanFamily,
|
package/package.json
CHANGED
|
@@ -16,6 +16,8 @@ import type {
|
|
|
16
16
|
PaymentInformation,
|
|
17
17
|
PaymentInformationSavePaymentInformationBody,
|
|
18
18
|
Plan,
|
|
19
|
+
PlanAddOnGetAllPlanAddOns200,
|
|
20
|
+
PlanAddOnGetAllPlanAddOnsParams,
|
|
19
21
|
PlanAddPlanBody,
|
|
20
22
|
PlanFamily,
|
|
21
23
|
PlanFamilyAddPlanFamilyBody,
|
|
@@ -2193,6 +2195,60 @@ export const planDeletePlan = async (planUid: string | null, options?: RequestIn
|
|
|
2193
2195
|
);}
|
|
2194
2196
|
|
|
2195
2197
|
|
|
2198
|
+
/**
|
|
2199
|
+
* Standard filtering applies, so the associations of a single plan are retrieved
|
|
2200
|
+
with ?Plan.Uid={planUid} and those of a single add-on with ?AddOn.Uid={addOnUid}.
|
|
2201
|
+
A PlanAddOns collection nested inside a plan or an add-on holds at most 100
|
|
2202
|
+
entries, so a plan with more add-ons than that is read in full through this
|
|
2203
|
+
endpoint, which is paginated and has no such maximum.
|
|
2204
|
+
* @summary Retrieve the associations between plans and add-ons.
|
|
2205
|
+
*/
|
|
2206
|
+
export type planAddOnGetAllPlanAddOnsResponse200 = {
|
|
2207
|
+
data: PlanAddOnGetAllPlanAddOns200
|
|
2208
|
+
status: 200
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
export type planAddOnGetAllPlanAddOnsResponse401 = {
|
|
2212
|
+
data: void
|
|
2213
|
+
status: 401
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
export type planAddOnGetAllPlanAddOnsResponseSuccess = (planAddOnGetAllPlanAddOnsResponse200) & {
|
|
2217
|
+
headers: Headers;
|
|
2218
|
+
};
|
|
2219
|
+
export type planAddOnGetAllPlanAddOnsResponseError = (planAddOnGetAllPlanAddOnsResponse401) & {
|
|
2220
|
+
headers: Headers;
|
|
2221
|
+
};
|
|
2222
|
+
|
|
2223
|
+
export type planAddOnGetAllPlanAddOnsResponse = (planAddOnGetAllPlanAddOnsResponseSuccess | planAddOnGetAllPlanAddOnsResponseError)
|
|
2224
|
+
|
|
2225
|
+
export const getPlanAddOnGetAllPlanAddOnsUrl = (params?: PlanAddOnGetAllPlanAddOnsParams,) => {
|
|
2226
|
+
const normalizedParams = new URLSearchParams();
|
|
2227
|
+
|
|
2228
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2229
|
+
|
|
2230
|
+
if (value !== undefined) {
|
|
2231
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString())
|
|
2232
|
+
}
|
|
2233
|
+
});
|
|
2234
|
+
|
|
2235
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2236
|
+
|
|
2237
|
+
return stringifiedParams.length > 0 ? `/api/v1/billing/planaddons?${stringifiedParams}` : `/api/v1/billing/planaddons`
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
export const planAddOnGetAllPlanAddOns = async (params?: PlanAddOnGetAllPlanAddOnsParams, options?: RequestInit): Promise<planAddOnGetAllPlanAddOnsResponse> => {
|
|
2241
|
+
|
|
2242
|
+
return customFetch<planAddOnGetAllPlanAddOnsResponse>(getPlanAddOnGetAllPlanAddOnsUrl(params),
|
|
2243
|
+
{
|
|
2244
|
+
...options,
|
|
2245
|
+
method: 'GET'
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
}
|
|
2249
|
+
);}
|
|
2250
|
+
|
|
2251
|
+
|
|
2196
2252
|
/**
|
|
2197
2253
|
* @summary Retrieve all plan families.
|
|
2198
2254
|
*/
|
|
@@ -10,11 +10,13 @@ import type { StripeSubscription } from './stripeSubscription';
|
|
|
10
10
|
import type { Subscription } from './subscription';
|
|
11
11
|
import type { Deal } from './deal';
|
|
12
12
|
import type { AccountTaxId } from './accountTaxId';
|
|
13
|
+
import type { StripeProduct } from './stripeProduct';
|
|
13
14
|
import type { AccountAllOfCurrentSubscription } from './accountAllOfCurrentSubscription';
|
|
14
15
|
import type { AccountAllOfLatestSubscription } from './accountAllOfLatestSubscription';
|
|
15
16
|
import type { AccountAllOfPrimaryContact } from './accountAllOfPrimaryContact';
|
|
16
17
|
import type { AccountAllOfPrimarySubscription } from './accountAllOfPrimarySubscription';
|
|
17
18
|
import type { AccountAllOfPrimaryStripeSubscription } from './accountAllOfPrimaryStripeSubscription';
|
|
19
|
+
import type { AccountAllOfStripeCheckoutMetadata } from './accountAllOfStripeCheckoutMetadata';
|
|
18
20
|
|
|
19
21
|
export type AccountAllOf = {
|
|
20
22
|
/**
|
|
@@ -130,6 +132,8 @@ export type AccountAllOf = {
|
|
|
130
132
|
/** @nullable */
|
|
131
133
|
CurrentStripeProducts?: string | null;
|
|
132
134
|
/** @nullable */
|
|
135
|
+
CurrentStripeProductInstances?: StripeProduct[] | null;
|
|
136
|
+
/** @nullable */
|
|
133
137
|
CurrentSubscription?: AccountAllOfCurrentSubscription;
|
|
134
138
|
/** @nullable */
|
|
135
139
|
DomainName?: string | null;
|
|
@@ -150,6 +154,8 @@ export type AccountAllOf = {
|
|
|
150
154
|
/** @nullable */
|
|
151
155
|
RecaptchaToken?: string | null;
|
|
152
156
|
/** @nullable */
|
|
157
|
+
StripeCheckoutMetadata?: AccountAllOfStripeCheckoutMetadata;
|
|
158
|
+
/** @nullable */
|
|
153
159
|
StripeNextInvoiceSequence?: number | null;
|
|
154
160
|
/** @nullable */
|
|
155
161
|
StripePrice?: string[] | null;
|
|
@@ -10,6 +10,7 @@ import type { AccountWebhookEntityStripeSubscriptionsItem } from './accountWebho
|
|
|
10
10
|
import type { AccountWebhookEntitySubscriptionsItem } from './accountWebhookEntitySubscriptionsItem';
|
|
11
11
|
import type { AccountWebhookEntityDealsItem } from './accountWebhookEntityDealsItem';
|
|
12
12
|
import type { AccountWebhookEntityTaxIdsItem } from './accountWebhookEntityTaxIdsItem';
|
|
13
|
+
import type { AccountWebhookEntityCurrentStripeProductInstancesItem } from './accountWebhookEntityCurrentStripeProductInstancesItem';
|
|
13
14
|
import type { AccountWebhookEntityCurrentSubscription } from './accountWebhookEntityCurrentSubscription';
|
|
14
15
|
import type { AccountWebhookEntityLatestSubscription } from './accountWebhookEntityLatestSubscription';
|
|
15
16
|
import type { AccountWebhookEntityPrimaryContact } from './accountWebhookEntityPrimaryContact';
|
|
@@ -148,6 +149,8 @@ export interface AccountWebhookEntity {
|
|
|
148
149
|
/** @nullable */
|
|
149
150
|
CurrentStripeProducts?: string | null;
|
|
150
151
|
/** @nullable */
|
|
152
|
+
CurrentStripeProductInstances?: AccountWebhookEntityCurrentStripeProductInstancesItem[] | null;
|
|
153
|
+
/** @nullable */
|
|
151
154
|
CurrentSubscription?: AccountWebhookEntityCurrentSubscription;
|
|
152
155
|
/** @nullable */
|
|
153
156
|
DomainName?: string | null;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode } from './accountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode';
|
|
3
|
+
|
|
4
|
+
export type AccountWebhookEntityCurrentStripeProductInstancesItem = {
|
|
5
|
+
/**
|
|
6
|
+
* @maxLength 10
|
|
7
|
+
* @nullable
|
|
8
|
+
*/
|
|
9
|
+
Uid?: string | null;
|
|
10
|
+
/** @nullable */
|
|
11
|
+
_objectType?: string | null;
|
|
12
|
+
/** @minLength 1 */
|
|
13
|
+
Created: string;
|
|
14
|
+
/** @minLength 1 */
|
|
15
|
+
Updated: string;
|
|
16
|
+
/**
|
|
17
|
+
* @maxLength 255
|
|
18
|
+
* @nullable
|
|
19
|
+
*/
|
|
20
|
+
StripeId?: string | null;
|
|
21
|
+
IsLivemode?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @maxLength 250
|
|
24
|
+
* @nullable
|
|
25
|
+
*/
|
|
26
|
+
Name?: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* @maxLength 255
|
|
29
|
+
* @nullable
|
|
30
|
+
*/
|
|
31
|
+
DefaultPriceId?: string | null;
|
|
32
|
+
/** @nullable */
|
|
33
|
+
Description?: string | null;
|
|
34
|
+
IsActive?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @maxLength 36
|
|
37
|
+
* @nullable
|
|
38
|
+
*/
|
|
39
|
+
TaxCodeId?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* @maxLength 250
|
|
42
|
+
* @nullable
|
|
43
|
+
*/
|
|
44
|
+
UnitLabel?: string | null;
|
|
45
|
+
/** `1` - Individual, `2` - Team */
|
|
46
|
+
AccountRegistrationMode?: AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode;
|
|
47
|
+
ExpiresAfterMonths?: number;
|
|
48
|
+
/** @nullable */
|
|
49
|
+
ExpirationDate?: string | null;
|
|
50
|
+
IsPerUser?: boolean;
|
|
51
|
+
IsQuantityEditable?: boolean;
|
|
52
|
+
/** @nullable */
|
|
53
|
+
MaximumPeople?: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* @maxLength 8
|
|
56
|
+
* @nullable
|
|
57
|
+
*/
|
|
58
|
+
MigratedAddOnUid?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* @maxLength 8
|
|
61
|
+
* @nullable
|
|
62
|
+
*/
|
|
63
|
+
MigratedPlanUid?: string | null;
|
|
64
|
+
/** @nullable */
|
|
65
|
+
MinimumQuantity?: number | null;
|
|
66
|
+
/**
|
|
67
|
+
* @maxLength 250
|
|
68
|
+
* @nullable
|
|
69
|
+
*/
|
|
70
|
+
PostLoginPath?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* @maxLength 500
|
|
73
|
+
* @nullable
|
|
74
|
+
*/
|
|
75
|
+
PostPurchaseUrl?: string | null;
|
|
76
|
+
RequirePaymentInformation?: boolean;
|
|
77
|
+
TrialPeriodDays?: number;
|
|
78
|
+
/** @nullable */
|
|
79
|
+
TrialUntilDate?: string | null;
|
|
80
|
+
CanDelete?: boolean;
|
|
81
|
+
NumberOfPurchases?: number;
|
|
82
|
+
NumberOfSubscriptions?: number;
|
|
83
|
+
/** @nullable */
|
|
84
|
+
Quantity?: number | null;
|
|
85
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `1` - Individual, `2` - Team
|
|
5
|
+
*/
|
|
6
|
+
export type AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode = typeof AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode[keyof typeof AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode];
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
10
|
+
export const AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode = {
|
|
11
|
+
Individual: 1,
|
|
12
|
+
Team: 2,
|
|
13
|
+
} as const;
|
|
@@ -64,6 +64,7 @@ export * from './accountAllOfPaymentInformation';
|
|
|
64
64
|
export * from './accountAllOfPrimaryContact';
|
|
65
65
|
export * from './accountAllOfPrimaryStripeSubscription';
|
|
66
66
|
export * from './accountAllOfPrimarySubscription';
|
|
67
|
+
export * from './accountAllOfStripeCheckoutMetadata';
|
|
67
68
|
export * from './accountBillingInformationRemovedWebhookPayload';
|
|
68
69
|
export * from './accountBillingInformationRequestedWebhookPayload';
|
|
69
70
|
export * from './accountBillingInformationUpdatedWebhookPayload';
|
|
@@ -133,6 +134,8 @@ export * from './accountUpdatedWebhookPayload';
|
|
|
133
134
|
export * from './accountWebhookEntity';
|
|
134
135
|
export * from './accountWebhookEntityAccountStage';
|
|
135
136
|
export * from './accountWebhookEntityBillingAddress';
|
|
137
|
+
export * from './accountWebhookEntityCurrentStripeProductInstancesItem';
|
|
138
|
+
export * from './accountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode';
|
|
136
139
|
export * from './accountWebhookEntityCurrentSubscription';
|
|
137
140
|
export * from './accountWebhookEntityCurrentSubscriptionBillingRenewalTerm';
|
|
138
141
|
export * from './accountWebhookEntityCurrentSubscriptionDiscountCouponSubscriptionsItem';
|
|
@@ -535,6 +538,8 @@ export * from './planAddOn';
|
|
|
535
538
|
export * from './planAddOnAllOf';
|
|
536
539
|
export * from './planAddOnAllOfAddOn';
|
|
537
540
|
export * from './planAddOnAllOfPlan';
|
|
541
|
+
export * from './planAddOnGetAllPlanAddOns200';
|
|
542
|
+
export * from './planAddOnGetAllPlanAddOnsParams';
|
|
538
543
|
export * from './planAddPlanBody';
|
|
539
544
|
export * from './planAllOf';
|
|
540
545
|
export * from './planAllOfPlanFamily';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { LimitParameter } from './limitParameter';
|
|
3
|
+
import type { OffsetParameter } from './offsetParameter';
|
|
4
|
+
|
|
5
|
+
export type PlanAddOnGetAllPlanAddOnsParams = {
|
|
6
|
+
/**
|
|
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
|
+
*/
|
|
9
|
+
limit?: LimitParameter;
|
|
10
|
+
/**
|
|
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
|
+
*/
|
|
13
|
+
offset?: OffsetParameter;
|
|
14
|
+
};
|
|
@@ -73,6 +73,8 @@ export type StripeProductAllOf = {
|
|
|
73
73
|
NumberOfPurchases?: number;
|
|
74
74
|
NumberOfSubscriptions?: number;
|
|
75
75
|
/** @nullable */
|
|
76
|
+
Quantity?: number | null;
|
|
77
|
+
/** @nullable */
|
|
76
78
|
StripeProductFamily?: StripeProductAllOfStripeProductFamily;
|
|
77
79
|
[key: string]: unknown | null;
|
|
78
80
|
};
|