@squonk/account-server-client 2.0.3 → 2.0.4-rc.2

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 (66) hide show
  1. package/admin/admin.cjs +8 -6
  2. package/admin/admin.cjs.map +1 -1
  3. package/admin/admin.d.ts +4 -4
  4. package/admin/admin.js +7 -5
  5. package/admin/admin.js.map +1 -1
  6. package/asset/asset.cjs +15 -13
  7. package/asset/asset.cjs.map +1 -1
  8. package/asset/asset.d.ts +20 -20
  9. package/asset/asset.js +7 -5
  10. package/asset/asset.js.map +1 -1
  11. package/{chunk-3O5KIRV4.js → chunk-3RNIDX7T.js} +1 -1
  12. package/{chunk-3O5KIRV4.js.map → chunk-3RNIDX7T.js.map} +1 -1
  13. package/chunk-7XN3IQYV.cjs +13 -0
  14. package/chunk-7XN3IQYV.cjs.map +1 -0
  15. package/{chunk-IUEU2LYC.cjs → chunk-UZTHSGDT.cjs} +1 -1
  16. package/chunk-UZTHSGDT.cjs.map +1 -0
  17. package/chunk-YEX2SGER.js +13 -0
  18. package/chunk-YEX2SGER.js.map +1 -0
  19. package/{custom-instance-dad9d28e.d.ts → custom-instance-85497958.d.ts} +110 -48
  20. package/index.cjs +2 -2
  21. package/index.cjs.map +1 -1
  22. package/index.d.ts +1 -1
  23. package/index.js +1 -1
  24. package/index.js.map +1 -1
  25. package/merchant/merchant.cjs +12 -9
  26. package/merchant/merchant.cjs.map +1 -1
  27. package/merchant/merchant.d.ts +6 -6
  28. package/merchant/merchant.js +10 -7
  29. package/merchant/merchant.js.map +1 -1
  30. package/organisation/organisation.cjs +44 -16
  31. package/organisation/organisation.cjs.map +1 -1
  32. package/organisation/organisation.d.ts +37 -16
  33. package/organisation/organisation.js +38 -10
  34. package/organisation/organisation.js.map +1 -1
  35. package/package.json +12 -12
  36. package/product/product.cjs +35 -33
  37. package/product/product.cjs.map +1 -1
  38. package/product/product.d.ts +24 -24
  39. package/product/product.js +25 -23
  40. package/product/product.js.map +1 -1
  41. package/src/account-server-api.schemas.ts +85 -17
  42. package/src/admin/admin.ts +6 -5
  43. package/src/asset/asset.ts +6 -5
  44. package/src/merchant/merchant.ts +10 -9
  45. package/src/organisation/organisation.ts +78 -19
  46. package/src/product/product.ts +30 -32
  47. package/src/queryMutator.ts +12 -0
  48. package/src/state/state.ts +6 -5
  49. package/src/unit/unit.ts +78 -19
  50. package/src/user/user.ts +14 -15
  51. package/state/state.cjs +8 -6
  52. package/state/state.cjs.map +1 -1
  53. package/state/state.d.ts +4 -4
  54. package/state/state.js +7 -5
  55. package/state/state.js.map +1 -1
  56. package/unit/unit.cjs +46 -25
  57. package/unit/unit.cjs.map +1 -1
  58. package/unit/unit.d.ts +42 -21
  59. package/unit/unit.js +38 -17
  60. package/unit/unit.js.map +1 -1
  61. package/user/user.cjs +20 -17
  62. package/user/user.cjs.map +1 -1
  63. package/user/user.d.ts +16 -16
  64. package/user/user.js +13 -10
  65. package/user/user.js.map +1 -1
  66. package/chunk-IUEU2LYC.cjs.map +0 -1
@@ -2,7 +2,7 @@ import * as axios from 'axios';
2
2
  import { AxiosRequestConfig, AxiosError } from 'axios';
3
3
 
4
4
  /**
5
- * Generated by orval v6.10.0 🍺
5
+ * Generated by orval v6.12.1 🍺
6
6
  * Do not edit manually.
7
7
  * Account Server API
8
8
  * The Informatics Matters Account Server API.
@@ -11,71 +11,125 @@ A service that provides access to the Account Server, which gives *registered* u
11
11
 
12
12
  * OpenAPI spec version: 2.0
13
13
  */
