@dereekb/firebase 13.11.17 → 13.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/eslint/index.cjs.js +7229 -1551
  2. package/eslint/index.esm.js +7203 -1552
  3. package/eslint/package.json +4 -2
  4. package/eslint/rollup.alias-internal.config.d.ts +1 -0
  5. package/eslint/src/lib/firebase-rules-text.d.ts +121 -0
  6. package/eslint/src/lib/firestore-rules-parser.d.ts +61 -0
  7. package/eslint/src/lib/index.d.ts +10 -0
  8. package/eslint/src/lib/plugin.d.ts +16 -0
  9. package/eslint/src/lib/predicate-evaluator.d.ts +47 -0
  10. package/eslint/src/lib/require-api-details-for-crud-function.rule.d.ts +83 -0
  11. package/eslint/src/lib/require-complete-crud-function-config-map.rule.d.ts +61 -0
  12. package/eslint/src/lib/require-dbx-model-companion-tags.rule.d.ts +47 -0
  13. package/eslint/src/lib/require-dbx-model-service-factory-tag.rule.d.ts +56 -0
  14. package/eslint/src/lib/require-firestore-constraint-type-parameter.rule.d.ts +45 -0
  15. package/eslint/src/lib/require-firestore-rule-for-service-model.rule.d.ts +115 -0
  16. package/eslint/src/lib/require-service-factory-for-dbx-model.rule.d.ts +80 -0
  17. package/eslint/src/lib/require-storagefile-policy-matches-rules.rule.d.ts +79 -0
  18. package/eslint/src/lib/storage-rules-parser.d.ts +38 -0
  19. package/index.cjs.js +53 -5
  20. package/index.esm.js +46 -6
  21. package/package.json +5 -5
  22. package/src/lib/common/auth/auth.d.ts +8 -0
  23. package/src/lib/common/auth/oidc/oidc.d.ts +7 -5
  24. package/src/lib/common/model/function.d.ts +12 -1
  25. package/src/lib/model/notification/notification.d.ts +6 -0
  26. package/src/lib/model/oidcmodel/oidcmodel.d.ts +1 -0
  27. package/src/lib/model/storagefile/storagefile.api.d.ts +113 -2
  28. package/src/lib/model/storagefile/storagefile.d.ts +2 -0
  29. package/src/lib/model/storagefile/storagefile.upload.d.ts +33 -1
  30. package/src/lib/model/system/system.d.ts +1 -0
  31. package/test/index.cjs.js +2 -4
  32. package/test/index.esm.js +2 -4
  33. package/test/package.json +6 -6
  34. package/eslint/src/lib/comments.d.ts +0 -112
  35. package/eslint/src/lib/dbx-tag-families.d.ts +0 -280
  36. package/eslint/src/lib/jsdoc-parser.d.ts +0 -116
