@squonk/account-server-client 2.1.0-rc.7 → 2.1.0-rc.9

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 (78) hide show
  1. package/admin/admin.cjs +19 -4
  2. package/admin/admin.cjs.map +1 -1
  3. package/admin/admin.d.cts +23 -6
  4. package/admin/admin.d.ts +23 -6
  5. package/admin/admin.js +19 -4
  6. package/admin/admin.js.map +1 -1
  7. package/asset/asset.cjs +33 -18
  8. package/asset/asset.cjs.map +1 -1
  9. package/asset/asset.d.cts +31 -14
  10. package/asset/asset.d.ts +31 -14
  11. package/asset/asset.js +25 -10
  12. package/asset/asset.js.map +1 -1
  13. package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
  14. package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
  15. package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
  16. package/chunk-TKLTUR4R.cjs.map +1 -0
  17. package/event-stream/event-stream.cjs +39 -10
  18. package/event-stream/event-stream.cjs.map +1 -1
  19. package/event-stream/event-stream.d.cts +50 -16
  20. package/event-stream/event-stream.d.ts +50 -16
  21. package/event-stream/event-stream.js +36 -7
  22. package/event-stream/event-stream.js.map +1 -1
  23. package/index.cjs +2 -2
  24. package/index.cjs.map +1 -1
  25. package/index.d.cts +700 -2
  26. package/index.d.ts +700 -2
  27. package/index.js +1 -1
  28. package/index.js.map +1 -1
  29. package/merchant/merchant.cjs +35 -6
  30. package/merchant/merchant.cjs.map +1 -1
  31. package/merchant/merchant.d.cts +42 -8
  32. package/merchant/merchant.d.ts +42 -8
  33. package/merchant/merchant.js +34 -5
  34. package/merchant/merchant.js.map +1 -1
  35. package/organisation/organisation.cjs +73 -16
  36. package/organisation/organisation.cjs.map +1 -1
  37. package/organisation/organisation.d.cts +84 -16
  38. package/organisation/organisation.d.ts +84 -16
  39. package/organisation/organisation.js +66 -9
  40. package/organisation/organisation.js.map +1 -1
  41. package/package.json +10 -10
  42. package/product/product.cjs +121 -22
  43. package/product/product.cjs.map +1 -1
  44. package/product/product.d.cts +141 -22
  45. package/product/product.d.ts +141 -22
  46. package/product/product.js +111 -12
  47. package/product/product.js.map +1 -1
  48. package/src/account-server-api.schemas.ts +1 -1
  49. package/src/admin/admin.ts +50 -14
  50. package/src/asset/asset.ts +57 -35
  51. package/src/custom-instance.ts +3 -4
  52. package/src/event-stream/event-stream.ts +99 -28
  53. package/src/merchant/merchant.ts +93 -18
  54. package/src/organisation/organisation.ts +184 -35
  55. package/src/product/product.ts +313 -47
  56. package/src/state/state.ts +50 -14
  57. package/src/unit/unit.ts +190 -45
  58. package/src/user/user.ts +140 -34
  59. package/state/state.cjs +19 -4
  60. package/state/state.cjs.map +1 -1
  61. package/state/state.d.cts +23 -6
  62. package/state/state.d.ts +23 -6
  63. package/state/state.js +19 -4
  64. package/state/state.js.map +1 -1
  65. package/unit/unit.cjs +77 -20
  66. package/unit/unit.cjs.map +1 -1
  67. package/unit/unit.d.cts +91 -23
  68. package/unit/unit.d.ts +91 -23
  69. package/unit/unit.js +68 -11
  70. package/unit/unit.js.map +1 -1
  71. package/user/user.cjs +59 -16
  72. package/user/user.cjs.map +1 -1
  73. package/user/user.d.cts +66 -15
  74. package/user/user.d.ts +66 -15
  75. package/user/user.js +53 -10
  76. package/user/user.js.map +1 -1
  77. package/chunk-J22A7LHX.cjs.map +0 -1
  78. package/custom-instance-6780910b.d.ts +0 -700
