@forgerock/login-widget 1.0.0-beta.7 → 1.0.0-beta.9
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/CHANGELOG.md +19 -12
- package/index.cjs +2360 -701
- package/index.cjs.map +1 -1
- package/index.d.ts +348 -205
- package/index.js +2360 -701
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/widget.css +4 -4
- package/inline.js +0 -33241
- package/modal.js +0 -33950
package/index.d.ts
CHANGED
|
@@ -676,6 +676,7 @@ interface UserStoreValue {
|
|
|
676
676
|
error: Maybe<{
|
|
677
677
|
code?: Maybe<number>;
|
|
678
678
|
message: Maybe<string>;
|
|
679
|
+
troubleshoot: Maybe<string>;
|
|
679
680
|
}>;
|
|
680
681
|
loading: boolean;
|
|
681
682
|
successful: boolean;
|
|
@@ -691,6 +692,7 @@ interface OAuthTokenStoreValue {
|
|
|
691
692
|
error: Maybe<{
|
|
692
693
|
code?: Maybe<number>;
|
|
693
694
|
message: Maybe<string>;
|
|
695
|
+
troubleshoot: Maybe<string>;
|
|
694
696
|
}>;
|
|
695
697
|
loading: boolean;
|
|
696
698
|
successful: boolean;
|
|
@@ -722,6 +724,7 @@ interface JourneyStoreValue {
|
|
|
722
724
|
code: Maybe<number>;
|
|
723
725
|
message: Maybe<string>;
|
|
724
726
|
step: Maybe<Step>;
|
|
727
|
+
troubleshoot: Maybe<string>;
|
|
725
728
|
}>;
|
|
726
729
|
loading: boolean;
|
|
727
730
|
metadata: {
|
|
@@ -744,10 +747,11 @@ interface StepMetadata {
|
|
|
744
747
|
}
|
|
745
748
|
type StepTypes = FRStep | FRLoginSuccess | FRLoginFailure | null;
|
|
746
749
|
|
|
747
|
-
declare type Primitive = string | number | bigint | boolean | null | undefined;
|
|
750
|
+
declare type Primitive = string | number | symbol | bigint | boolean | null | undefined;
|
|
748
751
|
|
|
749
752
|
declare namespace util {
|
|
750
753
|
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
754
|
+
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
751
755
|
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
752
756
|
export function assertIs<T>(_arg: T): void;
|
|
753
757
|
export function assertNever(_x: never): never;
|
|
@@ -759,16 +763,36 @@ declare namespace util {
|
|
|
759
763
|
export const objectValues: (obj: any) => any[];
|
|
760
764
|
export const objectKeys: ObjectConstructor["keys"];
|
|
761
765
|
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
762
|
-
export type identity<T> = T
|
|
763
|
-
export type flatten<T> =
|
|
764
|
-
[k in keyof T]: T[k];
|
|
765
|
-
}>;
|
|
766
|
+
export type identity<T> = objectUtil.identity<T>;
|
|
767
|
+
export type flatten<T> = objectUtil.flatten<T>;
|
|
766
768
|
export type noUndefined<T> = T extends undefined ? never : T;
|
|
767
769
|
export const isInteger: NumberConstructor["isInteger"];
|
|
768
770
|
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
769
771
|
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
770
772
|
export {};
|
|
771
773
|
}
|
|
774
|
+
declare namespace objectUtil {
|
|
775
|
+
export type MergeShapes<U, V> = {
|
|
776
|
+
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
777
|
+
} & V;
|
|
778
|
+
type requiredKeys<T extends object> = {
|
|
779
|
+
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
780
|
+
}[keyof T];
|
|
781
|
+
export type addQuestionMarks<T extends object, R extends keyof T = requiredKeys<T>> = Pick<Required<T>, R> & Partial<T>;
|
|
782
|
+
export type identity<T> = T;
|
|
783
|
+
export type flatten<T> = identity<{
|
|
784
|
+
[k in keyof T]: T[k];
|
|
785
|
+
}>;
|
|
786
|
+
export type noNeverKeys<T> = {
|
|
787
|
+
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
788
|
+
}[keyof T];
|
|
789
|
+
export type noNever<T> = identity<{
|
|
790
|
+
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
791
|
+
}>;
|
|
792
|
+
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
|
|
793
|
+
export type extendShape<A, B> = flatten<Omit<A, keyof B> & B>;
|
|
794
|
+
export {};
|
|
795
|
+
}
|
|
772
796
|
declare const ZodParsedType: {
|
|
773
797
|
function: "function";
|
|
774
798
|
number: "number";
|
|
@@ -816,6 +840,7 @@ declare const ZodIssueCode: {
|
|
|
816
840
|
too_big: "too_big";
|
|
817
841
|
invalid_intersection_types: "invalid_intersection_types";
|
|
818
842
|
not_multiple_of: "not_multiple_of";
|
|
843
|
+
not_finite: "not_finite";
|
|
819
844
|
};
|
|
820
845
|
declare type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
821
846
|
declare type ZodIssueBase = {
|
|
@@ -830,6 +855,7 @@ interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
|
830
855
|
interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
831
856
|
code: typeof ZodIssueCode.invalid_literal;
|
|
832
857
|
expected: unknown;
|
|
858
|
+
received: unknown;
|
|
833
859
|
}
|
|
834
860
|
interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
835
861
|
code: typeof ZodIssueCode.unrecognized_keys;
|
|
@@ -859,7 +885,10 @@ interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
|
859
885
|
interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
860
886
|
code: typeof ZodIssueCode.invalid_date;
|
|
861
887
|
}
|
|
862
|
-
declare type StringValidation = "email" | "url" | "uuid" | "regex" | "cuid" | {
|
|
888
|
+
declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "ip" | {
|
|
889
|
+
includes: string;
|
|
890
|
+
position?: number;
|
|
891
|
+
} | {
|
|
863
892
|
startsWith: string;
|
|
864
893
|
} | {
|
|
865
894
|
endsWith: string;
|
|
@@ -870,22 +899,27 @@ interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
|
870
899
|
}
|
|
871
900
|
interface ZodTooSmallIssue extends ZodIssueBase {
|
|
872
901
|
code: typeof ZodIssueCode.too_small;
|
|
873
|
-
minimum: number;
|
|
902
|
+
minimum: number | bigint;
|
|
874
903
|
inclusive: boolean;
|
|
875
|
-
|
|
904
|
+
exact?: boolean;
|
|
905
|
+
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
876
906
|
}
|
|
877
907
|
interface ZodTooBigIssue extends ZodIssueBase {
|
|
878
908
|
code: typeof ZodIssueCode.too_big;
|
|
879
|
-
maximum: number;
|
|
909
|
+
maximum: number | bigint;
|
|
880
910
|
inclusive: boolean;
|
|
881
|
-
|
|
911
|
+
exact?: boolean;
|
|
912
|
+
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
882
913
|
}
|
|
883
914
|
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
884
915
|
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
885
916
|
}
|
|
886
917
|
interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
887
918
|
code: typeof ZodIssueCode.not_multiple_of;
|
|
888
|
-
multipleOf: number;
|
|
919
|
+
multipleOf: number | bigint;
|
|
920
|
+
}
|
|
921
|
+
interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
922
|
+
code: typeof ZodIssueCode.not_finite;
|
|
889
923
|
}
|
|
890
924
|
interface ZodCustomIssue extends ZodIssueBase {
|
|
891
925
|
code: typeof ZodIssueCode.custom;
|
|
@@ -893,19 +927,21 @@ interface ZodCustomIssue extends ZodIssueBase {
|
|
|
893
927
|
[k: string]: any;
|
|
894
928
|
};
|
|
895
929
|
}
|
|
896
|
-
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodCustomIssue;
|
|
930
|
+
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
897
931
|
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
932
|
+
fatal?: boolean;
|
|
898
933
|
message: string;
|
|
899
934
|
};
|
|
900
|
-
declare type
|
|
901
|
-
_errors: U[];
|
|
902
|
-
} & (T extends [any, ...any[]] ? {
|
|
935
|
+
declare type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
|
|
903
936
|
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
904
937
|
} : T extends any[] ? {
|
|
905
938
|
[k: number]: ZodFormattedError<T[number]>;
|
|
906
939
|
} : T extends object ? {
|
|
907
940
|
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
908
|
-
} : unknown
|
|
941
|
+
} : unknown;
|
|
942
|
+
declare type ZodFormattedError<T, U = string> = {
|
|
943
|
+
_errors: U[];
|
|
944
|
+
} & recursiveZodFormattedError<NonNullable<T>>;
|
|
909
945
|
declare class ZodError<T = any> extends Error {
|
|
910
946
|
issues: ZodIssue[];
|
|
911
947
|
get errors(): ZodIssue[];
|
|
@@ -1005,20 +1041,16 @@ declare namespace errorUtil {
|
|
|
1005
1041
|
type ErrMessage = string | {
|
|
1006
1042
|
message?: string;
|
|
1007
1043
|
};
|
|
1008
|
-
const errToObj: (message?:
|
|
1009
|
-
message?: string | undefined;
|
|
1010
|
-
} | undefined) => {
|
|
1044
|
+
const errToObj: (message?: ErrMessage | undefined) => {
|
|
1011
1045
|
message?: string | undefined;
|
|
1012
1046
|
};
|
|
1013
|
-
const toString: (message?: string |
|
|
1014
|
-
message?: string | undefined;
|
|
1015
|
-
} | undefined) => string | undefined;
|
|
1047
|
+
const toString: (message?: ErrMessage | undefined) => string | undefined;
|
|
1016
1048
|
}
|
|
1017
1049
|
|
|
1018
1050
|
declare namespace partialUtil {
|
|
1019
|
-
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<
|
|
1020
|
-
[k in keyof
|
|
1021
|
-
},
|
|
1051
|
+
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<ZodRawShape> ? ZodObject<{
|
|
1052
|
+
[k in keyof T["shape"]]: ZodOptional<DeepPartial<T["shape"][k]>>;
|
|
1053
|
+
}, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray<infer Type, infer Card> ? ZodArray<DeepPartial<Type>, Card> : T extends ZodOptional<infer Type> ? ZodOptional<DeepPartial<Type>> : T extends ZodNullable<infer Type> ? ZodNullable<DeepPartial<Type>> : T extends ZodTuple<infer Items> ? {
|
|
1022
1054
|
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
1023
1055
|
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
1024
1056
|
}
|
|
@@ -1032,6 +1064,9 @@ declare type ZodRawShape = {
|
|
|
1032
1064
|
};
|
|
1033
1065
|
declare type ZodTypeAny = ZodType<any, any, any>;
|
|
1034
1066
|
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
1067
|
+
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
1068
|
+
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
1069
|
+
|
|
1035
1070
|
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
1036
1071
|
interface ZodTypeDef {
|
|
1037
1072
|
errorMap?: ZodErrorMap;
|
|
@@ -1071,18 +1106,18 @@ declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef
|
|
|
1071
1106
|
safeParse(data: unknown, params?: Partial<ParseParams>): SafeParseReturnType<Input, Output>;
|
|
1072
1107
|
parseAsync(data: unknown, params?: Partial<ParseParams>): Promise<Output>;
|
|
1073
1108
|
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
1074
|
-
/** Alias of safeParseAsync */
|
|
1075
1109
|
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
1076
1110
|
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, Input>;
|
|
1077
1111
|
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
1078
1112
|
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, Input>;
|
|
1079
1113
|
refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, Output, Input>;
|
|
1080
1114
|
_refinement(refinement: RefinementEffect<Output>["refinement"]): ZodEffects<this, Output, Input>;
|
|
1081
|
-
superRefine
|
|
1115
|
+
superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
|
|
1116
|
+
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
|
|
1082
1117
|
constructor(def: Def);
|
|
1083
1118
|
optional(): ZodOptional<this>;
|
|
1084
1119
|
nullable(): ZodNullable<this>;
|
|
1085
|
-
nullish(): ZodNullable<
|
|
1120
|
+
nullish(): ZodOptional<ZodNullable<this>>;
|
|
1086
1121
|
array(): ZodArray<this>;
|
|
1087
1122
|
promise(): ZodPromise<this>;
|
|
1088
1123
|
or<T extends ZodTypeAny>(option: T): ZodUnion<[this, T]>;
|
|
@@ -1090,11 +1125,18 @@ declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef
|
|
|
1090
1125
|
transform<NewOut>(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise<NewOut>): ZodEffects<this, NewOut>;
|
|
1091
1126
|
default(def: util.noUndefined<Input>): ZodDefault<this>;
|
|
1092
1127
|
default(def: () => util.noUndefined<Input>): ZodDefault<this>;
|
|
1093
|
-
brand<B extends string | number | symbol>(): ZodBranded<this, B>;
|
|
1128
|
+
brand<B extends string | number | symbol>(brand?: B): ZodBranded<this, B>;
|
|
1129
|
+
catch(def: Output): ZodCatch<this>;
|
|
1130
|
+
catch(def: (ctx: {
|
|
1131
|
+
error: ZodError;
|
|
1132
|
+
input: Input;
|
|
1133
|
+
}) => Output): ZodCatch<this>;
|
|
1094
1134
|
describe(description: string): this;
|
|
1135
|
+
pipe<T extends ZodTypeAny>(target: T): ZodPipeline<this, T>;
|
|
1095
1136
|
isOptional(): boolean;
|
|
1096
1137
|
isNullable(): boolean;
|
|
1097
1138
|
}
|
|
1139
|
+
declare type IpVersion = "v4" | "v6";
|
|
1098
1140
|
declare type ZodStringCheck = {
|
|
1099
1141
|
kind: "min";
|
|
1100
1142
|
value: number;
|
|
@@ -1103,18 +1145,36 @@ declare type ZodStringCheck = {
|
|
|
1103
1145
|
kind: "max";
|
|
1104
1146
|
value: number;
|
|
1105
1147
|
message?: string;
|
|
1148
|
+
} | {
|
|
1149
|
+
kind: "length";
|
|
1150
|
+
value: number;
|
|
1151
|
+
message?: string;
|
|
1106
1152
|
} | {
|
|
1107
1153
|
kind: "email";
|
|
1108
1154
|
message?: string;
|
|
1109
1155
|
} | {
|
|
1110
1156
|
kind: "url";
|
|
1111
1157
|
message?: string;
|
|
1158
|
+
} | {
|
|
1159
|
+
kind: "emoji";
|
|
1160
|
+
message?: string;
|
|
1112
1161
|
} | {
|
|
1113
1162
|
kind: "uuid";
|
|
1114
1163
|
message?: string;
|
|
1115
1164
|
} | {
|
|
1116
1165
|
kind: "cuid";
|
|
1117
1166
|
message?: string;
|
|
1167
|
+
} | {
|
|
1168
|
+
kind: "includes";
|
|
1169
|
+
value: string;
|
|
1170
|
+
position?: number;
|
|
1171
|
+
message?: string;
|
|
1172
|
+
} | {
|
|
1173
|
+
kind: "cuid2";
|
|
1174
|
+
message?: string;
|
|
1175
|
+
} | {
|
|
1176
|
+
kind: "ulid";
|
|
1177
|
+
message?: string;
|
|
1118
1178
|
} | {
|
|
1119
1179
|
kind: "startsWith";
|
|
1120
1180
|
value: string;
|
|
@@ -1130,42 +1190,80 @@ declare type ZodStringCheck = {
|
|
|
1130
1190
|
} | {
|
|
1131
1191
|
kind: "trim";
|
|
1132
1192
|
message?: string;
|
|
1193
|
+
} | {
|
|
1194
|
+
kind: "toLowerCase";
|
|
1195
|
+
message?: string;
|
|
1196
|
+
} | {
|
|
1197
|
+
kind: "toUpperCase";
|
|
1198
|
+
message?: string;
|
|
1199
|
+
} | {
|
|
1200
|
+
kind: "datetime";
|
|
1201
|
+
offset: boolean;
|
|
1202
|
+
precision: number | null;
|
|
1203
|
+
message?: string;
|
|
1204
|
+
} | {
|
|
1205
|
+
kind: "ip";
|
|
1206
|
+
version?: IpVersion;
|
|
1207
|
+
message?: string;
|
|
1133
1208
|
};
|
|
1134
1209
|
interface ZodStringDef extends ZodTypeDef {
|
|
1135
1210
|
checks: ZodStringCheck[];
|
|
1136
1211
|
typeName: ZodFirstPartyTypeKind.ZodString;
|
|
1212
|
+
coerce: boolean;
|
|
1137
1213
|
}
|
|
1138
1214
|
declare class ZodString extends ZodType<string, ZodStringDef> {
|
|
1139
1215
|
_parse(input: ParseInput): ParseReturnType<string>;
|
|
1140
|
-
protected _regex: (regex: RegExp, validation: StringValidation, message?:
|
|
1141
|
-
message?: string | undefined;
|
|
1142
|
-
} | undefined) => ZodEffects<this, string, string>;
|
|
1216
|
+
protected _regex: (regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage | undefined) => ZodEffects<this, string, string>;
|
|
1143
1217
|
_addCheck(check: ZodStringCheck): ZodString;
|
|
1144
1218
|
email(message?: errorUtil.ErrMessage): ZodString;
|
|
1145
1219
|
url(message?: errorUtil.ErrMessage): ZodString;
|
|
1220
|
+
emoji(message?: errorUtil.ErrMessage): ZodString;
|
|
1146
1221
|
uuid(message?: errorUtil.ErrMessage): ZodString;
|
|
1147
1222
|
cuid(message?: errorUtil.ErrMessage): ZodString;
|
|
1223
|
+
cuid2(message?: errorUtil.ErrMessage): ZodString;
|
|
1224
|
+
ulid(message?: errorUtil.ErrMessage): ZodString;
|
|
1225
|
+
ip(options?: string | {
|
|
1226
|
+
version?: "v4" | "v6";
|
|
1227
|
+
message?: string;
|
|
1228
|
+
}): ZodString;
|
|
1229
|
+
datetime(options?: string | {
|
|
1230
|
+
message?: string | undefined;
|
|
1231
|
+
precision?: number | null;
|
|
1232
|
+
offset?: boolean;
|
|
1233
|
+
}): ZodString;
|
|
1148
1234
|
regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
|
|
1235
|
+
includes(value: string, options?: {
|
|
1236
|
+
message?: string;
|
|
1237
|
+
position?: number;
|
|
1238
|
+
}): ZodString;
|
|
1149
1239
|
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
1150
1240
|
endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;
|
|
1151
1241
|
min(minLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1152
1242
|
max(maxLength: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1153
1243
|
length(len: number, message?: errorUtil.ErrMessage): ZodString;
|
|
1154
|
-
|
|
1155
|
-
* @deprecated Use z.string().min(1) instead.
|
|
1156
|
-
* @see {@link ZodString.min}
|
|
1157
|
-
*/
|
|
1158
|
-
nonempty: (message?: string | {
|
|
1159
|
-
message?: string | undefined;
|
|
1160
|
-
} | undefined) => ZodString;
|
|
1244
|
+
nonempty: (message?: errorUtil.ErrMessage | undefined) => ZodString;
|
|
1161
1245
|
trim: () => ZodString;
|
|
1246
|
+
toLowerCase: () => ZodString;
|
|
1247
|
+
toUpperCase: () => ZodString;
|
|
1248
|
+
get isDatetime(): boolean;
|
|
1162
1249
|
get isEmail(): boolean;
|
|
1163
1250
|
get isURL(): boolean;
|
|
1251
|
+
get isEmoji(): boolean;
|
|
1164
1252
|
get isUUID(): boolean;
|
|
1165
1253
|
get isCUID(): boolean;
|
|
1254
|
+
get isCUID2(): boolean;
|
|
1255
|
+
get isULID(): boolean;
|
|
1256
|
+
get isIP(): boolean;
|
|
1166
1257
|
get minLength(): number | null;
|
|
1167
1258
|
get maxLength(): number | null;
|
|
1168
|
-
static create: (params?:
|
|
1259
|
+
static create: (params?: ({
|
|
1260
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1261
|
+
invalid_type_error?: string | undefined;
|
|
1262
|
+
required_error?: string | undefined;
|
|
1263
|
+
description?: string | undefined;
|
|
1264
|
+
} & {
|
|
1265
|
+
coerce?: true | undefined;
|
|
1266
|
+
}) | undefined) => ZodString;
|
|
1169
1267
|
}
|
|
1170
1268
|
declare type ZodNumberCheck = {
|
|
1171
1269
|
kind: "min";
|
|
@@ -1184,23 +1282,30 @@ declare type ZodNumberCheck = {
|
|
|
1184
1282
|
kind: "multipleOf";
|
|
1185
1283
|
value: number;
|
|
1186
1284
|
message?: string;
|
|
1285
|
+
} | {
|
|
1286
|
+
kind: "finite";
|
|
1287
|
+
message?: string;
|
|
1187
1288
|
};
|
|
1188
1289
|
interface ZodNumberDef extends ZodTypeDef {
|
|
1189
1290
|
checks: ZodNumberCheck[];
|
|
1190
1291
|
typeName: ZodFirstPartyTypeKind.ZodNumber;
|
|
1292
|
+
coerce: boolean;
|
|
1191
1293
|
}
|
|
1192
1294
|
declare class ZodNumber extends ZodType<number, ZodNumberDef> {
|
|
1193
1295
|
_parse(input: ParseInput): ParseReturnType<number>;
|
|
1194
|
-
static create: (params?:
|
|
1296
|
+
static create: (params?: ({
|
|
1297
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1298
|
+
invalid_type_error?: string | undefined;
|
|
1299
|
+
required_error?: string | undefined;
|
|
1300
|
+
description?: string | undefined;
|
|
1301
|
+
} & {
|
|
1302
|
+
coerce?: boolean | undefined;
|
|
1303
|
+
}) | undefined) => ZodNumber;
|
|
1195
1304
|
gte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1196
|
-
min: (value: number, message?:
|
|
1197
|
-
message?: string | undefined;
|
|
1198
|
-
} | undefined) => ZodNumber;
|
|
1305
|
+
min: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
1199
1306
|
gt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1200
1307
|
lte(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1201
|
-
max: (value: number, message?:
|
|
1202
|
-
message?: string | undefined;
|
|
1203
|
-
} | undefined) => ZodNumber;
|
|
1308
|
+
max: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
1204
1309
|
lt(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1205
1310
|
protected setLimit(kind: "min" | "max", value: number, inclusive: boolean, message?: string): ZodNumber;
|
|
1206
1311
|
_addCheck(check: ZodNumberCheck): ZodNumber;
|
|
@@ -1210,19 +1315,28 @@ declare class ZodNumber extends ZodType<number, ZodNumberDef> {
|
|
|
1210
1315
|
nonpositive(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1211
1316
|
nonnegative(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1212
1317
|
multipleOf(value: number, message?: errorUtil.ErrMessage): ZodNumber;
|
|
1213
|
-
step: (value: number, message?:
|
|
1214
|
-
|
|
1215
|
-
|
|
1318
|
+
step: (value: number, message?: errorUtil.ErrMessage | undefined) => ZodNumber;
|
|
1319
|
+
finite(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1320
|
+
safe(message?: errorUtil.ErrMessage): ZodNumber;
|
|
1216
1321
|
get minValue(): number | null;
|
|
1217
1322
|
get maxValue(): number | null;
|
|
1218
1323
|
get isInt(): boolean;
|
|
1324
|
+
get isFinite(): boolean;
|
|
1219
1325
|
}
|
|
1220
1326
|
interface ZodBooleanDef extends ZodTypeDef {
|
|
1221
1327
|
typeName: ZodFirstPartyTypeKind.ZodBoolean;
|
|
1328
|
+
coerce: boolean;
|
|
1222
1329
|
}
|
|
1223
1330
|
declare class ZodBoolean extends ZodType<boolean, ZodBooleanDef> {
|
|
1224
1331
|
_parse(input: ParseInput): ParseReturnType<boolean>;
|
|
1225
|
-
static create: (params?:
|
|
1332
|
+
static create: (params?: ({
|
|
1333
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1334
|
+
invalid_type_error?: string | undefined;
|
|
1335
|
+
required_error?: string | undefined;
|
|
1336
|
+
description?: string | undefined;
|
|
1337
|
+
} & {
|
|
1338
|
+
coerce?: boolean | undefined;
|
|
1339
|
+
}) | undefined) => ZodBoolean;
|
|
1226
1340
|
}
|
|
1227
1341
|
interface ZodUnknownDef extends ZodTypeDef {
|
|
1228
1342
|
typeName: ZodFirstPartyTypeKind.ZodUnknown;
|
|
@@ -1242,6 +1356,10 @@ declare class ZodVoid extends ZodType<void, ZodVoidDef> {
|
|
|
1242
1356
|
interface ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1243
1357
|
type: T;
|
|
1244
1358
|
typeName: ZodFirstPartyTypeKind.ZodArray;
|
|
1359
|
+
exactLength: {
|
|
1360
|
+
value: number;
|
|
1361
|
+
message?: string;
|
|
1362
|
+
} | null;
|
|
1245
1363
|
minLength: {
|
|
1246
1364
|
value: number;
|
|
1247
1365
|
message?: string;
|
|
@@ -1262,31 +1380,6 @@ declare class ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinalit
|
|
|
1262
1380
|
nonempty(message?: errorUtil.ErrMessage): ZodArray<T, "atleastone">;
|
|
1263
1381
|
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodArray<T_1, "many">;
|
|
1264
1382
|
}
|
|
1265
|
-
declare namespace objectUtil {
|
|
1266
|
-
export type MergeShapes<U extends ZodRawShape, V extends ZodRawShape> = {
|
|
1267
|
-
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
1268
|
-
} & V;
|
|
1269
|
-
type optionalKeys<T extends object> = {
|
|
1270
|
-
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
1271
|
-
}[keyof T];
|
|
1272
|
-
type requiredKeys<T extends object> = {
|
|
1273
|
-
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
1274
|
-
}[keyof T];
|
|
1275
|
-
export type addQuestionMarks<T extends object> = Partial<Pick<T, optionalKeys<T>>> & Pick<T, requiredKeys<T>>;
|
|
1276
|
-
export type identity<T> = T;
|
|
1277
|
-
export type flatten<T extends object> = identity<{
|
|
1278
|
-
[k in keyof T]: T[k];
|
|
1279
|
-
}>;
|
|
1280
|
-
export type noNeverKeys<T extends ZodRawShape> = {
|
|
1281
|
-
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
1282
|
-
}[keyof T];
|
|
1283
|
-
export type noNever<T extends ZodRawShape> = identity<{
|
|
1284
|
-
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
1285
|
-
}>;
|
|
1286
|
-
export const mergeShapes: <U extends ZodRawShape, T extends ZodRawShape>(first: U, second: T) => T & U;
|
|
1287
|
-
export {};
|
|
1288
|
-
}
|
|
1289
|
-
declare type extendShape<A, B> = Omit<A, keyof B> & B;
|
|
1290
1383
|
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
1291
1384
|
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1292
1385
|
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
@@ -1294,20 +1387,25 @@ interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends
|
|
|
1294
1387
|
catchall: Catchall;
|
|
1295
1388
|
unknownKeys: UnknownKeys;
|
|
1296
1389
|
}
|
|
1297
|
-
declare type
|
|
1390
|
+
declare type objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectUtil.flatten<objectUtil.addQuestionMarks<baseObjectOutputType<Shape>>> & CatchallOutput<Catchall> & PassthroughType<UnknownKeys>;
|
|
1391
|
+
declare type baseObjectOutputType<Shape extends ZodRawShape> = {
|
|
1298
1392
|
[k in keyof Shape]: Shape[k]["_output"];
|
|
1299
|
-
}
|
|
1300
|
-
declare type
|
|
1301
|
-
|
|
1302
|
-
}>;
|
|
1303
|
-
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.flatten<objectUtil.addQuestionMarks<{
|
|
1393
|
+
};
|
|
1394
|
+
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny, UnknownKeys extends UnknownKeysParam = UnknownKeysParam> = objectUtil.flatten<baseObjectInputType<Shape>> & CatchallInput<Catchall> & PassthroughType<UnknownKeys>;
|
|
1395
|
+
declare type baseObjectInputType<Shape extends ZodRawShape> = objectUtil.addQuestionMarks<{
|
|
1304
1396
|
[k in keyof Shape]: Shape[k]["_input"];
|
|
1305
|
-
}>>;
|
|
1306
|
-
declare type objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = ZodTypeAny extends Catchall ? baseObjectInputType<Shape> : objectUtil.flatten<baseObjectInputType<Shape> & {
|
|
1307
|
-
[k: string]: Catchall["_input"];
|
|
1308
1397
|
}>;
|
|
1309
|
-
declare type
|
|
1310
|
-
|
|
1398
|
+
declare type CatchallOutput<T extends ZodTypeAny> = ZodTypeAny extends T ? unknown : {
|
|
1399
|
+
[k: string]: T["_output"];
|
|
1400
|
+
};
|
|
1401
|
+
declare type CatchallInput<T extends ZodTypeAny> = ZodTypeAny extends T ? unknown : {
|
|
1402
|
+
[k: string]: T["_input"];
|
|
1403
|
+
};
|
|
1404
|
+
declare type PassthroughType<T extends UnknownKeysParam> = T extends "passthrough" ? {
|
|
1405
|
+
[k: string]: unknown;
|
|
1406
|
+
} : unknown;
|
|
1407
|
+
declare type deoptional<T extends ZodTypeAny> = T extends ZodOptional<infer U> ? deoptional<U> : T extends ZodNullable<infer U> ? ZodNullable<deoptional<U>> : T;
|
|
1408
|
+
declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall, UnknownKeys>, Input = objectInputType<T, Catchall, UnknownKeys>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> {
|
|
1311
1409
|
private _cached;
|
|
1312
1410
|
_getCached(): {
|
|
1313
1411
|
shape: T;
|
|
@@ -1318,22 +1416,13 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
|
|
|
1318
1416
|
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>;
|
|
1319
1417
|
strip(): ZodObject<T, "strip", Catchall>;
|
|
1320
1418
|
passthrough(): ZodObject<T, "passthrough", Catchall>;
|
|
1321
|
-
/**
|
|
1322
|
-
* @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
|
|
1323
|
-
* If you want to pass through unknown properties, use `.passthrough()` instead.
|
|
1324
|
-
*/
|
|
1325
1419
|
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
|
|
1326
|
-
|
|
1327
|
-
|
|
1420
|
+
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;
|
|
1421
|
+
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, UnknownKeys, Catchall, objectOutputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>, objectInputType<{ [k in keyof (Omit<T, keyof Augmentation> & Augmentation)]: (Omit<T, keyof Augmentation> & Augmentation)[k]; }, Catchall, UnknownKeys>>;
|
|
1422
|
+
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
1328
1423
|
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & {
|
|
1329
1424
|
[k in Key]: Schema;
|
|
1330
1425
|
}, UnknownKeys, Catchall>;
|
|
1331
|
-
/**
|
|
1332
|
-
* Prior to zod@1.0.12 there was a bug in the
|
|
1333
|
-
* inferred type of merged objects. Please
|
|
1334
|
-
* upgrade if you are experiencing issues.
|
|
1335
|
-
*/
|
|
1336
|
-
merge<Incoming extends AnyZodObject>(merging: Incoming): ZodObject<extendShape<T, ReturnType<Incoming["_def"]["shape"]>>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
|
|
1337
1426
|
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>;
|
|
1338
1427
|
pick<Mask extends {
|
|
1339
1428
|
[k in keyof T]?: true;
|
|
@@ -1353,10 +1442,15 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
|
|
|
1353
1442
|
required(): ZodObject<{
|
|
1354
1443
|
[k in keyof T]: deoptional<T[k]>;
|
|
1355
1444
|
}, UnknownKeys, Catchall>;
|
|
1445
|
+
required<Mask extends {
|
|
1446
|
+
[k in keyof T]?: true;
|
|
1447
|
+
}>(mask: Mask): ZodObject<objectUtil.noNever<{
|
|
1448
|
+
[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k];
|
|
1449
|
+
}>, UnknownKeys, Catchall>;
|
|
1356
1450
|
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
|
|
1357
|
-
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]
|
|
1358
|
-
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]
|
|
1359
|
-
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]
|
|
1451
|
+
static create: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>[k_1]; }, { [k_2 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_2]; }>;
|
|
1452
|
+
static strictCreate: <T_1 extends ZodRawShape>(shape: T_1, params?: RawCreateParams) => ZodObject<T_1, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>[k_1]; }, { [k_2 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_2]; }>;
|
|
1453
|
+
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>]: objectUtil.addQuestionMarks<baseObjectOutputType<T_1>, { [k in keyof baseObjectOutputType<T_1>]: undefined extends baseObjectOutputType<T_1>[k] ? never : k; }[keyof T_1]>[k_1]; }, { [k_2 in keyof baseObjectInputType<T_1>]: baseObjectInputType<T_1>[k_2]; }>;
|
|
1360
1454
|
}
|
|
1361
1455
|
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
1362
1456
|
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
@@ -1418,7 +1512,7 @@ declare class ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTy
|
|
|
1418
1512
|
_parse(input: ParseInput): ParseReturnType<any>;
|
|
1419
1513
|
parameters(): Args;
|
|
1420
1514
|
returnType(): Returns;
|
|
1421
|
-
args<Items extends Parameters<typeof ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
1515
|
+
args<Items extends Parameters<(typeof ZodTuple)["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
1422
1516
|
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;
|
|
1423
1517
|
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
1424
1518
|
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;
|
|
@@ -1435,7 +1529,7 @@ interface ZodLiteralDef<T = any> extends ZodTypeDef {
|
|
|
1435
1529
|
declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>> {
|
|
1436
1530
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1437
1531
|
get value(): T;
|
|
1438
|
-
static create: <T_1 extends
|
|
1532
|
+
static create: <T_1 extends Primitive>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>;
|
|
1439
1533
|
}
|
|
1440
1534
|
declare type EnumValues = [string, ...string[]];
|
|
1441
1535
|
declare type Values<T extends EnumValues> = {
|
|
@@ -1448,6 +1542,8 @@ interface ZodEnumDef<T extends EnumValues = EnumValues> extends ZodTypeDef {
|
|
|
1448
1542
|
declare type Writeable<T> = {
|
|
1449
1543
|
-readonly [P in keyof T]: T[P];
|
|
1450
1544
|
};
|
|
1545
|
+
declare type FilterEnum<Values, ToExclude> = Values extends [] ? [] : Values extends [infer Head, ...infer Rest] ? Head extends ToExclude ? FilterEnum<Rest, ToExclude> : [Head, ...FilterEnum<Rest, ToExclude>] : never;
|
|
1546
|
+
declare type typecast<A, T> = A extends T ? A : never;
|
|
1451
1547
|
declare function createZodEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T, params?: RawCreateParams): ZodEnum<Writeable<T>>;
|
|
1452
1548
|
declare function createZodEnum<U extends string, T extends [U, ...U[]]>(values: T, params?: RawCreateParams): ZodEnum<T>;
|
|
1453
1549
|
declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number], ZodEnumDef<T>> {
|
|
@@ -1456,6 +1552,8 @@ declare class ZodEnum<T extends [string, ...string[]]> extends ZodType<T[number]
|
|
|
1456
1552
|
get enum(): Values<T>;
|
|
1457
1553
|
get Values(): Values<T>;
|
|
1458
1554
|
get Enum(): Values<T>;
|
|
1555
|
+
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract): ZodEnum<Writeable<ToExtract>>;
|
|
1556
|
+
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>;
|
|
1459
1557
|
static create: typeof createZodEnum;
|
|
1460
1558
|
}
|
|
1461
1559
|
interface ZodNativeEnumDef<T extends EnumLike = EnumLike> extends ZodTypeDef {
|
|
@@ -1476,6 +1574,7 @@ interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1476
1574
|
typeName: ZodFirstPartyTypeKind.ZodPromise;
|
|
1477
1575
|
}
|
|
1478
1576
|
declare class ZodPromise<T extends ZodTypeAny> extends ZodType<Promise<T["_output"]>, ZodPromiseDef<T>, Promise<T["_input"]>> {
|
|
1577
|
+
unwrap(): T;
|
|
1479
1578
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1480
1579
|
static create: <T_1 extends ZodTypeAny>(schema: T_1, params?: RawCreateParams) => ZodPromise<T_1>;
|
|
1481
1580
|
}
|
|
@@ -1497,10 +1596,11 @@ interface ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1497
1596
|
typeName: ZodFirstPartyTypeKind.ZodEffects;
|
|
1498
1597
|
effect: Effect<any>;
|
|
1499
1598
|
}
|
|
1500
|
-
declare class ZodEffects<T extends ZodTypeAny, Output = T
|
|
1599
|
+
declare class ZodEffects<T extends ZodTypeAny, Output = output<T>, Input = input<T>> extends ZodType<Output, ZodEffectsDef<T>, Input> {
|
|
1501
1600
|
innerType(): T;
|
|
1601
|
+
sourceType(): T;
|
|
1502
1602
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1503
|
-
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], I
|
|
1603
|
+
static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
|
|
1504
1604
|
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
|
|
1505
1605
|
}
|
|
1506
1606
|
|
|
@@ -1530,7 +1630,34 @@ interface ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
|
1530
1630
|
declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined> {
|
|
1531
1631
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1532
1632
|
removeDefault(): T;
|
|
1533
|
-
static create: <T_1 extends ZodTypeAny>(type: T_1, params
|
|
1633
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
1634
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1635
|
+
invalid_type_error?: string | undefined;
|
|
1636
|
+
required_error?: string | undefined;
|
|
1637
|
+
description?: string | undefined;
|
|
1638
|
+
} & {
|
|
1639
|
+
default: T_1["_input"] | (() => util.noUndefined<T_1["_input"]>);
|
|
1640
|
+
}) => ZodDefault<T_1>;
|
|
1641
|
+
}
|
|
1642
|
+
interface ZodCatchDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
1643
|
+
innerType: T;
|
|
1644
|
+
catchValue: (ctx: {
|
|
1645
|
+
error: ZodError;
|
|
1646
|
+
input: unknown;
|
|
1647
|
+
}) => T["_input"];
|
|
1648
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch;
|
|
1649
|
+
}
|
|
1650
|
+
declare class ZodCatch<T extends ZodTypeAny> extends ZodType<T["_output"], ZodCatchDef<T>, unknown> {
|
|
1651
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
1652
|
+
removeCatch(): T;
|
|
1653
|
+
static create: <T_1 extends ZodTypeAny>(type: T_1, params: {
|
|
1654
|
+
errorMap?: ZodErrorMap | undefined;
|
|
1655
|
+
invalid_type_error?: string | undefined;
|
|
1656
|
+
required_error?: string | undefined;
|
|
1657
|
+
description?: string | undefined;
|
|
1658
|
+
} & {
|
|
1659
|
+
catch: T_1["_output"] | (() => T_1["_output"]);
|
|
1660
|
+
}) => ZodCatch<T_1>;
|
|
1534
1661
|
}
|
|
1535
1662
|
interface ZodBrandedDef<T extends ZodTypeAny> extends ZodTypeDef {
|
|
1536
1663
|
type: T;
|
|
@@ -1542,10 +1669,19 @@ declare type BRAND<T extends string | number | symbol> = {
|
|
|
1542
1669
|
[k in T]: true;
|
|
1543
1670
|
};
|
|
1544
1671
|
};
|
|
1545
|
-
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]
|
|
1672
|
+
declare class ZodBranded<T extends ZodTypeAny, B extends string | number | symbol> extends ZodType<T["_output"] & BRAND<B>, ZodBrandedDef<T>, T["_input"]> {
|
|
1546
1673
|
_parse(input: ParseInput): ParseReturnType<any>;
|
|
1547
1674
|
unwrap(): T;
|
|
1548
1675
|
}
|
|
1676
|
+
interface ZodPipelineDef<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodTypeDef {
|
|
1677
|
+
in: A;
|
|
1678
|
+
out: B;
|
|
1679
|
+
typeName: ZodFirstPartyTypeKind.ZodPipeline;
|
|
1680
|
+
}
|
|
1681
|
+
declare class ZodPipeline<A extends ZodTypeAny, B extends ZodTypeAny> extends ZodType<B["_output"], ZodPipelineDef<A, B>, A["_input"]> {
|
|
1682
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
1683
|
+
static create<A extends ZodTypeAny, B extends ZodTypeAny>(a: A, b: B): ZodPipeline<A, B>;
|
|
1684
|
+
}
|
|
1549
1685
|
declare enum ZodFirstPartyTypeKind {
|
|
1550
1686
|
ZodString = "ZodString",
|
|
1551
1687
|
ZodNumber = "ZodNumber",
|
|
@@ -1553,6 +1689,7 @@ declare enum ZodFirstPartyTypeKind {
|
|
|
1553
1689
|
ZodBigInt = "ZodBigInt",
|
|
1554
1690
|
ZodBoolean = "ZodBoolean",
|
|
1555
1691
|
ZodDate = "ZodDate",
|
|
1692
|
+
ZodSymbol = "ZodSymbol",
|
|
1556
1693
|
ZodUndefined = "ZodUndefined",
|
|
1557
1694
|
ZodNull = "ZodNull",
|
|
1558
1695
|
ZodAny = "ZodAny",
|
|
@@ -1577,8 +1714,10 @@ declare enum ZodFirstPartyTypeKind {
|
|
|
1577
1714
|
ZodOptional = "ZodOptional",
|
|
1578
1715
|
ZodNullable = "ZodNullable",
|
|
1579
1716
|
ZodDefault = "ZodDefault",
|
|
1717
|
+
ZodCatch = "ZodCatch",
|
|
1580
1718
|
ZodPromise = "ZodPromise",
|
|
1581
|
-
ZodBranded = "ZodBranded"
|
|
1719
|
+
ZodBranded = "ZodBranded",
|
|
1720
|
+
ZodPipeline = "ZodPipeline"
|
|
1582
1721
|
}
|
|
1583
1722
|
|
|
1584
1723
|
declare const partialConfigSchema: ZodObject<{
|
|
@@ -1588,45 +1727,45 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1588
1727
|
name: ZodString;
|
|
1589
1728
|
value: ZodUnknown;
|
|
1590
1729
|
}, "strip", ZodTypeAny, {
|
|
1591
|
-
value?: unknown;
|
|
1592
1730
|
name: string;
|
|
1593
|
-
}, {
|
|
1594
1731
|
value?: unknown;
|
|
1732
|
+
}, {
|
|
1595
1733
|
name: string;
|
|
1734
|
+
value?: unknown;
|
|
1596
1735
|
}>, "many">>;
|
|
1597
1736
|
output: ZodArray<ZodObject<{
|
|
1598
1737
|
name: ZodString;
|
|
1599
1738
|
value: ZodUnknown;
|
|
1600
1739
|
}, "strip", ZodTypeAny, {
|
|
1601
|
-
value?: unknown;
|
|
1602
1740
|
name: string;
|
|
1603
|
-
}, {
|
|
1604
1741
|
value?: unknown;
|
|
1742
|
+
}, {
|
|
1605
1743
|
name: string;
|
|
1744
|
+
value?: unknown;
|
|
1606
1745
|
}>, "many">;
|
|
1607
1746
|
type: ZodNativeEnum<typeof CallbackType>;
|
|
1608
1747
|
}, "strip", ZodTypeAny, {
|
|
1609
|
-
input?: {
|
|
1610
|
-
value?: unknown;
|
|
1611
|
-
name: string;
|
|
1612
|
-
}[] | undefined;
|
|
1613
|
-
_id?: number | undefined;
|
|
1614
1748
|
type: CallbackType;
|
|
1615
1749
|
output: {
|
|
1616
|
-
value?: unknown;
|
|
1617
1750
|
name: string;
|
|
1751
|
+
value?: unknown;
|
|
1618
1752
|
}[];
|
|
1619
|
-
|
|
1753
|
+
_id?: number | undefined;
|
|
1620
1754
|
input?: {
|
|
1621
|
-
value?: unknown;
|
|
1622
1755
|
name: string;
|
|
1756
|
+
value?: unknown;
|
|
1623
1757
|
}[] | undefined;
|
|
1624
|
-
|
|
1758
|
+
}, {
|
|
1625
1759
|
type: CallbackType;
|
|
1626
1760
|
output: {
|
|
1627
|
-
value?: unknown;
|
|
1628
1761
|
name: string;
|
|
1762
|
+
value?: unknown;
|
|
1629
1763
|
}[];
|
|
1764
|
+
_id?: number | undefined;
|
|
1765
|
+
input?: {
|
|
1766
|
+
name: string;
|
|
1767
|
+
value?: unknown;
|
|
1768
|
+
}[] | undefined;
|
|
1630
1769
|
}>], ZodUnknown>, ZodType<FRCallback, ZodTypeDef, FRCallback>>>>;
|
|
1631
1770
|
clientId: ZodOptional<ZodOptional<ZodString>>;
|
|
1632
1771
|
middleware: ZodOptional<ZodOptional<ZodArray<ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>, "many">>>;
|
|
@@ -1662,6 +1801,8 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1662
1801
|
}>>;
|
|
1663
1802
|
timeout: ZodNumber;
|
|
1664
1803
|
}, "strip", ZodTypeAny, {
|
|
1804
|
+
timeout: number;
|
|
1805
|
+
baseUrl: string;
|
|
1665
1806
|
paths?: {
|
|
1666
1807
|
authenticate: string;
|
|
1667
1808
|
authorize: string;
|
|
@@ -1671,9 +1812,9 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1671
1812
|
revoke: string;
|
|
1672
1813
|
sessions: string;
|
|
1673
1814
|
} | undefined;
|
|
1815
|
+
}, {
|
|
1674
1816
|
timeout: number;
|
|
1675
1817
|
baseUrl: string;
|
|
1676
|
-
}, {
|
|
1677
1818
|
paths?: {
|
|
1678
1819
|
authenticate: string;
|
|
1679
1820
|
authorize: string;
|
|
@@ -1683,8 +1824,6 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1683
1824
|
revoke: string;
|
|
1684
1825
|
sessions: string;
|
|
1685
1826
|
} | undefined;
|
|
1686
|
-
timeout: number;
|
|
1687
|
-
baseUrl: string;
|
|
1688
1827
|
}>>;
|
|
1689
1828
|
support: ZodOptional<ZodOptional<ZodUnion<[ZodLiteral<"legacy">, ZodLiteral<"modern">]>>>;
|
|
1690
1829
|
tokenStore: ZodOptional<ZodOptional<ZodUnion<[ZodObject<{
|
|
@@ -1694,15 +1833,15 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1694
1833
|
refreshToken: ZodOptional<ZodString>;
|
|
1695
1834
|
tokenExpiry: ZodOptional<ZodNumber>;
|
|
1696
1835
|
}, "strip", ZodTypeAny, {
|
|
1836
|
+
accessToken: string;
|
|
1697
1837
|
idToken?: string | undefined;
|
|
1698
1838
|
refreshToken?: string | undefined;
|
|
1699
1839
|
tokenExpiry?: number | undefined;
|
|
1700
|
-
accessToken: string;
|
|
1701
1840
|
}, {
|
|
1841
|
+
accessToken: string;
|
|
1702
1842
|
idToken?: string | undefined;
|
|
1703
1843
|
refreshToken?: string | undefined;
|
|
1704
1844
|
tokenExpiry?: number | undefined;
|
|
1705
|
-
accessToken: string;
|
|
1706
1845
|
}>>>;
|
|
1707
1846
|
set: ZodFunction<ZodTuple<[ZodString], ZodUnknown>, ZodPromise<ZodVoid>>;
|
|
1708
1847
|
remove: ZodFunction<ZodTuple<[ZodString], ZodUnknown>, ZodPromise<ZodVoid>>;
|
|
@@ -1710,37 +1849,36 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1710
1849
|
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1711
1850
|
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1712
1851
|
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1852
|
+
accessToken: string;
|
|
1713
1853
|
idToken?: string | undefined;
|
|
1714
1854
|
refreshToken?: string | undefined;
|
|
1715
1855
|
tokenExpiry?: number | undefined;
|
|
1716
|
-
accessToken: string;
|
|
1717
1856
|
}>;
|
|
1718
1857
|
}, {
|
|
1719
1858
|
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1720
1859
|
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1721
1860
|
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1861
|
+
accessToken: string;
|
|
1722
1862
|
idToken?: string | undefined;
|
|
1723
1863
|
refreshToken?: string | undefined;
|
|
1724
1864
|
tokenExpiry?: number | undefined;
|
|
1725
|
-
accessToken: string;
|
|
1726
1865
|
}>;
|
|
1727
1866
|
}>, ZodLiteral<"indexedDB">, ZodLiteral<"sessionStorage">, ZodLiteral<"localStorage">]>>>;
|
|
1728
1867
|
tree: ZodOptional<ZodOptional<ZodString>>;
|
|
1729
1868
|
type: ZodOptional<ZodOptional<ZodString>>;
|
|
1730
1869
|
oauthThreshold: ZodOptional<ZodOptional<ZodNumber>>;
|
|
1731
1870
|
}, "strict", ZodTypeAny, {
|
|
1732
|
-
type?: string | undefined;
|
|
1733
1871
|
callbackFactory?: ((args_0: {
|
|
1734
|
-
input?: {
|
|
1735
|
-
value?: unknown;
|
|
1736
|
-
name: string;
|
|
1737
|
-
}[] | undefined;
|
|
1738
|
-
_id?: number | undefined;
|
|
1739
1872
|
type: CallbackType;
|
|
1740
1873
|
output: {
|
|
1741
|
-
value?: unknown;
|
|
1742
1874
|
name: string;
|
|
1875
|
+
value?: unknown;
|
|
1743
1876
|
}[];
|
|
1877
|
+
_id?: number | undefined;
|
|
1878
|
+
input?: {
|
|
1879
|
+
name: string;
|
|
1880
|
+
value?: unknown;
|
|
1881
|
+
}[] | undefined;
|
|
1744
1882
|
}, ...args_1: unknown[]) => FRCallback) | undefined;
|
|
1745
1883
|
clientId?: string | undefined;
|
|
1746
1884
|
middleware?: ((...args: unknown[]) => unknown)[] | undefined;
|
|
@@ -1748,6 +1886,8 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1748
1886
|
redirectUri?: string | undefined;
|
|
1749
1887
|
scope?: string | undefined;
|
|
1750
1888
|
serverConfig?: {
|
|
1889
|
+
timeout: number;
|
|
1890
|
+
baseUrl: string;
|
|
1751
1891
|
paths?: {
|
|
1752
1892
|
authenticate: string;
|
|
1753
1893
|
authorize: string;
|
|
@@ -1757,35 +1897,33 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1757
1897
|
revoke: string;
|
|
1758
1898
|
sessions: string;
|
|
1759
1899
|
} | undefined;
|
|
1760
|
-
timeout: number;
|
|
1761
|
-
baseUrl: string;
|
|
1762
1900
|
} | undefined;
|
|
1763
1901
|
support?: "modern" | "legacy" | undefined;
|
|
1764
1902
|
tokenStore?: "localStorage" | "indexedDB" | "sessionStorage" | {
|
|
1765
1903
|
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1766
1904
|
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1767
1905
|
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1906
|
+
accessToken: string;
|
|
1768
1907
|
idToken?: string | undefined;
|
|
1769
1908
|
refreshToken?: string | undefined;
|
|
1770
1909
|
tokenExpiry?: number | undefined;
|
|
1771
|
-
accessToken: string;
|
|
1772
1910
|
}>;
|
|
1773
1911
|
} | undefined;
|
|
1774
1912
|
tree?: string | undefined;
|
|
1913
|
+
type?: string | undefined;
|
|
1775
1914
|
oauthThreshold?: number | undefined;
|
|
1776
1915
|
}, {
|
|
1777
|
-
type?: string | undefined;
|
|
1778
1916
|
callbackFactory?: ((args_0: {
|
|
1779
|
-
input?: {
|
|
1780
|
-
value?: unknown;
|
|
1781
|
-
name: string;
|
|
1782
|
-
}[] | undefined;
|
|
1783
|
-
_id?: number | undefined;
|
|
1784
1917
|
type: CallbackType;
|
|
1785
1918
|
output: {
|
|
1786
|
-
value?: unknown;
|
|
1787
1919
|
name: string;
|
|
1920
|
+
value?: unknown;
|
|
1788
1921
|
}[];
|
|
1922
|
+
_id?: number | undefined;
|
|
1923
|
+
input?: {
|
|
1924
|
+
name: string;
|
|
1925
|
+
value?: unknown;
|
|
1926
|
+
}[] | undefined;
|
|
1789
1927
|
}, ...args_1: unknown[]) => FRCallback) | undefined;
|
|
1790
1928
|
clientId?: string | undefined;
|
|
1791
1929
|
middleware?: ((...args: unknown[]) => unknown)[] | undefined;
|
|
@@ -1793,6 +1931,8 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1793
1931
|
redirectUri?: string | undefined;
|
|
1794
1932
|
scope?: string | undefined;
|
|
1795
1933
|
serverConfig?: {
|
|
1934
|
+
timeout: number;
|
|
1935
|
+
baseUrl: string;
|
|
1796
1936
|
paths?: {
|
|
1797
1937
|
authenticate: string;
|
|
1798
1938
|
authorize: string;
|
|
@@ -1802,99 +1942,98 @@ declare const partialConfigSchema: ZodObject<{
|
|
|
1802
1942
|
revoke: string;
|
|
1803
1943
|
sessions: string;
|
|
1804
1944
|
} | undefined;
|
|
1805
|
-
timeout: number;
|
|
1806
|
-
baseUrl: string;
|
|
1807
1945
|
} | undefined;
|
|
1808
1946
|
support?: "modern" | "legacy" | undefined;
|
|
1809
1947
|
tokenStore?: "localStorage" | "indexedDB" | "sessionStorage" | {
|
|
1810
1948
|
set: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1811
1949
|
remove: (args_0: string, ...args_1: unknown[]) => Promise<void>;
|
|
1812
1950
|
get: (args_0: string, ...args_1: unknown[]) => Promise<{
|
|
1951
|
+
accessToken: string;
|
|
1813
1952
|
idToken?: string | undefined;
|
|
1814
1953
|
refreshToken?: string | undefined;
|
|
1815
1954
|
tokenExpiry?: number | undefined;
|
|
1816
|
-
accessToken: string;
|
|
1817
1955
|
}>;
|
|
1818
1956
|
} | undefined;
|
|
1819
1957
|
tree?: string | undefined;
|
|
1958
|
+
type?: string | undefined;
|
|
1820
1959
|
oauthThreshold?: number | undefined;
|
|
1821
1960
|
}>;
|
|
1822
1961
|
|
|
1823
1962
|
declare const journeyConfigSchema: ZodObject<{
|
|
1824
|
-
forgotPassword: ZodObject<{
|
|
1963
|
+
forgotPassword: ZodOptional<ZodObject<{
|
|
1825
1964
|
journey: ZodOptional<ZodString>;
|
|
1826
1965
|
match: ZodArray<ZodString, "many">;
|
|
1827
1966
|
}, "strip", ZodTypeAny, {
|
|
1828
|
-
journey?: string | undefined;
|
|
1829
1967
|
match: string[];
|
|
1830
|
-
}, {
|
|
1831
1968
|
journey?: string | undefined;
|
|
1969
|
+
}, {
|
|
1832
1970
|
match: string[];
|
|
1833
|
-
|
|
1834
|
-
|
|
1971
|
+
journey?: string | undefined;
|
|
1972
|
+
}>>;
|
|
1973
|
+
forgotUsername: ZodOptional<ZodObject<{
|
|
1835
1974
|
journey: ZodOptional<ZodString>;
|
|
1836
1975
|
match: ZodArray<ZodString, "many">;
|
|
1837
1976
|
}, "strip", ZodTypeAny, {
|
|
1838
|
-
journey?: string | undefined;
|
|
1839
1977
|
match: string[];
|
|
1840
|
-
}, {
|
|
1841
1978
|
journey?: string | undefined;
|
|
1979
|
+
}, {
|
|
1842
1980
|
match: string[];
|
|
1843
|
-
|
|
1844
|
-
|
|
1981
|
+
journey?: string | undefined;
|
|
1982
|
+
}>>;
|
|
1983
|
+
login: ZodOptional<ZodObject<{
|
|
1845
1984
|
journey: ZodOptional<ZodString>;
|
|
1846
1985
|
match: ZodArray<ZodString, "many">;
|
|
1847
1986
|
}, "strip", ZodTypeAny, {
|
|
1848
|
-
journey?: string | undefined;
|
|
1849
1987
|
match: string[];
|
|
1850
|
-
}, {
|
|
1851
1988
|
journey?: string | undefined;
|
|
1989
|
+
}, {
|
|
1852
1990
|
match: string[];
|
|
1853
|
-
|
|
1854
|
-
|
|
1991
|
+
journey?: string | undefined;
|
|
1992
|
+
}>>;
|
|
1993
|
+
register: ZodOptional<ZodObject<{
|
|
1855
1994
|
journey: ZodOptional<ZodString>;
|
|
1856
1995
|
match: ZodArray<ZodString, "many">;
|
|
1857
1996
|
}, "strip", ZodTypeAny, {
|
|
1858
|
-
journey?: string | undefined;
|
|
1859
1997
|
match: string[];
|
|
1860
|
-
}, {
|
|
1861
1998
|
journey?: string | undefined;
|
|
1999
|
+
}, {
|
|
1862
2000
|
match: string[];
|
|
1863
|
-
}>;
|
|
1864
|
-
}, "strip", ZodTypeAny, {
|
|
1865
|
-
forgotPassword: {
|
|
1866
2001
|
journey?: string | undefined;
|
|
2002
|
+
}>>;
|
|
2003
|
+
}, "strip", ZodTypeAny, {
|
|
2004
|
+
forgotPassword?: {
|
|
1867
2005
|
match: string[];
|
|
1868
|
-
};
|
|
1869
|
-
forgotUsername: {
|
|
1870
2006
|
journey?: string | undefined;
|
|
2007
|
+
} | undefined;
|
|
2008
|
+
forgotUsername?: {
|
|
1871
2009
|
match: string[];
|
|
1872
|
-
};
|
|
1873
|
-
login: {
|
|
1874
2010
|
journey?: string | undefined;
|
|
2011
|
+
} | undefined;
|
|
2012
|
+
login?: {
|
|
1875
2013
|
match: string[];
|
|
1876
|
-
};
|
|
1877
|
-
register: {
|
|
1878
2014
|
journey?: string | undefined;
|
|
2015
|
+
} | undefined;
|
|
2016
|
+
register?: {
|
|
1879
2017
|
match: string[];
|
|
1880
|
-
};
|
|
1881
|
-
}, {
|
|
1882
|
-
forgotPassword: {
|
|
1883
2018
|
journey?: string | undefined;
|
|
2019
|
+
} | undefined;
|
|
2020
|
+
}, {
|
|
2021
|
+
forgotPassword?: {
|
|
1884
2022
|
match: string[];
|
|
1885
|
-
};
|
|
1886
|
-
forgotUsername: {
|
|
1887
2023
|
journey?: string | undefined;
|
|
2024
|
+
} | undefined;
|
|
2025
|
+
forgotUsername?: {
|
|
1888
2026
|
match: string[];
|
|
1889
|
-
};
|
|
1890
|
-
login: {
|
|
1891
2027
|
journey?: string | undefined;
|
|
2028
|
+
} | undefined;
|
|
2029
|
+
login?: {
|
|
1892
2030
|
match: string[];
|
|
1893
|
-
};
|
|
1894
|
-
register: {
|
|
1895
2031
|
journey?: string | undefined;
|
|
2032
|
+
} | undefined;
|
|
2033
|
+
register?: {
|
|
1896
2034
|
match: string[];
|
|
1897
|
-
|
|
2035
|
+
journey?: string | undefined;
|
|
2036
|
+
} | undefined;
|
|
1898
2037
|
}>;
|
|
1899
2038
|
|
|
1900
2039
|
declare const partialLinksSchema: ZodObject<{
|
|
@@ -1975,8 +2114,6 @@ declare const partialStringsSchema: ZodObject<{
|
|
|
1975
2114
|
validatedCreateUsernameCallback: ZodOptional<ZodString>;
|
|
1976
2115
|
valueRequirements: ZodOptional<ZodString>;
|
|
1977
2116
|
}, "strict", ZodTypeAny, {
|
|
1978
|
-
loading?: string | undefined;
|
|
1979
|
-
termsAndConditions?: string | undefined;
|
|
1980
2117
|
alreadyHaveAnAccount?: string | undefined;
|
|
1981
2118
|
backToDefault?: string | undefined;
|
|
1982
2119
|
backToLogin?: string | undefined;
|
|
@@ -1999,6 +2136,7 @@ declare const partialStringsSchema: ZodObject<{
|
|
|
1999
2136
|
forgotUsername?: string | undefined;
|
|
2000
2137
|
givenName?: string | undefined;
|
|
2001
2138
|
inputRequiredError?: string | undefined;
|
|
2139
|
+
loading?: string | undefined;
|
|
2002
2140
|
loginButton?: string | undefined;
|
|
2003
2141
|
loginFailure?: string | undefined;
|
|
2004
2142
|
loginHeader?: string | undefined;
|
|
@@ -2031,6 +2169,7 @@ declare const partialStringsSchema: ZodObject<{
|
|
|
2031
2169
|
sn?: string | undefined;
|
|
2032
2170
|
submitButton?: string | undefined;
|
|
2033
2171
|
successMessage?: string | undefined;
|
|
2172
|
+
termsAndConditions?: string | undefined;
|
|
2034
2173
|
termsAndConditionsLinkText?: string | undefined;
|
|
2035
2174
|
tryAgain?: string | undefined;
|
|
2036
2175
|
twoFactorAuthentication?: string | undefined;
|
|
@@ -2044,8 +2183,6 @@ declare const partialStringsSchema: ZodObject<{
|
|
|
2044
2183
|
validatedCreateUsernameCallback?: string | undefined;
|
|
2045
2184
|
valueRequirements?: string | undefined;
|
|
2046
2185
|
}, {
|
|
2047
|
-
loading?: string | undefined;
|
|
2048
|
-
termsAndConditions?: string | undefined;
|
|
2049
2186
|
alreadyHaveAnAccount?: string | undefined;
|
|
2050
2187
|
backToDefault?: string | undefined;
|
|
2051
2188
|
backToLogin?: string | undefined;
|
|
@@ -2068,6 +2205,7 @@ declare const partialStringsSchema: ZodObject<{
|
|
|
2068
2205
|
forgotUsername?: string | undefined;
|
|
2069
2206
|
givenName?: string | undefined;
|
|
2070
2207
|
inputRequiredError?: string | undefined;
|
|
2208
|
+
loading?: string | undefined;
|
|
2071
2209
|
loginButton?: string | undefined;
|
|
2072
2210
|
loginFailure?: string | undefined;
|
|
2073
2211
|
loginHeader?: string | undefined;
|
|
@@ -2100,6 +2238,7 @@ declare const partialStringsSchema: ZodObject<{
|
|
|
2100
2238
|
sn?: string | undefined;
|
|
2101
2239
|
submitButton?: string | undefined;
|
|
2102
2240
|
successMessage?: string | undefined;
|
|
2241
|
+
termsAndConditions?: string | undefined;
|
|
2103
2242
|
termsAndConditionsLinkText?: string | undefined;
|
|
2104
2243
|
tryAgain?: string | undefined;
|
|
2105
2244
|
twoFactorAuthentication?: string | undefined;
|
|
@@ -2123,15 +2262,15 @@ declare const partialStyleSchema: ZodObject<{
|
|
|
2123
2262
|
light: ZodOptional<ZodString>;
|
|
2124
2263
|
width: ZodOptional<ZodNumber>;
|
|
2125
2264
|
}, "strict", ZodTypeAny, {
|
|
2126
|
-
height?: number | undefined;
|
|
2127
|
-
width?: number | undefined;
|
|
2128
2265
|
dark?: string | undefined;
|
|
2129
|
-
light?: string | undefined;
|
|
2130
|
-
}, {
|
|
2131
2266
|
height?: number | undefined;
|
|
2267
|
+
light?: string | undefined;
|
|
2132
2268
|
width?: number | undefined;
|
|
2269
|
+
}, {
|
|
2133
2270
|
dark?: string | undefined;
|
|
2271
|
+
height?: number | undefined;
|
|
2134
2272
|
light?: string | undefined;
|
|
2273
|
+
width?: number | undefined;
|
|
2135
2274
|
}>>>;
|
|
2136
2275
|
sections: ZodOptional<ZodOptional<ZodObject<{
|
|
2137
2276
|
header: ZodOptional<ZodBoolean>;
|
|
@@ -2148,13 +2287,13 @@ declare const partialStyleSchema: ZodObject<{
|
|
|
2148
2287
|
icon?: boolean | undefined;
|
|
2149
2288
|
}>>>;
|
|
2150
2289
|
}, "strict", ZodTypeAny, {
|
|
2151
|
-
labels?: "floating" | "stacked" | undefined;
|
|
2152
2290
|
checksAndRadios?: "standard" | "animated" | undefined;
|
|
2291
|
+
labels?: "floating" | "stacked" | undefined;
|
|
2153
2292
|
logo?: {
|
|
2154
|
-
height?: number | undefined;
|
|
2155
|
-
width?: number | undefined;
|
|
2156
2293
|
dark?: string | undefined;
|
|
2294
|
+
height?: number | undefined;
|
|
2157
2295
|
light?: string | undefined;
|
|
2296
|
+
width?: number | undefined;
|
|
2158
2297
|
} | undefined;
|
|
2159
2298
|
sections?: {
|
|
2160
2299
|
header?: boolean | undefined;
|
|
@@ -2163,13 +2302,13 @@ declare const partialStyleSchema: ZodObject<{
|
|
|
2163
2302
|
icon?: boolean | undefined;
|
|
2164
2303
|
} | undefined;
|
|
2165
2304
|
}, {
|
|
2166
|
-
labels?: "floating" | "stacked" | undefined;
|
|
2167
2305
|
checksAndRadios?: "standard" | "animated" | undefined;
|
|
2306
|
+
labels?: "floating" | "stacked" | undefined;
|
|
2168
2307
|
logo?: {
|
|
2169
|
-
height?: number | undefined;
|
|
2170
|
-
width?: number | undefined;
|
|
2171
2308
|
dark?: string | undefined;
|
|
2309
|
+
height?: number | undefined;
|
|
2172
2310
|
light?: string | undefined;
|
|
2311
|
+
width?: number | undefined;
|
|
2173
2312
|
} | undefined;
|
|
2174
2313
|
sections?: {
|
|
2175
2314
|
header?: boolean | undefined;
|
|
@@ -2183,13 +2322,17 @@ interface JourneyOptions {
|
|
|
2183
2322
|
oauth?: boolean;
|
|
2184
2323
|
user?: boolean;
|
|
2185
2324
|
}
|
|
2325
|
+
interface JourneyOptionsChange {
|
|
2326
|
+
forgerock?: StepOptions;
|
|
2327
|
+
journey: string;
|
|
2328
|
+
}
|
|
2186
2329
|
interface JourneyOptionsStart {
|
|
2187
|
-
|
|
2330
|
+
forgerock?: StepOptions;
|
|
2188
2331
|
journey?: string;
|
|
2189
2332
|
resumeUrl?: string;
|
|
2190
2333
|
}
|
|
2191
2334
|
interface WidgetConfigOptions {
|
|
2192
|
-
|
|
2335
|
+
forgerock?: TypeOf<typeof partialConfigSchema>;
|
|
2193
2336
|
content?: TypeOf<typeof partialStringsSchema>;
|
|
2194
2337
|
journeys?: TypeOf<typeof journeyConfigSchema>;
|
|
2195
2338
|
links?: TypeOf<typeof partialLinksSchema>;
|
|
@@ -2198,6 +2341,7 @@ interface WidgetConfigOptions {
|
|
|
2198
2341
|
|
|
2199
2342
|
|
|
2200
2343
|
interface ComponentStoreValue {
|
|
2344
|
+
lastAction: 'close' | 'open' | 'mount' | null;
|
|
2201
2345
|
error: {
|
|
2202
2346
|
code: string;
|
|
2203
2347
|
message: string;
|
|
@@ -2217,9 +2361,8 @@ declare const api: {
|
|
|
2217
2361
|
close: (args?: {
|
|
2218
2362
|
reason: "auto" | "external" | "user";
|
|
2219
2363
|
} | undefined) => void;
|
|
2220
|
-
mount: (component: SvelteComponentDev$1, element: HTMLDialogElement) => void;
|
|
2221
2364
|
open: () => void;
|
|
2222
|
-
subscribe: (this: void, run: Subscriber<ComponentStoreValue
|
|
2365
|
+
subscribe: (this: void, run: Subscriber<Pick<ComponentStoreValue, "reason" | "error" | "open" | "lastAction" | "mounted">>, invalidate?: ((value?: Pick<ComponentStoreValue, "reason" | "error" | "open" | "lastAction" | "mounted"> | undefined) => void) | undefined) => Unsubscriber;
|
|
2223
2366
|
};
|
|
2224
2367
|
configuration: (options?: WidgetConfigOptions | undefined) => {
|
|
2225
2368
|
set(setOptions?: WidgetConfigOptions | undefined): void;
|
|
@@ -2230,6 +2373,7 @@ declare const api: {
|
|
|
2230
2373
|
userStore: UserStore;
|
|
2231
2374
|
};
|
|
2232
2375
|
journey: (options?: JourneyOptions | undefined) => {
|
|
2376
|
+
change: (changeOptions: JourneyOptionsChange) => Promise<unknown>;
|
|
2233
2377
|
start: (startOptions?: JourneyOptionsStart | undefined) => Promise<unknown>;
|
|
2234
2378
|
subscribe: (this: void, run: Subscriber<{
|
|
2235
2379
|
journey: JourneyStoreValue;
|
|
@@ -2258,6 +2402,7 @@ declare const configuration: (options?: WidgetConfigOptions | undefined) => {
|
|
|
2258
2402
|
set(setOptions?: WidgetConfigOptions | undefined): void;
|
|
2259
2403
|
};
|
|
2260
2404
|
declare const journey: (options?: JourneyOptions | undefined) => {
|
|
2405
|
+
change: (changeOptions: JourneyOptionsChange) => Promise<unknown>;
|
|
2261
2406
|
start: (startOptions?: JourneyOptionsStart | undefined) => Promise<unknown>;
|
|
2262
2407
|
subscribe: (this: void, run: Subscriber<{
|
|
2263
2408
|
journey: JourneyStoreValue;
|
|
@@ -2273,9 +2418,8 @@ declare const component: () => {
|
|
|
2273
2418
|
close: (args?: {
|
|
2274
2419
|
reason: "auto" | "external" | "user";
|
|
2275
2420
|
} | undefined) => void;
|
|
2276
|
-
mount: (component: SvelteComponentDev$1, element: HTMLDialogElement) => void;
|
|
2277
2421
|
open: () => void;
|
|
2278
|
-
subscribe: (this: void, run: Subscriber<ComponentStoreValue
|
|
2422
|
+
subscribe: (this: void, run: Subscriber<Pick<ComponentStoreValue, "reason" | "error" | "open" | "lastAction" | "mounted">>, invalidate?: ((value?: Pick<ComponentStoreValue, "reason" | "error" | "open" | "lastAction" | "mounted"> | undefined) => void) | undefined) => Unsubscriber;
|
|
2279
2423
|
};
|
|
2280
2424
|
declare const request: typeof HttpClient.request;
|
|
2281
2425
|
declare const user: {
|
|
@@ -2293,7 +2437,6 @@ type ConfigurationApi = ReturnType<typeof api.configuration>;
|
|
|
2293
2437
|
type JourneyApi = ReturnType<typeof api.journey>;
|
|
2294
2438
|
type UserInfoApi = ReturnType<typeof api.user.info>;
|
|
2295
2439
|
type UserTokensApi = ReturnType<typeof api.user.tokens>;
|
|
2296
|
-
|
|
2297
2440
|
declare const __propDef: {
|
|
2298
2441
|
props: {
|
|
2299
2442
|
type?: "inline" | "modal" | undefined;
|