@@ -0,0 +1,115 @@
1
+ import type { AstNode } from './util';
2
+ /**
3
+ * Default file name searched relative to the lint root when `firestoreRulesPath` is omitted.
4
+ */
5
+ export declare const DEFAULT_FIRESTORE_RULES_FILENAME: string;
6
+ /**
7
+ * Default call-expression callee name the rule looks for to locate the service.ts
8
+ * model registry. Files without this call are treated as not-a-service.ts and skipped.
9
+ */
10
+ export declare const DEFAULT_REGISTRY_FACTORY_CALL_NAME: string;
11
+ /**
12
+ * Default call-expression callee name used to discover `firestoreModelIdentity(...)`
13
+ * declarations in the workspace.
14
+ */
15
+ export declare const DEFAULT_IDENTITY_FACTORY_NAME: string;
16
+ /**
17
+ * Default glob patterns (relative to ESLint `cwd`) the rule scans to build the workspace
18
+ * identity registry. Covers shared identities in `@dereekb/firebase` source, local model
19
+ * identities inside `*-firebase` components, and any app-side model files.
20
+ */
21
+ export declare const DEFAULT_MODEL_SEARCH_ROOTS: readonly string[];
22
+ /**
23
+ * Inline identity stub used by the rule's spec to bypass workspace globbing.
24
+ */
25
+ export interface VirtualModelIdentity {
26
+ readonly modelName: string;
27
+ readonly collectionName: string;
28
+ readonly identityVariableName: string;
29
+ readonly parentIdentityVariableName?: string;
30
+ }
31
+ /**
32
+ * Options for the require-firestore-rule-for-service-model rule.
33
+ */
34
+ export interface FirebaseRequireFirestoreRuleForServiceModelRuleOptions {
35
+ /**
36
+ * Path to the `firestore.rules` file. Resolved against the ESLint `cwd` when relative.
37
+ * Defaults to `<cwd>/firestore.rules`.
38
+ */
39
+ readonly firestoreRulesPath?: string;
40
+ /**
41
+ * Inline `firestore.rules` source used in tests; bypasses filesystem reads when set.
42
+ */
43
+ readonly virtualFirestoreRules?: string;
44
+ /**
45
+ * Inline `firestoreModelIdentity` registry used in tests; bypasses workspace globbing.
46
+ */
47
+ readonly virtualModelIdentities?: readonly VirtualModelIdentity[];
48
+ /**
49
+ * Call-expression callee name that marks a file as the app's service.ts. Defaults to
50
+ * {@link DEFAULT_REGISTRY_FACTORY_CALL_NAME}.
51
+ */
52
+ readonly registryFactoryCallName?: string;
53
+ /**
54
+ * Call-expression callee name treated as the model-identity factory. Defaults to
55
+ * {@link DEFAULT_IDENTITY_FACTORY_NAME}.
56
+ */
57
+ readonly identityFactoryName?: string;
58
+ /**
59
+ * Glob patterns (relative to ESLint `cwd`) used to discover identity declarations.
60
+ * Defaults to {@link DEFAULT_MODEL_SEARCH_ROOTS}.
61
+ */
62
+ readonly modelSearchRoots?: readonly string[];
63
+ /**
64
+ * Model names that are intentionally registered in service.ts without a matching block
65
+ * in firestore.rules. Suppresses the missing-match warning for each name.
66
+ */
67
+ readonly allowedMissingCollectionNames?: readonly string[];
68
+ }
69
+ /**
70
+ * ESLint rule definition for require-firestore-rule-for-service-model.
71
+ */
72
+ export interface FirebaseRequireFirestoreRuleForServiceModelRuleDefinition {
73
+ readonly meta: {
74
+ readonly type: 'problem';
75
+ readonly fixable: undefined;
76
+ readonly docs: {
77
+ readonly description: string;
78
+ readonly recommended: boolean;
79
+ };
80
+ readonly messages: Readonly<Record<string, string>>;
81
+ readonly schema: readonly object[];
82
+ };
83
+ create(context: RuleContext): Record<string, (node: AstNode) => void>;
84
+ }
85
+ interface RuleContext {
86
+ readonly options: FirebaseRequireFirestoreRuleForServiceModelRuleOptions[];
87
+ readonly cwd?: string;
88
+ readonly report: (descriptor: {
89
+ node: AstNode;
90
+ messageId: string;
91
+ data?: Record<string, string>;
92
+ }) => void;
93
+ }
94
+ /**
95
+ * ESLint rule that cross-checks every model registered in an app's `service.ts`
96
+ * (`firebaseModelsService<...>(REGISTRY)`) against the app's `firestore.rules`. Each
97
+ * registered model must have a `match /<collection>/...` block at the correct nesting
98
+ * depth (subcollections nested under their parent collection's match, or matched via a
99
+ * top-level `match /{path=**}/<collection>/...` collection-group rule).
100
+ *
101
+ * Models whose model name appears in `allowedMissingCollectionNames` are exempt — used to
102
+ * document intentional gaps in the rules file.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * // OK — firestore.rules has `match /gb/{guestbook} { match /gbe/{guestbookEntry} { ... } }`
107
+ * export const DEMO_FIREBASE_MODEL_SERVICE_FACTORIES = {
108
+ * guestbook: guestbookFirebaseModelServiceFactory,
109
+ * guestbookEntry: guestbookEntryFirebaseModelServiceFactory
110
+ * };
111
+ * export const demoFirebaseModelServices = firebaseModelsService(DEMO_FIREBASE_MODEL_SERVICE_FACTORIES);
112
+ * ```
113
+ */
114
+ export declare const FIREBASE_REQUIRE_FIRESTORE_RULE_FOR_SERVICE_MODEL_RULE: FirebaseRequireFirestoreRuleForServiceModelRuleDefinition;
115
+ export {};
@@ -0,0 +1,80 @@
1
+ import type { AstNode } from './util';
2
+ /**
3
+ * Default glob patterns (relative to ESLint `cwd`) used to locate model + factory source files.
4
+ * Mirrors {@link require-firestore-rule-for-service-model}'s search roots so the orphan rule
5
+ * picks up factories declared anywhere a model interface might also live.
6
+ */
7
+ export declare const DEFAULT_FACTORY_SEARCH_ROOTS: readonly string[];
8
+ /**
9
+ * Default name of the `@dbxModel` marker tag that triggers the orphan check.
10
+ */
11
+ export declare const DEFAULT_MODEL_MARKER_TAG: string;
12
+ /**
13
+ * Default name of the `@dbxModelServiceFactory <modelType>` tag the rule cross-references.
14
+ */
15
+ export declare const DEFAULT_FACTORY_TAG: string;
16
+ /**
17
+ * Options for the require-service-factory-for-dbx-model rule.
18
+ */
19
+ export interface FirebaseRequireServiceFactoryForDbxModelRuleOptions {
20
+ /**
21
+ * Glob patterns (relative to ESLint `cwd`) the rule scans to discover
22
+ * `@dbxModelServiceFactory <modelType>` declarations. Defaults to
23
+ * {@link DEFAULT_FACTORY_SEARCH_ROOTS}.
24
+ */
25
+ readonly factorySearchRoots?: readonly string[];
26
+ /**
27
+ * Inline factory set used in tests; bypasses filesystem globbing.
28
+ */
29
+ readonly virtualFactoryModelTypes?: readonly string[];
30
+ /**
31
+ * Override the `@dbxModel` marker tag name. Defaults to {@link DEFAULT_MODEL_MARKER_TAG}.
32
+ */
33
+ readonly modelMarkerTag?: string;
34
+ /**
35
+ * Override the `@dbxModelServiceFactory` tag name. Defaults to {@link DEFAULT_FACTORY_TAG}.
36
+ */
37
+ readonly factoryTag?: string;
38
+ /**
39
+ * Model interface names that are intentionally declared without a matching service factory.
40
+ * Suppresses the warning for each name.
41
+ */
42
+ readonly ignoreModels?: readonly string[];
43
+ }
44
+ /**
45
+ * ESLint rule definition for require-service-factory-for-dbx-model.
46
+ */
47
+ export interface FirebaseRequireServiceFactoryForDbxModelRuleDefinition {
48
+ readonly meta: {
49
+ readonly type: 'suggestion';
50
+ readonly fixable: undefined;
51
+ readonly docs: {
52
+ readonly description: string;
53
+ readonly recommended: boolean;
54
+ };
55
+ readonly messages: Readonly<Record<string, string>>;
56
+ readonly schema: readonly object[];
57
+ };
58
+ create(context: RuleContext): Record<string, (node: AstNode) => void>;
59
+ }
60
+ interface RuleContext {
61
+ readonly options: FirebaseRequireServiceFactoryForDbxModelRuleOptions[];
62
+ readonly cwd?: string;
63
+ readonly sourceCode: AstNode;
64
+ readonly report: (descriptor: {
65
+ node: AstNode;
66
+ messageId: string;
67
+ data?: Record<string, string>;
68
+ }) => void;
69
+ }
70
+ /**
71
+ * ESLint rule that flags every `@dbxModel`-marked interface that has no matching
72
+ * `@dbxModelServiceFactory <modelType>` declaration elsewhere in the workspace.
73
+ *
74
+ * The expected `modelType` is derived from the interface name by lowercasing the first
75
+ * character (matching the `FirestoreModelIdentity.modelType` convention). Models that are
76
+ * intentionally factory-less (e.g. sub-objects mis-marked as `@dbxModel`) can be silenced via
77
+ * the `ignoreModels` option.
78
+ */
79
+ export declare const FIREBASE_REQUIRE_SERVICE_FACTORY_FOR_DBX_MODEL_RULE: FirebaseRequireServiceFactoryForDbxModelRuleDefinition;
80
+ export {};
@@ -0,0 +1,79 @@
1
+ import { type AstNode } from './util';
2
+ /**
3
+ * Default type name the rule looks for on top-level declarators. Variables whose type
4
+ * annotation resolves to this identifier are treated as upload policies and validated
5
+ * against `storage.rules`.
6
+ */
7
+ export declare const DEFAULT_STORAGE_FILE_UPLOAD_POLICY_TYPE_NAME: string;
8
+ /**
9
+ * Default file name searched relative to the lint root when `storageRulesPath` is omitted.
10
+ */
11
+ export declare const DEFAULT_STORAGE_RULES_FILENAME: string;
12
+ /**
13
+ * Options for the require-storagefile-policy-matches-rules rule.
14
+ */
15
+ export interface FirebaseRequireStorageFilePolicyMatchesRulesRuleOptions {
16
+ /**
17
+ * Path to the `storage.rules` file. Resolved against the ESLint `cwd` when relative.
18
+ * Defaults to `<cwd>/storage.rules`.
19
+ */
20
+ readonly storageRulesPath?: string;
21
+ /**
22
+ * Inline `storage.rules` source used in tests; bypasses filesystem reads when set.
23
+ */
24
+ readonly virtualStorageRules?: string;
25
+ /**
26
+ * Type-annotation identifier the rule treats as the upload-policy marker. Defaults to
27
+ * {@link DEFAULT_STORAGE_FILE_UPLOAD_POLICY_TYPE_NAME}.
28
+ */
29
+ readonly policyTypeName?: string;
30
+ }
31
+ /**
32
+ * ESLint rule definition for require-storagefile-policy-matches-rules.
33
+ */
34
+ export interface FirebaseRequireStorageFilePolicyMatchesRulesRuleDefinition {
35
+ readonly meta: {
36
+ readonly type: 'problem';
37
+ readonly fixable: undefined;
38
+ readonly docs: {
39
+ readonly description: string;
40
+ readonly recommended: boolean;
41
+ };
42
+ readonly messages: Readonly<Record<string, string>>;
43
+ readonly schema: readonly object[];
44
+ };
45
+ create(context: RuleContext): Record<string, (node: AstNode) => void>;
46
+ }
47
+ interface RuleContext {
48
+ readonly options: FirebaseRequireStorageFilePolicyMatchesRulesRuleOptions[];
49
+ readonly cwd?: string;
50
+ readonly report: (descriptor: {
51
+ node: AstNode;
52
+ messageId: string;
53
+ data?: Record<string, string>;
54
+ }) => void;
55
+ }
56
+ /**
57
+ * ESLint rule that cross-checks every `StorageFilePurposeUploadPolicy`-typed declaration in
58
+ * a `*-firebase` component against the workspace's `storage.rules`. Each policy must have a
59
+ * paired `// Mirrors STORAGE_FILE_PURPOSE_UPLOAD_POLICIES[<KEY>]` match block whose
60
+ * `request.resource.size` cap and `request.resource.contentType` predicate are at least as
61
+ * permissive as the TypeScript policy's `maxFileSizeBytes` and `allowedMimeTypes`.
62
+ *
63
+ * Reports on the TS side so drift surfaces in the normal lint pipeline; mismatches almost
64
+ * always originate from editing one side and forgetting the other.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * // OK — storage.rules has `Mirrors ...[USER_AVATAR_PURPOSE]` block with matching constraints
69
+ * export const USER_AVATAR_UPLOAD_POLICY: StorageFilePurposeUploadPolicy = {
70
+ * purpose: USER_AVATAR_PURPOSE,
71
+ * allowedMimeTypes: ['image/jpeg', 'image/png'],
72
+ * maxFileSizeBytes: 16 * 1024 * 1024,
73
+ * buildUploadPath: ({ uid }) => userAvatarUploadsFilePath(uid),
74
+ * requiresFilenameInput: false
75
+ * };
76
+ * ```
77
+ */
78
+ export declare const FIREBASE_REQUIRE_STORAGEFILE_POLICY_MATCHES_RULES_RULE: FirebaseRequireStorageFilePolicyMatchesRulesRuleDefinition;
79
+ export {};
@@ -0,0 +1,38 @@
1
+ import { type PredicateBranch } from './predicate-evaluator';
2
+ /**
3
+ * Marker comment that pairs a `storage.rules` match block with a TypeScript policy key
4
+ * in `STORAGE_FILE_PURPOSE_UPLOAD_POLICIES`. The capture group is the policy key constant
5
+ * name, e.g. `USER_AVATAR_PURPOSE`.
6
+ */
7
+ export declare const MIRRORS_POLICY_KEY_MARKER_REGEX: RegExp;
8
+ /**
9
+ * One disjunct of an `allow write: if ...` predicate after helper-function expansion.
10
+ * Always carries a numeric byte cap plus at least one MIME constraint (literal or regex).
11
+ *
12
+ * Structurally identical to the evaluator's {@link PredicateBranch}; the alias keeps the
13
+ * existing public type name stable for downstream consumers.
14
+ */
15
+ export type ParsedRuleBranch = PredicateBranch;
16
+ /**
17
+ * One `match /<path>` block in `storage.rules` paired with a `// Mirrors ...` marker.
18
+ * `branches` carries the disjunction of (size, MIME) tuples extracted from the block's
19
+ * `allow write` predicate; `unsupported` is set when the parser cannot reduce the
20
+ * predicate to >=1 valid branch.
21
+ */
22
+ export interface ParsedStorageRulesBlock {
23
+ readonly mirrorsPolicyKey: string;
24
+ readonly matchPath: string;
25
+ readonly branches: readonly ParsedRuleBranch[];
26
+ readonly sourceLine: number;
27
+ readonly sourceColumn: number;
28
+ readonly unsupported?: string;
29
+ }
30
+ /**
31
+ * Parses a `storage.rules` source string and returns every match block paired with a
32
+ * `// Mirrors STORAGE_FILE_PURPOSE_UPLOAD_POLICIES[<KEY>]` marker. Catch-all deny blocks
33
+ * are skipped; the rest of the tree is walked normally.
34
+ *
35
+ * @param source - The raw rules source text.
36
+ * @returns Parsed mirrored blocks in source order.
37
+ */
38
+ export declare function parseStorageRules(source: string): ParsedStorageRulesBlock[];
package/index.cjs.js CHANGED
@@ -11479,6 +11479,9 @@ function mapHttpsCallable(callable, wrap) {
11479
11479
  /**
11480
11480
  * Pre-configured OnCallTypedModelParamsFunctions for 'query'
11481
11481
  */ var onCallQueryModelParams = onCallTypedModelParamsFunction('query');
11482
+ /**
11483
+ * Pre-configured OnCallTypedModelParamsFunctions for 'invoke'
11484
+ */ var onCallInvokeModelParams = onCallTypedModelParamsFunction('invoke');
11482
11485
  /**
11483
11486
  * Key used on the front-end and backend that refers to the call function.
11484
11487
  */ var CALL_MODEL_APP_FUNCTION_KEY = 'callModel';
@@ -11893,8 +11896,9 @@ var READ_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "read");
11893
11896
  var UPDATE_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "update");
