chore: fix pre commit format and pipeline issue (#1144)

This commit is contained in:
Wendong-Fan 2026-02-04 00:06:29 +00:00 committed by GitHub
parent 2256497dff
commit 893f51fc82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
970 changed files with 11235 additions and 9533 deletions

View file

@ -132,4 +132,4 @@ export {
normalize,
override
};
//# sourceMappingURL=format.js.map
//# sourceMappingURL=format.js.map

File diff suppressed because one or more lines are too long

View file

@ -198,4 +198,4 @@ export {
projectConfigDefaults,
projectConfigSchema
};
//# sourceMappingURL=schema.js.map
//# sourceMappingURL=schema.js.map

File diff suppressed because one or more lines are too long

View file

@ -57,4 +57,4 @@ function createCrud(options) {
export {
createCrud
};
//# sourceMappingURL=crud.js.map
//# sourceMappingURL=crud.js.map

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
//# sourceMappingURL=global.d.js.map
//# sourceMappingURL=global.d.js.map

View file

@ -1 +1 @@
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}

View file

@ -14,4 +14,4 @@ function getPasswordError(password) {
export {
getPasswordError
};
//# sourceMappingURL=password.js.map
//# sourceMappingURL=password.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/helpers/password.ts"],"sourcesContent":["import { KnownErrors } from \"..\";\n\nconst minLength = 8;\nconst maxLength = 70;\n\nexport function getPasswordError(password: string): KnownErrors[\"PasswordRequirementsNotMet\"] | undefined {\n if (password.length < minLength) {\n return new KnownErrors.PasswordTooShort(minLength);\n }\n\n if (password.length > maxLength) {\n return new KnownErrors.PasswordTooLong(maxLength);\n }\n\n return undefined;\n}\n"],"mappings":";AAAA,SAAS,mBAAmB;AAE5B,IAAM,YAAY;AAClB,IAAM,YAAY;AAEX,SAAS,iBAAiB,UAAyE;AACxG,MAAI,SAAS,SAAS,WAAW;AAC/B,WAAO,IAAI,YAAY,iBAAiB,SAAS;AAAA,EACnD;AAEA,MAAI,SAAS,SAAS,WAAW;AAC/B,WAAO,IAAI,YAAY,gBAAgB,SAAS;AAAA,EAClD;AAEA,SAAO;AACT;","names":[]}
{"version":3,"sources":["../../../src/helpers/password.ts"],"sourcesContent":["import { KnownErrors } from \"..\";\n\nconst minLength = 8;\nconst maxLength = 70;\n\nexport function getPasswordError(password: string): KnownErrors[\"PasswordRequirementsNotMet\"] | undefined {\n if (password.length < minLength) {\n return new KnownErrors.PasswordTooShort(minLength);\n }\n\n if (password.length > maxLength) {\n return new KnownErrors.PasswordTooLong(maxLength);\n }\n\n return undefined;\n}\n"],"mappings":";AAAA,SAAS,mBAAmB;AAE5B,IAAM,YAAY;AAClB,IAAM,YAAY;AAEX,SAAS,iBAAiB,UAAyE;AACxG,MAAI,SAAS,SAAS,WAAW;AAC/B,WAAO,IAAI,YAAY,iBAAiB,SAAS;AAAA,EACnD;AAEA,MAAI,SAAS,SAAS,WAAW;AAC/B,WAAO,IAAI,YAAY,gBAAgB,SAAS;AAAA,EAClD;AAEA,SAAO;AACT;","names":[]}

View file

@ -47,4 +47,4 @@ function getProductionModeErrors(project) {
export {
getProductionModeErrors
};
//# sourceMappingURL=production-mode.js.map
//# sourceMappingURL=production-mode.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/helpers/production-mode.ts"],"sourcesContent":["import { ProjectsCrud } from \"../interface/crud/projects\";\nimport { StackAssertionError, captureError } from \"../utils/errors\";\nimport { isLocalhost } from \"../utils/urls\";\n\nexport type ProductionModeError = {\n message: string,\n relativeFixUrl: `/${string}`,\n};\n\nexport function getProductionModeErrors(project: ProjectsCrud[\"Admin\"][\"Read\"]): ProductionModeError[] {\n const errors: ProductionModeError[] = [];\n const domainsFixUrl = `/projects/${project.id}/domains` as const;\n\n if (project.config.allow_localhost) {\n errors.push({\n message: \"Localhost is not allowed in production mode, turn off 'Allow localhost' in project settings\",\n relativeFixUrl: domainsFixUrl,\n });\n }\n\n for (const { domain } of project.config.domains) {\n let url;\n try {\n url = new URL(domain);\n } catch (e) {\n captureError(\"production-mode-domain-not-valid\", new StackAssertionError(\"Domain was somehow not a valid URL; we should've caught this when setting the domain in the first place\", {\n domain,\n projectId: project\n }));\n errors.push({\n message: \"Trusted domain is not a valid URL: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n continue;\n }\n\n if (isLocalhost(url)) {\n errors.push({\n message: \"Localhost domains are not allowed to be trusted in production mode: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n } else if (url.hostname.match(/^\\d+(\\.\\d+)*$/)) {\n errors.push({\n message: \"Direct IPs are not valid for trusted domains in production mode: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n } else if (url.protocol !== \"https:\") {\n errors.push({\n message: \"Trusted domains should be HTTPS: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n }\n }\n\n return errors;\n}\n"],"mappings":";AACA,SAAS,qBAAqB,oBAAoB;AAClD,SAAS,mBAAmB;AAOrB,SAAS,wBAAwB,SAA+D;AACrG,QAAM,SAAgC,CAAC;AACvC,QAAM,gBAAgB,aAAa,QAAQ,EAAE;AAE7C,MAAI,QAAQ,OAAO,iBAAiB;AAClC,WAAO,KAAK;AAAA,MACV,SAAS;AAAA,MACT,gBAAgB;AAAA,IAClB,CAAC;AAAA,EACH;AAEA,aAAW,EAAE,OAAO,KAAK,QAAQ,OAAO,SAAS;AAC/C,QAAI;AACJ,QAAI;AACF,YAAM,IAAI,IAAI,MAAM;AAAA,IACtB,SAAS,GAAG;AACV,mBAAa,oCAAoC,IAAI,oBAAoB,2GAA2G;AAAA,QAClL;AAAA,QACA,WAAW;AAAA,MACb,CAAC,CAAC;AACF,aAAO,KAAK;AAAA,QACV,SAAS,wCAAwC;AAAA,QACjD,gBAAgB;AAAA,MAClB,CAAC;AACD;AAAA,IACF;AAEA,QAAI,YAAY,GAAG,GAAG;AACpB,aAAO,KAAK;AAAA,QACV,SAAS,yEAAyE;AAAA,QAClF,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH,WAAW,IAAI,SAAS,MAAM,eAAe,GAAG;AAC9C,aAAO,KAAK;AAAA,QACV,SAAS,sEAAsE;AAAA,QAC/E,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH,WAAW,IAAI,aAAa,UAAU;AACpC,aAAO,KAAK;AAAA,QACV,SAAS,sCAAsC;AAAA,QAC/C,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
{"version":3,"sources":["../../../src/helpers/production-mode.ts"],"sourcesContent":["import { ProjectsCrud } from \"../interface/crud/projects\";\nimport { StackAssertionError, captureError } from \"../utils/errors\";\nimport { isLocalhost } from \"../utils/urls\";\n\nexport type ProductionModeError = {\n message: string,\n relativeFixUrl: `/${string}`,\n};\n\nexport function getProductionModeErrors(project: ProjectsCrud[\"Admin\"][\"Read\"]): ProductionModeError[] {\n const errors: ProductionModeError[] = [];\n const domainsFixUrl = `/projects/${project.id}/domains` as const;\n\n if (project.config.allow_localhost) {\n errors.push({\n message: \"Localhost is not allowed in production mode, turn off 'Allow localhost' in project settings\",\n relativeFixUrl: domainsFixUrl,\n });\n }\n\n for (const { domain } of project.config.domains) {\n let url;\n try {\n url = new URL(domain);\n } catch (e) {\n captureError(\"production-mode-domain-not-valid\", new StackAssertionError(\"Domain was somehow not a valid URL; we should've caught this when setting the domain in the first place\", {\n domain,\n projectId: project\n }));\n errors.push({\n message: \"Trusted domain is not a valid URL: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n continue;\n }\n\n if (isLocalhost(url)) {\n errors.push({\n message: \"Localhost domains are not allowed to be trusted in production mode: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n } else if (url.hostname.match(/^\\d+(\\.\\d+)*$/)) {\n errors.push({\n message: \"Direct IPs are not valid for trusted domains in production mode: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n } else if (url.protocol !== \"https:\") {\n errors.push({\n message: \"Trusted domains should be HTTPS: \" + domain,\n relativeFixUrl: domainsFixUrl,\n });\n }\n }\n\n return errors;\n}\n"],"mappings":";AACA,SAAS,qBAAqB,oBAAoB;AAClD,SAAS,mBAAmB;AAOrB,SAAS,wBAAwB,SAA+D;AACrG,QAAM,SAAgC,CAAC;AACvC,QAAM,gBAAgB,aAAa,QAAQ,EAAE;AAE7C,MAAI,QAAQ,OAAO,iBAAiB;AAClC,WAAO,KAAK;AAAA,MACV,SAAS;AAAA,MACT,gBAAgB;AAAA,IAClB,CAAC;AAAA,EACH;AAEA,aAAW,EAAE,OAAO,KAAK,QAAQ,OAAO,SAAS;AAC/C,QAAI;AACJ,QAAI;AACF,YAAM,IAAI,IAAI,MAAM;AAAA,IACtB,SAAS,GAAG;AACV,mBAAa,oCAAoC,IAAI,oBAAoB,2GAA2G;AAAA,QAClL;AAAA,QACA,WAAW;AAAA,MACb,CAAC,CAAC;AACF,aAAO,KAAK;AAAA,QACV,SAAS,wCAAwC;AAAA,QACjD,gBAAgB;AAAA,MAClB,CAAC;AACD;AAAA,IACF;AAEA,QAAI,YAAY,GAAG,GAAG;AACpB,aAAO,KAAK;AAAA,QACV,SAAS,yEAAyE;AAAA,QAClF,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH,WAAW,IAAI,SAAS,MAAM,eAAe,GAAG;AAC9C,aAAO,KAAK;AAAA,QACV,SAAS,sEAAsE;AAAA,QAC/E,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH,WAAW,IAAI,aAAa,UAAU;AACpC,aAAO,KAAK;AAAA,QACV,SAAS,sCAAsC;AAAA,QAC/C,gBAAgB;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}

View file

@ -35,4 +35,4 @@ export {
useAsyncCallback,
useAsyncCallbackWithLoggedError
};
//# sourceMappingURL=use-async-callback.js.map
//# sourceMappingURL=use-async-callback.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/hooks/use-async-callback.tsx"],"sourcesContent":["import React from \"react\";\nimport { captureError } from \"../utils/errors\";\n\nexport function useAsyncCallback<A extends any[], R>(\n callback: (...args: A) => Promise<R>,\n deps: React.DependencyList\n): [cb: (...args: A) => Promise<R>, loading: boolean, error: unknown | undefined] {\n const [error, setError] = React.useState<unknown | undefined>(undefined);\n const [loadingCount, setLoadingCount] = React.useState(0);\n\n const cb = React.useCallback(\n async (...args: A) => {\n setLoadingCount((c) => c + 1);\n try {\n return await callback(...args);\n } catch (e) {\n setError(e);\n throw e;\n } finally {\n setLoadingCount((c) => c - 1);\n }\n },\n deps,\n );\n\n return [cb, loadingCount > 0, error];\n}\n\nexport function useAsyncCallbackWithLoggedError<A extends any[], R>(\n callback: (...args: A) => Promise<R>,\n deps: React.DependencyList\n): [cb: (...args: A) => Promise<R>, loading: boolean] {\n const [newCallback, loading] = useAsyncCallback<A, R>(async (...args) => {\n try {\n return await callback(...args);\n } catch (e) {\n captureError(\"async-callback\", e);\n throw e;\n }\n }, deps);\n\n return [newCallback, loading];\n}\n"],"mappings":";AAAA,OAAO,WAAW;AAClB,SAAS,oBAAoB;AAEtB,SAAS,iBACd,UACA,MACgF;AAChF,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAA8B,MAAS;AACvE,QAAM,CAAC,cAAc,eAAe,IAAI,MAAM,SAAS,CAAC;AAExD,QAAM,KAAK,MAAM;AAAA,IACf,UAAU,SAAY;AACpB,sBAAgB,CAAC,MAAM,IAAI,CAAC;AAC5B,UAAI;AACF,eAAO,MAAM,SAAS,GAAG,IAAI;AAAA,MAC/B,SAAS,GAAG;AACV,iBAAS,CAAC;AACV,cAAM;AAAA,MACR,UAAE;AACA,wBAAgB,CAAC,MAAM,IAAI,CAAC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA;AAAA,EACF;AAEA,SAAO,CAAC,IAAI,eAAe,GAAG,KAAK;AACrC;AAEO,SAAS,gCACd,UACA,MACoD;AACpD,QAAM,CAAC,aAAa,OAAO,IAAI,iBAAuB,UAAU,SAAS;AACvE,QAAI;AACF,aAAO,MAAM,SAAS,GAAG,IAAI;AAAA,IAC/B,SAAS,GAAG;AACV,mBAAa,kBAAkB,CAAC;AAChC,YAAM;AAAA,IACR;AAAA,EACF,GAAG,IAAI;AAEP,SAAO,CAAC,aAAa,OAAO;AAC9B;","names":[]}
{"version":3,"sources":["../../../src/hooks/use-async-callback.tsx"],"sourcesContent":["import React from \"react\";\nimport { captureError } from \"../utils/errors\";\n\nexport function useAsyncCallback<A extends any[], R>(\n callback: (...args: A) => Promise<R>,\n deps: React.DependencyList\n): [cb: (...args: A) => Promise<R>, loading: boolean, error: unknown | undefined] {\n const [error, setError] = React.useState<unknown | undefined>(undefined);\n const [loadingCount, setLoadingCount] = React.useState(0);\n\n const cb = React.useCallback(\n async (...args: A) => {\n setLoadingCount((c) => c + 1);\n try {\n return await callback(...args);\n } catch (e) {\n setError(e);\n throw e;\n } finally {\n setLoadingCount((c) => c - 1);\n }\n },\n deps,\n );\n\n return [cb, loadingCount > 0, error];\n}\n\nexport function useAsyncCallbackWithLoggedError<A extends any[], R>(\n callback: (...args: A) => Promise<R>,\n deps: React.DependencyList\n): [cb: (...args: A) => Promise<R>, loading: boolean] {\n const [newCallback, loading] = useAsyncCallback<A, R>(async (...args) => {\n try {\n return await callback(...args);\n } catch (e) {\n captureError(\"async-callback\", e);\n throw e;\n }\n }, deps);\n\n return [newCallback, loading];\n}\n"],"mappings":";AAAA,OAAO,WAAW;AAClB,SAAS,oBAAoB;AAEtB,SAAS,iBACd,UACA,MACgF;AAChF,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAA8B,MAAS;AACvE,QAAM,CAAC,cAAc,eAAe,IAAI,MAAM,SAAS,CAAC;AAExD,QAAM,KAAK,MAAM;AAAA,IACf,UAAU,SAAY;AACpB,sBAAgB,CAAC,MAAM,IAAI,CAAC;AAC5B,UAAI;AACF,eAAO,MAAM,SAAS,GAAG,IAAI;AAAA,MAC/B,SAAS,GAAG;AACV,iBAAS,CAAC;AACV,cAAM;AAAA,MACR,UAAE;AACA,wBAAgB,CAAC,MAAM,IAAI,CAAC;AAAA,MAC9B;AAAA,IACF;AAAA,IACA;AAAA,EACF;AAEA,SAAO,CAAC,IAAI,eAAe,GAAG,KAAK;AACrC;AAEO,SAAS,gCACd,UACA,MACoD;AACpD,QAAM,CAAC,aAAa,OAAO,IAAI,iBAAuB,UAAU,SAAS;AACvE,QAAI;AACF,aAAO,MAAM,SAAS,GAAG,IAAI;AAAA,IAC/B,SAAS,GAAG;AACV,mBAAa,kBAAkB,CAAC;AAChC,YAAM;AAAA,IACR;AAAA,EACF,GAAG,IAAI;AAEP,SAAO,CAAC,aAAa,OAAO;AAC9B;","names":[]}

View file

@ -20,4 +20,4 @@ function useAsyncExternalStore(subscribe) {
export {
useAsyncExternalStore
};
//# sourceMappingURL=use-async-external-store.js.map
//# sourceMappingURL=use-async-external-store.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/hooks/use-async-external-store.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { AsyncResult } from \"../utils/results\";\n\nexport function useAsyncExternalStore<T>(\n subscribe: (callback: (t: T) => void) => (() => void),\n): AsyncResult<T, never> & { status: \"ok\" | \"pending\" } {\n // sure, the \"sync\" in useSyncExternalStore refers to \"synchronize a store\" and not \"sync/async\", but it's too good of a name to pass up on\n\n const [isAvailable, setIsAvailable] = useState(false);\n const [value, setValue] = useState<T>();\n useEffect(() => {\n const unsubscribe = subscribe((value: T) => {\n setValue(() => value);\n setIsAvailable(() => true);\n });\n return unsubscribe;\n }, [subscribe]);\n\n if (isAvailable) {\n return AsyncResult.ok(value as T);\n } else {\n return AsyncResult.pending();\n }\n}\n"],"mappings":";AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,mBAAmB;AAErB,SAAS,sBACd,WACsD;AAGtD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAY;AACtC,YAAU,MAAM;AACd,UAAM,cAAc,UAAU,CAACA,WAAa;AAC1C,eAAS,MAAMA,MAAK;AACpB,qBAAe,MAAM,IAAI;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,CAAC;AAEd,MAAI,aAAa;AACf,WAAO,YAAY,GAAG,KAAU;AAAA,EAClC,OAAO;AACL,WAAO,YAAY,QAAQ;AAAA,EAC7B;AACF;","names":["value"]}
{"version":3,"sources":["../../../src/hooks/use-async-external-store.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { AsyncResult } from \"../utils/results\";\n\nexport function useAsyncExternalStore<T>(\n subscribe: (callback: (t: T) => void) => (() => void),\n): AsyncResult<T, never> & { status: \"ok\" | \"pending\" } {\n // sure, the \"sync\" in useSyncExternalStore refers to \"synchronize a store\" and not \"sync/async\", but it's too good of a name to pass up on\n\n const [isAvailable, setIsAvailable] = useState(false);\n const [value, setValue] = useState<T>();\n useEffect(() => {\n const unsubscribe = subscribe((value: T) => {\n setValue(() => value);\n setIsAvailable(() => true);\n });\n return unsubscribe;\n }, [subscribe]);\n\n if (isAvailable) {\n return AsyncResult.ok(value as T);\n } else {\n return AsyncResult.pending();\n }\n}\n"],"mappings":";AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,mBAAmB;AAErB,SAAS,sBACd,WACsD;AAGtD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAY;AACtC,YAAU,MAAM;AACd,UAAM,cAAc,UAAU,CAACA,WAAa;AAC1C,eAAS,MAAMA,MAAK;AACpB,qBAAe,MAAM,IAAI;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,SAAS,CAAC;AAEd,MAAI,aAAa;AACf,WAAO,YAAY,GAAG,KAAU;AAAA,EAClC,OAAO;AACL,WAAO,YAAY,QAAQ;AAAA,EAC7B;AACF;","names":["value"]}

View file

@ -14,4 +14,4 @@ var useHash = () => {
export {
useHash
};
//# sourceMappingURL=use-hash.js.map
//# sourceMappingURL=use-hash.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/hooks/use-hash.tsx"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\nimport { suspendIfSsr } from \"../utils/react\";\n\nexport const useHash = () => {\n suspendIfSsr(\"useHash\");\n return useSyncExternalStore(\n (onChange) => {\n const interval = setInterval(() => onChange(), 10);\n return () => clearInterval(interval);\n },\n () => window.location.hash.substring(1)\n );\n};\n\n"],"mappings":";AAAA,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAEtB,IAAM,UAAU,MAAM;AAC3B,eAAa,SAAS;AACtB,SAAO;AAAA,IACL,CAAC,aAAa;AACZ,YAAM,WAAW,YAAY,MAAM,SAAS,GAAG,EAAE;AACjD,aAAO,MAAM,cAAc,QAAQ;AAAA,IACrC;AAAA,IACA,MAAM,OAAO,SAAS,KAAK,UAAU,CAAC;AAAA,EACxC;AACF;","names":[]}
{"version":3,"sources":["../../../src/hooks/use-hash.tsx"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\nimport { suspendIfSsr } from \"../utils/react\";\n\nexport const useHash = () => {\n suspendIfSsr(\"useHash\");\n return useSyncExternalStore(\n (onChange) => {\n const interval = setInterval(() => onChange(), 10);\n return () => clearInterval(interval);\n },\n () => window.location.hash.substring(1)\n );\n};\n\n"],"mappings":";AAAA,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAEtB,IAAM,UAAU,MAAM;AAC3B,eAAa,SAAS;AACtB,SAAO;AAAA,IACL,CAAC,aAAa;AACZ,YAAM,WAAW,YAAY,MAAM,SAAS,GAAG,EAAE;AACjD,aAAO,MAAM,cAAc,QAAQ;AAAA,IACrC;AAAA,IACA,MAAM,OAAO,SAAS,KAAK,UAAU,CAAC;AAAA,EACxC;AACF;","names":[]}

View file

@ -58,4 +58,4 @@ function useStrictMemo(callback, dependencies) {
export {
useStrictMemo
};
//# sourceMappingURL=use-strict-memo.js.map
//# sourceMappingURL=use-strict-memo.js.map

File diff suppressed because one or more lines are too long

View file

@ -19,4 +19,4 @@ export {
StackClientInterface,
StackServerInterface
};
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n StackAdminInterface\n} from \"./interface/adminInterface\";\nexport {\n StackClientInterface\n} from \"./interface/clientInterface\";\nexport {\n StackServerInterface\n} from \"./interface/serverInterface\";\nexport {\n KnownError,\n KnownErrors\n} from \"./known-errors\";\n\n"],"mappings":";AAAA;AAAA,EACE;AAAA,OACK;AACP;AAAA,EACE;AAAA,OACK;AACP;AAAA,EACE;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;","names":[]}
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n StackAdminInterface\n} from \"./interface/adminInterface\";\nexport {\n StackClientInterface\n} from \"./interface/clientInterface\";\nexport {\n StackServerInterface\n} from \"./interface/serverInterface\";\nexport {\n KnownError,\n KnownErrors\n} from \"./known-errors\";\n\n"],"mappings":";AAAA;AAAA,EACE;AAAA,OACK;AACP;AAAA,EACE;AAAA,OACK;AACP;AAAA,EACE;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;","names":[]}

View file

@ -241,4 +241,4 @@ var StackAdminInterface = class extends StackServerInterface {
export {
StackAdminInterface
};
//# sourceMappingURL=adminInterface.js.map
//# sourceMappingURL=adminInterface.js.map

File diff suppressed because one or more lines are too long

View file

@ -904,11 +904,11 @@ var StackClientInterface = class {
async _createNetworkError(cause, session, requestType) {
return new Error(deindent`
Stack Auth is unable to connect to the server. Please check your internet connection and try again.
If the problem persists, please contact support and provide a screenshot of your entire browser console.
${cause}
${JSON.stringify(await this.runNetworkDiagnostics(session, requestType), null, 2)}
`, { cause });
}
@ -2040,4 +2040,4 @@ var StackClientInterface = class {
export {
StackClientInterface
};
//# sourceMappingURL=clientInterface.js.map
//# sourceMappingURL=clientInterface.js.map

File diff suppressed because one or more lines are too long

View file

@ -74,4 +74,4 @@ export {
contactChannelsCrudServerCreateSchema,
contactChannelsCrudServerUpdateSchema
};
//# sourceMappingURL=contact-channels.js.map
//# sourceMappingURL=contact-channels.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/contact-channels.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { contactChannelIdSchema, contactChannelIsPrimarySchema, contactChannelIsVerifiedSchema, contactChannelTypeSchema, contactChannelUsedForAuthSchema, contactChannelValueSchema, userIdOrMeSchema, userIdSchema, yupMixed, yupObject } from \"../../schema-fields\";\n\nexport const contactChannelsClientReadSchema = yupObject({\n user_id: userIdSchema.defined(),\n id: contactChannelIdSchema.defined(),\n value: contactChannelValueSchema.defined(),\n type: contactChannelTypeSchema.defined(),\n used_for_auth: contactChannelUsedForAuthSchema.defined(),\n is_verified: contactChannelIsVerifiedSchema.defined(),\n is_primary: contactChannelIsPrimarySchema.defined(),\n}).defined();\n\nexport const contactChannelsCrudClientUpdateSchema = yupObject({\n value: contactChannelValueSchema.optional(),\n type: contactChannelTypeSchema.optional(),\n used_for_auth: contactChannelUsedForAuthSchema.optional(),\n is_primary: contactChannelIsPrimarySchema.optional(),\n}).defined();\n\nexport const contactChannelsCrudServerUpdateSchema = contactChannelsCrudClientUpdateSchema.concat(yupObject({\n is_verified: contactChannelIsVerifiedSchema.optional(),\n}));\n\nexport const contactChannelsCrudClientCreateSchema = yupObject({\n user_id: userIdOrMeSchema.defined(),\n value: contactChannelValueSchema.defined(),\n type: contactChannelTypeSchema.defined(),\n used_for_auth: contactChannelUsedForAuthSchema.defined(),\n is_primary: contactChannelIsPrimarySchema.optional(),\n}).defined();\n\nexport const contactChannelsCrudServerCreateSchema = contactChannelsCrudClientCreateSchema.concat(yupObject({\n is_verified: contactChannelIsVerifiedSchema.optional(),\n}));\n\nexport const contactChannelsCrudClientDeleteSchema = yupMixed();\n\nexport const contactChannelsCrud = createCrud({\n clientReadSchema: contactChannelsClientReadSchema,\n clientUpdateSchema: contactChannelsCrudClientUpdateSchema,\n clientCreateSchema: contactChannelsCrudClientCreateSchema,\n clientDeleteSchema: contactChannelsCrudClientDeleteSchema,\n serverUpdateSchema: contactChannelsCrudServerUpdateSchema,\n serverCreateSchema: contactChannelsCrudServerCreateSchema,\n docs: {\n clientRead: {\n summary: \"Get a contact channel\",\n description: \"Retrieves a specific contact channel by the user ID and the contact channel ID.\",\n tags: [\"Contact Channels\"],\n },\n clientCreate: {\n summary: \"Create a contact channel\",\n description: \"Add a new contact channel for a user.\",\n tags: [\"Contact Channels\"],\n },\n clientUpdate: {\n summary: \"Update a contact channel\",\n description: \"Updates an existing contact channel. Only the values provided will be updated.\",\n tags: [\"Contact Channels\"],\n },\n clientDelete: {\n summary: \"Delete a contact channel\",\n description: \"Removes a contact channel for a given user.\",\n tags: [\"Contact Channels\"],\n },\n clientList: {\n summary: \"List contact channels\",\n description: \"Retrieves a list of all contact channels for a user.\",\n tags: [\"Contact Channels\"],\n }\n }\n});\nexport type ContactChannelsCrud = CrudTypeOf<typeof contactChannelsCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,wBAAwB,+BAA+B,gCAAgC,0BAA0B,iCAAiC,2BAA2B,kBAAkB,cAAc,UAAU,iBAAiB;AAE1O,IAAM,kCAAkC,UAAU;AAAA,EACvD,SAAS,aAAa,QAAQ;AAAA,EAC9B,IAAI,uBAAuB,QAAQ;AAAA,EACnC,OAAO,0BAA0B,QAAQ;AAAA,EACzC,MAAM,yBAAyB,QAAQ;AAAA,EACvC,eAAe,gCAAgC,QAAQ;AAAA,EACvD,aAAa,+BAA+B,QAAQ;AAAA,EACpD,YAAY,8BAA8B,QAAQ;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,wCAAwC,UAAU;AAAA,EAC7D,OAAO,0BAA0B,SAAS;AAAA,EAC1C,MAAM,yBAAyB,SAAS;AAAA,EACxC,eAAe,gCAAgC,SAAS;AAAA,EACxD,YAAY,8BAA8B,SAAS;AACrD,CAAC,EAAE,QAAQ;AAEJ,IAAM,wCAAwC,sCAAsC,OAAO,UAAU;AAAA,EAC1G,aAAa,+BAA+B,SAAS;AACvD,CAAC,CAAC;AAEK,IAAM,wCAAwC,UAAU;AAAA,EAC7D,SAAS,iBAAiB,QAAQ;AAAA,EAClC,OAAO,0BAA0B,QAAQ;AAAA,EACzC,MAAM,yBAAyB,QAAQ;AAAA,EACvC,eAAe,gCAAgC,QAAQ;AAAA,EACvD,YAAY,8BAA8B,SAAS;AACrD,CAAC,EAAE,QAAQ;AAEJ,IAAM,wCAAwC,sCAAsC,OAAO,UAAU;AAAA,EAC1G,aAAa,+BAA+B,SAAS;AACvD,CAAC,CAAC;AAEK,IAAM,wCAAwC,SAAS;AAEvD,IAAM,sBAAsB,WAAW;AAAA,EAC5C,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/contact-channels.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { contactChannelIdSchema, contactChannelIsPrimarySchema, contactChannelIsVerifiedSchema, contactChannelTypeSchema, contactChannelUsedForAuthSchema, contactChannelValueSchema, userIdOrMeSchema, userIdSchema, yupMixed, yupObject } from \"../../schema-fields\";\n\nexport const contactChannelsClientReadSchema = yupObject({\n user_id: userIdSchema.defined(),\n id: contactChannelIdSchema.defined(),\n value: contactChannelValueSchema.defined(),\n type: contactChannelTypeSchema.defined(),\n used_for_auth: contactChannelUsedForAuthSchema.defined(),\n is_verified: contactChannelIsVerifiedSchema.defined(),\n is_primary: contactChannelIsPrimarySchema.defined(),\n}).defined();\n\nexport const contactChannelsCrudClientUpdateSchema = yupObject({\n value: contactChannelValueSchema.optional(),\n type: contactChannelTypeSchema.optional(),\n used_for_auth: contactChannelUsedForAuthSchema.optional(),\n is_primary: contactChannelIsPrimarySchema.optional(),\n}).defined();\n\nexport const contactChannelsCrudServerUpdateSchema = contactChannelsCrudClientUpdateSchema.concat(yupObject({\n is_verified: contactChannelIsVerifiedSchema.optional(),\n}));\n\nexport const contactChannelsCrudClientCreateSchema = yupObject({\n user_id: userIdOrMeSchema.defined(),\n value: contactChannelValueSchema.defined(),\n type: contactChannelTypeSchema.defined(),\n used_for_auth: contactChannelUsedForAuthSchema.defined(),\n is_primary: contactChannelIsPrimarySchema.optional(),\n}).defined();\n\nexport const contactChannelsCrudServerCreateSchema = contactChannelsCrudClientCreateSchema.concat(yupObject({\n is_verified: contactChannelIsVerifiedSchema.optional(),\n}));\n\nexport const contactChannelsCrudClientDeleteSchema = yupMixed();\n\nexport const contactChannelsCrud = createCrud({\n clientReadSchema: contactChannelsClientReadSchema,\n clientUpdateSchema: contactChannelsCrudClientUpdateSchema,\n clientCreateSchema: contactChannelsCrudClientCreateSchema,\n clientDeleteSchema: contactChannelsCrudClientDeleteSchema,\n serverUpdateSchema: contactChannelsCrudServerUpdateSchema,\n serverCreateSchema: contactChannelsCrudServerCreateSchema,\n docs: {\n clientRead: {\n summary: \"Get a contact channel\",\n description: \"Retrieves a specific contact channel by the user ID and the contact channel ID.\",\n tags: [\"Contact Channels\"],\n },\n clientCreate: {\n summary: \"Create a contact channel\",\n description: \"Add a new contact channel for a user.\",\n tags: [\"Contact Channels\"],\n },\n clientUpdate: {\n summary: \"Update a contact channel\",\n description: \"Updates an existing contact channel. Only the values provided will be updated.\",\n tags: [\"Contact Channels\"],\n },\n clientDelete: {\n summary: \"Delete a contact channel\",\n description: \"Removes a contact channel for a given user.\",\n tags: [\"Contact Channels\"],\n },\n clientList: {\n summary: \"List contact channels\",\n description: \"Retrieves a list of all contact channels for a user.\",\n tags: [\"Contact Channels\"],\n }\n }\n});\nexport type ContactChannelsCrud = CrudTypeOf<typeof contactChannelsCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,wBAAwB,+BAA+B,gCAAgC,0BAA0B,iCAAiC,2BAA2B,kBAAkB,cAAc,UAAU,iBAAiB;AAE1O,IAAM,kCAAkC,UAAU;AAAA,EACvD,SAAS,aAAa,QAAQ;AAAA,EAC9B,IAAI,uBAAuB,QAAQ;AAAA,EACnC,OAAO,0BAA0B,QAAQ;AAAA,EACzC,MAAM,yBAAyB,QAAQ;AAAA,EACvC,eAAe,gCAAgC,QAAQ;AAAA,EACvD,aAAa,+BAA+B,QAAQ;AAAA,EACpD,YAAY,8BAA8B,QAAQ;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,wCAAwC,UAAU;AAAA,EAC7D,OAAO,0BAA0B,SAAS;AAAA,EAC1C,MAAM,yBAAyB,SAAS;AAAA,EACxC,eAAe,gCAAgC,SAAS;AAAA,EACxD,YAAY,8BAA8B,SAAS;AACrD,CAAC,EAAE,QAAQ;AAEJ,IAAM,wCAAwC,sCAAsC,OAAO,UAAU;AAAA,EAC1G,aAAa,+BAA+B,SAAS;AACvD,CAAC,CAAC;AAEK,IAAM,wCAAwC,UAAU;AAAA,EAC7D,SAAS,iBAAiB,QAAQ;AAAA,EAClC,OAAO,0BAA0B,QAAQ;AAAA,EACzC,MAAM,yBAAyB,QAAQ;AAAA,EACvC,eAAe,gCAAgC,QAAQ;AAAA,EACvD,YAAY,8BAA8B,SAAS;AACrD,CAAC,EAAE,QAAQ;AAEJ,IAAM,wCAAwC,sCAAsC,OAAO,UAAU;AAAA,EAC1G,aAAa,+BAA+B,SAAS;AACvD,CAAC,CAAC;AAEK,IAAM,wCAAwC,SAAS;AAEvD,IAAM,sBAAsB,WAAW;AAAA,EAC5C,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,kBAAkB;AAAA,IAC3B;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -62,4 +62,4 @@ var currentUserCrud = createCrud({
export {
currentUserCrud
};
//# sourceMappingURL=current-user.js.map
//# sourceMappingURL=current-user.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/current-user.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject } from \"../../schema-fields\";\nimport { teamsCrudClientReadSchema } from \"./teams\";\nimport { usersCrudServerDeleteSchema, usersCrudServerReadSchema, usersCrudServerUpdateSchema } from \"./users\";\n\nconst clientUpdateSchema = usersCrudServerUpdateSchema.pick([\n \"display_name\",\n \"profile_image_url\",\n \"client_metadata\",\n \"selected_team_id\",\n \"totp_secret_base64\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n]).defined();\n\nconst serverUpdateSchema = usersCrudServerUpdateSchema;\n\nconst clientReadSchema = usersCrudServerReadSchema.pick([\n \"id\",\n \"primary_email\",\n \"primary_email_verified\",\n \"display_name\",\n \"client_metadata\",\n \"client_read_only_metadata\",\n \"profile_image_url\",\n \"signed_up_at_millis\",\n \"has_password\",\n \"auth_with_email\",\n \"oauth_providers\",\n \"selected_team_id\",\n \"requires_totp_mfa\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n \"is_anonymous\",\n]).concat(yupObject({\n selected_team: teamsCrudClientReadSchema.nullable().defined(),\n})).defined();\n\nconst serverReadSchema = usersCrudServerReadSchema.defined();\n\nconst clientDeleteSchema = usersCrudServerDeleteSchema;\n\nexport const currentUserCrud = createCrud({\n clientReadSchema,\n serverReadSchema,\n clientUpdateSchema,\n serverUpdateSchema,\n clientDeleteSchema,\n docs: {\n clientRead: {\n summary: 'Get current user',\n description: 'Gets the currently authenticated user.',\n tags: ['Users'],\n },\n clientUpdate: {\n summary: 'Update current user',\n description: 'Updates the currently authenticated user. Only the values provided will be updated.',\n tags: ['Users'],\n },\n clientDelete: {\n summary: 'Delete current user',\n description: 'Deletes the currently authenticated user. Use this with caution.',\n tags: ['Users'],\n },\n },\n});\nexport type CurrentUserCrud = CrudTypeOf<typeof currentUserCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,iBAAiB;AAC1B,SAAS,iCAAiC;AAC1C,SAAS,6BAA6B,2BAA2B,mCAAmC;AAEpG,IAAM,qBAAqB,4BAA4B,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,QAAQ;AAEX,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB,0BAA0B,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,OAAO,UAAU;AAAA,EAClB,eAAe,0BAA0B,SAAS,EAAE,QAAQ;AAC9D,CAAC,CAAC,EAAE,QAAQ;AAEZ,IAAM,mBAAmB,0BAA0B,QAAQ;AAE3D,IAAM,qBAAqB;AAEpB,IAAM,kBAAkB,WAAW;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/current-user.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject } from \"../../schema-fields\";\nimport { teamsCrudClientReadSchema } from \"./teams\";\nimport { usersCrudServerDeleteSchema, usersCrudServerReadSchema, usersCrudServerUpdateSchema } from \"./users\";\n\nconst clientUpdateSchema = usersCrudServerUpdateSchema.pick([\n \"display_name\",\n \"profile_image_url\",\n \"client_metadata\",\n \"selected_team_id\",\n \"totp_secret_base64\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n]).defined();\n\nconst serverUpdateSchema = usersCrudServerUpdateSchema;\n\nconst clientReadSchema = usersCrudServerReadSchema.pick([\n \"id\",\n \"primary_email\",\n \"primary_email_verified\",\n \"display_name\",\n \"client_metadata\",\n \"client_read_only_metadata\",\n \"profile_image_url\",\n \"signed_up_at_millis\",\n \"has_password\",\n \"auth_with_email\",\n \"oauth_providers\",\n \"selected_team_id\",\n \"requires_totp_mfa\",\n \"otp_auth_enabled\",\n \"passkey_auth_enabled\",\n \"is_anonymous\",\n]).concat(yupObject({\n selected_team: teamsCrudClientReadSchema.nullable().defined(),\n})).defined();\n\nconst serverReadSchema = usersCrudServerReadSchema.defined();\n\nconst clientDeleteSchema = usersCrudServerDeleteSchema;\n\nexport const currentUserCrud = createCrud({\n clientReadSchema,\n serverReadSchema,\n clientUpdateSchema,\n serverUpdateSchema,\n clientDeleteSchema,\n docs: {\n clientRead: {\n summary: 'Get current user',\n description: 'Gets the currently authenticated user.',\n tags: ['Users'],\n },\n clientUpdate: {\n summary: 'Update current user',\n description: 'Updates the currently authenticated user. Only the values provided will be updated.',\n tags: ['Users'],\n },\n clientDelete: {\n summary: 'Delete current user',\n description: 'Deletes the currently authenticated user. Use this with caution.',\n tags: ['Users'],\n },\n },\n});\nexport type CurrentUserCrud = CrudTypeOf<typeof currentUserCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,iBAAiB;AAC1B,SAAS,iCAAiC;AAC1C,SAAS,6BAA6B,2BAA2B,mCAAmC;AAEpG,IAAM,qBAAqB,4BAA4B,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,QAAQ;AAEX,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB,0BAA0B,KAAK;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EAAE,OAAO,UAAU;AAAA,EAClB,eAAe,0BAA0B,SAAS,EAAE,QAAQ;AAC9D,CAAC,CAAC,EAAE,QAAQ;AAEZ,IAAM,mBAAmB,0BAA0B,QAAQ;AAE3D,IAAM,qBAAqB;AAEpB,IAAM,kBAAkB,WAAW;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -49,4 +49,4 @@ export {
emailTemplateCrudAdminUpdateSchema,
emailTemplateTypes
};
//# sourceMappingURL=email-templates.js.map
//# sourceMappingURL=email-templates.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/email-templates.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { jsonSchema, yupBoolean, yupMixed, yupObject, yupString } from \"../../schema-fields\";\n\nexport type EmailTemplateType = typeof emailTemplateTypes[number];\nexport const emailTemplateTypes = ['email_verification', 'password_reset', 'magic_link', 'team_invitation'] as const;\n\nexport const emailTemplateAdminReadSchema = yupObject({\n type: yupString().oneOf(emailTemplateTypes).defined(),\n subject: yupString().defined(),\n content: jsonSchema.defined(),\n is_default: yupBoolean().defined(),\n}).defined();\n\nexport const emailTemplateCrudAdminUpdateSchema = yupObject({\n content: jsonSchema.nonNullable().optional(),\n subject: yupString().optional(),\n}).defined();\n\nexport const emailTemplateCrudAdminDeleteSchema = yupMixed();\n\nexport const emailTemplateCrudAdminCreateSchema = yupObject({\n type: yupString().oneOf(emailTemplateTypes).defined(),\n content: jsonSchema.defined(),\n subject: yupString().defined(),\n}).defined();\n\nexport const emailTemplateCrud = createCrud({\n adminReadSchema: emailTemplateAdminReadSchema,\n adminUpdateSchema: emailTemplateCrudAdminUpdateSchema,\n adminCreateSchema: emailTemplateCrudAdminCreateSchema,\n adminDeleteSchema: emailTemplateCrudAdminDeleteSchema,\n docs: {\n adminRead: {\n hidden: true,\n },\n adminCreate: {\n hidden: true,\n },\n adminUpdate: {\n hidden: true,\n },\n adminDelete: {\n hidden: true,\n },\n adminList: {\n hidden: true,\n }\n }\n});\nexport type EmailTemplateCrud = CrudTypeOf<typeof emailTemplateCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,YAAY,YAAY,UAAU,WAAW,iBAAiB;AAGhE,IAAM,qBAAqB,CAAC,sBAAsB,kBAAkB,cAAc,iBAAiB;AAEnG,IAAM,+BAA+B,UAAU;AAAA,EACpD,MAAM,UAAU,EAAE,MAAM,kBAAkB,EAAE,QAAQ;AAAA,EACpD,SAAS,UAAU,EAAE,QAAQ;AAAA,EAC7B,SAAS,WAAW,QAAQ;AAAA,EAC5B,YAAY,WAAW,EAAE,QAAQ;AACnC,CAAC,EAAE,QAAQ;AAEJ,IAAM,qCAAqC,UAAU;AAAA,EAC1D,SAAS,WAAW,YAAY,EAAE,SAAS;AAAA,EAC3C,SAAS,UAAU,EAAE,SAAS;AAChC,CAAC,EAAE,QAAQ;AAEJ,IAAM,qCAAqC,SAAS;AAEpD,IAAM,qCAAqC,UAAU;AAAA,EAC1D,MAAM,UAAU,EAAE,MAAM,kBAAkB,EAAE,QAAQ;AAAA,EACpD,SAAS,WAAW,QAAQ;AAAA,EAC5B,SAAS,UAAU,EAAE,QAAQ;AAC/B,CAAC,EAAE,QAAQ;AAEJ,IAAM,oBAAoB,WAAW;AAAA,EAC1C,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,MAAM;AAAA,IACJ,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/email-templates.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { jsonSchema, yupBoolean, yupMixed, yupObject, yupString } from \"../../schema-fields\";\n\nexport type EmailTemplateType = typeof emailTemplateTypes[number];\nexport const emailTemplateTypes = ['email_verification', 'password_reset', 'magic_link', 'team_invitation'] as const;\n\nexport const emailTemplateAdminReadSchema = yupObject({\n type: yupString().oneOf(emailTemplateTypes).defined(),\n subject: yupString().defined(),\n content: jsonSchema.defined(),\n is_default: yupBoolean().defined(),\n}).defined();\n\nexport const emailTemplateCrudAdminUpdateSchema = yupObject({\n content: jsonSchema.nonNullable().optional(),\n subject: yupString().optional(),\n}).defined();\n\nexport const emailTemplateCrudAdminDeleteSchema = yupMixed();\n\nexport const emailTemplateCrudAdminCreateSchema = yupObject({\n type: yupString().oneOf(emailTemplateTypes).defined(),\n content: jsonSchema.defined(),\n subject: yupString().defined(),\n}).defined();\n\nexport const emailTemplateCrud = createCrud({\n adminReadSchema: emailTemplateAdminReadSchema,\n adminUpdateSchema: emailTemplateCrudAdminUpdateSchema,\n adminCreateSchema: emailTemplateCrudAdminCreateSchema,\n adminDeleteSchema: emailTemplateCrudAdminDeleteSchema,\n docs: {\n adminRead: {\n hidden: true,\n },\n adminCreate: {\n hidden: true,\n },\n adminUpdate: {\n hidden: true,\n },\n adminDelete: {\n hidden: true,\n },\n adminList: {\n hidden: true,\n }\n }\n});\nexport type EmailTemplateCrud = CrudTypeOf<typeof emailTemplateCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,YAAY,YAAY,UAAU,WAAW,iBAAiB;AAGhE,IAAM,qBAAqB,CAAC,sBAAsB,kBAAkB,cAAc,iBAAiB;AAEnG,IAAM,+BAA+B,UAAU;AAAA,EACpD,MAAM,UAAU,EAAE,MAAM,kBAAkB,EAAE,QAAQ;AAAA,EACpD,SAAS,UAAU,EAAE,QAAQ;AAAA,EAC7B,SAAS,WAAW,QAAQ;AAAA,EAC5B,YAAY,WAAW,EAAE,QAAQ;AACnC,CAAC,EAAE,QAAQ;AAEJ,IAAM,qCAAqC,UAAU;AAAA,EAC1D,SAAS,WAAW,YAAY,EAAE,SAAS;AAAA,EAC3C,SAAS,UAAU,EAAE,SAAS;AAChC,CAAC,EAAE,QAAQ;AAEJ,IAAM,qCAAqC,SAAS;AAEpD,IAAM,qCAAqC,UAAU;AAAA,EAC1D,MAAM,UAAU,EAAE,MAAM,kBAAkB,EAAE,QAAQ;AAAA,EACpD,SAAS,WAAW,QAAQ;AAAA,EAC5B,SAAS,UAAU,EAAE,QAAQ;AAC/B,CAAC,EAAE,QAAQ;AAEJ,IAAM,oBAAoB,WAAW;AAAA,EAC1C,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,MAAM;AAAA,IACJ,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -17,4 +17,4 @@ export {
internalEmailsCrud,
sentEmailReadSchema
};
//# sourceMappingURL=emails.js.map
//# sourceMappingURL=emails.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/emails.ts"],"sourcesContent":["import { createCrud, CrudTypeOf } from \"../../crud\";\nimport * as fieldSchema from \"../../schema-fields\";\nimport { emailConfigWithoutPasswordSchema } from \"./projects\";\n\n\nexport const sentEmailReadSchema = fieldSchema.yupObject({\n id: fieldSchema.yupString().defined(),\n subject: fieldSchema.yupString().defined(),\n sent_at_millis: fieldSchema.yupNumber().defined(),\n to: fieldSchema.yupArray(fieldSchema.yupString().defined()),\n sender_config: emailConfigWithoutPasswordSchema.defined(),\n error: fieldSchema.yupMixed().nullable().optional(),\n}).defined();\n\nexport const internalEmailsCrud = createCrud({\n adminReadSchema: sentEmailReadSchema,\n});\n\nexport type InternalEmailsCrud = CrudTypeOf<typeof internalEmailsCrud>;\n"],"mappings":";AAAA,SAAS,kBAA8B;AACvC,YAAY,iBAAiB;AAC7B,SAAS,wCAAwC;AAG1C,IAAM,sBAAkC,sBAAU;AAAA,EACvD,IAAgB,sBAAU,EAAE,QAAQ;AAAA,EACpC,SAAqB,sBAAU,EAAE,QAAQ;AAAA,EACzC,gBAA4B,sBAAU,EAAE,QAAQ;AAAA,EAChD,IAAgB,qBAAqB,sBAAU,EAAE,QAAQ,CAAC;AAAA,EAC1D,eAAe,iCAAiC,QAAQ;AAAA,EACxD,OAAmB,qBAAS,EAAE,SAAS,EAAE,SAAS;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,qBAAqB,WAAW;AAAA,EAC3C,iBAAiB;AACnB,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/emails.ts"],"sourcesContent":["import { createCrud, CrudTypeOf } from \"../../crud\";\nimport * as fieldSchema from \"../../schema-fields\";\nimport { emailConfigWithoutPasswordSchema } from \"./projects\";\n\n\nexport const sentEmailReadSchema = fieldSchema.yupObject({\n id: fieldSchema.yupString().defined(),\n subject: fieldSchema.yupString().defined(),\n sent_at_millis: fieldSchema.yupNumber().defined(),\n to: fieldSchema.yupArray(fieldSchema.yupString().defined()),\n sender_config: emailConfigWithoutPasswordSchema.defined(),\n error: fieldSchema.yupMixed().nullable().optional(),\n}).defined();\n\nexport const internalEmailsCrud = createCrud({\n adminReadSchema: sentEmailReadSchema,\n});\n\nexport type InternalEmailsCrud = CrudTypeOf<typeof internalEmailsCrud>;\n"],"mappings":";AAAA,SAAS,kBAA8B;AACvC,YAAY,iBAAiB;AAC7B,SAAS,wCAAwC;AAG1C,IAAM,sBAAkC,sBAAU;AAAA,EACvD,IAAgB,sBAAU,EAAE,QAAQ;AAAA,EACpC,SAAqB,sBAAU,EAAE,QAAQ;AAAA,EACzC,gBAA4B,sBAAU,EAAE,QAAQ;AAAA,EAChD,IAAgB,qBAAqB,sBAAU,EAAE,QAAQ,CAAC;AAAA,EAC1D,eAAe,iCAAiC,QAAQ;AAAA,EACxD,OAAmB,qBAAS,EAAE,SAAS,EAAE,SAAS;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,qBAAqB,WAAW;AAAA,EAC3C,iBAAiB;AACnB,CAAC;","names":[]}

View file

@ -66,4 +66,4 @@ export {
internalApiKeysCrudAdminObfuscatedReadSchema,
internalApiKeysCrudAdminUpdateSchema
};
//# sourceMappingURL=internal-api-keys.js.map
//# sourceMappingURL=internal-api-keys.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/internal-api-keys.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupBoolean, yupMixed, yupNumber, yupObject, yupString } from \"../../schema-fields\";\n\nconst baseInternalApiKeysReadSchema = yupObject({\n id: yupString().defined(),\n description: yupString().defined(),\n expires_at_millis: yupNumber().defined(),\n manually_revoked_at_millis: yupNumber().optional(),\n created_at_millis: yupNumber().defined(),\n});\n\n// Used for the result of the create endpoint\nexport const internalApiKeysCreateInputSchema = yupObject({\n description: yupString().defined(),\n expires_at_millis: yupNumber().defined(),\n has_publishable_client_key: yupBoolean().defined(),\n has_secret_server_key: yupBoolean().defined(),\n has_super_secret_admin_key: yupBoolean().defined(),\n});\n\nexport const internalApiKeysCreateOutputSchema = baseInternalApiKeysReadSchema.concat(yupObject({\n publishable_client_key: yupString().optional(),\n secret_server_key: yupString().optional(),\n super_secret_admin_key: yupString().optional(),\n}).defined());\n\n// Used for list, read and update endpoints after the initial creation\nexport const internalApiKeysCrudAdminObfuscatedReadSchema = baseInternalApiKeysReadSchema.concat(yupObject({\n publishable_client_key: yupObject({\n last_four: yupString().defined(),\n }).optional(),\n secret_server_key: yupObject({\n last_four: yupString().defined(),\n }).optional(),\n super_secret_admin_key: yupObject({\n last_four: yupString().defined(),\n }).optional(),\n}));\n\nexport const internalApiKeysCrudAdminUpdateSchema = yupObject({\n description: yupString().optional(),\n revoked: yupBoolean().oneOf([true]).optional(),\n}).defined();\n\nexport const internalApiKeysCrudAdminDeleteSchema = yupMixed();\n\nexport const internalApiKeysCrud = createCrud({\n adminReadSchema: internalApiKeysCrudAdminObfuscatedReadSchema,\n adminUpdateSchema: internalApiKeysCrudAdminUpdateSchema,\n adminDeleteSchema: internalApiKeysCrudAdminDeleteSchema,\n docs: {\n adminList: {\n hidden: true,\n },\n adminRead: {\n hidden: true,\n },\n adminCreate: {\n hidden: true,\n },\n adminUpdate: {\n hidden: true,\n },\n adminDelete: {\n hidden: true,\n },\n },\n});\nexport type InternalApiKeysCrud = CrudTypeOf<typeof internalApiKeysCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,YAAY,UAAU,WAAW,WAAW,iBAAiB;AAEtE,IAAM,gCAAgC,UAAU;AAAA,EAC9C,IAAI,UAAU,EAAE,QAAQ;AAAA,EACxB,aAAa,UAAU,EAAE,QAAQ;AAAA,EACjC,mBAAmB,UAAU,EAAE,QAAQ;AAAA,EACvC,4BAA4B,UAAU,EAAE,SAAS;AAAA,EACjD,mBAAmB,UAAU,EAAE,QAAQ;AACzC,CAAC;AAGM,IAAM,mCAAmC,UAAU;AAAA,EACxD,aAAa,UAAU,EAAE,QAAQ;AAAA,EACjC,mBAAmB,UAAU,EAAE,QAAQ;AAAA,EACvC,4BAA4B,WAAW,EAAE,QAAQ;AAAA,EACjD,uBAAuB,WAAW,EAAE,QAAQ;AAAA,EAC5C,4BAA4B,WAAW,EAAE,QAAQ;AACnD,CAAC;AAEM,IAAM,oCAAoC,8BAA8B,OAAO,UAAU;AAAA,EAC9F,wBAAwB,UAAU,EAAE,SAAS;AAAA,EAC7C,mBAAmB,UAAU,EAAE,SAAS;AAAA,EACxC,wBAAwB,UAAU,EAAE,SAAS;AAC/C,CAAC,EAAE,QAAQ,CAAC;AAGL,IAAM,+CAA+C,8BAA8B,OAAO,UAAU;AAAA,EACzG,wBAAwB,UAAU;AAAA,IAChC,WAAW,UAAU,EAAE,QAAQ;AAAA,EACjC,CAAC,EAAE,SAAS;AAAA,EACZ,mBAAmB,UAAU;AAAA,IAC3B,WAAW,UAAU,EAAE,QAAQ;AAAA,EACjC,CAAC,EAAE,SAAS;AAAA,EACZ,wBAAwB,UAAU;AAAA,IAChC,WAAW,UAAU,EAAE,QAAQ;AAAA,EACjC,CAAC,EAAE,SAAS;AACd,CAAC,CAAC;AAEK,IAAM,uCAAuC,UAAU;AAAA,EAC5D,aAAa,UAAU,EAAE,SAAS;AAAA,EAClC,SAAS,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS;AAC/C,CAAC,EAAE,QAAQ;AAEJ,IAAM,uCAAuC,SAAS;AAEtD,IAAM,sBAAsB,WAAW;AAAA,EAC5C,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,MAAM;AAAA,IACJ,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/internal-api-keys.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupBoolean, yupMixed, yupNumber, yupObject, yupString } from \"../../schema-fields\";\n\nconst baseInternalApiKeysReadSchema = yupObject({\n id: yupString().defined(),\n description: yupString().defined(),\n expires_at_millis: yupNumber().defined(),\n manually_revoked_at_millis: yupNumber().optional(),\n created_at_millis: yupNumber().defined(),\n});\n\n// Used for the result of the create endpoint\nexport const internalApiKeysCreateInputSchema = yupObject({\n description: yupString().defined(),\n expires_at_millis: yupNumber().defined(),\n has_publishable_client_key: yupBoolean().defined(),\n has_secret_server_key: yupBoolean().defined(),\n has_super_secret_admin_key: yupBoolean().defined(),\n});\n\nexport const internalApiKeysCreateOutputSchema = baseInternalApiKeysReadSchema.concat(yupObject({\n publishable_client_key: yupString().optional(),\n secret_server_key: yupString().optional(),\n super_secret_admin_key: yupString().optional(),\n}).defined());\n\n// Used for list, read and update endpoints after the initial creation\nexport const internalApiKeysCrudAdminObfuscatedReadSchema = baseInternalApiKeysReadSchema.concat(yupObject({\n publishable_client_key: yupObject({\n last_four: yupString().defined(),\n }).optional(),\n secret_server_key: yupObject({\n last_four: yupString().defined(),\n }).optional(),\n super_secret_admin_key: yupObject({\n last_four: yupString().defined(),\n }).optional(),\n}));\n\nexport const internalApiKeysCrudAdminUpdateSchema = yupObject({\n description: yupString().optional(),\n revoked: yupBoolean().oneOf([true]).optional(),\n}).defined();\n\nexport const internalApiKeysCrudAdminDeleteSchema = yupMixed();\n\nexport const internalApiKeysCrud = createCrud({\n adminReadSchema: internalApiKeysCrudAdminObfuscatedReadSchema,\n adminUpdateSchema: internalApiKeysCrudAdminUpdateSchema,\n adminDeleteSchema: internalApiKeysCrudAdminDeleteSchema,\n docs: {\n adminList: {\n hidden: true,\n },\n adminRead: {\n hidden: true,\n },\n adminCreate: {\n hidden: true,\n },\n adminUpdate: {\n hidden: true,\n },\n adminDelete: {\n hidden: true,\n },\n },\n});\nexport type InternalApiKeysCrud = CrudTypeOf<typeof internalApiKeysCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,YAAY,UAAU,WAAW,WAAW,iBAAiB;AAEtE,IAAM,gCAAgC,UAAU;AAAA,EAC9C,IAAI,UAAU,EAAE,QAAQ;AAAA,EACxB,aAAa,UAAU,EAAE,QAAQ;AAAA,EACjC,mBAAmB,UAAU,EAAE,QAAQ;AAAA,EACvC,4BAA4B,UAAU,EAAE,SAAS;AAAA,EACjD,mBAAmB,UAAU,EAAE,QAAQ;AACzC,CAAC;AAGM,IAAM,mCAAmC,UAAU;AAAA,EACxD,aAAa,UAAU,EAAE,QAAQ;AAAA,EACjC,mBAAmB,UAAU,EAAE,QAAQ;AAAA,EACvC,4BAA4B,WAAW,EAAE,QAAQ;AAAA,EACjD,uBAAuB,WAAW,EAAE,QAAQ;AAAA,EAC5C,4BAA4B,WAAW,EAAE,QAAQ;AACnD,CAAC;AAEM,IAAM,oCAAoC,8BAA8B,OAAO,UAAU;AAAA,EAC9F,wBAAwB,UAAU,EAAE,SAAS;AAAA,EAC7C,mBAAmB,UAAU,EAAE,SAAS;AAAA,EACxC,wBAAwB,UAAU,EAAE,SAAS;AAC/C,CAAC,EAAE,QAAQ,CAAC;AAGL,IAAM,+CAA+C,8BAA8B,OAAO,UAAU;AAAA,EACzG,wBAAwB,UAAU;AAAA,IAChC,WAAW,UAAU,EAAE,QAAQ;AAAA,EACjC,CAAC,EAAE,SAAS;AAAA,EACZ,mBAAmB,UAAU;AAAA,IAC3B,WAAW,UAAU,EAAE,QAAQ;AAAA,EACjC,CAAC,EAAE,SAAS;AAAA,EACZ,wBAAwB,UAAU;AAAA,IAChC,WAAW,UAAU,EAAE,QAAQ;AAAA,EACjC,CAAC,EAAE,SAAS;AACd,CAAC,CAAC;AAEK,IAAM,uCAAuC,UAAU;AAAA,EAC5D,aAAa,UAAU,EAAE,SAAS;AAAA,EAClC,SAAS,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS;AAC/C,CAAC,EAAE,QAAQ;AAEJ,IAAM,uCAAuC,SAAS;AAEtD,IAAM,sBAAsB,WAAW;AAAA,EAC5C,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,MAAM;AAAA,IACJ,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -21,4 +21,4 @@ export {
connectedAccountAccessTokenCrud,
connectedAccountAccessTokenReadSchema
};
//# sourceMappingURL=oauth.js.map
//# sourceMappingURL=oauth.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/oauth.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject, yupString } from \"../../schema-fields\";\n\nexport const connectedAccountAccessTokenReadSchema = yupObject({\n access_token: yupString().defined(),\n}).defined();\n\nexport const connectedAccountAccessTokenCreateSchema = yupObject({\n scope: yupString().optional(),\n}).defined();\n\nexport const connectedAccountAccessTokenCrud = createCrud({\n clientReadSchema: connectedAccountAccessTokenReadSchema,\n clientCreateSchema: connectedAccountAccessTokenCreateSchema,\n docs: {\n clientCreate: {\n hidden: true,\n }\n },\n});\nexport type ConnectedAccountAccessTokenCrud = CrudTypeOf<typeof connectedAccountAccessTokenCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,WAAW,iBAAiB;AAE9B,IAAM,wCAAwC,UAAU;AAAA,EAC7D,cAAc,UAAU,EAAE,QAAQ;AACpC,CAAC,EAAE,QAAQ;AAEJ,IAAM,0CAA0C,UAAU;AAAA,EAC/D,OAAO,UAAU,EAAE,SAAS;AAC9B,CAAC,EAAE,QAAQ;AAEJ,IAAM,kCAAkC,WAAW;AAAA,EACxD,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,MACZ,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/oauth.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject, yupString } from \"../../schema-fields\";\n\nexport const connectedAccountAccessTokenReadSchema = yupObject({\n access_token: yupString().defined(),\n}).defined();\n\nexport const connectedAccountAccessTokenCreateSchema = yupObject({\n scope: yupString().optional(),\n}).defined();\n\nexport const connectedAccountAccessTokenCrud = createCrud({\n clientReadSchema: connectedAccountAccessTokenReadSchema,\n clientCreateSchema: connectedAccountAccessTokenCreateSchema,\n docs: {\n clientCreate: {\n hidden: true,\n }\n },\n});\nexport type ConnectedAccountAccessTokenCrud = CrudTypeOf<typeof connectedAccountAccessTokenCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,WAAW,iBAAiB;AAE9B,IAAM,wCAAwC,UAAU;AAAA,EAC7D,cAAc,UAAU,EAAE,QAAQ;AACpC,CAAC,EAAE,QAAQ;AAEJ,IAAM,0CAA0C,UAAU;AAAA,EAC/D,OAAO,UAAU,EAAE,SAAS;AAC9B,CAAC,EAAE,QAAQ;AAEJ,IAAM,kCAAkC,WAAW;AAAA,EACxD,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,MACZ,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -95,4 +95,4 @@ export {
userApiKeysCreateOutputSchema,
userApiKeysCrud
};
//# sourceMappingURL=project-api-keys.js.map
//# sourceMappingURL=project-api-keys.js.map

