@tonysamperi/ts-mapi-core 1.4.0 → 1.6.0

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 (154) hide show
  1. package/README.md +4 -0
  2. package/changelog.md +11 -0
  3. package/dist/cjs/index.cjs +1 -1
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/cjs/index.d.cts +20 -14
  6. package/dist/cjs/services/http/index.cjs +1 -1
  7. package/dist/cjs/services/http/index.cjs.map +1 -1
  8. package/dist/cjs/services/http/index.d.cts +4 -0
  9. package/dist/cjs/services/http/smp-http-session-storage-cache.class.cjs +1 -1
  10. package/dist/cjs/services/http/smp-http-session-storage-cache.class.cjs.map +1 -1
  11. package/dist/cjs/services/http/smp-http-session-storage-cache.class.d.cts +4 -1
  12. package/dist/cjs/services/http/smp-http.service.cjs +1 -1
  13. package/dist/cjs/services/http/smp-http.service.cjs.map +1 -1
  14. package/dist/cjs/services/index.cjs +1 -1
  15. package/dist/cjs/services/index.cjs.map +1 -1
  16. package/dist/cjs/services/index.d.cts +4 -0
  17. package/dist/cjs/shared/api/index.cjs +1 -1
  18. package/dist/cjs/shared/api/index.cjs.map +1 -1
  19. package/dist/cjs/shared/api/smp-error-response-build-opts.interface.cjs.map +1 -1
  20. package/dist/cjs/shared/api/smp-error-response.class.cjs +1 -1
  21. package/dist/cjs/shared/api/smp-error-response.class.cjs.map +1 -1
  22. package/dist/cjs/shared/api/smp-error-response.class.d.cts +2 -6
  23. package/dist/cjs/shared/common/index.cjs.map +1 -1
  24. package/dist/cjs/shared/crypto/index.cjs +1 -1
  25. package/dist/cjs/shared/crypto/index.cjs.map +1 -1
  26. package/dist/cjs/shared/crypto/smp-secure-code.class.cjs +1 -1
  27. package/dist/cjs/shared/crypto/smp-secure-code.class.cjs.map +1 -1
  28. package/dist/cjs/shared/crypto/smp-secure-code.class.d.cts +5 -0
  29. package/dist/cjs/shared/rxjs/index.cjs +1 -1
  30. package/dist/cjs/shared/rxjs/index.cjs.map +1 -1
  31. package/dist/cjs/shared/rxjs/index.d.cts +3 -0
  32. package/dist/cjs/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.cjs +2 -0
  33. package/dist/cjs/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.cjs.map +1 -0
  34. package/dist/cjs/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.d.cts +17 -0
  35. package/dist/cjs/shared/rxjs/smp-rxjs-catch-only.function.cjs +1 -1
  36. package/dist/cjs/shared/rxjs/smp-rxjs-catch-only.function.cjs.map +1 -1
  37. package/dist/cjs/shared/rxjs/smp-rxjs-catch-only.function.d.cts +1 -1
  38. package/dist/cjs/shared/rxjs/smp-rxjs-in-memory-cache.class.cjs +2 -0
  39. package/dist/cjs/shared/rxjs/smp-rxjs-in-memory-cache.class.cjs.map +1 -0
  40. package/dist/cjs/shared/rxjs/smp-rxjs-in-memory-cache.class.d.cts +15 -0
  41. package/dist/cjs/shared/utils/cache/index.cjs +1 -1
  42. package/dist/cjs/shared/utils/cache/index.cjs.map +1 -1
  43. package/dist/cjs/shared/utils/cache/index.d.cts +5 -0
  44. package/dist/cjs/shared/utils/cache/smp-abstract-cache-strategy.class.cjs +2 -0
  45. package/dist/cjs/shared/utils/cache/smp-abstract-cache-strategy.class.cjs.map +1 -0
  46. package/dist/cjs/shared/utils/cache/smp-abstract-cache-strategy.class.d.cts +10 -0
  47. package/dist/cjs/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.cjs +2 -0
  48. package/dist/cjs/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.cjs.map +1 -0
  49. package/dist/cjs/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.d.cts +17 -0
  50. package/dist/cjs/shared/utils/cache/smp-browser-cache.class.cjs +1 -1
  51. package/dist/cjs/shared/utils/cache/smp-browser-cache.class.cjs.map +1 -1
  52. package/dist/cjs/shared/utils/cache/smp-browser-cache.class.d.cts +11 -8
  53. package/dist/cjs/shared/utils/cache/smp-cache-strategy.interface.cjs.map +1 -1
  54. package/dist/cjs/shared/utils/cache/smp-cache-strategy.interface.d.cts +4 -0
  55. package/dist/cjs/shared/utils/{smp-gcpsid-raw.interface.cjs → cache/smp-cached-value.interface.cjs} +1 -1
  56. package/dist/cjs/shared/utils/cache/smp-cached-value.interface.cjs.map +1 -0
  57. package/dist/cjs/shared/utils/cache/smp-cached-value.interface.d.cts +6 -0
  58. package/dist/cjs/shared/utils/cache/smp-in-memory-cache.class.cjs +1 -1
  59. package/dist/cjs/shared/utils/cache/smp-in-memory-cache.class.cjs.map +1 -1
  60. package/dist/cjs/shared/utils/cache/smp-in-memory-cache.class.d.cts +10 -7
  61. package/dist/cjs/shared/utils/cache/smp-is-smp-cached-value.function.cjs +2 -0
  62. package/dist/cjs/shared/utils/cache/smp-is-smp-cached-value.function.cjs.map +1 -0
  63. package/dist/cjs/shared/utils/cache/smp-is-smp-cached-value.function.d.cts +9 -0
  64. package/dist/cjs/shared/utils/index.cjs +1 -1
  65. package/dist/cjs/shared/utils/index.cjs.map +1 -1
  66. package/dist/cjs/shared/utils/index.d.cts +5 -1
  67. package/dist/cjs/shared/utils/smp-common-utils.class.cjs +1 -1
  68. package/dist/cjs/shared/utils/smp-common-utils.class.cjs.map +1 -1
  69. package/dist/cjs/shared/utils/smp-common-utils.class.d.cts +2 -1
  70. package/dist/cjs/shared/utils/smp-sid.class.cjs +1 -1
  71. package/dist/cjs/shared/utils/smp-sid.class.cjs.map +1 -1
  72. package/dist/cjs/shared/utils/smp-sid.class.d.cts +4 -4
  73. package/dist/cjs/shared/zod/index.cjs +2 -0
  74. package/dist/cjs/shared/zod/index.cjs.map +1 -0
  75. package/dist/cjs/shared/zod/index.d.cts +3 -0
  76. package/dist/cjs/shared/zod/smp-zod-date-time.definition.cjs +2 -0
  77. package/dist/cjs/shared/zod/smp-zod-date-time.definition.cjs.map +1 -0
  78. package/dist/cjs/shared/zod/smp-zod-date-time.definition.d.cts +28 -0
  79. package/dist/esm/chunk-3AFPQCOH.js +1 -0
  80. package/dist/esm/{chunk-35U7P4SV.js → chunk-3XWLMKWI.js} +1 -1
  81. package/dist/esm/chunk-5VCNTUI6.js +1 -0
  82. package/dist/esm/chunk-DADFHUII.js +1 -0
  83. package/dist/esm/chunk-DTVHTARR.js +1 -0
  84. package/dist/esm/chunk-FAUAQNPB.js +1 -0
  85. package/dist/esm/chunk-GALYBKBP.js +1 -0
  86. package/dist/esm/chunk-JFKLRHIQ.js +1 -0
  87. package/dist/esm/{chunk-FUXO6KMS.js → chunk-MMNEY2JK.js} +1 -1
  88. package/dist/esm/chunk-O7TJDNO6.js +0 -0
  89. package/dist/esm/chunk-QPKVVZUA.js +1 -0
  90. package/dist/esm/chunk-QW43DOPY.js +1 -0
  91. package/dist/esm/{chunk-NIJJBDPY.js → chunk-V2OQU7B5.js} +1 -1
  92. package/dist/esm/chunk-VP72PKJQ.js +1 -0
  93. package/dist/esm/chunk-Z7KKB4KI.js +1 -0
  94. package/dist/esm/index.d.ts +11 -5
  95. package/dist/esm/index.js +1 -1
  96. package/dist/esm/services/http/index.d.ts +4 -0
  97. package/dist/esm/services/http/index.js +1 -1
  98. package/dist/esm/services/http/smp-http-session-storage-cache.class.d.ts +4 -1
  99. package/dist/esm/services/http/smp-http-session-storage-cache.class.js +1 -1
  100. package/dist/esm/services/http/smp-http.service.js +1 -1
  101. package/dist/esm/services/index.d.ts +4 -0
  102. package/dist/esm/services/index.js +1 -1
  103. package/dist/esm/shared/api/index.js +1 -1
  104. package/dist/esm/shared/api/smp-error-response.class.d.ts +2 -6
  105. package/dist/esm/shared/api/smp-error-response.class.js +1 -1
  106. package/dist/esm/shared/crypto/index.js +1 -1
  107. package/dist/esm/shared/crypto/smp-secure-code.class.d.ts +5 -0
  108. package/dist/esm/shared/crypto/smp-secure-code.class.js +1 -1
  109. package/dist/esm/shared/rxjs/index.d.ts +3 -0
  110. package/dist/esm/shared/rxjs/index.js +1 -1
  111. package/dist/esm/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.d.ts +17 -0
  112. package/dist/esm/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.js +1 -0
  113. package/dist/esm/shared/rxjs/smp-rxjs-catch-only.function.d.ts +1 -1
  114. package/dist/esm/shared/rxjs/smp-rxjs-catch-only.function.js +1 -1
  115. package/dist/esm/shared/rxjs/smp-rxjs-in-memory-cache.class.d.ts +15 -0
  116. package/dist/esm/shared/rxjs/smp-rxjs-in-memory-cache.class.js +1 -0
  117. package/dist/esm/shared/utils/cache/index.d.ts +5 -0
  118. package/dist/esm/shared/utils/cache/index.js +1 -1
  119. package/dist/esm/shared/utils/cache/smp-abstract-cache-strategy.class.d.ts +10 -0
  120. package/dist/esm/shared/utils/cache/smp-abstract-cache-strategy.class.js +1 -0
  121. package/dist/esm/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.d.ts +17 -0
  122. package/dist/esm/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.js +1 -0
  123. package/dist/esm/shared/utils/cache/smp-browser-cache.class.d.ts +11 -8
  124. package/dist/esm/shared/utils/cache/smp-browser-cache.class.js +1 -1
  125. package/dist/esm/shared/utils/cache/smp-cache-strategy.interface.d.ts +4 -0
  126. package/dist/esm/shared/utils/cache/smp-cached-value.interface.d.ts +6 -0
  127. package/dist/esm/shared/utils/cache/smp-cached-value.interface.js +1 -0
  128. package/dist/esm/shared/utils/cache/smp-in-memory-cache.class.d.ts +10 -7
  129. package/dist/esm/shared/utils/cache/smp-in-memory-cache.class.js +1 -1
  130. package/dist/esm/shared/utils/cache/smp-is-smp-cached-value.function.d.ts +9 -0
  131. package/dist/esm/shared/utils/cache/smp-is-smp-cached-value.function.js +1 -0
  132. package/dist/esm/shared/utils/index.d.ts +5 -1
  133. package/dist/esm/shared/utils/index.js +1 -1
  134. package/dist/esm/shared/utils/smp-common-utils.class.d.ts +2 -1
  135. package/dist/esm/shared/utils/smp-common-utils.class.js +1 -1
  136. package/dist/esm/shared/utils/smp-sid.class.d.ts +4 -4
  137. package/dist/esm/shared/utils/smp-sid.class.js +1 -1
  138. package/dist/esm/shared/zod/index.d.ts +3 -0
  139. package/dist/esm/shared/zod/index.js +1 -0
  140. package/dist/esm/shared/zod/smp-zod-date-time.definition.d.ts +28 -0
  141. package/dist/esm/shared/zod/smp-zod-date-time.definition.js +1 -0
  142. package/package.json +6 -4
  143. package/dist/cjs/shared/utils/smp-gcpsid-raw.interface.cjs.map +0 -1
  144. package/dist/cjs/shared/utils/smp-gcpsid-raw.interface.d.cts +0 -6
  145. package/dist/esm/chunk-CZTKNLYX.js +0 -1
  146. package/dist/esm/chunk-LDLBKVKD.js +0 -1
  147. package/dist/esm/chunk-OM2B3B4I.js +0 -1
  148. package/dist/esm/chunk-OXO327UX.js +0 -1
  149. package/dist/esm/chunk-QMTVV3AM.js +0 -1
  150. package/dist/esm/chunk-RZ4YI35O.js +0 -1
  151. package/dist/esm/shared/utils/smp-gcpsid-raw.interface.d.ts +0 -6
  152. /package/dist/esm/{chunk-L6UZLRQU.js → chunk-6MJDU4CZ.js} +0 -0
  153. /package/dist/esm/{chunk-THUEL7AA.js → chunk-B3OEBKFG.js} +0 -0
  154. /package/dist/esm/{shared/utils/smp-gcpsid-raw.interface.js → chunk-EB55SS67.js} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";var x=Object.create;var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var o=(n,e)=>c(n,"name",{value:e,configurable:!0});var T=(n,e)=>{for(var t in e)c(n,t,{get:e[t],enumerable:!0})},p=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let d of h(e))!I.call(n,d)&&d!==t&&c(n,d,{get:()=>e[d],enumerable:!(a=l(e,d))||a.enumerable});return n};var _=(n,e,t)=>(t=n!=null?x(D(n)):{},p(e||!n||!n.__esModule?c(t,"default",{value:n,enumerable:!0}):t,n)),b=n=>p(c({},"__esModule",{value:!0}),n);var w={};T(w,{SmpZodDateTime:()=>f,smpZodDateTime:()=>g});module.exports=b(w);var i=_(require("zod"),1),m=require("ts-luxon");var f=class n extends i.default.ZodType{static{o(this,"SmpZodDateTime")}constructor(e){super({typeName:"SmpZodDateTime",coerce:e?.coerce??!1,checks:e?.checks??[]})}_parse(e){let t=this._getOrReturnCtx(e),a=t.data;if(this._def.coerce&&(a=this._coerceToDateTime(a),!(a instanceof m.DateTime)||!a.isValid))return i.default.addIssueToContext(t,{code:i.ZodIssueCode.invalid_type,expected:i.ZodParsedType.date,received:i.ZodParsedType.unknown,path:t.path,message:"Invalid date format"}),i.default.INVALID;if((!(a instanceof m.DateTime)||!a.isValid)&&!this._def.coerce)return i.default.addIssueToContext(t,{code:i.ZodIssueCode.invalid_type,expected:i.ZodParsedType.date,received:i.ZodParsedType.unknown,path:t.path,message:"Input must be a valid DateTime object"}),i.default.INVALID;let d={min:o((s,r,u)=>{if(s.min&&r<s.min)return{code:i.ZodIssueCode.too_small,minimum:s.min.toMillis(),type:"date",inclusive:!0,message:s.message??`Date must be \u2265 ${s.min.toISODate()}`,path:u.path}},"min"),max:o((s,r,u)=>{if(s.max&&r>s.max)return{code:i.ZodIssueCode.too_big,maximum:s.max.toMillis(),type:"date",inclusive:!0,message:s.message??`Date must be \u2264 ${s.max.toISODate()}`,path:u.path}},"max"),between:o((s,r,u)=>{if(s.min&&s.max&&(r<s.min||r>s.max))return{code:i.ZodIssueCode.custom,message:s.message??`Date must be between ${s.min.toISODate()} and ${s.max.toISODate()}`,path:u.path}},"between")};for(let s of this._def.checks)if(a instanceof m.DateTime&&a.isValid){let r=d[s.kind](s,a,t);r&&i.default.addIssueToContext(t,r)}return t.common.issues.length>0?i.default.INVALID:i.default.OK(a)}between(e,t,a){return new n({...this._def,checks:[...this._def.checks,{kind:"between",min:e.toUTC(),max:t.toUTC(),message:a}]})}coerce(){return new n({...this._def,coerce:!0})}max(e,t){return new n({...this._def,checks:[...this._def.checks,{kind:"max",max:e.toUTC(),message:t}]})}min(e,t){return new n({...this._def,checks:[...this._def.checks,{kind:"min",min:e.toUTC(),message:t}]})}_coerceToDateTime(e){if(e instanceof m.DateTime&&e.isValid)return e;let t={string:o(()=>m.DateTime.fromJSDate(new Date(e)),"string"),number:o(()=>m.DateTime.fromMillis(e),"number"),object:o(()=>m.DateTime.fromJSDate(e),"object"),default:o(()=>null,"default")};return(t[typeof e]||t.default)()}},g=o((n={})=>new f({coerce:n.coerce??!1,checks:[]}),"smpZodDateTime");0&&(module.exports={SmpZodDateTime,smpZodDateTime});
