@squonk/account-server-client 4.1.0 → 4.1.1

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 (69) hide show
  1. package/asset/asset.cjs +18 -10
  2. package/asset/asset.cjs.map +1 -1
  3. package/asset/asset.d.cts +60 -60
  4. package/asset/asset.d.ts +60 -60
  5. package/asset/asset.js +18 -10
  6. package/asset/asset.js.map +1 -1
  7. package/charges/charges.cjs +3 -3
  8. package/charges/charges.cjs.map +1 -1
  9. package/charges/charges.d.cts +33 -33
  10. package/charges/charges.d.ts +33 -33
  11. package/charges/charges.js +3 -3
  12. package/charges/charges.js.map +1 -1
  13. package/event-stream/event-stream.cjs +8 -5
  14. package/event-stream/event-stream.cjs.map +1 -1
  15. package/event-stream/event-stream.d.cts +30 -30
  16. package/event-stream/event-stream.d.ts +30 -30
  17. package/event-stream/event-stream.js +8 -5
  18. package/event-stream/event-stream.js.map +1 -1
  19. package/index.cjs +8 -8
  20. package/index.cjs.map +1 -1
  21. package/index.d.cts +172 -172
  22. package/index.d.ts +172 -172
  23. package/index.js +8 -8
  24. package/index.js.map +1 -1
  25. package/merchant/merchant.cjs +1 -1
  26. package/merchant/merchant.cjs.map +1 -1
  27. package/merchant/merchant.d.cts +17 -17
  28. package/merchant/merchant.d.ts +17 -17
  29. package/merchant/merchant.js +1 -1
  30. package/merchant/merchant.js.map +1 -1
  31. package/organisation/organisation.cjs +10 -6
  32. package/organisation/organisation.cjs.map +1 -1
  33. package/organisation/organisation.d.cts +44 -44
  34. package/organisation/organisation.d.ts +44 -44
  35. package/organisation/organisation.js +10 -6
  36. package/organisation/organisation.js.map +1 -1
  37. package/package.json +11 -11
  38. package/product/product.cjs +12 -8
  39. package/product/product.cjs.map +1 -1
  40. package/product/product.d.cts +68 -68
  41. package/product/product.d.ts +68 -68
  42. package/product/product.js +12 -8
  43. package/product/product.js.map +1 -1
  44. package/src/account-server-api.schemas.ts +180 -180
  45. package/src/asset/asset.ts +120 -83
  46. package/src/charges/charges.ts +50 -49
  47. package/src/event-stream/event-stream.ts +55 -43
  48. package/src/merchant/merchant.ts +26 -25
  49. package/src/organisation/organisation.ts +80 -63
  50. package/src/product/product.ts +116 -99
  51. package/src/state/state.ts +14 -13
  52. package/src/unit/unit.ts +106 -79
  53. package/src/user/user.ts +90 -69
  54. package/state/state.cjs.map +1 -1
  55. package/state/state.d.cts +9 -9
  56. package/state/state.d.ts +9 -9
  57. package/state/state.js.map +1 -1
  58. package/unit/unit.cjs +15 -9
  59. package/unit/unit.cjs.map +1 -1
  60. package/unit/unit.d.cts +56 -56
  61. package/unit/unit.d.ts +56 -56
  62. package/unit/unit.js +15 -9
  63. package/unit/unit.js.map +1 -1
  64. package/user/user.cjs +10 -6
  65. package/user/user.cjs.map +1 -1
  66. package/user/user.d.cts +49 -49
  67. package/user/user.d.ts +49 -49
  68. package/user/user.js +10 -6
  69. package/user/user.js.map +1 -1
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  /**
3
- * Generated by orval v7.2.0 🍺
3
+ * Generated by orval v7.4.1 🍺
4
4
  * Do not edit manually.
5
5
  * Account Server API
6
6
  * The Informatics Matters Account Server API.
@@ -162,6 +162,11 @@ pbp?: QPbpParameter;
162
162
  };
163
163
 
164
164
  export type ProductPatchBodyBody = {
165
+ /**
166
+ * The name you want to give the Product
167
+ * @maxLength 80
168
+ */
169
+ name?: string;
165
170
  /**
166
171
  * The Product's built-in coin allowance. Product allowances cannot be reduced
167
172
  * @minimum 1
@@ -172,27 +177,8 @@ export type ProductPatchBodyBody = {
172
177
  * @minimum 1
173
178
  */
