@squonk/account-server-client 0.1.37-rc.1 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs +39 -14
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.ts +1 -1
- package/asset/asset.js +39 -14
- package/asset/asset.js.map +1 -1
- package/chunk-3O5KIRV4.js +27 -0
- package/{chunk-3TENYKS7.js.map → chunk-3O5KIRV4.js.map} +1 -1
- package/chunk-IUEU2LYC.cjs +27 -0
- package/chunk-IUEU2LYC.cjs.map +1 -0
- package/{custom-instance-323ee59a.d.ts → custom-instance-b8075093.d.ts} +91 -14
- package/index.cjs +11 -2
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +10 -1
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +14 -5
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.ts +1 -1
- package/merchant/merchant.js +14 -5
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +22 -10
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.ts +1 -1
- package/organisation/organisation.js +22 -10
- package/organisation/organisation.js.map +1 -1
- package/package.json +5 -5
- package/product/product.cjs +75 -26
- package/product/product.cjs.map +1 -1
- package/product/product.d.ts +22 -2
- package/product/product.js +74 -25
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +108 -13
- package/src/asset/asset.ts +1 -1
- package/src/merchant/merchant.ts +1 -1
- package/src/organisation/organisation.ts +1 -1
- package/src/product/product.ts +73 -1
- package/src/state/state.ts +1 -1
- package/src/unit/unit.ts +3 -3
- package/src/user/user.ts +3 -3
- package/state/state.cjs +10 -3
- package/state/state.cjs.map +1 -1
- package/state/state.d.ts +1 -1
- package/state/state.js +10 -3
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +42 -17
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.ts +3 -3
- package/unit/unit.js +41 -16
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +34 -13
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +3 -3
- package/user/user.js +34 -13
- package/user/user.js.map +1 -1
- package/chunk-3TENYKS7.js +0 -46
- package/chunk-RHHRF25R.cjs +0 -46
- package/chunk-RHHRF25R.cjs.map +0 -1
|
@@ -9,14 +9,23 @@ import { AxiosRequestConfig, AxiosError } from 'axios';
|
|
|
9
9
|
|
|
10
10
|
A service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.
|
|
11
11
|
|
|
12
|
-
* OpenAPI spec version: 0
|
|
12
|
+
* OpenAPI spec version: 1.0
|
|
13
13
|
*/
|
|
14
|
-
declare type DetachAssetParams = {
|
|
15
|
-
m_id?: QMIdParameter;
|
|
16
|
-
};
|
|
17
14
|
declare type AttachAssetParams = {
|
|
18
15
|
m_id?: QMIdParameter;
|
|
19
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* 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
|
+
*/
|
|
20
|
+
declare type QUntilParameter = string;
|
|
21
|
+
/**
|
|
22
|
+
* 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
|
+
*/
|
|
24
|
+
declare type QFromParameter = string;
|
|
25
|
+
declare type GetProductChargesParams = {
|
|
26
|
+
from?: QFromParameter;
|
|
27
|
+
until?: QUntilParameter;
|
|
28
|
+
};
|
|
20
29
|
/**
|
|
21
30
|
* A User Identity
|
|
22
31
|
*/
|
|
@@ -39,6 +48,9 @@ declare type GetAssetParams = {
|
|
|
39
48
|
* A Merchant Identity
|
|
40
49
|
*/
|
|
41
50
|
declare type QMIdParameter = number;
|
|
51
|
+
declare type DetachAssetParams = {
|
|
52
|
+
m_id?: QMIdParameter;
|
|
53
|
+
};
|
|
42
54
|
/**
|
|
43
55
|
* An Organisation Identity
|
|
44
56
|
*/
|
|
@@ -112,7 +124,7 @@ declare type AssetPostBodyBody = {
|
|
|
112
124
|
/** The textual content of the asset. You must provide a value here or in content_file */
|
|
113
125
|
content_string?: string;
|
|
114
126
|
scope: AssetPostBodyBodyScope;
|
|
115
|
-
/** The unique identity based on the Scope of the asset. For example, this
|
|
127
|
+
/** 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 */
|
|
116
128
|
scope_id?: string;
|
|
117
129
|
/** Is this a secret asset? */
|
|
118
130
|
secret: boolean;
|
|
@@ -139,6 +151,7 @@ interface UnitDetail {
|
|
|
139
151
|
owner_id: string;
|
|
140
152
|
/** True if the Unit is private */
|
|
141
153
|
private: boolean;
|
|
154
|
+
created: string;
|
|
142
155
|
}
|
|
143
156
|
/**
|
|
144
157
|
* The kind of Service
|
|
@@ -150,6 +163,7 @@ declare const MerchantDetailKind: {
|
|
|
150
163
|
interface MerchantDetail {
|
|
151
164
|
/** The unique ID of the Service */
|
|
152
165
|
id: number;
|
|
166
|
+
created: string;
|
|
153
167
|
/** The kind of Service */
|
|
154
168
|
kind: MerchantDetailKind;
|
|
155
169
|
/** The name assigned to the Service */
|
|
@@ -174,6 +188,7 @@ interface OrganisationDetail {
|
|
|
174
188
|
owner_id?: string;
|
|
175
189
|
/** True if the Unit is private */
|
|
176
190
|
private: boolean;
|
|
191
|
+
created: string;
|
|
177
192
|
}
|
|
178
193
|
/**
|
|
179
194
|
* The kind of service that can use the Product
|
|
@@ -199,7 +214,7 @@ interface ProductInstanceDetail {
|
|
|
199
214
|
coins: ProductInstanceDetailCoins;
|
|
200
215
|
}
|
|
201
216
|
/**
|
|
202
|
-
* The Product Type
|
|
217
|
+
* The Product Type flavour. Not all products have flavours
|
|
203
218
|
|
|
204
219
|
*/
|
|
205
220
|
declare type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
|
|
@@ -222,10 +237,11 @@ interface ProductDetail {
|
|
|
222
237
|
/** The Product ID
|
|
223
238
|
*/
|
|
224
239
|
id: string;
|
|
240
|
+
created: string;
|
|
225
241
|
/** The Product Type
|
|
226
242
|
*/
|
|
227
243
|
type: ProductDetailType;
|
|
228
|
-
/** The Product Type
|
|
244
|
+
/** The Product Type flavour. Not all products have flavours
|
|
229
245
|
*/
|
|
230
246
|
flavour?: ProductDetailFlavour;
|
|
231
247
|
/** The name of the Product
|
|
@@ -298,6 +314,44 @@ interface ProductDmStorage {
|
|
|
298
314
|
storage: ProductDmStorageDetail;
|
|
299
315
|
coins: ProductCoinsDetail;
|
|
300
316
|
}
|
|
317
|
+
interface ChargeAdditionalData {
|
|
318
|
+
[key: string]: any;
|
|
319
|
+
}
|
|
320
|
+
interface StorageChargeItem {
|
|
321
|
+
item_number: number;
|
|
322
|
+
/** The date and time of the processing charge */
|
|
323
|
+
date: string;
|
|
324
|
+
/** The coin-cost of the storage */
|
|
325
|
+
coins: string;
|
|
326
|
+
additional_data?: ChargeAdditionalData;
|
|
327
|
+
}
|
|
328
|
+
interface StorageCharges {
|
|
329
|
+
num_items: number;
|
|
330
|
+
items: StorageChargeItem[];
|
|
331
|
+
}
|
|
332
|
+
interface ProcessingChargeItem {
|
|
333
|
+
item_number: number;
|
|
334
|
+
/** The most recent sequence number for this charge */
|
|
335
|
+
sqn: number;
|
|
336
|
+
name?: string;
|
|
337
|
+
username: string;
|
|
338
|
+
/** The date and time of the processing charge */
|
|
339
|
+
timestamp: string;
|
|
340
|
+
/** The coin-cost of the storage */
|
|
341
|
+
coins: string;
|
|
342
|
+
additional_data?: ChargeAdditionalData;
|
|
343
|
+
}
|
|
344
|
+
declare type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];
|
|
345
|
+
declare const ProcessingChargesMerchantKind: {
|
|
346
|
+
readonly DATA_MANAGER: "DATA_MANAGER";
|
|
347
|
+
};
|
|
348
|
+
interface ProcessingCharges {
|
|
349
|
+
merchant_name: string;
|
|
350
|
+
merchant_kind: ProcessingChargesMerchantKind;
|
|
351
|
+
merchant_api_hostname: string;
|
|
352
|
+
num_items: number;
|
|
353
|
+
items: ProcessingChargeItem[];
|
|
354
|
+
}
|
|
301
355
|
declare type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];
|
|
302
356
|
declare const AssetDetailScope: {
|
|
303
357
|
readonly USER: "USER";
|
|
@@ -319,14 +373,9 @@ interface AssetDetail {
|
|
|
319
373
|
merchants: MerchantDetail[];
|
|
320
374
|
}
|
|
321
375
|
declare type UserAccountGetResponse = UserAccountDetail;
|
|
322
|
-
interface UnitsGetResponse {
|
|
323
|
-
/** A list of Units
|
|
324
|
-
*/
|
|
325
|
-
units: OrganisationUnitsGetResponse[];
|
|
326
|
-
}
|
|
327
376
|
declare type UnitGetResponse = UnitDetail;
|
|
328
377
|
interface UnitProductPostResponse {
|
|
329
|
-
/** The
|
|
378
|
+
/** The Product's unique ID */
|
|
330
379
|
id: string;
|
|
331
380
|
}
|
|
332
381
|
/**
|
|
@@ -346,6 +395,28 @@ interface ProductsGetResponse {
|
|
|
346
395
|
/** All the Products you have access to */
|
|
347
396
|
products: ProductsGetResponseProductsItem[];
|
|
348
397
|
}
|
|
398
|
+
declare type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];
|
|
399
|
+
declare const ProductChargesGetResponseProductType: {
|
|
400
|
+
readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
|
|
401
|
+
readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
|
|
402
|
+
};
|
|
403
|
+
interface ProductChargesGetResponse {
|
|
404
|
+
product_id: string;
|
|
405
|
+
product_type: ProductChargesGetResponseProductType;
|
|
406
|
+
billing_day: number;
|
|
407
|
+
/** The claim, if present, for claimable products */
|
|
408
|
+
claim_id?: string;
|
|
409
|
+
/** The claim name, if present, for claimable products */
|
|
410
|
+
claim_name?: string;
|
|
411
|
+
/** The start of the charge period */
|
|
412
|
+
from: string;
|
|
413
|
+
/** The date where of first day after the charge period */
|
|
414
|
+
until: string;
|
|
415
|
+
/** The total number of cons consumed by this product for the invoice period */
|
|
416
|
+
coins: string;
|
|
417
|
+
processing_charges: ProcessingCharges[];
|
|
418
|
+
storage_charges: StorageCharges;
|
|
419
|
+
}
|
|
349
420
|
interface OrganisationsGetResponse {
|
|
350
421
|
/** A list of Organisations */
|
|
351
422
|
organisations: OrganisationDetail[];
|
|
@@ -356,6 +427,11 @@ interface OrganisationUnitsGetResponse {
|
|
|
356
427
|
*/
|
|
357
428
|
units: UnitDetail[];
|
|
358
429
|
}
|
|
430
|
+
interface UnitsGetResponse {
|
|
431
|
+
/** A list of Units
|
|
432
|
+
*/
|
|
433
|
+
units: OrganisationUnitsGetResponse[];
|
|
434
|
+
}
|
|
359
435
|
interface PersonalUnitPutResponse {
|
|
360
436
|
/** The unit's Organisation. Used to identify the Default organisation */
|
|
361
437
|
organisation_id: string;
|
|
@@ -378,6 +454,7 @@ interface OrganisationGetDefaultResponse {
|
|
|
378
454
|
/** 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
|
|
379
455
|
*/
|
|
380
456
|
private: boolean;
|
|
457
|
+
created: string;
|
|
381
458
|
}
|
|
382
459
|
interface UsersGetResponse {
|
|
383
460
|
organisation?: OrganisationDetail;
|
|
@@ -425,4 +502,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
425
502
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig<any> | undefined) => Promise<TReturn>;
|
|
426
503
|
declare type ErrorType<TError> = AxiosError<TError>;
|
|
427
504
|
|
|
428
|
-
export {
|
|
505
|
+
export { ProductUnitGetResponse as $, AttachAssetParams as A, ProductCoinsDetail as B, ProductClaimDetail as C, DetachAssetParams as D, ProductDmStorageDetailCoins as E, ProductDmStorageDetailSize as F, GetProductChargesParams as G, ProductDmStorageDetail as H, ProductDmProjectTier as I, ProductDmStorage as J, ChargeAdditionalData as K, StorageCharges as L, MerchantDetailKind as M, ProcessingChargeItem as N, OrganisationUnitPostBodyBody as O, ProductPatchBodyBody as P, QUntilParameter as Q, ProcessingChargesMerchantKind as R, StorageChargeItem as S, ProcessingCharges as T, UnitProductPostBodyBodyFlavour as U, AssetDetailScope as V, AssetDetail as W, UserAccountGetResponse as X, UnitGetResponse as Y, UnitProductPostResponse as Z, ProductUnitGetResponseProduct as _, QFromParameter as a, ProductsGetTypesResponse as a0, ProductsGetResponseProductsItem as a1, ProductsGetResponse as a2, ProductChargesGetResponseProductType as a3, ProductChargesGetResponse as a4, OrganisationsGetResponse as a5, OrganisationUnitsGetResponse as a6, UnitsGetResponse as a7, PersonalUnitPutResponse as a8, OrganisationUnitPostResponse as a9, OrganisationGetDefaultResponse as aa, UsersGetResponse as ab, OrganisationPostResponse as ac, StateGetVersionResponse as ad, AssetPostResponse as ae, AssetGetResponse as af, AsError as ag, AXIOS_INSTANCE as ah, setAuthToken as ai, setBaseUrl as aj, customInstance as ak, ErrorType as al, QUserIdParameter as b, QProductIdParameter as c, QUnitIdParameter as d, GetAssetParams as e, QMIdParameter as f, QOrgIdParameter as g, UnitProductPostBodyBodyType as h, UnitProductPostBodyBody as i, OrganisationPostBodyBody as j, AssetPostBodyBodyScope as k, AssetPostBodyBody as l, UserDetail as m, UserAccountDetail as n, UnitDetail as o, MerchantDetail as p, MerchantGetResponse as q, MerchantsGetResponse as r, OrganisationDetail as s, ProductTypeServiceKind as t, ProductType as u, ProductInstanceDetailCoins as v, ProductInstanceDetail as w, ProductDetailFlavour as x, ProductDetailType as y, ProductDetail as z };
|
package/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkIUEU2LYCcjs = require('./chunk-IUEU2LYC.cjs');
|
|
7
7
|
|
|
8
8
|
// src/account-server-api.schemas.ts
|
|
9
9
|
var UnitProductPostBodyBodyFlavour = {
|
|
@@ -38,12 +38,21 @@ var ProductDetailType = {
|
|
|
38
38
|
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
|
|
39
39
|
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
|
|
40
40
|
};
|
|
41
|
+
var ProcessingChargesMerchantKind = {
|
|
42
|
+
DATA_MANAGER: "DATA_MANAGER"
|
|
43
|
+
};
|
|
41
44
|
var AssetDetailScope = {
|
|
42
45
|
USER: "USER",
|
|
43
46
|
PRODUCT: "PRODUCT",
|
|
44
47
|
UNIT: "UNIT",
|
|
45
48
|
ORGANISATION: "ORGANISATION"
|
|
46
49
|
};
|
|
50
|
+
var ProductChargesGetResponseProductType = {
|
|
51
|
+
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
|
|
52
|
+
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
|
|
47
56
|
|
|
48
57
|
|
|
49
58
|
|
|
@@ -57,5 +66,5 @@ var AssetDetailScope = {
|
|
|
57
66
|
|
|
58
67
|
|
|
59
68
|
|
|
60
|
-
exports.AXIOS_INSTANCE =
|
|
69
|
+
exports.AXIOS_INSTANCE = _chunkIUEU2LYCcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; 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;
|
|
61
70
|
//# sourceMappingURL=index.cjs.map
|
package/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AA8DO,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;AAmCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAiDO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AAyCO,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;AA8FO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB","sourcesContent":["/**\n * Generated by orval v6.9.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: 0.1\n */\nexport type DetachAssetParams = { m_id?: QMIdParameter };\n\nexport type AttachAssetParams = { m_id?: QMIdParameter };\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\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\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 /** The day you would like to be billed for the Product's subscription (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\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} 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 wil be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it wil be automatically set to your username */\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 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}\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 /** 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}\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 falvour. 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 /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type falvour. 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 claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\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} 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 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 Products's unique ID */\n id: string;\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 ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\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}\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 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":";;;;;;;;AA6EO,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;AAmCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAkDO,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;AA8HO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAcO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAuDO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.9.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: 1.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 GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\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\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 /** The day you would like to be billed for the Product's subscription (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\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} 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 */\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 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}\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 claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\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 additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n item_number: 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 num_items: number;\n items: 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} 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 description?: string;\n merchants: MerchantDetail[];\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\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 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 /** The claim, if present, for claimable products */\n claim_id?: string;\n /** The claim name, if present, for claimable products */\n claim_name?: string;\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 cons consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\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 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 {
|
|
1
|
+
export { ah as AXIOS_INSTANCE, ag as AsError, W as AssetDetail, V as AssetDetailScope, af as AssetGetResponse, l as AssetPostBodyBody, k as AssetPostBodyBodyScope, ae as AssetPostResponse, A as AttachAssetParams, K as ChargeAdditionalData, D as DetachAssetParams, al as ErrorType, e as GetAssetParams, G as GetProductChargesParams, p as MerchantDetail, M as MerchantDetailKind, q as MerchantGetResponse, r as MerchantsGetResponse, s as OrganisationDetail, aa as OrganisationGetDefaultResponse, j as OrganisationPostBodyBody, ac as OrganisationPostResponse, O as OrganisationUnitPostBodyBody, a9 as OrganisationUnitPostResponse, a6 as OrganisationUnitsGetResponse, a5 as OrganisationsGetResponse, a8 as PersonalUnitPutResponse, N as ProcessingChargeItem, T as ProcessingCharges, R as ProcessingChargesMerchantKind, a4 as ProductChargesGetResponse, a3 as ProductChargesGetResponseProductType, C as ProductClaimDetail, B as ProductCoinsDetail, z as ProductDetail, x as ProductDetailFlavour, y as ProductDetailType, I as ProductDmProjectTier, J as ProductDmStorage, H as ProductDmStorageDetail, E as ProductDmStorageDetailCoins, F as ProductDmStorageDetailSize, w as ProductInstanceDetail, v as ProductInstanceDetailCoins, P as ProductPatchBodyBody, u as ProductType, t as ProductTypeServiceKind, $ as ProductUnitGetResponse, _ as ProductUnitGetResponseProduct, a2 as ProductsGetResponse, a1 as ProductsGetResponseProductsItem, a0 as ProductsGetTypesResponse, a as QFromParameter, f as QMIdParameter, g as QOrgIdParameter, c as QProductIdParameter, d as QUnitIdParameter, Q as QUntilParameter, b as QUserIdParameter, ad as StateGetVersionResponse, S as StorageChargeItem, L as StorageCharges, o as UnitDetail, Y as UnitGetResponse, i as UnitProductPostBodyBody, U as UnitProductPostBodyBodyFlavour, h as UnitProductPostBodyBodyType, Z as UnitProductPostResponse, a7 as UnitsGetResponse, n as UserAccountDetail, X as UserAccountGetResponse, m as UserDetail, ab as UsersGetResponse, ak as customInstance, ai as setAuthToken, aj as setBaseUrl } from './custom-instance-b8075093.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-
|
|
6
|
+
} from "./chunk-3O5KIRV4.js";
|
|
7
7
|
|
|
8
8
|
// src/account-server-api.schemas.ts
|
|
9
9
|
var UnitProductPostBodyBodyFlavour = {
|
|
@@ -38,17 +38,26 @@ var ProductDetailType = {
|
|
|
38
38
|
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
|
|
39
39
|
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
|
|
40
40
|
};
|
|
41
|
+
var ProcessingChargesMerchantKind = {
|
|
42
|
+
DATA_MANAGER: "DATA_MANAGER"
|
|
43
|
+
};
|
|
41
44
|
var AssetDetailScope = {
|
|
42
45
|
USER: "USER",
|
|
43
46
|
PRODUCT: "PRODUCT",
|
|
44
47
|
UNIT: "UNIT",
|
|
45
48
|
ORGANISATION: "ORGANISATION"
|
|
46
49
|
};
|
|
50
|
+
var ProductChargesGetResponseProductType = {
|
|
51
|
+
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
|
|
52
|
+
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
|
|
53
|
+
};
|
|
47
54
|
export {
|
|
48
55
|
AXIOS_INSTANCE,
|
|
49
56
|
AssetDetailScope,
|
|
50
57
|
AssetPostBodyBodyScope,
|
|
51
58
|
MerchantDetailKind,
|
|
59
|
+
ProcessingChargesMerchantKind,
|
|
60
|
+
ProductChargesGetResponseProductType,
|
|
52
61
|
ProductDetailFlavour,
|
|
53
62
|
ProductDetailType,
|
|
54
63
|
ProductTypeServiceKind,
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.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: 0.1\n */\nexport type DetachAssetParams = { m_id?: QMIdParameter };\n\nexport type AttachAssetParams = { m_id?: QMIdParameter };\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\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\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 /** The day you would like to be billed for the Product's subscription (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\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} 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 wil be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it wil be automatically set to your username */\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 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}\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 /** 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}\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 falvour. 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 /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type falvour. 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 claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\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} 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 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 Products's unique ID */\n id: string;\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 ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\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}\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 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"],"mappings":";;;;;;;;AA8DO,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;AAmCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAiDO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AAyCO,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;AA8FO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.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: 1.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 GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\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\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 /** The day you would like to be billed for the Product's subscription (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\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} 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 */\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 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}\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 claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\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 additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n item_number: 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 num_items: number;\n items: 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} 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 description?: string;\n merchants: MerchantDetail[];\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport type UnitGetResponse = UnitDetail;\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\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 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 /** The claim, if present, for claimable products */\n claim_id?: string;\n /** The claim name, if present, for claimable products */\n claim_name?: string;\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 cons consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\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 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"],"mappings":";;;;;;;;AA6EO,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;AAmCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAkDO,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;AA8HO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAcO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAuDO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC;","names":[]}
|
package/merchant/merchant.cjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
|
|
3
|
+
var _chunkIUEU2LYCcjs = require('../chunk-IUEU2LYC.cjs');
|
|
5
4
|
|
|
6
5
|
// src/merchant/merchant.ts
|
|
7
6
|
var _reactquery = require('react-query');
|
|
8
7
|
var getMerchants = (options, signal) => {
|
|
9
|
-
return
|
|
8
|
+
return _chunkIUEU2LYCcjs.customInstance.call(void 0,
|
|
9
|
+
{ url: `/merchant`, method: "get", signal },
|
|
10
|
+
options
|
|
11
|
+
);
|
|
10
12
|
};
|
|
11
13
|
var getGetMerchantsQueryKey = () => [`/merchant`];
|
|
12
14
|
var useGetMerchants = (options) => {
|
|
@@ -20,7 +22,10 @@ var useGetMerchants = (options) => {
|
|
|
20
22
|
return query;
|
|
21
23
|
};
|
|
22
24
|
var getService = (mId, options, signal) => {
|
|
23
|
-
return
|
|
25
|
+
return _chunkIUEU2LYCcjs.customInstance.call(void 0,
|
|
26
|
+
{ url: `/merchant/${mId}`, method: "get", signal },
|
|
27
|
+
options
|
|
28
|
+
);
|
|
24
29
|
};
|
|
25
30
|
var getGetServiceQueryKey = (mId) => [`/merchant/${mId}`];
|
|
26
31
|
var useGetService = (mId, options) => {
|
|
@@ -29,7 +34,11 @@ var useGetService = (mId, options) => {
|
|
|
29
34
|
const queryFn = ({
|
|
30
35
|
signal
|
|
31
36
|
}) => getService(mId, requestOptions, signal);
|
|
32
|
-
const query = _reactquery.useQuery.call(void 0,
|
|
37
|
+
const query = _reactquery.useQuery.call(void 0,
|
|
38
|
+
queryKey,
|
|
39
|
+
queryFn,
|
|
40
|
+
{ enabled: !!mId, ...queryOptions }
|
|
41
|
+
);
|
|
33
42
|
query.queryKey = queryKey;
|
|
34
43
|
return query;
|
|
35
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/merchant/merchant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/merchant/merchant.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA4BlB,IAAM,eAAe,CAC1B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,aAAa,QAAQ,OAAO,OAAO;AAAA,IAC1C;AAAA,EACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,WAAW;AAOlD,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAAmE,CAAC;AAAA,IACxE;AAAA,EACF,MAAM,aAAa,gBAAgB,MAAM;AAEzC,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;AAOO,IAAM,aAAa,CACxB,KACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,aAAa,OAAO,QAAQ,OAAO,OAAO;AAAA,IACjD;AAAA,EACF;AACF;AAEO,IAAM,wBAAwB,CAAC,QAAgB,CAAC,aAAa,KAAK;AAOlE,IAAM,gBAAgB,CAI3B,KACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,sBAAsB,GAAG;AAEpE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,EACF,MAAM,WAAW,KAAK,gBAAgB,MAAM;AAE5C,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA,EAAE,SAAS,CAAC,CAAC,KAAK,GAAG,aAAa;AAAA,EACpC;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.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: 1.0\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n MerchantsGetResponse,\n AsError,\n MerchantGetResponse,\n} from \"../account-server-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Gets merchants known to the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<MerchantsGetResponse>(\n { url: `/merchant`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetMerchantsQueryKey = () => [`/merchant`];\n\nexport type GetMerchantsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getMerchants>>\n>;\nexport type GetMerchantsQueryError = ErrorType<AsError | void>;\n\nexport const useGetMerchants = <\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({\n signal,\n }) => getMerchants(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Gets a known merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<MerchantGetResponse>(\n { url: `/merchant/${mId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetServiceQueryKey = (mId: number) => [`/merchant/${mId}`];\n\nexport type GetServiceQueryResult = NonNullable<\n Awaited<ReturnType<typeof getService>>\n>;\nexport type GetServiceQueryError = ErrorType<AsError | void>;\n\nexport const useGetService = <\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>\n>(\n mId: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({\n signal,\n }) => getService(mId, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getService>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!mId, ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
|
package/merchant/merchant.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ak as customInstance, r as MerchantsGetResponse, al as ErrorType, ag as AsError, p as MerchantDetail } from '../custom-instance-b8075093.js';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
package/merchant/merchant.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__spreadValues,
|
|
3
2
|
customInstance
|
|
4
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-3O5KIRV4.js";
|
|
5
4
|
|
|
6
5
|
// src/merchant/merchant.ts
|
|
7
6
|
import { useQuery } from "react-query";
|
|
8
7
|
var getMerchants = (options, signal) => {
|
|
9
|
-
return customInstance(
|
|
8
|
+
return customInstance(
|
|
9
|
+
{ url: `/merchant`, method: "get", signal },
|
|
10
|
+
options
|
|
11
|
+
);
|
|
10
12
|
};
|
|
11
13
|
var getGetMerchantsQueryKey = () => [`/merchant`];
|
|
12
14
|
var useGetMerchants = (options) => {
|
|
@@ -20,7 +22,10 @@ var useGetMerchants = (options) => {
|
|
|
20
22
|
return query;
|
|
21
23
|
};
|
|
22
24
|
var getService = (mId, options, signal) => {
|
|
23
|
-
return customInstance(
|
|
25
|
+
return customInstance(
|
|
26
|
+
{ url: `/merchant/${mId}`, method: "get", signal },
|
|
27
|
+
options
|
|
28
|
+
);
|
|
24
29
|
};
|
|
25
30
|
var getGetServiceQueryKey = (mId) => [`/merchant/${mId}`];
|
|
26
31
|
var useGetService = (mId, options) => {
|
|
@@ -29,7 +34,11 @@ var useGetService = (mId, options) => {
|
|
|
29
34
|
const queryFn = ({
|
|
30
35
|
signal
|
|
31
36
|
}) => getService(mId, requestOptions, signal);
|
|
32
|
-
const query = useQuery(
|
|
37
|
+
const query = useQuery(
|
|
38
|
+
queryKey,
|
|
39
|
+
queryFn,
|
|
40
|
+
{ enabled: !!mId, ...queryOptions }
|
|
41
|
+
);
|
|
33
42
|
query.queryKey = queryKey;
|
|
34
43
|
return query;
|
|
35
44
|
};
|