@outseta/react 0.4.35 → 0.4.37
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
CHANGED
|
@@ -1660,6 +1660,32 @@ var usePlanDeletePlan = (options) => {
|
|
|
1660
1660
|
const mutationOptions = getPlanDeletePlanMutationOptions(options);
|
|
1661
1661
|
return useMutation(mutationOptions);
|
|
1662
1662
|
};
|
|
1663
|
+
var planAddOnGetAllPlanAddOns = (params, options, signal) => {
|
|
1664
|
+
return customFetch2({
|
|
1665
|
+
url: `/api/v1/billing/planaddons`,
|
|
1666
|
+
method: "GET",
|
|
1667
|
+
params,
|
|
1668
|
+
signal
|
|
1669
|
+
}, options);
|
|
1670
|
+
};
|
|
1671
|
+
var getPlanAddOnGetAllPlanAddOnsQueryKey = (params) => {
|
|
1672
|
+
return [
|
|
1673
|
+
`/api/v1/billing/planaddons`,
|
|
1674
|
+
...params ? [params] : []
|
|
1675
|
+
];
|
|
1676
|
+
};
|
|
1677
|
+
var getPlanAddOnGetAllPlanAddOnsQueryOptions = (params, options) => {
|
|
1678
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1679
|
+
const queryKey = queryOptions?.queryKey ?? getPlanAddOnGetAllPlanAddOnsQueryKey(params);
|
|
1680
|
+
const queryFn = ({ signal }) => planAddOnGetAllPlanAddOns(params, requestOptions, signal);
|
|
1681
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
1682
|
+
};
|
|
1683
|
+
function usePlanAddOnGetAllPlanAddOns(params, options) {
|
|
1684
|
+
const queryOptions = getPlanAddOnGetAllPlanAddOnsQueryOptions(params, options);
|
|
1685
|
+
const query = useQuery(queryOptions);
|
|
1686
|
+
query.queryKey = queryOptions.queryKey;
|
|
1687
|
+
return query;
|
|
1688
|
+
}
|
|
1663
1689
|
var planFamilyGetAllPlanFamilies = (params, options, signal) => {
|
|
1664
1690
|
return customFetch2({
|
|
1665
1691
|
url: `/api/v1/billing/planfamilies`,
|
|
@@ -4306,6 +4332,8 @@ export {
|
|
|
4306
4332
|
getPersonRequestMagicLinkMutationOptions,
|
|
4307
4333
|
getPersonSetTemporaryPasswordMutationOptions,
|
|
4308
4334
|
getPersonUpdatePersonMutationOptions,
|
|
4335
|
+
getPlanAddOnGetAllPlanAddOnsQueryKey,
|
|
4336
|
+
getPlanAddOnGetAllPlanAddOnsQueryOptions,
|
|
4309
4337
|
getPlanAddPlanMutationOptions,
|
|
4310
4338
|
getPlanDeletePlanMutationOptions,
|
|
4311
4339
|
getPlanFamilyAddPlanFamilyMutationOptions,
|
|
@@ -4369,6 +4397,7 @@ export {
|
|
|
4369
4397
|
personRequestMagicLink,
|
|
4370
4398
|
personSetTemporaryPassword,
|
|
4371
4399
|
personUpdatePerson,
|
|
4400
|
+
planAddOnGetAllPlanAddOns,
|
|
4372
4401
|
planAddPlan,
|
|
4373
4402
|
planDeletePlan,
|
|
4374
4403
|
planFamilyAddPlanFamily,
|
|
@@ -4493,6 +4522,7 @@ export {
|
|
|
4493
4522
|
usePersonRequestMagicLink,
|
|
4494
4523
|
usePersonSetTemporaryPassword,
|
|
4495
4524
|
usePersonUpdatePerson,
|
|
4525
|
+
usePlanAddOnGetAllPlanAddOns,
|
|
4496
4526
|
usePlanAddPlan,
|
|
4497
4527
|
usePlanDeletePlan,
|
|
4498
4528
|
usePlanFamilyAddPlanFamily,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outseta/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.37",
|
|
4
4
|
"description": "React hooks and components for the Outseta API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@outseta/api-client": "0.3.
|
|
21
|
+
"@outseta/api-client": "0.3.43"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "^18.0.0 || ^19.0.0"
|
|
@@ -30,6 +30,8 @@ import type {
|
|
|
30
30
|
PaymentInformation,
|
|
31
31
|
PaymentInformationSavePaymentInformationBody,
|
|
32
32
|
Plan,
|
|
33
|
+
PlanAddOnGetAllPlanAddOns200,
|
|
34
|
+
PlanAddOnGetAllPlanAddOnsParams,
|
|
33
35
|
PlanAddPlanBody,
|
|
34
36
|
PlanFamily,
|
|
35
37
|
PlanFamilyAddPlanFamilyBody,
|
|
@@ -2835,6 +2837,80 @@ export const usePlanDeletePlan = <TError = void,
|
|
|
2835
2837
|
return useMutation(mutationOptions);
|
|
2836
2838
|
}
|
|
2837
2839
|
/**
|
|
2840
|
+
* Standard filtering applies, so the associations of a single plan are retrieved
|
|
2841
|
+
with ?Plan.Uid={planUid} and those of a single add-on with ?AddOn.Uid={addOnUid}.
|
|
2842
|
+
A PlanAddOns collection nested inside a plan or an add-on holds at most 100
|
|
2843
|
+
entries, so a plan with more add-ons than that is read in full through this
|
|
2844
|
+
endpoint, which is paginated and has no such maximum.
|
|
2845
|
+
* @summary Retrieve the associations between plans and add-ons.
|
|
2846
|
+
*/
|
|
2847
|
+
export const planAddOnGetAllPlanAddOns = (
|
|
2848
|
+
params?: PlanAddOnGetAllPlanAddOnsParams,
|
|
2849
|
+
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
|
2850
|
+
) => {
|
|
2851
|
+
|
|
2852
|
+
|
|
2853
|
+
return customFetch<PlanAddOnGetAllPlanAddOns200>(
|
|
2854
|
+
{url: `/api/v1/billing/planaddons`, method: 'GET',
|
|
2855
|
+
params, signal
|
|
2856
|
+
},
|
|
2857
|
+
options);
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
export const getPlanAddOnGetAllPlanAddOnsQueryKey = (params?: PlanAddOnGetAllPlanAddOnsParams,) => {
|
|
2864
|
+
return [
|
|
2865
|
+
`/api/v1/billing/planaddons`, ...(params ? [params]: [])
|
|
2866
|
+
] as const;
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
export const getPlanAddOnGetAllPlanAddOnsQueryOptions = <TData = Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>, TError = void>(params?: PlanAddOnGetAllPlanAddOnsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>, TError, TData>, request?: SecondParameter<typeof customFetch>}
|
|
2871
|
+
) => {
|
|
2872
|
+
|
|
2873
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
2874
|
+
|
|
2875
|
+
const queryKey = queryOptions?.queryKey ?? getPlanAddOnGetAllPlanAddOnsQueryKey(params);
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>> = ({ signal }) => planAddOnGetAllPlanAddOns(params, requestOptions, signal);
|
|
2880
|
+
|
|
2881
|
+
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
|
|
2885
|
+
return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>, TError, TData> & { queryKey: QueryKey }
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
export type PlanAddOnGetAllPlanAddOnsQueryResult = NonNullable<Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>>
|
|
2889
|
+
export type PlanAddOnGetAllPlanAddOnsQueryError = void
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
/**
|
|
2893
|
+
* @summary Retrieve the associations between plans and add-ons.
|
|
2894
|
+
*/
|
|
2895
|
+
|
|
2896
|
+
export function usePlanAddOnGetAllPlanAddOns<TData = Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>, TError = void>(
|
|
2897
|
+
params?: PlanAddOnGetAllPlanAddOnsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof planAddOnGetAllPlanAddOns>>, TError, TData>, request?: SecondParameter<typeof customFetch>}
|
|
2898
|
+
|
|
2899
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
2900
|
+
|
|
2901
|
+
const queryOptions = getPlanAddOnGetAllPlanAddOnsQueryOptions(params,options)
|
|
2902
|
+
|
|
2903
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
2904
|
+
|
|
2905
|
+
query.queryKey = queryOptions.queryKey ;
|
|
2906
|
+
|
|
2907
|
+
return query;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
/**
|
|
2838
2914
|
* @summary Retrieve all plan families.
|
|
2839
2915
|
*/
|
|
2840
2916
|
export const planFamilyGetAllPlanFamilies = (
|
|
@@ -481,6 +481,11 @@ export type AccountAllOfPrimarySubscription = Subscription | null;
|
|
|
481
481
|
*/
|
|
482
482
|
export type AccountAllOfPrimaryStripeSubscription = StripeSubscription | null;
|
|
483
483
|
|
|
484
|
+
/**
|
|
485
|
+
* @nullable
|
|
486
|
+
*/
|
|
487
|
+
export type AccountAllOfStripeCheckoutMetadata = {[key: string]: string} | null;
|
|
488
|
+
|
|
484
489
|
export type AccountAllOf = {
|
|
485
490
|
/**
|
|
486
491
|
* @minLength 1
|
|
@@ -617,6 +622,8 @@ export type AccountAllOf = {
|
|
|
617
622
|
/** @nullable */
|
|
618
623
|
RecaptchaToken?: string | null;
|
|
619
624
|
/** @nullable */
|
|
625
|
+
StripeCheckoutMetadata?: AccountAllOfStripeCheckoutMetadata;
|
|
626
|
+
/** @nullable */
|
|
620
627
|
StripeNextInvoiceSequence?: number | null;
|
|
621
628
|
/** @nullable */
|
|
622
629
|
StripePrice?: string[] | null;
|
|
@@ -788,6 +795,7 @@ export type StripeInvoiceAllOf = {
|
|
|
788
795
|
TotalExcludingTax?: number | null;
|
|
789
796
|
/** @nullable */
|
|
790
797
|
Account?: StripeInvoiceAllOfAccount;
|
|
798
|
+
IsImported?: boolean;
|
|
791
799
|
IsRefunded?: boolean;
|
|
792
800
|
CurrencyAmountCreditedPostPayment?: number;
|
|
793
801
|
CurrencyAmountCreditedPrePayment?: number;
|
|
@@ -5493,6 +5501,7 @@ export type AccountWebhookEntityStripeInvoicesItem = {
|
|
|
5493
5501
|
Total?: number;
|
|
5494
5502
|
/** @nullable */
|
|
5495
5503
|
TotalExcludingTax?: number | null;
|
|
5504
|
+
IsImported?: boolean;
|
|
5496
5505
|
IsRefunded?: boolean;
|
|
5497
5506
|
CurrencyAmountCreditedPostPayment?: number;
|
|
5498
5507
|
CurrencyAmountCreditedPrePayment?: number;
|
|
@@ -10174,6 +10183,22 @@ export type PlanAddPlanBody = Plan | null;
|
|
|
10174
10183
|
*/
|
|
10175
10184
|
export type PlanUpdatePlanBody = Plan | null;
|
|
10176
10185
|
|
|
10186
|
+
export type PlanAddOnGetAllPlanAddOnsParams = {
|
|
10187
|
+
/**
|
|
10188
|
+
* 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.
|
|
10189
|
+
*/
|
|
10190
|
+
limit?: LimitParameter;
|
|
10191
|
+
/**
|
|
10192
|
+
* 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).
|
|
10193
|
+
*/
|
|
10194
|
+
offset?: OffsetParameter;
|
|
10195
|
+
};
|
|
10196
|
+
|
|
10197
|
+
export type PlanAddOnGetAllPlanAddOns200 = {
|
|
10198
|
+
metadata?: CollectionMetadata;
|
|
10199
|
+
items?: PlanAddOn[];
|
|
10200
|
+
};
|
|
10201
|
+
|
|
10177
10202
|
export type PlanFamilyGetAllPlanFamiliesParams = {
|
|
10178
10203
|
/**
|
|
10179
10204
|
* 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.
|