11894
11897
  var DELETE_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "delete");
11895
11898
  var QUERY_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "query");
11899
+ var INVOKE_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "invoke");
11896
11900
  /**
11897
- * Canonical CRUD scopes enforced on the `callModel` API.
11901
+ * Canonical CRUD + invoke scopes enforced on the `callModel` API.
11898
11902
  *
11899
11903
  * Each scope corresponds 1:1 to a {@link KnownOnCallFunctionType}; see
11900
11904
  * {@link CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE}.
@@ -11903,16 +11907,18 @@ var QUERY_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "query");
11903
11907
  READ_MODEL_OIDC_SCOPE,
11904
11908
  UPDATE_MODEL_OIDC_SCOPE,
11905
11909
  DELETE_MODEL_OIDC_SCOPE,
11906
- QUERY_MODEL_OIDC_SCOPE
11910
+ QUERY_MODEL_OIDC_SCOPE,
11911
+ INVOKE_MODEL_OIDC_SCOPE
11907
11912
  ];
11908
11913
  /**
11909
- * Maps each known CRUD call type to the scope an OIDC token must carry to invoke it.
11914
+ * Maps each known call type to the scope an OIDC token must carry to invoke it.
11910
11915
  */ var CALL_MODEL_OIDC_SCOPE_FOR_CALL_TYPE = {
11911
11916
  create: 'model.create',
11912
11917
  read: 'model.read',
11913
11918
  update: 'model.update',
11914
11919
  delete: 'model.delete',
11915
- query: 'model.query'
11920
+ query: 'model.query',
11921
+ invoke: 'model.invoke'
11916
11922
  };
11917
11923
  /**
11918
11924
  * Resolves the OIDC scope that an OIDC-authenticated caller must hold to invoke
@@ -11957,6 +11963,11 @@ var QUERY_MODEL_OIDC_SCOPE = "".concat(CALL_MODEL_OIDC_SCOPE_PREFIX, "query");
11957
11963
  label: 'Query models',
11958
11964
  value: 'model.query',
11959
11965
  description: 'Query model records via the callModel API'
11966
+ },
11967
+ {
11968
+ label: 'Invoke model operations',
11969
+ value: 'model.invoke',
11970
+ description: 'Invoke RPC-style operations on model records via the callModel API'
11960
11971
  }
11961
11972
  ];
11962
11973
  // MARK: Standard OIDC Scopes
@@ -12036,6 +12047,7 @@ var FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY = 'setupPassword';
12036
12047
  var FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY = 'setupCommunicationAt';
12037
12048
  var FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY = 'resetPassword';
12038
12049
  var FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY = 'resetCommunicationAt';
12050
+ var FIREBASE_SERVER_AUTH_CLAIMS_RESET_EXPIRES_AT_KEY = 'resetExpiresAt';
12039
12051
 
12040
12052
  /**
12041
12053
  * Extracts the {@link FirebaseAuthContextInfo} from a {@link FirebaseAuthContext}.
@@ -18820,6 +18832,34 @@ var downloadMultipleStorageFilesParamsType = /* @__PURE__ */ arktype.type({
18820
18832
  'asAdmin?': model.clearable('boolean'),
18821
18833
  'throwOnFirstError?': model.clearable('boolean')
18822
18834
  });