2
+ //# sourceMappingURL=smp-zod-date-time.definition.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/shared/zod/smp-zod-date-time.definition.ts"],"sourcesContent":["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,mBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAoG,oBACpGC,EAAuB,oBAehB,IAAMC,EAAN,MAAMA,UAAuBC,EAAAA,QAAEC,OAAO,CAhB7C,MAgB6C,CAAAC,EAAA,uBAIzCC,YAAYC,EAAkC,CAC1C,MAAM,CACFC,SAAU,iBACVC,OAAQF,GAAKE,QAAU,GACvBC,OAAQH,GAAKG,QAAU,CAAA,CAC3B,CAAA,CACJ,CAGAC,OAAOC,EAA8C,CACjD,IAAMC,EAAM,KAAKC,gBAAgBF,CAAAA,EAC7BG,EAAMF,EAAIG,KAEd,GAAI,KAAKC,KAAKR,SACVM,EAAM,KAAKG,kBAAkBH,CAAAA,EACzB,EAAEA,aAAeI,aAAa,CAACJ,EAAIK,SACnCjB,SAAAA,QAAEkB,kBAAkBR,EAAK,CACrBS,KAAMC,eAAaC,aACnBC,SAAUC,gBAAcC,KACxBC,SAAUF,gBAAcG,QACxBC,KAAMjB,EAAIiB,KACVC,QAAS,qBACb,CAAA,EACO5B,EAAAA,QAAE6B,QAMjB,IAAI,EAAEjB,aAAeI,aAAa,CAACJ,EAAIK,UAI/B,CAAC,KAAKH,KAAKR,OACXN,SAAAA,QAAEkB,kBAAkBR,EAAK,CACrBS,KAAMC,eAAaC,aACnBC,SAAUC,gBAAcC,KACxBC,SAAUF,gBAAcG,QACxBC,KAAMjB,EAAIiB,KACVC,QAAS,uCACb,CAAA,EACO5B,EAAAA,QAAE6B,QAOjB,IAAMC,EAAuJ,CACzJC,IAAK7B,EAAA,CAAC8B,EAAOC,EAAaC,IAAAA,CACtB,GAAIF,EAAMD,KAAOE,EAAcD,EAAMD,IACjC,MAAO,CACHZ,KAAMC,eAAae,UACnBC,QAASJ,EAAMD,IAAIM,SAAQ,EAC3BC,KAAM,OACNC,UAAW,GACXX,QAASI,EAAMJ,SAAW,uBAAkBI,EAAMD,IAAIS,UAAS,CAAA,GAC/Db,KAAMO,EAASP,IACnB,CAGR,EAZK,OAaLc,IAAKvC,EAAA,CAAC8B,EAAOC,EAAaC,IAAAA,CACtB,GAAIF,EAAMS,KAAOR,EAAcD,EAAMS,IACjC,MAAO,CACHtB,KAAMC,eAAasB,QACnBC,QAASX,EAAMS,IAAIJ,SAAQ,EAC3BC,KAAM,OACNC,UAAW,GACXX,QAASI,EAAMJ,SAAW,uBAAkBI,EAAMS,IAAID,UAAS,CAAA,GAC/Db,KAAMO,EAASP,IACnB,CAGR,EAZK,OAaLiB,QAAS1C,EAAA,CAAC8B,EAAOC,EAAaC,IAAAA,CAC1B,GAAIF,EAAMD,KAAOC,EAAMS,MAAQR,EAAcD,EAAMD,KAAOE,EAAcD,EAAMS,KAC1E,MAAO,CACHtB,KAAMC,eAAayB,OACnBjB,QAASI,EAAMJ,SAAW,wBAAwBI,EAAMD,IAAIS,UAAS,CAAA,QAAUR,EAAMS,IAAID,UAAS,CAAA,GAClGb,KAAMO,EAASP,IAGnB,CAGR,EAXS,UAYb,EAEA,QAAWK,KAAS,KAAKlB,KAAKP,OAI1B,GAAIK,aAAeI,YAAYJ,EAAIK,QAAS,CACxC,IAAM6B,EAAYhB,EAASE,EAAMe,IAAI,EAAEf,EAAOpB,EAAKF,CAAAA,EAC/CoC,GACA9C,EAAAA,QAAEkB,kBAAkBR,EAAKoC,CAAAA,CAEjC,CASJ,OAAIpC,EAAIsC,OAAOC,OAAOC,OAAS,EACpBlD,EAAAA,QAAE6B,QAGN7B,EAAAA,QAAEmD,GAAGvC,CAAAA,CAChB,CAEAgC,QAAQb,EAAeU,EAAeb,EAAwB,CAC1D,OAAO,IAAI7B,EAAe,CACtB,GAAG,KAAKe,KACRP,OAAQ,IAAI,KAAKO,KAAKP,OAAQ,CAACwC,KAAM,UAAWhB,IAAKA,EAAIqB,MAAK,EAAIX,IAAKA,EAAIW,MAAK,EAAIxB,QAAAA,CAAO,EAC/F,CAAA,CACJ,CAEAtB,QAAe,CACX,OAAO,IAAIP,EAAe,CACtB,GAAG,KAAKe,KACRR,OAAQ,EACZ,CAAA,CACJ,CAEAmC,IAAIA,EAAeb,EAAwB,CACvC,OAAO,IAAI7B,EAAe,CACtB,GAAG,KAAKe,KACRP,OAAQ,IAAI,KAAKO,KAAKP,OAAQ,CAACwC,KAAM,MAAON,IAAKA,EAAIW,MAAK,EAAIxB,QAAAA,CAAO,EACzE,CAAA,CACJ,CAEAG,IAAIA,EAAeH,EAAwB,CACvC,OAAO,IAAI7B,EAAe,CACtB,GAAG,KAAKe,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,OAAQpD,EAAA,IAAMc,WAASuC,WAAW,IAAIC,KAAK5C,CAAAA,CAAAA,EAAnC,UACR6C,OAAQvD,EAAA,IAAMc,WAAS0C,WAAW9C,CAAAA,EAA1B,UACR+C,OAAQzD,EAAA,IAAMc,WAASuC,WAAW3C,CAAAA,EAA1B,UACRgD,QAAS1D,EAAA,IAAM,KAAN,UACb,EAEA,OAAQmD,EAAY,OAAOzC,CAAAA,GAAQyC,EAAYO,SAAM,CACzD,CACJ,EAEaC,EAAiB3D,EAAA,CAAC4D,EAA6B,CAAC,IAClD,IAAI/D,EAAe,CACtBO,OAAQwD,EAAKxD,QAAU,GACvBC,OAAQ,CAAA,CACZ,CAAA,EAJ0B","names":["smp_zod_date_time_definition_exports","__export","SmpZodDateTime","smpZodDateTime","__toCommonJS","import_zod","import_ts_luxon","SmpZodDateTime","z","ZodType","__name","constructor","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"]}
@@ -0,0 +1,28 @@
1
+ import z, { ZodTypeDef, ParseInput, ParseReturnType } from 'zod';
2
+ import { DateTime } from 'ts-luxon';
3
+
4
+ interface SmpZodDateTimeCheck {
5
+ kind: "min" | "max" | "between";
6
+ min?: DateTime;
7
+ max?: DateTime;
8
+ message?: string;
9
+ }
10
+ interface SmpZodDateTimeDef extends ZodTypeDef {
11
+ coerce: boolean;
12
+ checks: SmpZodDateTimeCheck[];
13
+ typeName: "SmpZodDateTime";
14
+ }
15
+ declare class SmpZodDateTime extends z.ZodType<DateTime, SmpZodDateTimeDef> {
16
+ constructor(def?: Partial<SmpZodDateTimeDef>);
17
+ _parse(input: ParseInput): ParseReturnType<DateTime>;
18
+ between(min: DateTime, max: DateTime, message?: string): this;
19
+ coerce(): this;
20
+ max(max: DateTime, message?: string): this;
21
+ min(min: DateTime, message?: string): this;
22
+ private _coerceToDateTime;
23
+ }
24
+ declare const smpZodDateTime: (opts?: {
25
+ coerce?: boolean;
26
+ }) => SmpZodDateTime;
27
+
28
+ export { SmpZodDateTime, smpZodDateTime };
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-5VCNTUI6.js";import{a}from"./chunk-DADFHUII.js";import{a as s}from"./chunk-EI7MMDWY.js";import{DateTime as o}from"ts-luxon";var m=class extends a{static{s(this,"SmpAbstractTtlCacheStrategy")}flush(){this._flushRaw()}read(e){let r=this._readRaw(e);if(this._isSmpCachedValue(r)){if(r.expiry>=o.now().ts)return r.value;this._removeRaw(e);return}return r}remove(e){this._removeRaw(e)}write(e,r,i){if(isNaN(+i)||+i<=0){this._writeRaw(e,r,i);return}let p=o.now().ts+i*1e3,u={value:r,expiry:p};this._writeRaw(e,u,i)}_isSmpCachedValue(e){return t(e)}};export{m as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-OXO327UX.js";import{a as u}from"./chunk-RZ4YI35O.js";import{a as h}from"./chunk-NIJJBDPY.js";import{a as n}from"./chunk-EI7MMDWY.js";var _=class{static{n(this,"SmpHttpService")}static _cachePrefix="kik_rest_cache_";static _cacheStrategy=typeof sessionStorage<"u"?new h:new o;static _config={cachePrefix:this._cachePrefix,shared:new Map};static _errorClass=u;static _mergeParamsFallbackBaseUrl="https://ts-mapi-core";static $http(e){return this._generateAjax(e)}static async _generateAjax(e){if(e.cacheKey){let t=this._cacheRead(e.cacheKey);return t?Promise.resolve(t):this._generateAjaxBase(e).then(r=>(e.cacheKey&&this._cacheWrite(e.cacheKey,r),r))}return this._generateAjaxBase(e)}static async _generateAjaxBase(e){let t=await this._preprocessRequest(e),r={method:t.method,headers:new Headers({"content-type":"application/json",...t.headers}),body:t.body?JSON.stringify(t.body):null};return t.useCredentials&&(r.credentials="include"),t.url=this.mergeQueryParams(t.url,t.queryParams),fetch(t.url,r).then(a=>this._preprocessResponse(e,a)).then(a=>{if(a.ok){if(a.status===204||a.headers.get("content-length")==="0")return null;switch(t.responseType){case"blob":return a.blob();case"arraybuffer":return a.arrayBuffer();case"text":return a.text();case"json":default:return a.json()}}return a.json().then(s=>{let c=s;try{c=this._errorClass.fromPlain(s)}catch(i){console.debug("http: failed to parse error response into ErrorResponse",i)}return Promise.reject({status:a.status,message:a.statusText,body:c})})})}static cacheFlush(){this._cacheStrategy.flush()}static mergeQueryParams(e,t){let r=e.startsWith("http");if(t){let a=new URL(e,globalThis?.location?.origin||this._mergeParamsFallbackBaseUrl),s=Object.fromEntries(a.searchParams.entries());a.search=new URLSearchParams({...s,...Object.fromEntries(Object.entries(t).map(([c,i])=>[c,`${i}`]))}).toString(),e=r?a.href:a.pathname+a.search}return e}static _cacheKey(e){return`${this._config.cachePrefix}${e}`}static _cachePop(e){let t=this._cacheRead(e);return this._cacheRemove(e),t}static _cacheRead(e){return this._cacheStrategy.read(this._cacheKey(e))}static _cacheRemove(e){this._cacheStrategy.remove(this._cacheKey(e))}static _cacheWrite(e,t){this._cacheStrategy.write(this._cacheKey(e),t)}static async _preprocessRequest(e){return e}static async _preprocessResponse(e,t){return t}};export{_ as a};
1
+ import{a as o}from"./chunk-FAUAQNPB.js";import{a as u}from"./chunk-Z7KKB4KI.js";import{a as h}from"./chunk-V2OQU7B5.js";import{a as n}from"./chunk-EI7MMDWY.js";var _=class{static{n(this,"SmpHttpService")}static _cachePrefix="smp_rest_cache_";static _cacheStrategy=typeof sessionStorage<"u"?new h:new o;static _config={cachePrefix:this._cachePrefix,shared:new Map};static _errorClass=u;static _mergeParamsFallbackBaseUrl="https://ts-mapi-core";static $http(e){return this._generateAjax(e)}static async _generateAjax(e){if(e.cacheKey){let t=this._cacheRead(e.cacheKey);return t?Promise.resolve(t):this._generateAjaxBase(e).then(r=>(e.cacheKey&&this._cacheWrite(e.cacheKey,r),r))}return this._generateAjaxBase(e)}static async _generateAjaxBase(e){let t=await this._preprocessRequest(e),r={method:t.method,headers:new Headers({"content-type":"application/json",...t.headers}),body:t.body?JSON.stringify(t.body):null};return t.useCredentials&&(r.credentials="include"),t.url=this.mergeQueryParams(t.url,t.queryParams),fetch(t.url,r).then(a=>this._preprocessResponse(e,a)).then(a=>{if(a.ok){if(a.status===204||a.headers.get("content-length")==="0")return null;switch(t.responseType){case"blob":return a.blob();case"arraybuffer":return a.arrayBuffer();case"text":return a.text();case"json":default:return a.json()}}return a.json().then(s=>{let c=s;try{c=this._errorClass.fromPlain(s)}catch(i){console.debug("http: failed to parse error response into ErrorResponse",i)}return Promise.reject({status:a.status,message:a.statusText,body:c})})})}static cacheFlush(){this._cacheStrategy.flush()}static mergeQueryParams(e,t){let r=e.startsWith("http");if(t){let a=new URL(e,globalThis?.location?.origin||this._mergeParamsFallbackBaseUrl),s=Object.fromEntries(a.searchParams.entries());a.search=new URLSearchParams({...s,...Object.fromEntries(Object.entries(t).map(([c,i])=>[c,`${i}`]))}).toString(),e=r?a.href:a.pathname+a.search}return e}static _cacheKey(e){return`${this._config.cachePrefix}${e}`}static _cachePop(e){let t=this._cacheRead(e);return this._cacheRemove(e),t}static _cacheRead(e){return this._cacheStrategy.read(this._cacheKey(e))}static _cacheRemove(e){this._cacheStrategy.remove(this._cacheKey(e))}static _cacheWrite(e,t){this._cacheStrategy.write(this._cacheKey(e),t)}static async _preprocessRequest(e){return e}static async _preprocessResponse(e,t){return t}};export{_ as a};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-EI7MMDWY.js";function p(e){return typeof e=="object"&&e!==null&&"value"in e&&"expiry"in e&&typeof e.expiry=="number"}n(p,"smpIsSmpCachedValue");export{p as a};
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-EI7MMDWY.js";var o=class{static{l(this,"SmpAbstractCacheStrategy")}};export{o as a};
@@ -0,0 +1 @@
1
+ import{a as u}from"./chunk-DOKJQH4K.js";import{a as f}from"./chunk-R6VG4656.js";import{a as p}from"./chunk-4NS456EU.js";import{a as c}from"./chunk-EI7MMDWY.js";var h=class l{static{c(this,"SmpCommonUtils")}static arrayRemove(t,r){let e=[],s=t.filter((n,i)=>r(n,i)&&e.push(i));return e.reverse().forEach(n=>t.splice(n,1)),s}static assertIsArray(t,r){if(!Array.isArray(t))throw new Error(r||`${this.constructor.name} => val was not an array`)}static assertIsBoolean(t,r){if(!this.isBoolean(t))throw new Error(r||`${this.constructor.name} => val was not boolean`)}static assertIsFunction(t,r){if(!this.isFunction(t))throw new Error(r||`${this.constructor.name} => entity was not a function`)}static assertIsInstance(t,r,e){if(!(t instanceof r))throw new Error(e||`${this.constructor.name} => val was not instance of class`)}static assertIsNotEmpty(t,r){if(this.isEmpty(t))throw new Error(r||`${this.constructor.name} => entity was empty`)}static assertIsNumber(t,r){if(typeof t!="number")throw new Error(r||`${this.constructor.name} => val was not numeric`)}static assertIsNumeric(t,r){if(!this.isNumeric(t))throw new Error(r||`${this.constructor.name} => val was not numeric`)}static assertIsObject(t,r){if(!this.isObject(t))throw new Error(r||`${this.constructor.name} => val was not an object`)}static assertIsString(t,r){if(!this.isString(t))throw new Error(r||`${this.constructor.name} => val was not a string`)}static assertIsTruthy(t,r){if(!t)throw new Error(r||`${this.constructor.name} => condition wasn't truthy`)}static buildPath(...t){let r=t.filter(e=>!!e).join("/").replace(/(?<!:)\/\/+/g,"/");return r.startsWith("http")&&!r.endsWith("/")?`${r}/`:r}static downloadBlob(t,r){let e=window.URL.createObjectURL(t),s=document.createElement("a");s.href=e,s.setAttribute("download",r),document.body.appendChild(s),s.click()}static generateRandomHexString(t=12){let r="0123456789abcdef",e="";for(let s=0;s<t;s++){let n=Math.floor(Math.random()*r.length);e+=r[n]}return e}static generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})}static getDecimalPrecision(t){if(this.assertIsNumeric(t),!isFinite(+t))return 0;let r=1,e=0;for(;Math.round(+t*r)/r!==t;)r*=10,e++;return e}static getType(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}static isBoolean(t){return typeof t=="boolean"}static isColor(t){if(!t||!this.isString(t))return!1;let r=new Option().style;return r.color=t,r.color!==""}static isEmpty(t){return!t&&t!==0}static isEqual(t,r){function e(){if(t.length!==r.length)return!1;for(let o=0;o<t.length;o++)if(!l.isEqual(t[o],r[o]))return!1;return!0}c(e,"areArraysEqual");function s(){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&!l.isEqual(t[o],r[o]))return!1;return!0}c(s,"areObjectsEqual");function n(){return t.toString()===r.toString()}c(n,"areFunctionsEqual");function i(){return t===r}c(i,"arePrimativesEqual");let a=this.getType(t);return a!==this.getType(r)?!1:a==="array"?e():a==="object"?s():a==="function"?n():i()}static isFormField(t){return/^(?:input|select|textarea|button)$/i.test(t.nodeName)}static isFunction(t){return typeof t==typeof isNaN}static isNotEmpty(t){return!this.isEmpty(t)}static isNumber(t){return typeof t=="number"&&this.isNumeric(t)}static isNumeric(t){return!isNaN(t)}static isObject(t){return!!t&&t===Object(t)&&t.constructor===Object}static isPrimitive(t){let r=this.getType(t);return r!=="function"&&(r!=="object"||!t)}static isString(t){return typeof t=="string"}static isWindows(){return navigator.userAgent.toLowerCase().includes("win")}static mapObject(t,r){if(this.assertIsFunction(r,`CommonUtils => expected type of iteratee to be Function, got ${typeof r}`),this.isObject(t))return Object.entries(t).reduce((e,[s,n])=>(e.push(r(n,s)),e),[]);if(Array.isArray(t))return t.map(r);throw new Error(`CommonUtils => invalid object provided. Expected Object or Array, got ${typeof r}`)}static mapObjectKeys(t,r){return Object.entries(t).reduce((e,[s,n])=>(e[s]=r.call(null,s,n),e),{})}static mapObjectValues(t,r){return this.isObject(t)?Object.entries(t).reduce((e,[s,n])=>(e[s]=r.call(null,n,s),e),{}):{}}static noop(){}static objectHasValue(t,r){return!!~Object.values(t).filter(e=>this.isEqual(e,r))}static omit(t,r){return Object.keys(t).filter(s=>!r.includes(s)).reduce((s,n)=>(s[n]=t[n],s),{})}static parseBoolean(t){return t?/^true$/i.test(t):!1}static parseJsonSafely(t){try{return JSON.parse(t)}catch(r){console.warn(`${this.constructor.name} => couldn't parse json string`,{str:t,error:r});return}}static pick(t,r){return r.reduce((e,s)=>(s in t&&(e[s]=t[s]),e),{})}static runSafely(t,r=null,e=[]){if(this.isFunction(t))return t.apply(r,e)}static sleep(t){return new Promise(r=>setTimeout(r,t))}static sprintf(t,...r){return this.isString(t)&&r.length?this.sprintf(t.replace("%s",String(r.shift())),...r):t}static stripComments(t){return typeof t=="string"?t.replace(/(<!--.*?-->)|(<!--[\S\s]+?-->)|(<!--[\S\s]*?$)/g,""):t}static submitFakeForm({action:t,method:r=p.POST,data:e,target:s}){let n=Object.entries(e||{}).map(([a,o])=>`<input name="${a}" type="hidden" value="${o}" />`),i=document.createElement("form");i.method=r,i.action=t,i.innerHTML=`${n}`,i.target=s||"_self",document.body.append(i),i.submit()}static toCamelCase(t){return this.words(t.replace(/['\u2019]/g,"")).reduce((r,e,s)=>(e=e.toLowerCase(),r+(s?e.charAt(0).toUpperCase()+e.slice(1):e)),"")}static toKebabCase(t){return this.words(t.replace(/['\u2019]/g,"")).join("-").toLowerCase()}static toPascalCase(t){return this.toCamelCase(t).replace(/^(.)/,r=>r.toUpperCase())}static toSnakeCase(t){return this.words(t.replace(/['\u2019]/g,"")).join("_").toLowerCase()}static toUpperSnakeCase(t){return this.toSnakeCase(t).toUpperCase()}static words(t,r){return r===void 0?(u.HAS_UNICODE_WORD(t)?u.unicodeWords(t):f(t))||[]:t.match(r)||[]}};export{h as a};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-3AFPQCOH.js";import{a as e}from"./chunk-EI7MMDWY.js";var a=class extends s{static{e(this,"SmpInMemoryCache")}static _storage=new Map;get _staticSelf(){return this.constructor}_flushRaw(){this._staticSelf._storage.clear()}_readRaw(t){return this._staticSelf._storage.get(t)}_removeRaw(t){this._staticSelf._storage.delete(t)}_writeRaw(t,r){this._staticSelf._storage.set(t,r)}};export{a};
@@ -0,0 +1 @@
1
+ import{a as i}from"./chunk-3AFPQCOH.js";import{a as s}from"./chunk-EI7MMDWY.js";var o=class extends i{static{s(this,"SmpBrowserCache")}_storage;_prefix;constructor(t,e){super(),this._storage=t,this._prefix=e}_flushRaw(){let t=[],e=-1;for(;++e<this._storage.length;){let r=this._storage.key(e);r&&r.startsWith(this._prefix)&&t.push(r)}for(e=-1;++e<t.length;)this._storage.removeItem(t[e])}_readRaw(t){let e=this._storage.getItem(this._prefix+t);try{return e?JSON.parse(e):void 0}catch{console.warn(`${this.constructor.name}: failed to parse cache item for key ${this._prefix+t}`);return}}_removeRaw(t){this._storage.removeItem(this._prefix+t)}_writeRaw(t,e){try{this._storage.setItem(this._prefix+t,JSON.stringify(e))}catch(r){console.warn(`${this.constructor.name}: failed to write cache item for key ${this._prefix+t}`,r)}}};export{o as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-5VCNTUI6.js";import{a as t}from"./chunk-DADFHUII.js";import{a as s}from"./chunk-EI7MMDWY.js";import{map as u}from"rxjs";import{DateTime as m}from"ts-luxon";var p=class extends t{static{s(this,"SmpAbstractRxjsTtlCacheStrategy")}flush(){return this._flushRaw()}read(r){return this._readRaw(r).pipe(u(e=>{if(this._isSmpCachedValue(e)){if(e.expiry>=m.now().ts)return e.value;this._removeRaw(r).subscribe();return}return e}))}remove(r){return this._removeRaw(r)}write(r,e,i){if(isNaN(+i)||+i<=0)return this._writeRaw(r,e,i);let n=m.now().ts+i*1e3,o={value:e,expiry:n};return this._writeRaw(r,o,i)}_isSmpCachedValue(r){return a(r)}};export{p as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-EI7MMDWY.js";import{DateTime as i}from"ts-luxon";var r=class s{static{e(this,"SmpSid")}value;expiry;get active(){return this.value.endsWith(this._controlSuffix)}get expired(){return i.now().ts>this.expiry}get valid(){return!this.expired}_controlSuffix;constructor(t=`gcpsid-xxxx-${+i.now().ts}`,x=0){this.value=t,this.expiry=x,this._controlSuffix="$1"}static parse(t){return new s(t.value,t.expiry)}toPlain(){return{value:this.value,expiry:this.expiry}}};export{r as a};
1
+ import{a as e}from"./chunk-EI7MMDWY.js";import{DateTime as i}from"ts-luxon";var r=class s{static{e(this,"SmpSid")}value;expiry;get active(){return this.value.endsWith(this._controlSuffix)}get expired(){return i.now().ts>this.expiry}get valid(){return!this.expired}_controlSuffix;constructor(t=`sid-xxxx-${+i.now().ts}`,x=0){this.value=t,this.expiry=x,this._controlSuffix="$1"}static parse(t){return new s(t.value,t.expiry)}toPlain(){return{value:this.value,expiry:this.expiry}}};export{r as a};
File without changes
@@ -0,0 +1 @@
1
+ import{a as i}from"./chunk-EI7MMDWY.js";import o,{ZodIssueCode as u,ZodParsedType as c}from"zod";import{DateTime as r}from"ts-luxon";var f=class m extends o.ZodType{static{i(this,"SmpZodDateTime")}constructor(t){super({typeName:"SmpZodDateTime",coerce:t?.coerce??!1,checks:t?.checks??[]})}_parse(t){let n=this._getOrReturnCtx(t),s=n.data;if(this._def.coerce&&(s=this._coerceToDateTime(s),!(s instanceof r)||!s.isValid))return o.addIssueToContext(n,{code:u.invalid_type,expected:c.date,received:c.unknown,path:n.path,message:"Invalid date format"}),o.INVALID;if((!(s instanceof r)||!s.isValid)&&!this._def.coerce)return o.addIssueToContext(n,{code:u.invalid_type,expected:c.date,received:c.unknown,path:n.path,message:"Input must be a valid DateTime object"}),o.INVALID;let p={min:i((e,a,d)=>{if(e.min&&a<e.min)return{code:u.too_small,minimum:e.min.toMillis(),type:"date",inclusive:!0,message:e.message??`Date must be \u2265 ${e.min.toISODate()}`,path:d.path}},"min"),max:i((e,a,d)=>{if(e.max&&a>e.max)return{code:u.too_big,maximum:e.max.toMillis(),type:"date",inclusive:!0,message:e.message??`Date must be \u2264 ${e.max.toISODate()}`,path:d.path}},"max"),between:i((e,a,d)=>{if(e.min&&e.max&&(a<e.min||a>e.max))return{code:u.custom,message:e.message??`Date must be between ${e.min.toISODate()} and ${e.max.toISODate()}`,path:d.path}},"between")};for(let e of this._def.checks)if(s instanceof r&&s.isValid){let a=p[e.kind](e,s,n);a&&o.addIssueToContext(n,a)}return n.common.issues.length>0?o.INVALID:o.OK(s)}between(t,n,s){return new m({...this._def,checks:[...this._def.checks,{kind:"between",min:t.toUTC(),max:n.toUTC(),message:s}]})}coerce(){return new m({...this._def,coerce:!0})}max(t,n){return new m({...this._def,checks:[...this._def.checks,{kind:"max",max:t.toUTC(),message:n}]})}min(t,n){return new m({...this._def,checks:[...this._def.checks,{kind:"min",min:t.toUTC(),message:n}]})}_coerceToDateTime(t){if(t instanceof r&&t.isValid)return t;let n={string:i(()=>r.fromJSDate(new Date(t)),"string"),number:i(()=>r.fromMillis(t),"number"),object:i(()=>r.fromJSDate(t),"object"),default:i(()=>null,"default")};return(n[typeof t]||n.default)()}},h=i((m={})=>new f({coerce:m.coerce??!1,checks:[]}),"smpZodDateTime");export{f as a,h as b};
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-EI7MMDWY.js";import{catchError as u,throwError as f}from"rxjs";function i(t,o){return s=>s.pipe(u(n=>(typeof t==typeof isNaN?a(t)?e(n,t):t(n):!1)?o(n):f(()=>n)))}c(i,"smpRxjsCatchOnly");function a(t){try{return Reflect.construct(String,[],t),!0}catch{return!1}}c(a,"isConstructor");function e(t,o){return typeof t=="object"&&t!==null&&t.constructor===o}c(e,"isExactInstance");export{i as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-LDLBKVKD.js";import{a as r}from"./chunk-EI7MMDWY.js";var e=class extends s{static{r(this,"SmpHttpSessionStorageCache")}constructor(){super(sessionStorage,"smp_rest_cache_")}};export{e as a};
1
+ import{a as s}from"./chunk-GALYBKBP.js";import{a as r}from"./chunk-EI7MMDWY.js";var e=class extends s{static{r(this,"SmpHttpSessionStorageCache")}constructor(){super(sessionStorage,"smp_rest_cache_")}};export{e as a};
@@ -0,0 +1 @@
1
+ import{a,b as c,d as h}from"./chunk-XZEYUIQ6.js";import{a as r}from"./chunk-Z7KKB4KI.js";import{a as o}from"./chunk-Z5KZUWJJ.js";import{a as s}from"./chunk-EI7MMDWY.js";var n=class{static{s(this,"SmpSecureCode")}_baseCode;get baseCode(){return this._baseCode}get secureCode(){return this._encode()}_crcLength;_seed;constructor(e){this._baseCode=e,this._crcLength=5,this._seed="changeme"}static check(e,t){if(new this(e).secureCode!==t)throw r.create({messages:"WRONG_SECURE_CODE",errorCode:"WRONG_SECURE_CODE",status:o.BadRequest})}_encode(){let e=new h;return e.update(c.parse(this._seed+this._baseCode)),e.finalize().toString(a).substring(0,this._crcLength).toUpperCase()}};export{n as a};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-YYOHQHR4.js";import{a as u}from"./chunk-S3E7FKAY.js";import{a}from"./chunk-EI7MMDWY.js";import{Expose as d,plainToInstance as E}from"class-transformer";function l(r,e,t,s){var n=arguments.length,o=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,t,s);else for(var c=r.length-1;c>=0;c--)(p=r[c])&&(o=(n<3?p(o):n>3?p(e,t,o):p(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o}a(l,"_ts_decorate");function m(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}a(m,"_ts_metadata");var i=class r extends f{static{a(this,"SmpErrorResponse")}_errorCode;_status;static get DEFAULT_MESSAGES(){return[new u("GENERIC_ERROR")]}get errorCode(){return this._errorCode}get status(){return this._status}get timestamp(){return this._timestamp}_timestamp;constructor(e=r.DEFAULT_MESSAGES,t="GENERIC_ERROR",s=500,n){super(e,n),this._errorCode=t,this._status=s,this._timestamp=Date.now()}static create({messages:e=r.DEFAULT_MESSAGES,...t}={}){return new r(u.sanitizeMessages(e),t.errorCode,t.status,t.data)}static fromPlain(e){let t=E(_,e,{excludePrefixes:["_"]}),s=new r;return Object.getOwnPropertyNames(t).forEach(n=>{n in s&&(s[n]=t[n])}),s}};l([d(),m("design:type",Object),m("design:paramtypes",[])],i.prototype,"errorCode",null);l([d(),m("design:type",Number),m("design:paramtypes",[])],i.prototype,"timestamp",null);var _=class extends i{static{a(this,"SmpErrorResponseMutable")}set errorCode(e){this._errorCode=e}set status(e){this._status=e}set timestamp(e){this._timestamp=e}};export{i as a};
@@ -27,6 +27,7 @@ export { SmpGiftcardTransactionPlain } from './shared/giftcard/smp-giftcard-tran
27
27
  export { KikMarketingCloudValidationResponse, KikMarketingCloudValidationResponseKo, KikMarketingCloudValidationResponseOk } from './shared/marketing-cloud/smp-marketing-cloud-validation-response.interface.js';
28
28
  export { SmpMarketingCloudValidators } from './shared/marketing-cloud/smp-marketing-cloud-validators.enum.js';
29
29
  export { SmpFirebaseErrors } from './shared/firebase/smp-firebase-errors.enum.js';
30
+ export { SmpAbstractRxjsTtlCacheStrategy } from './shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.js';
30
31
  export { smpRxjsCatchOnly } from './shared/rxjs/smp-rxjs-catch-only.function.js';
31
32
  export { smpRxjsThrowIfEmpty } from './shared/rxjs/smp-rxjs-throw-if-empty.function.js';
32
33
  export { smpRxjsThrowOnCondition } from './shared/rxjs/smp-rxjs-throw-on-condition.function.js';
@@ -37,20 +38,25 @@ export { smpNoop } from './shared/utils/smp-noop.function.js';
37
38
  export { SmpRegularExpressions } from './shared/utils/smp-regular-expressions.class.js';
38
39
  export { SmpBrowserCache } from './shared/utils/cache/smp-browser-cache.class.js';
39
40
  export { SmpCacheStrategy } from './shared/utils/cache/smp-cache-strategy.interface.js';
41
+ export { SmpCachedValue } from './shared/utils/cache/smp-cached-value.interface.js';
42
+ export { SmpAbstractCacheStrategy } from './shared/utils/cache/smp-abstract-cache-strategy.class.js';
43
+ export { SmpAbstractTtlCacheStrategy } from './shared/utils/cache/smp-abstract-ttl-cache-strategy.class.js';
40
44
  export { SmpInMemoryCache } from './shared/utils/cache/smp-in-memory-cache.class.js';
45
+ export { smpIsSmpCachedValue } from './shared/utils/cache/smp-is-smp-cached-value.function.js';
46
+ export { SmpZodDateTime, smpZodDateTime } from './shared/zod/smp-zod-date-time.definition.js';
47
+ export { SmpDynamoService } from './services/smp-dynamo.service.js';
41
48
  export { SmpFirebaseService } from './services/firebase/smp-firebase.service.js';
42
49
  export { SmpFirebaseServiceConfig } from './services/firebase/smp-firebase-service-config.interface.js';
43
- export { SmpDynamoService } from './services/smp-dynamo.service.js';
44
50
  import './services/http/smp-dynamic-fetch-return.type.js';
45
51
  import './smp-logger-methods.class-F7p-lMeQ.js';
46
52
  import 'ts-luxon';
47
53
  import 'rxjs';
48
- import './shared/utils/smp-gcpsid-raw.interface.js';
49
- import 'firebase/app';
50
- import 'firebase/auth';
54
+ import 'zod';
51
55
  import '@aws-sdk/util-dynamodb';
52
56
  import '@aws-sdk/client-dynamodb';
57
+ import 'firebase/app';
58
+ import 'firebase/auth';
53
59
 
54
- declare const VERSION: "1.4.0";
60
+ declare const VERSION: "1.6.0";
55
61
 
56
62
  export { VERSION };
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"./chunk-Q77KUWBZ.js";import"./chunk-553CS7VH.js";import{a as E}from"./chunk-JF4ZPHEK.js";import"./chunk-L6UZLRQU.js";import{a as N}from"./chunk-CZTKNLYX.js";import{a as U}from"./chunk-QWZP25QT.js";import{a as O}from"./chunk-FLTR4ZY6.js";import"./chunk-T3P4NVTG.js";import"./chunk-THUEL7AA.js";import"./chunk-FE4YONC4.js";import{a as b}from"./chunk-QMTVV3AM.js";import"./chunk-R6VG4656.js";import{a as d}from"./chunk-4UTF5FWK.js";import"./chunk-NIN4PUZX.js";import{a as h}from"./chunk-RGLXAD7B.js";import{a as g}from"./chunk-FUXO6KMS.js";import"./chunk-DOKJQH4K.js";import"./chunk-D66G2KIE.js";import"./chunk-HOM5S5W3.js";import"./chunk-ZYPNYJVE.js";import"./chunk-BHFFGFHY.js";import{a as B}from"./chunk-VPL2IMUA.js";import{a as y}from"./chunk-U4GEYICC.js";import{a as v}from"./chunk-5XYURNIE.js";import"./chunk-NQICKEAS.js";import{a}from"./chunk-S7DRNW2X.js";import{a as i}from"./chunk-RJBWCWAE.js";import{a as s}from"./chunk-OM2B3B4I.js";import"./chunk-XZEYUIQ6.js";import"./chunk-EHABREBA.js";import"./chunk-4LYXZUNL.js";import"./chunk-ELQKTQ6W.js";import"./chunk-U5DBFRKV.js";import"./chunk-AV6X4R7W.js";import{a as D}from"./chunk-2YYH6VGI.js";import"./chunk-SXISZIFJ.js";import{a as I}from"./chunk-4NS456EU.js";import{a as n}from"./chunk-MD2DPFLF.js";import"./chunk-NHNK7NE2.js";import"./chunk-FAYDNSZG.js";import"./chunk-YFGB7SCJ.js";import{a as j}from"./chunk-7MD4IY4X.js";import{a as L}from"./chunk-LB7RIIRT.js";import{a as R}from"./chunk-WLD2KYV4.js";import{a as V}from"./chunk-4A2VEL4I.js";import{a as o}from"./chunk-W462XDMF.js";import"./chunk-RCI7NEJO.js";import{a as c}from"./chunk-ZNC4KYAS.js";import"./chunk-SDQLEPBS.js";import{a as _}from"./chunk-35U7P4SV.js";import{a as m}from"./chunk-OXO327UX.js";import{a as f}from"./chunk-RZ4YI35O.js";import{a as x}from"./chunk-YYOHQHR4.js";import{a as t}from"./chunk-S3E7FKAY.js";import{a as p}from"./chunk-QECKVXF4.js";import"./chunk-WTEJYEK2.js";import{a as e}from"./chunk-NIJJBDPY.js";import{a as r}from"./chunk-LDLBKVKD.js";import{a as S}from"./chunk-Z5KZUWJJ.js";import"./chunk-EI7MMDWY.js";var k="1.4.0";export{D as SMP_HEALTHZ,a as SmpAesCrypt,n as SmpApiCommonUtils,r as SmpBrowserCache,b as SmpCommonUtils,i as SmpCrypto,o as SmpDynamoService,f as SmpErrorResponse,d as SmpFilterException,L as SmpFirebaseErrors,j as SmpFirebaseService,x as SmpGenericResponse,B as SmpGiftcardTransaction,y as SmpGiftcardTransactionHashStrategies,v as SmpGiftcardTransactionOps,_ as SmpHttpService,e as SmpHttpSessionStorageCache,S as SmpHttpStatusCodes,m as SmpInMemoryCache,E as SmpMarketingCloudValidators,h as SmpRegularExpressions,t as SmpResponseMessage,p as SmpResponseMessageTypes,I as SmpRestVerbs,s as SmpSecureCode,g as SmpSid,R as SmpSocialSignInKeys,V as SmpSocialSignInUxModes,k as VERSION,c as smpNoop,N as smpRxjsCatchOnly,O as smpRxjsThrowIfEmpty,U as smpRxjsThrowOnCondition};
1
+ import"./chunk-O7TJDNO6.js";import{a as u,b as w}from"./chunk-QPKVVZUA.js";import"./chunk-T3P4NVTG.js";import"./chunk-B3OEBKFG.js";import"./chunk-EB55SS67.js";import"./chunk-FE4YONC4.js";import{a as j}from"./chunk-DTVHTARR.js";import"./chunk-DOKJQH4K.js";import"./chunk-R6VG4656.js";import{a as k}from"./chunk-4UTF5FWK.js";import"./chunk-NIN4PUZX.js";import{a as q}from"./chunk-RGLXAD7B.js";import{a as l}from"./chunk-MMNEY2JK.js";import"./chunk-Q77KUWBZ.js";import"./chunk-553CS7VH.js";import{a as N}from"./chunk-JF4ZPHEK.js";import"./chunk-6MJDU4CZ.js";import{a as h}from"./chunk-QWZP25QT.js";import{a as d}from"./chunk-QW43DOPY.js";import{a as U}from"./chunk-JFKLRHIQ.js";import{a as g}from"./chunk-FLTR4ZY6.js";import"./chunk-D66G2KIE.js";import"./chunk-HOM5S5W3.js";import"./chunk-ZYPNYJVE.js";import"./chunk-BHFFGFHY.js";import{a as L}from"./chunk-VPL2IMUA.js";import{a as F}from"./chunk-U4GEYICC.js";import{a as E}from"./chunk-5XYURNIE.js";import"./chunk-NQICKEAS.js";import{a as b}from"./chunk-S7DRNW2X.js";import{a as y}from"./chunk-RJBWCWAE.js";import{a as B}from"./chunk-VP72PKJQ.js";import"./chunk-XZEYUIQ6.js";import"./chunk-EHABREBA.js";import"./chunk-4LYXZUNL.js";import"./chunk-ELQKTQ6W.js";import"./chunk-U5DBFRKV.js";import"./chunk-AV6X4R7W.js";import{a as D}from"./chunk-2YYH6VGI.js";import"./chunk-SXISZIFJ.js";import{a as I}from"./chunk-4NS456EU.js";import{a as v}from"./chunk-MD2DPFLF.js";import"./chunk-NHNK7NE2.js";import"./chunk-YFGB7SCJ.js";import{a as o}from"./chunk-7MD4IY4X.js";import{a as O}from"./chunk-LB7RIIRT.js";import{a as R}from"./chunk-WLD2KYV4.js";import{a as V}from"./chunk-4A2VEL4I.js";import{a as r}from"./chunk-W462XDMF.js";import"./chunk-RCI7NEJO.js";import{a as s}from"./chunk-ZNC4KYAS.js";import"./chunk-SDQLEPBS.js";import{a}from"./chunk-3XWLMKWI.js";import{a as f}from"./chunk-FAUAQNPB.js";import{a as i}from"./chunk-Z7KKB4KI.js";import{a as c}from"./chunk-YYOHQHR4.js";import{a as _}from"./chunk-S3E7FKAY.js";import{a as S}from"./chunk-QECKVXF4.js";import"./chunk-WTEJYEK2.js";import{a as x}from"./chunk-V2OQU7B5.js";import{a as t}from"./chunk-GALYBKBP.js";import{a as p}from"./chunk-3AFPQCOH.js";import{a as m}from"./chunk-5VCNTUI6.js";import{a as e}from"./chunk-DADFHUII.js";import{a as n}from"./chunk-Z5KZUWJJ.js";import"./chunk-EI7MMDWY.js";var z="1.6.0";export{D as SMP_HEALTHZ,e as SmpAbstractCacheStrategy,U as SmpAbstractRxjsTtlCacheStrategy,p as SmpAbstractTtlCacheStrategy,b as SmpAesCrypt,v as SmpApiCommonUtils,t as SmpBrowserCache,j as SmpCommonUtils,y as SmpCrypto,r as SmpDynamoService,i as SmpErrorResponse,k as SmpFilterException,O as SmpFirebaseErrors,o as SmpFirebaseService,c as SmpGenericResponse,L as SmpGiftcardTransaction,F as SmpGiftcardTransactionHashStrategies,E as SmpGiftcardTransactionOps,a as SmpHttpService,x as SmpHttpSessionStorageCache,n as SmpHttpStatusCodes,f as SmpInMemoryCache,N as SmpMarketingCloudValidators,q as SmpRegularExpressions,_ as SmpResponseMessage,S as SmpResponseMessageTypes,I as SmpRestVerbs,B as SmpSecureCode,l as SmpSid,R as SmpSocialSignInKeys,V as SmpSocialSignInUxModes,u as SmpZodDateTime,z as VERSION,m as smpIsSmpCachedValue,s as smpNoop,d as smpRxjsCatchOnly,g as smpRxjsThrowIfEmpty,h as smpRxjsThrowOnCondition,w as smpZodDateTime};
@@ -6,4 +6,8 @@ import './smp-dynamic-fetch-return.type.js';
6
6
  import '../../shared/utils/cache/smp-cache-strategy.interface.js';
7
7
  import '../../shared/common/smp-generic-constructor.type.js';
8
8
  import '../../shared/utils/cache/smp-browser-cache.class.js';
9
+ import '../../shared/utils/cache/smp-abstract-ttl-cache-strategy.class.js';
10
+ import '../../shared/utils/cache/smp-abstract-cache-strategy.class.js';
11
+ import 'rxjs';
12
+ import '../../shared/utils/cache/smp-cached-value.interface.js';
9
13
  import '../../shared/api/smp-rest-verbs.enum.js';
@@ -1 +1 @@
1
- import"../../chunk-SDQLEPBS.js";import{a as b}from"../../chunk-35U7P4SV.js";import"../../chunk-OXO327UX.js";import"../../chunk-RZ4YI35O.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-WTEJYEK2.js";import{a}from"../../chunk-NIJJBDPY.js";import"../../chunk-LDLBKVKD.js";import{a as c}from"../../chunk-Z5KZUWJJ.js";import"../../chunk-EI7MMDWY.js";export{b as SmpHttpService,a as SmpHttpSessionStorageCache,c as SmpHttpStatusCodes};
1
+ import"../../chunk-SDQLEPBS.js";import{a as b}from"../../chunk-3XWLMKWI.js";import"../../chunk-FAUAQNPB.js";import"../../chunk-Z7KKB4KI.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-WTEJYEK2.js";import{a}from"../../chunk-V2OQU7B5.js";import"../../chunk-GALYBKBP.js";import"../../chunk-3AFPQCOH.js";import"../../chunk-5VCNTUI6.js";import"../../chunk-DADFHUII.js";import{a as c}from"../../chunk-Z5KZUWJJ.js";import"../../chunk-EI7MMDWY.js";export{b as SmpHttpService,a as SmpHttpSessionStorageCache,c as SmpHttpStatusCodes};
@@ -1,5 +1,8 @@
1
1
  import { SmpBrowserCache } from '../../shared/utils/cache/smp-browser-cache.class.js';
2
- import '../../shared/utils/cache/smp-cache-strategy.interface.js';
2
+ import '../../shared/utils/cache/smp-abstract-ttl-cache-strategy.class.js';
3
+ import '../../shared/utils/cache/smp-abstract-cache-strategy.class.js';
4
+ import 'rxjs';
5
+ import '../../shared/utils/cache/smp-cached-value.interface.js';
3
6
 
4
7
  declare class SmpHttpSessionStorageCache extends SmpBrowserCache {
5
8
  constructor();
@@ -1 +1 @@
1
- import{a}from"../../chunk-NIJJBDPY.js";import"../../chunk-LDLBKVKD.js";import"../../chunk-EI7MMDWY.js";export{a as SmpHttpSessionStorageCache};
1
+ import{a}from"../../chunk-V2OQU7B5.js";import"../../chunk-GALYBKBP.js";import"../../chunk-3AFPQCOH.js";import"../../chunk-5VCNTUI6.js";import"../../chunk-DADFHUII.js";import"../../chunk-EI7MMDWY.js";export{a as SmpHttpSessionStorageCache};
@@ -1 +1 @@
1
- import{a}from"../../chunk-35U7P4SV.js";import"../../chunk-OXO327UX.js";import"../../chunk-RZ4YI35O.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-NIJJBDPY.js";import"../../chunk-LDLBKVKD.js";import"../../chunk-EI7MMDWY.js";export{a as SmpHttpService};
1
+ import{a}from"../../chunk-3XWLMKWI.js";import"../../chunk-FAUAQNPB.js";import"../../chunk-Z7KKB4KI.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-V2OQU7B5.js";import"../../chunk-GALYBKBP.js";import"../../chunk-3AFPQCOH.js";import"../../chunk-5VCNTUI6.js";import"../../chunk-DADFHUII.js";import"../../chunk-EI7MMDWY.js";export{a as SmpHttpService};
@@ -9,6 +9,10 @@ import './http/smp-dynamic-fetch-return.type.js';
9
9
  import '../shared/utils/cache/smp-cache-strategy.interface.js';
10
10
  import '../shared/common/smp-generic-constructor.type.js';
11
11
  import '../shared/utils/cache/smp-browser-cache.class.js';
12
+ import '../shared/utils/cache/smp-abstract-ttl-cache-strategy.class.js';
13
+ import '../shared/utils/cache/smp-abstract-cache-strategy.class.js';
14
+ import 'rxjs';
15
+ import '../shared/utils/cache/smp-cached-value.interface.js';
12
16
  import '../shared/api/smp-rest-verbs.enum.js';
13
17
  import '../smp-logger-methods.class-F7p-lMeQ.js';
14
18
  import 'firebase/app';
@@ -1 +1 @@
1
- import"../chunk-FAYDNSZG.js";import"../chunk-YFGB7SCJ.js";import{a as f}from"../chunk-7MD4IY4X.js";import"../chunk-LB7RIIRT.js";import"../chunk-WLD2KYV4.js";import"../chunk-4A2VEL4I.js";import{a as m}from"../chunk-W462XDMF.js";import"../chunk-RCI7NEJO.js";import"../chunk-ZNC4KYAS.js";import"../chunk-SDQLEPBS.js";import{a as r}from"../chunk-35U7P4SV.js";import"../chunk-OXO327UX.js";import"../chunk-RZ4YI35O.js";import"../chunk-YYOHQHR4.js";import"../chunk-S3E7FKAY.js";import"../chunk-QECKVXF4.js";import"../chunk-WTEJYEK2.js";import{a as o}from"../chunk-NIJJBDPY.js";import"../chunk-LDLBKVKD.js";import{a as e}from"../chunk-Z5KZUWJJ.js";import"../chunk-EI7MMDWY.js";export{m as SmpDynamoService,f as SmpFirebaseService,r as SmpHttpService,o as SmpHttpSessionStorageCache,e as SmpHttpStatusCodes};
1
+ import"../chunk-FAYDNSZG.js";import"../chunk-YFGB7SCJ.js";import{a as m}from"../chunk-7MD4IY4X.js";import"../chunk-LB7RIIRT.js";import"../chunk-WLD2KYV4.js";import"../chunk-4A2VEL4I.js";import{a as f}from"../chunk-W462XDMF.js";import"../chunk-RCI7NEJO.js";import"../chunk-ZNC4KYAS.js";import"../chunk-SDQLEPBS.js";import{a as r}from"../chunk-3XWLMKWI.js";import"../chunk-FAUAQNPB.js";import"../chunk-Z7KKB4KI.js";import"../chunk-YYOHQHR4.js";import"../chunk-S3E7FKAY.js";import"../chunk-QECKVXF4.js";import"../chunk-WTEJYEK2.js";import{a as o}from"../chunk-V2OQU7B5.js";import"../chunk-GALYBKBP.js";import"../chunk-3AFPQCOH.js";import"../chunk-5VCNTUI6.js";import"../chunk-DADFHUII.js";import{a as e}from"../chunk-Z5KZUWJJ.js";import"../chunk-EI7MMDWY.js";export{f as SmpDynamoService,m as SmpFirebaseService,r as SmpHttpService,o as SmpHttpSessionStorageCache,e as SmpHttpStatusCodes};
@@ -1 +1 @@
1
- import"../../chunk-U5DBFRKV.js";import"../../chunk-AV6X4R7W.js";import{a as f}from"../../chunk-2YYH6VGI.js";import"../../chunk-SXISZIFJ.js";import{a as g}from"../../chunk-4NS456EU.js";import{a as e}from"../../chunk-MD2DPFLF.js";import"../../chunk-NHNK7NE2.js";import"../../chunk-RCI7NEJO.js";import"../../chunk-ZNC4KYAS.js";import{a as d}from"../../chunk-RZ4YI35O.js";import{a as c}from"../../chunk-YYOHQHR4.js";import{a as b}from"../../chunk-S3E7FKAY.js";import{a}from"../../chunk-QECKVXF4.js";import"../../chunk-EI7MMDWY.js";export{f as SMP_HEALTHZ,e as SmpApiCommonUtils,d as SmpErrorResponse,c as SmpGenericResponse,b as SmpResponseMessage,a as SmpResponseMessageTypes,g as SmpRestVerbs};
1
+ import"../../chunk-U5DBFRKV.js";import"../../chunk-AV6X4R7W.js";import{a as f}from"../../chunk-2YYH6VGI.js";import"../../chunk-SXISZIFJ.js";import{a as g}from"../../chunk-4NS456EU.js";import{a as e}from"../../chunk-MD2DPFLF.js";import"../../chunk-NHNK7NE2.js";import"../../chunk-RCI7NEJO.js";import"../../chunk-ZNC4KYAS.js";import{a as d}from"../../chunk-Z7KKB4KI.js";import{a as c}from"../../chunk-YYOHQHR4.js";import{a as b}from"../../chunk-S3E7FKAY.js";import{a}from"../../chunk-QECKVXF4.js";import"../../chunk-EI7MMDWY.js";export{f as SMP_HEALTHZ,e as SmpApiCommonUtils,d as SmpErrorResponse,c as SmpGenericResponse,b as SmpResponseMessage,a as SmpResponseMessageTypes,g as SmpRestVerbs};
@@ -8,17 +8,13 @@ import './smp-response-message-types.enum.js';
8
8
  declare class SmpErrorResponse<T = any> extends SmpGenericResponse<T, SmpGenericResponseBase & Pick<SmpErrorResponse, "errorCode" | "timestamp" | "status">> {
9
9
  protected _errorCode: number | string;
10
10
  protected _status: number;
11
+ static get DEFAULT_MESSAGES(): SmpResponseMessage[];
11
12
  get errorCode(): number | string;
12
13
  get status(): number;
13
14
  get timestamp(): number;
14
15
  protected _timestamp: number;
15
16
  constructor(messages?: SmpResponseMessage[], _errorCode?: number | string, _status?: number, data?: T);
16
- /**
17
- * @deprecated
18
- * @see SmpErrorResponse.create
19
- */
20
- static build<T>(messages?: SmpErrorResponseCreateOpts<any>["messages"], errorCode?: number | string, status?: number, data?: T): SmpErrorResponse;
21
- static create<T>({ messages, ...opts }: Partial<SmpErrorResponseCreateOpts<T>>): SmpErrorResponse;
17
+ static create<T>({ messages, ...opts }?: Partial<SmpErrorResponseCreateOpts<T>>): SmpErrorResponse;
22
18
  /**
23
19
  * This shouldn't be necessary, but it's a workaround for this bug https://github.com/typestack/class-transformer/issues/1807
24
20
  * @param plain
@@ -1 +1 @@
1
- import{a}from"../../chunk-RZ4YI35O.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-EI7MMDWY.js";export{a as SmpErrorResponse};
1
+ import{a}from"../../chunk-Z7KKB4KI.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-EI7MMDWY.js";export{a as SmpErrorResponse};
@@ -1 +1 @@
1
- import"../../chunk-NQICKEAS.js";import{a}from"../../chunk-S7DRNW2X.js";import{a as b}from"../../chunk-RJBWCWAE.js";import{a as c}from"../../chunk-OM2B3B4I.js";import"../../chunk-XZEYUIQ6.js";import"../../chunk-RZ4YI35O.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-Z5KZUWJJ.js";import"../../chunk-EI7MMDWY.js";export{a as SmpAesCrypt,b as SmpCrypto,c as SmpSecureCode};
1
+ import"../../chunk-NQICKEAS.js";import{a}from"../../chunk-S7DRNW2X.js";import{a as b}from"../../chunk-RJBWCWAE.js";import{a as c}from"../../chunk-VP72PKJQ.js";import"../../chunk-XZEYUIQ6.js";import"../../chunk-Z7KKB4KI.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-Z5KZUWJJ.js";import"../../chunk-EI7MMDWY.js";export{a as SmpAesCrypt,b as SmpCrypto,c as SmpSecureCode};
@@ -8,6 +8,11 @@ declare class SmpSecureCode {
8
8
  protected _crcLength: number;
9
9
  protected _seed: string;
10
10
  constructor(_baseCode: string);
11
+ /**
12
+ * Checks secure code, throws a 400 error on failure
13
+ * @param giftcardCode
14
+ * @param pinToVerify
15
+ */
11
16
  static check<T extends string>(giftcardCode: string, pinToVerify: T): asserts giftcardCode is T;
12
17
  protected _encode(): string;
13
18
  }
@@ -1 +1 @@
1
- import{a}from"../../chunk-OM2B3B4I.js";import"../../chunk-XZEYUIQ6.js";import"../../chunk-RZ4YI35O.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-Z5KZUWJJ.js";import"../../chunk-EI7MMDWY.js";export{a as SmpSecureCode};
1
+ import{a}from"../../chunk-VP72PKJQ.js";import"../../chunk-XZEYUIQ6.js";import"../../chunk-Z7KKB4KI.js";import"../../chunk-YYOHQHR4.js";import"../../chunk-S3E7FKAY.js";import"../../chunk-QECKVXF4.js";import"../../chunk-Z5KZUWJJ.js";import"../../chunk-EI7MMDWY.js";export{a as SmpSecureCode};
@@ -1,4 +1,7 @@
1
+ export { SmpAbstractRxjsTtlCacheStrategy } from './smp-abstract-rxjs-ttl-cache-strategy.class.js';
1
2
  export { smpRxjsCatchOnly } from './smp-rxjs-catch-only.function.js';
2
3
  export { smpRxjsThrowIfEmpty } from './smp-rxjs-throw-if-empty.function.js';
3
4
  export { smpRxjsThrowOnCondition } from './smp-rxjs-throw-on-condition.function.js';
4
5
  import 'rxjs';
6
+ import '../utils/cache/smp-abstract-cache-strategy.class.js';
7
+ import '../utils/cache/smp-cached-value.interface.js';
@@ -1 +1 @@
1
- import"../../chunk-L6UZLRQU.js";import{a}from"../../chunk-CZTKNLYX.js";import{a as c}from"../../chunk-QWZP25QT.js";import{a as b}from"../../chunk-FLTR4ZY6.js";import"../../chunk-EI7MMDWY.js";export{a as smpRxjsCatchOnly,b as smpRxjsThrowIfEmpty,c as smpRxjsThrowOnCondition};
1
+ import"../../chunk-6MJDU4CZ.js";import{a as d}from"../../chunk-QWZP25QT.js";import{a as b}from"../../chunk-QW43DOPY.js";import{a}from"../../chunk-JFKLRHIQ.js";import{a as c}from"../../chunk-FLTR4ZY6.js";import"../../chunk-5VCNTUI6.js";import"../../chunk-DADFHUII.js";import"../../chunk-EI7MMDWY.js";export{a as SmpAbstractRxjsTtlCacheStrategy,b as smpRxjsCatchOnly,c as smpRxjsThrowIfEmpty,d as smpRxjsThrowOnCondition};
@@ -0,0 +1,17 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SmpAbstractCacheStrategy } from '../utils/cache/smp-abstract-cache-strategy.class.js';
3
+ import { SmpCachedValue } from '../utils/cache/smp-cached-value.interface.js';
4
+
5
+ declare abstract class SmpAbstractRxjsTtlCacheStrategy extends SmpAbstractCacheStrategy {
6
+ protected abstract _flushRaw(): Observable<void>;
7
+ protected abstract _readRaw(key: string): Observable<unknown | undefined>;
8
+ protected abstract _removeRaw(key: string): Observable<void>;
9
+ protected abstract _writeRaw(key: string, value: unknown, ttl?: number): Observable<void>;
10
+ flush(): Observable<void>;
11
+ read<T = unknown>(key: string): Observable<T | undefined>;
12
+ remove(key: string): Observable<void>;
13
+ write<T = unknown>(key: string, value: T, ttl?: number): Observable<void>;
14
+ protected _isSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
15
+ }
16
+
17
+ export { SmpAbstractRxjsTtlCacheStrategy };
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-JFKLRHIQ.js";import"../../chunk-5VCNTUI6.js";import"../../chunk-DADFHUII.js";import"../../chunk-EI7MMDWY.js";export{a as SmpAbstractRxjsTtlCacheStrategy};
@@ -1,5 +1,5 @@
1
1
  import { ObservableInput, OperatorFunction, ObservedValueOf } from 'rxjs';
2
2
 
3
- declare function smpRxjsCatchOnly<T, E extends Error, O extends ObservableInput<any>>(errorType: new (...args: any[]) => E, selector: (err: E) => O): OperatorFunction<T, T | ObservedValueOf<O>>;
3
+ declare function smpRxjsCatchOnly<T, E extends Error, O extends ObservableInput<any>>(errorFilter: (new (...args: any[]) => E) | ((err: unknown) => boolean), selector: (err: E) => O): OperatorFunction<T, T | ObservedValueOf<O>>;
4
4
 
5
5
  export { smpRxjsCatchOnly };
@@ -1 +1 @@
1
- import{a}from"../../chunk-CZTKNLYX.js";import"../../chunk-EI7MMDWY.js";export{a as smpRxjsCatchOnly};
1
+ import{a}from"../../chunk-QW43DOPY.js";import"../../chunk-EI7MMDWY.js";export{a as smpRxjsCatchOnly};
@@ -0,0 +1,15 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SmpAbstractRxjsTtlCacheStrategy } from './smp-abstract-rxjs-ttl-cache-strategy.class.js';
3
+ import '../utils/cache/smp-abstract-cache-strategy.class.js';
4
+ import '../utils/cache/smp-cached-value.interface.js';
5
+
6
+ declare class KikRxjsInMemoryCache extends SmpAbstractRxjsTtlCacheStrategy {
7
+ private static _storage;
8
+ protected get _staticSelf(): typeof KikRxjsInMemoryCache;
9
+ protected _flushRaw(): Observable<void>;
10
+ protected _readRaw(key: string): Observable<unknown | undefined>;
11
+ protected _removeRaw(key: string): Observable<void>;
12
+ protected _writeRaw(key: string, value: unknown): Observable<void>;
13
+ }
14
+
15
+ export { KikRxjsInMemoryCache };
@@ -0,0 +1 @@
1
+ import{a}from"../../chunk-JFKLRHIQ.js";import"../../chunk-5VCNTUI6.js";import"../../chunk-DADFHUII.js";import{a as s}from"../../chunk-EI7MMDWY.js";import{defer as e,of as r}from"rxjs";var i=class extends a{static{s(this,"KikRxjsInMemoryCache")}static _storage=new Map;get _staticSelf(){return this.constructor}_flushRaw(){return e(()=>(this._staticSelf._storage.clear(),r(void 0)))}_readRaw(t){return e(()=>r(this._staticSelf._storage.get(t)))}_removeRaw(t){return e(()=>(this._staticSelf._storage.delete(t),r(void 0)))}_writeRaw(t,o){return e(()=>(this._staticSelf._storage.set(t,o),r(void 0)))}};export{i as KikRxjsInMemoryCache};
@@ -1,3 +1,8 @@
1
1
  export { SmpBrowserCache } from './smp-browser-cache.class.js';
2
2
  export { SmpCacheStrategy } from './smp-cache-strategy.interface.js';
3
+ export { SmpCachedValue } from './smp-cached-value.interface.js';
4
+ export { SmpAbstractCacheStrategy } from './smp-abstract-cache-strategy.class.js';
5
+ export { SmpAbstractTtlCacheStrategy } from './smp-abstract-ttl-cache-strategy.class.js';
3
6
  export { SmpInMemoryCache } from './smp-in-memory-cache.class.js';
7
+ export { smpIsSmpCachedValue } from './smp-is-smp-cached-value.function.js';
8
+ import 'rxjs';
@@ -1 +1 @@
1
- import"../../../chunk-THUEL7AA.js";import"../../../chunk-FE4YONC4.js";import{a as b}from"../../../chunk-OXO327UX.js";import{a}from"../../../chunk-LDLBKVKD.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpBrowserCache,b as SmpInMemoryCache};
1
+ import"../../../chunk-B3OEBKFG.js";import"../../../chunk-EB55SS67.js";import"../../../chunk-FE4YONC4.js";import{a as e}from"../../../chunk-FAUAQNPB.js";import{a as d}from"../../../chunk-GALYBKBP.js";import{a as c}from"../../../chunk-3AFPQCOH.js";import{a as b}from"../../../chunk-5VCNTUI6.js";import{a}from"../../../chunk-DADFHUII.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpAbstractCacheStrategy,c as SmpAbstractTtlCacheStrategy,d as SmpBrowserCache,e as SmpInMemoryCache,b as smpIsSmpCachedValue};
@@ -0,0 +1,10 @@
1
+ import { Observable } from 'rxjs';
2
+
3
+ declare abstract class SmpAbstractCacheStrategy {
4
+ abstract read<T = unknown>(key: string): T | undefined | Observable<T | undefined>;
5
+ abstract write<T = unknown>(key: string, value: T, ttl?: number): void | Observable<void>;
6
+ abstract remove(key: string): void | Observable<void>;
7
+ abstract flush(): void | Observable<void>;
8
+ }
9
+
10
+ export { SmpAbstractCacheStrategy };
@@ -0,0 +1 @@
1
+ import{a}from"../../../chunk-DADFHUII.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpAbstractCacheStrategy};
@@ -0,0 +1,17 @@
1
+ import { SmpAbstractCacheStrategy } from './smp-abstract-cache-strategy.class.js';
2
+ import { SmpCachedValue } from './smp-cached-value.interface.js';
3
+ import 'rxjs';
4
+
5
+ declare abstract class SmpAbstractTtlCacheStrategy extends SmpAbstractCacheStrategy {
6
+ protected abstract _flushRaw(): void;
7
+ protected abstract _readRaw(key: string): unknown | undefined;
8
+ protected abstract _removeRaw(key: string): void;
9
+ protected abstract _writeRaw(key: string, value: unknown, ttl?: number): void;
10
+ flush(): void;
11
+ read<T = unknown>(key: string): T | undefined;
12
+ remove(key: string): void;
13
+ write<T = unknown>(key: string, value: T, ttl?: number): void;
14
+ protected _isSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
15
+ }
16
+
17
+ export { SmpAbstractTtlCacheStrategy };
@@ -0,0 +1 @@
1
+ import{a}from"../../../chunk-3AFPQCOH.js";import"../../../chunk-5VCNTUI6.js";import"../../../chunk-DADFHUII.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpAbstractTtlCacheStrategy};
@@ -1,13 +1,16 @@
1
- import { SmpCacheStrategy } from './smp-cache-strategy.interface.js';
1
+ import { SmpAbstractTtlCacheStrategy } from './smp-abstract-ttl-cache-strategy.class.js';
2
+ import './smp-abstract-cache-strategy.class.js';
3
+ import 'rxjs';
4
+ import './smp-cached-value.interface.js';
2
5
 
3
- declare class SmpBrowserCache implements SmpCacheStrategy {
4
- protected _storage: typeof global.localStorage | typeof global.sessionStorage;
6
+ declare class SmpBrowserCache extends SmpAbstractTtlCacheStrategy {
7
+ protected _storage: typeof localStorage | typeof sessionStorage;
5
8
  protected _prefix: string;
6
- constructor(_storage: typeof global.localStorage | typeof global.sessionStorage, _prefix: string);
7
- flush(): void;
8
- read<T = unknown>(key: string): T | undefined;
9
- remove(key: string): void;
10
- write<T = unknown>(key: string, value: T): void;
9
+ constructor(_storage: typeof localStorage | typeof sessionStorage, _prefix: string);
10
+ protected _flushRaw(): void;
11
+ protected _readRaw(key: string): unknown | undefined;
12
+ protected _removeRaw(key: string): void;
13
+ protected _writeRaw(key: string, value: unknown): void;
11
14
  }
12
15
 
13
16
  export { SmpBrowserCache };
@@ -1 +1 @@
1
- import{a}from"../../../chunk-LDLBKVKD.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpBrowserCache};
1
+ import{a}from"../../../chunk-GALYBKBP.js";import"../../../chunk-3AFPQCOH.js";import"../../../chunk-5VCNTUI6.js";import"../../../chunk-DADFHUII.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpBrowserCache};
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @depcrecated use KikAbstractCacheStrategy instead.
3
+ * This entity will be removed in the next major version.
4
+ */
1
5
  interface SmpCacheStrategy {
2
6
  read<T = unknown>(key: string): T | undefined;
3
7
  write<T = unknown>(key: string, value: T): void;
@@ -0,0 +1,6 @@
1
+ interface SmpCachedValue<T = any> {
2
+ value: T;
3
+ expiry: number;
4
+ }
5
+
6
+ export type { SmpCachedValue };
@@ -0,0 +1 @@
1
+ import"../../../chunk-EB55SS67.js";
@@ -1,12 +1,15 @@
1
- import { SmpCacheStrategy } from './smp-cache-strategy.interface.js';
1
+ import { SmpAbstractTtlCacheStrategy } from './smp-abstract-ttl-cache-strategy.class.js';
2
+ import './smp-abstract-cache-strategy.class.js';
3
+ import 'rxjs';
4
+ import './smp-cached-value.interface.js';
2
5
 
3
- declare class SmpInMemoryCache implements SmpCacheStrategy {
6
+ declare class SmpInMemoryCache extends SmpAbstractTtlCacheStrategy {
4
7
  private static _storage;
5
- get staticStorage(): Map<string, unknown>;
6
- flush(): void;
7
- read<T = unknown>(key: string): T | undefined;
8
- remove(key: string): void;
9
- write<T = unknown>(key: string, value: T): void;
8
+ protected get _staticSelf(): typeof SmpInMemoryCache;
9
+ protected _flushRaw(): void;
10
+ protected _readRaw(key: string): unknown | undefined;
11
+ protected _removeRaw(key: string): void;
12
+ protected _writeRaw(key: string, value: unknown): void;
10
13
  }
11
14
 
12
15
  export { SmpInMemoryCache };
@@ -1 +1 @@
1
- import{a}from"../../../chunk-OXO327UX.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpInMemoryCache};
1
+ import{a}from"../../../chunk-FAUAQNPB.js";import"../../../chunk-3AFPQCOH.js";import"../../../chunk-5VCNTUI6.js";import"../../../chunk-DADFHUII.js";import"../../../chunk-EI7MMDWY.js";export{a as SmpInMemoryCache};
@@ -0,0 +1,9 @@
1
+ import { SmpCachedValue } from './smp-cached-value.interface.js';
2
+
3
+ /**
4
+ * Tells you if a value is a SmpCachedValue
5
+ * @param value
6
+ */
7
+ declare function smpIsSmpCachedValue<T>(value: unknown): value is SmpCachedValue<T>;
8
+
9
+ export { smpIsSmpCachedValue };
@@ -0,0 +1 @@
1
+ import{a}from"../../../chunk-5VCNTUI6.js";import"../../../chunk-EI7MMDWY.js";export{a as smpIsSmpCachedValue};