@tonysamperi/ts-mapi-core 2.0.0-beta.4 → 2.0.0-beta.6

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.
Files changed (30) hide show
  1. package/changelog.md +8 -1
  2. package/dist/cjs/firebase.cjs +1 -1
  3. package/dist/cjs/firebase.cjs.map +1 -1
  4. package/dist/cjs/firebase.d.cts +2 -1
  5. package/dist/cjs/index.cjs +1 -1
  6. package/dist/cjs/index.cjs.map +1 -1
  7. package/dist/cjs/index.d.cts +136 -144
  8. package/dist/cjs/rxjs.cjs +1 -1
  9. package/dist/cjs/rxjs.cjs.map +1 -1
  10. package/dist/cjs/rxjs.d.cts +4 -4
  11. package/dist/cjs/{smp-cached-value.interface-DoiEsQxI.d.cts → smp-cached-value.interface-BdPg-J7L.d.cts} +2 -2
  12. package/dist/cjs/smp-firebase-errors.enum-BlzgwNdc.d.cts +25 -0
  13. package/dist/cjs/{smp-generic-response-base.interface-D0jHrkjw.d.cts → smp-generic-response-base.interface-C0On2LBc.d.cts} +1 -1
  14. package/dist/cjs/zod.cjs +1 -1
  15. package/dist/cjs/zod.cjs.map +1 -1
  16. package/dist/cjs/zod.d.cts +9 -9
  17. package/dist/esm/firebase.d.ts +2 -1
  18. package/dist/esm/firebase.js +1 -1
  19. package/dist/esm/index.d.ts +136 -144
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/rxjs.d.ts +4 -4
  22. package/dist/esm/rxjs.js +1 -1
  23. package/dist/esm/{smp-cached-value.interface-DoiEsQxI.d.ts → smp-cached-value.interface-BdPg-J7L.d.ts} +2 -2
  24. package/dist/esm/smp-firebase-errors.enum-BlzgwNdc.d.ts +25 -0
  25. package/dist/esm/{smp-generic-response-base.interface-D0jHrkjw.d.ts → smp-generic-response-base.interface-C0On2LBc.d.ts} +1 -1
  26. package/dist/esm/zod.d.ts +9 -9
  27. package/dist/esm/zod.js +1 -1
  28. package/package.json +9 -4
  29. package/dist/cjs/smp-social-sign-in-ux-modes.enum-Cw9H3EqT.d.cts +0 -12
  30. package/dist/esm/smp-social-sign-in-ux-modes.enum-Cw9H3EqT.d.ts +0 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/zod.ts","../../src/shared/zod/smp-response-message.schema.ts","../../src/shared/api/smp-response-message-types.enum.ts","../../src/shared/zod/smp-generic-response.schema.ts","../../src/shared/zod/smp-zod-date-time.definition.ts"],"sourcesContent":["export * from \"./shared/zod/index.js\";\n","import {z, ZodTypeAny} from \"zod\";\n//\nimport {SmpResponseMessage} from \"../api/smp-response-message.class.js\";\nimport {SmpResponseMessageTypes} from \"../api/smp-response-message-types.enum.js\";\n\nexport const smpResponseMessageSchema = z.object({\n message: z.string(),\n type: z.nativeEnum(SmpResponseMessageTypes)\n} as Record<keyof SmpResponseMessage, ZodTypeAny>);\n","export enum SmpResponseMessageTypes {\n INFO = \"INFO\",\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\"\n}\n","import {z, ZodTypeAny} from \"zod\";\n//\nimport {SmpGenericResponseBase} from \"../api/smp-generic-response-base.interface.js\";\nimport {smpResponseMessageSchema} from \"./smp-response-message.schema.js\";\n\nexport const smpGenericResponseSchema = z.object({\n data: z.unknown().optional(),\n messages: z.array(smpResponseMessageSchema).optional()\n} as Record<keyof SmpGenericResponseBase, ZodTypeAny>);\n","import z, {ZodTypeDef, ZodIssueCode, ParseInput, ParseContext, ParseReturnType, ZodParsedType} from \"zod\";\nimport {DateTime} from \"ts-luxon\";\n\ninterface SmpZodDateTimeCheck {\n kind: \"min\" | \"max\" | \"between\";\n min?: DateTime;\n max?: DateTime;\n message?: string;\n}\n\ninterface SmpZodDateTimeDef extends ZodTypeDef {\n coerce: boolean;\n checks: SmpZodDateTimeCheck[];\n typeName: \"SmpZodDateTime\";\n}\n\nexport class SmpZodDateTime extends z.ZodType<DateTime, SmpZodDateTimeDef> {\n // Constructor and other methods (between, coerce, max, min, _coerceToDateTime) remain the same as your latest version or my previous suggestions.\n // For brevity, only _parse is shown fully modified here. Ensure other parts of the class are consistent.\n\n constructor(def?: Partial<SmpZodDateTimeDef>) {\n super({\n typeName: \"SmpZodDateTime\",\n coerce: def?.coerce ?? false,\n checks: def?.checks ?? []\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _parse(input: ParseInput): ParseReturnType<DateTime> {\n const ctx = this._getOrReturnCtx(input);\n let val = ctx.data;\n\n if (this._def.coerce) {\n val = this._coerceToDateTime(val); // Assuming _coerceToDateTime is implemented\n if (!(val instanceof DateTime) || !val.isValid) {\n z.addIssueToContext(ctx, { // Changed from ctx.addIssue\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date, // Using ZodParsedType.date\n received: ZodParsedType.unknown,\n path: ctx.path,\n message: \"Invalid date format\"\n });\n return z.INVALID;\n }\n }\n\n // Ensure val is a DateTime object before proceeding with checks if not coercing\n // or if coercion failed to produce a DateTime (though the above check should catch it)\n if (!(val instanceof DateTime) || !val.isValid) {\n // If not coercing, and it's not a valid DateTime, this is an invalid type.\n // This specific case might be implicitly handled if !this._def.coerce means val must already be DateTime.\n // However, adding an explicit check if not coercing can be safer.\n if (!this._def.coerce) {\n z.addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date, // Or a custom type name if you prefer\n received: ZodParsedType.unknown, // Or more specific if possible\n path: ctx.path,\n message: \"Input must be a valid DateTime object\"\n });\n return z.INVALID;\n }\n // If coercion was supposed to happen, and we still don't have a valid DateTime,\n // the earlier check inside the `if (this._def.coerce)` block should have caught it.\n }\n\n\n const checkMap: Record<SmpZodDateTimeCheck[\"kind\"], (check: SmpZodDateTimeCheck, dateTimeVal: DateTime, parseCtx: ParseContext) => z.ZodIssue | undefined> = {\n min: (check, dateTimeVal, parseCtx) => {\n if (check.min && dateTimeVal < check.min) {\n return {\n code: ZodIssueCode.too_small,\n minimum: check.min.toMillis(), // Changed to number (milliseconds)\n type: \"date\", // Added type\n inclusive: true,\n message: check.message ?? `Date must be ≥ ${check.min.toISODate()}`,\n path: parseCtx.path\n };\n }\n return undefined;\n },\n max: (check, dateTimeVal, parseCtx) => {\n if (check.max && dateTimeVal > check.max) {\n return {\n code: ZodIssueCode.too_big,\n maximum: check.max.toMillis(), // Changed to number (milliseconds)\n type: \"date\", // Added type\n inclusive: true, // Added inclusive\n message: check.message ?? `Date must be ≤ ${check.max.toISODate()}`,\n path: parseCtx.path\n };\n }\n return undefined;\n },\n between: (check, dateTimeVal, parseCtx) => {\n if (check.min && check.max && (dateTimeVal < check.min || dateTimeVal > check.max)) {\n return {\n code: ZodIssueCode.custom,\n message: check.message ?? `Date must be between ${check.min.toISODate()} and ${check.max.toISODate()}`,\n path: parseCtx.path\n // Optionally, add params for more structured error data:\n // params: { min: check.min.toISO(), max: check.max.toISO() }\n };\n }\n return undefined;\n }\n };\n\n for (const check of this._def.checks) {\n // Ensure val is a DateTime before passing to checkMap functions\n // This is crucial if coercion didn't happen or didn't result in a DateTime.\n // The earlier checks should ideally ensure 'val' is a valid DateTime if it reached this point.\n if (val instanceof DateTime && val.isValid) {\n const issueData = checkMap[check.kind](check, val, ctx);\n if (issueData) {\n z.addIssueToContext(ctx, issueData); // Changed from ctx.addIssue\n }\n }\n else {\n // This case should ideally be caught earlier (e.g., if not coercing, or if coercion failed)\n // If it reaches here, it implies a logic flaw or an unexpected state.\n // For robustness, you might add a generic invalid_type issue here if 'val' is not a DateTime.\n // However, the checks at the beginning of _parse should prevent this.\n }\n }\n\n if (ctx.common.issues.length > 0) { // Check ctx.common.issues.length\n return z.INVALID;\n }\n\n return z.OK(val as DateTime); // Ensure the 'val' returned by OK is typed as DateTime\n }\n\n between(min: DateTime, max: DateTime, message?: string): this {\n return new SmpZodDateTime({\n ...this._def,\n checks: [...this._def.checks, {kind: \"between\", min: min.toUTC(), max: max.toUTC(), message}]\n }) as this;\n }\n\n coerce(): this {\n return new SmpZodDateTime({\n ...this._def,\n coerce: true\n }) as this;\n }\n\n max(max: DateTime, message?: string): this {\n return new SmpZodDateTime({\n ...this._def,\n checks: [...this._def.checks, {kind: \"max\", max: max.toUTC(), message}]\n }) as this;\n }\n\n min(min: DateTime, message?: string): this {\n return new SmpZodDateTime({\n ...this._def,\n checks: [...this._def.checks, {kind: \"min\", min: min.toUTC(), message}]\n }) as this;\n }\n\n // Coercion helper function (ensure it's robust as discussed previously)\n private _coerceToDateTime(val: any): DateTime | null {\n if (val instanceof DateTime && val.isValid) {\n return val; // Already valid DateTime\n }\n\n const coercionMap: Record<string, () => DateTime | null> = {\n string: () => DateTime.fromJSDate(new Date(val)),\n number: () => DateTime.fromMillis(val),\n object: () => DateTime.fromJSDate(val),\n default: () => null\n };\n\n return (coercionMap[typeof val] || coercionMap.default)();\n }\n}\n\nexport const smpZodDateTime = (opts: { coerce?: boolean } = {}) => {\n return new SmpZodDateTime({\n coerce: opts.coerce ?? false,\n checks: []\n });\n};\n"],"mappings":"6mBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,6BAAAC,EAAA,6BAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAN,GCAA,IAAAO,EAA4B,eCArB,IAAKC,GAAAA,SAAAA,EAAAA,8EAAAA,QDKL,IAAMC,EAA2BC,IAAEC,OAAO,CAC7CC,QAASF,IAAEG,OAAM,EACjBC,KAAMJ,IAAEK,WAAWC,CAAAA,CACvB,CAAA,EERA,IAAAC,EAA4B,eAKrB,IAAMC,EAA2BC,IAAEC,OAAO,CAC7CC,KAAMF,IAAEG,QAAO,EAAGC,SAAQ,EAC1BC,SAAUL,IAAEM,MAAMC,CAAAA,EAA0BH,SAAQ,CACxD,CAAA,ECRA,IAAAI,EAAoG,oBACpGC,EAAuB,oBAehB,IAAMC,EAAN,MAAMA,UAAuBC,EAAAA,QAAEC,OAAO,CAhB7C,MAgB6C,CAAAC,EAAA,uBAIzC,YAAYC,EAAkC,CAC1C,MAAM,CACFC,SAAU,iBACVC,OAAQF,GAAKE,QAAU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AwB,CACvC,OAAO,IAAI5B,EAAe,CACtB,GAAG,KAAKc,KACRP,OAAQ,IAAI,KAAKO,KAAKP,OAAQ,CAACwC,KAAM,MAAOhB,IAAKA,EAAIqB,MAAK,EAAIxB,QAAAA,CAAO,EACzE,CAAA,CACJ,CAGQb,kBAAkBH,EAA2B,CACjD,GAAIA,aAAeI,YAAYJ,EAAIK,QAC/B,OAAOL,EAGX,IAAMyC,EAAqD,CACvDC,OAAQnD,EAAA,IAAMa,WAASuC,WAAW,IAAIC,KAAK5C,CAAAA,CAAAA,EAAnC,UACR6C,OAAQtD,EAAA,IAAMa,WAAS0C,WAAW9C,CAAAA,EAA1B,UACR+C,OAAQxD,EAAA,IAAMa,WAASuC,WAAW3C,CAAAA,EAA1B,UACRgD,QAASzD,EAAA,IAAM,KAAN,UACb,EAEA,OAAQkD,EAAY,OAAOzC,CAAAA,GAAQyC,EAAYO,SAAM,CACzD,CACJ,EAEaC,EAAiB1D,EAAA,CAAC2D,EAA6B,CAAC,IAClD,IAAI9D,EAAe,CACtBM,OAAQwD,EAAKxD,QAAU,GACvBC,OAAQ,CAAA,CACZ,CAAA,EAJ0B","names":["zod_exports","__export","SmpZodDateTime","smpGenericResponseSchema","smpResponseMessageSchema","smpZodDateTime","__toCommonJS","import_zod","SmpResponseMessageTypes","smpResponseMessageSchema","z","object","message","string","type","nativeEnum","SmpResponseMessageTypes","import_zod","smpGenericResponseSchema","z","object","data","unknown","optional","messages","array","smpResponseMessageSchema","import_zod","import_ts_luxon","SmpZodDateTime","z","ZodType","__name","def","typeName","coerce","checks","_parse","input","ctx","_getOrReturnCtx","val","data","_def","_coerceToDateTime","DateTime","isValid","addIssueToContext","code","ZodIssueCode","invalid_type","expected","ZodParsedType","date","received","unknown","path","message","INVALID","checkMap","min","check","dateTimeVal","parseCtx","too_small","minimum","toMillis","type","inclusive","toISODate","max","too_big","maximum","between","custom","issueData","kind","common","issues","length","OK","toUTC","coercionMap","string","fromJSDate","Date","number","fromMillis","object","default","smpZodDateTime","opts"]}