File diff suppressed because one or more lines are too long

View file

@ -110,4 +110,4 @@ export {
projectPermissionsCrudServerCreateSchema,
projectPermissionsCrudServerDeleteSchema
};
//# sourceMappingURL=project-permissions.js.map
//# sourceMappingURL=project-permissions.js.map

File diff suppressed because one or more lines are too long

View file

@ -178,4 +178,4 @@ export {
projectsCrudAdminUpdateSchema,
projectsCrudClientReadSchema
};
//# sourceMappingURL=projects.js.map
//# sourceMappingURL=projects.js.map

File diff suppressed because one or more lines are too long

View file

@ -59,4 +59,4 @@ export {
sessionsCrudReadSchema,
sessionsCrudServerCreateSchema
};
//# sourceMappingURL=sessions.js.map
//# sourceMappingURL=sessions.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/sessions.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupBoolean, yupMixed, yupNumber, yupObject, yupString } from \"../../schema-fields\";\nimport { geoInfoSchema } from \"../../utils/geo\";\n\n\n// Create\nexport const sessionsCrudServerCreateSchema = yupObject({\n user_id: yupString().uuid().defined(),\n expires_in_millis: yupNumber().max(1000 * 60 * 60 * 24 * 367).default(1000 * 60 * 60 * 24 * 365),\n is_impersonation: yupBoolean().default(false),\n}).defined();\n\n\nexport const sessionsCreateOutputSchema = yupObject({\n refresh_token: yupString().defined(),\n access_token: yupString().defined(),\n}).defined();\n\n\nexport const sessionsCrudReadSchema = yupObject({\n id: yupString().defined(),\n user_id: yupString().uuid().defined(),\n created_at: yupNumber().defined(),\n is_impersonation: yupBoolean().defined(),\n last_used_at: yupNumber().optional(),\n is_current_session: yupBoolean(),\n // TODO move this to a shared type\n // TODO: what about if not trusted?\n last_used_at_end_user_ip_info: geoInfoSchema.optional(),\n}).defined();\n\n\n// Delete\nexport const sessionsCrudDeleteSchema = yupMixed();\n\n\nexport const sessionsCrud = createCrud({\n // serverCreateSchema: sessionsCrudServerCreateSchema,\n serverReadSchema: sessionsCrudReadSchema,\n serverDeleteSchema: sessionsCrudDeleteSchema,\n clientReadSchema: sessionsCrudReadSchema,\n clientDeleteSchema: sessionsCrudDeleteSchema,\n docs: {\n serverList: {\n summary: \"List sessions\",\n description: \"List all sessions for the current user.\",\n tags: [\"Sessions\"],\n },\n serverDelete: {\n summary: \"Delete session\",\n description: \"Delete a session by ID.\",\n tags: [\"Sessions\"],\n },\n clientList: {\n summary: \"List sessions\",\n description: \"List all sessions for the current user.\",\n tags: [\"Sessions\"],\n },\n clientDelete: {\n summary: \"Delete session\",\n description: \"Delete a session by ID.\",\n tags: [\"Sessions\"],\n },\n },\n});\nexport type SessionsCrud = CrudTypeOf<typeof sessionsCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,YAAY,UAAU,WAAW,WAAW,iBAAiB;AACtE,SAAS,qBAAqB;AAIvB,IAAM,iCAAiC,UAAU;AAAA,EACtD,SAAS,UAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EACpC,mBAAmB,UAAU,EAAE,IAAI,MAAO,KAAK,KAAK,KAAK,GAAG,EAAE,QAAQ,MAAO,KAAK,KAAK,KAAK,GAAG;AAAA,EAC/F,kBAAkB,WAAW,EAAE,QAAQ,KAAK;AAC9C,CAAC,EAAE,QAAQ;AAGJ,IAAM,6BAA6B,UAAU;AAAA,EAClD,eAAe,UAAU,EAAE,QAAQ;AAAA,EACnC,cAAc,UAAU,EAAE,QAAQ;AACpC,CAAC,EAAE,QAAQ;AAGJ,IAAM,yBAAyB,UAAU;AAAA,EAC9C,IAAI,UAAU,EAAE,QAAQ;AAAA,EACxB,SAAS,UAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EACpC,YAAY,UAAU,EAAE,QAAQ;AAAA,EAChC,kBAAkB,WAAW,EAAE,QAAQ;AAAA,EACvC,cAAc,UAAU,EAAE,SAAS;AAAA,EACnC,oBAAoB,WAAW;AAAA;AAAA;AAAA,EAG/B,+BAA+B,cAAc,SAAS;AACxD,CAAC,EAAE,QAAQ;AAIJ,IAAM,2BAA2B,SAAS;AAG1C,IAAM,eAAe,WAAW;AAAA;AAAA,EAErC,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/sessions.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupBoolean, yupMixed, yupNumber, yupObject, yupString } from \"../../schema-fields\";\nimport { geoInfoSchema } from \"../../utils/geo\";\n\n\n// Create\nexport const sessionsCrudServerCreateSchema = yupObject({\n user_id: yupString().uuid().defined(),\n expires_in_millis: yupNumber().max(1000 * 60 * 60 * 24 * 367).default(1000 * 60 * 60 * 24 * 365),\n is_impersonation: yupBoolean().default(false),\n}).defined();\n\n\nexport const sessionsCreateOutputSchema = yupObject({\n refresh_token: yupString().defined(),\n access_token: yupString().defined(),\n}).defined();\n\n\nexport const sessionsCrudReadSchema = yupObject({\n id: yupString().defined(),\n user_id: yupString().uuid().defined(),\n created_at: yupNumber().defined(),\n is_impersonation: yupBoolean().defined(),\n last_used_at: yupNumber().optional(),\n is_current_session: yupBoolean(),\n // TODO move this to a shared type\n // TODO: what about if not trusted?\n last_used_at_end_user_ip_info: geoInfoSchema.optional(),\n}).defined();\n\n\n// Delete\nexport const sessionsCrudDeleteSchema = yupMixed();\n\n\nexport const sessionsCrud = createCrud({\n // serverCreateSchema: sessionsCrudServerCreateSchema,\n serverReadSchema: sessionsCrudReadSchema,\n serverDeleteSchema: sessionsCrudDeleteSchema,\n clientReadSchema: sessionsCrudReadSchema,\n clientDeleteSchema: sessionsCrudDeleteSchema,\n docs: {\n serverList: {\n summary: \"List sessions\",\n description: \"List all sessions for the current user.\",\n tags: [\"Sessions\"],\n },\n serverDelete: {\n summary: \"Delete session\",\n description: \"Delete a session by ID.\",\n tags: [\"Sessions\"],\n },\n clientList: {\n summary: \"List sessions\",\n description: \"List all sessions for the current user.\",\n tags: [\"Sessions\"],\n },\n clientDelete: {\n summary: \"Delete session\",\n description: \"Delete a session by ID.\",\n tags: [\"Sessions\"],\n },\n },\n});\nexport type SessionsCrud = CrudTypeOf<typeof sessionsCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,YAAY,UAAU,WAAW,WAAW,iBAAiB;AACtE,SAAS,qBAAqB;AAIvB,IAAM,iCAAiC,UAAU;AAAA,EACtD,SAAS,UAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EACpC,mBAAmB,UAAU,EAAE,IAAI,MAAO,KAAK,KAAK,KAAK,GAAG,EAAE,QAAQ,MAAO,KAAK,KAAK,KAAK,GAAG;AAAA,EAC/F,kBAAkB,WAAW,EAAE,QAAQ,KAAK;AAC9C,CAAC,EAAE,QAAQ;AAGJ,IAAM,6BAA6B,UAAU;AAAA,EAClD,eAAe,UAAU,EAAE,QAAQ;AAAA,EACnC,cAAc,UAAU,EAAE,QAAQ;AACpC,CAAC,EAAE,QAAQ;AAGJ,IAAM,yBAAyB,UAAU;AAAA,EAC9C,IAAI,UAAU,EAAE,QAAQ;AAAA,EACxB,SAAS,UAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EACpC,YAAY,UAAU,EAAE,QAAQ;AAAA,EAChC,kBAAkB,WAAW,EAAE,QAAQ;AAAA,EACvC,cAAc,UAAU,EAAE,SAAS;AAAA,EACnC,oBAAoB,WAAW;AAAA;AAAA;AAAA,EAG/B,+BAA+B,cAAc,SAAS;AACxD,CAAC,EAAE,QAAQ;AAIJ,IAAM,2BAA2B,SAAS;AAG1C,IAAM,eAAe,WAAW;AAAA;AAAA,EAErC,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,UAAU;AAAA,IACnB;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -19,4 +19,4 @@ export {
svixTokenAdminReadSchema,
svixTokenCrud
};
//# sourceMappingURL=svix-token.js.map
//# sourceMappingURL=svix-token.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/svix-token.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject, yupString } from \"../../schema-fields\";\n\nexport const svixTokenAdminReadSchema = yupObject({\n token: yupString().defined(),\n}).defined();\n\nexport const svixTokenAdminCreateSchema = yupObject({}).defined();\n\nexport const svixTokenCrud = createCrud({\n adminReadSchema: svixTokenAdminReadSchema,\n adminCreateSchema: svixTokenAdminCreateSchema,\n docs: {\n adminCreate: {\n hidden: true,\n },\n }\n});\nexport type SvixTokenCrud = CrudTypeOf<typeof svixTokenCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,WAAW,iBAAiB;AAE9B,IAAM,2BAA2B,UAAU;AAAA,EAChD,OAAO,UAAU,EAAE,QAAQ;AAC7B,CAAC,EAAE,QAAQ;AAEJ,IAAM,6BAA6B,UAAU,CAAC,CAAC,EAAE,QAAQ;AAEzD,IAAM,gBAAgB,WAAW;AAAA,EACtC,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,MAAM;AAAA,IACJ,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/svix-token.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupObject, yupString } from \"../../schema-fields\";\n\nexport const svixTokenAdminReadSchema = yupObject({\n token: yupString().defined(),\n}).defined();\n\nexport const svixTokenAdminCreateSchema = yupObject({}).defined();\n\nexport const svixTokenCrud = createCrud({\n adminReadSchema: svixTokenAdminReadSchema,\n adminCreateSchema: svixTokenAdminCreateSchema,\n docs: {\n adminCreate: {\n hidden: true,\n },\n }\n});\nexport type SvixTokenCrud = CrudTypeOf<typeof svixTokenCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,WAAW,iBAAiB;AAE9B,IAAM,2BAA2B,UAAU;AAAA,EAChD,OAAO,UAAU,EAAE,QAAQ;AAC7B,CAAC,EAAE,QAAQ;AAEJ,IAAM,6BAA6B,UAAU,CAAC,CAAC,EAAE,QAAQ;AAEzD,IAAM,gBAAgB,WAAW;AAAA,EACtC,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,MAAM;AAAA,IACJ,aAAa;AAAA,MACX,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -20,4 +20,4 @@ export {
teamInvitationDetailsClientReadSchema,
teamInvitationDetailsCrud
};
//# sourceMappingURL=team-invitation-details.js.map
//# sourceMappingURL=team-invitation-details.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/team-invitation-details.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\n\n\nexport const teamInvitationDetailsClientReadSchema = yupObject({\n team_id: schemaFields.teamIdSchema.defined(),\n team_display_name: schemaFields.teamDisplayNameSchema.defined(),\n}).defined();\n\nexport const teamInvitationDetailsCrud = createCrud({\n clientReadSchema: teamInvitationDetailsClientReadSchema,\n docs: {\n clientRead: {\n summary: \"Get the team details with invitation code\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamInvitationDetailsCrud = CrudTypeOf<typeof teamInvitationDetailsCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,YAAY,kBAAkB;AAC9B,SAAS,iBAAiB;AAGnB,IAAM,wCAAwC,UAAU;AAAA,EAC7D,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,mBAAgC,mCAAsB,QAAQ;AAChE,CAAC,EAAE,QAAQ;AAEJ,IAAM,4BAA4B,WAAW;AAAA,EAClD,kBAAkB;AAAA,EAClB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/team-invitation-details.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\n\n\nexport const teamInvitationDetailsClientReadSchema = yupObject({\n team_id: schemaFields.teamIdSchema.defined(),\n team_display_name: schemaFields.teamDisplayNameSchema.defined(),\n}).defined();\n\nexport const teamInvitationDetailsCrud = createCrud({\n clientReadSchema: teamInvitationDetailsClientReadSchema,\n docs: {\n clientRead: {\n summary: \"Get the team details with invitation code\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamInvitationDetailsCrud = CrudTypeOf<typeof teamInvitationDetailsCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,YAAY,kBAAkB;AAC9B,SAAS,iBAAiB;AAGnB,IAAM,wCAAwC,UAAU;AAAA,EAC7D,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,mBAAgC,mCAAsB,QAAQ;AAChE,CAAC,EAAE,QAAQ;AAEJ,IAAM,4BAA4B,WAAW;AAAA,EAClD,kBAAkB;AAAA,EAClB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -33,4 +33,4 @@ export {
teamInvitationCrud,
teamInvitationDetailsClientReadSchema
};
//# sourceMappingURL=team-invitation.js.map
//# sourceMappingURL=team-invitation.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/team-invitation.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\n\nexport const teamInvitationDetailsClientReadSchema = yupObject({\n id: schemaFields.yupString().uuid().defined(),\n team_id: schemaFields.teamIdSchema.defined(),\n expires_at_millis: schemaFields.yupNumber().defined(),\n recipient_email: schemaFields.emailSchema.defined(),\n}).defined();\n\nexport const teamInvitationCrud = createCrud({\n clientReadSchema: teamInvitationDetailsClientReadSchema,\n clientDeleteSchema: schemaFields.yupMixed(),\n docs: {\n clientRead: {\n summary: \"Get the team details with invitation code\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientList: {\n summary: \"List team invitations\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientDelete: {\n summary: \"Delete a team invitation\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamInvitationCrud = CrudTypeOf<typeof teamInvitationCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,YAAY,kBAAkB;AAC9B,SAAS,iBAAiB;AAEnB,IAAM,wCAAwC,UAAU;AAAA,EAC7D,IAAiB,uBAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EAC5C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,mBAAgC,uBAAU,EAAE,QAAQ;AAAA,EACpD,iBAA8B,yBAAY,QAAQ;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,qBAAqB,WAAW;AAAA,EAC3C,kBAAkB;AAAA,EAClB,oBAAiC,sBAAS;AAAA,EAC1C,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/team-invitation.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\n\nexport const teamInvitationDetailsClientReadSchema = yupObject({\n id: schemaFields.yupString().uuid().defined(),\n team_id: schemaFields.teamIdSchema.defined(),\n expires_at_millis: schemaFields.yupNumber().defined(),\n recipient_email: schemaFields.emailSchema.defined(),\n}).defined();\n\nexport const teamInvitationCrud = createCrud({\n clientReadSchema: teamInvitationDetailsClientReadSchema,\n clientDeleteSchema: schemaFields.yupMixed(),\n docs: {\n clientRead: {\n summary: \"Get the team details with invitation code\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientList: {\n summary: \"List team invitations\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientDelete: {\n summary: \"Delete a team invitation\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamInvitationCrud = CrudTypeOf<typeof teamInvitationCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,YAAY,kBAAkB;AAC9B,SAAS,iBAAiB;AAEnB,IAAM,wCAAwC,UAAU;AAAA,EAC7D,IAAiB,uBAAU,EAAE,KAAK,EAAE,QAAQ;AAAA,EAC5C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,mBAAgC,uBAAU,EAAE,QAAQ;AAAA,EACpD,iBAA8B,yBAAY,QAAQ;AACpD,CAAC,EAAE,QAAQ;AAEJ,IAAM,qBAAqB,WAAW;AAAA,EAC3C,kBAAkB;AAAA,EAClB,oBAAiC,sBAAS;AAAA,EAC1C,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -59,4 +59,4 @@ export {
teamMemberProfilesCrudClientUpdateSchema,
teamMemberProfilesCrudServerReadSchema
};
//# sourceMappingURL=team-member-profiles.js.map
//# sourceMappingURL=team-member-profiles.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/team-member-profiles.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\nimport { usersCrudServerReadSchema } from \"./users\";\n\n\nexport const teamMemberProfilesCrudClientReadSchema = yupObject({\n team_id: schemaFields.teamIdSchema.defined(),\n user_id: schemaFields.userIdSchema.defined(),\n display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined(),\n}).defined();\n\nexport const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({\n user: usersCrudServerReadSchema.defined(),\n})).defined();\n\nexport const teamMemberProfilesCrudClientUpdateSchema = yupObject({\n display_name: schemaFields.teamMemberDisplayNameSchema.optional(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional(),\n}).defined();\n\nexport const teamMemberProfilesCrud = createCrud({\n clientReadSchema: teamMemberProfilesCrudClientReadSchema,\n serverReadSchema: teamMemberProfilesCrudServerReadSchema,\n clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,\n docs: {\n clientList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles and filter by team ID and user ID\",\n tags: [\"Teams\"],\n },\n clientRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n clientUpdate: {\n summary: \"Update your team member profile\",\n description: \"Update your own team member profile. `user_id` must be `me` in the path parameters on the client.\",\n tags: [\"Teams\"],\n },\n serverUpdate: {\n summary: \"Update a team member profile\",\n description: \"Update a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,YAAY,kBAAkB;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,iCAAiC;AAGnC,IAAM,yCAAyC,UAAU;AAAA,EAC9D,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,cAA2B,yCAA4B,SAAS,EAAE,QAAQ;AAAA,EAC1E,mBAAgC,6CAAgC,SAAS,EAAE,QAAQ;AACrF,CAAC,EAAE,QAAQ;AAEJ,IAAM,yCAAyC,uCAAuC,OAAO,UAAU;AAAA,EAC5G,MAAM,0BAA0B,QAAQ;AAC1C,CAAC,CAAC,EAAE,QAAQ;AAEL,IAAM,2CAA2C,UAAU;AAAA,EAChE,cAA2B,yCAA4B,SAAS;AAAA,EAChE,mBAAgC,6CAAgC,SAAS,EAAE,SAAS;AACtF,CAAC,EAAE,QAAQ;AAEJ,IAAM,yBAAyB,WAAW;AAAA,EAC/C,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/team-member-profiles.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\nimport { usersCrudServerReadSchema } from \"./users\";\n\n\nexport const teamMemberProfilesCrudClientReadSchema = yupObject({\n team_id: schemaFields.teamIdSchema.defined(),\n user_id: schemaFields.userIdSchema.defined(),\n display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined(),\n}).defined();\n\nexport const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({\n user: usersCrudServerReadSchema.defined(),\n})).defined();\n\nexport const teamMemberProfilesCrudClientUpdateSchema = yupObject({\n display_name: schemaFields.teamMemberDisplayNameSchema.optional(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional(),\n}).defined();\n\nexport const teamMemberProfilesCrud = createCrud({\n clientReadSchema: teamMemberProfilesCrudClientReadSchema,\n serverReadSchema: teamMemberProfilesCrudServerReadSchema,\n clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,\n docs: {\n clientList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles and filter by team ID and user ID\",\n tags: [\"Teams\"],\n },\n clientRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n clientUpdate: {\n summary: \"Update your team member profile\",\n description: \"Update your own team member profile. `user_id` must be `me` in the path parameters on the client.\",\n tags: [\"Teams\"],\n },\n serverUpdate: {\n summary: \"Update a team member profile\",\n description: \"Update a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,YAAY,kBAAkB;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,iCAAiC;AAGnC,IAAM,yCAAyC,UAAU;AAAA,EAC9D,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,cAA2B,yCAA4B,SAAS,EAAE,QAAQ;AAAA,EAC1E,mBAAgC,6CAAgC,SAAS,EAAE,QAAQ;AACrF,CAAC,EAAE,QAAQ;AAEJ,IAAM,yCAAyC,uCAAuC,OAAO,UAAU;AAAA,EAC5G,MAAM,0BAA0B,QAAQ;AAC1C,CAAC,CAAC,EAAE,QAAQ;AAEL,IAAM,2CAA2C,UAAU;AAAA,EAChE,cAA2B,yCAA4B,SAAS;AAAA,EAChE,mBAAgC,6CAAgC,SAAS,EAAE,SAAS;AACtF,CAAC,EAAE,QAAQ;AAEJ,IAAM,yBAAyB,WAAW;AAAA,EAC/C,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}