174
179
  limit?: number;
175
- /**
176
- * The name you want to give the Product
177
- * @maxLength 80
178
- */
179
- name?: string;
180
180
  };
181
181
 
182
- /**
183
- * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
184
-
185
- Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
186
- */
187
- export type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];
188
-
189
-
190
- // eslint-disable-next-line @typescript-eslint/no-redeclare
191
- export const UnitProductPostBodyBodyType = {
192
- DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
193
- DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
194
- } as const;
195
-
196
182
  /**
197
183
  * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products
198
184
  */
@@ -207,28 +193,42 @@ export const UnitProductPostBodyBodyFlavour = {
207
193
  GOLD: 'GOLD',
208
194
  } as const;
209
195
 
196
+ /**
197
+ * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
198
+
199
+ Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
200
+ */
201
+ export type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];
202
+
203
+
204
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
205
+ export const UnitProductPostBodyBodyType = {
206
+ DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
207
+ DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
208
+ } as const;
209
+
210
210
  export type UnitProductPostBodyBody = {
211
+ /**
212
+ * The name you want to give the Product
213
+ * @maxLength 80
214
+ */
215
+ name: string;
216
+ /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
217
+
218
+ Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
219
+ type: UnitProductPostBodyBodyType;
220
+ /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */
221
+ flavour?: UnitProductPostBodyBodyFlavour;
211
222
  /**
212
223
  * The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products
213
224
  * @minimum 1
214
225
  */
215
226
  allowance?: number;
216
- /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */
217
- flavour?: UnitProductPostBodyBodyFlavour;
218
227
  /**
219
228
  * The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products
220
229
  * @minimum 1
221
230
  */
222
231
  limit?: number;
223
- /**
224
- * The name you want to give the Product
225
- * @maxLength 80
226
- */
227
- name: string;
228
- /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
229
-
230
- Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
231
- type: UnitProductPostBodyBodyType;
232
232
  };
233
233
 
234
234
  /**
@@ -248,12 +248,12 @@ export const UnitPatchBodyBodyDefaultProductPrivacy = {
248
248
  } as const;
249
249
 
250
250
  export type UnitPatchBodyBody = {
251
+ /** The new name for the Unit */
252
+ name?: string;
251
253
  /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.
252
254
 
253
255
  Whether the privacy can be honoured will depend on the organisation's value */
254
256
  default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;
255
- /** The new name for the Unit */
256
- name?: string;
257
257
  };
258
258
 
259
259
  /**
@@ -273,12 +273,12 @@ export const OrganisationPatchBodyBodyDefaultProductPrivacy = {
273
273
  } as const;
274
274
 
275
275
  export type OrganisationPatchBodyBody = {
276
+ /** The new name for the Organisational */
277
+ name?: string;
276
278
  /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.
277
279
 
278
280
  Whether the privacy can be honoured will depend on the value in any of the organisation's existing units */
279
281
  default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;
280
- /** The new name for the Organisational */
281
- name?: string;
282
282
  };
283
283
 
284
284
  /**
@@ -296,6 +296,11 @@ export const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {
296
296
  } as const;
297
297
 
298
298
  export type OrganisationUnitPostBodyBody = {
299
+ /**
300
+ * The name of the unit
301
+ * @maxLength 80
302
+ */
303
+ name: string;
299
304
  /**
300
305
  * The day you would like to be billed for the Unit's Products (a value from 1 and 28)
301
306
  * @minimum 1
@@ -304,11 +309,6 @@ export type OrganisationUnitPostBodyBody = {
304
309
  billing_day: number;
305
310
  /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */
306
311
  default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;