14
- declare type AttachAssetParams = {
14
+ type DetachAssetParams = {
15
+ /**
16
+ * A Merchant Identity
17
+ */
18
+ m_id?: QMIdParameter;
19
+ };
20
+ type AttachAssetParams = {
21
+ /**
22
+ * A Merchant Identity
23
+ */
15
24
  m_id?: QMIdParameter;
16
25
  };
17
26
  /**
18
27
  * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
19
28
  */
20
- declare type QUntilParameter = string;
29
+ type QUntilParameter = string;
21
30
  /**
22
31
  * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
23
32
  */
24
- declare type QFromParameter = string;
25
- declare type GetUnitChargesParams = {
33
+ type QFromParameter = string;
34
+ type GetOrganisationChargesParams = {
35
+ /**
36
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
37
+ */
26
38
  from?: QFromParameter;
39
+ /**
40
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
41
+ */
27
42
  until?: QUntilParameter;
43
+ /**
44
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
45
+ */
28
46
  pbp?: QPbpParameter;
29
47
  };
30
- declare type GetProductChargesParams = {
48
+ type GetProductChargesParams = {
49
+ /**
50
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
51
+ */
31
52
  from?: QFromParameter;
53
+ /**
54
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
55
+ */
32
56
  until?: QUntilParameter;
57
+ /**
58
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
59
+ */
33
60
  pbp?: QPbpParameter;
34
61
  };
35
- declare type GetChargesParams = {
62
+ type GetChargesParams = {
63
+ /**
64
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
65
+ */
36
66
  from?: QFromParameter;
67
+ /**
68
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
69
+ */
37
70
  until?: QUntilParameter;
71
+ /**
72
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
73
+ */
38
74
  pbp?: QPbpParameter;
39
75
  };
40
76
  /**
41
77
  * A User Identity
42
78
  */
43
- declare type QUserIdParameter = string;
79
+ type QUserIdParameter = string;
44
80
  /**
45
81
  * A Product Identity
46
82
  */
47
- declare type QProductIdParameter = string;
83
+ type QProductIdParameter = string;
48
84
  /**
49
85
  * A Unit Identity
50
86
  */
51
- declare type QUnitIdParameter = string;
52
- declare type GetAssetParams = {
87
+ type QUnitIdParameter = string;
88
+ type GetAssetParams = {
89
+ /**
90
+ * A User Identity
91
+ */
53
92
  user_id?: QUserIdParameter;
93
+ /**
94
+ * A Product Identity
95
+ */
54
96
  product_id?: QProductIdParameter;
97
+ /**
98
+ * A Unit Identity
99
+ */
55
100
  unit_id?: QUnitIdParameter;
101
+ /**
102
+ * An Organisation Identity
103
+ */
56
104
  org_id?: QOrgIdParameter;
57
105
  };
58
106
  /**
59
107
  * A Merchant Identity
60
108
  */
61
- declare type QMIdParameter = number;
62
- declare type DetachAssetParams = {
63
- m_id?: QMIdParameter;
64
- };
109
+ type QMIdParameter = number;
65
110
  /**
66
111
  * An Organisation Identity
67
112
  */
68
- declare type QOrgIdParameter = string;
113
+ type QOrgIdParameter = string;
69
114
  /**
70
115
  * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
71
116
  */
72
- declare type QPbpParameter = number;
73
- declare type GetOrganisationChargesParams = {
117
+ type QPbpParameter = number;
118
+ type GetUnitChargesParams = {
119
+ /**
120
+ * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
121
+ */
74
122
  from?: QFromParameter;
123
+ /**
124
+ * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
125
+ */
75
126
  until?: QUntilParameter;
127
+ /**
128
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
129
+ */
76
130
  pbp?: QPbpParameter;
77
131
  };
78
- declare type ProductPatchBodyBody = {
132
+ type ProductPatchBodyBody = {
79
133
  /** The name you want to give the Product */
80
134
  name?: string;
81
135
  /** The Product's built-in coin allowance. Product allowances cannot be reduced */
@@ -86,7 +140,7 @@ declare type ProductPatchBodyBody = {
86
140
  /**
87
141
  * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products
88
142
  */
89
- declare type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];
143
+ type UnitProductPostBodyBodyFlavour = (typeof UnitProductPostBodyBodyFlavour)[keyof typeof UnitProductPostBodyBodyFlavour];
90
144
  declare const UnitProductPostBodyBodyFlavour: {
91
145
  readonly EVALUATION: "EVALUATION";
92
146
  readonly BRONZE: "BRONZE";
@@ -98,12 +152,12 @@ declare const UnitProductPostBodyBodyFlavour: {
98
152
 
99
153
  Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
100
154
  */
101
- declare type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];
155
+ type UnitProductPostBodyBodyType = (typeof UnitProductPostBodyBodyType)[keyof typeof UnitProductPostBodyBodyType];
102
156
  declare const UnitProductPostBodyBodyType: {
103
157
  readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
104
158
  readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
105
159
  };
106
- declare type UnitProductPostBodyBody = {
160
+ type UnitProductPostBodyBody = {
107
161
  /** The name you want to give the Product */
108
162
  name: string;
109
163
  /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
@@ -117,23 +171,31 @@ declare type UnitProductPostBodyBody = {
117
171
  /** 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 */
118
172
  limit?: number;
119
173
  };
120
- declare type OrganisationUnitPostBodyBody = {
174
+ type UnitPatchBodyBody = {
175
+ /** The new name for the Unit */
176
+ name?: string;
177
+ };
178
+ type OrganisationPatchBodyBody = {
179
+ /** The new name for the Organisational */
180
+ name?: string;
181
+ };
182
+ type OrganisationUnitPostBodyBody = {
121
183
  /** The name of the unit */
122
184
  name: string;
123
185
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
124
186
  billing_day: number;
125
187
  };
126
- declare type PersonalUnitPutBodyBody = {
188
+ type PersonalUnitPutBodyBody = {
127
189
  /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
128
190
  billing_day: number;
129
191
  };
130
- declare type OrganisationPostBodyBody = {
192
+ type OrganisationPostBodyBody = {
131
193
  /** The name of the organisation */
132
194
  name: string;
133
195
  /** The name of the organisation owner. A user ID */
134
196
  owner: string;
135
197
  };
136
- declare type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];
198
+ type AssetPostBodyBodyScope = (typeof AssetPostBodyBodyScope)[keyof typeof AssetPostBodyBodyScope];
137
199
  declare const AssetPostBodyBodyScope: {
138
200
  readonly USER: "USER";
139
201
  readonly PRODUCT: "PRODUCT";
@@ -141,7 +203,7 @@ declare const AssetPostBodyBodyScope: {
141
203
  readonly ORGANISATION: "ORGANISATION";
142
204
  readonly GLOBAL: "GLOBAL";
143
205
  };
144
- declare type AssetPostBodyBody = {
206
+ type AssetPostBodyBody = {
145
207
  /** 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 */
146
208
  name: string;
147
209
  /** A file containing the content for the asset. You must provide a value here or in content_string */
@@ -156,7 +218,7 @@ declare type AssetPostBodyBody = {
156
218
  /** An optional description for the Asset */
157
219
  description?: string;
158
220
  };
159
- declare type AssetPatchBodyBody = {
221
+ type AssetPatchBodyBody = {
160
222
  /** A file containing the content for the asset. You must provide a value here or in content_string */
161
223
  content_file?: Blob;
162
224
  /** The textual content of the asset. You must provide a value here or in content_file */
@@ -191,7 +253,7 @@ interface UnitDetail {
191
253
  /**
192
254
  * The kind of Service
193
255
  */
194
- declare type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];
256
+ type MerchantDetailKind = (typeof MerchantDetailKind)[keyof typeof MerchantDetailKind];
195
257
  declare const MerchantDetailKind: {
196
258
  readonly DATA_MANAGER: "DATA_MANAGER";
197
259
  };
@@ -206,7 +268,7 @@ interface MerchantDetail {
206
268
  /** The hostname used by the Service */
207
269
  api_hostname: string;
208
270
  }
209
- declare type MerchantGetResponse = MerchantDetail;
271
+ type MerchantGetResponse = MerchantDetail;
210
272
  interface MerchantsGetResponse {
211
273
  /** The list of known Merchants
212
274
  */
@@ -228,7 +290,7 @@ interface OrganisationDetail {
228
290
  /**
229
291
  * The kind of service that can use the Product
230
292
  */
231
- declare type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];
293
+ type ProductTypeServiceKind = (typeof ProductTypeServiceKind)[keyof typeof ProductTypeServiceKind];
232
294
  declare const ProductTypeServiceKind: {
233
295
  readonly DATA_MANAGER: "DATA_MANAGER";
234
296
  };
@@ -240,7 +302,7 @@ interface ProductType {
240
302
  /** The kind of service that can use the Product */
241
303
  service_kind?: ProductTypeServiceKind;
242
304
  }
243
- declare type ProductInstanceDetailCoins = {
305
+ type ProductInstanceDetailCoins = {
244
306
  /** The number of coins used
245
307
  */
246
308
  used: number;
@@ -252,7 +314,7 @@ interface ProductInstanceDetail {
252
314
  * The Product Type flavour. Not all products have flavours
253
315
 
254
316
  */
255
- declare type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
317
+ type ProductDetailFlavour = (typeof ProductDetailFlavour)[keyof typeof ProductDetailFlavour];
256
318
  declare const ProductDetailFlavour: {
257
319
  readonly EVALUATION: "EVALUATION";
258
320
  readonly BRONZE: "BRONZE";
@@ -263,7 +325,7 @@ declare const ProductDetailFlavour: {
263
325
  * The Product Type
264
326
 
265
327
  */
266
- declare type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];
328
+ type ProductDetailType = (typeof ProductDetailType)[keyof typeof ProductDetailType];
267
329
  declare const ProductDetailType: {
268
330
  readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
269
331
  readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
@@ -313,13 +375,13 @@ interface ProductClaimDetail {
313
375
  */
314
376
  name?: string;
315
377
  }
316
- declare type ProductDmStorageDetailCoins = {
378
+ type ProductDmStorageDetailCoins = {
317
379
  /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */
318
380
  used: number;
319
381
  /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */
320
382
  unit_cost: number;
321
383
  };
322
- declare type ProductDmStorageDetailSize = {
384
+ type ProductDmStorageDetailSize = {
323
385
  /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */
324
386
  peak: string;
325
387
  /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */
@@ -383,7 +445,7 @@ interface ProcessingChargeItem {
383
445
  coins: string;
384
446
  additional_data?: ChargeAdditionalData;
385
447
  }
386
- declare type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];
448
+ type ProcessingChargesMerchantKind = (typeof ProcessingChargesMerchantKind)[keyof typeof ProcessingChargesMerchantKind];
387
449
  declare const ProcessingChargesMerchantKind: {
388
450
  readonly DATA_MANAGER: "DATA_MANAGER";
389
451
  };
@@ -399,7 +461,7 @@ interface ProcessingCharges {
399
461
  post_final_charges?: boolean;
400
462
  charge: ProcessingChargeItem;
401
463
  }
402
- declare type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];
464
+ type AssetDetailScope = (typeof AssetDetailScope)[keyof typeof AssetDetailScope];
403
465
  declare const AssetDetailScope: {
404
466
  readonly USER: "USER";
405
467
  readonly PRODUCT: "PRODUCT";
@@ -421,13 +483,13 @@ interface AssetDetail {
421
483
  description?: string;
422
484
  merchants: MerchantDetail[];
423
485
  }
424
- declare type UserAccountGetResponse = UserAccountDetail;
486
+ type UserAccountGetResponse = UserAccountDetail;
425
487
  interface UnitsGetResponse {
426
488
  /** A list of Units
427
489
  */
428
490
  units: OrganisationUnitsGetResponse[];
429
491
  }
430
- declare type UnitGetResponse = UnitDetail;
492
+ type UnitGetResponse = UnitDetail;
431
493
  interface UnitProductPostResponse {
432
494
  /** The Product's unique ID */
433
495
  id: string;
@@ -435,7 +497,7 @@ interface UnitProductPostResponse {
435
497
  /**
436
498
  * The type of charge
437
499
  */
438
- declare type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];
500
+ type ChargeSummaryType = (typeof ChargeSummaryType)[keyof typeof ChargeSummaryType];
439
501
  declare const ChargeSummaryType: {
440
502
  readonly PROCESSING: "PROCESSING";
441
503
  readonly STORAGE: "STORAGE";
@@ -476,7 +538,7 @@ interface UnitChargesGetResponse {
476
538
  /**
477
539
  * The Unit's Product
478
540
  */
479
- declare type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;
541
+ type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;
480
542
  interface ProductUnitGetResponse {
481
543
  /** The Unit's Product */
482
544
  product: ProductUnitGetResponseProduct;
@@ -485,7 +547,7 @@ interface ProductsGetTypesResponse {
485
547
  /** All the Product Types you have access to */
486
548
  product_types: ProductType[];
487
549
  }
488
- declare type ProductsGetDefaultStorageCostDefaultStorageCost = {
550
+ type ProductsGetDefaultStorageCostDefaultStorageCost = {
489
551
  cost: string;
490
552
  units: string;
491
553
  description: string;
@@ -493,12 +555,12 @@ declare type ProductsGetDefaultStorageCostDefaultStorageCost = {
493
555
  interface ProductsGetDefaultStorageCost {
494
556
  default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;
495
557
  }
496
- declare type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;
558
+ type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;
497
559
  interface ProductsGetResponse {
498
560
  /** All the Products you have access to */
499
561
  products: ProductsGetResponseProductsItem[];
500
562
  }
501
- declare type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];
563
+ type ProductChargesGetResponseProductType = (typeof ProductChargesGetResponseProductType)[keyof typeof ProductChargesGetResponseProductType];
502
564
  declare const ProductChargesGetResponseProductType: {
503
565
  readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
504
566
  readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
@@ -519,7 +581,7 @@ interface ProductChargesGetResponse {
519
581
  processing_charges: ProcessingCharges[];
520
582
  storage_charges: StorageCharges;
521
583
  }
522
- declare type OrganisationGetResponse = OrganisationDetail;
584
+ type OrganisationGetResponse = OrganisationDetail;
523
585
  interface OrganisationsGetResponse {
524
586
  /** A list of Organisations */
525
587
  organisations: OrganisationDetail[];
@@ -625,6 +687,6 @@ declare const setAuthToken: (token: string) => void;
625
687
  */
626
688
  declare const setBaseUrl: (baseUrl: string) => void;
627
689
  declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
628
- declare type ErrorType<TError> = AxiosError<TError>;
690
+ type ErrorType<TError> = AxiosError<TError>;
629
691
 
630
- export { AssetDetailScope as $, AttachAssetParams as A, ProductType as B, ProductInstanceDetailCoins as C, DetachAssetParams as D, ProductInstanceDetail as E, ProductDetailFlavour as F, GetUnitChargesParams as G, ProductDetailType as H, ProductDetail as I, ProductCoinsDetail as J, ProductClaimDetail as K, ProductDmStorageDetailCoins as L, MerchantDetailKind as M, ProductDmStorageDetailSize as N, OrganisationUnitPostBodyBody as O, ProductPatchBodyBody as P, QUntilParameter as Q, ProductDmStorageDetail as R, ProductDmProjectTier as S, ProductDmStorage as T, UnitProductPostBodyBodyFlavour as U, ChargeAdditionalData as V, StorageChargeItem as W, StorageCharges as X, ProcessingChargeItem as Y, ProcessingChargesMerchantKind as Z, ProcessingCharges as _, QFromParameter as a, AssetDetail as a0, UserAccountGetResponse as a1, UnitsGetResponse as a2, UnitGetResponse as a3, UnitProductPostResponse as a4, ChargeSummaryType as a5, ChargeSummary as a6, UnitProductChargeSummary as a7, UnitChargeSummary as a8, UnitChargesGetResponse as a9, setAuthToken as aA, setBaseUrl as aB, customInstance as aC, ErrorType as aD, ProductUnitGetResponseProduct as aa, ProductUnitGetResponse as ab, ProductsGetTypesResponse as ac, ProductsGetDefaultStorageCostDefaultStorageCost as ad, ProductsGetDefaultStorageCost as ae, ProductsGetResponseProductsItem as af, ProductsGetResponse as ag, ProductChargesGetResponseProductType as ah, ProductChargesGetResponse as ai, OrganisationGetResponse as aj, OrganisationsGetResponse as ak, OrganisationUnitChargeSummary as al, OrganisationChargesGetResponse as am, OrganisationUnitsGetResponse as an, OrganisationChargeSummary as ao, PersonalUnitPutResponse as ap, OrganisationUnitPostResponse as aq, OrganisationGetDefaultResponse as ar, UsersGetResponse as as, OrganisationPostResponse as at, StateGetVersionResponse as au, ChargesGetResponse as av, AssetPostResponse as aw, AssetGetResponse as ax, AsError as ay, AXIOS_INSTANCE as az, GetProductChargesParams as b, GetChargesParams as c, QUserIdParameter as d, QProductIdParameter as e, QUnitIdParameter as f, GetAssetParams as g, QMIdParameter as h, QOrgIdParameter as i, QPbpParameter as j, GetOrganisationChargesParams as k, UnitProductPostBodyBodyType as l, UnitProductPostBodyBody as m, PersonalUnitPutBodyBody as n, OrganisationPostBodyBody as o, AssetPostBodyBodyScope as p, AssetPostBodyBody as q, AssetPatchBodyBody as r, UserDetail as s, UserAccountDetail as t, UnitDetail as u, MerchantDetail as v, MerchantGetResponse as w, MerchantsGetResponse as x, OrganisationDetail as y, ProductTypeServiceKind as z };
692
+ export { ProcessingChargesMerchantKind as $, AttachAssetParams as A, OrganisationDetail as B, ProductTypeServiceKind as C, DetachAssetParams as D, ProductType as E, ProductInstanceDetailCoins as F, GetOrganisationChargesParams as G, ProductInstanceDetail as H, ProductDetailFlavour as I, ProductDetailType as J, ProductDetail as K, ProductCoinsDetail as L, MerchantDetailKind as M, ProductClaimDetail as N, OrganisationPatchBodyBody as O, ProductPatchBodyBody as P, QUntilParameter as Q, ProductDmStorageDetailCoins as R, ProductDmStorageDetailSize as S, ProductDmStorageDetail as T, UnitProductPostBodyBodyFlavour as U, ProductDmProjectTier as V, ProductDmStorage as W, ChargeAdditionalData as X, StorageChargeItem as Y, StorageCharges as Z, ProcessingChargeItem as _, QFromParameter as a, ProcessingCharges as a0, AssetDetailScope as a1, AssetDetail as a2, UserAccountGetResponse as a3, UnitsGetResponse as a4, UnitGetResponse as a5, UnitProductPostResponse as a6, ChargeSummaryType as a7, ChargeSummary as a8, UnitProductChargeSummary as a9, AsError as aA, AXIOS_INSTANCE as aB, setAuthToken as aC, setBaseUrl as aD, customInstance as aE, ErrorType as aF, UnitChargeSummary as aa, UnitChargesGetResponse as ab, ProductUnitGetResponseProduct as ac, ProductUnitGetResponse as ad, ProductsGetTypesResponse as ae, ProductsGetDefaultStorageCostDefaultStorageCost as af, ProductsGetDefaultStorageCost as ag, ProductsGetResponseProductsItem as ah, ProductsGetResponse as ai, ProductChargesGetResponseProductType as aj, ProductChargesGetResponse as ak, OrganisationGetResponse as al, OrganisationsGetResponse as am, OrganisationUnitChargeSummary as an, OrganisationChargesGetResponse as ao, OrganisationUnitsGetResponse as ap, OrganisationChargeSummary as aq, PersonalUnitPutResponse as ar, OrganisationUnitPostResponse as as, OrganisationGetDefaultResponse as at, UsersGetResponse as au, OrganisationPostResponse as av, StateGetVersionResponse as aw, ChargesGetResponse as ax, AssetPostResponse as ay, AssetGetResponse as az, GetProductChargesParams as b, GetChargesParams as c, QUserIdParameter as d, QProductIdParameter as e, QUnitIdParameter as f, GetAssetParams as g, QMIdParameter as h, QOrgIdParameter as i, QPbpParameter as j, GetUnitChargesParams as k, UnitProductPostBodyBodyType as l, UnitProductPostBodyBody as m, UnitPatchBodyBody as n, OrganisationUnitPostBodyBody as o, PersonalUnitPutBodyBody as p, OrganisationPostBodyBody as q, AssetPostBodyBodyScope as r, AssetPostBodyBody as s, AssetPatchBodyBody as t, UserDetail as u, UserAccountDetail as v, UnitDetail as w, MerchantDetail as x, MerchantGetResponse as y, MerchantsGetResponse as z };
package/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkIUEU2LYCcjs = require('./chunk-IUEU2LYC.cjs');
6
+ var _chunkUZTHSGDTcjs = require('./chunk-UZTHSGDT.cjs');
7
7
 
8
8
  // src/account-server-api.schemas.ts
9
9
  var UnitProductPostBodyBodyFlavour = {
@@ -73,5 +73,5 @@ var ProductChargesGetResponseProductType = {
73
73
 
74
74
 
75
75
 
76
- exports.AXIOS_INSTANCE = _chunkIUEU2LYCcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; exports.ChargeSummaryType = ChargeSummaryType; exports.MerchantDetailKind = MerchantDetailKind; exports.ProcessingChargesMerchantKind = ProcessingChargesMerchantKind; exports.ProductChargesGetResponseProductType = ProductChargesGetResponseProductType; exports.ProductDetailFlavour = ProductDetailFlavour; exports.ProductDetailType = ProductDetailType; exports.ProductTypeServiceKind = ProductTypeServiceKind; exports.UnitProductPostBodyBodyFlavour = UnitProductPostBodyBodyFlavour; exports.UnitProductPostBodyBodyType = UnitProductPostBodyBodyType; exports.customInstance = _chunkIUEU2LYCcjs.customInstance; exports.setAuthToken = _chunkIUEU2LYCcjs.setAuthToken; exports.setBaseUrl = _chunkIUEU2LYCcjs.setBaseUrl;
76
+ exports.AXIOS_INSTANCE = _chunkUZTHSGDTcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; exports.ChargeSummaryType = ChargeSummaryType; exports.MerchantDetailKind = MerchantDetailKind; exports.ProcessingChargesMerchantKind = ProcessingChargesMerchantKind; exports.ProductChargesGetResponseProductType = ProductChargesGetResponseProductType; exports.ProductDetailFlavour = ProductDetailFlavour; exports.ProductDetailType = ProductDetailType; exports.ProductTypeServiceKind = ProductTypeServiceKind; exports.UnitProductPostBodyBodyFlavour = UnitProductPostBodyBodyFlavour; exports.UnitProductPostBodyBodyType = UnitProductPostBodyBodyType; exports.customInstance = _chunkUZTHSGDTcjs.customInstance; exports.setAuthToken = _chunkUZTHSGDTcjs.setAuthToken; exports.setBaseUrl = _chunkUZTHSGDTcjs.setBaseUrl;
77
77
  //# sourceMappingURL=index.cjs.map
package/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AAqGO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCACE;AAAA,EACF,mCAAmC;AACrC;AAwCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA6DO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA2CO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAUO,IAAM,oBAAoB;AAAA,EAC/B,wCACE;AAAA,EACF,mCAAmC;AACrC;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nexport type AttachAssetParams = { m_id?: QMIdParameter };\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\nexport type GetAssetParams = {\n user_id?: QUserIdParameter;\n product_id?: QProductIdParameter;\n unit_id?: QUnitIdParameter;\n org_id?: QOrgIdParameter;\n};\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\nexport type DetachAssetParams = { m_id?: QMIdParameter };\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetOrganisationChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The name you want to give the Product */\n name?: string;\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour =\n typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** 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 */\n limit?: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope =\n typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n GLOBAL: \"GLOBAL\",\n} as const;\n\nexport type AssetPostBodyBody = {\n /** 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 */\n name: string;\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n scope: AssetPostBodyBodyScope;\n /** 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. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n user: UserDetail;\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n}\n\nexport interface UnitDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Unit's billing day */\n billing_day: number;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind =\n typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour =\n typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType =\n typeof ProductDetailType[keyof typeof ProductDetailType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** 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 */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** 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. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */\n billing_prediction: number;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n}\n\nexport interface ChargeAdditionalData {\n [key: string]: any;\n}\n\nexport interface StorageChargeItem {\n item_number: number;\n /** The date and time of the processing charge */\n date: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind =\n typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\n /** The date when the process stopped */\n closed?: string;\n /** 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. */\n final: boolean;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport type AssetDetailScope =\n typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n GLOBAL: \"GLOBAL\",\n} as const;\n\nexport interface AssetDetail {\n creator: string;\n id: string;\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n disabled: boolean;\n content: string;\n created: string;\n content_modified?: string;\n description?: string;\n merchants: MerchantDetail[];\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType =\n typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: \"PROCESSING\",\n STORAGE: \"STORAGE\",\n} as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType =\n typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n billing_day: number;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n organisation_id: string;\n name: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member: boolean;\n /** The Default Organisation ID\n */\n id: string;\n /** The Default Organisation Name\n */\n name: string;\n /** 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\n */\n private: boolean;\n created: string;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n summary: ChargeSummary[];\n organisation_charges: OrganisationChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n"]}
1
+ {"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AA+JO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCACE;AAAA,EACF,mCAAmC;AACrC;AAkDO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA6DO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA2CO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAUO,IAAM,oBAAoB;AAAA,EAC/B,wCACE;AAAA,EACF,mCAAmC;AACrC;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.12.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nexport type DetachAssetParams = {\n /**\n * A Merchant Identity\n */\n m_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n /**\n * A Merchant Identity\n */\n m_id?: QMIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetOrganisationChargesParams = {\n /**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n /**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\n pbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n /**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\n pbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\nexport type GetAssetParams = {\n /**\n * A User Identity\n */\n user_id?: QUserIdParameter;\n /**\n * A Product Identity\n */\n product_id?: QProductIdParameter;\n /**\n * A Unit Identity\n */\n unit_id?: QUnitIdParameter;\n /**\n * An Organisation Identity\n */\n org_id?: QOrgIdParameter;\n};\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetUnitChargesParams = {\n /**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\n pbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The name you want to give the Product */\n name?: string;\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour =\n (typeof UnitProductPostBodyBodyFlavour)[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n (typeof UnitProductPostBodyBodyType)[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** 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 */\n limit?: number;\n};\n\nexport type UnitPatchBodyBody = {\n /** The new name for the Unit */\n name?: string;\n};\n\nexport type OrganisationPatchBodyBody = {\n /** The new name for the Organisational */\n name?: string;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope =\n (typeof AssetPostBodyBodyScope)[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n GLOBAL: \"GLOBAL\",\n} as const;\n\nexport type AssetPostBodyBody = {\n /** 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 */\n name: string;\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n scope: AssetPostBodyBodyScope;\n /** 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. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n user: UserDetail;\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n}\n\nexport interface UnitDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Unit's billing day */\n billing_day: number;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind =\n (typeof MerchantDetailKind)[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n (typeof ProductTypeServiceKind)[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour =\n (typeof ProductDetailFlavour)[keyof typeof ProductDetailFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType =\n (typeof ProductDetailType)[keyof typeof ProductDetailType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** 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 */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** 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. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */\n billing_prediction: number;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n}\n\nexport interface ChargeAdditionalData {\n [key: string]: any;\n}\n\nexport interface StorageChargeItem {\n item_number: number;\n /** The date and time of the processing charge */\n date: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind =\n (typeof ProcessingChargesMerchantKind)[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\n /** The date when the process stopped */\n closed?: string;\n /** 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. */\n final: boolean;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport type AssetDetailScope =\n (typeof AssetDetailScope)[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n GLOBAL: \"GLOBAL\",\n} as const;\n\nexport interface AssetDetail {\n creator: string;\n id: string;\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n disabled: boolean;\n content: string;\n created: string;\n content_modified?: string;\n description?: string;\n merchants: MerchantDetail[];\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType =\n (typeof ChargeSummaryType)[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: \"PROCESSING\",\n STORAGE: \"STORAGE\",\n} as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType =\n (typeof ProductChargesGetResponseProductType)[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n billing_day: number;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n organisation_id: string;\n name: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member: boolean;\n /** The Default Organisation ID\n */\n id: string;\n /** The Default Organisation Name\n */\n name: string;\n /** 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\n */\n private: boolean;\n created: string;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n summary: ChargeSummary[];\n organisation_charges: OrganisationChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n"]}
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { az as AXIOS_INSTANCE, ay as AsError, a0 as AssetDetail, $ as AssetDetailScope, ax as AssetGetResponse, r as AssetPatchBodyBody, q as AssetPostBodyBody, p as AssetPostBodyBodyScope, aw as AssetPostResponse, A as AttachAssetParams, V as ChargeAdditionalData, a6 as ChargeSummary, a5 as ChargeSummaryType, av as ChargesGetResponse, D as DetachAssetParams, aD as ErrorType, g as GetAssetParams, c as GetChargesParams, k as GetOrganisationChargesParams, b as GetProductChargesParams, G as GetUnitChargesParams, v as MerchantDetail, M as MerchantDetailKind, w as MerchantGetResponse, x as MerchantsGetResponse, ao as OrganisationChargeSummary, am as OrganisationChargesGetResponse, y as OrganisationDetail, ar as OrganisationGetDefaultResponse, aj as OrganisationGetResponse, o as OrganisationPostBodyBody, at as OrganisationPostResponse, al as OrganisationUnitChargeSummary, O as OrganisationUnitPostBodyBody, aq as OrganisationUnitPostResponse, an as OrganisationUnitsGetResponse, ak as OrganisationsGetResponse, n as PersonalUnitPutBodyBody, ap as PersonalUnitPutResponse, Y as ProcessingChargeItem, _ as ProcessingCharges, Z as ProcessingChargesMerchantKind, ai as ProductChargesGetResponse, ah as ProductChargesGetResponseProductType, K as ProductClaimDetail, J as ProductCoinsDetail, I as ProductDetail, F as ProductDetailFlavour, H as ProductDetailType, S as ProductDmProjectTier, T as ProductDmStorage, R as ProductDmStorageDetail, L as ProductDmStorageDetailCoins, N as ProductDmStorageDetailSize, E as ProductInstanceDetail, C as ProductInstanceDetailCoins, P as ProductPatchBodyBody, B as ProductType, z as ProductTypeServiceKind, ab as ProductUnitGetResponse, aa as ProductUnitGetResponseProduct, ae as ProductsGetDefaultStorageCost, ad as ProductsGetDefaultStorageCostDefaultStorageCost, ag as ProductsGetResponse, af as ProductsGetResponseProductsItem, ac as ProductsGetTypesResponse, a as QFromParameter, h as QMIdParameter, i as QOrgIdParameter, j as QPbpParameter, e as QProductIdParameter, f as QUnitIdParameter, Q as QUntilParameter, d as QUserIdParameter, au as StateGetVersionResponse, W as StorageChargeItem, X as StorageCharges, a8 as UnitChargeSummary, a9 as UnitChargesGetResponse, u as UnitDetail, a3 as UnitGetResponse, a7 as UnitProductChargeSummary, m as UnitProductPostBodyBody, U as UnitProductPostBodyBodyFlavour, l as UnitProductPostBodyBodyType, a4 as UnitProductPostResponse, a2 as UnitsGetResponse, t as UserAccountDetail, a1 as UserAccountGetResponse, s as UserDetail, as as UsersGetResponse, aC as customInstance, aA as setAuthToken, aB as setBaseUrl } from './custom-instance-dad9d28e.js';
1
+ export { aB as AXIOS_INSTANCE, aA as AsError, a2 as AssetDetail, a1 as AssetDetailScope, az as AssetGetResponse, t as AssetPatchBodyBody, s as AssetPostBodyBody, r as AssetPostBodyBodyScope, ay as AssetPostResponse, A as AttachAssetParams, X as ChargeAdditionalData, a8 as ChargeSummary, a7 as ChargeSummaryType, ax as ChargesGetResponse, D as DetachAssetParams, aF as ErrorType, g as GetAssetParams, c as GetChargesParams, G as GetOrganisationChargesParams, b as GetProductChargesParams, k as GetUnitChargesParams, x as MerchantDetail, M as MerchantDetailKind, y as MerchantGetResponse, z as MerchantsGetResponse, aq as OrganisationChargeSummary, ao as OrganisationChargesGetResponse, B as OrganisationDetail, at as OrganisationGetDefaultResponse, al as OrganisationGetResponse, O as OrganisationPatchBodyBody, q as OrganisationPostBodyBody, av as OrganisationPostResponse, an as OrganisationUnitChargeSummary, o as OrganisationUnitPostBodyBody, as as OrganisationUnitPostResponse, ap as OrganisationUnitsGetResponse, am as OrganisationsGetResponse, p as PersonalUnitPutBodyBody, ar as PersonalUnitPutResponse, _ as ProcessingChargeItem, a0 as ProcessingCharges, $ as ProcessingChargesMerchantKind, ak as ProductChargesGetResponse, aj as ProductChargesGetResponseProductType, N as ProductClaimDetail, L as ProductCoinsDetail, K as ProductDetail, I as ProductDetailFlavour, J as ProductDetailType, V as ProductDmProjectTier, W as ProductDmStorage, T as ProductDmStorageDetail, R as ProductDmStorageDetailCoins, S as ProductDmStorageDetailSize, H as ProductInstanceDetail, F as ProductInstanceDetailCoins, P as ProductPatchBodyBody, E as ProductType, C as ProductTypeServiceKind, ad as ProductUnitGetResponse, ac as ProductUnitGetResponseProduct, ag as ProductsGetDefaultStorageCost, af as ProductsGetDefaultStorageCostDefaultStorageCost, ai as ProductsGetResponse, ah as ProductsGetResponseProductsItem, ae as ProductsGetTypesResponse, a as QFromParameter, h as QMIdParameter, i as QOrgIdParameter, j as QPbpParameter, e as QProductIdParameter, f as QUnitIdParameter, Q as QUntilParameter, d as QUserIdParameter, aw as StateGetVersionResponse, Y as StorageChargeItem, Z as StorageCharges, aa as UnitChargeSummary, ab as UnitChargesGetResponse, w as UnitDetail, a5 as UnitGetResponse, n as UnitPatchBodyBody, a9 as UnitProductChargeSummary, m as UnitProductPostBodyBody, U as UnitProductPostBodyBodyFlavour, l as UnitProductPostBodyBodyType, a6 as UnitProductPostResponse, a4 as UnitsGetResponse, v as UserAccountDetail, a3 as UserAccountGetResponse, u as UserDetail, au as UsersGetResponse, aE as customInstance, aC as setAuthToken, aD as setBaseUrl } from './custom-instance-85497958.js';
2
2
  import 'axios';
package/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  customInstance,
4
4
  setAuthToken,
5
5
  setBaseUrl
6
- } from "./chunk-3O5KIRV4.js";
6
+ } from "./chunk-3RNIDX7T.js";
7
7
 
8
8
  // src/account-server-api.schemas.ts
9
9
  var UnitProductPostBodyBodyFlavour = {