firebase-admin 9.3.0 → 9.5.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 (82) hide show
  1. package/lib/auth/action-code-settings-builder.js +1 -1
  2. package/lib/auth/auth-api-request.js +98 -25
  3. package/lib/auth/auth-config.js +15 -15
  4. package/lib/auth/auth.js +82 -61
  5. package/lib/auth/identifier.js +3 -2
  6. package/lib/auth/index.d.ts +1868 -0
  7. package/lib/{credential/credential-interfaces.js → auth/index.js} +1 -1
  8. package/lib/auth/tenant-manager.js +1 -1
  9. package/lib/auth/tenant.js +7 -1
  10. package/lib/auth/token-generator.js +6 -4
  11. package/lib/auth/token-verifier.js +32 -36
  12. package/lib/auth/user-import-builder.js +18 -15
  13. package/lib/auth/user-record.js +4 -4
  14. package/lib/credential/credential-internal.js +1 -2
  15. package/lib/credential/credential.js +8 -122
  16. package/lib/credential/index.d.ts +169 -0
  17. package/lib/credential/index.js +5 -17
  18. package/lib/database/database-internal.js +19 -26
  19. package/lib/database/index.d.ts +89 -0
  20. package/lib/database/index.js +12 -28
  21. package/lib/default-namespace.js +2 -1
  22. package/lib/firebase-app.js +26 -48
  23. package/lib/firebase-namespace-api.d.ts +238 -0
  24. package/lib/{firebase-service.js → firebase-namespace-api.js} +2 -2
  25. package/lib/{database/database.js → firebase-namespace.d.ts} +14 -7
  26. package/lib/firebase-namespace.js +22 -92
  27. package/lib/firestore/firestore-internal.js +2 -19
  28. package/lib/firestore/index.d.ts +50 -0
  29. package/lib/firestore/index.js +28 -43
  30. package/lib/index.d.ts +3 -932
  31. package/lib/index.js +2 -1
  32. package/lib/instance-id/index.d.ts +81 -0
  33. package/lib/instance-id/index.js +1 -10
  34. package/lib/instance-id/instance-id-request-internal.js +2 -1
  35. package/lib/instance-id/instance-id.js +1 -19
  36. package/lib/machine-learning/index.d.ts +249 -0
  37. package/lib/{messaging/messaging-types.js → machine-learning/index.js} +2 -2
  38. package/lib/machine-learning/machine-learning-api-client.js +1 -1
  39. package/lib/machine-learning/machine-learning-utils.js +1 -1
  40. package/lib/machine-learning/machine-learning.js +3 -22
  41. package/lib/messaging/batch-request-internal.js +1 -1
  42. package/lib/messaging/index.d.ts +1174 -0
  43. package/lib/messaging/index.js +1 -24
  44. package/lib/messaging/messaging-api-request-internal.js +2 -1
  45. package/lib/messaging/messaging-errors-internal.js +1 -1
  46. package/lib/messaging/messaging-internal.js +1 -1
  47. package/lib/messaging/messaging.js +21 -25
  48. package/lib/project-management/android-app.js +7 -6
  49. package/lib/project-management/index.d.ts +363 -0
  50. package/lib/project-management/index.js +23 -25
  51. package/lib/project-management/ios-app.js +5 -4
  52. package/lib/project-management/project-management-api-request-internal.js +5 -5
  53. package/lib/project-management/project-management.js +9 -26
  54. package/lib/remote-config/index.d.ts +359 -0
  55. package/lib/remote-config/index.js +1 -26
  56. package/lib/remote-config/remote-config-api-client-internal.js +3 -3
  57. package/lib/remote-config/remote-config.js +15 -32
  58. package/lib/security-rules/index.d.ts +216 -0
  59. package/lib/security-rules/index.js +1 -24
  60. package/lib/security-rules/security-rules-api-client-internal.js +1 -1
  61. package/lib/security-rules/security-rules-internal.js +1 -1
  62. package/lib/security-rules/security-rules.js +6 -15
  63. package/lib/storage/index.d.ts +60 -0
  64. package/lib/storage/index.js +1 -10
  65. package/lib/storage/storage.js +2 -19
  66. package/lib/utils/api-request.js +10 -3
  67. package/lib/utils/deep-copy.js +2 -1
  68. package/lib/utils/error.js +2 -1
  69. package/lib/utils/index.js +6 -5
  70. package/lib/utils/validator.js +2 -1
  71. package/package.json +15 -12
  72. package/lib/auth.d.ts +0 -2016
  73. package/lib/credential.d.ts +0 -150
  74. package/lib/database.d.ts +0 -1663
  75. package/lib/instance-id.d.ts +0 -37
  76. package/lib/messaging.d.ts +0 -1341
  77. package/lib/project-management/app-metadata.js +0 -37
  78. package/lib/project-management.d.ts +0 -361
  79. package/lib/remote-config/remote-config-api-client.js +0 -36
  80. package/lib/remote-config.d.ts +0 -350
  81. package/lib/security-rules.d.ts +0 -192
  82. package/lib/storage.d.ts +0 -40
