@outseta/react 0.4.42 → 0.4.44
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`,
|
|
@@ -3592,6 +3612,11 @@ var TeamRole = {
|
|
|
3592
3612
|
Member: 2,
|
|
3593
3613
|
Operator: 3
|
|
3594
3614
|
};
|
|
3615
|
+
var LeadFormSubmissionFieldOutcome = {
|
|
3616
|
+
Written: "Written",
|
|
3617
|
+
Unchanged: "Unchanged",
|
|
3618
|
+
Skipped: "Skipped"
|
|
3619
|
+
};
|
|
3595
3620
|
var OAuthService = {
|
|
3596
3621
|
None: 0,
|
|
3597
3622
|
Gmail: 1
|
|
@@ -3825,7 +3850,8 @@ var BackGroundTaskType = {
|
|
|
3825
3850
|
UpdateDiscordMemberRolesTask: 19,
|
|
3826
3851
|
SendInvoicePaidEmailTask: 20,
|
|
3827
3852
|
ResendTrialLimitEmailTask: 21,
|
|
3828
|
-
UpdateStripeSubscriptionApplicationFeePercentTask: 22
|
|
3853
|
+
UpdateStripeSubscriptionApplicationFeePercentTask: 22,
|
|
3854
|
+
DeleteSupportCaseContentTask: 23
|
|
3829
3855
|
};
|
|
3830
3856
|
var RegistrationField = {
|
|
3831
3857
|
PersonFirstName: 1,
|
|
@@ -4127,6 +4153,7 @@ export {
|
|
|
4127
4153
|
EntityType,
|
|
4128
4154
|
LeadCaptureButton,
|
|
4129
4155
|
LeadCaptureEmbed,
|
|
4156
|
+
LeadFormSubmissionFieldOutcome,
|
|
4130
4157
|
LineItemType,
|
|
4131
4158
|
LoginButton,
|
|
4132
4159
|
LogoutButton,
|
|
@@ -4197,6 +4224,7 @@ export {
|
|
|
4197
4224
|
caseAddCase,
|
|
4198
4225
|
caseAddClientResponse,
|
|
4199
4226
|
caseAddReply,
|
|
4227
|
+
caseDeleteCase,
|
|
4200
4228
|
caseGetAllCases,
|
|
4201
4229
|
caseGetCase,
|
|
4202
4230
|
caseUpdateCase,
|
|
@@ -4277,6 +4305,7 @@ export {
|
|
|
4277
4305
|
getCaseAddCaseMutationOptions,
|
|
4278
4306
|
getCaseAddClientResponseMutationOptions,
|
|
4279
4307
|
getCaseAddReplyMutationOptions,
|
|
4308
|
+
getCaseDeleteCaseMutationOptions,
|
|
4280
4309
|
getCaseGetAllCasesQueryKey,
|
|
4281
4310
|
getCaseGetAllCasesQueryOptions,
|
|
4282
4311
|
getCaseGetCaseQueryKey,
|
|
@@ -4486,6 +4515,7 @@ export {
|
|
|
4486
4515
|
useCaseAddCase,
|
|
4487
4516
|
useCaseAddClientResponse,
|
|
4488
4517
|
useCaseAddReply,
|
|
4518
|
+
useCaseDeleteCase,
|
|
4489
4519
|
useCaseGetAllCases,
|
|
4490
4520
|
useCaseGetCase,
|
|
4491
4521
|
useCaseUpdateCase,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outseta/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.44",
|
|
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.50"
|
|
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
|
|
|
@@ -2688,6 +2690,9 @@ export type LeadFormSubmissionAllOf = {
|
|
|
2688
2690
|
LeadForm: LeadForm;
|
|
2689
2691
|
/** @nullable */
|
|
2690
2692
|
RefererURL?: string | null;
|
|
2693
|
+
HasPendingFields?: boolean;
|
|
2694
|
+
/** @nullable */
|
|
2695
|
+
Fields?: LeadFormSubmissionField[] | null;
|
|
2691
2696
|
/** @nullable */
|
|
2692
2697
|
RecaptchaToken?: string | null;
|
|
2693
2698
|
/** @nullable */
|
|
@@ -2724,6 +2729,32 @@ export type LeadFormAllOf = {
|
|
|
2724
2729
|
|
|
2725
2730
|
export type LeadForm = AbstractQcountBean & LeadFormAllOf;
|
|
2726
2731
|
|
|
2732
|
+
export interface LeadFormSubmissionField {
|
|
2733
|
+
/** @nullable */
|
|
2734
|
+
SystemName?: string | null;
|
|
2735
|
+
/** @nullable */
|
|
2736
|
+
Value?: string | null;
|
|
2737
|
+
Outcome?: LeadFormSubmissionFieldOutcome;
|
|
2738
|
+
/** @nullable */
|
|
2739
|
+
PersonValue?: string | null;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* `Written` - Saved, `Unchanged` - Unchanged, `Skipped` - Not saved
|
|
2744
|
+
*/
|
|
2745
|
+
export type LeadFormSubmissionFieldOutcome = typeof LeadFormSubmissionFieldOutcome[keyof typeof LeadFormSubmissionFieldOutcome];
|
|
2746
|
+
|
|
2747
|
+
|
|
2748
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2749
|
+
export const LeadFormSubmissionFieldOutcome = {
|
|
2750
|
+
/** Saved */
|
|
2751
|
+
Written: 'Written',
|
|
2752
|
+
/** Unchanged */
|
|
2753
|
+
Unchanged: 'Unchanged',
|
|
2754
|
+
/** Not saved */
|
|
2755
|
+
Skipped: 'Skipped',
|
|
2756
|
+
} as const;
|
|
2757
|
+
|
|
2727
2758
|
/**
|
|
2728
2759
|
* `0` - None, `1` - Gmail
|
|
2729
2760
|
*/
|
|
@@ -4444,7 +4475,7 @@ export interface FlatfileImportData {
|
|
|
4444
4475
|
}
|
|
4445
4476
|
|
|
4446
4477
|
/**
|
|
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
|
|
4478
|
+
* `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
4479
|
*/
|
|
4449
4480
|
export type BackGroundTaskType = typeof BackGroundTaskType[keyof typeof BackGroundTaskType];
|
|
4450
4481
|
|
|
@@ -4473,6 +4504,7 @@ export const BackGroundTaskType = {
|
|
|
4473
4504
|
SendInvoicePaidEmailTask: 20,
|
|
4474
4505
|
ResendTrialLimitEmailTask: 21,
|
|
4475
4506
|
UpdateStripeSubscriptionApplicationFeePercentTask: 22,
|
|
4507
|
+
DeleteSupportCaseContentTask: 23,
|
|
4476
4508
|
} as const;
|
|
4477
4509
|
|
|
4478
4510
|
export type DirectoryAllOf = {
|
|
@@ -6090,6 +6122,8 @@ export type AccountWebhookEntitySubscriptionsItemDiscountCouponSubscriptionsItem
|
|
|
6090
6122
|
MaxRedemptions?: number | null;
|
|
6091
6123
|
ApplyToAddOns?: boolean;
|
|
6092
6124
|
/** @nullable */
|
|
6125
|
+
IsInUse?: boolean | null;
|
|
6126
|
+
/** @nullable */
|
|
6093
6127
|
PlanUids?: string | null;
|
|
6094
6128
|
} | null;
|
|
6095
6129
|
|
|
@@ -6698,6 +6732,8 @@ export type AccountWebhookEntityCurrentSubscriptionDiscountCouponSubscriptionsIt
|
|
|
6698
6732
|
MaxRedemptions?: number | null;
|
|
6699
6733
|
ApplyToAddOns?: boolean;
|
|
6700
6734
|
/** @nullable */
|
|
6735
|
+
IsInUse?: boolean | null;
|
|
6736
|
+
/** @nullable */
|
|
6701
6737
|
PlanUids?: string | null;
|
|
6702
6738
|
} | null;
|
|
6703
6739
|
|
|
@@ -7162,6 +7198,8 @@ export type AccountWebhookEntityLatestSubscriptionDiscountCouponSubscriptionsIte
|
|
|
7162
7198
|
MaxRedemptions?: number | null;
|
|
7163
7199
|
ApplyToAddOns?: boolean;
|
|
7164
7200
|
/** @nullable */
|
|
7201
|
+
IsInUse?: boolean | null;
|
|
7202
|
+
/** @nullable */
|
|
7165
7203
|
PlanUids?: string | null;
|
|
7166
7204
|
} | null;
|
|
7167
7205
|
|
|
@@ -8091,6 +8129,7 @@ export type PersonWebhookEntityLeadFormSubmissionsItem = {
|
|
|
8091
8129
|
Updated: string;
|
|
8092
8130
|
/** @nullable */
|
|
8093
8131
|
RefererURL?: string | null;
|
|
8132
|
+
HasPendingFields?: boolean;
|
|
8094
8133
|
/** @nullable */
|
|
8095
8134
|
RecaptchaToken?: string | null;
|
|
8096
8135
|
/** @nullable */
|
|
@@ -8637,6 +8676,8 @@ export interface PersonLeadFormSubmittedActivityData {
|
|
|
8637
8676
|
/** @nullable */
|
|
8638
8677
|
LeadFormUid?: string | null;
|
|
8639
8678
|
/** @nullable */
|
|
8679
|
+
LeadFormSubmissionUid?: string | null;
|
|
8680
|
+
/** @nullable */
|
|
8640
8681
|
RefererUrl?: string | null;
|
|
8641
8682
|
}
|
|
8642
8683
|
|
|
@@ -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 = (
|