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