307
- /**
308
- * The name of the unit
309
- * @maxLength 80
310
- */
311
- name: string;
312
312
  };
313
313
 
314
314
  export type PersonalUnitPutBodyBody = {
@@ -335,8 +335,6 @@ export const OrganisationPostBodyBodyDefaultProductPrivacy = {
335
335
  } as const;
336
336
 
337
337
  export type OrganisationPostBodyBody = {
338
- /** The default product privacy setting for the Organisation */
339
- default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
340
338
  /**
341
339
  * The name of the organisation
342
340
  * @maxLength 80
@@ -344,6 +342,8 @@ export type OrganisationPostBodyBody = {
344
342
  name: string;
345
343
  /** The name of the organisation owner. A user ID */
346
344
  owner: string;
345
+ /** The default product privacy setting for the Organisation */
346
+ default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
347
347
  };
348
348
 
349
349
  export type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];
@@ -359,23 +359,23 @@ export const AssetPostBodyBodyScope = {
359
359
  } as const;
360
360
 
361
361
  export type AssetPostBodyBody = {
362
- /** A file containing the content for the asset. You must provide a value here or in content_string */
363
- content_file?: Blob;
364
- /** The textual content of the asset. You must provide a value here or in content_file */
365
- content_string?: string;
366
- /** An optional description for the Asset */
367
- description?: string;
368
362
  /**
369
363
  * The name of the asset. This must be unique within its scope. For example, only one asset can be called "asset-1" within a given Unit. Asset names must be valid RFC 1123 Label Names
370
364
  * @maxLength 80
371
365
  * @pattern ^[a-z0-9-]{1,63}$
372
366
  */
373
367
  name: string;
368
+ /** A file containing the content for the asset. You must provide a value here or in content_string */
369
+ content_file?: Blob;
370
+ /** The textual content of the asset. You must provide a value here or in content_file */
371
+ content_string?: string;
374
372
  scope: AssetPostBodyBodyScope;
375
373
  /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */
376
374
  scope_id?: string;
377
375
  /** Is this a secret asset? */
378
376
  secret: boolean;
377
+ /** An optional description for the Asset */
378
+ description?: string;
379
379
  };
380
380
 