1
+ {"version":3,"sources":["../../src/zod.ts","../../src/shared/zod/smp-generic-response.schema.ts","../../src/shared/zod/smp-response-message.schema.ts","../../src/shared/api/smp-response-message-types.enum.ts","../../src/shared/zod/smp-zod-date-time.definition.ts"],"sourcesContent":["export * from \"./shared/zod/index.js\";\n","import {z, ZodTypeAny} from \"zod\";\n//\nimport {SmpGenericResponseBase} from \"../api/smp-generic-response-base.interface.js\";\nimport {smpResponseMessageSchema} from \"./smp-response-message.schema.js\";\n\nexport const smpGenericResponseSchema = z.object({\n data: z.unknown().optional(),\n messages: z.array(smpResponseMessageSchema).optional()\n} as Record<keyof SmpGenericResponseBase, ZodTypeAny>);\n","import {z, ZodTypeAny} from \"zod\";\n//\nimport {SmpResponseMessage} from \"../api/smp-response-message.class.js\";\nimport {SmpResponseMessageTypes} from \"../api/smp-response-message-types.enum.js\";\n\nexport const smpResponseMessageSchema = z.object({\n message: z.string(),\n type: z.nativeEnum(SmpResponseMessageTypes)\n} as Record<keyof SmpResponseMessage, ZodTypeAny>);\n","export enum SmpResponseMessageTypes {\n INFO = \"INFO\",\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\"\n}\n","import z, {ZodTypeDef, ZodIssueCode, ParseInput, ParseContext, ParseReturnType, ZodParsedType} from \"zod\";\nimport {DateTime} from \"ts-luxon\";\n\ninterface SmpZodDateTimeCheck {\n kind: \"min\" | \"max\" | \"between\";\n min?: DateTime;\n max?: DateTime;\n message?: string;\n}\n\ninterface SmpZodDateTimeDef extends ZodTypeDef {\n coerce: boolean;\n checks: SmpZodDateTimeCheck[];\n typeName: \"SmpZodDateTime\";\n}\n\nexport class SmpZodDateTime extends z.ZodType<DateTime, SmpZodDateTimeDef> {\n // Constructor and other methods (between, coerce, max, min, _coerceToDateTime) remain the same as your latest version or my previous suggestions.\n // For brevity, only _parse is shown fully modified here. Ensure other parts of the class are consistent.\n\n constructor(def?: Partial<SmpZodDateTimeDef>) {\n super({\n typeName: \"SmpZodDateTime\",\n coerce: def?.coerce ?? false,\n checks: def?.checks ?? []\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n _parse(input: ParseInput): ParseReturnType<DateTime> {\n const ctx = this._getOrReturnCtx(input);\n let val = ctx.data;\n\n if (this._def.coerce) {\n val = this._coerceToDateTime(val); // Assuming _coerceToDateTime is implemented\n if (!(val instanceof DateTime) || !val.isValid) {\n z.addIssueToContext(ctx, { // Changed from ctx.addIssue\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date, // Using ZodParsedType.date\n received: ZodParsedType.unknown,\n path: ctx.path,\n message: \"Invalid date format\"\n });\n return z.INVALID;\n }\n }\n\n // Ensure val is a DateTime object before proceeding with checks if not coercing\n // or if coercion failed to produce a DateTime (though the above check should catch it)\n if (!(val instanceof DateTime) || !val.isValid) {\n // If not coercing, and it's not a valid DateTime, this is an invalid type.\n // This specific case might be implicitly handled if !this._def.coerce means val must already be DateTime.\n // However, adding an explicit check if not coercing can be safer.\n if (!this._def.coerce) {\n z.addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date, // Or a custom type name if you prefer\n received: ZodParsedType.unknown, // Or more specific if possible\n path: ctx.path,\n message: \"Input must be a valid DateTime object\"\n });\n return z.INVALID;\n }\n // If coercion was supposed to happen, and we still don't have a valid DateTime,\n // the earlier check inside the `if (this._def.coerce)` block should have caught it.\n }\n\n\n const checkMap: Record<SmpZodDateTimeCheck[\"kind\"], (check: SmpZodDateTimeCheck, dateTimeVal: DateTime, parseCtx: ParseContext) => z.ZodIssue | undefined> = {\n min: (check, dateTimeVal, parseCtx) => {\n if (check.min && dateTimeVal < check.min) {\n return {\n code: ZodIssueCode.too_small,\n minimum: check.min.toMillis(), // Changed to number (milliseconds)\n type: \"date\", // Added type\n inclusive: true,\n message: check.message ?? `Date must be ≥ ${check.min.toISODate()}`,\n path: parseCtx.path\n };\n }\n return undefined;\n },\n max: (check, dateTimeVal, parseCtx) => {\n if (check.max && dateTimeVal > check.max) {\n return {\n code: ZodIssueCode.too_big,\n maximum: check.max.toMillis(), // Changed to number (milliseconds)\n type: \"date\", // Added type\n inclusive: true, // Added inclusive\n message: check.message ?? `Date must be ≤ ${check.max.toISODate()}`,\n path: parseCtx.path\n };\n }\n return undefined;\n },\n between: (check, dateTimeVal, parseCtx) => {\n if (check.min && check.max && (dateTimeVal < check.min || dateTimeVal > check.max)) {\n return {\n code: ZodIssueCode.custom,\n message: check.message ?? `Date must be between ${check.min.toISODate()} and ${check.max.toISODate()}`,\n path: parseCtx.path\n // Optionally, add params for more structured error data:\n // params: { min: check.min.toISO(), max: check.max.toISO() }\n };\n }\n return undefined;\n }\n };\n\n for (const check of this._def.checks) {\n // Ensure val is a DateTime before passing to checkMap functions\n // This is crucial if coercion didn't happen or didn't result in a DateTime.\n // The earlier checks should ideally ensure 'val' is a valid DateTime if it reached this point.\n if (val instanceof DateTime && val.isValid) {\n const issueData = checkMap[check.kind](check, val, ctx);\n if (issueData) {\n z.addIssueToContext(ctx, issueData); // Changed from ctx.addIssue\n }\n }\n else {\n // This case should ideally be caught earlier (e.g., if not coercing, or if coercion failed)\n // If it reaches here, it implies a logic flaw or an unexpected state.\n // For robustness, you might add a generic invalid_type issue here if 'val' is not a DateTime.\n // However, the checks at the beginning of _parse should prevent this.\n }\n }\n\n if (ctx.common.issues.length > 0) { // Check ctx.common.issues.length\n return z.INVALID;\n }\n\n return z.OK(val as DateTime); // Ensure the 'val' returned by OK is typed as DateTime\n }\n\n between(min: DateTime, max: DateTime, message?: string): this {\n return new SmpZodDateTime({\n ...this._def,\n checks: [...this._def.checks, {kind: \"between\", min: min.toUTC(), max: max.toUTC(), message}]\n }) as this;\n }\n\n coerce(): this {\n return new SmpZodDateTime({\n ...this._def,\n coerce: true\n }) as this;\n }\n\n max(max: DateTime, message?: string): this {\n return new SmpZodDateTime({\n ...this._def,\n checks: [...this._def.checks, {kind: \"max\", max: max.toUTC(), message}]\n }) as this;\n }\n\n min(min: DateTime, message?: string): this {\n return new SmpZodDateTime({\n ...this._def,\n checks: [...this._def.checks, {kind: \"min\", min: min.toUTC(), message}]\n }) as this;\n }\n\n // Coercion helper function (ensure it's robust as discussed previously)\n private _coerceToDateTime(val: any): DateTime | null {\n if (val instanceof DateTime && val.isValid) {\n return val; // Already valid DateTime\n }\n\n const coercionMap: Record<string, () => DateTime | null> = {\n string: () => DateTime.fromJSDate(new Date(val)),\n number: () => DateTime.fromMillis(val),\n object: () => DateTime.fromJSDate(val),\n default: () => null\n };\n\n return (coercionMap[typeof val] || coercionMap.default)();\n }\n}\n\nexport const smpZodDateTime = (opts: { coerce?: boolean } = {}) => {\n return new SmpZodDateTime({\n coerce: opts.coerce ?? false,\n checks: []\n });\n};\n"],"mappings":"6mBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,6BAAAC,EAAA,6BAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAN,GCAA,IAAAO,EAA4B,eCA5B,IAAAC,EAA4B,eCArB,IAAKC,GAAAA,SAAAA,EAAAA,8EAAAA,QDKL,IAAMC,EAA2BC,IAAEC,OAAO,CAC7CC,QAASF,IAAEG,OAAM,EACjBC,KAAMJ,IAAEK,WAAWC,CAAAA,CACvB,CAAA,EDHO,IAAMC,EAA2BC,IAAEC,OAAO,CAC7CC,KAAMF,IAAEG,QAAO,EAAGC,SAAQ,EAC1BC,SAAUL,IAAEM,MAAMC,CAAAA,EAA0BH,SAAQ,CACxD,CAAA,EGRA,IAAAI,EAAoG,oBACpGC,EAAuB,oBAehB,IAAMC,EAAN,MAAMA,UAAuBC,EAAAA,QAAEC,OAAO,CAhB7C,MAgB6C,CAAAC,EAAA,uBAIzC,YAAYC,EAAkC,CAC1C,MAAM,CACFC,SAAU,iBACVC,OAAQF,GAAKE,QAAU,GACvBC,OAAQH,GAAKG,QAAU,CAAA,CAC3B,CAAA,CACJ,CAGAC,OAAOC,EAA8C,CACjD,IAAMC,EAAM,K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C,KAAM,MAAOhB,IAAKA,EAAIqB,MAAK,EAAIxB,QAAAA,CAAO,EACzE,CAAA,CACJ,CAGQb,kBAAkBH,EAA2B,CACjD,GAAIA,aAAeI,YAAYJ,EAAIK,QAC/B,OAAOL,EAGX,IAAMyC,EAAqD,CACvDC,OAAQnD,EAAA,IAAMa,WAASuC,WAAW,IAAIC,KAAK5C,CAAAA,CAAAA,EAAnC,UACR6C,OAAQtD,EAAA,IAAMa,WAAS0C,WAAW9C,CAAAA,EAA1B,UACR+C,OAAQxD,EAAA,IAAMa,WAASuC,WAAW3C,CAAAA,EAA1B,UACRgD,QAASzD,EAAA,IAAM,KAAN,UACb,EAEA,OAAQkD,EAAY,OAAOzC,CAAAA,GAAQyC,EAAYO,SAAM,CACzD,CACJ,EAEaC,EAAiB1D,EAAA,CAAC2D,EAA6B,CAAC,IAClD,IAAI9D,EAAe,CACtBM,OAAQwD,EAAKxD,QAAU,GACvBC,OAAQ,CAAA,CACZ,CAAA,EAJ0B","names":["zod_exports","__export","SmpZodDateTime","smpGenericResponseSchema","smpResponseMessageSchema","smpZodDateTime","__toCommonJS","import_zod","import_zod","SmpResponseMessageTypes","smpResponseMessageSchema","z","object","message","string","type","nativeEnum","SmpResponseMessageTypes","smpGenericResponseSchema","z","object","data","unknown","optional","messages","array","smpResponseMessageSchema","import_zod","import_ts_luxon","SmpZodDateTime","z","ZodType","__name","def","typeName","coerce","checks","_parse","input","ctx","_getOrReturnCtx","val","data","_def","_coerceToDateTime","DateTime","isValid","addIssueToContext","code","ZodIssueCode","invalid_type","expected","ZodParsedType","date","received","unknown","path","message","INVALID","checkMap","min","check","dateTimeVal","parseCtx","too_small","minimum","toMillis","type","inclusive","toISODate","max","too_big","maximum","between","custom","issueData","kind","common","issues","length","OK","toUTC","coercionMap","string","fromJSDate","Date","number","fromMillis","object","default","smpZodDateTime","opts"]}
@@ -1,15 +1,7 @@
1
1
  import z$1, { z, ZodTypeDef, ParseInput, ParseReturnType } from 'zod';
