@squonk/account-server-client 2.3.1-rc.5 → 2.3.1-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs +44 -1
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +46 -5
- package/asset/asset.d.ts +46 -5
- package/asset/asset.js +43 -0
- package/asset/asset.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -1
- package/index.d.ts +2 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/account-server-api.schemas.ts +2 -0
- package/src/asset/asset.ts +104 -0
package/asset/asset.cjs
CHANGED
|
@@ -85,6 +85,43 @@ var useCreateAsset = (options) => {
|
|
|
85
85
|
const mutationOptions = getCreateAssetMutationOptions(options);
|
|
86
86
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
87
87
|
};
|
|
88
|
+
var getSpecificAsset = (assetId, options, signal) => {
|
|
89
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
90
|
+
{
|
|
91
|
+
url: `/asset/${assetId}`,
|
|
92
|
+
method: "GET",
|
|
93
|
+
signal
|
|
94
|
+
},
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
var getGetSpecificAssetQueryKey = (assetId) => {
|
|
99
|
+
return ["account-server-api", `/asset/${assetId}`];
|
|
100
|
+
};
|
|
101
|
+
var getGetSpecificAssetQueryOptions = (assetId, options) => {
|
|
102
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
103
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetSpecificAssetQueryKey(assetId)));
|
|
104
|
+
const queryFn = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);
|
|
105
|
+
return { queryKey, queryFn, enabled: !!assetId, ...queryOptions };
|
|
106
|
+
};
|
|
107
|
+
var useGetSpecificAsset = (assetId, options) => {
|
|
108
|
+
const queryOptions = getGetSpecificAssetQueryOptions(assetId, options);
|
|
109
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
110
|
+
query.queryKey = queryOptions.queryKey;
|
|
111
|
+
return query;
|
|
112
|
+
};
|
|
113
|
+
var getGetSpecificAssetSuspenseQueryOptions = (assetId, options) => {
|
|
114
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
115
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetSpecificAssetQueryKey(assetId)));
|
|
116
|
+
const queryFn = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);
|
|
117
|
+
return { queryKey, queryFn, enabled: !!assetId, ...queryOptions };
|
|
118
|
+
};
|
|
119
|
+
var useGetSpecificAssetSuspense = (assetId, options) => {
|
|
120
|
+
const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId, options);
|
|
121
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
122
|
+
query.queryKey = queryOptions.queryKey;
|
|
123
|
+
return query;
|
|
124
|
+
};
|
|
88
125
|
var patchAsset = (assetId, assetPatchBodyBody, options) => {
|
|
89
126
|
const formData = new FormData();
|
|
90
127
|
if (assetPatchBodyBody.content_file !== void 0) {
|
|
@@ -253,5 +290,11 @@ var useDetachAsset = (options) => {
|
|
|
253
290
|
|
|
254
291
|
|
|
255
292
|
|
|
256
|
-
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
exports.attachAsset = attachAsset; exports.createAsset = createAsset; exports.deleteAsset = deleteAsset; exports.detachAsset = detachAsset; exports.disableAsset = disableAsset; exports.enableAsset = enableAsset; exports.getAsset = getAsset; exports.getAttachAssetMutationOptions = getAttachAssetMutationOptions; exports.getCreateAssetMutationOptions = getCreateAssetMutationOptions; exports.getDeleteAssetMutationOptions = getDeleteAssetMutationOptions; exports.getDetachAssetMutationOptions = getDetachAssetMutationOptions; exports.getDisableAssetMutationOptions = getDisableAssetMutationOptions; exports.getEnableAssetMutationOptions = getEnableAssetMutationOptions; exports.getGetAssetQueryKey = getGetAssetQueryKey; exports.getGetAssetQueryOptions = getGetAssetQueryOptions; exports.getGetAssetSuspenseQueryOptions = getGetAssetSuspenseQueryOptions; exports.getGetSpecificAssetQueryKey = getGetSpecificAssetQueryKey; exports.getGetSpecificAssetQueryOptions = getGetSpecificAssetQueryOptions; exports.getGetSpecificAssetSuspenseQueryOptions = getGetSpecificAssetSuspenseQueryOptions; exports.getPatchAssetMutationOptions = getPatchAssetMutationOptions; exports.getSpecificAsset = getSpecificAsset; exports.patchAsset = patchAsset; exports.useAttachAsset = useAttachAsset; exports.useCreateAsset = useCreateAsset; exports.useDeleteAsset = useDeleteAsset; exports.useDetachAsset = useDetachAsset; exports.useDisableAsset = useDisableAsset; exports.useEnableAsset = useEnableAsset; exports.useGetAsset = useGetAsset; exports.useGetAssetSuspense = useGetAssetSuspense; exports.useGetSpecificAsset = useGetSpecificAsset; exports.useGetSpecificAssetSuspense = useGetSpecificAssetSuspense; exports.usePatchAsset = usePatchAsset;
|
|
257
300
|
//# sourceMappingURL=asset.cjs.map
|
package/asset/asset.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/asset/asset.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAU,QAAQ;AAAA,MACtB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAC7D,SAAO,CAAC,sBAAsB,UAAU,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,0BAA0B,CAAm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UAAU,OAAO;AAAA,MAAW,QAAQ;AAAA,MACxC;AAAA,IACJ;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,gCAAgC,CACrB,YACyG;AAChI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAsH,CAAC,UAAU;AACnI,UAAM,EAAC,SAAQ,OAAM,IAAI,SAAS,CAAC;AAEnC,WAAQ,YAAY,SAAQ,QAAO,cAAc;AAAA,EACnD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,iBAAiB,CACN,YACnB;AAEC,QAAM,kBAAkB,8BAA8B,OAAO;AAE7D,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n AssetGetResponse,\n AssetPatchBodyBody,\n AssetPostBodyBody,\n AssetPostResponse,\n AttachAssetParams,\n DetachAssetParams,\n GetAssetParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Assets you have access to.\n\n * @summary Gets Assets\n */\nexport const getAsset = (\n params?: GetAssetParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetGetResponse>(\n {url: `/asset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAssetQueryKey = (params?: GetAssetParams,) => {\n return [\"account-server-api\", `/asset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAssetQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAsset = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAssetSuspense = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**\n\nAssets are text and file resources that can be requested by **Merchants**. The Data Manager **Merchant** uses assets to provide additional information that's often sensitive to **Job** (and **Application**) **Instances**.\n\nAssets must be *enabled* before they can be used.\n\nThey must also be *attached* to a **Merchant** before the **Merchant** can ue them. Assets are only available to merchants if they are enabled and attached.\n\n * @summary Create an Asset\n */\nexport const createAsset = (\n assetPostBodyBody: AssetPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', assetPostBodyBody.name)\nif(assetPostBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPostBodyBody.content_file)\n }\nif(assetPostBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPostBodyBody.content_string)\n }\nformData.append('scope', assetPostBodyBody.scope)\nif(assetPostBodyBody.scope_id !== undefined) {\n formData.append('scope_id', assetPostBodyBody.scope_id)\n }\nformData.append('secret', assetPostBodyBody.secret.toString())\nif(assetPostBodyBody.description !== undefined) {\n formData.append('description', assetPostBodyBody.description)\n }\n\n return customInstance<AssetPostResponse>(\n {url: `/asset`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAsset>>, {data: AssetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createAsset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateAssetMutationResult = NonNullable<Awaited<ReturnType<typeof createAsset>>>\n export type CreateAssetMutationBody = AssetPostBodyBody\n export type CreateAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create an Asset\n */\nexport const useCreateAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Used to update or replace Asset *Content* or *Description*.\n\nThe content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Adjust an existing Asset\n */\nexport const patchAsset = (\n assetId: string,\n assetPatchBodyBody: AssetPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(assetPatchBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPatchBodyBody.content_file)\n }\nif(assetPatchBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPatchBodyBody.content_string)\n }\nif(assetPatchBodyBody.description !== undefined) {\n formData.append('description', assetPatchBodyBody.description)\n }\n\n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'PATCH',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchAsset>>, {assetId: string;data: AssetPatchBodyBody}> = (props) => {\n const {assetId,data} = props ?? {};\n\n return patchAsset(assetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchAssetMutationResult = NonNullable<Awaited<ReturnType<typeof patchAsset>>>\n export type PatchAssetMutationBody = AssetPatchBodyBody\n export type PatchAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Asset\n */\nexport const usePatchAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Deletes an Asset\n */\nexport const deleteAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return deleteAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAssetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAsset>>>\n \n export type DeleteAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Asset\n */\nexport const useDeleteAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Disables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Disables an Asset\n */\nexport const disableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/disable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getDisableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof disableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return disableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DisableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof disableAsset>>>\n \n export type DisableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Disables an Asset\n */\nexport const useDisableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDisableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Enables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Enables an Asset\n */\nexport const enableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/enable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getEnableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof enableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return enableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type EnableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof enableAsset>>>\n \n export type EnableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Enables an Asset\n */\nexport const useEnableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getEnableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Attaches an Asset to a Merchant\n */\nexport const attachAsset = (\n assetId: string,\n params?: AttachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/attach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getAttachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAsset>>, {assetId: string;params?: AttachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return attachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof attachAsset>>>\n \n export type AttachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Attaches an Asset to a Merchant\n */\nexport const useAttachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Detaches an Asset from a **Merchant**\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Detaches an Asset from a Merchant\n */\nexport const detachAsset = (\n assetId: string,\n params?: DetachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/detach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getDetachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof detachAsset>>, {assetId: string;params?: DetachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return detachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DetachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof detachAsset>>>\n \n export type DetachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Detaches an Asset from a Merchant\n */\nexport const useDetachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDetachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
|
|
1
|
+
{"version":3,"sources":["../../src/asset/asset.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAU,QAAQ;AAAA,MACtB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAC7D,SAAO,CAAC,sBAAsB,UAAU,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,0BAA0B,CAAmF,QAAyB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,oBAAoB,MAAM;AAIpE,QAAM,UAA+D,CAAC,EAAE,OAAO,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,cAAc,CAC1B,QAAyB,YAEsC;AAE9D,QAAM,eAAe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M,iBAAiB,CACN,YACnB;AAEC,QAAM,kBAAkB,8BAA8B,OAAO;AAE7D,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n AssetDetail,\n AssetGetResponse,\n AssetPatchBodyBody,\n AssetPostBodyBody,\n AssetPostResponse,\n AttachAssetParams,\n DetachAssetParams,\n GetAssetParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Assets you have access to.\n\n * @summary Gets Assets\n */\nexport const getAsset = (\n params?: GetAssetParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetGetResponse>(\n {url: `/asset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAssetQueryKey = (params?: GetAssetParams,) => {\n return [\"account-server-api\", `/asset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAssetQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAsset = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAssetSuspense = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**\n\nAssets are text and file resources that can be requested by **Merchants**. The Data Manager **Merchant** uses assets to provide additional information that's often sensitive to **Job** (and **Application**) **Instances**.\n\nAssets must be *enabled* before they can be used.\n\nThey must also be *attached* to a **Merchant** before the **Merchant** can ue them. Assets are only available to merchants if they are enabled and attached.\n\n * @summary Create an Asset\n */\nexport const createAsset = (\n assetPostBodyBody: AssetPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', assetPostBodyBody.name)\nif(assetPostBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPostBodyBody.content_file)\n }\nif(assetPostBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPostBodyBody.content_string)\n }\nformData.append('scope', assetPostBodyBody.scope)\nif(assetPostBodyBody.scope_id !== undefined) {\n formData.append('scope_id', assetPostBodyBody.scope_id)\n }\nformData.append('secret', assetPostBodyBody.secret.toString())\nif(assetPostBodyBody.description !== undefined) {\n formData.append('description', assetPostBodyBody.description)\n }\n\n return customInstance<AssetPostResponse>(\n {url: `/asset`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAsset>>, {data: AssetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createAsset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateAssetMutationResult = NonNullable<Awaited<ReturnType<typeof createAsset>>>\n export type CreateAssetMutationBody = AssetPostBodyBody\n export type CreateAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create an Asset\n */\nexport const useCreateAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a known Asset\n\n * @summary Gets an Asset\n */\nexport const getSpecificAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetDetail>(\n {url: `/asset/${assetId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetSpecificAssetQueryKey = (assetId: string,) => {\n return [\"account-server-api\", `/asset/${assetId}`] as const;\n }\n\n \nexport const getGetSpecificAssetQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets an Asset\n */\nexport const useGetSpecificAsset = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSpecificAssetQueryOptions(assetId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetSpecificAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets an Asset\n */\nexport const useGetSpecificAssetSuspense = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update or replace Asset *Content* or *Description*.\n\nThe content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Adjust an existing Asset\n */\nexport const patchAsset = (\n assetId: string,\n assetPatchBodyBody: AssetPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(assetPatchBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPatchBodyBody.content_file)\n }\nif(assetPatchBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPatchBodyBody.content_string)\n }\nif(assetPatchBodyBody.description !== undefined) {\n formData.append('description', assetPatchBodyBody.description)\n }\n\n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'PATCH',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchAsset>>, {assetId: string;data: AssetPatchBodyBody}> = (props) => {\n const {assetId,data} = props ?? {};\n\n return patchAsset(assetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchAssetMutationResult = NonNullable<Awaited<ReturnType<typeof patchAsset>>>\n export type PatchAssetMutationBody = AssetPatchBodyBody\n export type PatchAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Asset\n */\nexport const usePatchAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Deletes an Asset\n */\nexport const deleteAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return deleteAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAssetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAsset>>>\n \n export type DeleteAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Asset\n */\nexport const useDeleteAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Disables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Disables an Asset\n */\nexport const disableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/disable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getDisableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof disableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return disableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DisableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof disableAsset>>>\n \n export type DisableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Disables an Asset\n */\nexport const useDisableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDisableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Enables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Enables an Asset\n */\nexport const enableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/enable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getEnableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof enableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return enableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type EnableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof enableAsset>>>\n \n export type EnableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Enables an Asset\n */\nexport const useEnableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getEnableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Attaches an Asset to a Merchant\n */\nexport const attachAsset = (\n assetId: string,\n params?: AttachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/attach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getAttachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAsset>>, {assetId: string;params?: AttachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return attachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof attachAsset>>>\n \n export type AttachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Attaches an Asset to a Merchant\n */\nexport const useAttachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Detaches an Asset from a **Merchant**\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Detaches an Asset from a Merchant\n */\nexport const detachAsset = (\n assetId: string,\n params?: DetachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/detach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getDetachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof detachAsset>>, {assetId: string;params?: DetachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return detachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DetachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof detachAsset>>>\n \n export type DetachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Detaches an Asset from a Merchant\n */\nexport const useDetachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDetachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
|
package/asset/asset.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import { GetAssetParams, customInstance, AssetGetResponse, ErrorType, AsError, AssetPostBodyBody, AssetPostResponse, AssetPatchBodyBody, AttachAssetParams, DetachAssetParams } from '../index.cjs';
|
|
3
|
+
import { GetAssetParams, customInstance, AssetGetResponse, ErrorType, AsError, AssetPostBodyBody, AssetPostResponse, AssetDetail, AssetPatchBodyBody, AttachAssetParams, DetachAssetParams } from '../index.cjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
@@ -80,14 +80,55 @@ declare const useCreateAsset: <TError = ErrorType<void | AsError>, TContext = un
|
|
|
80
80
|
data: AssetPostBodyBody;
|
|
81
81
|
}, TContext>;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Gets a known Asset
|
|
84
|
+
|
|
85
|
+
* @summary Gets an Asset
|
|
86
|
+
*/
|
|
87
|
+
declare const getSpecificAsset: (assetId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<AssetDetail>;
|
|
88
|
+
declare const getGetSpecificAssetQueryKey: (assetId: string) => readonly ["account-server-api", `/asset/${string}`];
|
|
89
|
+
declare const getGetSpecificAssetQueryOptions: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
90
|
+
query?: Partial<UseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
91
|
+
request?: SecondParameter<typeof customInstance>;
|
|
92
|
+
} | undefined) => UseQueryOptions<AssetDetail, TError, TData, QueryKey> & {
|
|
93
|
+
queryKey: QueryKey;
|
|
94
|
+
};
|
|
95
|
+
type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>;
|
|
96
|
+
type GetSpecificAssetQueryError = ErrorType<AsError | void>;
|
|
97
|
+
/**
|
|
98
|
+
* @summary Gets an Asset
|
|
99
|
+
*/
|
|
100
|
+
declare const useGetSpecificAsset: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
101
|
+
query?: Partial<UseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
102
|
+
request?: SecondParameter<typeof customInstance>;
|
|
103
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
104
|
+
queryKey: QueryKey;
|
|
105
|
+
};
|
|
106
|
+
declare const getGetSpecificAssetSuspenseQueryOptions: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
107
|
+
query?: Partial<UseSuspenseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
108
|
+
request?: SecondParameter<typeof customInstance>;
|
|
109
|
+
} | undefined) => UseSuspenseQueryOptions<AssetDetail, TError, TData, QueryKey> & {
|
|
110
|
+
queryKey: QueryKey;
|
|
111
|
+
};
|
|
112
|
+
type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>;
|
|
113
|
+
type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>;
|
|
114
|
+
/**
|
|
115
|
+
* @summary Gets an Asset
|
|
116
|
+
*/
|
|
117
|
+
declare const useGetSpecificAssetSuspense: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
118
|
+
query?: Partial<UseSuspenseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
119
|
+
request?: SecondParameter<typeof customInstance>;
|
|
120
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
121
|
+
queryKey: QueryKey;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Used to update or replace Asset *Content* or *Description*.
|
|
84
125
|
|
|
85
126
|
The content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.
|
|
86
127
|
|
|
87
128
|
Anyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.
|
|
88
129
|
|
|
89
|
-
* @summary Adjust an existing Asset
|
|
90
|
-
*/
|
|
130
|
+
* @summary Adjust an existing Asset
|
|
131
|
+
*/
|
|
91
132
|
declare const patchAsset: (assetId: string, assetPatchBodyBody: AssetPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
92
133
|
declare const getPatchAssetMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
93
134
|
mutation?: UseMutationOptions<void, TError, {
|
|
@@ -269,4 +310,4 @@ declare const useDetachAsset: <TError = ErrorType<AsError>, TContext = unknown>(
|
|
|
269
310
|
params?: DetachAssetParams | undefined;
|
|
270
311
|
}, TContext>;
|
|
271
312
|
|
|
272
|
-
export { type AttachAssetMutationError, type AttachAssetMutationResult, type CreateAssetMutationBody, type CreateAssetMutationError, type CreateAssetMutationResult, type DeleteAssetMutationError, type DeleteAssetMutationResult, type DetachAssetMutationError, type DetachAssetMutationResult, type DisableAssetMutationError, type DisableAssetMutationResult, type EnableAssetMutationError, type EnableAssetMutationResult, type GetAssetQueryError, type GetAssetQueryResult, type GetAssetSuspenseQueryError, type GetAssetSuspenseQueryResult, type PatchAssetMutationBody, type PatchAssetMutationError, type PatchAssetMutationResult, attachAsset, createAsset, deleteAsset, detachAsset, disableAsset, enableAsset, getAsset, getAttachAssetMutationOptions, getCreateAssetMutationOptions, getDeleteAssetMutationOptions, getDetachAssetMutationOptions, getDisableAssetMutationOptions, getEnableAssetMutationOptions, getGetAssetQueryKey, getGetAssetQueryOptions, getGetAssetSuspenseQueryOptions, getPatchAssetMutationOptions, patchAsset, useAttachAsset, useCreateAsset, useDeleteAsset, useDetachAsset, useDisableAsset, useEnableAsset, useGetAsset, useGetAssetSuspense, usePatchAsset };
|
|
313
|
+
export { type AttachAssetMutationError, type AttachAssetMutationResult, type CreateAssetMutationBody, type CreateAssetMutationError, type CreateAssetMutationResult, type DeleteAssetMutationError, type DeleteAssetMutationResult, type DetachAssetMutationError, type DetachAssetMutationResult, type DisableAssetMutationError, type DisableAssetMutationResult, type EnableAssetMutationError, type EnableAssetMutationResult, type GetAssetQueryError, type GetAssetQueryResult, type GetAssetSuspenseQueryError, type GetAssetSuspenseQueryResult, type GetSpecificAssetQueryError, type GetSpecificAssetQueryResult, type GetSpecificAssetSuspenseQueryError, type GetSpecificAssetSuspenseQueryResult, type PatchAssetMutationBody, type PatchAssetMutationError, type PatchAssetMutationResult, attachAsset, createAsset, deleteAsset, detachAsset, disableAsset, enableAsset, getAsset, getAttachAssetMutationOptions, getCreateAssetMutationOptions, getDeleteAssetMutationOptions, getDetachAssetMutationOptions, getDisableAssetMutationOptions, getEnableAssetMutationOptions, getGetAssetQueryKey, getGetAssetQueryOptions, getGetAssetSuspenseQueryOptions, getGetSpecificAssetQueryKey, getGetSpecificAssetQueryOptions, getGetSpecificAssetSuspenseQueryOptions, getPatchAssetMutationOptions, getSpecificAsset, patchAsset, useAttachAsset, useCreateAsset, useDeleteAsset, useDetachAsset, useDisableAsset, useEnableAsset, useGetAsset, useGetAssetSuspense, useGetSpecificAsset, useGetSpecificAssetSuspense, usePatchAsset };
|
package/asset/asset.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import { GetAssetParams, customInstance, AssetGetResponse, ErrorType, AsError, AssetPostBodyBody, AssetPostResponse, AssetPatchBodyBody, AttachAssetParams, DetachAssetParams } from '../index.js';
|
|
3
|
+
import { GetAssetParams, customInstance, AssetGetResponse, ErrorType, AsError, AssetPostBodyBody, AssetPostResponse, AssetDetail, AssetPatchBodyBody, AttachAssetParams, DetachAssetParams } from '../index.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
@@ -80,14 +80,55 @@ declare const useCreateAsset: <TError = ErrorType<void | AsError>, TContext = un
|
|
|
80
80
|
data: AssetPostBodyBody;
|
|
81
81
|
}, TContext>;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Gets a known Asset
|
|
84
|
+
|
|
85
|
+
* @summary Gets an Asset
|
|
86
|
+
*/
|
|
87
|
+
declare const getSpecificAsset: (assetId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<AssetDetail>;
|
|
88
|
+
declare const getGetSpecificAssetQueryKey: (assetId: string) => readonly ["account-server-api", `/asset/${string}`];
|
|
89
|
+
declare const getGetSpecificAssetQueryOptions: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
90
|
+
query?: Partial<UseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
91
|
+
request?: SecondParameter<typeof customInstance>;
|
|
92
|
+
} | undefined) => UseQueryOptions<AssetDetail, TError, TData, QueryKey> & {
|
|
93
|
+
queryKey: QueryKey;
|
|
94
|
+
};
|
|
95
|
+
type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>;
|
|
96
|
+
type GetSpecificAssetQueryError = ErrorType<AsError | void>;
|
|
97
|
+
/**
|
|
98
|
+
* @summary Gets an Asset
|
|
99
|
+
*/
|
|
100
|
+
declare const useGetSpecificAsset: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
101
|
+
query?: Partial<UseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
102
|
+
request?: SecondParameter<typeof customInstance>;
|
|
103
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
104
|
+
queryKey: QueryKey;
|
|
105
|
+
};
|
|
106
|
+
declare const getGetSpecificAssetSuspenseQueryOptions: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
107
|
+
query?: Partial<UseSuspenseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
108
|
+
request?: SecondParameter<typeof customInstance>;
|
|
109
|
+
} | undefined) => UseSuspenseQueryOptions<AssetDetail, TError, TData, QueryKey> & {
|
|
110
|
+
queryKey: QueryKey;
|
|
111
|
+
};
|
|
112
|
+
type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>;
|
|
113
|
+
type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>;
|
|
114
|
+
/**
|
|
115
|
+
* @summary Gets an Asset
|
|
116
|
+
*/
|
|
117
|
+
declare const useGetSpecificAssetSuspense: <TData = AssetDetail, TError = ErrorType<void | AsError>>(assetId: string, options?: {
|
|
118
|
+
query?: Partial<UseSuspenseQueryOptions<AssetDetail, TError, TData, QueryKey>> | undefined;
|
|
119
|
+
request?: SecondParameter<typeof customInstance>;
|
|
120
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
121
|
+
queryKey: QueryKey;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Used to update or replace Asset *Content* or *Description*.
|
|
84
125
|
|
|
85
126
|
The content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.
|
|
86
127
|
|
|
87
128
|
Anyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.
|
|
88
129
|
|
|
89
|
-
* @summary Adjust an existing Asset
|
|
90
|
-
*/
|
|
130
|
+
* @summary Adjust an existing Asset
|
|
131
|
+
*/
|
|
91
132
|
declare const patchAsset: (assetId: string, assetPatchBodyBody: AssetPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
92
133
|
declare const getPatchAssetMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
|
|
93
134
|
mutation?: UseMutationOptions<void, TError, {
|
|
@@ -269,4 +310,4 @@ declare const useDetachAsset: <TError = ErrorType<AsError>, TContext = unknown>(
|
|
|
269
310
|
params?: DetachAssetParams | undefined;
|
|
270
311
|
}, TContext>;
|
|
271
312
|
|
|
272
|
-
export { type AttachAssetMutationError, type AttachAssetMutationResult, type CreateAssetMutationBody, type CreateAssetMutationError, type CreateAssetMutationResult, type DeleteAssetMutationError, type DeleteAssetMutationResult, type DetachAssetMutationError, type DetachAssetMutationResult, type DisableAssetMutationError, type DisableAssetMutationResult, type EnableAssetMutationError, type EnableAssetMutationResult, type GetAssetQueryError, type GetAssetQueryResult, type GetAssetSuspenseQueryError, type GetAssetSuspenseQueryResult, type PatchAssetMutationBody, type PatchAssetMutationError, type PatchAssetMutationResult, attachAsset, createAsset, deleteAsset, detachAsset, disableAsset, enableAsset, getAsset, getAttachAssetMutationOptions, getCreateAssetMutationOptions, getDeleteAssetMutationOptions, getDetachAssetMutationOptions, getDisableAssetMutationOptions, getEnableAssetMutationOptions, getGetAssetQueryKey, getGetAssetQueryOptions, getGetAssetSuspenseQueryOptions, getPatchAssetMutationOptions, patchAsset, useAttachAsset, useCreateAsset, useDeleteAsset, useDetachAsset, useDisableAsset, useEnableAsset, useGetAsset, useGetAssetSuspense, usePatchAsset };
|
|
313
|
+
export { type AttachAssetMutationError, type AttachAssetMutationResult, type CreateAssetMutationBody, type CreateAssetMutationError, type CreateAssetMutationResult, type DeleteAssetMutationError, type DeleteAssetMutationResult, type DetachAssetMutationError, type DetachAssetMutationResult, type DisableAssetMutationError, type DisableAssetMutationResult, type EnableAssetMutationError, type EnableAssetMutationResult, type GetAssetQueryError, type GetAssetQueryResult, type GetAssetSuspenseQueryError, type GetAssetSuspenseQueryResult, type GetSpecificAssetQueryError, type GetSpecificAssetQueryResult, type GetSpecificAssetSuspenseQueryError, type GetSpecificAssetSuspenseQueryResult, type PatchAssetMutationBody, type PatchAssetMutationError, type PatchAssetMutationResult, attachAsset, createAsset, deleteAsset, detachAsset, disableAsset, enableAsset, getAsset, getAttachAssetMutationOptions, getCreateAssetMutationOptions, getDeleteAssetMutationOptions, getDetachAssetMutationOptions, getDisableAssetMutationOptions, getEnableAssetMutationOptions, getGetAssetQueryKey, getGetAssetQueryOptions, getGetAssetSuspenseQueryOptions, getGetSpecificAssetQueryKey, getGetSpecificAssetQueryOptions, getGetSpecificAssetSuspenseQueryOptions, getPatchAssetMutationOptions, getSpecificAsset, patchAsset, useAttachAsset, useCreateAsset, useDeleteAsset, useDetachAsset, useDisableAsset, useEnableAsset, useGetAsset, useGetAssetSuspense, useGetSpecificAsset, useGetSpecificAssetSuspense, usePatchAsset };
|
package/asset/asset.js
CHANGED
|
@@ -85,6 +85,43 @@ var useCreateAsset = (options) => {
|
|
|
85
85
|
const mutationOptions = getCreateAssetMutationOptions(options);
|
|
86
86
|
return useMutation(mutationOptions);
|
|
87
87
|
};
|
|
88
|
+
var getSpecificAsset = (assetId, options, signal) => {
|
|
89
|
+
return customInstance(
|
|
90
|
+
{
|
|
91
|
+
url: `/asset/${assetId}`,
|
|
92
|
+
method: "GET",
|
|
93
|
+
signal
|
|
94
|
+
},
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
var getGetSpecificAssetQueryKey = (assetId) => {
|
|
99
|
+
return ["account-server-api", `/asset/${assetId}`];
|
|
100
|
+
};
|
|
101
|
+
var getGetSpecificAssetQueryOptions = (assetId, options) => {
|
|
102
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
103
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetSpecificAssetQueryKey(assetId);
|
|
104
|
+
const queryFn = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);
|
|
105
|
+
return { queryKey, queryFn, enabled: !!assetId, ...queryOptions };
|
|
106
|
+
};
|
|
107
|
+
var useGetSpecificAsset = (assetId, options) => {
|
|
108
|
+
const queryOptions = getGetSpecificAssetQueryOptions(assetId, options);
|
|
109
|
+
const query = useQuery(queryOptions);
|
|
110
|
+
query.queryKey = queryOptions.queryKey;
|
|
111
|
+
return query;
|
|
112
|
+
};
|
|
113
|
+
var getGetSpecificAssetSuspenseQueryOptions = (assetId, options) => {
|
|
114
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
115
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetSpecificAssetQueryKey(assetId);
|
|
116
|
+
const queryFn = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);
|
|
117
|
+
return { queryKey, queryFn, enabled: !!assetId, ...queryOptions };
|
|
118
|
+
};
|
|
119
|
+
var useGetSpecificAssetSuspense = (assetId, options) => {
|
|
120
|
+
const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId, options);
|
|
121
|
+
const query = useSuspenseQuery(queryOptions);
|
|
122
|
+
query.queryKey = queryOptions.queryKey;
|
|
123
|
+
return query;
|
|
124
|
+
};
|
|
88
125
|
var patchAsset = (assetId, assetPatchBodyBody, options) => {
|
|
89
126
|
const formData = new FormData();
|
|
90
127
|
if (assetPatchBodyBody.content_file !== void 0) {
|
|
@@ -242,7 +279,11 @@ export {
|
|
|
242
279
|
getGetAssetQueryKey,
|
|
243
280
|
getGetAssetQueryOptions,
|
|
244
281
|
getGetAssetSuspenseQueryOptions,
|
|
282
|
+
getGetSpecificAssetQueryKey,
|
|
283
|
+
getGetSpecificAssetQueryOptions,
|
|
284
|
+
getGetSpecificAssetSuspenseQueryOptions,
|
|
245
285
|
getPatchAssetMutationOptions,
|
|
286
|
+
getSpecificAsset,
|
|
246
287
|
patchAsset,
|
|
247
288
|
useAttachAsset,
|
|
248
289
|
useCreateAsset,
|
|
@@ -252,6 +293,8 @@ export {
|
|
|
252
293
|
useEnableAsset,
|
|
253
294
|
useGetAsset,
|
|
254
295
|
useGetAssetSuspense,
|
|
296
|
+
useGetSpecificAsset,
|
|
297
|
+
useGetSpecificAssetSuspense,
|
|
255
298
|
usePatchAsset
|
|
256
299
|
};
|
|
257
300
|
//# sourceMappingURL=asset.js.map
|
package/asset/asset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/asset/asset.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n AssetGetResponse,\n AssetPatchBodyBody,\n AssetPostBodyBody,\n AssetPostResponse,\n AttachAssetParams,\n DetachAssetParams,\n GetAssetParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Assets you have access to.\n\n * @summary Gets Assets\n */\nexport const getAsset = (\n params?: GetAssetParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetGetResponse>(\n {url: `/asset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAssetQueryKey = (params?: GetAssetParams,) => {\n return [\"account-server-api\", `/asset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAssetQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAsset = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAssetSuspense = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**\n\nAssets are text and file resources that can be requested by **Merchants**. The Data Manager **Merchant** uses assets to provide additional information that's often sensitive to **Job** (and **Application**) **Instances**.\n\nAssets must be *enabled* before they can be used.\n\nThey must also be *attached* to a **Merchant** before the **Merchant** can ue them. Assets are only available to merchants if they are enabled and attached.\n\n * @summary Create an Asset\n */\nexport const createAsset = (\n assetPostBodyBody: AssetPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', assetPostBodyBody.name)\nif(assetPostBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPostBodyBody.content_file)\n }\nif(assetPostBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPostBodyBody.content_string)\n }\nformData.append('scope', assetPostBodyBody.scope)\nif(assetPostBodyBody.scope_id !== undefined) {\n formData.append('scope_id', assetPostBodyBody.scope_id)\n }\nformData.append('secret', assetPostBodyBody.secret.toString())\nif(assetPostBodyBody.description !== undefined) {\n formData.append('description', assetPostBodyBody.description)\n }\n\n return customInstance<AssetPostResponse>(\n {url: `/asset`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAsset>>, {data: AssetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createAsset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateAssetMutationResult = NonNullable<Awaited<ReturnType<typeof createAsset>>>\n export type CreateAssetMutationBody = AssetPostBodyBody\n export type CreateAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create an Asset\n */\nexport const useCreateAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Used to update or replace Asset *Content* or *Description*.\n\nThe content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Adjust an existing Asset\n */\nexport const patchAsset = (\n assetId: string,\n assetPatchBodyBody: AssetPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(assetPatchBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPatchBodyBody.content_file)\n }\nif(assetPatchBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPatchBodyBody.content_string)\n }\nif(assetPatchBodyBody.description !== undefined) {\n formData.append('description', assetPatchBodyBody.description)\n }\n\n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'PATCH',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchAsset>>, {assetId: string;data: AssetPatchBodyBody}> = (props) => {\n const {assetId,data} = props ?? {};\n\n return patchAsset(assetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchAssetMutationResult = NonNullable<Awaited<ReturnType<typeof patchAsset>>>\n export type PatchAssetMutationBody = AssetPatchBodyBody\n export type PatchAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Asset\n */\nexport const usePatchAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Deletes an Asset\n */\nexport const deleteAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return deleteAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAssetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAsset>>>\n \n export type DeleteAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Asset\n */\nexport const useDeleteAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Disables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Disables an Asset\n */\nexport const disableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/disable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getDisableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof disableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return disableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DisableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof disableAsset>>>\n \n export type DisableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Disables an Asset\n */\nexport const useDisableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDisableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Enables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Enables an Asset\n */\nexport const enableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/enable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getEnableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof enableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return enableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type EnableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof enableAsset>>>\n \n export type EnableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Enables an Asset\n */\nexport const useEnableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getEnableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Attaches an Asset to a Merchant\n */\nexport const attachAsset = (\n assetId: string,\n params?: AttachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/attach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getAttachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAsset>>, {assetId: string;params?: AttachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return attachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof attachAsset>>>\n \n export type AttachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Attaches an Asset to a Merchant\n */\nexport const useAttachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Detaches an Asset from a **Merchant**\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Detaches an Asset from a Merchant\n */\nexport const detachAsset = (\n assetId: string,\n params?: DetachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/detach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getDetachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof detachAsset>>, {assetId: string;params?: DetachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return detachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DetachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof detachAsset>>>\n \n export type DetachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Detaches an Asset from a Merchant\n */\nexport const useDetachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDetachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAU,QAAQ;AAAA,MACtB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAC7D,SAAO,CAAC,sBAAsB,UAAU,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAClE;AAGG,IAAM,0BAA0B,CAAmF,QAAyB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,oBAAoB,MAAM;AAIpE,QAAM,UAA+D,CAAC,EAAE,OAAO,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,cAAc,CAC1B,QAAyB,YAEsC;AAE9D,QAAM,eAAe,wBAAwB,QAAO,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,kCAAkC,CAAmF,QAAyB,YACtJ;AAEL,QAAM,EAAC,OAAO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1
|
+
{"version":3,"sources":["../../src/asset/asset.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n AssetDetail,\n AssetGetResponse,\n AssetPatchBodyBody,\n AssetPostBodyBody,\n AssetPostResponse,\n AttachAssetParams,\n DetachAssetParams,\n GetAssetParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Assets you have access to.\n\n * @summary Gets Assets\n */\nexport const getAsset = (\n params?: GetAssetParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetGetResponse>(\n {url: `/asset`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetAssetQueryKey = (params?: GetAssetParams,) => {\n return [\"account-server-api\", `/asset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetAssetQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAsset = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetAssetQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getAsset>>> = ({ signal }) => getAsset(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getAsset>>>\nexport type GetAssetSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets Assets\n */\nexport const useGetAssetSuspense = <TData = Awaited<ReturnType<typeof getAsset>>, TError = ErrorType<AsError | void>>(\n params?: GetAssetParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetAssetSuspenseQueryOptions(params,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**\n\nAssets are text and file resources that can be requested by **Merchants**. The Data Manager **Merchant** uses assets to provide additional information that's often sensitive to **Job** (and **Application**) **Instances**.\n\nAssets must be *enabled* before they can be used.\n\nThey must also be *attached* to a **Merchant** before the **Merchant** can ue them. Assets are only available to merchants if they are enabled and attached.\n\n * @summary Create an Asset\n */\nexport const createAsset = (\n assetPostBodyBody: AssetPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nformData.append('name', assetPostBodyBody.name)\nif(assetPostBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPostBodyBody.content_file)\n }\nif(assetPostBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPostBodyBody.content_string)\n }\nformData.append('scope', assetPostBodyBody.scope)\nif(assetPostBodyBody.scope_id !== undefined) {\n formData.append('scope_id', assetPostBodyBody.scope_id)\n }\nformData.append('secret', assetPostBodyBody.secret.toString())\nif(assetPostBodyBody.description !== undefined) {\n formData.append('description', assetPostBodyBody.description)\n }\n\n return customInstance<AssetPostResponse>(\n {url: `/asset`, method: 'POST',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateAssetMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createAsset>>, {data: AssetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createAsset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateAssetMutationResult = NonNullable<Awaited<ReturnType<typeof createAsset>>>\n export type CreateAssetMutationBody = AssetPostBodyBody\n export type CreateAssetMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create an Asset\n */\nexport const useCreateAsset = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createAsset>>, TError,{data: AssetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets a known Asset\n\n * @summary Gets an Asset\n */\nexport const getSpecificAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<AssetDetail>(\n {url: `/asset/${assetId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetSpecificAssetQueryKey = (assetId: string,) => {\n return [\"account-server-api\", `/asset/${assetId}`] as const;\n }\n\n \nexport const getGetSpecificAssetQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets an Asset\n */\nexport const useGetSpecificAsset = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSpecificAssetQueryOptions(assetId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetSpecificAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>\nexport type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets an Asset\n */\nexport const useGetSpecificAssetSuspense = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(\n assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update or replace Asset *Content* or *Description*.\n\nThe content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Adjust an existing Asset\n */\nexport const patchAsset = (\n assetId: string,\n assetPatchBodyBody: AssetPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(assetPatchBodyBody.content_file !== undefined) {\n formData.append('content_file', assetPatchBodyBody.content_file)\n }\nif(assetPatchBodyBody.content_string !== undefined) {\n formData.append('content_string', assetPatchBodyBody.content_string)\n }\nif(assetPatchBodyBody.description !== undefined) {\n formData.append('description', assetPatchBodyBody.description)\n }\n\n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'PATCH',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchAsset>>, {assetId: string;data: AssetPatchBodyBody}> = (props) => {\n const {assetId,data} = props ?? {};\n\n return patchAsset(assetId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchAssetMutationResult = NonNullable<Awaited<ReturnType<typeof patchAsset>>>\n export type PatchAssetMutationBody = AssetPatchBodyBody\n export type PatchAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Asset\n */\nexport const usePatchAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchAsset>>, TError,{assetId: string;data: AssetPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Deletes an Asset\n */\nexport const deleteAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return deleteAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteAssetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteAsset>>>\n \n export type DeleteAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Asset\n */\nexport const useDeleteAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Disables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Disables an Asset\n */\nexport const disableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/disable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getDisableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof disableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return disableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DisableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof disableAsset>>>\n \n export type DisableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Disables an Asset\n */\nexport const useDisableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof disableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDisableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Enables a known Asset\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Enables an Asset\n */\nexport const enableAsset = (\n assetId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/enable`, method: 'PATCH'\n },\n options);\n }\n \n\n\nexport const getEnableAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof enableAsset>>, {assetId: string}> = (props) => {\n const {assetId} = props ?? {};\n\n return enableAsset(assetId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type EnableAssetMutationResult = NonNullable<Awaited<ReturnType<typeof enableAsset>>>\n \n export type EnableAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Enables an Asset\n */\nexport const useEnableAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof enableAsset>>, TError,{assetId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getEnableAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Attaches an Asset to a Merchant\n */\nexport const attachAsset = (\n assetId: string,\n params?: AttachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/attach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getAttachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof attachAsset>>, {assetId: string;params?: AttachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return attachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AttachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof attachAsset>>>\n \n export type AttachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Attaches an Asset to a Merchant\n */\nexport const useAttachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof attachAsset>>, TError,{assetId: string;params?: AttachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAttachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Detaches an Asset from a **Merchant**\n\nAnyone can alter a `GLOBAL` asset. For other *scopes* you will need to be the user for `USER` scoped assets, a member of the **Unit** for `UNIT` and `PRODUCT` scoped assets, or a member of the **Organisation** for `ORGANISATION` scoped assets. Administrators can patch any asset.\n\n * @summary Detaches an Asset from a Merchant\n */\nexport const detachAsset = (\n assetId: string,\n params?: DetachAssetParams,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/asset/${assetId}/detach`, method: 'PATCH',\n params\n },\n options);\n }\n \n\n\nexport const getDetachAssetMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof detachAsset>>, {assetId: string;params?: DetachAssetParams}> = (props) => {\n const {assetId,params} = props ?? {};\n\n return detachAsset(assetId,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DetachAssetMutationResult = NonNullable<Awaited<ReturnType<typeof detachAsset>>>\n \n export type DetachAssetMutationError = ErrorType<AsError>\n\n /**\n * @summary Detaches an Asset from a Merchant\n */\nexport const useDetachAsset = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof detachAsset>>, TError,{assetId: string;params?: DetachAssetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDetachAssetMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7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AAgB;AAAA,EAChB,iBAAiB;AACnB;AAuBO,IAAM,gDAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAeO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA+CO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA8BO,IAAM,0CAA0C;AAAA,EACrD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAyBO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAUO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAwCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AA+EO,IAAM,sDAAsD;AAAA,EACjE,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB","sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: 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\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 ProductPatchBodyBody = {\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 /** The name you want to give the Product */\n name?: string;\n};\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 = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\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 = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\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\nexport type UnitProductPostBodyBody = {\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 Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The 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};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value\n */\nexport type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type UnitPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Unit */\n name?: string;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units\n */\nexport type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units */\n default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Organisational */\n name?: string;\n};\n\n/**\n * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value\n */\nexport type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationUnitPostBodyBody = {\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 /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;\n /** The name of the unit */\n name: string;\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\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPostBodyBody = {\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\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 = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** 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 scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\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 hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n count?: number;\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\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 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 /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\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\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\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\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\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 /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: 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 day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: 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 /** 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 /** 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}\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 ProductDmStorageDetailSize = {\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 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 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 type ProductDmStorageDetailCoins = {\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 /** 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};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\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 charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n count: number;\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 = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\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 cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n count: number;\n created: string;\n /** The start of the charge period */\n from: 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 products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** The number of Product Types */\n count: number;\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n count: number;\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n count: number;\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n count: number;\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationGetDefaultResponseDefaultProductPrivacy = typeof OrganisationGetDefaultResponseDefaultProductPrivacy[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationGetDefaultResponseDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\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 created?: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n count: number;\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 EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n count: number;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\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 /** The number of Assets returned\n */\n count: number;\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"names":[],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AA0BO,IAAM,yCAAyC;AAAA,EACpD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAoBO,IAAM,iDAAiD;AAAA,EAC5D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAkBO,IAAM,oDAAoD;AAAA,EAC/D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAuBO,IAAM,gDAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAeO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA+CO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA8BO,IAAM,0CAA0C;AAAA,EACrD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAyBO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAUO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAqIO,IAAM,gCAAgC;AAAA,EAC3C,cAAc;AAChB;AAmBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAwCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AA+EO,IAAM,sDAAsD;AAAA,EACjE,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB","sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: 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\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 ProductPatchBodyBody = {\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 /** The name you want to give the Product */\n name?: string;\n};\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 = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\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 = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\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\nexport type UnitProductPostBodyBody = {\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 Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The 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};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value\n */\nexport type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type UnitPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Unit */\n name?: string;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units\n */\nexport type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units */\n default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Organisational */\n name?: string;\n};\n\n/**\n * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value\n */\nexport type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationUnitPostBodyBody = {\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 /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;\n /** The name of the unit */\n name: string;\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\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPostBodyBody = {\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\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 = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** 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 scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\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 hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n count?: number;\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\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 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 /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\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\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\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\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\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 /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: 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 day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: 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 /** 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 /** 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}\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 ProductDmStorageDetailSize = {\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 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 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 type ProductDmStorageDetailCoins = {\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 /** 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};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\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 charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n count: number;\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 = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\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 cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n count: number;\n created: string;\n /** The start of the charge period */\n from: 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 products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** The number of Product Types */\n count: number;\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n count: number;\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n count: number;\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n count: number;\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationGetDefaultResponseDefaultProductPrivacy = typeof OrganisationGetDefaultResponseDefaultProductPrivacy[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationGetDefaultResponseDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\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 created?: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n count: number;\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 EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n count: number;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\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 /** The number of Assets returned\n */\n count: number;\n}\n\nexport type AssetGetByIdResponse = AssetDetail;\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"]}
|
package/index.d.cts
CHANGED
|
@@ -784,6 +784,7 @@ interface AssetGetResponse {
|
|
|
784
784
|
*/
|
|
785
785
|
count: number;
|
|
786
786
|
}
|
|
787
|
+
type AssetGetByIdResponse = AssetDetail;
|
|
787
788
|
interface AsError {
|
|
788
789
|
/** Brief error text that can be presented to the user */
|
|
789
790
|
error: string;
|
|
@@ -804,4 +805,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
804
805
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
|
|
805
806
|
type ErrorType<TError> = AxiosError<TError>;
|
|
806
807
|
|
|
807
|
-
export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, OrganisationGetDefaultResponseDefaultProductPrivacy, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
|
|
808
|
+
export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetByIdResponse, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, OrganisationGetDefaultResponseDefaultProductPrivacy, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
|
package/index.d.ts
CHANGED
|
@@ -784,6 +784,7 @@ interface AssetGetResponse {
|
|
|
784
784
|
*/
|
|
785
785
|
count: number;
|
|
786
786
|
}
|
|
787
|
+
type AssetGetByIdResponse = AssetDetail;
|
|
787
788
|
interface AsError {
|
|
788
789
|
/** Brief error text that can be presented to the user */
|
|
789
790
|
error: string;
|
|
@@ -804,4 +805,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
|
|
|
804
805
|
declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
|
|
805
806
|
type ErrorType<TError> = AxiosError<TError>;
|
|
806
807
|
|
|
807
|
-
export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, OrganisationGetDefaultResponseDefaultProductPrivacy, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
|
|
808
|
+
export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetByIdResponse, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetProductChargesParams, type GetUnitChargesParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, OrganisationGetDefaultResponseDefaultProductPrivacy, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: 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\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 ProductPatchBodyBody = {\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 /** The name you want to give the Product */\n name?: string;\n};\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 = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\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 = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\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\nexport type UnitProductPostBodyBody = {\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 Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The 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};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value\n */\nexport type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type UnitPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Unit */\n name?: string;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units\n */\nexport type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units */\n default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Organisational */\n name?: string;\n};\n\n/**\n * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value\n */\nexport type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationUnitPostBodyBody = {\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 /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;\n /** The name of the unit */\n name: string;\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\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPostBodyBody = {\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\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 = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** 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 scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\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 hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n count?: number;\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\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 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 /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\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\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\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\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\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 /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: 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 day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: 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 /** 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 /** 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}\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 ProductDmStorageDetailSize = {\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 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 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 type ProductDmStorageDetailCoins = {\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 /** 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};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\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 charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n count: number;\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 = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\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 cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n count: number;\n created: string;\n /** The start of the charge period */\n from: 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 products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** The number of Product Types */\n count: number;\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n count: number;\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n count: number;\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n count: number;\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationGetDefaultResponseDefaultProductPrivacy = typeof OrganisationGetDefaultResponseDefaultProductPrivacy[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationGetDefaultResponseDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\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 created?: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n count: number;\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 EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n count: number;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\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 /** The number of Assets returned\n */\n count: number;\n}\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACx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AA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAwCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AA+EO,IAAM,sDAAsD;AAAA,EACjE,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.3\n */\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetAssetParams = {\n/**\n * A User Identity\n */\nuser_id?: QUserIdParameter;\n/**\n * A Product Identity\n */\nproduct_id?: QProductIdParameter;\n/**\n * A Unit Identity\n */\nunit_id?: QUnitIdParameter;\n/**\n * An Organisation Identity\n */\norg_id?: QOrgIdParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QFromParameter = string;\n\nexport type GetUnitChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: QPbpParameter;\n};\n\nexport type GetChargesParams = {\n/**\n * A date from which to retrieve assets. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\nfrom?: QFromParameter;\n/**\n * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nuntil?: QUntilParameter;\n/**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n */\npbp?: 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\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 ProductPatchBodyBody = {\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 /** The name you want to give the Product */\n name?: string;\n};\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 = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\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 = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];\n\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\nexport type UnitProductPostBodyBody = {\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 Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /** The Product's built-in coin limit. If set it must not be less than the allowance. If not set the allowance is used. You can provide this for Storage products but you must not provide a value for Project Tier Products */\n limit?: number;\n /** The 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};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value\n */\nexport type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type UnitPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Unit. Privacy is also controlled at the **Organisation** level. As an example, the Unit can declare its Products to be `DEFAULT_PRIVATE`, but the Organisation can declare its value to be `DEFAULT_PUBLIC`.\n\nWhether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Unit */\n name?: string;\n};\n\n/**\n * The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units\n */\nexport type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPatchBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPatchBodyBody = {\n /** The new default **Product** privacy applied to all products that belong to this Organisation. Privacy is also controlled at the **Unit** level. As an example the Organisation level privacy can be `DEFAULT_PRIVATE`, but the unit can declare its Products to be `ALWAYS_PRIVATE`.\n\nWhether the privacy can be honoured will depend on the value in any of the organisation's existing units */\n default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;\n /** The new name for the Organisational */\n name?: string;\n};\n\n/**\n * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value\n */\nexport type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationUnitPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationUnitPostBodyBody = {\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 /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */\n default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;\n /** The name of the unit */\n name: string;\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\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationPostBodyBodyDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport type OrganisationPostBodyBody = {\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\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 = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport type AssetPostBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n /** 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 scope: AssetPostBodyBodyScope;\n /** The unique identity based on the Scope of the asset. For example, this will be the Unit ID if it's a UNIT. A scope_id is required if the scope is USER as it will be automatically set to your username. Global assets do not have a scope. */\n scope_id?: string;\n /** Is this a secret asset? */\n secret: boolean;\n};\n\nexport type AssetPatchBodyBody = {\n /** A file containing the content for the asset. You must provide a value here or in content_string */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in content_file */\n content_string?: string;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\n}\n\nexport interface UserAccountDetail {\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n user: UserDetail;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface UnitDetail {\n /** The Unit's billing day */\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];\n\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 hostname used by the Service */\n api_hostname: string;\n created: string;\n /** The unique ID of the Service */\n id: number;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n count?: number;\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationDetailDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\n\nexport interface OrganisationDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n}\n\n/**\n * The kind of service that can use the Product\n */\nexport type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];\n\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 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 /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\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\n\n */\nexport type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductDetailType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];\n\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\nexport interface ProductDetail {\n created: string;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The Product ID\n */\n id: string;\n /** The name of the Product\n */\n name?: string;\n /** The Product Type\n */\n type: ProductDetailType;\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 /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: 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 day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** The predicted total billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction: number;\n /** The predicted storage contribution to the billing period amount, if costs continue at the current burn rate until the end of the billing period. This is an estimate */\n billing_prediction_storage_contribution: number;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: 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 /** 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 /** 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}\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 ProductDmStorageDetailSize = {\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 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 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 type ProductDmStorageDetailCoins = {\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 /** 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};\n\nexport interface ProductDmStorageDetail {\n coins: ProductDmStorageDetailCoins;\n size: ProductDmStorageDetailSize;\n}\n\nexport interface ProductDmProjectTier {\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ProductDmStorage {\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n coins: ProductCoinsDetail;\n organisation: OrganisationDetail;\n product: ProductDetail;\n storage: ProductDmStorageDetail;\n unit: UnitDetail;\n}\n\nexport interface ChargeAdditionalData { [key: string]: any }\n\nexport interface StorageChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The date when the charges concluded */\n closed?: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The date and time of the processing charge */\n date: string;\n item_number: number;\n}\n\nexport interface StorageCharges {\n items: StorageChargeItem[];\n num_items: number;\n}\n\nexport interface ProcessingChargeItem {\n additional_data?: ChargeAdditionalData;\n /** The coin-cost of the storage */\n coins: string;\n /** The charge record number */\n id: number;\n name?: string;\n /** The most recent sequence number for this charge */\n sqn: number;\n /** The date and time of the processing charge */\n timestamp: string;\n username: string;\n}\n\nexport type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];\n\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 charge: ProcessingChargeItem;\n /** The date when the process stopped */\n closed?: string;\n /** True if no further change to the charges can occur. Typically True after the charge has been closed for a pre-configured period of time. */\n final: boolean;\n merchant_api_hostname: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_name: string;\n /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n}\n\nexport type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: 'USER',\n PRODUCT: 'PRODUCT',\n UNIT: 'UNIT',\n ORGANISATION: 'ORGANISATION',\n GLOBAL: 'GLOBAL',\n} as const;\n\nexport interface AssetDetail {\n content: string;\n content_modified?: string;\n created: string;\n creator: string;\n description?: string;\n disabled: boolean;\n id: string;\n merchants: MerchantDetail[];\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n count: number;\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 = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];\n\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 cost, in coins of the charge */\n coins: string;\n /** The type of charge */\n type: ChargeSummaryType;\n}\n\nexport interface UnitProductChargeSummary {\n charges: ChargeSummary[];\n product_id: string;\n product_type: string;\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n billing_day: number;\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n coins: string;\n count: number;\n created: string;\n /** The start of the charge period */\n from: 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 products: UnitProductChargeSummary[];\n summary: UnitChargeSummary;\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductUnitGetResponse {\n /** The Unit's Product */\n product: ProductUnitGetResponseProduct;\n}\n\nexport interface ProductsGetTypesResponse {\n /** The number of Product Types */\n count: number;\n /** All the Product Types you have access to */\n product_types: ProductType[];\n}\n\nexport type ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n description: string;\n units: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\n}\n\nexport type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;\n\nexport interface ProductsGetResponse {\n count: number;\n /** All the Products you have access to */\n products: ProductsGetResponseProductsItem[];\n}\n\nexport type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',\n DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',\n} as const;\n\nexport interface ProductChargesGetResponse {\n billing_day: number;\n claim?: ProductClaimDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n /** The start of the charge period */\n from: string;\n processing_charges: ProcessingCharges[];\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n storage_charges: StorageCharges;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport type OrganisationGetResponse = OrganisationDetail;\n\nexport interface OrganisationsGetResponse {\n count: number;\n /** A list of Organisations */\n organisations: OrganisationDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n billing_day: number;\n /** The start of the charge period */\n from: string;\n name: string;\n summary: ChargeSummary[];\n unit_id: string;\n /** The date where of first day after the charge period */\n until: string;\n}\n\nexport interface OrganisationChargesGetResponse {\n coins: string;\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n count: number;\n organisation: OrganisationDetail;\n /** A list of Units\n */\n units: UnitDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n name: string;\n organisation_id: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's unique ID */\n id: string;\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationGetDefaultResponseDefaultProductPrivacy = typeof OrganisationGetDefaultResponseDefaultProductPrivacy[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationGetDefaultResponseDefaultProductPrivacy = {\n ALWAYS_PUBLIC: 'ALWAYS_PUBLIC',\n ALWAYS_PRIVATE: 'ALWAYS_PRIVATE',\n DEFAULT_PUBLIC: 'DEFAULT_PUBLIC',\n DEFAULT_PRIVATE: 'DEFAULT_PRIVATE',\n} as const;\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 created?: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;\n /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n}\n\nexport interface UsersGetResponse {\n count: number;\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 EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The EventStream read token, required to read from the stream */\n read_token: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n count: number;\n organisation_charges: OrganisationChargeSummary[];\n summary: ChargeSummary[];\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 /** The number of Assets returned\n */\n count: number;\n}\n\nexport type AssetGetByIdResponse = AssetDetail;\n\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\n"],"mappings":";;;;;;;;AAiKO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EAC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AM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AA+EO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AA+EO,IAAM,sDAAsD;AAAA,EACjE,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;","names":[]}
|
package/package.json
CHANGED
package/src/asset/asset.ts
CHANGED
|
@@ -25,6 +25,7 @@ import type {
|
|
|
25
25
|
} from '@tanstack/react-query'
|
|
26
26
|
import type {
|
|
27
27
|
AsError,
|
|
28
|
+
AssetDetail,
|
|
28
29
|
AssetGetResponse,
|
|
29
30
|
AssetPatchBodyBody,
|
|
30
31
|
AssetPostBodyBody,
|
|
@@ -221,6 +222,109 @@ export const useCreateAsset = <TError = ErrorType<AsError | void>,
|
|
|
221
222
|
return useMutation(mutationOptions);
|
|
222
223
|
}
|
|
223
224
|
/**
|
|
225
|
+
* Gets a known Asset
|
|
226
|
+
|
|
227
|
+
* @summary Gets an Asset
|
|
228
|
+
*/
|
|
229
|
+
export const getSpecificAsset = (
|
|
230
|
+
assetId: string,
|
|
231
|
+
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
232
|
+
) => {
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
return customInstance<AssetDetail>(
|
|
236
|
+
{url: `/asset/${assetId}`, method: 'GET', signal
|
|
237
|
+
},
|
|
238
|
+
options);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
export const getGetSpecificAssetQueryKey = (assetId: string,) => {
|
|
243
|
+
return ["account-server-api", `/asset/${assetId}`] as const;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
export const getGetSpecificAssetQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
248
|
+
) => {
|
|
249
|
+
|
|
250
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
251
|
+
|
|
252
|
+
const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type GetSpecificAssetQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>
|
|
266
|
+
export type GetSpecificAssetQueryError = ErrorType<AsError | void>
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @summary Gets an Asset
|
|
270
|
+
*/
|
|
271
|
+
export const useGetSpecificAsset = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(
|
|
272
|
+
assetId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
273
|
+
|
|
274
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
275
|
+
|
|
276
|
+
const queryOptions = getGetSpecificAssetQueryOptions(assetId,options)
|
|
277
|
+
|
|
278
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
279
|
+
|
|
280
|
+
query.queryKey = queryOptions.queryKey ;
|
|
281
|
+
|
|
282
|
+
return query;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
export const getGetSpecificAssetSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
288
|
+
) => {
|
|
289
|
+
|
|
290
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
291
|
+
|
|
292
|
+
const queryKey = queryOptions?.queryKey ?? getGetSpecificAssetQueryKey(assetId);
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof getSpecificAsset>>> = ({ signal }) => getSpecificAsset(assetId, requestOptions, signal);
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
return { queryKey, queryFn, enabled: !!(assetId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData> & { queryKey: QueryKey }
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export type GetSpecificAssetSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getSpecificAsset>>>
|
|
306
|
+
export type GetSpecificAssetSuspenseQueryError = ErrorType<AsError | void>
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @summary Gets an Asset
|
|
310
|
+
*/
|
|
311
|
+
export const useGetSpecificAssetSuspense = <TData = Awaited<ReturnType<typeof getSpecificAsset>>, TError = ErrorType<AsError | void>>(
|
|
312
|
+
assetId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getSpecificAsset>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
313
|
+
|
|
314
|
+
): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
315
|
+
|
|
316
|
+
const queryOptions = getGetSpecificAssetSuspenseQueryOptions(assetId,options)
|
|
317
|
+
|
|
318
|
+
const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
319
|
+
|
|
320
|
+
query.queryKey = queryOptions.queryKey ;
|
|
321
|
+
|
|
322
|
+
return query;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
/**
|
|
224
328
|
* Used to update or replace Asset *Content* or *Description*.
|
|
225
329
|
|
|
226
330
|
The content of an Asset currently in use will not be affected by a change made here. If a **Merchant** has already obtained the Asset it may continue to use the original value until the **Merchant** requests the **Asset** again.
|