@wix/data-resourceusage-service 1.0.2 → 1.0.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/data-resourceusage-service",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/data-resourceusage-service_data": "1.0.2"
21
+ "@wix/data-resourceusage-service_data": "1.0.4"
22
22
  },
23
23
  "devDependencies": {
24
24
  "glob": "^10.4.1",
@@ -42,5 +42,5 @@
42
42
  "fqdn": ""
43
43
  }
44
44
  },
45
- "falconPackageHash": "b28f18c78d3d48a758df0a235594087511cdd11270b9f2358271ed6e"
45
+ "falconPackageHash": "6ade508c09b3f56ce1d993b5bc9c90074946a783a2275df77bdcd572"
46
46
  }
@@ -1,3 +1,386 @@
1
+ /** ResourceUsage describes site-wide resource limits and usage */
2
+ interface ResourceUsage {
3
+ /**
4
+ * Used storage sum of Sandbox and Live environments, bytes
5
+ * Replaced by live_used_storage_in_bytes
6
+ * @deprecated
7
+ * @replacedBy live_used_storage_in_bytes + sandbox_used_storage_in_bytes
8
+ */
9
+ totalUsedStorageInBytes?: string | null;
10
+ /** Max storage, bytes */
11
+ totalUsedStorageInBytesLimit?: string | null;
12
+ /** Total number of native collections created */
13
+ collectionCount?: number | null;
14
+ /** Max number of native collections allowed */
15
+ collectionCountLimit?: number | null;
16
+ /**
17
+ * Total number of items in native collections sum of Sandbox and Live environments
18
+ * Replaced by live_item_count
19
+ * @deprecated
20
+ * @replacedBy live_item_count + sandbox_item_count
21
+ */
22
+ totalItemCount?: string | null;
23
+ /** Max number of items in native collections */
24
+ totalItemCountLimit?: string | null;
25
+ /** Resource usages per data collection */
26
+ dataCollectionUsages?: DataCollectionResourceUsage[];
27
+ /** Used storage in Live environment */
28
+ liveUsedStorageInBytes?: string | null;
29
+ /** Number of items in native collections in Live environment */
30
+ liveItemCount?: string | null;
31
+ /** Used storage in Sandbox environment */
32
+ sandboxUsedStorageInBytes?: string | null;
33
+ /** Number of items in native collections in Sandbox environment */
34
+ sandboxItemCount?: string | null;
35
+ }
36
+ interface DataCollectionResourceUsage {
37
+ /** Data Collection ID */
38
+ dataCollectionId?: string;
39
+ /** Data Collection display name */
40
+ displayName?: string | null;
41
+ /** Data Collection item count in the live environment */
42
+ liveItemCount?: string;
43
+ /** Data Collection item count in the sandbox environment, none if disabled */
44
+ sandboxItemCount?: string | null;
45
+ /** Data Collection used storage in bytes in the live environment */
46
+ liveUsedStorageInBytes?: string;
47
+ /** Data Collection used storage in bytes in the sandbox environment, none if disabled */
48
+ sandboxUsedStorageInBytes?: string | null;
49
+ /** Type of data collection, currently only NATIVE or BLOCKS_APP are returned in this API */
50
+ dataCollectionType?: CollectionType;
51
+ }
52
+ declare enum CollectionType {
53
+ /** User-created collection. */
54
+ NATIVE = "NATIVE",
55
+ /** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
56
+ WIX_APP = "WIX_APP",
57
+ /** Collection created by a Wix Blocks app. */
58
+ BLOCKS_APP = "BLOCKS_APP",
59
+ /** Collection located in externally connected storage. */
60
+ EXTERNAL = "EXTERNAL"
61
+ }
62
+ interface GetResourceUsageRequest {
63
+ /** ResourceUsage fields to return, if empty all are returned */
64
+ fields?: string[];
65
+ /** If true, operation queries collections for up-to-date values (rather than using cached values) */
66
+ consistentRead?: boolean;
67
+ }
68
+ interface GetResourceUsageResponse {
69
+ /** The retrieved ResourceUsage */
70
+ resourceUsage?: ResourceUsage;
71
+ }
72
+ interface BulkUpdateUsagesRequest {
73
+ updates?: InstanceUsageUpdate[];
74
+ }
75
+ interface DataCollectionResourceUsageUpdate {
76
+ /** Data Collection ID */
77
+ dataCollectionId?: string;
78
+ /** if true present values are added to existing, otherwise values are replaced */
79
+ relative?: boolean;
80
+ /** Data Collection item count in the live environment */
81
+ liveItemCount?: string | null;
82
+ /** Data Collection item count in the sandbox environment */
83
+ sandboxItemCount?: string | null;
84
+ /** Data Collection used storage in bytes in the live environment */
85
+ liveUsedStorageInBytes?: string | null;
86
+ /** Data Collection used storage in bytes in the sandbox environment */
87
+ sandboxUsedStorageInBytes?: string | null;
88
+ }
89
+ declare enum Segment {
90
+ BOTH = "BOTH",
91
+ LIVE = "LIVE",
92
+ SANDBOX = "SANDBOX"
93
+ }
94
+ interface InstanceUsageUpdate {
95
+ /** Data Instance ID */
96
+ instanceId?: string;
97
+ /** Usage updates per collection */
98
+ collections?: DataCollectionResourceUsageUpdate[];
99
+ /** if true all collections not in the list assumed to have 0 usage */
100
+ allCollectionsPresent?: boolean;
101
+ /** Indicates which segment is being updated */
102
+ segment?: Segment;
103
+ }
104
+ interface BulkUpdateUsagesResponse {
105
+ }
106
+ interface GetStoredUsageRequest {
107
+ instanceId?: string;
108
+ }
109
+ interface GetStoredUsageResponse {
110
+ usages?: DataCollectionResourceUsage[];
111
+ }
112
+ interface DomainEvent extends DomainEventBodyOneOf {
113
+ createdEvent?: EntityCreatedEvent;
114
+ updatedEvent?: EntityUpdatedEvent;
115
+ deletedEvent?: EntityDeletedEvent;
116
+ actionEvent?: ActionEvent;
117
+ /**
118
+ * Unique event ID.
119
+ * Allows clients to ignore duplicate webhooks.
120
+ */
121
+ _id?: string;
122
+ /**
123
+ * Assumes actions are also always typed to an entity_type
124
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
125
+ */
126
+ entityFqdn?: string;
127
+ /**
128
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
129
+ * This is although the created/updated/deleted notion is duplication of the oneof types
130
+ * Example: created/updated/deleted/started/completed/email_opened
131
+ */
132
+ slug?: string;
133
+ /** ID of the entity associated with the event. */
134
+ entityId?: string;
135
+ /** Event timestamp. */
136
+ eventTime?: Date;
137
+ /**
138
+ * Whether the event was triggered as a result of a privacy regulation application
139
+ * (for example, GDPR).
140
+ */
141
+ triggeredByAnonymizeRequest?: boolean | null;
142
+ /** If present, indicates the action that triggered the event. */
143
+ originatedFrom?: string | null;
144
+ /**
145
+ * A sequence number defining the order of updates to the underlying entity.
146
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
147
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
148
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
149
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
150
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
151
+ */
152
+ entityEventSequence?: string | null;
153
+ }
154
+ /** @oneof */
155
+ interface DomainEventBodyOneOf {
156
+ createdEvent?: EntityCreatedEvent;
157
+ updatedEvent?: EntityUpdatedEvent;
158
+ deletedEvent?: EntityDeletedEvent;
159
+ actionEvent?: ActionEvent;
160
+ }
161
+ interface EntityCreatedEvent {
162
+ entity?: string;
163
+ }
164
+ interface EntityUpdatedEvent {
165
+ /**
166
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
167
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
168
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
169
+ */
170
+ currentEntity?: string;
171
+ }
172
+ interface EntityDeletedEvent {
173
+ /** Entity that was deleted */
174
+ deletedEntity?: string | null;
175
+ }
176
+ interface ActionEvent {
177
+ body?: string;
178
+ }
179
+ interface Empty {
180
+ }
181
+ interface DataChangeEvent extends DataChangeEventEventOneOf {
182
+ dataChanged?: DataChanged;
183
+ /** resume point is lost so some changes may be lost */
184
+ changesLost?: ChangesLost;
185
+ referenceChanged?: ReferenceChanged;
186
+ /** segment access or mapping changed */
187
+ segmentChanged?: SegmentChanged;
188
+ /** segment migration started to new physical location */
189
+ segmentMigrationStarted?: SegmentMigrationStarted;
190
+ }
191
+ /** @oneof */
192
+ interface DataChangeEventEventOneOf {
193
+ dataChanged?: DataChanged;
194
+ /** resume point is lost so some changes may be lost */
195
+ changesLost?: ChangesLost;
196
+ referenceChanged?: ReferenceChanged;
197
+ /** segment access or mapping changed */
198
+ segmentChanged?: SegmentChanged;
199
+ /** segment migration started to new physical location */
200
+ segmentMigrationStarted?: SegmentMigrationStarted;
201
+ }
202
+ interface DataChanged extends DataChangedChangeOneOf {
203
+ /** inserted document */
204
+ inserted?: Record<string, any> | null;
205
+ /** full replaced document */
206
+ replaced?: Record<string, any> | null;
207
+ /** partial update, removed fields are set to Empty */
208
+ partial?: Record<string, any> | null;
209
+ /** deleted document ID */
210
+ removedId?: string;
211
+ /** physical cluster ID */
212
+ clusterId?: string;
213
+ /**
214
+ * physical source
215
+ * db.collection for MongoDB
216
+ */
217
+ source?: string;
218
+ /** instance ID */
219
+ tenantId?: string;
220
+ /** logical collection name */
221
+ collectionName?: string;
222
+ dataStore?: DataStore;
223
+ documentId?: string;
224
+ clusterTime?: Date;
225
+ /** raw resume token BSON */
226
+ resumeToken?: string;
227
+ /** Initiator of the request */
228
+ initiator?: Initiator;
229
+ }
230
+ /** @oneof */
231
+ interface DataChangedChangeOneOf {
232
+ /** inserted document */
233
+ inserted?: Record<string, any> | null;
234
+ /** full replaced document */
235
+ replaced?: Record<string, any> | null;
236
+ /** partial update, removed fields are set to Empty */
237
+ partial?: Record<string, any> | null;
238
+ /** deleted document ID */
239
+ removedId?: string;
240
+ }
241
+ declare enum Type {
242
+ /** Initiator is unknown */
243
+ Unknown = "Unknown",
244
+ /** Indicated that write has been initiated by SSR indexer */
245
+ SsrIndexer = "SsrIndexer"
246
+ }
247
+ declare enum DataStore {
248
+ Dev = "Dev",
249
+ Public = "Public"
250
+ }
251
+ interface Initiator {
252
+ type?: Type;
253
+ }
254
+ interface ChangesLost {
255
+ clusterId?: string;
256
+ }
257
+ interface ReferenceChanged {
258
+ /** physical cluster ID */
259
+ clusterId?: string;
260
+ /**
261
+ * physical source
262
+ * db.collection for MongoDB
263
+ */
264
+ source?: string;
265
+ /** instance ID */
266
+ tenantId?: string;
267
+ dataStore?: DataStore;
268
+ relationshipName?: string;
269
+ leftId?: string;
270
+ rightId?: string;
271
+ /** if reference is set or unset */
272
+ isRemoved?: boolean;
273
+ clusterTime?: Date;
274
+ /** raw resume token BSON */
275
+ resumeToken?: string;
276
+ /** ref created date */
277
+ createdAt?: Date;
278
+ }
279
+ interface SegmentChanged {
280
+ /** physical cluster ID */
281
+ clusterId?: string;
282
+ /**
283
+ * physical source
284
+ * db.collection for MongoDB
285
+ */
286
+ source?: string;
287
+ /** instance ID */
288
+ tenantId?: string;
289
+ /** segment */
290
+ dataStore?: DataStore;
291
+ /** new db name if changed */
292
+ newDatabase?: string | null;
293
+ /** new cluster if changed */
294
+ newClusterId?: string | null;
295
+ /** read permissions if changed */
296
+ readsEnabled?: boolean | null;
297
+ /** write permissions if changed */
298
+ writesEnabled?: boolean | null;
299
+ /** event time */
300
+ clusterTime?: Date;
301
+ /** raw resume token BSON */
302
+ resumeToken?: string;
303
+ }
304
+ interface SegmentMigrationStarted {
305
+ /** physical cluster ID */
306
+ clusterId?: string;
307
+ /**
308
+ * physical source
309
+ * db.collection for MongoDB
310
+ */
311
+ source?: string;
312
+ /** instance ID */
313
+ tenantId?: string;
314
+ /** segment */
315
+ dataStore?: DataStore;
316
+ /** new db name if changed */
317
+ newDatabase?: string;
318
+ /** new cluster if changed */
319
+ newClusterId?: string;
320
+ /** event time */
321
+ clusterTime?: Date;
322
+ /** raw resume token BSON */
323
+ resumeToken?: string;
324
+ }
325
+ interface MessageEnvelope {
326
+ /** App instance ID. */
327
+ instanceId?: string | null;
328
+ /** Event type. */
329
+ eventType?: string;
330
+ /** The identification type and identity data. */
331
+ identity?: IdentificationData;
332
+ /** Stringify payload. */
333
+ data?: string;
334
+ }
335
+ interface IdentificationData extends IdentificationDataIdOneOf {
336
+ /** ID of a site visitor that has not logged in to the site. */
337
+ anonymousVisitorId?: string;
338
+ /** ID of a site visitor that has logged in to the site. */
339
+ memberId?: string;
340
+ /** ID of a Wix user (site owner, contributor, etc.). */
341
+ wixUserId?: string;
342
+ /** ID of an app. */
343
+ appId?: string;
344
+ /** @readonly */
345
+ identityType?: WebhookIdentityType;
346
+ }
347
+ /** @oneof */
348
+ interface IdentificationDataIdOneOf {
349
+ /** ID of a site visitor that has not logged in to the site. */
350
+ anonymousVisitorId?: string;
351
+ /** ID of a site visitor that has logged in to the site. */
352
+ memberId?: string;
353
+ /** ID of a Wix user (site owner, contributor, etc.). */
354
+ wixUserId?: string;
355
+ /** ID of an app. */
356
+ appId?: string;
357
+ }
358
+ declare enum WebhookIdentityType {
359
+ UNKNOWN = "UNKNOWN",
360
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
361
+ MEMBER = "MEMBER",
362
+ WIX_USER = "WIX_USER",
363
+ APP = "APP"
364
+ }
365
+ interface DataCollectionResourceUsageNonNullableFields {
366
+ dataCollectionId: string;
367
+ liveItemCount: string;
368
+ liveUsedStorageInBytes: string;
369
+ dataCollectionType: CollectionType;
370
+ }
371
+ interface ResourceUsageNonNullableFields {
372
+ dataCollectionUsages: DataCollectionResourceUsageNonNullableFields[];
373
+ }
374
+ interface GetResourceUsageResponseNonNullableFields {
375
+ resourceUsage?: ResourceUsageNonNullableFields;
376
+ }
377
+ interface GetResourceUsageOptions {
378
+ /** ResourceUsage fields to return, if empty all are returned */
379
+ fields?: string[];
380
+ /** If true, operation queries collections for up-to-date values (rather than using cached values) */
381
+ consistentRead?: boolean;
382
+ }
383
+
1
384
  type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