@@ -1,350 +0,0 @@
1
- /*! firebase-admin v9.3.0 */
2
- import * as _admin from './index.d';
3
-
4
- export namespace admin.remoteConfig {
5
-
6
- /**
7
- * Colors that are associated with conditions for display purposes.
8
- */
9
- type TagColor = 'BLUE' | 'BROWN' | 'CYAN' | 'DEEP_ORANGE' | 'GREEN' |
10
- 'INDIGO' | 'LIME' | 'ORANGE' | 'PINK' | 'PURPLE' | 'TEAL';
11
-
12
- /**
13
- * Interface representing a Remote Config template.
14
- */
15
- interface RemoteConfigTemplate {
16
- /**
17
- * A list of conditions in descending order by priority.
18
- */
19
- conditions: RemoteConfigCondition[];
20
-
21
- /**
22
- * Map of parameter keys to their optional default values and optional conditional values.
23
- */
24
- parameters: { [key: string]: RemoteConfigParameter };
25
-
26
- /**
27
- * Map of parameter group names to their parameter group objects.
28
- * A group's name is mutable but must be unique among groups in the Remote Config template.
29
- * The name is limited to 256 characters and intended to be human-readable. Any Unicode
30
- * characters are allowed.
31
- */
32
- parameterGroups: { [key: string]: RemoteConfigParameterGroup };
33
-
34
- /**
35
- * ETag of the current Remote Config template (readonly).
36
- */
37
- readonly etag: string;
38
-
39
- /**
40
- * Version information for the current Remote Config template.
41
- */
42
- version?: Version;
43
- }
44
-
45
- /**
46
- * Interface representing a Remote Config parameter.
47
- * At minimum, a `defaultValue` or a `conditionalValues` entry must be present for the
48
- * parameter to have any effect.
49
- */
50
- interface RemoteConfigParameter {
51
-
52
- /**
53
- * The value to set the parameter to, when none of the named conditions evaluate to `true`.
54
- */
55
- defaultValue?: RemoteConfigParameterValue;
56
-
57
- /**
58
- * A `(condition name, value)` map. The condition name of the highest priority
59
- * (the one listed first in the Remote Config template's conditions list) determines the value of
60
- * this parameter.
61
- */
62
- conditionalValues?: { [key: string]: RemoteConfigParameterValue };
63
-
64
- /**
65
- * A description for this parameter. Should not be over 100 characters and may contain any
66
- * Unicode characters.
67
- */
68
- description?: string;
69
- }
70
-
71
- /**
72
- * Interface representing a Remote Config parameter group.
73
- * Grouping parameters is only for management purposes and does not affect client-side
74
- * fetching of parameter values.
75
- */
76
- export interface RemoteConfigParameterGroup {
77
- /**
78
- * A description for the group. Its length must be less than or equal to 256 characters.
79
- * A description may contain any Unicode characters.
80
- */
81
- description?: string;
82
-
83
- /**
84
- * Map of parameter keys to their optional default values and optional conditional values for
85
- * parameters that belong to this group. A parameter only appears once per
86
- * Remote Config template. An ungrouped parameter appears at the top level, whereas a
87
- * parameter organized within a group appears within its group's map of parameters.
88
- */
89
- parameters: { [key: string]: RemoteConfigParameter };
90
- }
91
-
92
- /**
93
- * Interface representing a Remote Config condition.
94
- * A condition targets a specific group of users. A list of these conditions make up
95
- * part of a Remote Config template.
96
- */
97
- interface RemoteConfigCondition {
98
-
99
- /**
100
- * A non-empty and unique name of this condition.
101
- */
102
- name: string;
103
-
104
- /**
105
- * The logic of this condition.
106
- * See the documentation on
107
- * {@link https://firebase.google.com/docs/remote-config/condition-reference condition expressions}
108
- * for the expected syntax of this field.
109
- */
110
- expression: string;
111
-
112
- /**
113
- * The color associated with this condition for display purposes in the Firebase Console.
114
- * Not specifying this value results in the console picking an arbitrary color to associate
115
- * with the condition.
116
- */
117
- tagColor?: TagColor;
118
- }
119
-
120
- /**
121
- * Interface representing an explicit parameter value.
122
- */
123
- interface ExplicitParameterValue {
124
- /**
125
- * The `string` value that the parameter is set to.
126
- */
127
- value: string;
128
- }
129
-
130
- /**
131
- * Interface representing an in-app-default value.
132
- */
133
- interface InAppDefaultValue {
134
- /**
135
- * If `true`, the parameter is omitted from the parameter values returned to a client.
136
- */
137
- useInAppDefault: boolean;
138
- }
139
-
140
- /**
141
- * Type representing a Remote Config parameter value.
142
- * A `RemoteConfigParameterValue` could be either an `ExplicitParameterValue` or
143
- * an `InAppDefaultValue`.
144
- */
145
- type RemoteConfigParameterValue = ExplicitParameterValue | InAppDefaultValue;
146
-
147
- /**
148
- * Interface representing a Remote Config template version.
149
- * Output only, except for the version description. Contains metadata about a particular
150
- * version of the Remote Config template. All fields are set at the time the specified Remote
151
- * Config template is published. A version's description field may be specified in
152
- * `publishTemplate` calls.
153
- */
154
- export interface Version {
155
- /**
156
- * The version number of a Remote Config template.
157
- */
158
- versionNumber?: string;
159
-
160
- /**
161
- * The timestamp of when this version of the Remote Config template was written to the
162
- * Remote Config backend.
163
- */
164
- updateTime?: string;
165
-
166
- /**
167
- * The origin of the template update action.
168
- */
169
- updateOrigin?: ('REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED' | 'CONSOLE' |
170
- 'REST_API' | 'ADMIN_SDK_NODE');
171
-
172
- /**
173
- * The type of the template update action.
174
- */
175
- updateType?: ('REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED' |
176
- 'INCREMENTAL_UPDATE' | 'FORCED_UPDATE' | 'ROLLBACK');
177
-
178
- /**
179
- * Aggregation of all metadata fields about the account that performed the update.
180
- */
181
- updateUser?: RemoteConfigUser;
182
-
183
- /**
184
- * The user-provided description of the corresponding Remote Config template.
185
- */
186
- description?: string;
187
-
188
- /**
189
- * The version number of the Remote Config template that has become the current version
190
- * due to a rollback. Only present if this version is the result of a rollback.
191
- */
192
- rollbackSource?: string;
193
-
194
- /**
195
- * Indicates whether this Remote Config template was published before version history was
196
- * supported.
197
- */
198
- isLegacy?: boolean;
199
- }
200
-
201
- /** Interface representing a list of Remote Config template versions. */
202
- export interface ListVersionsResult {
203
- /**
204
- * A list of version metadata objects, sorted in reverse chronological order.
205
- */
206
- versions: Version[];
207
-
208
- /**
209
- * Token to retrieve the next page of results, or empty if there are no more results
210
- * in the list.
211
- */
212
- nextPageToken?: string;
213
- }
214
-
215
- /** Interface representing options for Remote Config list versions operation. */
216
- export interface ListVersionsOptions {
217
- /**
218
- * The maximum number of items to return per page.
219
- */
220
- pageSize?: number;
221
-
222
- /**
223
- * The `nextPageToken` value returned from a previous list versions request, if any.
224
- */
225
- pageToken?: string;
226
-
227
- /**
228
- * Specifies the newest version number to include in the results.
229
- * If specified, must be greater than zero. Defaults to the newest version.
230
- */
231
- endVersionNumber?: string | number;
232
-
233
- /**
234
- * Specifies the earliest update time to include in the results. Any entries updated before this
235
- * time are omitted.
236
- */
237
- startTime?: Date | string;
238
-
239
- /**
240
- * Specifies the latest update time to include in the results. Any entries updated on or after
241
- * this time are omitted.
242
- */
243
- endTime?: Date | string;
244
- }
245
-
246
- /** Interface representing a Remote Config user.*/
247
- export interface RemoteConfigUser {
248
- /**
249
- * Email address. Output only.
250
- */
251
- email: string;
252
-
253
- /**
254
- * Display name. Output only.
255
- */
256
- name?: string;
257
-
258
- /**
259
- * Image URL. Output only.
260
- */
261
- imageUrl?: string;
262
- }
263
-
264
- /**
265
- * The Firebase `RemoteConfig` service interface.
266
- *
267
- * Do not call this constructor directly. Instead, use
268
- * [`admin.remoteConfig()`](admin.remoteConfig#remoteConfig).
269
- */
270
- interface RemoteConfig {
271
- app: _admin.app.App;
272
-
273
- /**
274
- * Gets the current active version of the {@link admin.remoteConfig.RemoteConfigTemplate
275
- * `RemoteConfigTemplate`} of the project.
276
- *
277
- * @return A promise that fulfills with a `RemoteConfigTemplate`.
278
- */
279
- getTemplate(): Promise<RemoteConfigTemplate>;
280
-
281
- /**
282
- * Gets the requested version of the {@link admin.remoteConfig.RemoteConfigTemplate
283
- * `RemoteConfigTemplate`} of the project.
284
- *
285
- * @param versionNumber Version number of the Remote Config template to look up.
286
- *
287
- * @return A promise that fulfills with a `RemoteConfigTemplate`.
288
- */
289
- getTemplateAtVersion(versionNumber: number | string): Promise<RemoteConfigTemplate>;
290
-
291
- /**
292
- * Validates a {@link admin.remoteConfig.RemoteConfigTemplate `RemoteConfigTemplate`}.
293
- *
294
- * @param template The Remote Config template to be validated.
295
- * @returns A promise that fulfills with the validated `RemoteConfigTemplate`.
296
- */
297
- validateTemplate(template: RemoteConfigTemplate): Promise<RemoteConfigTemplate>;
298
-
299
- /**
300
- * Publishes a Remote Config template.
301
- *
302
- * @param template The Remote Config template to be published.
303
- * @param options Optional options object when publishing a Remote Config template:
304
- * - {boolean} `force` Setting this to `true` forces the Remote Config template to
305
- * be updated and circumvent the ETag. This approach is not recommended
306
- * because it risks causing the loss of updates to your Remote Config
307
- * template if multiple clients are updating the Remote Config template.
308
- * See {@link https://firebase.google.com/docs/remote-config/use-config-rest#etag_usage_and_forced_updates
309
- * ETag usage and forced updates}.
310
- *
311
- * @return A Promise that fulfills with the published `RemoteConfigTemplate`.
312
- */
313
- publishTemplate(template: RemoteConfigTemplate, options?: { force: boolean }): Promise<RemoteConfigTemplate>;
314
-
315
- /**
316
- * Rolls back a project's published Remote Config template to the specified version.
317
- * A rollback is equivalent to getting a previously published Remote Config
318
- * template and re-publishing it using a force update.
319
- *
320
- * @param versionNumber The version number of the Remote Config template to roll back to.
321
- * The specified version number must be lower than the current version number, and not have
322
- * been deleted due to staleness. Only the last 300 versions are stored.
323
- * All versions that correspond to non-active Remote Config templates (that is, all except the
324
- * template that is being fetched by clients) are also deleted if they are more than 90 days old.
325
- * @return A promise that fulfills with the published `RemoteConfigTemplate`.
326
- */
327
- rollback(versionNumber: string | number): Promise<RemoteConfigTemplate>;
328
-
329
- /**
330
- * Gets a list of Remote Config template versions that have been published, sorted in reverse
331
- * chronological order. Only the last 300 versions are stored.
332
- * All versions that correspond to non-active Remote Config templates (that is, all except the
333
- * template that is being fetched by clients) are also deleted if they are more than 90 days old.
334
- *
335
- * @param options Optional {@link admin.remoteConfig.ListVersionsOptions `ListVersionsOptions`}
336
- * object for getting a list of template versions.
337
- * @return A promise that fulfills with a `ListVersionsResult`.
338
- */
339
- listVersions(options?: ListVersionsOptions): Promise<ListVersionsResult>;
340
-
341
- /**
342
- * Creates and returns a new Remote Config template from a JSON string.
343
- *
344
- * @param json The JSON string to populate a Remote Config template.
345
- *
346
- * @return A new template instance.
347
- */
348
- createTemplateFromJSON(json: string): RemoteConfigTemplate;
349
- }
350
- }
@@ -1,192 +0,0 @@
1
- /*! firebase-admin v9.3.0 */
2
- import * as _admin from './index.d';
3
-
4
- export namespace admin.securityRules {
5
- /**
6
- * A source file containing some Firebase security rules. The content includes raw
7
- * source code including text formatting, indentation and comments. Use the
8
- * [`securityRules.createRulesFileFromSource()`](admin.securityRules.SecurityRules#createRulesFileFromSource)
9
- * method to create new instances of this type.
10
- */
11
- interface RulesFile {
12
- readonly name: string;
13
- readonly content: string;
14
- }
15
-
16
- /**
17
- * Required metadata associated with a ruleset.
18
- */
19
- interface RulesetMetadata {
20
- /**
21
- * Name of the `Ruleset` as a short string. This can be directly passed into APIs
22
- * like [`securityRules.getRuleset()`](admin.securityRules.SecurityRules#getRuleset)
23
- * and [`securityRules.deleteRuleset()`](admin.securityRules.SecurityRules#deleteRuleset).
24
- */
25
- readonly name: string;
26
-
27
- /**
28
- * Creation time of the `Ruleset` as a UTC timestamp string.
29
- */
30
- readonly createTime: string;
31
- }
32
-
33
- /**
34
- * A set of Firebase security rules.
35
- */
36
- interface Ruleset extends RulesetMetadata {
37
- readonly source: admin.securityRules.RulesFile[];
38
- }
39
-
40
- interface RulesetMetadataList {
41
- /**
42
- * A batch of ruleset metadata.
43
- */
44
- readonly rulesets: admin.securityRules.RulesetMetadata[];
45
-
46
- /**
47
- * The next page token if available. This is needed to retrieve the next batch.
48
- */
49
- readonly nextPageToken?: string;
50
- }
51
-
52
- /**
53
- * The Firebase `SecurityRules` service interface.
54
- *
55
- * Do not call this constructor directly. Instead, use
56
- * [`admin.securityRules()`](admin.securityRules#securityRules).
57
- */
58
- interface SecurityRules {
59
- app: _admin.app.App;
60
-
61
- /**
62
- * Creates a {@link admin.securityRules.RulesFile `RuleFile`} with the given name
63
- * and source. Throws an error if any of the arguments are invalid. This is a local
64
- * operation, and does not involve any network API calls.
65
- *
66
- * @example
67
- * ```javascript
68
- * const source = '// Some rules source';
69
- * const rulesFile = admin.securityRules().createRulesFileFromSource(
70
- * 'firestore.rules', source);
71
- * ```
72
- *
73
- * @param name Name to assign to the rules file. This is usually a short file name that
74
- * helps identify the file in a ruleset.
75
- * @param source Contents of the rules file.
76
- * @return A new rules file instance.
77
- */
78
- createRulesFileFromSource(name: string, source: string | Buffer): admin.securityRules.RulesFile;
79
-
80
- /**
81
- * Creates a new {@link admin.securityRules.Ruleset `Ruleset`} from the given
82
- * {@link admin.securityRules.RulesFile `RuleFile`}.
83
- *
84
- * @param file Rules file to include in the new `Ruleset`.
85
- * @returns A promise that fulfills with the newly created `Ruleset`.
86
- */
87
- createRuleset(file: admin.securityRules.RulesFile): Promise<admin.securityRules.Ruleset>;
88
-
89
- /**
90
- * Gets the {@link admin.securityRules.Ruleset `Ruleset`} identified by the given
91
- * name. The input name should be the short name string without the project ID
92
- * prefix. For example, to retrieve the `projects/project-id/rulesets/my-ruleset`,
93
- * pass the short name "my-ruleset". Rejects with a `not-found` error if the
94
- * specified `Ruleset` cannot be found.
95
- *
96
- * @param name Name of the `Ruleset` to retrieve.
97
- * @return A promise that fulfills with the specified `Ruleset`.
98
- */
99
- getRuleset(name: string): Promise<admin.securityRules.Ruleset>;
100
-
101
- /**
102
- * Deletes the {@link admin.securityRules.Ruleset `Ruleset`} identified by the given
103
- * name. The input name should be the short name string without the project ID
104
- * prefix. For example, to delete the `projects/project-id/rulesets/my-ruleset`,
105
- * pass the short name "my-ruleset". Rejects with a `not-found` error if the
106
- * specified `Ruleset` cannot be found.
107
- *
108
- * @param name Name of the `Ruleset` to delete.
109
- * @return A promise that fulfills when the `Ruleset` is deleted.
110
- */
111
- deleteRuleset(name: string): Promise<void>;
112
-
113
- /**
114
- * Retrieves a page of ruleset metadata.
115
- *
116
- * @param pageSize The page size, 100 if undefined. This is also the maximum allowed
117
- * limit.
118
- * @param nextPageToken The next page token. If not specified, returns rulesets
119
- * starting without any offset.
120
- * @return A promise that fulfills with a page of rulesets.
121
- */
122
- listRulesetMetadata(
123
- pageSize?: number, nextPageToken?: string): Promise<admin.securityRules.RulesetMetadataList>;
124
-
125
- /**
126
- * Gets the {@link admin.securityRules.Ruleset `Ruleset`} currently applied to
127
- * Cloud Firestore. Rejects with a `not-found` error if no ruleset is applied
128
- * on Firestore.
129
- *
130
- * @return A promise that fulfills with the Firestore ruleset.
131
- */
132
- getFirestoreRuleset(): Promise<admin.securityRules.Ruleset>;
133
-
134
- /**
135
- * Creates a new {@link admin.securityRules.Ruleset `Ruleset`} from the given
136
- * source, and applies it to Cloud Firestore.
137
- *
138
- * @param source Rules source to apply.
139
- * @return A promise that fulfills when the ruleset is created and released.
140
- */
141
- releaseFirestoreRulesetFromSource(source: string | Buffer): Promise<admin.securityRules.Ruleset>;
142
-
143
- /**
144
- * Applies the specified {@link admin.securityRules.Ruleset `Ruleset`} ruleset
145
- * to Cloud Firestore.
146
- *
147
- * @param ruleset Name of the ruleset to apply or a `RulesetMetadata` object
148
- * containing the name.
149
- * @return A promise that fulfills when the ruleset is released.
150
- */
151
- releaseFirestoreRuleset(ruleset: string | admin.securityRules.RulesetMetadata): Promise<void>;
152
-
153
- /**
154
- * Gets the {@link admin.securityRules.Ruleset `Ruleset`} currently applied to a
155
- * Cloud Storage bucket. Rejects with a `not-found` error if no ruleset is applied
156
- * on the bucket.
157
- *
158
- * @param bucket Optional name of the Cloud Storage bucket to be retrieved. If not
159
- * specified, retrieves the ruleset applied on the default bucket configured via
160
- * `AppOptions`.
161
- * @return A promise that fulfills with the Cloud Storage ruleset.
162
- */
163
- getStorageRuleset(bucket?: string): Promise<admin.securityRules.Ruleset>;
164
-
165
- /**
166
- * Creates a new {@link admin.securityRules.Ruleset `Ruleset`} from the given
167
- * source, and applies it to a Cloud Storage bucket.
168
- *
169
- * @param source Rules source to apply.
170
- * @param bucket Optional name of the Cloud Storage bucket to apply the rules on. If
171
- * not specified, applies the ruleset on the default bucket configured via
172
- * {@link admin.AppOptions `AppOptions`}.
173
- * @return A promise that fulfills when the ruleset is created and released.
174
- */
175
- releaseStorageRulesetFromSource(
176
- source: string | Buffer, bucket?: string): Promise<admin.securityRules.Ruleset>;
177
-
178
- /**
179
- * Applies the specified {@link admin.securityRules.Ruleset `Ruleset`} ruleset
180
- * to a Cloud Storage bucket.
181
- *
182
- * @param ruleset Name of the ruleset to apply or a `RulesetMetadata` object
183
- * containing the name.
184
- * @param bucket Optional name of the Cloud Storage bucket to apply the rules on. If
185
- * not specified, applies the ruleset on the default bucket configured via
186
- * {@link admin.AppOptions `AppOptions`}.
187
- * @return A promise that fulfills when the ruleset is released.
188
- */
189
- releaseStorageRuleset(
190
- ruleset: string | admin.securityRules.RulesetMetadata, bucket?: string): Promise<void>;
191
- }
192
- }
package/lib/storage.d.ts DELETED
@@ -1,40 +0,0 @@
1
- /*! firebase-admin v9.3.0 */
2
- /*!
3
- * Copyright 2020 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- import { Bucket } from '@google-cloud/storage';
19
- import * as _admin from './index.d';
20
-
21
- export namespace admin.storage {
22
-
23
- /**
24
- * The default `Storage` service if no
25
- * app is provided or the `Storage` service associated with the provided
26
- * app.
27
- */
28
- export interface Storage {
29
- /**
30
- * Optional app whose `Storage` service to
31
- * return. If not provided, the default `Storage` service will be returned.
32
- */
33
- app: _admin.app.App;
34
- /**
35
- * @returns A [Bucket](https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket)
36
- * instance as defined in the `@google-cloud/storage` package.
37
- */
38
- bucket(name?: string): Bucket;
39
- }
40
- }