View file

@ -57,4 +57,4 @@ export {
teamMembershipsCrudClientReadSchema,
teamMembershipsCrudServerCreateSchema
};
//# sourceMappingURL=team-memberships.js.map
//# sourceMappingURL=team-memberships.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../../src/interface/crud/team-memberships.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupMixed, yupObject, yupString } from \"../../schema-fields\";\nimport { WebhookEvent } from \"../webhooks\";\n\nexport const teamMembershipsCrudClientReadSchema = yupObject({\n team_id: yupString().defined(),\n user_id: yupString().defined(),\n}).defined();\nexport const teamMembershipsCrudServerCreateSchema = yupObject({}).defined();\nexport const teamMembershipsCrudClientDeleteSchema = yupMixed();\n\nexport const teamMembershipsCrud = createCrud({\n // Client\n clientReadSchema: teamMembershipsCrudClientReadSchema,\n clientDeleteSchema: teamMembershipsCrudClientDeleteSchema,\n // Server\n serverCreateSchema: teamMembershipsCrudServerCreateSchema,\n docs: {\n serverCreate: {\n summary: \"Add a user to a team\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientDelete: {\n summary: \"Remove a user from a team\",\n description: \"All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.\",\n tags: [\"Teams\"],\n },\n serverDelete: {\n summary: \"Remove a user from a team\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\nexport type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;\n\nexport const teamMembershipCreatedWebhookEvent = {\n type: \"team_membership.created\",\n schema: teamMembershipsCrud.server.readSchema,\n metadata: {\n summary: \"Team Membership Created\",\n description: \"This event is triggered when a user is added to a team.\",\n tags: [\"Teams\"],\n },\n} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;\n\nexport const teamMembershipDeletedWebhookEvent = {\n type: \"team_membership.deleted\",\n schema: teamMembershipsCrud.server.readSchema,\n metadata: {\n summary: \"Team Membership Deleted\",\n description: \"This event is triggered when a user is removed from a team.\",\n tags: [\"Teams\"],\n },\n} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,UAAU,WAAW,iBAAiB;AAGxC,IAAM,sCAAsC,UAAU;AAAA,EAC3D,SAAS,UAAU,EAAE,QAAQ;AAAA,EAC7B,SAAS,UAAU,EAAE,QAAQ;AAC/B,CAAC,EAAE,QAAQ;AACJ,IAAM,wCAAwC,UAAU,CAAC,CAAC,EAAE,QAAQ;AACpE,IAAM,wCAAwC,SAAS;AAEvD,IAAM,sBAAsB,WAAW;AAAA;AAAA,EAE5C,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA,EAEpB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;AAGM,IAAM,oCAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ,oBAAoB,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,CAAC,OAAO;AAAA,EAChB;AACF;AAEO,IAAM,oCAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ,oBAAoB,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,CAAC,OAAO;AAAA,EAChB;AACF;","names":[]}
{"version":3,"sources":["../../../../src/interface/crud/team-memberships.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupMixed, yupObject, yupString } from \"../../schema-fields\";\nimport { WebhookEvent } from \"../webhooks\";\n\nexport const teamMembershipsCrudClientReadSchema = yupObject({\n team_id: yupString().defined(),\n user_id: yupString().defined(),\n}).defined();\nexport const teamMembershipsCrudServerCreateSchema = yupObject({}).defined();\nexport const teamMembershipsCrudClientDeleteSchema = yupMixed();\n\nexport const teamMembershipsCrud = createCrud({\n // Client\n clientReadSchema: teamMembershipsCrudClientReadSchema,\n clientDeleteSchema: teamMembershipsCrudClientDeleteSchema,\n // Server\n serverCreateSchema: teamMembershipsCrudServerCreateSchema,\n docs: {\n serverCreate: {\n summary: \"Add a user to a team\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientDelete: {\n summary: \"Remove a user from a team\",\n description: \"All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.\",\n tags: [\"Teams\"],\n },\n serverDelete: {\n summary: \"Remove a user from a team\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\nexport type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;\n\nexport const teamMembershipCreatedWebhookEvent = {\n type: \"team_membership.created\",\n schema: teamMembershipsCrud.server.readSchema,\n metadata: {\n summary: \"Team Membership Created\",\n description: \"This event is triggered when a user is added to a team.\",\n tags: [\"Teams\"],\n },\n} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;\n\nexport const teamMembershipDeletedWebhookEvent = {\n type: \"team_membership.deleted\",\n schema: teamMembershipsCrud.server.readSchema,\n metadata: {\n summary: \"Team Membership Deleted\",\n description: \"This event is triggered when a user is removed from a team.\",\n tags: [\"Teams\"],\n },\n} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;\n"],"mappings":";AAAA,SAAqB,kBAAkB;AACvC,SAAS,UAAU,WAAW,iBAAiB;AAGxC,IAAM,sCAAsC,UAAU;AAAA,EAC3D,SAAS,UAAU,EAAE,QAAQ;AAAA,EAC7B,SAAS,UAAU,EAAE,QAAQ;AAC/B,CAAC,EAAE,QAAQ;AACJ,IAAM,wCAAwC,UAAU,CAAC,CAAC,EAAE,QAAQ;AACpE,IAAM,wCAAwC,SAAS;AAEvD,IAAM,sBAAsB,WAAW;AAAA;AAAA,EAE5C,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA,EAEpB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;AAGM,IAAM,oCAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ,oBAAoB,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,CAAC,OAAO;AAAA,EAChB;AACF;AAEO,IAAM,oCAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ,oBAAoB,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,CAAC,OAAO;AAAA,EAChB;AACF;","names":[]}

