@outseta/react 0.4.41 → 0.4.43
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
|
@@ -3258,6 +3258,26 @@ var useCaseUpdateCase = (options) => {
|
|
|
3258
3258
|
const mutationOptions = getCaseUpdateCaseMutationOptions(options);
|
|
3259
3259
|
return useMutation(mutationOptions);
|
|
3260
3260
|
};
|
|
3261
|
+
var caseDeleteCase = (caseUid, options) => {
|
|
3262
|
+
return customFetch2({
|
|
3263
|
+
url: `/api/v1/support/cases/${caseUid}`,
|
|
3264
|
+
method: "DELETE",
|
|
3265
|
+
responseType: "blob"
|
|
3266
|
+
}, options);
|
|
3267
|
+
};
|
|
3268
|
+
var getCaseDeleteCaseMutationOptions = (options) => {
|
|
3269
|
+
const mutationKey = ["caseDeleteCase"];
|
|
3270
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
|
|
3271
|
+
const mutationFn = (props) => {
|
|
3272
|
+
const { caseUid } = props ?? {};
|
|
3273
|
+
return caseDeleteCase(caseUid, requestOptions);
|
|
3274
|
+
};
|
|
3275
|
+
return { mutationFn, ...mutationOptions };
|
|
3276
|
+
};
|
|
3277
|
+
var useCaseDeleteCase = (options) => {
|
|
3278
|
+
const mutationOptions = getCaseDeleteCaseMutationOptions(options);
|
|
3279
|
+
return useMutation(mutationOptions);
|
|
3280
|
+
};
|
|
3261
3281
|
var caseAddReply = (caseUid, options, signal) => {
|
|
3262
3282
|
return customFetch2({
|
|
3263
3283
|
url: `/api/v1/support/cases/${caseUid}/replies`,
|
|
@@ -3825,7 +3845,8 @@ var BackGroundTaskType = {
|
|
|
3825
3845
|
UpdateDiscordMemberRolesTask: 19,
|
|
3826
3846
|
SendInvoicePaidEmailTask: 20,
|
|
3827
3847
|
ResendTrialLimitEmailTask: 21,
|
|
3828
|
-
UpdateStripeSubscriptionApplicationFeePercentTask: 22
|
|
3848
|
+
UpdateStripeSubscriptionApplicationFeePercentTask: 22,
|
|
3849
|
+
DeleteSupportCaseContentTask: 23
|
|
3829
3850
|
};
|
|
3830
3851
|
var RegistrationField = {
|
|
3831
3852
|
PersonFirstName: 1,
|
|
@@ -4197,6 +4218,7 @@ export {
|
|
|
4197
4218
|
caseAddCase,
|
|
4198
4219
|
caseAddClientResponse,
|
|
4199
4220
|
caseAddReply,
|
|
4221
|
+
caseDeleteCase,
|
|
4200
4222
|
caseGetAllCases,
|
|
4201
4223
|
caseGetCase,
|
|
4202
4224
|
caseUpdateCase,
|
|
@@ -4277,6 +4299,7 @@ export {
|
|
|
4277
4299
|
getCaseAddCaseMutationOptions,
|
|
4278
4300
|
getCaseAddClientResponseMutationOptions,
|
|
4279
4301
|
getCaseAddReplyMutationOptions,
|
|
4302
|
+
getCaseDeleteCaseMutationOptions,
|
|
4280
4303
|
getCaseGetAllCasesQueryKey,
|
|
4281
4304
|
getCaseGetAllCasesQueryOptions,
|
|
4282
4305
|
getCaseGetCaseQueryKey,
|
|
@@ -4486,6 +4509,7 @@ export {
|
|
|
4486
4509
|
useCaseAddCase,
|
|
4487
4510
|
useCaseAddClientResponse,
|
|
4488
4511
|
useCaseAddReply,
|
|
4512
|
+
useCaseDeleteCase,
|
|
4489
4513
|
useCaseGetAllCases,
|
|
4490
4514
|
useCaseGetCase,
|
|
4491
4515
|
useCaseUpdateCase,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outseta/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.43",
|
|
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.49"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": "^18.0.0 || ^19.0.0"
|
|
@@ -2300,6 +2300,8 @@ export type DiscountCouponAllOf = {
|
|
|
2300
2300
|
DiscountCouponPlans?: DiscountCouponPlan[] | null;
|
|
2301
2301
|
ApplyToAddOns?: boolean;
|
|
2302
2302
|
/** @nullable */
|
|
2303
|
+
IsInUse?: boolean | null;
|
|
2304
|
+
/** @nullable */
|
|
2303
2305
|
PlanUids?: string | null;
|
|
2304
2306
|
};
|
|
2305
2307
|
|
|
@@ -4444,7 +4446,7 @@ export interface FlatfileImportData {
|
|
|
4444
4446
|
}
|
|
4445
4447
|
|
|
4446
4448
|
/**
|
|
4447
|
-
* `1` - UpdateSegmentBackGroundTask, `2` - ImportPeopleTask, `3` - ImportAccountTask, `4` - ImportDealTask, `5` - ImportEmailList, `6` - RescheduleDripCampaignTask, `7` - DeleteSegmentPeopleTask, `8` - StartDripCampaignTask, `9` - WebflowSyncTask, `10` - UpdatePersonSegmentsTask, `11` - ImportDiscountCouponTask, `12` - RemoveDiscordUserFromAllServersTask, `13` - SendInvoiceEmailTask, `14` - UpdateDiscordUserRolesTask, `15` - StripeBillingSyncTask, `16` - UpdateStripeDefaultSourceTask, `17` - DeleteScheduledCampaignMessagesTask, `18` - SendSpamCheckEmailTask, `19` - UpdateDiscordMemberRolesTask, `20` - SendInvoicePaidEmailTask, `21` - ResendTrialLimitEmailTask, `22` - UpdateStripeSubscriptionApplicationFeePercentTask
|
|
4449
|
+
* `1` - UpdateSegmentBackGroundTask, `2` - ImportPeopleTask, `3` - ImportAccountTask, `4` - ImportDealTask, `5` - ImportEmailList, `6` - RescheduleDripCampaignTask, `7` - DeleteSegmentPeopleTask, `8` - StartDripCampaignTask, `9` - WebflowSyncTask, `10` - UpdatePersonSegmentsTask, `11` - ImportDiscountCouponTask, `12` - RemoveDiscordUserFromAllServersTask, `13` - SendInvoiceEmailTask, `14` - UpdateDiscordUserRolesTask, `15` - StripeBillingSyncTask, `16` - UpdateStripeDefaultSourceTask, `17` - DeleteScheduledCampaignMessagesTask, `18` - SendSpamCheckEmailTask, `19` - UpdateDiscordMemberRolesTask, `20` - SendInvoicePaidEmailTask, `21` - ResendTrialLimitEmailTask, `22` - UpdateStripeSubscriptionApplicationFeePercentTask, `23` - DeleteSupportCaseContentTask
|
|
4448
4450
|
*/
|
|
4449
4451
|
export type BackGroundTaskType = typeof BackGroundTaskType[keyof typeof BackGroundTaskType];
|
|
4450
4452
|
|
|
@@ -4473,6 +4475,7 @@ export const BackGroundTaskType = {
|
|
|
4473
4475
|
SendInvoicePaidEmailTask: 20,
|
|
4474
4476
|
ResendTrialLimitEmailTask: 21,
|
|
4475
4477
|
UpdateStripeSubscriptionApplicationFeePercentTask: 22,
|
|
4478
|
+
DeleteSupportCaseContentTask: 23,
|
|
4476
4479
|
} as const;
|
|
4477
4480
|
|
|
4478
4481
|
export type DirectoryAllOf = {
|
|
@@ -5125,6 +5128,32 @@ export interface SetupIntent {
|
|
|
5125
5128
|
ToltReferralId?: string | null;
|
|
5126
5129
|
}
|
|
5127
5130
|
|
|
5131
|
+
/**
|
|
5132
|
+
* Request body for POST /api/v1/billing/subscriptions/changesubscription/complete:
|
|
5133
|
+
the client secret of the Stripe intent the user confirmed.
|
|
5134
|
+
*/
|
|
5135
|
+
export interface ChangeSubscriptionCompleteRequest {
|
|
5136
|
+
/** @nullable */
|
|
5137
|
+
ClientSecret?: string | null;
|
|
5138
|
+
}
|
|
5139
|
+
|
|
5140
|
+
/**
|
|
5141
|
+
* @nullable
|
|
5142
|
+
*/
|
|
5143
|
+
export type ChangeSubscriptionStateRequestSubscription = Subscription | null;
|
|
5144
|
+
|
|
5145
|
+
/**
|
|
5146
|
+
* Request body for POST /api/v1/billing/subscriptions/{subscriptionUid}/changesubscription/state:
|
|
5147
|
+
the new subscription and the client secret of the Stripe intent the user is about
|
|
5148
|
+
to confirm.
|
|
5149
|
+
*/
|
|
5150
|
+
export interface ChangeSubscriptionStateRequest {
|
|
5151
|
+
/** @nullable */
|
|
5152
|
+
ClientSecret?: string | null;
|
|
5153
|
+
/** @nullable */
|
|
5154
|
+
Subscription?: ChangeSubscriptionStateRequestSubscription;
|
|
5155
|
+
}
|
|
5156
|
+
|
|
5128
5157
|
/**
|
|
5129
5158
|
* @nullable
|
|
5130
5159
|
*/
|
|
@@ -6064,6 +6093,8 @@ export type AccountWebhookEntitySubscriptionsItemDiscountCouponSubscriptionsItem
|
|
|
6064
6093
|
MaxRedemptions?: number | null;
|
|
6065
6094
|
ApplyToAddOns?: boolean;
|
|
6066
6095
|
/** @nullable */
|
|
6096
|
+
IsInUse?: boolean | null;
|
|
6097
|
+
/** @nullable */
|
|
6067
6098
|
PlanUids?: string | null;
|
|
6068
6099
|
} | null;
|
|
6069
6100
|
|
|
@@ -6672,6 +6703,8 @@ export type AccountWebhookEntityCurrentSubscriptionDiscountCouponSubscriptionsIt
|
|
|
6672
6703
|
MaxRedemptions?: number | null;
|
|
6673
6704
|
ApplyToAddOns?: boolean;
|
|
6674
6705
|
/** @nullable */
|
|
6706
|
+
IsInUse?: boolean | null;
|
|
6707
|
+
/** @nullable */
|
|
6675
6708
|
PlanUids?: string | null;
|
|
6676
6709
|
} | null;
|
|
6677
6710
|
|
|
@@ -7136,6 +7169,8 @@ export type AccountWebhookEntityLatestSubscriptionDiscountCouponSubscriptionsIte
|
|
|
7136
7169
|
MaxRedemptions?: number | null;
|
|
7137
7170
|
ApplyToAddOns?: boolean;
|
|
7138
7171
|
/** @nullable */
|
|
7172
|
+
IsInUse?: boolean | null;
|
|
7173
|
+
/** @nullable */
|
|
7139
7174
|
PlanUids?: string | null;
|
|
7140
7175
|
} | null;
|
|
7141
7176
|
|
|
@@ -356,6 +356,74 @@ export const useCaseUpdateCase = <TError = void,
|
|
|
356
356
|
return useMutation(mutationOptions);
|
|
357
357
|
}
|
|
358
358
|
/**
|
|
359
|
+
* The ticket is deleted together with all its replies, notes, tags and attachments.
|
|
360
|
+
This cannot be undone.
|
|
361
|
+
|
|
362
|
+
The ticket and its history are gone when the request returns. Its attachment files,
|
|
363
|
+
its search entry, and the logs of the emails and activities that relate to it are
|
|
364
|
+
removed in the background shortly after.
|
|
365
|
+
* @summary Permanently delete a support ticket.
|
|
366
|
+
*/
|
|
367
|
+
export const caseDeleteCase = (
|
|
368
|
+
caseUid: string | null,
|
|
369
|
+
options?: SecondParameter<typeof customFetch>,) => {
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
return customFetch<Blob>(
|
|
373
|
+
{url: `/api/v1/support/cases/${caseUid}`, method: 'DELETE',
|
|
374
|
+
responseType: 'blob'
|
|
375
|
+
},
|
|
376
|
+
options);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
export const getCaseDeleteCaseMutationOptions = <TError = void,
|
|
382
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof caseDeleteCase>>, TError,{caseUid: string | null}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
383
|
+
): UseMutationOptions<Awaited<ReturnType<typeof caseDeleteCase>>, TError,{caseUid: string | null}, TContext> => {
|
|
384
|
+
|
|
385
|
+
const mutationKey = ['caseDeleteCase'];
|
|
386
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
387
|
+
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
388
|
+
options
|
|
389
|
+
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
390
|
+
: {mutation: { mutationKey, }, request: undefined};
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof caseDeleteCase>>, {caseUid: string | null}> = (props) => {
|
|
396
|
+
const {caseUid} = props ?? {};
|
|
397
|
+
|
|
398
|
+
return caseDeleteCase(caseUid,requestOptions)
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
return { mutationFn, ...mutationOptions }}
|
|
405
|
+
|
|
406
|
+
export type CaseDeleteCaseMutationResult = NonNullable<Awaited<ReturnType<typeof caseDeleteCase>>>
|
|
407
|
+
|
|
408
|
+
export type CaseDeleteCaseMutationError = void
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* @summary Permanently delete a support ticket.
|
|
412
|
+
*/
|
|
413
|
+
export const useCaseDeleteCase = <TError = void,
|
|
414
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof caseDeleteCase>>, TError,{caseUid: string | null}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
415
|
+
): UseMutationResult<
|
|
416
|
+
Awaited<ReturnType<typeof caseDeleteCase>>,
|
|
417
|
+
TError,
|
|
418
|
+
{caseUid: string | null},
|
|
419
|
+
TContext
|
|
420
|
+
> => {
|
|
421
|
+
|
|
422
|
+
const mutationOptions = getCaseDeleteCaseMutationOptions(options);
|
|
423
|
+
|
|
424
|
+
return useMutation(mutationOptions);
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
359
427
|
* @summary Adds a reply from an agent to a support case.
|
|
360
428
|
*/
|
|
361
429
|
export const caseAddReply = (
|