18835
+ // MARK: Create Signed Upload URL
18836
+ /**
18837
+ * Lower bound for caller-supplied `expiresInMs` on signed-upload-url generation.
18838
+ *
18839
+ * Anything shorter than 30 seconds is unrealistic for a caller to pick up a
18840
+ * URL, perform the PUT, and acknowledge before the URL expires.
18841
+ */ var CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MIN_EXPIRES_IN_MS = 30 * 1000;
18842
+ /**
18843
+ * Upper bound for caller-supplied `expiresInMs` on signed-upload-url generation.
18844
+ *
18845
+ * 10 minutes is the longest acceptable window for a one-shot upload URL. Any
18846
+ * legitimate caller should be uploading within this window; longer windows
18847
+ * increase the blast radius if the URL leaks.
18848
+ */ var CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_EXPIRES_IN_MS = 10 * 60 * 1000;
18849
+ /**
18850
+ * Default `expiresInMs` applied when the caller does not supply one.
18851
+ */ var DEFAULT_CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_EXPIRES_IN_MS = 5 * 60 * 1000;
18852
+ /**
18853
+ * Maximum length of a caller-supplied filename. Enforced both at the ArkType
18854
+ * layer and again by the handler's sanitizer.
18855
+ */ var CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH = 200;
18856
+ var createStorageFileSignedUploadUrlParamsType = /* @__PURE__ */ arktype.type({
18857
+ purpose: 'string > 0',
18858
+ contentType: 'string > 0',
18859
+ 'filename?': model.clearable("string > 0 & string <= ".concat(CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH)),
18860
+ fileSizeBytes: 'number > 0',
18861
+ 'expiresInMs?': model.clearable("number >= ".concat(CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MIN_EXPIRES_IN_MS, " & number <= ").concat(CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_EXPIRES_IN_MS))
18862
+ });
18823
18863
  var createStorageFileGroupParamsType = /* @__PURE__ */ arktype.type({
18824
18864
  'model?': model.clearable(firestoreModelKeyType),
18825
18865
  'storageFileId?': model.clearable(firestoreModelIdType)
@@ -18846,7 +18886,7 @@ var initializeAllApplicableStorageFileGroupsParamsType = /* @__PURE__ */ arktype
18846
18886
  var STORAGE_FILE_FUNCTION_TYPE_CONFIG_MAP = {};
18847
18887
  var STORAGE_FILE_MODEL_CRUD_FUNCTIONS_CONFIG = {
18848
18888
  storageFile: [
18849
- 'create:_,fromUpload,allFromUpload',
18889
+ 'create:_,fromUpload,allFromUpload,signedUploadUrl',
18850
18890
  'update:_,process,syncWithGroups',
18851
18891
  'delete:_',
18852
18892
  'read:download,downloadMultiple'
@@ -21252,6 +21292,9 @@ exports.CONFLICT_ERROR_CODE = CONFLICT_ERROR_CODE;
21252
21292
  exports.COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION = COPY_USER_RELATED_DATA_ACCESSOR_FACTORY_FUNCTION;
21253
21293
  exports.CREATE_MODEL_OIDC_SCOPE = CREATE_MODEL_OIDC_SCOPE;
21254
21294
  exports.CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE = CREATE_NOTIFICATION_ID_REQUIRED_ERROR_CODE;
21295
+ exports.CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_EXPIRES_IN_MS = CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_EXPIRES_IN_MS;
21296
+ exports.CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH = CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MAX_FILENAME_LENGTH;
21297
+ exports.CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MIN_EXPIRES_IN_MS = CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_MIN_EXPIRES_IN_MS;
21255
21298
  exports.ContextGrantedModelRolesReaderInstance = ContextGrantedModelRolesReaderInstance;
21256
21299
  exports.DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE = DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE;
21257
21300
  exports.DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE = DBX_FIREBASE_SERVER_NO_UID_ERROR_CODE;
@@ -21259,6 +21302,7 @@ exports.DBX_FIREBASE_SERVER_PASSWORD_RESET_INVALID_CODE_ERROR_CODE = DBX_FIREBAS
21259
21302
  exports.DBX_FIREBASE_SERVER_PASSWORD_RESET_NO_CONFIG_ERROR_CODE = DBX_FIREBASE_SERVER_PASSWORD_RESET_NO_CONFIG_ERROR_CODE;
21260
21303
  exports.DBX_FIREBASE_SERVER_PASSWORD_RESET_SEND_ONCE_ERROR_CODE = DBX_FIREBASE_SERVER_PASSWORD_RESET_SEND_ONCE_ERROR_CODE;
21261
21304
  exports.DBX_FIREBASE_SERVER_PASSWORD_RESET_THROTTLE_ERROR_CODE = DBX_FIREBASE_SERVER_PASSWORD_RESET_THROTTLE_ERROR_CODE;
21305
+ exports.DEFAULT_CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_EXPIRES_IN_MS = DEFAULT_CREATE_STORAGE_FILE_SIGNED_UPLOAD_URL_EXPIRES_IN_MS;
21262
21306
  exports.DEFAULT_DATE_CELL_RANGE_VALUE = DEFAULT_DATE_CELL_RANGE_VALUE;
21263
21307
  exports.DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE = DEFAULT_FIRESTORE_DATE_CELL_SCHEDULE_VALUE;
21264
21308
  exports.DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE = DEFAULT_FIRESTORE_ITEM_PAGE_ITERATOR_ITEMS_PER_PAGE;
@@ -21300,6 +21344,7 @@ exports.FIREBASE_AUTH_QUOTA_EXCEEDED_ERROR = FIREBASE_AUTH_QUOTA_EXCEEDED_ERROR;
21300
21344
  exports.FIREBASE_AUTH_USER_NOT_FOUND_ERROR = FIREBASE_AUTH_USER_NOT_FOUND_ERROR;
21301
21345
  exports.FIREBASE_AUTH_WRONG_PASSWORD = FIREBASE_AUTH_WRONG_PASSWORD;
21302
21346
  exports.FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY = FIREBASE_DEVELOPMENT_FUNCTIONS_MAP_KEY;
21347
+ exports.FIREBASE_SERVER_AUTH_CLAIMS_RESET_EXPIRES_AT_KEY = FIREBASE_SERVER_AUTH_CLAIMS_RESET_EXPIRES_AT_KEY;
21303
21348
  exports.FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY = FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY;
21304
21349
  exports.FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY = FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY;
21305
21350
  exports.FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY = FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY;
@@ -21335,6 +21380,7 @@ exports.FirebaseModelPermissionServiceInstance = FirebaseModelPermissionServiceI
21335
21380
  exports.FirebaseServerError = FirebaseServerError;
21336
21381
  exports.HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL = HIGH_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL;
21337
21382
  exports.INTERNAL_SERVER_ERROR_CODE = INTERNAL_SERVER_ERROR_CODE;
21383
+ exports.INVOKE_MODEL_OIDC_SCOPE = INVOKE_MODEL_OIDC_SCOPE;
21338
21384
  exports.LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL = LOW_UPLOADED_FILE_TYPE_DETERMINATION_LEVEL;
21339
21385
  exports.MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE = MAX_FIRESTORE_MAP_ZOOM_LEVEL_VALUE;
21340
21386
  exports.MAX_ON_CALL_QUERY_MODEL_LIMIT = MAX_ON_CALL_QUERY_MODEL_LIMIT;
@@ -21498,6 +21544,7 @@ exports.createStorageFileDocumentPair = createStorageFileDocumentPair;
21498
21544
  exports.createStorageFileDocumentPairFactory = createStorageFileDocumentPairFactory;
21499
21545
  exports.createStorageFileGroupParamsType = createStorageFileGroupParamsType;
21500
21546
  exports.createStorageFileParamsType = createStorageFileParamsType;
21547
+ exports.createStorageFileSignedUploadUrlParamsType = createStorageFileSignedUploadUrlParamsType;
21501
21548
  exports.dataFromDocumentSnapshots = dataFromDocumentSnapshots;
21502
21549
  exports.dataFromSnapshotStream = dataFromSnapshotStream;
21503
21550
  exports.defaultPagedItemPageDataConverter = defaultPagedItemPageDataConverter;
@@ -21862,6 +21909,7 @@ exports.onCallCreateModelResult = onCallCreateModelResult;
21862
21909
  exports.onCallCreateModelResultWithDocs = onCallCreateModelResultWithDocs;
21863
21910
  exports.onCallDeleteModelParams = onCallDeleteModelParams;
21864
21911
  exports.onCallDevelopmentParams = onCallDevelopmentParams;
21912
+ exports.onCallInvokeModelParams = onCallInvokeModelParams;
21865
21913
  exports.onCallQueryModelParams = onCallQueryModelParams;
21866
21914
  exports.onCallReadModelParams = onCallReadModelParams;
21867
21915
  exports.onCallTypedModelParams = onCallTypedModelParams;