View file

@ -111,4 +111,4 @@ export {
teamPermissionsCrudServerCreateSchema,
teamPermissionsCrudServerDeleteSchema
};
//# sourceMappingURL=team-permissions.js.map
//# sourceMappingURL=team-permissions.js.map

File diff suppressed because one or more lines are too long

View file

@ -140,4 +140,4 @@ export {
teamsCrudServerReadSchema,
teamsCrudServerUpdateSchema
};
//# sourceMappingURL=teams.js.map
//# sourceMappingURL=teams.js.map

File diff suppressed because one or more lines are too long

View file

@ -136,4 +136,4 @@ export {
usersCrudServerReadSchema,
usersCrudServerUpdateSchema
};
//# sourceMappingURL=users.js.map
//# sourceMappingURL=users.js.map

File diff suppressed because one or more lines are too long

View file

@ -508,4 +508,4 @@ var StackServerInterface = class extends StackClientInterface {
export {
StackServerInterface
};
//# sourceMappingURL=serverInterface.js.map
//# sourceMappingURL=serverInterface.js.map

File diff suppressed because one or more lines are too long

View file

@ -18,4 +18,4 @@ var webhookEvents = [
export {
webhookEvents
};
//# sourceMappingURL=webhooks.js.map
//# sourceMappingURL=webhooks.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/interface/webhooks.ts"],"sourcesContent":["import * as yup from \"yup\";\nimport { teamMembershipCreatedWebhookEvent, teamMembershipDeletedWebhookEvent } from \"./crud/team-memberships\";\nimport { teamPermissionCreatedWebhookEvent, teamPermissionDeletedWebhookEvent } from \"./crud/team-permissions\";\nimport { teamCreatedWebhookEvent, teamDeletedWebhookEvent, teamUpdatedWebhookEvent } from \"./crud/teams\";\nimport { userCreatedWebhookEvent, userDeletedWebhookEvent, userUpdatedWebhookEvent } from \"./crud/users\";\n\nexport type WebhookEvent<S extends yup.Schema> = {\n type: string,\n schema: S,\n metadata: {\n summary: string,\n description: string,\n tags?: string[],\n },\n};\n\nexport const webhookEvents = [\n userCreatedWebhookEvent,\n userUpdatedWebhookEvent,\n userDeletedWebhookEvent,\n teamCreatedWebhookEvent,\n teamUpdatedWebhookEvent,\n teamDeletedWebhookEvent,\n teamMembershipCreatedWebhookEvent,\n teamMembershipDeletedWebhookEvent,\n teamPermissionCreatedWebhookEvent,\n teamPermissionDeletedWebhookEvent,\n] as const;\n"],"mappings":";AACA,SAAS,mCAAmC,yCAAyC;AACrF,SAAS,mCAAmC,yCAAyC;AACrF,SAAS,yBAAyB,yBAAyB,+BAA+B;AAC1F,SAAS,yBAAyB,yBAAyB,+BAA+B;AAYnF,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
{"version":3,"sources":["../../../src/interface/webhooks.ts"],"sourcesContent":["import * as yup from \"yup\";\nimport { teamMembershipCreatedWebhookEvent, teamMembershipDeletedWebhookEvent } from \"./crud/team-memberships\";\nimport { teamPermissionCreatedWebhookEvent, teamPermissionDeletedWebhookEvent } from \"./crud/team-permissions\";\nimport { teamCreatedWebhookEvent, teamDeletedWebhookEvent, teamUpdatedWebhookEvent } from \"./crud/teams\";\nimport { userCreatedWebhookEvent, userDeletedWebhookEvent, userUpdatedWebhookEvent } from \"./crud/users\";\n\nexport type WebhookEvent<S extends yup.Schema> = {\n type: string,\n schema: S,\n metadata: {\n summary: string,\n description: string,\n tags?: string[],\n },\n};\n\nexport const webhookEvents = [\n userCreatedWebhookEvent,\n userUpdatedWebhookEvent,\n userDeletedWebhookEvent,\n teamCreatedWebhookEvent,\n teamUpdatedWebhookEvent,\n teamDeletedWebhookEvent,\n teamMembershipCreatedWebhookEvent,\n teamMembershipDeletedWebhookEvent,\n teamPermissionCreatedWebhookEvent,\n teamPermissionDeletedWebhookEvent,\n] as const;\n"],"mappings":";AACA,SAAS,mCAAmC,yCAAyC;AACrF,SAAS,mCAAmC,yCAAyC;AACrF,SAAS,yBAAyB,yBAAyB,+BAA+B;AAC1F,SAAS,yBAAyB,yBAAyB,+BAA+B;AAYnF,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}

View file

@ -177,7 +177,7 @@ var AccessTypeWithoutProjectId = createKnownErrorConstructor(
400,
deindent`
The x-stack-access-type header was '${accessType}', but the x-stack-project-id header was not provided.
For more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication
`,
{
@ -193,7 +193,7 @@ var AccessTypeRequired = createKnownErrorConstructor(
400,
deindent`
You must specify an access level for this Stack project. Make sure project API keys are provided (eg. x-stack-publishable-client-key) and you set the x-stack-access-type header to 'client', 'server', or 'admin'.
For more information, see the docs on REST API authentication: https://docs.stack-auth.com/rest-api/overview#authentication
`
],
@ -1262,4 +1262,4 @@ export {
KnownError,
KnownErrors
};
//# sourceMappingURL=known-errors.js.map
//# sourceMappingURL=known-errors.js.map

File diff suppressed because one or more lines are too long

View file

@ -483,4 +483,4 @@ export {
yupUnion,
yupValidate
};
//# sourceMappingURL=schema-fields.js.map
//# sourceMappingURL=schema-fields.js.map

File diff suppressed because one or more lines are too long

View file

@ -165,4 +165,4 @@ export {
InternalSession,
RefreshToken
};
//# sourceMappingURL=sessions.js.map
//# sourceMappingURL=sessions.js.map

File diff suppressed because one or more lines are too long

View file

@ -76,4 +76,4 @@ export {
isApiKey,
parseProjectApiKey
};
//# sourceMappingURL=api-keys.js.map
//# sourceMappingURL=api-keys.js.map

File diff suppressed because one or more lines are too long

View file

@ -75,4 +75,4 @@ export {
typedIncludes,
unique
};
//# sourceMappingURL=arrays.js.map
//# sourceMappingURL=arrays.js.map

File diff suppressed because one or more lines are too long

View file

@ -15,4 +15,4 @@ export {
fileToBase64,
validateBase64Image
};
//# sourceMappingURL=base64.js.map
//# sourceMappingURL=base64.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/base64.tsx"],"sourcesContent":["export function fileToBase64(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = error => reject(error);\n });\n}\n\nexport function validateBase64Image(base64: string): boolean {\n const base64ImageRegex = /^data:image\\/(png|jpg|jpeg|gif|bmp|webp);base64,[A-Za-z0-9+/]+={0,2}$|^[A-Za-z0-9+/]+={0,2}$/;\n return base64ImageRegex.test(base64);\n}\nundefined?.test(\"validateBase64Image\", ({ expect }) => {\n // Valid base64 image strings\n expect(validateBase64Image(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\")).toBe(true);\n expect(validateBase64Image(\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAABAAEDASIAAhEBAxEB/8QAHwAAAQUBA\")).toBe(true);\n expect(validateBase64Image(\"ABC123\")).toBe(true);\n // Invalid base64 image strings\n expect(validateBase64Image(\"data:text/plain;base64,SGVsbG8gV29ybGQ=\")).toBe(false);\n expect(validateBase64Image(\"data:image/png;base64,invalid!base64\")).toBe(false);\n expect(validateBase64Image(\"not a base64 string\")).toBe(false);\n expect(validateBase64Image(\"\")).toBe(false);\n});\n"],"mappings":";AAAO,SAAS,aAAa,MAA6B;AACxD,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,UAAM,SAAS,IAAI,WAAW;AAC9B,WAAO,cAAc,IAAI;AACzB,WAAO,SAAS,MAAM,QAAQ,OAAO,MAAgB;AACrD,WAAO,UAAU,WAAS,OAAO,KAAK;AAAA,EACxC,CAAC;AACH;AAEO,SAAS,oBAAoB,QAAyB;AAC3D,QAAM,mBAAmB;AACzB,SAAO,iBAAiB,KAAK,MAAM;AACrC;","names":[]}
{"version":3,"sources":["../../../src/utils/base64.tsx"],"sourcesContent":["export function fileToBase64(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = error => reject(error);\n });\n}\n\nexport function validateBase64Image(base64: string): boolean {\n const base64ImageRegex = /^data:image\\/(png|jpg|jpeg|gif|bmp|webp);base64,[A-Za-z0-9+/]+={0,2}$|^[A-Za-z0-9+/]+={0,2}$/;\n return base64ImageRegex.test(base64);\n}\nundefined?.test(\"validateBase64Image\", ({ expect }) => {\n // Valid base64 image strings\n expect(validateBase64Image(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==\")).toBe(true);\n expect(validateBase64Image(\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAABAAEDASIAAhEBAxEB/8QAHwAAAQUBA\")).toBe(true);\n expect(validateBase64Image(\"ABC123\")).toBe(true);\n // Invalid base64 image strings\n expect(validateBase64Image(\"data:text/plain;base64,SGVsbG8gV29ybGQ=\")).toBe(false);\n expect(validateBase64Image(\"data:image/png;base64,invalid!base64\")).toBe(false);\n expect(validateBase64Image(\"not a base64 string\")).toBe(false);\n expect(validateBase64Image(\"\")).toBe(false);\n});\n"],"mappings":";AAAO,SAAS,aAAa,MAA6B;AACxD,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,UAAM,SAAS,IAAI,WAAW;AAC9B,WAAO,cAAc,IAAI;AACzB,WAAO,SAAS,MAAM,QAAQ,OAAO,MAAgB;AACrD,WAAO,UAAU,WAAS,OAAO,KAAK;AAAA,EACxC,CAAC;AACH;AAEO,SAAS,oBAAoB,QAAyB;AAC3D,QAAM,mBAAmB;AACzB,SAAO,iBAAiB,KAAK,MAAM;AACrC;","names":[]}

View file

@ -9,4 +9,4 @@ export {
isFalsy,
isTruthy
};
//# sourceMappingURL=booleans.js.map
//# sourceMappingURL=booleans.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/booleans.tsx"],"sourcesContent":["export type Truthy<T> = T extends null | undefined | 0 | \"\" | false ? false : true;\nexport type Falsy<T> = T extends null | undefined | 0 | \"\" | false ? true : false;\n\nexport function isTruthy<T>(value: T): value is T & Truthy<T> {\n return !!value;\n}\nundefined?.test(\"isTruthy\", ({ expect }) => {\n expect(isTruthy(true)).toBe(true);\n expect(isTruthy(1)).toBe(true);\n expect(isTruthy(\"hello\")).toBe(true);\n expect(isTruthy({})).toBe(true);\n expect(isTruthy([])).toBe(true);\n expect(isTruthy(false)).toBe(false);\n expect(isTruthy(0)).toBe(false);\n expect(isTruthy(\"\")).toBe(false);\n expect(isTruthy(null)).toBe(false);\n expect(isTruthy(undefined)).toBe(false);\n});\n\nexport function isFalsy<T>(value: T): value is T & Falsy<T> {\n return !value;\n}\nundefined?.test(\"isFalsy\", ({ expect }) => {\n expect(isFalsy(false)).toBe(true);\n expect(isFalsy(0)).toBe(true);\n expect(isFalsy(\"\")).toBe(true);\n expect(isFalsy(null)).toBe(true);\n expect(isFalsy(undefined)).toBe(true);\n expect(isFalsy(true)).toBe(false);\n expect(isFalsy(1)).toBe(false);\n expect(isFalsy(\"hello\")).toBe(false);\n expect(isFalsy({})).toBe(false);\n expect(isFalsy([])).toBe(false);\n});\n"],"mappings":";AAGO,SAAS,SAAY,OAAkC;AAC5D,SAAO,CAAC,CAAC;AACX;AAcO,SAAS,QAAW,OAAiC;AAC1D,SAAO,CAAC;AACV;","names":[]}
{"version":3,"sources":["../../../src/utils/booleans.tsx"],"sourcesContent":["export type Truthy<T> = T extends null | undefined | 0 | \"\" | false ? false : true;\nexport type Falsy<T> = T extends null | undefined | 0 | \"\" | false ? true : false;\n\nexport function isTruthy<T>(value: T): value is T & Truthy<T> {\n return !!value;\n}\nundefined?.test(\"isTruthy\", ({ expect }) => {\n expect(isTruthy(true)).toBe(true);\n expect(isTruthy(1)).toBe(true);\n expect(isTruthy(\"hello\")).toBe(true);\n expect(isTruthy({})).toBe(true);\n expect(isTruthy([])).toBe(true);\n expect(isTruthy(false)).toBe(false);\n expect(isTruthy(0)).toBe(false);\n expect(isTruthy(\"\")).toBe(false);\n expect(isTruthy(null)).toBe(false);\n expect(isTruthy(undefined)).toBe(false);\n});\n\nexport function isFalsy<T>(value: T): value is T & Falsy<T> {\n return !value;\n}\nundefined?.test(\"isFalsy\", ({ expect }) => {\n expect(isFalsy(false)).toBe(true);\n expect(isFalsy(0)).toBe(true);\n expect(isFalsy(\"\")).toBe(true);\n expect(isFalsy(null)).toBe(true);\n expect(isFalsy(undefined)).toBe(true);\n expect(isFalsy(true)).toBe(false);\n expect(isFalsy(1)).toBe(false);\n expect(isFalsy(\"hello\")).toBe(false);\n expect(isFalsy({})).toBe(false);\n expect(isFalsy([])).toBe(false);\n});\n"],"mappings":";AAGO,SAAS,SAAY,OAAkC;AAC5D,SAAO,CAAC,CAAC;AACX;AAcO,SAAS,QAAW,OAAiC;AAC1D,SAAO,CAAC;AACV;","names":[]}

View file

@ -18,4 +18,4 @@ function getBrowserCompatibilityReport() {
export {
getBrowserCompatibilityReport
};
//# sourceMappingURL=browser-compat.js.map
//# sourceMappingURL=browser-compat.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/browser-compat.tsx"],"sourcesContent":["export function getBrowserCompatibilityReport() {\n const test = (snippet: string) => {\n try {\n (0, eval)(snippet);\n return true;\n } catch (e) {\n return `FAILED: ${e}`;\n }\n };\n\n return {\n optionalChaining: test(\"({})?.b?.c\"),\n nullishCoalescing: test(\"0 ?? 1\"),\n weakRef: test(\"new WeakRef({})\"),\n cryptoUuid: test(\"crypto.randomUUID()\"),\n };\n}\n"],"mappings":";AAAO,SAAS,gCAAgC;AAC9C,QAAM,OAAO,CAAC,YAAoB;AAChC,QAAI;AACF,OAAC,GAAG,MAAM,OAAO;AACjB,aAAO;AAAA,IACT,SAAS,GAAG;AACV,aAAO,WAAW,CAAC;AAAA,IACrB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,kBAAkB,KAAK,YAAY;AAAA,IACnC,mBAAmB,KAAK,QAAQ;AAAA,IAChC,SAAS,KAAK,iBAAiB;AAAA,IAC/B,YAAY,KAAK,qBAAqB;AAAA,EACxC;AACF;","names":[]}
{"version":3,"sources":["../../../src/utils/browser-compat.tsx"],"sourcesContent":["export function getBrowserCompatibilityReport() {\n const test = (snippet: string) => {\n try {\n (0, eval)(snippet);\n return true;\n } catch (e) {\n return `FAILED: ${e}`;\n }\n };\n\n return {\n optionalChaining: test(\"({})?.b?.c\"),\n nullishCoalescing: test(\"0 ?? 1\"),\n weakRef: test(\"new WeakRef({})\"),\n cryptoUuid: test(\"crypto.randomUUID()\"),\n };\n}\n"],"mappings":";AAAO,SAAS,gCAAgC;AAC9C,QAAM,OAAO,CAAC,YAAoB;AAChC,QAAI;AACF,OAAC,GAAG,MAAM,OAAO;AACjB,aAAO;AAAA,IACT,SAAS,GAAG;AACV,aAAO,WAAW,CAAC;AAAA,IACrB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,kBAAkB,KAAK,YAAY;AAAA,IACnC,mBAAmB,KAAK,QAAQ;AAAA,IAChC,SAAS,KAAK,iBAAiB;AAAA,IAC/B,YAAY,KAAK,qBAAqB;AAAA,EACxC;AACF;","names":[]}

View file

@ -157,4 +157,4 @@ export {
isBase64Url,
toHexString
};
//# sourceMappingURL=bytes.js.map
//# sourceMappingURL=bytes.js.map

File diff suppressed because one or more lines are too long

View file

@ -164,4 +164,4 @@ export {
AsyncCache,
cacheFunction
};
//# sourceMappingURL=caches.js.map
//# sourceMappingURL=caches.js.map

File diff suppressed because one or more lines are too long

View file

@ -8,4 +8,4 @@ function scrambleDuringCompileTime(t) {
export {
scrambleDuringCompileTime
};
//# sourceMappingURL=compile-time.js.map
//# sourceMappingURL=compile-time.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/compile-time.tsx"],"sourcesContent":["/**\n * Returns the first argument passed to it, but compilers won't be able to optimize it out. This is useful in some\n * cases where compiler warnings go awry; for example, when importing things that may not exist (but are guaranteed\n * to exist at runtime).\n */\nexport function scrambleDuringCompileTime<T>(t: T): T {\n if (Math.random() < 0.00001 && Math.random() > 0.99999 && Math.random() < 0.00001 && Math.random() > 0.99999) {\n return \"this will never happen\" as any;\n }\n return t;\n}\n"],"mappings":";AAKO,SAAS,0BAA6B,GAAS;AACpD,MAAI,KAAK,OAAO,IAAI,QAAW,KAAK,OAAO,IAAI,WAAW,KAAK,OAAO,IAAI,QAAW,KAAK,OAAO,IAAI,SAAS;AAC5G,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
{"version":3,"sources":["../../../src/utils/compile-time.tsx"],"sourcesContent":["/**\n * Returns the first argument passed to it, but compilers won't be able to optimize it out. This is useful in some\n * cases where compiler warnings go awry; for example, when importing things that may not exist (but are guaranteed\n * to exist at runtime).\n */\nexport function scrambleDuringCompileTime<T>(t: T): T {\n if (Math.random() < 0.00001 && Math.random() > 0.99999 && Math.random() < 0.00001 && Math.random() > 0.99999) {\n return \"this will never happen\" as any;\n }\n return t;\n}\n"],"mappings":";AAKO,SAAS,0BAA6B,GAAS;AACpD,MAAI,KAAK,OAAO,IAAI,QAAW,KAAK,OAAO,IAAI,WAAW,KAAK,OAAO,IAAI,QAAW,KAAK,OAAO,IAAI,SAAS;AAC5G,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}

View file

@ -22,4 +22,4 @@ export {
generateRandomValues,
generateSecureRandomString
};
//# sourceMappingURL=crypto.js.map
//# sourceMappingURL=crypto.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/crypto.tsx"],"sourcesContent":["import { encodeBase32 } from \"./bytes\";\nimport { StackAssertionError } from \"./errors\";\nimport { globalVar } from \"./globals\";\n\nexport function generateRandomValues(array: Uint8Array): typeof array {\n if (!globalVar.crypto) {\n throw new StackAssertionError(\"Crypto API is not available in this environment. Are you using an old browser?\");\n }\n if (!globalVar.crypto.getRandomValues) {\n throw new StackAssertionError(\"crypto.getRandomValues is not available in this environment. Are you using an old browser?\");\n }\n return globalVar.crypto.getRandomValues(array);\n}\n\n/**\n * Generates a secure alphanumeric string using the system's cryptographically secure\n * random number generator.\n */\nexport function generateSecureRandomString(minBitsOfEntropy: number = 224) {\n const base32CharactersCount = Math.ceil(minBitsOfEntropy / 5);\n const bytesCount = Math.ceil(base32CharactersCount * 5 / 8);\n const randomBytes = generateRandomValues(new Uint8Array(bytesCount));\n const str = encodeBase32(randomBytes);\n return str.slice(str.length - base32CharactersCount).toLowerCase();\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,iBAAiB;AAEnB,SAAS,qBAAqB,OAAiC;AACpE,MAAI,CAAC,UAAU,QAAQ;AACrB,UAAM,IAAI,oBAAoB,gFAAgF;AAAA,EAChH;AACA,MAAI,CAAC,UAAU,OAAO,iBAAiB;AACrC,UAAM,IAAI,oBAAoB,4FAA4F;AAAA,EAC5H;AACA,SAAO,UAAU,OAAO,gBAAgB,KAAK;AAC/C;AAMO,SAAS,2BAA2B,mBAA2B,KAAK;AACzE,QAAM,wBAAwB,KAAK,KAAK,mBAAmB,CAAC;AAC5D,QAAM,aAAa,KAAK,KAAK,wBAAwB,IAAI,CAAC;AAC1D,QAAM,cAAc,qBAAqB,IAAI,WAAW,UAAU,CAAC;AACnE,QAAM,MAAM,aAAa,WAAW;AACpC,SAAO,IAAI,MAAM,IAAI,SAAS,qBAAqB,EAAE,YAAY;AACnE;","names":[]}
{"version":3,"sources":["../../../src/utils/crypto.tsx"],"sourcesContent":["import { encodeBase32 } from \"./bytes\";\nimport { StackAssertionError } from \"./errors\";\nimport { globalVar } from \"./globals\";\n\nexport function generateRandomValues(array: Uint8Array): typeof array {\n if (!globalVar.crypto) {\n throw new StackAssertionError(\"Crypto API is not available in this environment. Are you using an old browser?\");\n }\n if (!globalVar.crypto.getRandomValues) {\n throw new StackAssertionError(\"crypto.getRandomValues is not available in this environment. Are you using an old browser?\");\n }\n return globalVar.crypto.getRandomValues(array);\n}\n\n/**\n * Generates a secure alphanumeric string using the system's cryptographically secure\n * random number generator.\n */\nexport function generateSecureRandomString(minBitsOfEntropy: number = 224) {\n const base32CharactersCount = Math.ceil(minBitsOfEntropy / 5);\n const bytesCount = Math.ceil(base32CharactersCount * 5 / 8);\n const randomBytes = generateRandomValues(new Uint8Array(bytesCount));\n const str = encodeBase32(randomBytes);\n return str.slice(str.length - base32CharactersCount).toLowerCase();\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,iBAAiB;AAEnB,SAAS,qBAAqB,OAAiC;AACpE,MAAI,CAAC,UAAU,QAAQ;AACrB,UAAM,IAAI,oBAAoB,gFAAgF;AAAA,EAChH;AACA,MAAI,CAAC,UAAU,OAAO,iBAAiB;AACrC,UAAM,IAAI,oBAAoB,4FAA4F;AAAA,EAC5H;AACA,SAAO,UAAU,OAAO,gBAAgB,KAAK;AAC/C;AAMO,SAAS,2BAA2B,mBAA2B,KAAK;AACzE,QAAM,wBAAwB,KAAK,KAAK,mBAAmB,CAAC;AAC5D,QAAM,aAAa,KAAK,KAAK,wBAAwB,IAAI,CAAC;AAC1D,QAAM,cAAc,qBAAqB,IAAI,WAAW,UAAU,CAAC;AACnE,QAAM,MAAM,aAAa,WAAW;AACpC,SAAO,IAAI,MAAM,IAAI,SAAS,qBAAqB,EAAE,YAAY;AACnE;","names":[]}

View file

@ -61,4 +61,4 @@ export {
getInputDatetimeLocalString,
isWeekend
};
//# sourceMappingURL=dates.js.map
//# sourceMappingURL=dates.js.map

File diff suppressed because one or more lines are too long

View file

@ -8,4 +8,4 @@ function hasClickableParent(element) {
export {
hasClickableParent
};
//# sourceMappingURL=dom.js.map
//# sourceMappingURL=dom.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/dom.tsx"],"sourcesContent":["export function hasClickableParent(element: HTMLElement): boolean {\n const parent = element.parentElement;\n if (!parent) return false;\n if (parent.dataset.n2Clickable) return true;\n\n return hasClickableParent(element.parentElement);\n}\n"],"mappings":";AAAO,SAAS,mBAAmB,SAA+B;AAChE,QAAM,SAAS,QAAQ;AACvB,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI,OAAO,QAAQ,YAAa,QAAO;AAEvC,SAAO,mBAAmB,QAAQ,aAAa;AACjD;","names":[]}
{"version":3,"sources":["../../../src/utils/dom.tsx"],"sourcesContent":["export function hasClickableParent(element: HTMLElement): boolean {\n const parent = element.parentElement;\n if (!parent) return false;\n if (parent.dataset.n2Clickable) return true;\n\n return hasClickableParent(element.parentElement);\n}\n"],"mappings":";AAAO,SAAS,mBAAmB,SAA+B;AAChE,QAAM,SAAS,QAAQ;AACvB,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI,OAAO,QAAQ,YAAa,QAAO;AAEvC,SAAO,mBAAmB,QAAQ,aAAa;AACjD;","names":[]}

View file

@ -11,14 +11,14 @@ function getEnvVariable(name, defaultValue) {
if (isBrowserLike()) {
throw new Error(deindent`
Can't use getEnvVariable on the client because Next.js transpiles expressions of the kind process.env.XYZ at build-time on the client.
Use process.env.XYZ directly instead.
`);
}
if (name === "NEXT_RUNTIME") {
throw new Error(deindent`
Can't use getEnvVariable to access the NEXT_RUNTIME environment variable because it's compiled into the client bundle.
Use getNextRuntime() instead.
`);
}
@ -55,4 +55,4 @@ export {
getNodeEnvironment,
isBrowserLike
};
//# sourceMappingURL=env.js.map
//# sourceMappingURL=env.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/env.tsx"],"sourcesContent":["import { throwErr } from \"./errors\";\nimport { deindent } from \"./strings\";\n\nexport function isBrowserLike() {\n return typeof window !== \"undefined\" && typeof document !== \"undefined\" && typeof document.createElement !== \"undefined\";\n}\n\n// newName: oldName\nconst ENV_VAR_RENAME: Record<string, string[]> = {\n NEXT_PUBLIC_STACK_API_URL: ['STACK_BASE_URL', 'NEXT_PUBLIC_STACK_URL'],\n};\n\n/**\n * Returns the environment variable with the given name, returning the default (if given) or throwing an error (otherwise) if it's undefined or the empty string.\n */\nexport function getEnvVariable(name: string, defaultValue?: string | undefined): string {\n if (isBrowserLike()) {\n throw new Error(deindent`\n Can't use getEnvVariable on the client because Next.js transpiles expressions of the kind process.env.XYZ at build-time on the client.\n \n Use process.env.XYZ directly instead.\n `);\n }\n if (name === \"NEXT_RUNTIME\") {\n throw new Error(deindent`\n Can't use getEnvVariable to access the NEXT_RUNTIME environment variable because it's compiled into the client bundle.\n \n Use getNextRuntime() instead.\n `);\n }\n\n // throw error if the old name is used as the retrieve key\n for (const [newName, oldNames] of Object.entries(ENV_VAR_RENAME)) {\n if (oldNames.includes(name)) {\n throwErr(`Environment variable ${name} has been renamed to ${newName}. Please update your configuration to use the new name.`);\n }\n }\n\n let value = process.env[name];\n\n // check the key under the old name if the new name is not found\n if (!value && ENV_VAR_RENAME[name] as any) {\n for (const oldName of ENV_VAR_RENAME[name]) {\n value = process.env[oldName];\n if (value) break;\n }\n }\n\n if (value === undefined) {\n if (defaultValue !== undefined) {\n value = defaultValue;\n } else {\n throwErr(`Missing environment variable: ${name}`);\n }\n }\n\n return value;\n}\n\nexport function getNextRuntime() {\n // This variable is compiled into the client bundle, so we can't use getEnvVariable here.\n return process.env.NEXT_RUNTIME || throwErr(\"Missing environment variable: NEXT_RUNTIME\");\n}\n\nexport function getNodeEnvironment() {\n return getEnvVariable(\"NODE_ENV\", \"\");\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AAElB,SAAS,gBAAgB;AAC9B,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,eAAe,OAAO,SAAS,kBAAkB;AAC/G;AAGA,IAAM,iBAA2C;AAAA,EAC/C,2BAA2B,CAAC,kBAAkB,uBAAuB;AACvE;AAKO,SAAS,eAAe,MAAc,cAA2C;AACtF,MAAI,cAAc,GAAG;AACnB,UAAM,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA,KAIf;AAAA,EACH;AACA,MAAI,SAAS,gBAAgB;AAC3B,UAAM,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA,KAIf;AAAA,EACH;AAGA,aAAW,CAAC,SAAS,QAAQ,KAAK,OAAO,QAAQ,cAAc,GAAG;AAChE,QAAI,SAAS,SAAS,IAAI,GAAG;AAC3B,eAAS,wBAAwB,IAAI,wBAAwB,OAAO,yDAAyD;AAAA,IAC/H;AAAA,EACF;AAEA,MAAI,QAAQ,QAAQ,IAAI,IAAI;AAG5B,MAAI,CAAC,SAAS,eAAe,IAAI,GAAU;AACzC,eAAW,WAAW,eAAe,IAAI,GAAG;AAC1C,cAAQ,QAAQ,IAAI,OAAO;AAC3B,UAAI,MAAO;AAAA,IACb;AAAA,EACF;AAEA,MAAI,UAAU,QAAW;AACvB,QAAI,iBAAiB,QAAW;AAC9B,cAAQ;AAAA,IACV,OAAO;AACL,eAAS,iCAAiC,IAAI,EAAE;AAAA,IAClD;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,iBAAiB;AAE/B,SAAO,QAAQ,IAAI,gBAAgB,SAAS,4CAA4C;AAC1F;AAEO,SAAS,qBAAqB;AACnC,SAAO,eAAe,YAAY,EAAE;AACtC;","names":[]}
{"version":3,"sources":["../../../src/utils/env.tsx"],"sourcesContent":["import { throwErr } from \"./errors\";\nimport { deindent } from \"./strings\";\n\nexport function isBrowserLike() {\n return typeof window !== \"undefined\" && typeof document !== \"undefined\" && typeof document.createElement !== \"undefined\";\n}\n\n// newName: oldName\nconst ENV_VAR_RENAME: Record<string, string[]> = {\n NEXT_PUBLIC_STACK_API_URL: ['STACK_BASE_URL', 'NEXT_PUBLIC_STACK_URL'],\n};\n\n/**\n * Returns the environment variable with the given name, returning the default (if given) or throwing an error (otherwise) if it's undefined or the empty string.\n */\nexport function getEnvVariable(name: string, defaultValue?: string | undefined): string {\n if (isBrowserLike()) {\n throw new Error(deindent`\n Can't use getEnvVariable on the client because Next.js transpiles expressions of the kind process.env.XYZ at build-time on the client.\n \n Use process.env.XYZ directly instead.\n `);\n }\n if (name === \"NEXT_RUNTIME\") {\n throw new Error(deindent`\n Can't use getEnvVariable to access the NEXT_RUNTIME environment variable because it's compiled into the client bundle.\n \n Use getNextRuntime() instead.\n `);\n }\n\n // throw error if the old name is used as the retrieve key\n for (const [newName, oldNames] of Object.entries(ENV_VAR_RENAME)) {\n if (oldNames.includes(name)) {\n throwErr(`Environment variable ${name} has been renamed to ${newName}. Please update your configuration to use the new name.`);\n }\n }\n\n let value = process.env[name];\n\n // check the key under the old name if the new name is not found\n if (!value && ENV_VAR_RENAME[name] as any) {\n for (const oldName of ENV_VAR_RENAME[name]) {\n value = process.env[oldName];\n if (value) break;\n }\n }\n\n if (value === undefined) {\n if (defaultValue !== undefined) {\n value = defaultValue;\n } else {\n throwErr(`Missing environment variable: ${name}`);\n }\n }\n\n return value;\n}\n\nexport function getNextRuntime() {\n // This variable is compiled into the client bundle, so we can't use getEnvVariable here.\n return process.env.NEXT_RUNTIME || throwErr(\"Missing environment variable: NEXT_RUNTIME\");\n}\n\nexport function getNodeEnvironment() {\n return getEnvVariable(\"NODE_ENV\", \"\");\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AAElB,SAAS,gBAAgB;AAC9B,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa,eAAe,OAAO,SAAS,kBAAkB;AAC/G;AAGA,IAAM,iBAA2C;AAAA,EAC/C,2BAA2B,CAAC,kBAAkB,uBAAuB;AACvE;AAKO,SAAS,eAAe,MAAc,cAA2C;AACtF,MAAI,cAAc,GAAG;AACnB,UAAM,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA,KAIf;AAAA,EACH;AACA,MAAI,SAAS,gBAAgB;AAC3B,UAAM,IAAI,MAAM;AAAA;AAAA;AAAA;AAAA,KAIf;AAAA,EACH;AAGA,aAAW,CAAC,SAAS,QAAQ,KAAK,OAAO,QAAQ,cAAc,GAAG;AAChE,QAAI,SAAS,SAAS,IAAI,GAAG;AAC3B,eAAS,wBAAwB,IAAI,wBAAwB,OAAO,yDAAyD;AAAA,IAC/H;AAAA,EACF;AAEA,MAAI,QAAQ,QAAQ,IAAI,IAAI;AAG5B,MAAI,CAAC,SAAS,eAAe,IAAI,GAAU;AACzC,eAAW,WAAW,eAAe,IAAI,GAAG;AAC1C,cAAQ,QAAQ,IAAI,OAAO;AAC3B,UAAI,MAAO;AAAA,IACb;AAAA,EACF;AAEA,MAAI,UAAU,QAAW;AACvB,QAAI,iBAAiB,QAAW;AAC9B,cAAQ;AAAA,IACV,OAAO;AACL,eAAS,iCAAiC,IAAI,EAAE;AAAA,IAClD;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,iBAAiB;AAE/B,SAAO,QAAQ,IAAI,gBAAgB,SAAS,4CAA4C;AAC1F;AAEO,SAAS,qBAAqB;AACnC,SAAO,eAAe,YAAY,EAAE;AACtC;","names":[]}

View file

@ -175,4 +175,4 @@ export {
registerErrorSink,
throwErr
};
//# sourceMappingURL=errors.js.map
//# sourceMappingURL=errors.js.map

File diff suppressed because one or more lines are too long

View file

@ -34,4 +34,4 @@ export {
listRecursively,
writeFileSyncIfChanged
};
//# sourceMappingURL=fs.js.map
//# sourceMappingURL=fs.js.map

View file

@ -1 +1 @@
{"version":3,"sources":["../../../src/utils/fs.tsx"],"sourcesContent":["import * as stackFs from \"fs\";\nimport * as path from \"path\";\n\nexport async function list(path: string) {\n return await stackFs.promises.readdir(path);\n}\n\nexport async function listRecursively(p: string, options: { excludeDirectories?: boolean } = {}): Promise<string[]> {\n const files = await list(p);\n return [\n ...(await Promise.all(files.map(async (fileName) => {\n const filePath = path.join(p, fileName);\n if ((await stackFs.promises.stat(filePath)).isDirectory()) {\n return [\n ...(await listRecursively(filePath, options)),\n ...(options.excludeDirectories ? [] : [filePath]),\n ];\n } else {\n return [filePath];\n }\n }))).flat(),\n ];\n}\n\nexport function writeFileSyncIfChanged(path: string, content: string): void {\n if (stackFs.existsSync(path)) {\n const existingContent = stackFs.readFileSync(path, \"utf-8\");\n if (existingContent === content) {\n return;\n }\n }\n stackFs.writeFileSync(path, content);\n}\n"],"mappings":";AAAA,YAAY,aAAa;AACzB,YAAY,UAAU;AAEtB,eAAsB,KAAKA,OAAc;AACvC,SAAO,MAAc,iBAAS,QAAQA,KAAI;AAC5C;AAEA,eAAsB,gBAAgB,GAAW,UAA4C,CAAC,GAAsB;AAClH,QAAM,QAAQ,MAAM,KAAK,CAAC;AAC1B,SAAO;AAAA,IACL,IAAI,MAAM,QAAQ,IAAI,MAAM,IAAI,OAAO,aAAa;AAClD,YAAM,WAAgB,UAAK,GAAG,QAAQ;AACtC,WAAK,MAAc,iBAAS,KAAK,QAAQ,GAAG,YAAY,GAAG;AACzD,eAAO;AAAA,UACL,GAAI,MAAM,gBAAgB,UAAU,OAAO;AAAA,UAC3C,GAAI,QAAQ,qBAAqB,CAAC,IAAI,CAAC,QAAQ;AAAA,QACjD;AAAA,MACF,OAAO;AACL,eAAO,CAAC,QAAQ;AAAA,MAClB;AAAA,IACF,CAAC,CAAC,GAAG,KAAK;AAAA,EACZ;AACF;AAEO,SAAS,uBAAuBA,OAAc,SAAuB;AAC1E,MAAY,mBAAWA,KAAI,GAAG;AAC5B,UAAM,kBAA0B,qBAAaA,OAAM,OAAO;AAC1D,QAAI,oBAAoB,SAAS;AAC/B;AAAA,IACF;AAAA,EACF;AACA,EAAQ,sBAAcA,OAAM,OAAO;AACrC;","names":["path"]}
{"version":3,"sources":["../../../src/utils/fs.tsx"],"sourcesContent":["import * as stackFs from \"fs\";\nimport * as path from \"path\";\n\nexport async function list(path: string) {\n return await stackFs.promises.readdir(path);\n}\n\nexport async function listRecursively(p: string, options: { excludeDirectories?: boolean } = {}): Promise<string[]> {\n const files = await list(p);\n return [\n ...(await Promise.all(files.map(async (fileName) => {\n const filePath = path.join(p, fileName);\n if ((await stackFs.promises.stat(filePath)).isDirectory()) {\n return [\n ...(await listRecursively(filePath, options)),\n ...(options.excludeDirectories ? [] : [filePath]),\n ];\n } else {\n return [filePath];\n }\n }))).flat(),\n ];\n}\n\nexport function writeFileSyncIfChanged(path: string, content: string): void {\n if (stackFs.existsSync(path)) {\n const existingContent = stackFs.readFileSync(path, \"utf-8\");\n if (existingContent === content) {\n return;\n }\n }\n stackFs.writeFileSync(path, content);\n}\n"],"mappings":";AAAA,YAAY,aAAa;AACzB,YAAY,UAAU;AAEtB,eAAsB,KAAKA,OAAc;AACvC,SAAO,MAAc,iBAAS,QAAQA,KAAI;AAC5C;AAEA,eAAsB,gBAAgB,GAAW,UAA4C,CAAC,GAAsB;AAClH,QAAM,QAAQ,MAAM,KAAK,CAAC;AAC1B,SAAO;AAAA,IACL,IAAI,MAAM,QAAQ,IAAI,MAAM,IAAI,OAAO,aAAa;AAClD,YAAM,WAAgB,UAAK,GAAG,QAAQ;AACtC,WAAK,MAAc,iBAAS,KAAK,QAAQ,GAAG,YAAY,GAAG;AACzD,eAAO;AAAA,UACL,GAAI,MAAM,gBAAgB,UAAU,OAAO;AAAA,UAC3C,GAAI,QAAQ,qBAAqB,CAAC,IAAI,CAAC,QAAQ;AAAA,QACjD;AAAA,MACF,OAAO;AACL,eAAO,CAAC,QAAQ;AAAA,MAClB;AAAA,IACF,CAAC,CAAC,GAAG,KAAK;AAAA,EACZ;AACF;AAEO,SAAS,uBAAuBA,OAAc,SAAuB;AAC1E,MAAY,mBAAWA,KAAI,GAAG;AAC5B,UAAM,kBAA0B,qBAAaA,OAAM,OAAO;AAC1D,QAAI,oBAAoB,SAAS;AAC/B;AAAA,IACF;AAAA,EACF;AACA,EAAQ,sBAAcA,OAAM,OAAO;AACrC;","names":["path"]}

Some files were not shown because too many files have changed in this diff Show more