381
381
  export type AssetPatchBodyBody = {
@@ -393,11 +393,11 @@ export interface UserDetail {
393
393
  }
394
394
 
395
395
  export interface UserAccountDetail {
396
- /** The roles assigned to the user recognised by the Account Server */
397
- account_server_roles: string[];
396
+ user: UserDetail;
398
397
  /** Whether the caller has admin privilege */
399
398
  caller_has_admin_privilege: boolean;
400
- user: UserDetail;
399
+ /** The roles assigned to the user recognised by the Account Server */
400
+ account_server_roles: string[];
401
401
  }
402
402
 
403
403
  /**
@@ -415,13 +415,8 @@ export const UnitDetailDefaultProductPrivacy = {
415
415
  } as const;
416
416
 
417
417
  export interface UnitDetail {
418
- /** The Unit's billing day */
419
- billing_day: number;
420
418
  /** Whether the user making the API call is a member of the Unit */
421
419
  caller_is_member: boolean;
422
- created: string;
423
- /** The Unit's default product privacy setting */
424
- default_product_privacy: UnitDetailDefaultProductPrivacy;
425
420
  /** The Unit's unique identity */
426
421
  id: string;
427
422
  /** The Unit's name */
@@ -430,6 +425,11 @@ export interface UnitDetail {
430
425
  owner_id: string;
431
426
  /** True if the Unit is private */
432
427
  private: boolean;
428
+ created: string;
429
+ /** The Unit's billing day */
430
+ billing_day: number;
431
+ /** The Unit's default product privacy setting */
432
+ default_product_privacy: UnitDetailDefaultProductPrivacy;
433
433
  }
434
434
 
435
435
  /**
@@ -447,13 +447,8 @@ export const UnitAllDetailDefaultProductPrivacy = {
447
447
  } as const;
448
448
 
449
449
  export interface UnitAllDetail {
450
- /** The Unit's billing day */
451
- billing_day: number;
452
450
  /** Whether the user making the API call is a member of the Unit */
453
451
  caller_is_member: boolean;
454
- created: string;
455
- /** The Unit's default product privacy setting */
456
- default_product_privacy: UnitAllDetailDefaultProductPrivacy;
457
452
  /** The Unit's unique identity */
458
453
  id: string;
459
454
  /** The Unit's name */
@@ -462,6 +457,11 @@ export interface UnitAllDetail {
462
457
  owner_id: string;
463
458
  /** True if the Unit is private */
464
459
  private: boolean;
460
+ created: string;
461
+ /** The Unit's billing day */
462
+ billing_day: number;
463
+ /** The Unit's default product privacy setting */
464
+ default_product_privacy: UnitAllDetailDefaultProductPrivacy;
465
465
  /** A list of users that are members of the Unit */
466
466
  users: UserDetail[];
467
467
  }
@@ -478,15 +478,15 @@ export const MerchantDetailKind = {
478
478
  } as const;
479
479
 
480
480
  export interface MerchantDetail {
481
- /** The hostname used by the Service */
482
- api_hostname: string;
483
- created: string;
484
481
  /** The unique ID of the Service */
485
482
  id: number;
483
+ created: string;
486
484
  /** The kind of Service */
487
485
  kind: MerchantDetailKind;
488
486
  /** The name assigned to the Service */
489
487
  name: string;
488
+ /** The hostname used by the Service */
489
+ api_hostname: string;
490
490
  }
491
491
 
492
492
  export type MerchantGetResponse = MerchantDetail;
@@ -515,9 +515,6 @@ export const OrganisationDetailDefaultProductPrivacy = {
515
515
  export interface OrganisationDetail {
516
516
  /** Whether the user making the API call is a member of the Unit */
517
517
  caller_is_member: boolean;
518
- created: string;
519
- /** The Organisation's default product privacy setting */
520
- default_product_privacy: OrganisationDetailDefaultProductPrivacy;
521
518
  /** The Organisation's unique ID */
522
519
  id: string;
523
520
  /** The Organisation's name */
@@ -526,6 +523,9 @@ export interface OrganisationDetail {
526
523
  owner_id?: string;
527
524
  /** True if the Unit is private */
528
525
  private: boolean;
526
+ created: string;
527
+ /** The Organisation's default product privacy setting */
528
+ default_product_privacy: OrganisationDetailDefaultProductPrivacy;
529
529
  }
530
530
 
531
531
  /**
@@ -545,9 +545,6 @@ export const OrganisationAllDetailDefaultProductPrivacy = {
545
545
  export interface OrganisationAllDetail {
546
546
  /** Whether the user making the API call is a member of the Unit */
547
547
  caller_is_member: boolean;
548
- created: string;
549
- /** The Organisation's default product privacy setting */
550
- default_product_privacy: OrganisationAllDetailDefaultProductPrivacy;
551
548
  /** The Organisation's unique ID */
552
549
  id: string;
553
550
  /** The Organisation's name */
@@ -556,6 +553,9 @@ export interface OrganisationAllDetail {
556
553
  owner_id?: string;
557
554
  /** True if the Unit is private */
558
555
  private: boolean;
556
+ created: string;
557
+ /** The Organisation's default product privacy setting */
558
+ default_product_privacy: OrganisationAllDetailDefaultProductPrivacy;
559
559
  /** A list of users that are members of the Organisation */
560
560
  users: UserDetail[];
561
561
  }
@@ -572,12 +572,12 @@ export const ProductTypeServiceKind = {
572
572
  } as const;
573
573
 
574
574
  export interface ProductType {
575
+ /** A product type, this is a unique string amongst all types known to the Account Server */
576
+ type: string;
575
577
  /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */
576
578
  flavour?: string;
577
579
  /** The kind of service that can use the Product */
578
580
  service_kind?: ProductTypeServiceKind;
579
- /** A product type, this is a unique string amongst all types known to the Account Server */
580
- type: string;
581
581
  }
582
582
 
583
583
  export type ProductInstanceDetailCoins = {
@@ -591,72 +591,72 @@ export interface ProductInstanceDetail {
591
591
  }
592
592
 
593
593
  /**
594
- * The Product Type
594
+ * The Product Type flavour. Not all products have flavours
595
595
 
596
596
  */
597
- export type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];
597
+ export type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
598
598
 
599
599
 
600
600
  // eslint-disable-next-line @typescript-eslint/no-redeclare
601
- export const ProductDetailType = {
602
- DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
603
- DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
601
+ export const ProductDetailFlavour = {
602
+ EVALUATION: 'EVALUATION',
603
+ BRONZE: 'BRONZE',
604
+ SILVER: 'SILVER',
605
+ GOLD: 'GOLD',
604
606
  } as const;
605
607
 
606
608
  /**
607
- * The Product Type flavour. Not all products have flavours
609
+ * The Product Type
608
610
 
609
611
  */
610
- export type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
612
+ export type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];
611
613
 
612
614
 
613
615
  // eslint-disable-next-line @typescript-eslint/no-redeclare
614
- export const ProductDetailFlavour = {
615
- EVALUATION: 'EVALUATION',
616
- BRONZE: 'BRONZE',
617
- SILVER: 'SILVER',
618
- GOLD: 'GOLD',
616
+ export const ProductDetailType = {
617
+ DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
618
+ DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
619
619
  } as const;
620
620
 
621
621
  export interface ProductDetail {
622
+ /** The Product ID
623
+ */
624
+ id: string;
622
625
  created: string;
626
+ /** The Product Type
627
+ */
628
+ type: ProductDetailType;
623
629
  /** The Product Type flavour. Not all products have flavours
624
630
  */
625
631
  flavour?: ProductDetailFlavour;
626
- /** The Product ID
627
- */
628
- id: string;
629
632
  /** The name of the Product
630
633
  */
631
634
  name?: string;
632
- /** The Product Type
633
- */
634
- type: ProductDetailType;
635
635
  }
636
636
 
637
637
  export interface ProductCoinsDetail {
638
638
  /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */
639
639
  allowance: number;
640
- /** A multiplier applied to your coin usage within your allowance */
641
- allowance_multiplier: number;
640
+ /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */
641
+ limit: number;
642
+ /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */
643
+ used: number;
642
644
  /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */
643
645
  at_limit: boolean;
644
- /** The day of the month when the bill is due, and the end of the current billing period */
645
- billing_day: number;
646
+ /** The current burn rate, the approximate amount of coins you are currently consuming each day */
647
+ current_burn_rate: number;
646
648
  /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */
647
649
  billing_prediction: number;
648
650
  /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */
649
651
  billing_prediction_storage_contribution: number;
650
- /** The current burn rate, the approximate amount of coins you are currently consuming each day */
651
- current_burn_rate: number;
652
- /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */
653
- limit: number;
652
+ /** The day of the month when the bill is due, and the end of the current billing period */
653
+ billing_day: number;
654
+ /** A multiplier applied to your coin usage within your allowance */
655
+ allowance_multiplier: number;
654
656
  /** A multiplier that will be applied to coin used beyond your allowance */
655
657
  overspend_multiplier: number;
656
658
  /** The number of days remaining, in the current billing period */
657
659
  remaining_days: number;
658
- /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */
659
- used: number;
660
660
  }
661
661
 
662
662
  export interface ProductClaimDetail {
@@ -668,83 +668,83 @@ export interface ProductClaimDetail {
668
668
  name?: string;
669
669
  }
670
670
 
671
+ export type ProductDmStorageDetailCoins = {
672
+ /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */
673
+ used: number;
674
+ /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */
675
+ unit_cost: number;
676
+ };
677
+
671
678
  export type ProductDmStorageDetailSize = {
672
- /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */
673
- current: string;
674
679
  /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */
675
680
  peak: string;
681
+ /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */
682
+ current: string;
676
683
  /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */
677
684
  unit_size: string;
678
685
  /** The peak number of storage units used today */
679
686
  units_used: number;
680
687
  };
681
688
 
682
- export type ProductDmStorageDetailCoins = {
683
- /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */
684
- unit_cost: number;
685
- /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */
686
- used: number;
687
- };
688
-
689
689
  export interface ProductDmStorageDetail {
690
- coins: ProductDmStorageDetailCoins;
691
690
  size: ProductDmStorageDetailSize;
691
+ coins: ProductDmStorageDetailCoins;
692
692
  }
693
693
 
694
694
  export interface ProductDmProjectTier {
695
- claim?: ProductClaimDetail;
696
- /** True if the product can be (needs to be) claimed. */
697
- claimable: boolean;
698
- coins: ProductCoinsDetail;
699
- instance: ProductInstanceDetail;
700
- organisation: OrganisationAllDetail;
701
695
  product: ProductDetail;
702
- storage: ProductDmStorageDetail;
696
+ organisation: OrganisationAllDetail;
703
697
  unit: UnitAllDetail;
698
+ storage: ProductDmStorageDetail;
699
+ coins: ProductCoinsDetail;
700
+ instance: ProductInstanceDetail;
701
+ /** True if the product can be (needs to be) claimed. */
702
+ claimable: boolean;
703
+ claim?: ProductClaimDetail;
704
704
  }
705
705
 
706
706
  export interface ProductDmStorage {
707
- /** True if the product can be (needs to be) claimed. */
708
- claimable: boolean;
709
- coins: ProductCoinsDetail;
710
- organisation: OrganisationAllDetail;
711
707
  product: ProductDetail;
712
- storage: ProductDmStorageDetail;
708
+ organisation: OrganisationAllDetail;
713
709
  unit: UnitAllDetail;
710
+ storage: ProductDmStorageDetail;
711
+ coins: ProductCoinsDetail;
712
+ /** True if the product can be (needs to be) claimed. */
713
+ claimable: boolean;
714
714
  }
715
715
 
716
716
  export interface ChargeAdditionalData { [key: string]: unknown }
717
717
 
718
718
  export interface StorageChargeItem {
719
- additional_data?: ChargeAdditionalData;
720
- /** The date when the charges concluded */
721
- closed?: string;
719
+ item_number: number;
720
+ /** The date and time of the processing charge */
721
+ date: string;
722
722
  /** The coin-cost of the storage */
723
723
  coins: string;
724
724
  /** The current burn rate, the approximate amount of coins you are currently consuming each day */
725
725
  current_burn_rate?: string;
726
- /** The date and time of the processing charge */
727
- date: string;
728
- item_number: number;
726
+ /** The date when the charges concluded */
727
+ closed?: string;
728
+ additional_data?: ChargeAdditionalData;
729
729
  }
730
730
 
731
731
  export interface StorageCharges {
732
- items: StorageChargeItem[];
733
732
  num_items: number;
733
+ items: StorageChargeItem[];
734
734
  }
735
735
 
736
736
  export interface ProcessingChargeItem {
737
- additional_data?: ChargeAdditionalData;
738
- /** The coin-cost of the storage */
739
- coins: string;
740
737
  /** The charge record number */
741
738
  id: number;
742
- name?: string;
743
739
  /** The most recent sequence number for this charge */
744
740
  sqn: number;
741
+ name?: string;
742
+ username: string;
745
743
  /** The date and time of the processing charge */
746
744
  timestamp: string;
747
- username: string;
745
+ /** The coin-cost of the storage */
746
+ coins: string;
747
+ additional_data?: ChargeAdditionalData;
748
748
  }
749
749
 
750
750
  export type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];
@@ -756,16 +756,16 @@ export const ProcessingChargesMerchantKind = {
756
756
  } as const;
757
757
 
758
758
  export interface ProcessingCharges {
759
- charge: ProcessingChargeItem;
759
+ merchant_name: string;
760
+ merchant_kind: ProcessingChargesMerchantKind;
761
+ merchant_api_hostname: string;
760
762
  /** The date when the process stopped */
761
763
  closed?: string;
762
764
  /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */
763
765
  final: boolean;
764
- merchant_api_hostname: string;
765
- merchant_kind: ProcessingChargesMerchantKind;
766
- merchant_name: string;
767
766
  /** True if charges were received after the charge record was finalised */
768
767
  post_final_charges?: boolean;
768
+ charge: ProcessingChargeItem;
769
769
  }
770
770
 
771
771
  export type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];
@@ -781,18 +781,18 @@ export const AssetDetailScope = {
781
781
  } as const;
782
782
 
783
783
  export interface AssetDetail {
784
- content: string;
785
- content_modified?: string;
786
- created: string;
787
784
  creator: string;
788
- description?: string;
789
- disabled: boolean;
790
785
  id: string;
791
- merchants: MerchantDetail[];
792
786
  name: string;
793
787
  scope: AssetDetailScope;
794
788
  scope_id: string;
795
789
  secret: boolean;
790
+ disabled: boolean;
791
+ content: string;
792
+ created: string;
793
+ content_modified?: string;
794
+ description?: string;
795
+ merchants: MerchantDetail[];
796
796
  }
797
797
 
798
798
  export type UserAccountGetResponse = UserAccountDetail;
@@ -823,16 +823,16 @@ export const ChargeSummaryType = {
823
823
  } as const;
824
824
 
825
825
  export interface ChargeSummary {
826
- /** The cost, in coins of the charge */
827
- coins: string;
828
826
  /** The type of charge */
829
827
  type: ChargeSummaryType;
828
+ /** The cost, in coins of the charge */
829
+ coins: string;
830
830
  }
831
831
 
832
832
  export interface UnitProductChargeSummary {
833
- charges: ChargeSummary[];
834
833
  product_id: string;
835
834
  product_type: string;
835
+ charges: ChargeSummary[];
836
836
  }
837
837
 
838
838
  export interface UnitChargeSummary {
@@ -840,28 +840,28 @@ export interface UnitChargeSummary {
840
840
  }
841
841
 
842
842
  export interface UnitChargesGetResponse {
843
- /**
844
- * @minimum 1
845
- * @maximum 28
846
- */
847
- billing_day: number;
848
843
  /** Whether the user making the API call is a member of the Unit */
849
844
  caller_is_member: boolean;
850
- coins: string;
851
- count: number;
852
- created: string;
853
- /** The start of the charge period */
854
- from: string;
845
+ unit_id: string;
855
846
  name?: string;
856
847
  /** The Unit's owner (a username) */
857
848
  owner_id: string;
858
849
  /** True if the Unit is private */
859
850
  private: boolean;
860
- products: UnitProductChargeSummary[];
861
- summary: UnitChargeSummary;
862
- unit_id: string;
851
+ created: string;
852
+ coins: string;
853
+ count: number;
854
+ /**
855
+ * @minimum 1
856
+ * @maximum 28
857
+ */
858
+ billing_day: number;
859
+ /** The start of the charge period */
860
+ from: string;
863
861
  /** The date where of first day after the charge period */
864
862
  until: string;
863
+ summary: UnitChargeSummary;
864
+ products: UnitProductChargeSummary[];
865
865
  }
866
866
 
867
867
  /**
@@ -883,8 +883,8 @@ export interface ProductsGetTypesResponse {
883
883
 
884
884
  export type ProductsGetDefaultStorageCostDefaultStorageCost = {
885
885
  cost: string;
886
- description: string;
887
886
  units: string;
887
+ description: string;
888
888
  };
889
889
 
890
890
  export interface ProductsGetDefaultStorageCost {
@@ -909,25 +909,25 @@ export const ProductChargesGetResponseProductType = {
909
909
  } as const;
910
910
 
911
911
  export interface ProductChargesGetResponse {
912
+ product_id: string;
913
+ product_type: ProductChargesGetResponseProductType;
912
914
  /**
913
915
  * @minimum 1
914
916
  * @maximum 28
915
917
  */
916
918
  billing_day: number;
917
- claim?: ProductClaimDetail;
918
919
  /** True if the product can be (needs to be) claimed. */
919
920
  claimable: boolean;
920
- /** The total number of coins consumed by this product for the invoice period */
921
- coins: string;
921
+ claim?: ProductClaimDetail;
922
922
  count: number;
923
923
  /** The start of the charge period */
924
924
  from: string;
925
- processing_charges: ProcessingCharges[];
926
- product_id: string;
927
- product_type: ProductChargesGetResponseProductType;
928
- storage_charges: StorageCharges;
929
925
  /** The date where of first day after the charge period */
930
926
  until: string;
927
+ /** The total number of coins consumed by this product for the invoice period */
928
+ coins: string;
929
+ processing_charges: ProcessingCharges[];
930
+ storage_charges: StorageCharges;
931
931
  }
932
932
 
933
933
  export type OrganisationGetResponse = OrganisationAllDetail;
@@ -939,6 +939,8 @@ export interface OrganisationsGetResponse {
939
939
  }
940
940
 
941
941
  export interface OrganisationUnitChargeSummary {
942
+ unit_id: string;
943
+ name: string;
942
944
  /**
943
945
  * @minimum 1
944
946
  * @maximum 28
@@ -946,17 +948,15 @@ export interface OrganisationUnitChargeSummary {
946
948
  billing_day: number;
947
949
  /** The start of the charge period */
948
950
  from: string;
949
- name: string;
950
- summary: ChargeSummary[];
951
- unit_id: string;
952
951
  /** The date where of first day after the charge period */
953
952
  until: string;
953
+ summary: ChargeSummary[];
954
954
  }
955
955
 
956
956
  export interface OrganisationChargesGetResponse {
957
- coins: string;
958
- name: string;
959
957
  organisation_id: string;
958
+ name: string;
959
+ coins: string;
960
960
  summary: ChargeSummary[];
961
961
  unit_charges: OrganisationUnitChargeSummary[];
962
962
  }
@@ -970,16 +970,16 @@ export interface OrganisationUnitsGetResponse {
970
970
  }
971
971
 
972
972
  export interface OrganisationChargeSummary {
973
- name: string;
974
973
  organisation_id: string;
974
+ name: string;
975
975
  summary: ChargeSummary[];
976
976
  }
977
977
 
978
978
  export interface PersonalUnitPutResponse {
979
- /** The unit's unique ID */
980
- id: string;
981
979
  /** The unit's Organisation. Used to identify the Default organisation */
982
980
  organisation_id: string;
981
+ /** The unit's unique ID */
982
+ id: string;
983
983
  }
984
984
 
985
985
  export interface OrganisationUnitPostResponse {
@@ -1004,9 +1004,6 @@ export const OrganisationGetDefaultResponseDefaultProductPrivacy = {
1004
1004
  export interface OrganisationGetDefaultResponse {
1005
1005
  /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */
1006
1006
  caller_is_member?: boolean;
1007
- created?: string;
1008
- /** The Organisation's default product privacy setting */
1009
- default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;
1010
1007
  /** The Default Organisation ID
1011
1008
  */
1012
1009
  id?: string;
@@ -1016,6 +1013,9 @@ export interface OrganisationGetDefaultResponse {
1016
1013
  /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units
1017
1014
  */
1018
1015
  private?: boolean;
1016
+ created?: string;
1017
+ /** The Organisation's default product privacy setting */
1018
+ default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;
1019
1019
  }
1020
1020
 
1021
1021
  export interface UsersGetResponse {
@@ -1048,8 +1048,8 @@ export interface EventStreamGetPostResponse {
1048
1048
  export interface ChargesGetResponse {
1049
1049
  coins: string;
1050
1050
  count: number;
1051
- organisation_charges: OrganisationChargeSummary[];
1052
1051
  summary: ChargeSummary[];
1052
+ organisation_charges: OrganisationChargeSummary[];
1053
1053
  }
1054
1054
 
1055
1055
  export interface AssetPostResponse {