@squonk/account-server-client 2.0.0-rc.2 → 2.0.0-rc.4
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/admin/admin.cjs +36 -0
- package/admin/admin.cjs.map +1 -0
- package/admin/admin.d.ts +24 -0
- package/admin/admin.js +36 -0
- package/admin/admin.js.map +1 -0
- package/admin/package.json +7 -0
- package/asset/asset.d.ts +1 -1
- package/{custom-instance-be24f6d9.d.ts → custom-instance-e4bb72ce.d.ts} +21 -6
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/merchant/merchant.d.ts +1 -1
- package/organisation/organisation.d.ts +1 -1
- package/package.json +1 -1
- package/product/product.d.ts +1 -1
- package/src/account-server-api.schemas.ts +22 -4
- package/src/admin/admin.ts +93 -0
- package/state/state.d.ts +1 -1
- package/unit/unit.d.ts +1 -1
- package/user/user.d.ts +1 -1
package/admin/admin.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkIUEU2LYCcjs = require('../chunk-IUEU2LYC.cjs');
|
|
4
|
+
|
|
5
|
+
// src/admin/admin.ts
|
|
6
|
+
var _reactquery = require('@tanstack/react-query');
|
|
7
|
+
var getCharges = (params, options, signal) => {
|
|
8
|
+
return _chunkIUEU2LYCcjs.customInstance.call(void 0,
|
|
9
|
+
{ url: `/charges`, method: "get", params, signal },
|
|
10
|
+
options
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
var getGetChargesQueryKey = (params) => [
|
|
14
|
+
`/charges`,
|
|
15
|
+
...params ? [params] : []
|
|
16
|
+
];
|
|
17
|
+
var useGetCharges = (params, options) => {
|
|
18
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
19
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetChargesQueryKey(params)));
|
|
20
|
+
const queryFn = ({
|
|
21
|
+
signal
|
|
22
|
+
}) => getCharges(params, requestOptions, signal);
|
|
23
|
+
const query = _reactquery.useQuery.call(void 0,
|
|
24
|
+
queryKey,
|
|
25
|
+
queryFn,
|
|
26
|
+
queryOptions
|
|
27
|
+
);
|
|
28
|
+
query.queryKey = queryKey;
|
|
29
|
+
return query;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.getCharges = getCharges; exports.getGetChargesQueryKey = getGetChargesQueryKey; exports.useGetCharges = useGetCharges;
|
|
36
|
+
//# sourceMappingURL=admin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/admin/admin.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,aAAa,CACxB,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,YAAY,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACjD;AAAA,EACF;AACF;AAEO,IAAM,wBAAwB,CAAC,WAA8B;AAAA,EAClE;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,gBAAgB,CAI3B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,sBAAsB,MAAM;AAEvE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,EACF,MAAM,WAAW,QAAQ,gBAAgB,MAAM;AAE/C,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ChargesGetResponse,\n AsError,\n GetChargesParams,\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 global charges.\n\nYou need **admin** rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ChargesGetResponse>(\n { url: `/charges`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetChargesQueryKey = (params?: GetChargesParams) => [\n `/charges`,\n ...(params ? [params] : []),\n];\n\nexport type GetChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getCharges>>\n>;\nexport type GetChargesQueryError = ErrorType<void | AsError>;\n\nexport const useGetCharges = <\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>\n>(\n params?: GetChargesParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getCharges>>,\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 ?? getGetChargesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({\n signal,\n }) => getCharges(params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getCharges>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
|
package/admin/admin.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { c as GetChargesParams, aB as customInstance, au as ChargesGetResponse, aC as ErrorType, ax as AsError } from '../custom-instance-e4bb72ce.js';
|
|
3
|
+
import 'axios';
|
|
4
|
+
|
|
5
|
+
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
6
|
+
/**
|
|
7
|
+
* Gets global charges.
|
|
8
|
+
|
|
9
|
+
You need **admin** rights to use this path.
|
|
10
|
+
|
|
11
|
+
* @summary Gets charges for all Organisations
|
|
12
|
+
*/
|
|
13
|
+
declare const getCharges: (params?: GetChargesParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ChargesGetResponse>;
|
|
14
|
+
declare const getGetChargesQueryKey: (params?: GetChargesParams) => (string | GetChargesParams)[];
|
|
15
|
+
declare type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
16
|
+
declare type GetChargesQueryError = ErrorType<void | AsError>;
|
|
17
|
+
declare const useGetCharges: <TData = ChargesGetResponse, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
18
|
+
query?: UseQueryOptions<ChargesGetResponse, TError, TData, QueryKey> | undefined;
|
|
19
|
+
request?: SecondParameter<typeof customInstance>;
|
|
20
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
21
|
+
queryKey: QueryKey;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { GetChargesQueryError, GetChargesQueryResult, getCharges, getGetChargesQueryKey, useGetCharges };
|
package/admin/admin.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
customInstance
|
|
3
|
+
} from "../chunk-3O5KIRV4.js";
|
|
4
|
+
|
|
5
|
+
// src/admin/admin.ts
|
|
6
|
+
import { useQuery } from "@tanstack/react-query";
|
|
7
|
+
var getCharges = (params, options, signal) => {
|
|
8
|
+
return customInstance(
|
|
9
|
+
{ url: `/charges`, method: "get", params, signal },
|
|
10
|
+
options
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
var getGetChargesQueryKey = (params) => [
|
|
14
|
+
`/charges`,
|
|
15
|
+
...params ? [params] : []
|
|
16
|
+
];
|
|
17
|
+
var useGetCharges = (params, options) => {
|
|
18
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
19
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetChargesQueryKey(params);
|
|
20
|
+
const queryFn = ({
|
|
21
|
+
signal
|
|
22
|
+
}) => getCharges(params, requestOptions, signal);
|
|
23
|
+
const query = useQuery(
|
|
24
|
+
queryKey,
|
|
25
|
+
queryFn,
|
|
26
|
+
queryOptions
|
|
27
|
+
);
|
|
28
|
+
query.queryKey = queryKey;
|
|
29
|
+
return query;
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
getCharges,
|
|
33
|
+
getGetChargesQueryKey,
|
|
34
|
+
useGetCharges
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/admin/admin.ts"],"sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ChargesGetResponse,\n AsError,\n GetChargesParams,\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 global charges.\n\nYou need **admin** rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport const getCharges = (\n params?: GetChargesParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ChargesGetResponse>(\n { url: `/charges`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetChargesQueryKey = (params?: GetChargesParams) => [\n `/charges`,\n ...(params ? [params] : []),\n];\n\nexport type GetChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getCharges>>\n>;\nexport type GetChargesQueryError = ErrorType<void | AsError>;\n\nexport const useGetCharges = <\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>\n>(\n params?: GetChargesParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getCharges>>,\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 ?? getGetChargesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({\n signal,\n }) => getCharges(params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getCharges>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,aAAa,CACxB,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,YAAY,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACjD;AAAA,EACF;AACF;AAEO,IAAM,wBAAwB,CAAC,WAA8B;AAAA,EAClE;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,gBAAgB,CAI3B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,sBAAsB,MAAM;AAEvE,QAAM,UAAiE,CAAC;AAAA,IACtE;AAAA,EACF,MAAM,WAAW,QAAQ,gBAAgB,MAAM;AAE/C,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;","names":[]}
|
package/asset/asset.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { g as GetAssetParams, aB as customInstance, aw as AssetGetResponse, aC as ErrorType, ax as AsError, q as AssetPostBodyBody, av as AssetPostResponse, A as AttachAssetParams, D as DetachAssetParams } from '../custom-instance-e4bb72ce.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -11,9 +11,6 @@ A service that provides access to the Account Server, which gives *registered* u
|
|
|
11
11
|
|
|
12
12
|
* OpenAPI spec version: 2.0
|
|
13
13
|
*/
|
|
14
|
-
declare type DetachAssetParams = {
|
|
15
|
-
m_id?: QMIdParameter;
|
|
16
|
-
};
|
|
17
14
|
declare type AttachAssetParams = {
|
|
18
15
|
m_id?: QMIdParameter;
|
|
19
16
|
};
|
|
@@ -25,7 +22,7 @@ declare type QUntilParameter = string;
|
|
|
25
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
|
|
26
23
|
*/
|
|
27
24
|
declare type QFromParameter = string;
|
|
28
|
-
declare type
|
|
25
|
+
declare type GetUnitChargesParams = {
|
|
29
26
|
from?: QFromParameter;
|
|
30
27
|
until?: QUntilParameter;
|
|
31
28
|
pbp?: QPbpParameter;
|
|
@@ -35,6 +32,11 @@ declare type GetProductChargesParams = {
|
|
|
35
32
|
until?: QUntilParameter;
|
|
36
33
|
pbp?: QPbpParameter;
|
|
37
34
|
};
|
|
35
|
+
declare type GetChargesParams = {
|
|
36
|
+
from?: QFromParameter;
|
|
37
|
+
until?: QUntilParameter;
|
|
38
|
+
pbp?: QPbpParameter;
|
|
39
|
+
};
|
|
38
40
|
/**
|
|
39
41
|
* A User Identity
|
|
40
42
|
*/
|
|
@@ -57,6 +59,9 @@ declare type GetAssetParams = {
|
|
|
57
59
|
* A Merchant Identity
|
|
58
60
|
*/
|
|
59
61
|
declare type QMIdParameter = number;
|
|
62
|
+
declare type DetachAssetParams = {
|
|
63
|
+
m_id?: QMIdParameter;
|
|
64
|
+
};
|
|
60
65
|
/**
|
|
61
66
|
* An Organisation Identity
|
|
62
67
|
*/
|
|
@@ -65,7 +70,7 @@ declare type QOrgIdParameter = string;
|
|
|
65
70
|
* A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
|
|
66
71
|
*/
|
|
67
72
|
declare type QPbpParameter = number;
|
|
68
|
-
declare type
|
|
73
|
+
declare type GetOrganisationChargesParams = {
|
|
69
74
|
from?: QFromParameter;
|
|
70
75
|
until?: QUntilParameter;
|
|
71
76
|
pbp?: QPbpParameter;
|
|
@@ -526,6 +531,11 @@ interface OrganisationUnitsGetResponse {
|
|
|
526
531
|
*/
|
|
527
532
|
units: UnitDetail[];
|
|
528
533
|
}
|
|
534
|
+
interface OrganisationChargeSummary {
|
|
535
|
+
organisation_id: string;
|
|
536
|
+
name: string;
|
|
537
|
+
summary: ChargeSummary[];
|
|
538
|
+
}
|
|
529
539
|
interface PersonalUnitPutResponse {
|
|
530
540
|
/** The unit's Organisation. Used to identify the Default organisation */
|
|
531
541
|
organisation_id: string;
|
|
@@ -566,6 +576,11 @@ interface StateGetVersionResponse {
|
|
|
566
576
|
*/
|
|
567
577
|
version: string;
|
|
568
578
|
}
|
|
579
|
+
interface ChargesGetResponse {
|
|
580
|
+
coins: string;
|
|
581
|
+
summary: ChargeSummary[];
|
|
582
|
+
organisation_charges: OrganisationChargeSummary[];
|
|
583
|
+
}
|
|
569
584
|
interface AssetPostResponse {
|
|
570
585
|
/** The Asset ID
|
|
571
586
|
*/
|
|
@@ -596,4 +611,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
596
611
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
|
|
597
612
|
declare type ErrorType<TError> = AxiosError<TError>;
|
|
598
613
|
|
|
599
|
-
export {
|
|
614
|
+
export { AssetDetail as $, AttachAssetParams as A, ProductInstanceDetailCoins as B, ProductInstanceDetail as C, DetachAssetParams as D, ProductDetailFlavour as E, ProductDetailType as F, GetUnitChargesParams as G, ProductDetail as H, ProductCoinsDetail as I, ProductClaimDetail as J, ProductDmStorageDetailCoins as K, ProductDmStorageDetailSize as L, MerchantDetailKind as M, ProductDmStorageDetail as N, OrganisationUnitPostBodyBody as O, ProductPatchBodyBody as P, QUntilParameter as Q, ProductDmProjectTier as R, ProductDmStorage as S, ChargeAdditionalData as T, UnitProductPostBodyBodyFlavour as U, StorageChargeItem as V, StorageCharges as W, ProcessingChargeItem as X, ProcessingChargesMerchantKind as Y, ProcessingCharges as Z, AssetDetailScope as _, QFromParameter as a, UserAccountGetResponse as a0, UnitsGetResponse as a1, UnitGetResponse as a2, UnitProductPostResponse as a3, ChargeSummaryType as a4, ChargeSummary as a5, UnitProductChargeSummary as a6, UnitChargeSummary as a7, UnitChargesGetResponse as a8, ProductUnitGetResponseProduct as a9, setBaseUrl as aA, customInstance as aB, ErrorType as aC, ProductUnitGetResponse as aa, ProductsGetTypesResponse as ab, ProductsGetDefaultStorageCostDefaultStorageCost as ac, ProductsGetDefaultStorageCost as ad, ProductsGetResponseProductsItem as ae, ProductsGetResponse as af, ProductChargesGetResponseProductType as ag, ProductChargesGetResponse as ah, OrganisationGetResponse as ai, OrganisationsGetResponse as aj, OrganisationUnitChargeSummary as ak, OrganisationChargesGetResponse as al, OrganisationUnitsGetResponse as am, OrganisationChargeSummary as an, PersonalUnitPutResponse as ao, OrganisationUnitPostResponse as ap, OrganisationGetDefaultResponse as aq, UsersGetResponse as ar, OrganisationPostResponse as as, StateGetVersionResponse as at, ChargesGetResponse as au, AssetPostResponse as av, AssetGetResponse as aw, AsError as ax, AXIOS_INSTANCE as ay, setAuthToken as az, GetProductChargesParams as b, GetChargesParams as c, QUserIdParameter as d, QProductIdParameter as e, QUnitIdParameter as f, GetAssetParams as g, QMIdParameter as h, QOrgIdParameter as i, QPbpParameter as j, GetOrganisationChargesParams as k, UnitProductPostBodyBodyType as l, UnitProductPostBodyBody as m, PersonalUnitPutBodyBody as n, OrganisationPostBodyBody as o, AssetPostBodyBodyScope as p, AssetPostBodyBody as q, UserDetail as r, UserAccountDetail as s, UnitDetail as t, MerchantDetail as u, MerchantGetResponse as v, MerchantsGetResponse as w, OrganisationDetail as x, ProductTypeServiceKind as y, ProductType as z };
|
package/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AA+FO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCACE;AAAA,EACF,mCAAmC;AACrC;AAwCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAoDO,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;AAiIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAiBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAsCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nexport type DetachAssetParams = { m_id?: QMIdParameter };\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 GetOrganisationChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\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\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetUnitChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The name you want to give the Product */\n name?: string;\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour =\n typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope =\n typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 /** The Unit's billing day */\n billing_day: number;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind =\n typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour =\n typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType =\n typeof ProductDetailType[keyof typeof ProductDetailType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */\n billing_prediction: number;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n 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 /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind =\n typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\n /** The date when the charges concluded */\n closed?: string;\n /** True if charges received after the charge record was closed */\n post_closure_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport type AssetDetailScope =\n typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType =\n typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: \"PROCESSING\",\n STORAGE: \"STORAGE\",\n} as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType =\n typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n billing_day: number;\n /** 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 coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface 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"]}
|
|
1
|
+
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AAqGO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCACE;AAAA,EACF,mCAAmC;AACrC;AAwCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAoDO,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;AAiIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAiBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAsCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC","sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nexport type AttachAssetParams = { m_id?: QMIdParameter };\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\nexport type GetAssetParams = {\n user_id?: QUserIdParameter;\n product_id?: QProductIdParameter;\n unit_id?: QUnitIdParameter;\n org_id?: QOrgIdParameter;\n};\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\nexport type DetachAssetParams = { m_id?: QMIdParameter };\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetOrganisationChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The name you want to give the Product */\n name?: string;\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour =\n typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope =\n typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 /** The Unit's billing day */\n billing_day: number;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind =\n typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour =\n typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType =\n typeof ProductDetailType[keyof typeof ProductDetailType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */\n billing_prediction: number;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n 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 /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind =\n typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\n /** The date when the charges concluded */\n closed?: string;\n /** True if charges received after the charge record was closed */\n post_closure_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport type AssetDetailScope =\n typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType =\n typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: \"PROCESSING\",\n STORAGE: \"STORAGE\",\n} as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType =\n typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n billing_day: number;\n /** 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 coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n organisation_id: string;\n name: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member: boolean;\n /** The Default Organisation ID\n */\n id: string;\n /** The Default Organisation Name\n */\n name: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private: boolean;\n created: string;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n summary: ChargeSummary[];\n organisation_charges: OrganisationChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n"]}
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ay as AXIOS_INSTANCE, ax as AsError, $ as AssetDetail, _ as AssetDetailScope, aw as AssetGetResponse, q as AssetPostBodyBody, p as AssetPostBodyBodyScope, av as AssetPostResponse, A as AttachAssetParams, T as ChargeAdditionalData, a5 as ChargeSummary, a4 as ChargeSummaryType, au as ChargesGetResponse, D as DetachAssetParams, aC as ErrorType, g as GetAssetParams, c as GetChargesParams, k as GetOrganisationChargesParams, b as GetProductChargesParams, G as GetUnitChargesParams, u as MerchantDetail, M as MerchantDetailKind, v as MerchantGetResponse, w as MerchantsGetResponse, an as OrganisationChargeSummary, al as OrganisationChargesGetResponse, x as OrganisationDetail, aq as OrganisationGetDefaultResponse, ai as OrganisationGetResponse, o as OrganisationPostBodyBody, as as OrganisationPostResponse, ak as OrganisationUnitChargeSummary, O as OrganisationUnitPostBodyBody, ap as OrganisationUnitPostResponse, am as OrganisationUnitsGetResponse, aj as OrganisationsGetResponse, n as PersonalUnitPutBodyBody, ao as PersonalUnitPutResponse, X as ProcessingChargeItem, Z as ProcessingCharges, Y as ProcessingChargesMerchantKind, ah as ProductChargesGetResponse, ag as ProductChargesGetResponseProductType, J as ProductClaimDetail, I as ProductCoinsDetail, H as ProductDetail, E as ProductDetailFlavour, F as ProductDetailType, R as ProductDmProjectTier, S as ProductDmStorage, N as ProductDmStorageDetail, K as ProductDmStorageDetailCoins, L as ProductDmStorageDetailSize, C as ProductInstanceDetail, B as ProductInstanceDetailCoins, P as ProductPatchBodyBody, z as ProductType, y as ProductTypeServiceKind, aa as ProductUnitGetResponse, a9 as ProductUnitGetResponseProduct, ad as ProductsGetDefaultStorageCost, ac as ProductsGetDefaultStorageCostDefaultStorageCost, af as ProductsGetResponse, ae as ProductsGetResponseProductsItem, ab as ProductsGetTypesResponse, a as QFromParameter, h as QMIdParameter, i as QOrgIdParameter, j as QPbpParameter, e as QProductIdParameter, f as QUnitIdParameter, Q as QUntilParameter, d as QUserIdParameter, at as StateGetVersionResponse, V as StorageChargeItem, W as StorageCharges, a7 as UnitChargeSummary, a8 as UnitChargesGetResponse, t as UnitDetail, a2 as UnitGetResponse, a6 as UnitProductChargeSummary, m as UnitProductPostBodyBody, U as UnitProductPostBodyBodyFlavour, l as UnitProductPostBodyBodyType, a3 as UnitProductPostResponse, a1 as UnitsGetResponse, s as UserAccountDetail, a0 as UserAccountGetResponse, r as UserDetail, ar as UsersGetResponse, aB as customInstance, az as setAuthToken, aA as setBaseUrl } from './custom-instance-e4bb72ce.js';
|
|
2
2
|
import 'axios';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nexport type DetachAssetParams = { m_id?: QMIdParameter };\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 GetOrganisationChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\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\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetUnitChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The name you want to give the Product */\n name?: string;\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour =\n typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope =\n typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 /** The Unit's billing day */\n billing_day: number;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind =\n typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour =\n typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType =\n typeof ProductDetailType[keyof typeof ProductDetailType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */\n billing_prediction: number;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n 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 /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind =\n typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\n /** The date when the charges concluded */\n closed?: string;\n /** True if charges received after the charge record was closed */\n post_closure_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport type AssetDetailScope =\n typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType =\n typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: \"PROCESSING\",\n STORAGE: \"STORAGE\",\n} as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType =\n typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n billing_day: number;\n /** 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 coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface 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":";;;;;;;;AA+FO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCACE;AAAA,EACF,mCAAmC;AACrC;AAwCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAoDO,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;AAiIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAiBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAsCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 2.0\n */\nexport type AttachAssetParams = { m_id?: QMIdParameter };\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\nexport type GetAssetParams = {\n user_id?: QUserIdParameter;\n product_id?: QProductIdParameter;\n unit_id?: QUnitIdParameter;\n org_id?: QOrgIdParameter;\n};\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\nexport type DetachAssetParams = { m_id?: QMIdParameter };\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\nexport type QPbpParameter = number;\n\nexport type GetOrganisationChargesParams = {\n from?: QFromParameter;\n until?: QUntilParameter;\n pbp?: QPbpParameter;\n};\n\nexport type ProductPatchBodyBody = {\n /** The name you want to give the Product */\n name?: string;\n /** The Product's built-in coin allowance. Product allowances cannot be reduced */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. The existing product limit cannot be reduced */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour =\n typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /** The name you want to give the Product */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products */\n allowance?: number;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n};\n\nexport type OrganisationUnitPostBodyBody = {\n /** The name of the unit */\n name: string;\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /** The day you would like to be billed for the Unit's Products (a value from 1 and 28) */\n billing_day: number;\n};\n\nexport type OrganisationPostBodyBody = {\n /** The name of the organisation */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n};\n\nexport type AssetPostBodyBodyScope =\n typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 /** The Unit's billing day */\n billing_day: number;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind =\n typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour =\n typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType =\n typeof ProductDetailType[keyof typeof ProductDetailType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted billing period amount, if costs continue at the current burn rate until the end of the billing period */\n billing_prediction: number;\n /** The day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationDetail;\n unit: UnitDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n 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 /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind =\n typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = {\n DATA_MANAGER: \"DATA_MANAGER\",\n} as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\n /** The date when the charges concluded */\n closed?: string;\n /** True if charges received after the charge record was closed */\n post_closure_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport type AssetDetailScope =\n typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n} 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 Product's unique ID */\n id: string;\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType =\n typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = {\n PROCESSING: \"PROCESSING\",\n STORAGE: \"STORAGE\",\n} as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem =\n | ProductDmStorage\n | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType =\n typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:\n \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n billing_day: number;\n /** 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 coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n organisation_id: string;\n name: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationGetDefaultResponse {\n /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */\n caller_is_member: boolean;\n /** The Default Organisation ID\n */\n id: string;\n /** The Default Organisation Name\n */\n name: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private: boolean;\n created: string;\n}\n\nexport interface UsersGetResponse {\n organisation?: OrganisationDetail;\n unit?: UnitDetail;\n /** The list of Organisation Users\n */\n users: UserDetail[];\n}\n\nexport interface OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\n}\n\nexport interface StateGetVersionResponse {\n /** The Account Server version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined\n */\n version: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n summary: ChargeSummary[];\n organisation_charges: OrganisationChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n"],"mappings":";;;;;;;;AAqGO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCACE;AAAA,EACF,mCAAmC;AACrC;AAwCO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAoDO,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;AAiIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAiBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAChB;AAsCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCACE;AAAA,EACF,mCAAmC;AACrC;","names":[]}
|
package/merchant/merchant.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aB as customInstance, w as MerchantsGetResponse, aC as ErrorType, ax as AsError, u as MerchantDetail } from '../custom-instance-e4bb72ce.js';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aB as customInstance, aj as OrganisationsGetResponse, aC as ErrorType, ax as AsError, o as OrganisationPostBodyBody, as as OrganisationPostResponse, x as OrganisationDetail, k as GetOrganisationChargesParams, al as OrganisationChargesGetResponse, aq as OrganisationGetDefaultResponse } from '../custom-instance-e4bb72ce.js';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
4
4
|
import 'axios';
|
package/package.json
CHANGED
package/product/product.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { aB as customInstance, ab as ProductsGetTypesResponse, aC as ErrorType, ax as AsError, ad as ProductsGetDefaultStorageCost, af as ProductsGetResponse, m as UnitProductPostBodyBody, a3 as UnitProductPostResponse, aa as ProductUnitGetResponse, P as ProductPatchBodyBody, b as GetProductChargesParams, ah as ProductChargesGetResponse } from '../custom-instance-e4bb72ce.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
@@ -8,8 +8,6 @@ A service that provides access to the Account Server, which gives *registered* u
|
|
|
8
8
|
|
|
9
9
|
* OpenAPI spec version: 2.0
|
|
10
10
|
*/
|
|
11
|
-
export type DetachAssetParams = { m_id?: QMIdParameter };
|
|
12
|
-
|
|
13
11
|
export type AttachAssetParams = { m_id?: QMIdParameter };
|
|
14
12
|
|
|
15
13
|
/**
|
|
@@ -22,7 +20,7 @@ export type QUntilParameter = string;
|
|
|
22
20
|
*/
|
|
23
21
|
export type QFromParameter = string;
|
|
24
22
|
|
|
25
|
-
export type
|
|
23
|
+
export type GetUnitChargesParams = {
|
|
26
24
|
from?: QFromParameter;
|
|
27
25
|
until?: QUntilParameter;
|
|
28
26
|
pbp?: QPbpParameter;
|
|
@@ -34,6 +32,12 @@ export type GetProductChargesParams = {
|
|
|
34
32
|
pbp?: QPbpParameter;
|
|
35
33
|
};
|
|
36
34
|
|
|
35
|
+
export type GetChargesParams = {
|
|
36
|
+
from?: QFromParameter;
|
|
37
|
+
until?: QUntilParameter;
|
|
38
|
+
pbp?: QPbpParameter;
|
|
39
|
+
};
|
|
40
|
+
|
|
37
41
|
/**
|
|
38
42
|
* A User Identity
|
|
39
43
|
*/
|
|
@@ -61,6 +65,8 @@ export type GetAssetParams = {
|
|
|
61
65
|
*/
|
|
62
66
|
export type QMIdParameter = number;
|
|
63
67
|
|
|
68
|
+
export type DetachAssetParams = { m_id?: QMIdParameter };
|
|
69
|
+
|
|
64
70
|
/**
|
|
65
71
|
* An Organisation Identity
|
|
66
72
|
*/
|
|
@@ -71,7 +77,7 @@ export type QOrgIdParameter = string;
|
|
|
71
77
|
*/
|
|
72
78
|
export type QPbpParameter = number;
|
|
73
79
|
|
|
74
|
-
export type
|
|
80
|
+
export type GetOrganisationChargesParams = {
|
|
75
81
|
from?: QFromParameter;
|
|
76
82
|
until?: QUntilParameter;
|
|
77
83
|
pbp?: QPbpParameter;
|
|
@@ -635,6 +641,12 @@ export interface OrganisationUnitsGetResponse {
|
|
|
635
641
|
units: UnitDetail[];
|
|
636
642
|
}
|
|
637
643
|
|
|
644
|
+
export interface OrganisationChargeSummary {
|
|
645
|
+
organisation_id: string;
|
|
646
|
+
name: string;
|
|
647
|
+
summary: ChargeSummary[];
|
|
648
|
+
}
|
|
649
|
+
|
|
638
650
|
export interface PersonalUnitPutResponse {
|
|
639
651
|
/** The unit's Organisation. Used to identify the Default organisation */
|
|
640
652
|
organisation_id: string;
|
|
@@ -681,6 +693,12 @@ export interface StateGetVersionResponse {
|
|
|
681
693
|
version: string;
|
|
682
694
|
}
|
|
683
695
|
|
|
696
|
+
export interface ChargesGetResponse {
|
|
697
|
+
coins: string;
|
|
698
|
+
summary: ChargeSummary[];
|
|
699
|
+
organisation_charges: OrganisationChargeSummary[];
|
|
700
|
+
}
|
|
701
|
+
|
|
684
702
|
export interface AssetPostResponse {
|
|
685
703
|
/** The Asset ID
|
|
686
704
|
*/
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v6.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Account Server API
|
|
5
|
+
* The Informatics Matters Account Server API.
|
|
6
|
+
|
|
7
|
+
A service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.
|
|
8
|
+
|
|
9
|
+
* OpenAPI spec version: 2.0
|
|
10
|
+
*/
|
|
11
|
+
import { useQuery } from "@tanstack/react-query";
|
|
12
|
+
import type {
|
|
13
|
+
UseQueryOptions,
|
|
14
|
+
QueryFunction,
|
|
15
|
+
UseQueryResult,
|
|
16
|
+
QueryKey,
|
|
17
|
+
} from "@tanstack/react-query";
|
|
18
|
+
import type {
|
|
19
|
+
ChargesGetResponse,
|
|
20
|
+
AsError,
|
|
21
|
+
GetChargesParams,
|
|
22
|
+
} from "../account-server-api.schemas";
|
|
23
|
+
import { customInstance } from ".././custom-instance";
|
|
24
|
+
import type { ErrorType } from ".././custom-instance";
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line
|
|
27
|
+
type SecondParameter<T extends (...args: any) => any> = T extends (
|
|
28
|
+
config: any,
|
|
29
|
+
args: infer P
|
|
30
|
+
) => any
|
|
31
|
+
? P
|
|
32
|
+
: never;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Gets global charges.
|
|
36
|
+
|
|
37
|
+
You need **admin** rights to use this path.
|
|
38
|
+
|
|
39
|
+
* @summary Gets charges for all Organisations
|
|
40
|
+
*/
|
|
41
|
+
export const getCharges = (
|
|
42
|
+
params?: GetChargesParams,
|
|
43
|
+
options?: SecondParameter<typeof customInstance>,
|
|
44
|
+
signal?: AbortSignal
|
|
45
|
+
) => {
|
|
46
|
+
return customInstance<ChargesGetResponse>(
|
|
47
|
+
{ url: `/charges`, method: "get", params, signal },
|
|
48
|
+
options
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const getGetChargesQueryKey = (params?: GetChargesParams) => [
|
|
53
|
+
`/charges`,
|
|
54
|
+
...(params ? [params] : []),
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export type GetChargesQueryResult = NonNullable<
|
|
58
|
+
Awaited<ReturnType<typeof getCharges>>
|
|
59
|
+
>;
|
|
60
|
+
export type GetChargesQueryError = ErrorType<void | AsError>;
|
|
61
|
+
|
|
62
|
+
export const useGetCharges = <
|
|
63
|
+
TData = Awaited<ReturnType<typeof getCharges>>,
|
|
64
|
+
TError = ErrorType<void | AsError>
|
|
65
|
+
>(
|
|
66
|
+
params?: GetChargesParams,
|
|
67
|
+
options?: {
|
|
68
|
+
query?: UseQueryOptions<
|
|
69
|
+
Awaited<ReturnType<typeof getCharges>>,
|
|
70
|
+
TError,
|
|
71
|
+
TData
|
|
72
|
+
>;
|
|
73
|
+
request?: SecondParameter<typeof customInstance>;
|
|
74
|
+
}
|
|
75
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
76
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
77
|
+
|
|
78
|
+
const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);
|
|
79
|
+
|
|
80
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({
|
|
81
|
+
signal,
|
|
82
|
+
}) => getCharges(params, requestOptions, signal);
|
|
83
|
+
|
|
84
|
+
const query = useQuery<Awaited<ReturnType<typeof getCharges>>, TError, TData>(
|
|
85
|
+
queryKey,
|
|
86
|
+
queryFn,
|
|
87
|
+
queryOptions
|
|
88
|
+
) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
89
|
+
|
|
90
|
+
query.queryKey = queryKey;
|
|
91
|
+
|
|
92
|
+
return query;
|
|
93
|
+
};
|
package/state/state.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { aB as customInstance, at as StateGetVersionResponse, aC as ErrorType, ax as AsError } from '../custom-instance-e4bb72ce.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
package/unit/unit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aB as customInstance, am as OrganisationUnitsGetResponse, aC as ErrorType, ax as AsError, O as OrganisationUnitPostBodyBody, ap as OrganisationUnitPostResponse, t as UnitDetail, a1 as UnitsGetResponse, n as PersonalUnitPutBodyBody, ao as PersonalUnitPutResponse, G as GetUnitChargesParams, a8 as UnitChargesGetResponse } from '../custom-instance-e4bb72ce.js';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
4
4
|
import 'axios';
|
package/user/user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { aB as customInstance, s as UserAccountDetail, aC as ErrorType, ax as AsError, ar as UsersGetResponse } from '../custom-instance-e4bb72ce.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|