385
  interface HttpClient {
3
386
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
@@ -36,9 +419,50 @@ declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor:
36
419
 
37
420
  declare const getResourceUsage: ReturnType<typeof createRESTModule<typeof publicGetResourceUsage>>;
38
421
 
422
+ type context_ActionEvent = ActionEvent;
423
+ type context_BulkUpdateUsagesRequest = BulkUpdateUsagesRequest;
424
+ type context_BulkUpdateUsagesResponse = BulkUpdateUsagesResponse;
425
+ type context_ChangesLost = ChangesLost;
426
+ type context_CollectionType = CollectionType;
427
+ declare const context_CollectionType: typeof CollectionType;
428
+ type context_DataChangeEvent = DataChangeEvent;
429
+ type context_DataChangeEventEventOneOf = DataChangeEventEventOneOf;
430
+ type context_DataChanged = DataChanged;
431
+ type context_DataChangedChangeOneOf = DataChangedChangeOneOf;
432
+ type context_DataCollectionResourceUsage = DataCollectionResourceUsage;
433
+ type context_DataCollectionResourceUsageUpdate = DataCollectionResourceUsageUpdate;
434
+ type context_DataStore = DataStore;
435
+ declare const context_DataStore: typeof DataStore;
436
+ type context_DomainEvent = DomainEvent;
437
+ type context_DomainEventBodyOneOf = DomainEventBodyOneOf;
438
+ type context_Empty = Empty;
439
+ type context_EntityCreatedEvent = EntityCreatedEvent;
440
+ type context_EntityDeletedEvent = EntityDeletedEvent;
441
+ type context_EntityUpdatedEvent = EntityUpdatedEvent;
442
+ type context_GetResourceUsageOptions = GetResourceUsageOptions;
443
+ type context_GetResourceUsageRequest = GetResourceUsageRequest;
444
+ type context_GetResourceUsageResponse = GetResourceUsageResponse;
445
+ type context_GetResourceUsageResponseNonNullableFields = GetResourceUsageResponseNonNullableFields;
446
+ type context_GetStoredUsageRequest = GetStoredUsageRequest;
447
+ type context_GetStoredUsageResponse = GetStoredUsageResponse;
448
+ type context_IdentificationData = IdentificationData;
449
+ type context_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
450
+ type context_Initiator = Initiator;
451
+ type context_InstanceUsageUpdate = InstanceUsageUpdate;
452
+ type context_MessageEnvelope = MessageEnvelope;
453
+ type context_ReferenceChanged = ReferenceChanged;
454
+ type context_ResourceUsage = ResourceUsage;
455
+ type context_Segment = Segment;
456
+ declare const context_Segment: typeof Segment;
457
+ type context_SegmentChanged = SegmentChanged;
458
+ type context_SegmentMigrationStarted = SegmentMigrationStarted;
459
+ type context_Type = Type;
460
+ declare const context_Type: typeof Type;
461
+ type context_WebhookIdentityType = WebhookIdentityType;
462
+ declare const context_WebhookIdentityType: typeof WebhookIdentityType;
39
463
  declare const context_getResourceUsage: typeof getResourceUsage;
40
464
  declare namespace context {
41
- export { context_getResourceUsage as getResourceUsage };
465
+ export { type context_ActionEvent as ActionEvent, type context_BulkUpdateUsagesRequest as BulkUpdateUsagesRequest, type context_BulkUpdateUsagesResponse as BulkUpdateUsagesResponse, type context_ChangesLost as ChangesLost, context_CollectionType as CollectionType, type context_DataChangeEvent as DataChangeEvent, type context_DataChangeEventEventOneOf as DataChangeEventEventOneOf, type context_DataChanged as DataChanged, type context_DataChangedChangeOneOf as DataChangedChangeOneOf, type context_DataCollectionResourceUsage as DataCollectionResourceUsage, type context_DataCollectionResourceUsageUpdate as DataCollectionResourceUsageUpdate, context_DataStore as DataStore, type context_DomainEvent as DomainEvent, type context_DomainEventBodyOneOf as DomainEventBodyOneOf, type context_Empty as Empty, type context_EntityCreatedEvent as EntityCreatedEvent, type context_EntityDeletedEvent as EntityDeletedEvent, type context_EntityUpdatedEvent as EntityUpdatedEvent, type context_GetResourceUsageOptions as GetResourceUsageOptions, type context_GetResourceUsageRequest as GetResourceUsageRequest, type context_GetResourceUsageResponse as GetResourceUsageResponse, type context_GetResourceUsageResponseNonNullableFields as GetResourceUsageResponseNonNullableFields, type context_GetStoredUsageRequest as GetStoredUsageRequest, type context_GetStoredUsageResponse as GetStoredUsageResponse, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_Initiator as Initiator, type context_InstanceUsageUpdate as InstanceUsageUpdate, type context_MessageEnvelope as MessageEnvelope, type context_ReferenceChanged as ReferenceChanged, type context_ResourceUsage as ResourceUsage, context_Segment as Segment, type context_SegmentChanged as SegmentChanged, type context_SegmentMigrationStarted as SegmentMigrationStarted, context_Type as Type, context_WebhookIdentityType as WebhookIdentityType, context_getResourceUsage as getResourceUsage };
42
466
  }
43
467
 
44
468
  export { context as data };
@@ -362,15 +362,17 @@ declare enum WebhookIdentityType {
362
362
  WIX_USER = "WIX_USER",
363
363
  APP = "APP"
364
364
  }
365
+ interface DataCollectionResourceUsageNonNullableFields {
366
+ dataCollectionId: string;
367
+ liveItemCount: string;
368
+ liveUsedStorageInBytes: string;
369
+ dataCollectionType: CollectionType;
370
+ }
371
+ interface ResourceUsageNonNullableFields {
372
+ dataCollectionUsages: DataCollectionResourceUsageNonNullableFields[];
373
+ }
365
374
  interface GetResourceUsageResponseNonNullableFields {
366
- resourceUsage?: {
367
- dataCollectionUsages: {
368
- dataCollectionId: string;
369
- liveItemCount: string;
370
- liveUsedStorageInBytes: string;
371
- dataCollectionType: CollectionType;
372
- }[];
373
- };
375
+ resourceUsage?: ResourceUsageNonNullableFields;
374
376
  }
375
377
  interface GetResourceUsageOptions {
376
378
  /** ResourceUsage fields to return, if empty all are returned */
@@ -379,6 +381,7 @@ interface GetResourceUsageOptions {
379
381
  consistentRead?: boolean;
380
382
  }
381
383
 
384
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
382
385
  interface HttpClient {
383
386
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
384
387
  fetchWithAuth: typeof fetch;
@@ -403,6 +406,7 @@ type APIMetadata = {
403
406
  entityFqdn?: string;
404
407
  packageName?: string;
405
408
  };
409
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
406
410
 
407
411
  declare global {
408
412
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -411,10 +415,9 @@ declare global {
411
415
  }
412
416
  }
413
417
 
414
- declare const __metadata: {
415
- PACKAGE_NAME: string;
416
- };
417
- declare function getResourceUsage(httpClient: HttpClient): (options?: GetResourceUsageOptions) => Promise<GetResourceUsageResponse & GetResourceUsageResponseNonNullableFields>;
418
+ declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
419
+
420
+ declare const getResourceUsage: ReturnType<typeof createRESTModule<typeof publicGetResourceUsage>>;
418
421
 
419
422
  type index_d_ActionEvent = ActionEvent;
420
423
  type index_d_BulkUpdateUsagesRequest = BulkUpdateUsagesRequest;
@@ -457,10 +460,9 @@ type index_d_Type = Type;
457
460
  declare const index_d_Type: typeof Type;
458
461
  type index_d_WebhookIdentityType = WebhookIdentityType;
459
462
  declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
460
- declare const index_d___metadata: typeof __metadata;
461
463
  declare const index_d_getResourceUsage: typeof getResourceUsage;
462
464
  declare namespace index_d {
463
- export { type index_d_ActionEvent as ActionEvent, type index_d_BulkUpdateUsagesRequest as BulkUpdateUsagesRequest, type index_d_BulkUpdateUsagesResponse as BulkUpdateUsagesResponse, type index_d_ChangesLost as ChangesLost, index_d_CollectionType as CollectionType, type index_d_DataChangeEvent as DataChangeEvent, type index_d_DataChangeEventEventOneOf as DataChangeEventEventOneOf, type index_d_DataChanged as DataChanged, type index_d_DataChangedChangeOneOf as DataChangedChangeOneOf, type index_d_DataCollectionResourceUsage as DataCollectionResourceUsage, type index_d_DataCollectionResourceUsageUpdate as DataCollectionResourceUsageUpdate, index_d_DataStore as DataStore, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_GetResourceUsageOptions as GetResourceUsageOptions, type index_d_GetResourceUsageRequest as GetResourceUsageRequest, type index_d_GetResourceUsageResponse as GetResourceUsageResponse, type index_d_GetResourceUsageResponseNonNullableFields as GetResourceUsageResponseNonNullableFields, type index_d_GetStoredUsageRequest as GetStoredUsageRequest, type index_d_GetStoredUsageResponse as GetStoredUsageResponse, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_Initiator as Initiator, type index_d_InstanceUsageUpdate as InstanceUsageUpdate, type index_d_MessageEnvelope as MessageEnvelope, type index_d_ReferenceChanged as ReferenceChanged, type index_d_ResourceUsage as ResourceUsage, index_d_Segment as Segment, type index_d_SegmentChanged as SegmentChanged, type index_d_SegmentMigrationStarted as SegmentMigrationStarted, index_d_Type as Type, index_d_WebhookIdentityType as WebhookIdentityType, index_d___metadata as __metadata, index_d_getResourceUsage as getResourceUsage };
465
+ export { type index_d_ActionEvent as ActionEvent, type index_d_BulkUpdateUsagesRequest as BulkUpdateUsagesRequest, type index_d_BulkUpdateUsagesResponse as BulkUpdateUsagesResponse, type index_d_ChangesLost as ChangesLost, index_d_CollectionType as CollectionType, type index_d_DataChangeEvent as DataChangeEvent, type index_d_DataChangeEventEventOneOf as DataChangeEventEventOneOf, type index_d_DataChanged as DataChanged, type index_d_DataChangedChangeOneOf as DataChangedChangeOneOf, type index_d_DataCollectionResourceUsage as DataCollectionResourceUsage, type index_d_DataCollectionResourceUsageUpdate as DataCollectionResourceUsageUpdate, index_d_DataStore as DataStore, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_GetResourceUsageOptions as GetResourceUsageOptions, type index_d_GetResourceUsageRequest as GetResourceUsageRequest, type index_d_GetResourceUsageResponse as GetResourceUsageResponse, type index_d_GetResourceUsageResponseNonNullableFields as GetResourceUsageResponseNonNullableFields, type index_d_GetStoredUsageRequest as GetStoredUsageRequest, type index_d_GetStoredUsageResponse as GetStoredUsageResponse, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_Initiator as Initiator, type index_d_InstanceUsageUpdate as InstanceUsageUpdate, type index_d_MessageEnvelope as MessageEnvelope, type index_d_ReferenceChanged as ReferenceChanged, type index_d_ResourceUsage as ResourceUsage, index_d_Segment as Segment, type index_d_SegmentChanged as SegmentChanged, type index_d_SegmentMigrationStarted as SegmentMigrationStarted, index_d_Type as Type, index_d_WebhookIdentityType as WebhookIdentityType, index_d_getResourceUsage as getResourceUsage };
464
466
  }
465
467
 
466
468
  export { index_d as data };
@@ -69,15 +69,17 @@ interface GetResourceUsageResponse$1 {
69
69
  /** The retrieved ResourceUsage */
70
70
  resourceUsage?: ResourceUsage$1;
71
71
  }
72
+ interface DataCollectionResourceUsageNonNullableFields$1 {
73
+ dataCollectionId: string;
74
+ liveItemCount: string;
75
+ liveUsedStorageInBytes: string;
76
+ dataCollectionType: CollectionType$1;
77
+ }
78
+ interface ResourceUsageNonNullableFields$1 {
79
+ dataCollectionUsages: DataCollectionResourceUsageNonNullableFields$1[];
80
+ }
72
81
  interface GetResourceUsageResponseNonNullableFields$1 {
73
- resourceUsage?: {
74
- dataCollectionUsages: {
75
- dataCollectionId: string;
76
- liveItemCount: string;
77
- liveUsedStorageInBytes: string;
78
- dataCollectionType: CollectionType$1;
79
- }[];
80
- };
82
+ resourceUsage?: ResourceUsageNonNullableFields$1;
81
83
  }
82
84
 
83
85
  /** ResourceUsage describes site-wide resource limits and usage */
@@ -151,15 +153,17 @@ interface GetResourceUsageResponse {
151
153
  /** The retrieved ResourceUsage */
152
154
  resourceUsage?: ResourceUsage;
153
155
  }
156
+ interface DataCollectionResourceUsageNonNullableFields {
157
+ dataCollectionId: string;
158
+ liveItemCount: string;
159
+ liveUsedStorageInBytes: string;
160
+ dataCollectionType: CollectionType;
161
+ }
162
+ interface ResourceUsageNonNullableFields {
163
+ dataCollectionUsages: DataCollectionResourceUsageNonNullableFields[];
164
+ }
154
165
  interface GetResourceUsageResponseNonNullableFields {
155
- resourceUsage?: {
156
- dataCollectionUsages: {
157
- dataCollectionId: string;
158
- liveItemCount: string;
159
- liveUsedStorageInBytes: string;
160
- dataCollectionType: CollectionType;
161
- }[];
162
- };
166
+ resourceUsage?: ResourceUsageNonNullableFields;
163
167
  }
164
168
 
165
169
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {