@outseta/api-client 0.3.53 → 0.4.1
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 +667 -1
- package/package.json +1 -1
- package/src/generated/{billing/billing.ts → billing-v2/billing-v2.ts} +80 -8
- package/src/generated/billing-v3/billing-v3.ts +2541 -0
- package/src/generated/crm/crm.ts +148 -0
- package/src/generated/models/accountExpireCurrentSubscriptionBody.ts +7 -0
- package/src/generated/models/accountExtendRenewalBody.ts +7 -0
- package/src/generated/models/accountWebhookEntityCurrentStripeProductInstancesItem.ts +0 -11
- package/src/generated/models/extendRenewalParams.ts +10 -2
- package/src/generated/models/importResult.ts +9 -0
- package/src/generated/models/index.ts +39 -0
- package/src/generated/models/stripeCouponsCreateBody.ts +7 -0
- package/src/generated/models/stripeCouponsGetAll200.ts +8 -0
- package/src/generated/models/stripeCouponsGetAllParams.ts +14 -0
- package/src/generated/models/stripeCouponsGetRedemptions200.ts +8 -0
- package/src/generated/models/stripeCouponsGetRedemptionsParams.ts +14 -0
- package/src/generated/models/stripeInvoiceLineItemsGetAll200.ts +8 -0
- package/src/generated/models/stripeInvoiceLineItemsGetAllParams.ts +14 -0
- package/src/generated/models/stripeInvoicesChangeInvoiceStatusBody.ts +7 -0
- package/src/generated/models/stripeInvoicesGetAll200.ts +8 -0
- package/src/generated/models/stripeInvoicesGetAllParams.ts +14 -0
- package/src/generated/models/stripeInvoicesIssueInvoiceCreditBody.ts +7 -0
- package/src/generated/models/stripeInvoicesPostBody.ts +7 -0
- package/src/generated/models/stripePaymentMethodsGetAll200.ts +8 -0
- package/src/generated/models/stripePaymentMethodsGetAllParams.ts +14 -0
- package/src/generated/models/stripePricesGetAll200.ts +8 -0
- package/src/generated/models/stripePricesGetAllParams.ts +14 -0
- package/src/generated/models/stripeProductAllOf.ts +0 -11
- package/src/generated/models/stripeProductFamiliesGetAll200.ts +8 -0
- package/src/generated/models/stripeProductFamiliesGetAllParams.ts +14 -0
- package/src/generated/models/stripeProductFamiliesPostBody.ts +7 -0
- package/src/generated/models/stripeProductFamiliesPutBody.ts +7 -0
- package/src/generated/models/stripeProductsGetAll200.ts +8 -0
- package/src/generated/models/stripeProductsGetAllParams.ts +14 -0
- package/src/generated/models/stripeProductsPostBody.ts +7 -0
- package/src/generated/models/stripeProductsPutBody.ts +7 -0
- package/src/generated/models/stripePromotionCodesCreateBody.ts +7 -0
- package/src/generated/models/stripePromotionCodesGetAll200.ts +8 -0
- package/src/generated/models/stripePromotionCodesGetAllParams.ts +14 -0
- package/src/generated/models/stripePromotionCodesUpdateBody.ts +7 -0
- package/src/generated/models/stripeSubscriptionsChangeBody.ts +7 -0
- package/src/generated/models/stripeSubscriptionsCreateBody.ts +7 -0
- package/src/generated/models/stripeSubscriptionsExtendTrialBody.ts +7 -0
- package/src/generated/models/stripeSubscriptionsGetAll200.ts +8 -0
- package/src/generated/models/stripeSubscriptionsGetAllParams.ts +14 -0
- package/src/generated/models/stripeSubscriptionsPauseCollectionBody.ts +7 -0
- package/src/generated/models/stripeSubscriptionsPreviewChangeBody.ts +7 -0
- package/src/generated/models/teamTwoFactorSettings.ts +6 -0
- package/src/generated/public/public.ts +26 -0
- package/src/index.ts +4 -1
package/package.json
CHANGED
|
@@ -195,7 +195,11 @@ export const discountCouponGetAllDiscountCoupons = async (params?: DiscountCoupo
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
198
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3), use coupons and promotion
|
|
199
|
+
codes: POST /billing/stripe/coupons and POST /billing/stripe/promotion-codes. With Stripe
|
|
200
|
+
Billing the request is rejected.
|
|
201
|
+
|
|
202
|
+
Only one of AmountOff or PercentOff should be set.
|
|
199
203
|
Duration values: 1 = Forever, 2 = Once, 3 = Repeating (DurationInMonths must be set).
|
|
200
204
|
* @summary Add a new discount coupon.
|
|
201
205
|
*/
|
|
@@ -292,6 +296,9 @@ export const discountCouponGetDiscountCoupon = async (discountCouponUid: string
|
|
|
292
296
|
|
|
293
297
|
|
|
294
298
|
/**
|
|
299
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3), coupons are managed with
|
|
300
|
+
the /billing/stripe/coupons and /billing/stripe/promotion-codes endpoints. With Stripe
|
|
301
|
+
Billing the request is rejected.
|
|
295
302
|
* @summary Update a discount coupon.
|
|
296
303
|
*/
|
|
297
304
|
export type discountCouponUpdateDiscountCouponResponse200 = {
|
|
@@ -454,6 +461,7 @@ export const discountCouponGetDiscountCouponRedemptions = async (discountCouponU
|
|
|
454
461
|
|
|
455
462
|
|
|
456
463
|
/**
|
|
464
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
457
465
|
* @summary Add a usage entry for an add-on that bills for usage at the end of the month.
|
|
458
466
|
*/
|
|
459
467
|
export type usageAddUsageResponse200 = {
|
|
@@ -692,6 +700,8 @@ export const subscriptionAddOnGetAllSubscriptionsAddOns = async (params?: Subscr
|
|
|
692
700
|
|
|
693
701
|
|
|
694
702
|
/**
|
|
703
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected;
|
|
704
|
+
use PUT /billing/stripe/subscriptions/{subscriptionUid}/change instead.
|
|
695
705
|
* @summary Add an add-on to a subscription.
|
|
696
706
|
*/
|
|
697
707
|
export type subscriptionAddOnAddSubscriptionAddOnResponse200 = {
|
|
@@ -832,7 +842,9 @@ export const subscriptionAddOnAddSubscriptionAddOnPreview = async (subscriptionA
|
|
|
832
842
|
|
|
833
843
|
|
|
834
844
|
/**
|
|
835
|
-
*
|
|
845
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
846
|
+
|
|
847
|
+
When a subscription add-on is flagged, the next time the user authenticates the
|
|
836
848
|
authentication widget will prompt the user to change their add-on.
|
|
837
849
|
* @summary Indicate that an upgrade of an add-on is required.
|
|
838
850
|
*/
|
|
@@ -888,7 +900,10 @@ export const subscriptionAddOnSetAddOnUpgradeRequired = async (subscriptionAddOn
|
|
|
888
900
|
|
|
889
901
|
|
|
890
902
|
/**
|
|
891
|
-
*
|
|
903
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected;
|
|
904
|
+
use PUT /billing/stripe/subscriptions/{subscriptionUid}/change instead.
|
|
905
|
+
|
|
906
|
+
Removes the add-on from the subscription going forward and returns the updated
|
|
892
907
|
subscription.
|
|
893
908
|
* @summary End an add-on on a subscription.
|
|
894
909
|
*/
|
|
@@ -942,6 +957,7 @@ export const subscriptionAddOnEndSubscriptionAddOn = async (subscriptionAddOnUid
|
|
|
942
957
|
|
|
943
958
|
|
|
944
959
|
/**
|
|
960
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
945
961
|
* @summary Immediately ends an add-on.
|
|
946
962
|
*/
|
|
947
963
|
export type subscriptionAddOnExpireSubscriptionAddOnResponse200 = {
|
|
@@ -1046,6 +1062,8 @@ export const invoiceGetAllInvoices = async (params?: InvoiceGetAllInvoicesParams
|
|
|
1046
1062
|
|
|
1047
1063
|
|
|
1048
1064
|
/**
|
|
1065
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected;
|
|
1066
|
+
use POST /billing/stripe/invoices instead.
|
|
1049
1067
|
* @summary Create an ad-hoc invoice for a given account.
|
|
1050
1068
|
*/
|
|
1051
1069
|
export type invoiceAddInvoiceResponse200 = {
|
|
@@ -1141,7 +1159,9 @@ export const invoiceGetInvoice = async (invoiceUid: string | null, options?: Req
|
|
|
1141
1159
|
|
|
1142
1160
|
|
|
1143
1161
|
/**
|
|
1144
|
-
*
|
|
1162
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
1163
|
+
|
|
1164
|
+
Only invoices created manually via the API or admin UI can be updated; invoices
|
|
1145
1165
|
generated by a subscription's billing cycle are immutable and will return a
|
|
1146
1166
|
validation error.
|
|
1147
1167
|
* @summary Update an ad-hoc (manually created) invoice.
|
|
@@ -1572,6 +1592,7 @@ export const subscriptionDeleteSubscription = async (subscriptionUid: string | n
|
|
|
1572
1592
|
|
|
1573
1593
|
|
|
1574
1594
|
/**
|
|
1595
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
1575
1596
|
* @summary Add a discount to a subscription.
|
|
1576
1597
|
*/
|
|
1577
1598
|
export type subscriptionAddDiscountToSubscriptionResponse200 = {
|
|
@@ -1681,7 +1702,9 @@ export const subscriptionExpireDiscountCouponSubscription = async (subscriptionU
|
|
|
1681
1702
|
|
|
1682
1703
|
|
|
1683
1704
|
/**
|
|
1684
|
-
*
|
|
1705
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
1706
|
+
|
|
1707
|
+
When a subscription is flagged, next time the user authenticates the authentication
|
|
1685
1708
|
widget will prompt the user to change plan.
|
|
1686
1709
|
* @summary Indicate that an upgrade of plan is required.
|
|
1687
1710
|
*/
|
|
@@ -1785,11 +1808,29 @@ export const subscriptionFirstTimeSubscriptionPreview = async (subscriptionFirst
|
|
|
1785
1808
|
|
|
1786
1809
|
|
|
1787
1810
|
/**
|
|
1788
|
-
*
|
|
1811
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected;
|
|
1812
|
+
use POST /billing/stripe/subscriptions instead.
|
|
1813
|
+
|
|
1814
|
+
Returns the new subscription.
|
|
1815
|
+
|
|
1816
|
+
Outseta sets the subscription's dates itself, except ExpirationDate:
|
|
1817
|
+
|
|
1818
|
+
- RenewalDate is calculated from the plan's trial and the BillingRenewalTerm. A value you send is ignored.
|
|
1819
|
+
- EndDate is set by Outseta when the subscription ends. Don't send it: a subscription with an EndDate is
|
|
1820
|
+
rejected with "The renewal date has to be null if the end date is set."
|
|
1821
|
+
- ExpirationDate gives the subscription a fixed end. Outseta keeps the date you send, doesn't bill past it,
|
|
1822
|
+
and ends the subscription on that date, setting EndDate to it. A free plan with BillingRenewalTerm 1
|
|
1823
|
+
(monthly) renews monthly at no charge until then.
|
|
1824
|
+
- Without an ExpirationDate, the plan decides: its ExpirationDate if it has one, otherwise
|
|
1825
|
+
Plan.ExpiresAfterMonths. 0 means the plan never expires subscriptions; a value N above 0 gives an
|
|
1826
|
+
ExpirationDate of the start date plus the plan's trial days plus N months.
|
|
1827
|
+
|
|
1828
|
+
To set or remove the end date of a subscription that already exists, use
|
|
1829
|
+
PUT /api/v1/crm/accounts/{accountUid}/extend-renewal.
|
|
1789
1830
|
* @summary Add a subscription to an account for the first time.
|
|
1790
1831
|
*/
|
|
1791
1832
|
export type subscriptionFirstTimeSubscriptionResponse200 = {
|
|
1792
|
-
data:
|
|
1833
|
+
data: Subscription
|
|
1793
1834
|
status: 200
|
|
1794
1835
|
}
|
|
1795
1836
|
|
|
@@ -1894,7 +1935,26 @@ export const subscriptionChangeSubscriptionPreview = async (subscriptionUid: str
|
|
|
1894
1935
|
|
|
1895
1936
|
|
|
1896
1937
|
/**
|
|
1897
|
-
*
|
|
1938
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected;
|
|
1939
|
+
use PUT /billing/stripe/subscriptions/{subscriptionUid}/change instead.
|
|
1940
|
+
|
|
1941
|
+
Returns the new subscription; its StartDate is when the change takes effect. When only add-ons
|
|
1942
|
+
change, returns the existing subscription.
|
|
1943
|
+
|
|
1944
|
+
A change of plan, BillingRenewalTerm or quantity ends the current subscription and creates a new
|
|
1945
|
+
subscription record. An upgrade starts immediately. Any other change, for example from one free plan
|
|
1946
|
+
to another at the same price, is scheduled for the current renewal date, unless the account is in a
|
|
1947
|
+
trial or you pass startImmediately=true.
|
|
1948
|
+
|
|
1949
|
+
The dates work as on PUT /api/v1/billing/subscriptions/firsttimesubscription: RenewalDate is
|
|
1950
|
+
calculated by Outseta, EndDate is set by Outseta when the subscription ends and can't be sent, and
|
|
1951
|
+
ExpirationDate gives the new subscription a fixed end. Without an ExpirationDate, the new subscription
|
|
1952
|
+
keeps the current one's expiration date when the plan stays the same; otherwise the plan's
|
|
1953
|
+
ExpirationDate or ExpiresAfterMonths applies.
|
|
1954
|
+
|
|
1955
|
+
A request with the same plan, BillingRenewalTerm and quantity only changes add-ons; it does not change
|
|
1956
|
+
the subscription's dates. To set or remove the end date of the current subscription, use
|
|
1957
|
+
PUT /api/v1/crm/accounts/{accountUid}/extend-renewal.
|
|
1898
1958
|
* @summary Change a subscription on an account.
|
|
1899
1959
|
*/
|
|
1900
1960
|
export type subscriptionChangeSubscriptionResponse200 = {
|
|
@@ -2000,6 +2060,9 @@ export const planGetAllPlans = async (params?: PlanGetAllPlansParams, options?:
|
|
|
2000
2060
|
|
|
2001
2061
|
|
|
2002
2062
|
/**
|
|
2063
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3), plans are Stripe products
|
|
2064
|
+
and prices: use POST /billing/stripe/products and PUT /billing/stripe/products/{uid}. With
|
|
2065
|
+
Stripe Billing the request is rejected.
|
|
2003
2066
|
* @summary Add a new plan.
|
|
2004
2067
|
*/
|
|
2005
2068
|
export type planAddPlanResponse200 = {
|
|
@@ -2090,6 +2153,9 @@ export const planGetPlan = async (planUid: string | null, options?: RequestInit)
|
|
|
2090
2153
|
|
|
2091
2154
|
|
|
2092
2155
|
/**
|
|
2156
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3), plans are Stripe products
|
|
2157
|
+
and prices: use POST /billing/stripe/products and PUT /billing/stripe/products/{uid}. With
|
|
2158
|
+
Stripe Billing the request is rejected.
|
|
2093
2159
|
* @summary Update a plan.
|
|
2094
2160
|
*/
|
|
2095
2161
|
export type planUpdatePlanResponse200 = {
|
|
@@ -2292,6 +2358,9 @@ export const planFamilyGetAllPlanFamilies = async (params?: PlanFamilyGetAllPlan
|
|
|
2292
2358
|
|
|
2293
2359
|
|
|
2294
2360
|
/**
|
|
2361
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3), use product families:
|
|
2362
|
+
POST /billing/stripe/product-families and PUT /billing/stripe/product-families/{productFamilyUid}.
|
|
2363
|
+
With Stripe Billing the request is rejected.
|
|
2295
2364
|
* @summary Add a new plan family.
|
|
2296
2365
|
*/
|
|
2297
2366
|
export type planFamilyAddPlanFamilyResponse200 = {
|
|
@@ -2387,6 +2456,9 @@ export const planFamilyGetPlanFamily = async (planFamilyUid: string | null, opti
|
|
|
2387
2456
|
|
|
2388
2457
|
|
|
2389
2458
|
/**
|
|
2459
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3), use product families:
|
|
2460
|
+
POST /billing/stripe/product-families and PUT /billing/stripe/product-families/{productFamilyUid}.
|
|
2461
|
+
With Stripe Billing the request is rejected.
|
|
2390
2462
|
* @summary Update a plan family.
|
|
2391
2463
|
*/
|
|
2392
2464
|
export type planFamilyUpdatePlanFamilyResponse200 = {
|