@outseta/react 0.3.0 → 0.3.2
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 +6 -3
- package/package.json +2 -2
- package/src/generated/activity/activity.ts +34 -7
- package/src/generated/billing/billing.ts +111 -84
- package/src/generated/crm/crm.ts +109 -80
- package/src/generated/email/email.ts +48 -21
- package/src/generated/outsetaAPI.schemas.ts +236 -2
- package/src/generated/public/public.ts +748 -0
- package/src/generated/support/support.ts +34 -7
|
@@ -25,6 +25,33 @@ import type {
|
|
|
25
25
|
|
|
26
26
|
import { customFetch } from '../../mutator';
|
|
27
27
|
|
|
28
|
+
// https://stackoverflow.com/questions/49579094/typescript-conditional-types-filter-out-readonly-properties-pick-only-requir/49579497#49579497
|
|
29
|
+
type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <
|
|
30
|
+
T,
|
|
31
|
+
>() => T extends Y ? 1 : 2
|
|
32
|
+
? A
|
|
33
|
+
: B;
|
|
34
|
+
|
|
35
|
+
type WritableKeys<T> = {
|
|
36
|
+
[P in keyof T]-?: IfEquals<
|
|
37
|
+
{ [Q in P]: T[P] },
|
|
38
|
+
{ -readonly [Q in P]: T[P] },
|
|
39
|
+
P
|
|
40
|
+
>;
|
|
41
|
+
}[keyof T];
|
|
42
|
+
|
|
43
|
+
type UnionToIntersection<U> =
|
|
44
|
+
(U extends any ? (k: U)=>void : never) extends ((k: infer I)=>void) ? I : never;
|
|
45
|
+
type DistributeReadOnlyOverUnions<T> = T extends any ? NonReadonly<T> : never;
|
|
46
|
+
|
|
47
|
+
type Writable<T> = Pick<T, WritableKeys<T>>;
|
|
48
|
+
type NonReadonly<T> = [T] extends [UnionToIntersection<T>] ? {
|
|
49
|
+
[P in keyof Writable<T>]: T[P] extends object
|
|
50
|
+
? NonReadonly<NonNullable<T[P]>>
|
|
51
|
+
: T[P];
|
|
52
|
+
} : DistributeReadOnlyOverUnions<T>;
|
|
53
|
+
|
|
54
|
+
|
|
28
55
|
|
|
29
56
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
30
57
|
|
|
@@ -106,7 +133,7 @@ directly. If both are provided, they are merged.
|
|
|
106
133
|
* @summary Create a new broadcast campaign.
|
|
107
134
|
*/
|
|
108
135
|
export const campaignAddBroadcastEmail = (
|
|
109
|
-
campaignAddBroadcastEmailBody: CampaignAddBroadcastEmailBody
|
|
136
|
+
campaignAddBroadcastEmailBody: NonReadonly<CampaignAddBroadcastEmailBody>,
|
|
110
137
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
|
111
138
|
) => {
|
|
112
139
|
|
|
@@ -122,8 +149,8 @@ export const campaignAddBroadcastEmail = (
|
|
|
122
149
|
|
|
123
150
|
|
|
124
151
|
export const getCampaignAddBroadcastEmailMutationOptions = <TError = void,
|
|
125
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, TError,{data: CampaignAddBroadcastEmailBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
126
|
-
): UseMutationOptions<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, TError,{data: CampaignAddBroadcastEmailBody}, TContext> => {
|
|
152
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, TError,{data: NonReadonly<CampaignAddBroadcastEmailBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
153
|
+
): UseMutationOptions<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, TError,{data: NonReadonly<CampaignAddBroadcastEmailBody>}, TContext> => {
|
|
127
154
|
|
|
128
155
|
const mutationKey = ['campaignAddBroadcastEmail'];
|
|
129
156
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
@@ -135,7 +162,7 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
135
162
|
|
|
136
163
|
|
|
137
164
|
|
|
138
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, {data: CampaignAddBroadcastEmailBody}> = (props) => {
|
|
165
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, {data: NonReadonly<CampaignAddBroadcastEmailBody>}> = (props) => {
|
|
139
166
|
const {data} = props ?? {};
|
|
140
167
|
|
|
141
168
|
return campaignAddBroadcastEmail(data,requestOptions)
|
|
@@ -147,18 +174,18 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
147
174
|
return { mutationFn, ...mutationOptions }}
|
|
148
175
|
|
|
149
176
|
export type CampaignAddBroadcastEmailMutationResult = NonNullable<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>>
|
|
150
|
-
export type CampaignAddBroadcastEmailMutationBody = CampaignAddBroadcastEmailBody
|
|
177
|
+
export type CampaignAddBroadcastEmailMutationBody = NonReadonly<CampaignAddBroadcastEmailBody>
|
|
151
178
|
export type CampaignAddBroadcastEmailMutationError = void
|
|
152
179
|
|
|
153
180
|
/**
|
|
154
181
|
* @summary Create a new broadcast campaign.
|
|
155
182
|
*/
|
|
156
183
|
export const useCampaignAddBroadcastEmail = <TError = void,
|
|
157
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, TError,{data: CampaignAddBroadcastEmailBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
184
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignAddBroadcastEmail>>, TError,{data: NonReadonly<CampaignAddBroadcastEmailBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
158
185
|
): UseMutationResult<
|
|
159
186
|
Awaited<ReturnType<typeof campaignAddBroadcastEmail>>,
|
|
160
187
|
TError,
|
|
161
|
-
{data: CampaignAddBroadcastEmailBody},
|
|
188
|
+
{data: NonReadonly<CampaignAddBroadcastEmailBody>},
|
|
162
189
|
TContext
|
|
163
190
|
> => {
|
|
164
191
|
|
|
@@ -243,7 +270,7 @@ directly. If both are provided, they are merged.
|
|
|
243
270
|
*/
|
|
244
271
|
export const campaignUpdateBroadcastEmail = (
|
|
245
272
|
broadcastCampaignUid: string | null,
|
|
246
|
-
campaignUpdateBroadcastEmailBody: CampaignUpdateBroadcastEmailBody
|
|
273
|
+
campaignUpdateBroadcastEmailBody: NonReadonly<CampaignUpdateBroadcastEmailBody>,
|
|
247
274
|
options?: SecondParameter<typeof customFetch>,) => {
|
|
248
275
|
|
|
249
276
|
|
|
@@ -258,8 +285,8 @@ export const campaignUpdateBroadcastEmail = (
|
|
|
258
285
|
|
|
259
286
|
|
|
260
287
|
export const getCampaignUpdateBroadcastEmailMutationOptions = <TError = void,
|
|
261
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, TError,{broadcastCampaignUid: string | null;data: CampaignUpdateBroadcastEmailBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
262
|
-
): UseMutationOptions<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, TError,{broadcastCampaignUid: string | null;data: CampaignUpdateBroadcastEmailBody}, TContext> => {
|
|
288
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, TError,{broadcastCampaignUid: string | null;data: NonReadonly<CampaignUpdateBroadcastEmailBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
289
|
+
): UseMutationOptions<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, TError,{broadcastCampaignUid: string | null;data: NonReadonly<CampaignUpdateBroadcastEmailBody>}, TContext> => {
|
|
263
290
|
|
|
264
291
|
const mutationKey = ['campaignUpdateBroadcastEmail'];
|
|
265
292
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
@@ -271,7 +298,7 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
271
298
|
|
|
272
299
|
|
|
273
300
|
|
|
274
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, {broadcastCampaignUid: string | null;data: CampaignUpdateBroadcastEmailBody}> = (props) => {
|
|
301
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, {broadcastCampaignUid: string | null;data: NonReadonly<CampaignUpdateBroadcastEmailBody>}> = (props) => {
|
|
275
302
|
const {broadcastCampaignUid,data} = props ?? {};
|
|
276
303
|
|
|
277
304
|
return campaignUpdateBroadcastEmail(broadcastCampaignUid,data,requestOptions)
|
|
@@ -283,18 +310,18 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
283
310
|
return { mutationFn, ...mutationOptions }}
|
|
284
311
|
|
|
285
312
|
export type CampaignUpdateBroadcastEmailMutationResult = NonNullable<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>>
|
|
286
|
-
export type CampaignUpdateBroadcastEmailMutationBody = CampaignUpdateBroadcastEmailBody
|
|
313
|
+
export type CampaignUpdateBroadcastEmailMutationBody = NonReadonly<CampaignUpdateBroadcastEmailBody>
|
|
287
314
|
export type CampaignUpdateBroadcastEmailMutationError = void
|
|
288
315
|
|
|
289
316
|
/**
|
|
290
317
|
* @summary Update a broadcast campaign.
|
|
291
318
|
*/
|
|
292
319
|
export const useCampaignUpdateBroadcastEmail = <TError = void,
|
|
293
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, TError,{broadcastCampaignUid: string | null;data: CampaignUpdateBroadcastEmailBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
320
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>, TError,{broadcastCampaignUid: string | null;data: NonReadonly<CampaignUpdateBroadcastEmailBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
294
321
|
): UseMutationResult<
|
|
295
322
|
Awaited<ReturnType<typeof campaignUpdateBroadcastEmail>>,
|
|
296
323
|
TError,
|
|
297
|
-
{broadcastCampaignUid: string | null;data: CampaignUpdateBroadcastEmailBody},
|
|
324
|
+
{broadcastCampaignUid: string | null;data: NonReadonly<CampaignUpdateBroadcastEmailBody>},
|
|
298
325
|
TContext
|
|
299
326
|
> => {
|
|
300
327
|
|
|
@@ -640,7 +667,7 @@ determines if the person is sent a welcome email and defaults to false.
|
|
|
640
667
|
*/
|
|
641
668
|
export const emailListAddSubscription = (
|
|
642
669
|
emailListUid: string | null,
|
|
643
|
-
emailListAddSubscriptionBody: EmailListAddSubscriptionBody
|
|
670
|
+
emailListAddSubscriptionBody: NonReadonly<EmailListAddSubscriptionBody>,
|
|
644
671
|
options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
|
|
645
672
|
) => {
|
|
646
673
|
|
|
@@ -656,8 +683,8 @@ export const emailListAddSubscription = (
|
|
|
656
683
|
|
|
657
684
|
|
|
658
685
|
export const getEmailListAddSubscriptionMutationOptions = <TError = void,
|
|
659
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof emailListAddSubscription>>, TError,{emailListUid: string | null;data: EmailListAddSubscriptionBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
660
|
-
): UseMutationOptions<Awaited<ReturnType<typeof emailListAddSubscription>>, TError,{emailListUid: string | null;data: EmailListAddSubscriptionBody}, TContext> => {
|
|
686
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof emailListAddSubscription>>, TError,{emailListUid: string | null;data: NonReadonly<EmailListAddSubscriptionBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
687
|
+
): UseMutationOptions<Awaited<ReturnType<typeof emailListAddSubscription>>, TError,{emailListUid: string | null;data: NonReadonly<EmailListAddSubscriptionBody>}, TContext> => {
|
|
661
688
|
|
|
662
689
|
const mutationKey = ['emailListAddSubscription'];
|
|
663
690
|
const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
@@ -669,7 +696,7 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
669
696
|
|
|
670
697
|
|
|
671
698
|
|
|
672
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof emailListAddSubscription>>, {emailListUid: string | null;data: EmailListAddSubscriptionBody}> = (props) => {
|
|
699
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof emailListAddSubscription>>, {emailListUid: string | null;data: NonReadonly<EmailListAddSubscriptionBody>}> = (props) => {
|
|
673
700
|
const {emailListUid,data} = props ?? {};
|
|
674
701
|
|
|
675
702
|
return emailListAddSubscription(emailListUid,data,requestOptions)
|
|
@@ -681,18 +708,18 @@ const {mutation: mutationOptions, request: requestOptions} = options ?
|
|
|
681
708
|
return { mutationFn, ...mutationOptions }}
|
|
682
709
|
|
|
683
710
|
export type EmailListAddSubscriptionMutationResult = NonNullable<Awaited<ReturnType<typeof emailListAddSubscription>>>
|
|
684
|
-
export type EmailListAddSubscriptionMutationBody = EmailListAddSubscriptionBody
|
|
711
|
+
export type EmailListAddSubscriptionMutationBody = NonReadonly<EmailListAddSubscriptionBody>
|
|
685
712
|
export type EmailListAddSubscriptionMutationError = void
|
|
686
713
|
|
|
687
714
|
/**
|
|
688
715
|
* @summary Subscribe a person to an email list.
|
|
689
716
|
*/
|
|
690
717
|
export const useEmailListAddSubscription = <TError = void,
|
|
691
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof emailListAddSubscription>>, TError,{emailListUid: string | null;data: EmailListAddSubscriptionBody}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
718
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof emailListAddSubscription>>, TError,{emailListUid: string | null;data: NonReadonly<EmailListAddSubscriptionBody>}, TContext>, request?: SecondParameter<typeof customFetch>}
|
|
692
719
|
): UseMutationResult<
|
|
693
720
|
Awaited<ReturnType<typeof emailListAddSubscription>>,
|
|
694
721
|
TError,
|
|
695
|
-
{emailListUid: string | null;data: EmailListAddSubscriptionBody},
|
|
722
|
+
{emailListUid: string | null;data: NonReadonly<EmailListAddSubscriptionBody>},
|
|
696
723
|
TContext
|
|
697
724
|
> => {
|
|
698
725
|
|
|
@@ -40,9 +40,9 @@ export interface AbstractBean {
|
|
|
40
40
|
/** @nullable */
|
|
41
41
|
_objectType?: string | null;
|
|
42
42
|
/** @minLength 1 */
|
|
43
|
-
Created: string;
|
|
43
|
+
readonly Created: string;
|
|
44
44
|
/** @minLength 1 */
|
|
45
|
-
Updated: string;
|
|
45
|
+
readonly Updated: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -2633,11 +2633,163 @@ export const EmailListSubscriberStatus = {
|
|
|
2633
2633
|
Confirmed: 4,
|
|
2634
2634
|
} as const;
|
|
2635
2635
|
|
|
2636
|
+
export interface TokenPayload {
|
|
2637
|
+
/** @nullable */
|
|
2638
|
+
access_token?: string | null;
|
|
2639
|
+
/** @nullable */
|
|
2640
|
+
authentication_callback_url?: string | null;
|
|
2641
|
+
expires_in?: number;
|
|
2642
|
+
/** @nullable */
|
|
2643
|
+
id_token?: string | null;
|
|
2644
|
+
/** @nullable */
|
|
2645
|
+
token_type?: string | null;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
/**
|
|
2649
|
+
* Returned when a login cannot complete with a password alone because the
|
|
2650
|
+
user has two-factor authentication enabled. Carries the opaque challenge
|
|
2651
|
+
token that must be echoed back to POST /api/v1/tokens/two-factor
|
|
2652
|
+
(or the recovery / resend / switch-mechanism endpoints) along with enough
|
|
2653
|
+
metadata for a client to render the verification step without a second
|
|
2654
|
+
round-trip. The property names are snake_case to match the wire format of
|
|
2655
|
+
the other token endpoints (see TokenPayload).
|
|
2656
|
+
*/
|
|
2657
|
+
export interface TwoFactorChallengePayload {
|
|
2658
|
+
/**
|
|
2659
|
+
* Present and true on the 202 response from POST /api/v1/tokens
|
|
2660
|
+
when the user has at least one verified 2FA method. Absent on the
|
|
2661
|
+
resend / switch-mechanism responses, which only ever follow an
|
|
2662
|
+
already-issued login challenge.
|
|
2663
|
+
* @nullable
|
|
2664
|
+
*/
|
|
2665
|
+
two_factor_required?: boolean | null;
|
|
2666
|
+
/**
|
|
2667
|
+
* Present and true instead of two_factor_required
|
|
2668
|
+
when the tenant forces 2FA but the user has not yet enrolled any
|
|
2669
|
+
method. In that case only challenge_token and
|
|
2670
|
+
expires_in are populated and the client must route the
|
|
2671
|
+
user through the mid-login enrollment endpoints
|
|
2672
|
+
(/api/v1/tokens/two-factor/enroll/...) before a token can be issued.
|
|
2673
|
+
* @nullable
|
|
2674
|
+
*/
|
|
2675
|
+
two_factor_enrollment_required?: boolean | null;
|
|
2676
|
+
/**
|
|
2677
|
+
* Short-lived signed JWT (audience outseta:2fa-challenge) that
|
|
2678
|
+
identifies this challenge. Echo it back verbatim to complete the login.
|
|
2679
|
+
* @nullable
|
|
2680
|
+
*/
|
|
2681
|
+
challenge_token?: string | null;
|
|
2682
|
+
/**
|
|
2683
|
+
* The mechanism this challenge was issued against: Email or
|
|
2684
|
+
Totp (authenticator app). For Email a code has already
|
|
2685
|
+
been sent to the user; for Totp the user reads the current
|
|
2686
|
+
code from their authenticator app and nothing is sent.
|
|
2687
|
+
* @nullable
|
|
2688
|
+
*/
|
|
2689
|
+
mechanism?: string | null;
|
|
2690
|
+
/**
|
|
2691
|
+
* A masked view of where an emailed code was sent (e.g. b***@outseta.com),
|
|
2692
|
+
suitable for display. Empty when mechanism is Totp.
|
|
2693
|
+
* @nullable
|
|
2694
|
+
*/
|
|
2695
|
+
masked_destination?: string | null;
|
|
2696
|
+
/** Seconds until the challenge expires (600). After this the
|
|
2697
|
+
challenge_token can no longer be verified and the login must restart. */
|
|
2698
|
+
expires_in?: number;
|
|
2699
|
+
/**
|
|
2700
|
+
* Every verified mechanism enrolled for this user (excluding recovery
|
|
2701
|
+
codes), e.g. ["Totp", "Email"]. A client can offer a
|
|
2702
|
+
"use a different method" option for any value other than the current
|
|
2703
|
+
mechanism via POST /api/v1/tokens/two-factor/switch-mechanism.
|
|
2704
|
+
* @nullable
|
|
2705
|
+
*/
|
|
2706
|
+
available_mechanisms?: string[] | null;
|
|
2707
|
+
/**
|
|
2708
|
+
* true when the user has a batch of recovery codes on file, in
|
|
2709
|
+
which case POST /api/v1/tokens/two-factor/recovery can be used
|
|
2710
|
+
as a fallback if they cannot produce a primary code.
|
|
2711
|
+
* @nullable
|
|
2712
|
+
*/
|
|
2713
|
+
recovery_codes_available?: boolean | null;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2636
2716
|
export interface PasswordPayload {
|
|
2637
2717
|
/** @nullable */
|
|
2638
2718
|
Password?: string | null;
|
|
2639
2719
|
}
|
|
2640
2720
|
|
|
2721
|
+
/**
|
|
2722
|
+
* Returned from POST /api/v1/tokens/two-factor/enroll/totp/begin when a
|
|
2723
|
+
user forced into 2FA chooses to enroll an authenticator app. Carries the
|
|
2724
|
+
shared secret in the three forms a client may need to present it, plus the
|
|
2725
|
+
challenge token the user's first generated code is confirmed against. The
|
|
2726
|
+
property names are snake_case to match the wire format of the other token
|
|
2727
|
+
endpoints (see TokenPayload).
|
|
2728
|
+
*/
|
|
2729
|
+
export interface TwoFactorTotpEnrollmentPayload {
|
|
2730
|
+
/**
|
|
2731
|
+
* Short-lived signed JWT identifying the enrollment-test challenge.
|
|
2732
|
+
Echo it back to POST /api/v1/tokens/two-factor/enroll/totp/confirm
|
|
2733
|
+
along with the first code from the authenticator app.
|
|
2734
|
+
* @nullable
|
|
2735
|
+
*/
|
|
2736
|
+
challenge_token?: string | null;
|
|
2737
|
+
/**
|
|
2738
|
+
* The Base32-encoded shared secret. Offer this for manual entry by users
|
|
2739
|
+
who cannot scan the QR code.
|
|
2740
|
+
* @nullable
|
|
2741
|
+
*/
|
|
2742
|
+
secret?: string | null;
|
|
2743
|
+
/**
|
|
2744
|
+
* The full otpauth://totp/... URI encoding the secret, issuer and
|
|
2745
|
+
parameters. Most authenticator apps add an account directly from this.
|
|
2746
|
+
* @nullable
|
|
2747
|
+
*/
|
|
2748
|
+
otpauth_uri?: string | null;
|
|
2749
|
+
/**
|
|
2750
|
+
* A QR code rendering of otpauth_uri as a PNG, Base64
|
|
2751
|
+
encoded — render it as an <img> for the user to scan.
|
|
2752
|
+
* @nullable
|
|
2753
|
+
*/
|
|
2754
|
+
qr_code_png_base64?: string | null;
|
|
2755
|
+
/** Seconds until the enrollment-test challenge expires (600). */
|
|
2756
|
+
expires_in?: number;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* Returned from the mid-login enrollment confirm endpoints
|
|
2761
|
+
(POST /api/v1/tokens/two-factor/enroll/{email|totp}/confirm) once the
|
|
2762
|
+
user has proven control of the new mechanism. Completes a forced-enrollment
|
|
2763
|
+
login: it both finalizes the JWT access token and surfaces the freshly
|
|
2764
|
+
generated recovery codes. The property names are snake_case to match the
|
|
2765
|
+
wire format of the other token endpoints (see TokenPayload).
|
|
2766
|
+
*/
|
|
2767
|
+
export interface TwoFactorEnrollmentConfirmationPayload {
|
|
2768
|
+
/** Always true on a success response; the enrollment is now active. */
|
|
2769
|
+
confirmed?: boolean;
|
|
2770
|
+
/**
|
|
2771
|
+
* The user's recovery codes, generated as part of first-time enrollment.
|
|
2772
|
+
These are shown once and never returned again — prompt the user
|
|
2773
|
+
to store them somewhere safe. Each code is single-use at
|
|
2774
|
+
POST /api/v1/tokens/two-factor/recovery.
|
|
2775
|
+
* @nullable
|
|
2776
|
+
*/
|
|
2777
|
+
recovery_codes?: string[] | null;
|
|
2778
|
+
/**
|
|
2779
|
+
* The JWT access token. Use it as Authorization: bearer {access_token}
|
|
2780
|
+
for subsequent API calls — login is complete.
|
|
2781
|
+
* @nullable
|
|
2782
|
+
*/
|
|
2783
|
+
access_token?: string | null;
|
|
2784
|
+
/**
|
|
2785
|
+
* Always Bearer.
|
|
2786
|
+
* @nullable
|
|
2787
|
+
*/
|
|
2788
|
+
token_type?: string | null;
|
|
2789
|
+
/** Seconds until the access token expires. */
|
|
2790
|
+
expires_in?: number;
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2641
2793
|
/**
|
|
2642
2794
|
* @nullable
|
|
2643
2795
|
*/
|
|
@@ -3416,8 +3568,27 @@ export type SendGridDomainAuthenticationAllOf = {
|
|
|
3416
3568
|
* @maxLength 250
|
|
3417
3569
|
*/
|
|
3418
3570
|
DomainName: string;
|
|
3571
|
+
/**
|
|
3572
|
+
* @maxLength 100
|
|
3573
|
+
* @nullable
|
|
3574
|
+
*/
|
|
3575
|
+
SendGridSubuser?: string | null;
|
|
3419
3576
|
IsValid?: boolean;
|
|
3420
3577
|
IsBrandedLinksDisabled?: boolean;
|
|
3578
|
+
IsLinkTrackingDnsValid?: boolean;
|
|
3579
|
+
/**
|
|
3580
|
+
* @maxLength 100
|
|
3581
|
+
* @nullable
|
|
3582
|
+
*/
|
|
3583
|
+
CloudflareCustomHostnameId?: string | null;
|
|
3584
|
+
/**
|
|
3585
|
+
* @maxLength 50
|
|
3586
|
+
* @nullable
|
|
3587
|
+
*/
|
|
3588
|
+
CloudflareSslStatus?: string | null;
|
|
3589
|
+
/** @nullable */
|
|
3590
|
+
CloudflareCustomHostnameCreatedAt?: string | null;
|
|
3591
|
+
IsHttpsUpgradeAvailable?: boolean;
|
|
3421
3592
|
/** @nullable */
|
|
3422
3593
|
LastValidationAttempt?: string | null;
|
|
3423
3594
|
/** @nullable */
|
|
@@ -5658,6 +5829,69 @@ export interface PersonSegmentRemovedWebhookPayload {
|
|
|
5658
5829
|
ActivityEventData?: PersonSegmentRemovedActivityData;
|
|
5659
5830
|
}
|
|
5660
5831
|
|
|
5832
|
+
export type AuthGetTokenParams = {
|
|
5833
|
+
/**
|
|
5834
|
+
* @nullable
|
|
5835
|
+
*/
|
|
5836
|
+
data: unknown | null;
|
|
5837
|
+
};
|
|
5838
|
+
|
|
5839
|
+
export type AuthVerifyTwoFactorTokenParams = {
|
|
5840
|
+
/**
|
|
5841
|
+
* @nullable
|
|
5842
|
+
*/
|
|
5843
|
+
data: unknown | null;
|
|
5844
|
+
};
|
|
5845
|
+
|
|
5846
|
+
export type AuthResendTwoFactorParams = {
|
|
5847
|
+
/**
|
|
5848
|
+
* @nullable
|
|
5849
|
+
*/
|
|
5850
|
+
data: unknown | null;
|
|
5851
|
+
};
|
|
5852
|
+
|
|
5853
|
+
export type AuthSwitchTwoFactorMechanismParams = {
|
|
5854
|
+
/**
|
|
5855
|
+
* @nullable
|
|
5856
|
+
*/
|
|
5857
|
+
data: unknown | null;
|
|
5858
|
+
};
|
|
5859
|
+
|
|
5860
|
+
export type AuthVerifyTwoFactorRecoveryParams = {
|
|
5861
|
+
/**
|
|
5862
|
+
* @nullable
|
|
5863
|
+
*/
|
|
5864
|
+
data: unknown | null;
|
|
5865
|
+
};
|
|
5866
|
+
|
|
5867
|
+
export type TokenTwoFactorEnrollmentBeginEmailParams = {
|
|
5868
|
+
/**
|
|
5869
|
+
* @nullable
|
|
5870
|
+
*/
|
|
5871
|
+
data: unknown | null;
|
|
5872
|
+
};
|
|
5873
|
+
|
|
5874
|
+
export type TokenTwoFactorEnrollmentBeginTotpParams = {
|
|
5875
|
+
/**
|
|
5876
|
+
* @nullable
|
|
5877
|
+
*/
|
|
5878
|
+
data: unknown | null;
|
|
5879
|
+
};
|
|
5880
|
+
|
|
5881
|
+
export type TokenTwoFactorEnrollmentConfirmEmailParams = {
|
|
5882
|
+
/**
|
|
5883
|
+
* @nullable
|
|
5884
|
+
*/
|
|
5885
|
+
data: unknown | null;
|
|
5886
|
+
};
|
|
5887
|
+
|
|
5888
|
+
export type TokenTwoFactorEnrollmentConfirmTotpParams = {
|
|
5889
|
+
/**
|
|
5890
|
+
* @nullable
|
|
5891
|
+
*/
|
|
5892
|
+
data: unknown | null;
|
|
5893
|
+
};
|
|
5894
|
+
|
|
5661
5895
|
export type CaseGetAllCasesParams = {
|
|
5662
5896
|
/**
|
|
5663
5897
|
* Search string
|