@@ -1,700 +0,0 @@
1
- import * as axios from 'axios';
2
- import { AxiosRequestConfig, AxiosError } from 'axios';
3
-
4
- /**
5
- * Generated by orval v6.20.0 🍺
6
- * Do not edit manually.
7
- * Account Server API
8
- * The Informatics Matters Account Server API.
9
-
10
- A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
11
-
12
- * OpenAPI spec version: 2.1
13
- */
14
- type DetachAssetParams = {
15
- /**
16
- * A Merchant Identity
17
- */
18
- m_id?: QMIdParameter;
19
- };
20
- type AttachAssetParams = {
21
- /**
22
- * A Merchant Identity
23
- */
24
- m_id?: QMIdParameter;
25
- };
26
- /**
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
28
- */
29
- type QUntilParameter = string;
30
- /**
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
32
- */
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
- */
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
- */
42
- until?: QUntilParameter;
43
- /**
44
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
45
- */
46
- pbp?: QPbpParameter;
47
- };
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
- */
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
- */
56
- until?: QUntilParameter;
57
- /**
58
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
59
- */
60
- pbp?: QPbpParameter;
61
- };
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
- */
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
- */
70
- until?: QUntilParameter;
71
- /**
72
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
73
- */
74
- pbp?: QPbpParameter;
75
- };
76
- /**
77
- * A User Identity
78
- */
79
- type QUserIdParameter = string;
80
- /**
81
- * A Product Identity
82
- */
83
- type QProductIdParameter = string;
84
- /**
85
- * A Unit Identity
86
- */
87
- type QUnitIdParameter = string;
88
- type GetAssetParams = {
89
- /**
90
- * A User Identity
91
- */
92
- user_id?: QUserIdParameter;
93
- /**
94
- * A Product Identity
95
- */
96
- product_id?: QProductIdParameter;
97
- /**
98
- * A Unit Identity
99
- */
100
- unit_id?: QUnitIdParameter;
101
- /**
102
- * An Organisation Identity
103
- */
104
- org_id?: QOrgIdParameter;
105
- };
106
- /**
107
- * A Merchant Identity
108
- */
109
- type QMIdParameter = number;
110
- /**
111
- * An Organisation Identity
112
- */
113
- type QOrgIdParameter = string;
114
- /**
115
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
116
- */
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
- */
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
- */
126
- until?: QUntilParameter;
127
- /**
128
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
129
- */
130
- pbp?: QPbpParameter;
131
- };
132
- type ProductPatchBodyBody = {
133
- /** The Product's built-in coin allowance. Product allowances cannot be reduced */
134
- allowance?: number;
135
- /** 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 */
136
- limit?: number;
137
- /** The name you want to give the Product */
138
- name?: string;
139
- };
140
- /**
141
- * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
142
-
143
- Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
144
- */
145
- type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];
146
- declare const UnitProductPostBodyBodyType: {
147
- readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
148
- readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
149
- };
150
- /**
151
- * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products
152
- */
153
- type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];
154
- declare const UnitProductPostBodyBodyFlavour: {
155
- readonly EVALUATION: "EVALUATION";
156
- readonly BRONZE: "BRONZE";
157
- readonly SILVER: "SILVER";
158
- readonly GOLD: "GOLD";
159
- };
160
- type UnitProductPostBodyBody = {
161
- /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */
162
- allowance?: number;
163
- /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */
164
- flavour?: UnitProductPostBodyBodyFlavour;
165
- /** 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 */
166
- limit?: number;
167
- /** The name you want to give the Product */
168
- name: string;
169
- /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
170
-
171
- Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
172
- type: UnitProductPostBodyBodyType;
173
- };
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 = {
183
- /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
184
- billing_day: number;
185
- /** The name of the unit */
186
- name: string;
187
- };
188
- type PersonalUnitPutBodyBody = {
189
- /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */
190
- billing_day: number;
191
- };
192
- type OrganisationPostBodyBody = {
193
- /** The name of the organisation */
194
- name: string;
195
- /** The name of the organisation owner. A user ID */
196
- owner: string;
197
- };
198
- type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];
199
- declare const AssetPostBodyBodyScope: {
200
- readonly USER: "USER";
201
- readonly PRODUCT: "PRODUCT";
202
- readonly UNIT: "UNIT";
203
- readonly ORGANISATION: "ORGANISATION";
204
- readonly GLOBAL: "GLOBAL";
205
- };
206
- type AssetPostBodyBody = {
207
- /** A file containing the content for the asset. You must provide a value here or in content_string */
208
- content_file?: Blob;
209
- /** The textual content of the asset. You must provide a value here or in content_file */
210
- content_string?: string;
211
- /** An optional description for the Asset */
212
- description?: string;
213
- /** 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 */
214
- name: string;
215
- scope: AssetPostBodyBodyScope;
216
- /** 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. */
217
- scope_id?: string;
218
- /** Is this a secret asset? */
219
- secret: boolean;
220
- };
221
- type AssetPatchBodyBody = {
222
- /** A file containing the content for the asset. You must provide a value here or in content_string */
223
- content_file?: Blob;
224
- /** The textual content of the asset. You must provide a value here or in content_file */
225
- content_string?: string;
226
- /** An optional description for the Asset */
227
- description?: string;
228
- };
229
- interface UserDetail {
230
- /** The user identity (username) */
231
- id: string;
232
- }
233
- interface UserAccountDetail {
234
- /** The roles assigned to the user recognised by the Account Server */
235
- account_server_roles: string[];
236
- /** Whether the caller has admin privilege */
237
- caller_has_admin_privilege: boolean;
238
- user: UserDetail;
239
- }
240
- interface UnitDetail {
241
- /** The Unit's billing day */
242
- billing_day: number;
243
- /** Whether the user making the API call is a member of the Unit */
244
- caller_is_member: boolean;
245
- created: string;
246
- /** The Unit's unique identity */
247
- id: string;
248
- /** The Unit's name */
249
- name: string;
250
- /** The Unit's owner (a username) */
251
- owner_id: string;
252
- /** True if the Unit is private */
253
- private: boolean;
254
- }
255
- /**
256
- * The kind of Service
257
- */
258
- type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];
259
- declare const MerchantDetailKind: {
260
- readonly DATA_MANAGER: "DATA_MANAGER";
261
- };
262
- interface MerchantDetail {
263
- /** The hostname used by the Service */
264
- api_hostname: string;
265
- created: string;
266
- /** The unique ID of the Service */
267
- id: number;
268
- /** The kind of Service */
269
- kind: MerchantDetailKind;
270
- /** The name assigned to the Service */
271
- name: string;
272
- }
273
- type MerchantGetResponse = MerchantDetail;
274
- interface MerchantsGetResponse {
275
- /** The list of known Merchants
276
- */
277
- merchants: MerchantDetail[];
278
- }
279
- interface OrganisationDetail {
280
- /** Whether the user making the API call is a member of the Unit */
281
- caller_is_member: boolean;
282
- created: string;
283
- /** The Organisation's unique ID */
284
- id: string;
285
- /** The Organisation's name */
286
- name: string;
287
- /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */
288
- owner_id?: string;
289
- /** True if the Unit is private */
290
- private: boolean;
291
- }
292
- /**
293
- * The kind of service that can use the Product
294
- */
295
- type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];
296
- declare const ProductTypeServiceKind: {
297
- readonly DATA_MANAGER: "DATA_MANAGER";
298
- };
299
- interface ProductType {
300
- /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */
301
- flavour?: string;
302
- /** The kind of service that can use the Product */
303
- service_kind?: ProductTypeServiceKind;
304
- /** A product type, this is a unique string amongst all types known to the Account Server */
305
- type: string;
306
- }
307
- type ProductInstanceDetailCoins = {
308
- /** The number of coins used
309
- */
310
- used: number;
311
- };
312
- interface ProductInstanceDetail {
313
- coins: ProductInstanceDetailCoins;
314
- }
315
- /**
316
- * The Product Type
317
-
318
- */
319
- type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];
320
- declare const ProductDetailType: {
321
- readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
322
- readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
323
- };
324
- /**
325
- * The Product Type flavour. Not all products have flavours
326
-
327
- */
328
- type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
329
- declare const ProductDetailFlavour: {
330
- readonly EVALUATION: "EVALUATION";
331
- readonly BRONZE: "BRONZE";
332
- readonly SILVER: "SILVER";
333
- readonly GOLD: "GOLD";
334
- };
335
- interface ProductDetail {
336
- created: string;
337
- /** The Product Type flavour. Not all products have flavours
338
- */
339
- flavour?: ProductDetailFlavour;
340
- /** The Product ID
341
- */
342
- id: string;
343
- /** The name of the Product
344
- */
345
- name?: string;
346
- /** The Product Type
347
- */
348
- type: ProductDetailType;
349
- }
350
- interface ProductCoinsDetail {
351
- /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */
352
- allowance: number;
353
- /** A multiplier applied to your coin usage within your allowance */
354
- allowance_multiplier: number;
355
- /** 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. */
356
- at_limit: boolean;
357
- /** The day of the month when the bill is due, and the end of the current billing period */
358
- billing_day: number;
359
- /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */
360
- billing_prediction: number;
361
- /** The current burn rate, the approximate amount of coins you are currently consuming each day */
362
- current_burn_rate: number;
363
- /** 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 */
364
- limit: number;
365
- /** A multiplier that will be applied to coin used beyond your allowance */
366
- overspend_multiplier: number;
367
- /** The number of days remaining, in the current billing period */
368
- remaining_days: number;
369
- /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */
370
- used: number;
371
- }
372
- interface ProductClaimDetail {
373
- /** The service-specific ID that is using this Subscription
374
- */
375
- id: string;
376
- /** A name for the service-specific ID
377
- */
378
- name?: string;
379
- }
380
- type ProductDmStorageDetailSize = {
381
- /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */
382
- current: string;
383
- /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */
384
- peak: string;
385
- /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */
386
- unit_size: string;
387
- /** The peak number of storage units used today */
388
- units_used: number;
389
- };
390
- type ProductDmStorageDetailCoins = {
391
- /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */
392
- unit_cost: number;
393
- /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */
394
- used: number;
395
- };
396
- interface ProductDmStorageDetail {
397
- coins: ProductDmStorageDetailCoins;
398
- size: ProductDmStorageDetailSize;
399
- }
400
- interface ProductDmProjectTier {
401
- claim?: ProductClaimDetail;
402
- /** True if the product can be (needs to be) claimed. */
403
- claimable: boolean;
404
- coins: ProductCoinsDetail;
405
- instance: ProductInstanceDetail;
406
- organisation: OrganisationDetail;
407
- product: ProductDetail;
408
- storage: ProductDmStorageDetail;
409
- unit: UnitDetail;
410
- }
411
- interface ProductDmStorage {
412
- /** True if the product can be (needs to be) claimed. */
413
- claimable: boolean;
414
- coins: ProductCoinsDetail;
415
- organisation: OrganisationDetail;
416
- product: ProductDetail;
417
- storage: ProductDmStorageDetail;
418
- unit: UnitDetail;
419
- }
420
- interface ChargeAdditionalData {
421
- [key: string]: any;
422
- }
423
- interface StorageChargeItem {
424
- additional_data?: ChargeAdditionalData;
425
- /** The date when the charges concluded */
426
- closed?: string;
427
- /** The coin-cost of the storage */
428
- coins: string;
429
- /** The date and time of the processing charge */
430
- date: string;
431
- item_number: number;
432
- }
433
- interface StorageCharges {
434
- items: StorageChargeItem[];
435
- num_items: number;
436
- }
437
- interface ProcessingChargeItem {
438
- additional_data?: ChargeAdditionalData;
439
- /** The coin-cost of the storage */
440
- coins: string;
441
- /** The charge record number */
442
- id: number;
443
- name?: string;
444
- /** The most recent sequence number for this charge */
445
- sqn: number;
446
- /** The date and time of the processing charge */
447
- timestamp: string;
448
- username: string;
449
- }
450
- type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];
451
- declare const ProcessingChargesMerchantKind: {
452
- readonly DATA_MANAGER: "DATA_MANAGER";
453
- };
454
- interface ProcessingCharges {
455
- charge: ProcessingChargeItem;
456
- /** The date when the process stopped */
457
- closed?: string;
458
- /** 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. */
459
- final: boolean;
460
- merchant_api_hostname: string;
461
- merchant_kind: ProcessingChargesMerchantKind;
462
- merchant_name: string;
463
- /** True if charges were received after the charge record was finalised */
464
- post_final_charges?: boolean;
465
- }
466
- type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];
467
- declare const AssetDetailScope: {
468
- readonly USER: "USER";
469
- readonly PRODUCT: "PRODUCT";
470
- readonly UNIT: "UNIT";
471
- readonly ORGANISATION: "ORGANISATION";
472
- readonly GLOBAL: "GLOBAL";
473
- };
474
- interface AssetDetail {
475
- content: string;
476
- content_modified?: string;
477
- created: string;
478
- creator: string;
479
- description?: string;
480
- disabled: boolean;
481
- id: string;
482
- merchants: MerchantDetail[];
483
- name: string;
484
- scope: AssetDetailScope;
485
- scope_id: string;
486
- secret: boolean;
487
- }
488
- type UserAccountGetResponse = UserAccountDetail;
489
- interface UnitsGetResponse {
490
- /** A list of Units
491
- */
492
- units: OrganisationUnitsGetResponse[];
493
- }
494
- type UnitGetResponse = UnitDetail;
495
- interface UnitProductPostResponse {
496
- /** The Product's unique ID */
497
- id: string;
498
- }
499
- /**
500
- * The type of charge
501
- */
502
- type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];
503
- declare const ChargeSummaryType: {
504
- readonly PROCESSING: "PROCESSING";
505
- readonly STORAGE: "STORAGE";
506
- };
507
- interface ChargeSummary {
508
- /** The cost, in coins of the charge */
509
- coins: string;
510
- /** The type of charge */
511
- type: ChargeSummaryType;
512
- }
513
- interface UnitProductChargeSummary {
514
- charges: ChargeSummary[];
515
- product_id: string;
516
- product_type: string;
517
- }
518
- interface UnitChargeSummary {
519
- charges: ChargeSummary[];
520
- }
521
- interface UnitChargesGetResponse {
522
- billing_day: number;
523
- /** Whether the user making the API call is a member of the Unit */
524
- caller_is_member: boolean;
525
- coins: string;
526
- created: string;
527
- /** The start of the charge period */
528
- from: string;
529
- name?: string;
530
- /** The Unit's owner (a username) */
531
- owner_id: string;
532
- /** True if the Unit is private */
533
- private: boolean;
534
- products: UnitProductChargeSummary[];
535
- summary: UnitChargeSummary;
536
- unit_id: string;
537
- /** The date where of first day after the charge period */
538
- until: string;
539
- }
540
- /**
541
- * The Unit's Product
542
- */
543
- type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;
544
- interface ProductUnitGetResponse {
545
- /** The Unit's Product */
546
- product: ProductUnitGetResponseProduct;
547
- }
548
- interface ProductsGetTypesResponse {
549
- /** All the Product Types you have access to */
550
- product_types: ProductType[];
551
- }
552
- type ProductsGetDefaultStorageCostDefaultStorageCost = {
553
- cost: string;
554
- description: string;
555
- units: string;
556
- };
557
- interface ProductsGetDefaultStorageCost {
558
- default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;
559
- }
560
- type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;
561
- interface ProductsGetResponse {
562
- /** All the Products you have access to */
563
- products: ProductsGetResponseProductsItem[];
564
- }
565
- type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];
566
- declare const ProductChargesGetResponseProductType: {
567
- readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
568
- readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
569
- };
570
- interface ProductChargesGetResponse {
571
- billing_day: number;
572
- claim?: ProductClaimDetail;
573
- /** True if the product can be (needs to be) claimed. */
574
- claimable: boolean;
575
- /** The total number of coins consumed by this product for the invoice period */
576
- coins: string;
577
- /** The start of the charge period */
578
- from: string;
579
- processing_charges: ProcessingCharges[];
580
- product_id: string;
581
- product_type: ProductChargesGetResponseProductType;
582
- storage_charges: StorageCharges;
583
- /** The date where of first day after the charge period */
584
- until: string;
585
- }
586
- type OrganisationGetResponse = OrganisationDetail;
587
- interface OrganisationsGetResponse {
588
- /** A list of Organisations */
589
- organisations: OrganisationDetail[];
590
- }
591
- interface OrganisationUnitChargeSummary {
592
- billing_day: number;
593
- /** The start of the charge period */
594
- from: string;
595
- name: string;
596
- summary: ChargeSummary[];
597
- unit_id: string;
598
- /** The date where of first day after the charge period */
599
- until: string;
600
- }
601
- interface OrganisationChargesGetResponse {
602
- coins: string;
603
- name: string;
604
- organisation_id: string;
605
- summary: ChargeSummary[];
606
- unit_charges: OrganisationUnitChargeSummary[];
607
- }
608
- interface OrganisationUnitsGetResponse {
609
- organisation: OrganisationDetail;
610
- /** A list of Units
611
- */
612
- units: UnitDetail[];
613
- }
614
- interface OrganisationChargeSummary {
615
- name: string;
616
- organisation_id: string;
617
- summary: ChargeSummary[];
618
- }
619
- interface PersonalUnitPutResponse {
620
- /** The unit's unique ID */
621
- id: string;
622
- /** The unit's Organisation. Used to identify the Default organisation */
623
- organisation_id: string;
624
- }
625
- interface OrganisationUnitPostResponse {
626
- /** The unit's unique ID */
627
- id: string;
628
- }
629
- interface OrganisationGetDefaultResponse {
630
- /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */
631
- caller_is_member?: boolean;
632
- created?: string;
633
- /** The Default Organisation ID
634
- */
635
- id?: string;
636
- /** The Default Organisation Name
637
- */
638
- name?: string;
639
- /** 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
640
- */
641
- private?: boolean;
642
- }
643
- interface UsersGetResponse {
644
- organisation?: OrganisationDetail;
645
- unit?: UnitDetail;
646
- /** The list of Organisation Users
647
- */
648
- users: UserDetail[];
649
- }
650
- interface OrganisationPostResponse {
651
- /** The Organisation's unique ID */
652
- id: string;
653
- }
654
- interface StateGetVersionResponse {
655
- /** 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
656
- */
657
- version: string;
658
- }
659
- interface EventStreamGetPostResponse {
660
- /** The EventStream ID */
661
- id: number;
662
- /** The EventStream read token, required to read from the stream */
663
- read_token: string;
664
- }
665
- interface ChargesGetResponse {
666
- coins: string;
667
- organisation_charges: OrganisationChargeSummary[];
668
- summary: ChargeSummary[];
669
- }
670
- interface AssetPostResponse {
671
- /** The Asset ID
672
- */
673
- id: string;
674
- }
675
- interface AssetGetResponse {
676
- /** A list of Assets
677
- */
678
- assets: AssetDetail[];
679
- }
680
- interface AsError {
681
- /** Brief error text that can be presented to the user */
682
- error: string;
683
- }
684
-
685
- declare const AXIOS_INSTANCE: axios.AxiosInstance;
686
- /**
687
- * Set the access token to be added as the `Authorization: Bearer 'token'` header
688
- * Useful for client only apps where a proxy API route isn't involved to securely add the access token
689
- * @param token access token
690
- */
691
- declare const setAuthToken: (token: string) => void;
692
- /**
693
- * Set the url to which request paths are added to.
694
- * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'
695
- */
696
- declare const setBaseUrl: (baseUrl: string) => void;
697
- declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
698
- type ErrorType<TError> = AxiosError<TError>;
699
-
700
- 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, ProductDetailType as I, ProductDetailFlavour as J, ProductDetail as K, ProductCoinsDetail as L, MerchantDetailKind as M, ProductClaimDetail as N, OrganisationPatchBodyBody as O, ProductPatchBodyBody as P, QUntilParameter as Q, ProductDmStorageDetailSize as R, ProductDmStorageDetailCoins as S, ProductDmStorageDetail as T, UnitProductPostBodyBodyType 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, AssetGetResponse as aA, AsError as aB, AXIOS_INSTANCE as aC, setAuthToken as aD, setBaseUrl as aE, customInstance as aF, ErrorType as aG, 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, EventStreamGetPostResponse as ax, ChargesGetResponse as ay, AssetPostResponse 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, UnitProductPostBodyBodyFlavour 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 };