2
- import { S as SmpResponseMessage, a as SmpGenericResponseBase } from './smp-generic-response-base.interface-D0jHrkjw.cjs';
2
+ import { b as SmpGenericResponseBase, S as SmpResponseMessage } from './smp-generic-response-base.interface-C0On2LBc.cjs';
3
3
  import { DateTime } from 'ts-luxon';
4
4
 
5
- declare const smpResponseMessageSchema: z.ZodObject<Record<keyof SmpResponseMessage, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
6
- message?: any;
7
- type?: any;
8
- }, {
9
- message?: any;
10
- type?: any;
11
- }>;
12
-
13
5
  declare const smpGenericResponseSchema: z.ZodObject<Record<keyof SmpGenericResponseBase<any>, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
14
6
  messages?: any;
15
7
  data?: any;
@@ -18,6 +10,14 @@ declare const smpGenericResponseSchema: z.ZodObject<Record<keyof SmpGenericRespo
18
10
  data?: any;
19
11
  }>;
20
12
 
13
+ declare const smpResponseMessageSchema: z.ZodObject<Record<keyof SmpResponseMessage, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
14
+ message?: any;
15
+ type?: any;
16
+ }, {
17
+ message?: any;
18
+ type?: any;
19
+ }>;
20
+
21
21
  interface SmpZodDateTimeCheck {
22
22
  kind: "min" | "max" | "between";
23
23
  min?: DateTime;
@@ -1,7 +1,8 @@
1
1
  import { SmpLoggerMethods } from '@tonysamperi/logger';
2
2
  import { FirebaseOptions, FirebaseApp } from 'firebase/app';
3
3
  import { User, Auth, AuthProvider, ActionCodeInfo, UserCredential, IdTokenResult } from 'firebase/auth';
4
- import { S as SmpSocialSignInKeys, a as SmpSocialSignInUxModes } from './smp-social-sign-in-ux-modes.enum-Cw9H3EqT.js';
4
+ import { S as SmpSocialSignInKeys, a as SmpSocialSignInUxModes } from './smp-firebase-errors.enum-BlzgwNdc.js';
5
+ export { b as SmpFirebaseErrors } from './smp-firebase-errors.enum-BlzgwNdc.js';
5
6
 
6
7
  interface SmpFirebaseServiceConfig {
7
8
  enabledSocials?: SmpSocialSignInKeys[];
@@ -1 +1 @@
1
- import{a as s,b as o,c as n}from"./chunk-DIVAYUSN.js";import{a}from"./chunk-EI7MMDWY.js";import{SmpLoggerMethods as c}from"@tonysamperi/logger";import{getApps as l,initializeApp as g}from"firebase/app";import{browserLocalPersistence as u,browserSessionPersistence as p,EmailAuthProvider as _,FacebookAuthProvider as m,GoogleAuthProvider as f,OAuthProvider as P,checkActionCode as U,confirmPasswordReset as E,fetchSignInMethodsForEmail as b,getAuth as S,getRedirectResult as w,reauthenticateWithCredential as I,sendEmailVerification as F,sendPasswordResetEmail as v,setPersistence as A,signInWithCustomToken as C,signInWithEmailAndPassword as R,signInWithPopup as L,signInWithRedirect as O,signOut as T,updatePassword as k,updateProfile as x}from"firebase/auth";var h=class d{static{a(this,"SmpFirebaseService")}static get INSTANCE(){if(!(this._instance instanceof d))throw Error(`${this.constructor.name} instance doesn't exist! Call ${this.constructor.name}.init first!`);return this._instance}static _instance;get config(){return this._config}get enabledSocials(){return this._enabledSocials}get loggedUser(){return this._loggedUser||(this._loggedUser=this._readStoredUser()),this._auth.currentUser||this._loggedUser||void 0}get providersRelation(){return{"facebook.com":s.FACEBOOK,"google.com":s.GOOGLE,"apple.com":s.APPLE}}get socialLoginUXMode(){return this._socialLoginUxMode}get storedUserKey(){return"firebaseUser"}get _auth(){return S(this._app)}_app;_config;_enabledSocials=[];_loggedUser;_logger;_popupErrors=0;_popupFallsBackToRedirect;_providers;_socialLoginUxMode=o.POPUP;constructor(e,t){this._config=e,this._enabledSocials=t.enabledSocials||[],this._socialLoginUxMode=t.socialLoginUxMode||o.POPUP,this._popupFallsBackToRedirect=!!t.popupFallsBackToRedirect,this._buildProviders(),this._logger=t.logger||new c,this._app=l().length?l()[0]:g(e),this._watchAuthState()}static init(e,t){return this._instance||(this._instance=new d(e,t)),this._instance}addAuthStateChangedCallback(e){return this._auth.onAuthStateChanged(t=>{e(t||this.loggedUser||null)})}checkActionCode(e){return U(this._auth,e)}confirmPasswordReset(e,t){return E(this._auth,e,t)}fetchSignInMethodsForEmail(e){return b(this._auth,e).then(t=>t.map(r=>this.providersRelation[r]||r))}getRedirectResult(){return w(this._auth).catch(async e=>(await this._expandDifferentCredential(e),Promise.reject(e)))}initAppCheck(){}sendEmailVerification(e){if(!this.loggedUser)throw Error("Firebase: user is not logged!");return F(this.loggedUser,e?{url:e}:void 0)}sendPasswordResetEmail(e,t){return v(this._auth,e,{url:t})}setPersistence(e){return A(this._auth,e?u:p)}signInWithCustomToken(e){return C(this._auth,e)}signInWithEmailAndPassword(e,t){return R(this._auth,e,t).then(async r=>r.user)}signInWithSocialProvider(e){if(!this._providers[e])throw Error(`Firebase: invalid social key provided! Expected one of ${this.enabledSocials}, got ${e}`);return this._signInWithProvider(this._providers[e])}signOut(){return T(this._auth)}updatePassword(e,t){if(!this.loggedUser)throw Error("Firebase: user is not logged!");let r=_.credential(this.loggedUser.email,e);return I(this.loggedUser,r).then(()=>k(this.loggedUser,t))}updateUserProfile(e){if(!this.loggedUser)throw Error("Firebase: user is not logged!");return x(this.loggedUser,e)}async verifyIdToken(){return this._auth.currentUser?.getIdTokenResult()}_buildProviders(){this._providers=this._enabledSocials.reduce((e,t)=>(t in e&&(e[t]=e[t]),e),{[s.APPLE]:new P("apple.com"),[s.FACEBOOK]:new m().setCustomParameters({prompt:"select_account"}),[s.GOOGLE]:new f().setCustomParameters({prompt:"select_account"})})}async _expandDifferentCredential(e){if(e?.code===n.DIFFERENT_CREDENTIAL){let t=await this.fetchSignInMethodsForEmail(e.customData.email);throw e.code=n["DIFFERENT_CREDENTIAL_"+t[0]],e}}_readStoredUser(){try{let e=localStorage.getItem(this.storedUserKey);if(e){this._logger?.debug("Firebase: found local user",e);let t=JSON.parse(e);return{...t,getIdToken:a(()=>Promise.resolve(t.stsTokenManager.accessToken),"getIdToken")}}}catch(e){this._logger.debug("Firebase: error while getting stored user",e)}}async _signInWithProvider(e,t=this.socialLoginUXMode){return(t===o.POPUP?L:O)(this._auth,e).then(i=>(this._logger.info(`Firebase: signin with provider ${e.providerId} was successful`),i.user)).catch(async i=>i?.code===n.POPUP_BLOCKED&&(this._logger.warn(`Firebase: social signin popup blocked (${++this._popupErrors}`),this._popupFallsBackToRedirect&&this._popupErrors>1)?(this._popupErrors=0,this._signInWithProvider(e,o.REDIRECT)):(this._logger.error(`Firebase: sign in with ${e.providerId} errored`,i),await this._expandDifferentCredential(i),Promise.reject(i)))}_updateLocalUser(e){try{e?localStorage.setItem(this.storedUserKey,JSON.stringify(e)):localStorage.removeItem(this.storedUserKey),this._logger.debug("Firebase: updating local user",e),this._loggedUser=e}catch(t){this._logger.warn("Firebase: couldn't update local user",{user:e,error:t})}}_watchAuthState(){this._auth.onAuthStateChanged(e=>{this._logger.debug("Firebase: firebase detected auth state change",e),this._updateLocalUser(e||void 0)})}};export{h as SmpFirebaseService};
1
+ import{a as s,b as o,c as n}from"./chunk-DIVAYUSN.js";import{a}from"./chunk-EI7MMDWY.js";import{SmpLoggerMethods as g}from"@tonysamperi/logger";import{getApps as d,initializeApp as c}from"firebase/app";import{browserLocalPersistence as u,browserSessionPersistence as p,EmailAuthProvider as _,FacebookAuthProvider as m,GoogleAuthProvider as f,OAuthProvider as P,checkActionCode as U,confirmPasswordReset as E,fetchSignInMethodsForEmail as b,getAuth as w,getRedirectResult as S,reauthenticateWithCredential as I,sendEmailVerification as F,sendPasswordResetEmail as A,setPersistence as C,signInWithCustomToken as v,signInWithEmailAndPassword as R,signInWithPopup as L,signInWithRedirect as O,signOut as T,updatePassword as k,updateProfile as x}from"firebase/auth";var l=class h{static{a(this,"SmpFirebaseService")}static get INSTANCE(){if(!(this._instance instanceof h))throw Error(`${this.constructor.name} instance doesn't exist! Call ${this.constructor.name}.init first!`);return this._instance}static _instance;get config(){return this._config}get enabledSocials(){return this._enabledSocials}get loggedUser(){return this._loggedUser||(this._loggedUser=this._readStoredUser()),this._auth.currentUser||this._loggedUser||void 0}get providersRelation(){return{"facebook.com":s.FACEBOOK,"google.com":s.GOOGLE,"apple.com":s.APPLE}}get socialLoginUXMode(){return this._socialLoginUxMode}get storedUserKey(){return"firebaseUser"}get _auth(){return w(this._app)}_app;_config;_enabledSocials=[];_loggedUser;_logger;_popupErrors=0;_popupFallsBackToRedirect;_providers;_socialLoginUxMode=o.POPUP;constructor(e,t){this._config=e,this._enabledSocials=t.enabledSocials||[],this._socialLoginUxMode=t.socialLoginUxMode||o.POPUP,this._popupFallsBackToRedirect=!!t.popupFallsBackToRedirect,this._buildProviders(),this._logger=t.logger||new g,this._app=d().length?d()[0]:c(e),this._watchAuthState()}static init(e,t){return this._instance||(this._instance=new h(e,t)),this._instance}addAuthStateChangedCallback(e){return this._auth.onAuthStateChanged(t=>{e(t||this.loggedUser||null)})}checkActionCode(e){return U(this._auth,e)}confirmPasswordReset(e,t){return E(this._auth,e,t)}fetchSignInMethodsForEmail(e){return b(this._auth,e).then(t=>t.map(r=>this.providersRelation[r]||r))}getRedirectResult(){return S(this._auth).catch(async e=>(await this._expandDifferentCredential(e),Promise.reject(e)))}initAppCheck(){}sendEmailVerification(e){if(!this.loggedUser)throw Error("Firebase: user is not logged!");return F(this.loggedUser,e?{url:e}:void 0)}sendPasswordResetEmail(e,t){return A(this._auth,e,{url:t})}setPersistence(e){return C(this._auth,e?u:p)}signInWithCustomToken(e){return v(this._auth,e)}signInWithEmailAndPassword(e,t){return R(this._auth,e,t).then(async r=>r.user)}signInWithSocialProvider(e){if(!this._providers[e])throw Error(`Firebase: invalid social key provided! Expected one of ${this.enabledSocials}, got ${e}`);return this._signInWithProvider(this._providers[e])}signOut(){return T(this._auth)}updatePassword(e,t){if(!this.loggedUser)throw Error("Firebase: user is not logged!");let r=_.credential(this.loggedUser.email,e);return I(this.loggedUser,r).then(()=>k(this.loggedUser,t))}updateUserProfile(e){if(!this.loggedUser)throw Error("Firebase: user is not logged!");return x(this.loggedUser,e)}async verifyIdToken(){return this._auth.currentUser?.getIdTokenResult()}_buildProviders(){this._providers=this._enabledSocials.reduce((e,t)=>(t in e&&(e[t]=e[t]),e),{[s.APPLE]:new P("apple.com"),[s.FACEBOOK]:new m().setCustomParameters({prompt:"select_account"}),[s.GOOGLE]:new f().setCustomParameters({prompt:"select_account"})})}async _expandDifferentCredential(e){if(e?.code===n.DIFFERENT_CREDENTIAL){let t=await this.fetchSignInMethodsForEmail(e.customData.email);throw e.code=n["DIFFERENT_CREDENTIAL_"+t[0]],e}}_readStoredUser(){try{let e=localStorage.getItem(this.storedUserKey);if(e){this._logger?.debug("Firebase: found local user",e);let t=JSON.parse(e);return{...t,getIdToken:a(()=>Promise.resolve(t.stsTokenManager.accessToken),"getIdToken")}}}catch(e){this._logger.debug("Firebase: error while getting stored user",e)}}async _signInWithProvider(e,t=this.socialLoginUXMode){return(t===o.POPUP?L:O)(this._auth,e).then(i=>(this._logger.info(`Firebase: signin with provider ${e.providerId} was successful`),i.user)).catch(async i=>i?.code===n.POPUP_BLOCKED&&(this._logger.warn(`Firebase: social signin popup blocked (${++this._popupErrors}`),this._popupFallsBackToRedirect&&this._popupErrors>1)?(this._popupErrors=0,this._signInWithProvider(e,o.REDIRECT)):(this._logger.error(`Firebase: sign in with ${e.providerId} errored`,i),await this._expandDifferentCredential(i),Promise.reject(i)))}_updateLocalUser(e){try{e?localStorage.setItem(this.storedUserKey,JSON.stringify(e)):localStorage.removeItem(this.storedUserKey),this._logger.debug("Firebase: updating local user",e),this._loggedUser=e}catch(t){this._logger.debug("Firebase: couldn't update local user",{user:e,error:t})}}_watchAuthState(){this._auth.onAuthStateChanged(e=>{this._logger.debug("Firebase: firebase detected auth state change",e),this._updateLocalUser(e||void 0)})}};export{n as SmpFirebaseErrors,l as SmpFirebaseService};
@@ -1,140 +1,26 @@
1
- import { S as SmpAbstractCacheStrategy, a as SmpCachedValue } from './smp-cached-value.interface-DoiEsQxI.js';
1
+ import { S as SmpAbstractCacheStrategy, a as SmpCachedValue } from './smp-cached-value.interface-BdPg-J7L.js';
2
2
  import { SmpLoggerMethods } from '@tonysamperi/logger';
3
3
  export { smpNoop } from '@tonysamperi/logger';
4
- import { S as SmpResponseMessage, a as SmpGenericResponseBase } from './smp-generic-response-base.interface-D0jHrkjw.js';
5
- export { b as SmpResponseMessageBase, c as SmpResponseMessageTypes } from './smp-generic-response-base.interface-D0jHrkjw.js';
6
- export { S as SmpSocialSignInKeys, a as SmpSocialSignInUxModes } from './smp-social-sign-in-ux-modes.enum-Cw9H3EqT.js';
4
+ import { S as SmpResponseMessage, a as SmpResponseMessageTypes, b as SmpGenericResponseBase } from './smp-generic-response-base.interface-C0On2LBc.js';
5
+ export { c as SmpResponseMessageBase } from './smp-generic-response-base.interface-C0On2LBc.js';
6
+ export { b as SmpFirebaseErrors, S as SmpSocialSignInKeys, a as SmpSocialSignInUxModes } from './smp-firebase-errors.enum-BlzgwNdc.js';
7
7
  import { DateTime } from 'ts-luxon';
8
8
  import 'rxjs';
9
9
 
10
+ type SmpDynamicFetchReturn<T, U> = T extends "blob" ? Blob : T extends "arraybuffer" ? ArrayBuffer : T extends "text" ? string : T extends "json" ? U : T;
11
+
10
12
  declare abstract class SmpAbstractTtlCacheStrategy extends SmpAbstractCacheStrategy {
11
13
  protected abstract _flushRaw(): void;
12
14
  protected abstract _readRaw(key: string): unknown | undefined;
13
15
  protected abstract _removeRaw(key: string): void;
14
16
  protected abstract _writeRaw(key: string, value: unknown, ttl?: number): void;
15
17
  flush(): void;
16
- read<T = any>(key: string): T | undefined;
18
+ read<T = unknown>(key: string): T | undefined;
17
19
  remove(key: string): void;
18
- write<T = any>(key: string, value: T, ttl?: number): void;
20
+ write<T = unknown>(key: string, value: T, ttl?: number): void;
19
21
  protected _isSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
20
22
  }
21
23
 
22
- type SmpDynamicFetchReturn<T, U> = T extends "blob" ? Blob : T extends "arraybuffer" ? ArrayBuffer : T extends "text" ? string : T extends "json" ? U : T;
23
-
24
- type SmpGenericConstructor<T = any, U = any> = new (...args: U[]) => T;
25
-
26
- declare class SmpApiCommonUtils {
27
- protected static _javascriptVariablePattern: string;
28
- protected static _logger: SmpLoggerMethods;
29
- protected static _pathParamRegex: RegExp;
30
- static credentialsToBasicAuth(user: string, password: string): string;
31
- static fromBearer(header?: string): string;
32
- static getCountryFromReferer(referer: string): string | void;
33
- static getLanguageFromReferer(referer: string): string | void;
34
- static getLocaleFromReferer(referer: string): string | void;
35
- static interpolateParams(urlTemplate: string, params: Record<string, string | number | boolean>): string;
36
- }
37
-
38
- type ResponseMessageUnion = string | SmpResponseMessage;
39
- interface SmpErrorResponseCreateOpts<T> {
40
- messages: ResponseMessageUnion | ResponseMessageUnion[];
41
- errorCode: number | string;
42
- status: number;
43
- data: T;
44
- }
45
-
46
- declare class SmpGenericResponse<T, U = SmpGenericResponseBase> implements SmpGenericResponseBase<T> {
47
- protected _messages: SmpResponseMessage[];
48
- data?: T | undefined;
49
- set messages(newValue: string | SmpResponseMessage | (SmpResponseMessage | string)[]);
50
- get messages(): SmpResponseMessage[] | void;
51
- constructor(_messages?: SmpResponseMessage[], data?: T | undefined);
52
- static buildInfo<T = any>(msg: string | string[], data?: T): SmpGenericResponse<T>;
53
- static buildSuccess<T = any>(msg: string | string[], data?: T): SmpGenericResponse<T>;
54
- static fromPlain(plain: unknown): SmpGenericResponse<any, SmpGenericResponseBase<any>>;
55
- isError(): boolean;
56
- isSuccess(): boolean;
57
- serialize(): U;
58
- }
59
-
60
- declare class SmpErrorResponse<T = any> extends SmpGenericResponse<T, SmpGenericResponseBase & Pick<SmpErrorResponse, "errorCode" | "timestamp" | "status">> {
61
- protected _errorCode: number | string;
62
- protected _status: number;
63
- static get DEFAULT_MESSAGES(): SmpResponseMessage[];
64
- get errorCode(): number | string;
65
- get status(): number;
66
- get timestamp(): number;
67
- protected _timestamp: number;
68
- constructor(messages?: SmpResponseMessage[], _errorCode?: number | string, _status?: number, data?: T);
69
- static create<T>({ messages, ...opts }?: Partial<SmpErrorResponseCreateOpts<T>>): SmpErrorResponse;
70
- /**
71
- * This shouldn't be necessary, but it's a workaround for this bug https://github.com/typestack/class-transformer/issues/1807
72
- * @param plain
73
- */
74
- static fromPlain(plain: unknown): SmpErrorResponse<any>;
75
- }
76
-
77
- declare const SMP_HEALTHZ: {
78
- status: string;
79
- };
80
-
81
- declare enum SmpRestVerbs {
82
- GET = "GET",
83
- POST = "POST",
84
- PUT = "PUT",
85
- DELETE = "DELETE",
86
- PATCH = "PATCH"
87
- }
88
-
89
- interface SmpHttpConfig<T = any> {
90
- cacheKey?: string;
91
- clearCache?: boolean;
92
- url: string;
93
- method?: SmpRestVerbs | string;
94
- useCredentials?: boolean;
95
- body?: T;
96
- headers?: Record<string, string>;
97
- queryParams?: Record<string, string | number>;
98
- transform?: boolean;
99
- responseType?: "blob" | "arraybuffer" | "text" | "json" | "jsonp";
100
- }
101
-
102
- interface ParseableErrorClass<T> {
103
- fromPlain(plain: unknown): T;
104
- }
105
- declare class SmpHttpService {
106
- protected static _cachePrefix: string;
107
- protected static _cacheStrategy: SmpAbstractTtlCacheStrategy;
108
- protected static _config: {
109
- cachePrefix: string;
110
- shared: Map<string, Promise<any>>;
111
- };
112
- protected static _errorClass: SmpGenericConstructor & ParseableErrorClass<any>;
113
- protected static _mergeParamsFallbackBaseUrl: string;
114
- static $http(config: SmpHttpConfig): Promise<SmpDynamicFetchReturn<SmpHttpConfig["responseType"], any>>;
115
- static $http<T = any>(config: SmpHttpConfig): Promise<T>;
116
- static $http(config: SmpHttpConfig): Promise<SmpDynamicFetchReturn<SmpHttpConfig["responseType"], Blob>>;
117
- static $http(config: SmpHttpConfig): Promise<SmpDynamicFetchReturn<SmpHttpConfig["responseType"], ArrayBuffer>>;
118
- static $http(config: SmpHttpConfig): Promise<SmpDynamicFetchReturn<SmpHttpConfig["responseType"], string>>;
119
- static $http<T, U, V>(config: SmpHttpConfig): Promise<SmpDynamicFetchReturn<SmpHttpConfig["responseType"], U>>;
120
- /**
121
- * Internal method to generate ajax config
122
- * @param config
123
- * @protected
124
- */
125
- static _generateAjax<T, U, V = unknown>(config: SmpHttpConfig<T>): Promise<SmpDynamicFetchReturn<typeof config.responseType, U>>;
126
- static _generateAjaxBase<T, U, V = unknown>(config: SmpHttpConfig<T>): Promise<SmpDynamicFetchReturn<typeof config.responseType, U>>;
127
- static cacheFlush(): void;
128
- static mergeQueryParams(url: string, queryParams: SmpHttpConfig["queryParams"]): string;
129
- protected static _cacheKey(key: string): string;
130
- protected static _cachePop<T = any>(key: string): T | void;
131
- protected static _cacheRead<T>(key: string): T | void;
132
- protected static _cacheRemove(key: string): void;
133
- protected static _cacheWrite<T>(key: string, value: T): void;
134
- protected static _preprocessRequest<T>(config: SmpHttpConfig<T>): Promise<SmpHttpConfig<T>>;
135
- protected static _preprocessResponse<T>(_config_: SmpHttpConfig<T>, res: Response): Promise<Response>;
136
- }
137
-
138
24
  declare class SmpBrowserCache extends SmpAbstractTtlCacheStrategy {
139
25
  protected _storage: typeof localStorage | typeof sessionStorage;
140
26
  protected _prefix: string;
@@ -218,6 +104,121 @@ declare enum SmpHttpStatusCodes {
218
104
  NetworkAuthenticationRequired = 511
219
105
  }
220
106
 
107
+ type SmpGenericConstructor<T = any, U = any> = new (...args: U[]) => T;
108
+
109
+ declare enum SmpRestVerbs {
110
+ GET = "GET",
111
+ POST = "POST",
112
+ PUT = "PUT",
113
+ DELETE = "DELETE",
114
+ PATCH = "PATCH"
115
+ }
116
+
117
+ type SmpPrimitive = string | number | boolean | symbol;
118
+
119
+ interface SmpHttpTwoConfig<T = any> {
120
+ ttl?: number;
121
+ clearCache?: boolean;
122
+ url: string;
123
+ method?: SmpRestVerbs | string;
124
+ useCredentials?: boolean;
125
+ body?: T;
126
+ headers?: Record<string, string>;
127
+ queryParams?: Record<string, Exclude<SmpPrimitive, symbol> | Exclude<SmpPrimitive, symbol>[]>;
128
+ transform?: boolean;
129
+ responseType?: "blob" | "arraybuffer" | "text" | "json" | "jsonp";
130
+ }
131
+
132
+ interface ParseableErrorClass<T> {
133
+ fromPlain(plain: unknown): T;
134
+ }
135
+ declare class SmpHttpTwoService {
136
+ protected static _cacheStrategy: SmpAbstractTtlCacheStrategy;
137
+ protected static _errorClass: SmpGenericConstructor & ParseableErrorClass<any>;
138
+ protected static _mergeParamsFallbackBaseUrl: string;
139
+ protected static _running: Map<string, Promise<any>>;
140
+ static $http(config: SmpHttpTwoConfig): Promise<SmpDynamicFetchReturn<SmpHttpTwoConfig["responseType"], any>>;
141
+ static $http<T = any>(config: SmpHttpTwoConfig): Promise<T>;
142
+ static $http(config: SmpHttpTwoConfig): Promise<SmpDynamicFetchReturn<SmpHttpTwoConfig["responseType"], Blob>>;
143
+ static $http(config: SmpHttpTwoConfig): Promise<SmpDynamicFetchReturn<SmpHttpTwoConfig["responseType"], ArrayBuffer>>;
144
+ static $http(config: SmpHttpTwoConfig): Promise<SmpDynamicFetchReturn<SmpHttpTwoConfig["responseType"], string>>;
145
+ static $http<T, U, V>(config: SmpHttpTwoConfig): Promise<SmpDynamicFetchReturn<SmpHttpTwoConfig["responseType"], U>>;
146
+ /**
147
+ * Internal method to generate ajax config
148
+ * @param config
149
+ * @protected
150
+ */
151
+ static _generateAjax<T, U, V = unknown>(config: SmpHttpTwoConfig<T>): Promise<SmpDynamicFetchReturn<typeof config.responseType, U>>;
152
+ static _generateAjaxBase<T, U, V = unknown>(config: SmpHttpTwoConfig<T>): Promise<SmpDynamicFetchReturn<typeof config.responseType, U>>;
153
+ static cacheFlush(): void;
154
+ static mergeQueryParams(url: string, queryParams: SmpHttpTwoConfig["queryParams"]): string;
155
+ protected static _generateCacheKey(config: SmpHttpTwoConfig): string;
156
+ protected static _preprocessRequest<T>(config: SmpHttpTwoConfig<T>): Promise<SmpHttpTwoConfig<T>>;
157
+ protected static _preprocessResponse<T>(_config_: SmpHttpTwoConfig<T>, res: Response): Promise<Response>;
158
+ }
159
+
160
+ declare class SmpApiCommonUtils {
161
+ protected static _javascriptVariablePattern: string;
162
+ protected static _logger: SmpLoggerMethods;
163
+ protected static _pathParamRegex: RegExp;
164
+ static credentialsToBasicAuth(user: string, password: string): string;
165
+ static fromBearer(header?: string): string;
166
+ static getCountryFromReferer(referer: string): string | void;
167
+ static getLanguageFromReferer(referer: string): string | void;
168
+ static getLocaleFromReferer(referer: string): string | void;
169
+ static interpolateParams(urlTemplate: string, params: Record<string, string | number | boolean>): string;
170
+ }
171
+
172
+ type ResponseMessageUnion = string | SmpResponseMessage;
173
+ interface SmpErrorResponseCreateOpts<T> {
174
+ messages: ResponseMessageUnion | ResponseMessageUnion[];
175
+ errorCode: number | string;
176
+ status: number;
177
+ data: T;
178
+ }
179
+
180
+ interface SmpGenericResponseCreateOpts<T = any> {
181
+ messages: string | SmpResponseMessage | (string | SmpResponseMessage)[];
182
+ data: T;
183
+ type: SmpResponseMessageTypes;
184
+ }
185
+
186
+ declare class SmpGenericResponse<T, U = SmpGenericResponseBase> implements SmpGenericResponseBase<T> {
187
+ protected _messages: SmpResponseMessage[];
188
+ data?: T | undefined;
189
+ set messages(newValue: string | SmpResponseMessage | (SmpResponseMessage | string)[]);
190
+ get messages(): SmpResponseMessage[] | void;
191
+ constructor(_messages?: SmpResponseMessage[], data?: T | undefined);
192
+ static create<T = any>(config: Partial<SmpGenericResponseCreateOpts<T>>): SmpGenericResponse<T>;
193
+ static fromPlain(plain: unknown): SmpGenericResponse<any, SmpGenericResponseBase<any>>;
194
+ isError(): boolean;
195
+ isSuccess(): boolean;
196
+ serialize(): U;
197
+ }
198
+
199
+ declare class SmpErrorResponse<T = any> extends SmpGenericResponse<T, SmpGenericResponseBase & Pick<SmpErrorResponse, "errorCode" | "timestamp" | "status">> {
200
+ protected _errorCode: number | string;
201
+ protected _status: number;
202
+ static get DEFAULT_MESSAGES(): SmpResponseMessage[];
203
+ set errorCode(value: number | string);
204
+ get errorCode(): number | string;
205
+ get status(): number;
206
+ set timestamp(newValue: number);
207
+ get timestamp(): number;
208
+ protected _timestamp: number;
209
+ constructor(messages?: SmpResponseMessage[], _errorCode?: number | string, _status?: number, data?: T);
210
+ static create<T>({ messages, ...opts }?: Partial<SmpErrorResponseCreateOpts<T>>): SmpErrorResponse;
211
+ /**
212
+ * This shouldn't be necessary, but it's a workaround for this bug https://github.com/typestack/class-transformer/issues/1807
213
+ * @param plain
214
+ */
215
+ static fromPlain(plain: unknown): SmpErrorResponse<any>;
216
+ }
217
+
218
+ declare const SMP_HEALTHZ: {
219
+ status: string;
220
+ };
221
+
221
222
  declare class SmpBaseJwtTokenPlain {
222
223
  access_token: string;
223
224
  exp: number;
@@ -235,8 +236,6 @@ declare class SmpBaseJwtToken {
235
236
  serialize(): SmpBaseJwtTokenPlain;
236
237
  }
237
238
 
238
- type SmpPrimitive = string | number | boolean | symbol;
239
-
240
239
  declare class WordArray {
241
240
  sigBytes: number;
242
241
  words: number[];
@@ -683,7 +682,8 @@ declare class SmpAesCrypt {
683
682
  protected _password: string;
684
683
  protected _salt: string;
685
684
  protected _initVector?: string | undefined;
686
- protected get _iv(): WordArray | undefined;
685
+ protected _iv: WordArray | undefined;
686
+ protected _key: WordArray;
687
687
  protected _mode: typeof CBC;
688
688
  protected _padding: typeof PKCS7;
689
689
  constructor(_password: string, _salt: string, _initVector?: string | undefined);
@@ -709,6 +709,7 @@ declare class SmpAesCrypt {
709
709
  declare class SmpCrypto {
710
710
  static base64Decode(str: string): string;
711
711
  static base64Encode(str: string): string;
712
+ static generateCorrelationId(): string;
712
713
  static md5(data: string): string;
713
714
  static sha1(data: string): string;
714
715
  static sha256(data: string): string;
@@ -734,19 +735,6 @@ declare class SmpSecureCode {
734
735
  protected _encode(): string;
735
736
  }
736
737
 
737
- declare enum SmpFirebaseErrors {
738
- DIFFERENT_CREDENTIAL = "auth/account-exists-with-different-credential",
739
- DIFFERENT_CREDENTIAL_APPLE = "auth/account-exists-with-different-credential/apple",
740
- DIFFERENT_CREDENTIAL_FACEBOOK = "auth/account-exists-with-different-credential/facebook",
741
- DIFFERENT_CREDENTIAL_GOOGLE = "auth/account-exists-with-different-credential/google",
742
- EMAIL_EXISTS = "auth/email-already-exists",
743
- INVALID_ACTION_CODE = "auth/invalid-action-code",
744
- POPUP_BLOCKED = "auth/popup-blocked",
745
- POPUP_CLOSED_BY_USER = "auth/popup-closed-by-user",
746
- USER_NOT_FOUND = "auth/user-not-found",
747
- WRONG_PASSWORD = "auth/wrong-password"
748
- }
749
-
750
738
  declare enum SmpGiftcardTransactionOps {
751
739
  ACTIVATE = "ACTIVATE",
752
740
  BLOCK = "BLOCK",
@@ -785,14 +773,13 @@ declare enum SmpGiftcardTransactionHashStrategies {
785
773
 
786
774
  /**
787
775
  * Base implementation that you can extend, even customizing the static parts like #SmpGiftcardTransaction._AES_ENCODER.
788
- * You can create your own instance of KikAesCrypt to override it.
776
+ * You can create your own instance of SmpAesCrypt to override it.
789
777
  */
790
778
  declare class SmpGiftcardTransaction implements SmpGiftcardTransactionPlain {
791
779
  readonly gc: string;
792
780
  readonly op: SmpGiftcardTransactionOps;
793
781
  readonly ot?: string | undefined;
794
782
  protected static _AES_ENCODER: SmpAesCrypt;
795
- protected static _LOGGER: SmpLoggerMethods;
796
783
  protected static _OP_CODES: Record<SmpGiftcardTransactionOps, string>;
797
784
  protected static readonly _SEP: string;
798
785
  get dto(): DateTime;
@@ -808,7 +795,7 @@ declare class SmpGiftcardTransaction implements SmpGiftcardTransactionPlain {
808
795
  protected _hashStrategy: (str: string) => WordArray;
809
796
  /**
810
797
  *
811
- * @param gc giftcard code
798
+ * @param gc gift card code
812
799
  * @param op operation
813
800
  * @param ot original transaction in case of refund
814
801
  * @param unixTimestampOrMilliseconds
@@ -866,6 +853,7 @@ declare class SmpCommonUtils {
866
853
  static assertIsTruthy<T>(condition: T, withMessage?: string): asserts condition;
867
854
  static buildPath(...args: any[]): string;
868
855
  static downloadBlob(blob: Blob, filename: string): void;
856
+ static fixDecimalPrecision(value: number, precision?: number): number;
869
857
  static generateRandomHexString(length?: number): string;
870
858
  static generateUUID(): string;
871
859
  static getDecimalPrecision(val: number | string): number;
@@ -921,7 +909,7 @@ declare class SmpCommonUtils {
921
909
  * @param iteratee the map fn
922
910
  */
923
911
  static mapObject<T = any>(objLike: any, iteratee: (v: any, indexOrKey: string | number, arr?: string[]) => any): T[];
924
- static mapObjectKeys<T extends string = string>(obj: Record<T, any>, callback: (key: string, value: any) => any): Record<string, any>;
912
+ static mapObjectKeys<T extends string = string>(obj: Record<T, any>, callback: (key: string, value: any) => string): Record<string, any>;
925
913
  static mapObjectValues<T extends string = string>(obj: Partial<Record<T, any>>, callback: (value: any, key: string) => any): Record<string, any>;
926
914
  static noop(): void;
927
915
  static objectHasValue<T extends object>(obj: T, value: any): boolean;
@@ -983,6 +971,10 @@ declare class SmpRegularExpressions {
983
971
  protected static _language: RegExp;
984
972
  }
985
973
 
974
+ type SmpWithDateTimeAsDate<T, Keys extends keyof T = keyof T> = Omit<T, Keys> & {
975
+ [K in Keys]: T[K] extends DateTime | null | undefined ? Exclude<T[K], DateTime> | Date : T[K];
976
+ };
977
+
986
978
  declare class SmpInMemoryCache extends SmpAbstractTtlCacheStrategy {
987
979
  private static _storage;
988
980
  protected get _staticSelf(): typeof SmpInMemoryCache;
@@ -998,6 +990,6 @@ declare class SmpInMemoryCache extends SmpAbstractTtlCacheStrategy {
998
990
  */
999
991
  declare function smpIsSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
1000
992
 
1001
- declare const VERSION: "2.0.0-beta.4";
993
+ declare const VERSION: "2.0.0-beta.6";
1002
994
 
1003
- export { SMP_HEALTHZ, SmpAbstractCacheStrategy, SmpAbstractTtlCacheStrategy, SmpAesCrypt, SmpApiCommonUtils, SmpBaseJwtToken, SmpBaseJwtTokenPlain, SmpBrowserCache, SmpCachedValue, SmpCommonUtils, SmpCrypto, SmpErrorResponse, type SmpErrorResponseCreateOpts, SmpFilterException, SmpFirebaseErrors, type SmpGenericConstructor, SmpGenericResponse, SmpGenericResponseBase, SmpGiftcardTransaction, type SmpGiftcardTransactionConfig, SmpGiftcardTransactionHashStrategies, SmpGiftcardTransactionOps, type SmpGiftcardTransactionPlain, type SmpHttpConfig, SmpHttpService, SmpHttpSessionStorageCache, SmpHttpStatusCodes, SmpInMemoryCache, type SmpMarketingCloudValidationResponse, type SmpMarketingCloudValidationResponseKo, type SmpMarketingCloudValidationResponseOk, SmpMarketingCloudValidators, type SmpPrimitive, SmpRegularExpressions, SmpResponseMessage, SmpRestVerbs, SmpSecureCode, SmpSid, VERSION, smpApplyMixin, smpIsSmpCachedValue };
995
+ export { SMP_HEALTHZ, SmpAbstractCacheStrategy, SmpAbstractTtlCacheStrategy, SmpAesCrypt, SmpApiCommonUtils, SmpBaseJwtToken, SmpBaseJwtTokenPlain, SmpBrowserCache, SmpCachedValue, SmpCommonUtils, SmpCrypto, type SmpDynamicFetchReturn, SmpErrorResponse, type SmpErrorResponseCreateOpts, SmpFilterException, type SmpGenericConstructor, SmpGenericResponse, SmpGenericResponseBase, type SmpGenericResponseCreateOpts, SmpGiftcardTransaction, type SmpGiftcardTransactionConfig, SmpGiftcardTransactionHashStrategies, SmpGiftcardTransactionOps, type SmpGiftcardTransactionPlain, SmpHttpSessionStorageCache, SmpHttpStatusCodes, type SmpHttpTwoConfig, SmpHttpTwoService, SmpInMemoryCache, type SmpMarketingCloudValidationResponse, type SmpMarketingCloudValidationResponseKo, type SmpMarketingCloudValidationResponseOk, SmpMarketingCloudValidators, type SmpPrimitive, SmpRegularExpressions, SmpResponseMessage, SmpResponseMessageTypes, SmpRestVerbs, SmpSecureCode, SmpSid, type SmpWithDateTimeAsDate, VERSION, smpApplyMixin, smpIsSmpCachedValue };