@squonk/account-server-client 1.0.2-rc.3 → 1.0.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs +34 -18
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.ts +16 -16
- package/asset/asset.js +35 -19
- package/asset/asset.js.map +1 -1
- package/{custom-instance-b8075093.d.ts → custom-instance-93fb01eb.d.ts} +22 -20
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +15 -13
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.ts +1 -1
- package/merchant/merchant.js +16 -14
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +18 -6
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.ts +7 -7
- package/organisation/organisation.js +19 -7
- package/organisation/organisation.js.map +1 -1
- package/package.json +1 -1
- package/product/product.cjs +47 -38
- package/product/product.cjs.map +1 -1
- package/product/product.d.ts +10 -10
- package/product/product.js +48 -39
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +73 -87
- package/src/asset/asset.ts +248 -345
- package/src/merchant/merchant.ts +62 -84
- package/src/organisation/organisation.ts +131 -184
- package/src/product/product.ts +279 -422
- package/src/state/state.ts +36 -42
- package/src/unit/unit.ts +218 -301
- package/src/user/user.ts +224 -327
- package/state/state.cjs +9 -9
- package/state/state.cjs.map +1 -1
- package/state/state.d.ts +1 -1
- package/state/state.js +10 -10
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +40 -25
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.ts +10 -10
- package/unit/unit.js +41 -26
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +38 -20
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +10 -10
- package/user/user.js +39 -21
- package/user/user.js.map +1 -1
package/product/product.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/product/product.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n ProductsGetTypesResponse,\n AsError,\n ProductsGetResponse,\n UnitProductPostResponse,\n UnitProductPostBodyBody,\n ProductUnitGetResponse,\n ProductPatchBodyBody,\n ProductChargesGetResponse,\n GetProductChargesParams,\n} from \"../account-server-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Gets product types you can purchase\n\n * @summary Gets all Product Types\n */\nexport const getProductTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProductsGetTypesResponse>(\n { url: `/product-type`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetProductTypesQueryKey = () => [`/product-type`];\n\nexport type GetProductTypesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductTypes>>\n>;\nexport type GetProductTypesQueryError = ErrorType<AsError | void>;\n\nexport const useGetProductTypes = <\n TData = Awaited<ReturnType<typeof getProductTypes>>,\n TError = ErrorType<AsError | void>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({\n signal,\n }) => getProductTypes(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getProductTypes>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Gets products you have access to, across all Units and Organisations\n\n * @summary Gets all Products\n */\nexport const getProducts = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetProductsQueryKey = () => [`/product`];\n\nexport type GetProductsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProducts>>\n>;\nexport type GetProductsQueryError = ErrorType<AsError | void>;\n\nexport const useGetProducts = <\n TData = Awaited<ReturnType<typeof getProducts>>,\n TError = ErrorType<AsError | void>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({\n signal,\n }) => getProducts(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getProducts>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Gets products you have access to based on an Organisation\n\n * @summary Gets Products for an Organisation\n */\nexport const getProductsForOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product/organisation/${orgId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetProductsForOrganisationQueryKey = (orgId: string) => [\n `/product/organisation/${orgId}`,\n];\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n>;\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>;\n\nexport const useGetProductsForOrganisation = <\n TData = Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError = ErrorType<void | AsError>\n>(\n orgId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getProductsForOrganisation>>\n > = ({ signal }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getProductsForOrganisation>>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!orgId, ...queryOptions }) as UseQueryResult<\n TData,\n TError\n > & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.\n\nTypical subscriptions include `DATA_MANAGER_STORAGE_SUBSCRIPTION` and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nSome subscriptions, like the `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` are available i various **flavours** that influence their capabilities. Flavours are typically referred to using the names `BRONZE`, `SILVER` and `GOLD`\n\n * @summary Creates a Product for an Organisational Unit\n */\nexport const createUnitProduct = (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<UnitProductPostResponse>(\n {\n url: `/product/unit/${unitId}`,\n method: \"post\",\n headers: { \"Content-Type\": \"application/json\" },\n data: unitProductPostBodyBody,\n },\n options\n );\n};\n\nexport type CreateUnitProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof createUnitProduct>>\n>;\nexport type CreateUnitProductMutationBody = UnitProductPostBodyBody;\nexport type CreateUnitProductMutationError = ErrorType<AsError | void>;\n\nexport const useCreateUnitProduct = <\n TError = ErrorType<AsError | void>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createUnitProduct>>,\n { unitId: string; data: UnitProductPostBodyBody }\n > = (props) => {\n const { unitId, data } = props ?? {};\n\n return createUnitProduct(unitId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof createUnitProduct>>,\n TError,\n { unitId: string; data: UnitProductPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Gets products you have access to based on an Organisational Unit\n\n * @summary Gets Products for an Organisational Unit\n */\nexport const getProductsForUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProductsGetResponse>(\n { url: `/product/unit/${unitId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetProductsForUnitQueryKey = (unitId: string) => [\n `/product/unit/${unitId}`,\n];\n\nexport type GetProductsForUnitQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductsForUnit>>\n>;\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>;\n\nexport const useGetProductsForUnit = <\n TData = Awaited<ReturnType<typeof getProductsForUnit>>,\n TError = ErrorType<void | AsError>\n>(\n unitId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getProductsForUnit>>\n > = ({ signal }) => getProductsForUnit(unitId, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getProductsForUnit>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!unitId,\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Gets a Product\n\n * @summary Gets a Product\n */\nexport const getProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProductUnitGetResponse>(\n { url: `/product/${productId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetProductQueryKey = (productId: string) => [\n `/product/${productId}`,\n];\n\nexport type GetProductQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProduct>>\n>;\nexport type GetProductQueryError = ErrorType<AsError | void>;\n\nexport const useGetProduct = <\n TData = Awaited<ReturnType<typeof getProduct>>,\n TError = ErrorType<AsError | void>\n>(\n productId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProduct>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({\n signal,\n }) => getProduct(productId, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProduct>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!productId, ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * @summary Deletes an existing Product\n */\nexport const deleteProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/product/${productId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteProduct>>\n>;\n\nexport type DeleteProductMutationError = ErrorType<AsError>;\n\nexport const useDeleteProduct = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteProduct>>,\n { productId: string }\n > = (props) => {\n const { productId } = props ?? {};\n\n return deleteProduct(productId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof deleteProduct>>,\n TError,\n { productId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Used to update some adjustable parameters of a Product, i.e. to extend the Allowance or Limit. At the moment Data Manager products can be patched by changing the `name`, it's coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport const patchProduct = (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n {\n url: `/product/${productId}`,\n method: \"patch\",\n headers: { \"Content-Type\": \"application/json\" },\n data: productPatchBodyBody,\n },\n options\n );\n};\n\nexport type PatchProductMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchProduct>>\n>;\nexport type PatchProductMutationBody = ProductPatchBodyBody;\nexport type PatchProductMutationError = ErrorType<AsError>;\n\nexport const usePatchProduct = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchProduct>>,\n { productId: string; data: ProductPatchBodyBody }\n > = (props) => {\n const { productId, data } = props ?? {};\n\n return patchProduct(productId, data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof patchProduct>>,\n TError,\n { productId: string; data: ProductPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Get the charges made against a product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python dateutil parser so the input strings are extremely flexible, i.e. `1 December 2021` is an acceptable format.\n\n**from** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`.\n\nYou need **admin** rights to use this method\n * @summary Get charges made against a Product\n */\nexport const getProductCharges = (\n productId: string,\n params?: GetProductChargesParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ProductChargesGetResponse>(\n { url: `/product/${productId}/charges`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetProductChargesQueryKey = (\n productId: string,\n params?: GetProductChargesParams\n) => [`/product/${productId}/charges`, ...(params ? [params] : [])];\n\nexport type GetProductChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductCharges>>\n>;\nexport type GetProductChargesQueryError = ErrorType<AsError | void>;\n\nexport const useGetProductCharges = <\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId, params);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getProductCharges>>\n > = ({ signal }) =>\n getProductCharges(productId, params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!productId,\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AAoC/B,IAAM,kBAAkB,CAC7B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,OAAO;AAAA,IAC9C;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,MAAM,CAAC,eAAe;AAOzD,IAAM,qBAAqB,CAGhC,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,2BAA2B;AAEtE,QAAM,UAAsE,CAAC;AAAA,IAC3E;AAAA,EACF,MAAM,gBAAgB,gBAAgB,MAAM;AAE5C,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;AAOO,IAAM,cAAc,CACzB,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,YAAY,QAAQ,OAAO,OAAO;AAAA,IACzC;AAAA,EACF;AACF;AAEO,IAAM,yBAAyB,MAAM,CAAC,UAAU;AAOhD,IAAM,iBAAiB,CAG5B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,uBAAuB;AAElE,QAAM,UAAkE,CAAC;AAAA,IACvE;AAAA,EACF,MAAM,YAAY,gBAAgB,MAAM;AAExC,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIj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by orval v6.9.1 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 1.0\n */\nimport {\n useQuery,\n useMutation\n} from 'react-query'\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey\n} from 'react-query'\nimport type {\n ProductsGetTypesResponse,\n AsError,\n ProductsGetResponse,\n UnitProductPostResponse,\n UnitProductPostBodyBody,\n ProductUnitGetResponse,\n ProductPatchBodyBody,\n ProductChargesGetResponse,\n GetProductChargesParams\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance'\nimport type { ErrorType } from '.././custom-instance'\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n/**\n * Gets product types you can purchase\n\n * @summary Gets all Product Types\n */\nexport const getProductTypes = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<ProductsGetTypesResponse>(\n {url: `/product-type`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProductTypesQueryKey = () => [`/product-type`];\n\n \nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>\nexport type GetProductTypesQueryError = ErrorType<AsError | void>\n\nexport const useGetProductTypes = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) => getProductTypes(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * Gets products you have access to, across all Units and Organisations\n\n * @summary Gets all Products\n */\nexport const getProducts = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<ProductsGetResponse>(\n {url: `/product`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProductsQueryKey = () => [`/product`];\n\n \nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>\nexport type GetProductsQueryError = ErrorType<AsError | void>\n\nexport const useGetProducts = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) => getProducts(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProducts>>, TError, TData>(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * Gets products you have access to based on an Organisation\n\n * @summary Gets Products for an Organisation\n */\nexport const getProductsForOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<ProductsGetResponse>(\n {url: `/product/organisation/${orgId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProductsForOrganisationQueryKey = (orgId: string,) => [`/product/organisation/${orgId}`];\n\n \nexport type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>\n\nexport const useGetProductsForOrganisation = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({ signal }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>(queryKey, queryFn, {enabled: !!(orgId), ...queryOptions}) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.\n\nTypical subscriptions include `DATA_MANAGER_STORAGE_SUBSCRIPTION` and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nSome subscriptions, like the `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` are available i various **flavours** that influence their capabilities. Flavours are typically referred to using the names `BRONZE`, `SILVER` and `GOLD`\n\n * @summary Creates a Product for an Organisational Unit\n */\nexport const createUnitProduct = (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n return customInstance<UnitProductPostResponse>(\n {url: `/product/unit/${unitId}`, method: 'post',\n headers: {'Content-Type': 'application/json', },\n data: unitProductPostBodyBody\n },\n options);\n }\n \n\n\n export type CreateUnitProductMutationResult = NonNullable<Awaited<ReturnType<typeof createUnitProduct>>>\n export type CreateUnitProductMutationBody = UnitProductPostBodyBody\n export type CreateUnitProductMutationError = ErrorType<AsError | void>\n\n export const useCreateUnitProduct = <TError = ErrorType<AsError | void>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {}\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createUnitProduct>>, {unitId: string;data: UnitProductPostBodyBody}> = (props) => {\n const {unitId,data} = props ?? {};\n\n return createUnitProduct(unitId,data,requestOptions)\n }\n\n return useMutation<Awaited<ReturnType<typeof createUnitProduct>>, TError, {unitId: string;data: UnitProductPostBodyBody}, TContext>(mutationFn, mutationOptions)\n }\n /**\n * Gets products you have access to based on an Organisational Unit\n\n * @summary Gets Products for an Organisational Unit\n */\nexport const getProductsForUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<ProductsGetResponse>(\n {url: `/product/unit/${unitId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProductsForUnitQueryKey = (unitId: string,) => [`/product/unit/${unitId}`];\n\n \nexport type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>\n\nexport const useGetProductsForUnit = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) => getProductsForUnit(unitId, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>(queryKey, queryFn, {enabled: !!(unitId), ...queryOptions}) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * Gets a Product\n\n * @summary Gets a Product\n */\nexport const getProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<ProductUnitGetResponse>(\n {url: `/product/${productId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetProductQueryKey = (productId: string,) => [`/product/${productId}`];\n\n \nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>\nexport type GetProductQueryError = ErrorType<AsError | void>\n\nexport const useGetProduct = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(\n productId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) => getProduct(productId, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProduct>>, TError, TData>(queryKey, queryFn, {enabled: !!(productId), ...queryOptions}) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n/**\n * @summary Deletes an existing Product\n */\nexport const deleteProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n return customInstance<void>(\n {url: `/product/${productId}`, method: 'delete'\n },\n options);\n }\n \n\n\n export type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>\n \n export type DeleteProductMutationError = ErrorType<AsError>\n\n export const useDeleteProduct = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {}\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProduct>>, {productId: string}> = (props) => {\n const {productId} = props ?? {};\n\n return deleteProduct(productId,requestOptions)\n }\n\n return useMutation<Awaited<ReturnType<typeof deleteProduct>>, TError, {productId: string}, TContext>(mutationFn, mutationOptions)\n }\n /**\n * Used to update some adjustable parameters of a Product, i.e. to extend the Allowance or Limit. At the moment Data Manager products can be patched by changing the `name`, it's coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport const patchProduct = (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n return customInstance<void>(\n {url: `/product/${productId}`, method: 'patch',\n headers: {'Content-Type': 'application/json', },\n data: productPatchBodyBody\n },\n options);\n }\n \n\n\n export type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>\n export type PatchProductMutationBody = ProductPatchBodyBody\n export type PatchProductMutationError = ErrorType<AsError>\n\n export const usePatchProduct = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {}\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProduct>>, {productId: string;data: ProductPatchBodyBody}> = (props) => {\n const {productId,data} = props ?? {};\n\n return patchProduct(productId,data,requestOptions)\n }\n\n return useMutation<Awaited<ReturnType<typeof patchProduct>>, TError, {productId: string;data: ProductPatchBodyBody}, TContext>(mutationFn, mutationOptions)\n }\n /**\n * Get the charges made against a product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python dateutil parser so the input strings are extremely flexible, i.e. `1 December 2021` is an acceptable format.\n\n**from** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`.\n\nYou need **admin** rights to use this method\n * @summary Get charges made against a Product\n */\nexport const getProductCharges = (\n productId: string,\n params?: GetProductChargesParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n return customInstance<ProductChargesGetResponse>(\n {url: `/product/${productId}/charges`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetProductChargesQueryKey = (productId: string,\n params?: GetProductChargesParams,) => [`/product/${productId}/charges`, ...(params ? [params]: [])];\n\n \nexport type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>\nexport type GetProductChargesQueryError = ErrorType<AsError | void>\n\nexport const useGetProductCharges = <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(\n productId: string,\n params?: GetProductChargesParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const {query: queryOptions, request: requestOptions} = options ?? {}\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) => getProductCharges(productId,params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>(queryKey, queryFn, {enabled: !!(productId), ...queryOptions}) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n}\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAqCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AACC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ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iB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKzE,QAAM,aAAyH,CAAC,UAAU;AACtI,UAAM,EAAC,WAAU,KAAI,IAAI,SAAS,CAAC;AAEnC,WAAQ,aAAa,WAAU,MAAK,cAAc;AAAA,EACpD;AAEF,SAAO,YAAwH,YAAY,eAAe;AAC5J;AAWG,IAAM,oBAAoB,CAC7B,WACA,QACH,SAAiD,WAC7C;AACC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY;AAAA,MAAqB,QAAQ;AAAA,MAC7C;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,+BAA+B,CAAC,WACzC,WAAsC,CAAC,YAAY,qBAAqB,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAM/F,IAAM,uBAAuB,CACnC,WACG,QAAkC,YAE0B;AAE9D,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEnE,QAAM,YAAW,6CAAc,aAAY,6BAA6B,WAAU,MAAM;AAIxF,QAAM,UAAwE,CAAC,EAAE,OAAO,MAAM,kBAAkB,WAAU,QAAQ,gBAAgB,MAAM;AAExJ,QAAM,QAAQ,SAAuE,UAAU,SAAS,EAAC,SAAS,CAAC,CAAE,WAAY,GAAG,aAAY,CAAC;AAEjJ,QAAM,WAAW;AAEjB,SAAO;AACT;","names":[]}
|
|
@@ -20,10 +20,7 @@ export type QUntilParameter = string;
|
|
|
20
20
|
*/
|
|
21
21
|
export type QFromParameter = string;
|
|
22
22
|
|
|
23
|
-
export type GetProductChargesParams = {
|
|
24
|
-
from?: QFromParameter;
|
|
25
|
-
until?: QUntilParameter;
|
|
26
|
-
};
|
|
23
|
+
export type GetProductChargesParams = { from?: QFromParameter; until?: QUntilParameter };
|
|
27
24
|
|
|
28
25
|
/**
|
|
29
26
|
* A User Identity
|
|
@@ -40,12 +37,7 @@ export type QProductIdParameter = string;
|
|
|
40
37
|
*/
|
|
41
38
|
export type QUnitIdParameter = string;
|
|
42
39
|
|
|
43
|
-
export type GetAssetParams = {
|
|
44
|
-
user_id?: QUserIdParameter;
|
|
45
|
-
product_id?: QProductIdParameter;
|
|
46
|
-
unit_id?: QUnitIdParameter;
|
|
47
|
-
org_id?: QOrgIdParameter;
|
|
48
|
-
};
|
|
40
|
+
export type GetAssetParams = { user_id?: QUserIdParameter; product_id?: QProductIdParameter; unit_id?: QUnitIdParameter; org_id?: QOrgIdParameter };
|
|
49
41
|
|
|
50
42
|
/**
|
|
51
43
|
* A Merchant Identity
|
|
@@ -71,15 +63,15 @@ export type ProductPatchBodyBody = {
|
|
|
71
63
|
/**
|
|
72
64
|
* The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products
|
|
73
65
|
*/
|
|
74
|
-
export type UnitProductPostBodyBodyFlavour =
|
|
75
|
-
|
|
66
|
+
export type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];
|
|
67
|
+
|
|
76
68
|
|
|
77
69
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
78
70
|
export const UnitProductPostBodyBodyFlavour = {
|
|
79
|
-
EVALUATION:
|
|
80
|
-
BRONZE:
|
|
81
|
-
SILVER:
|
|
82
|
-
GOLD:
|
|
71
|
+
EVALUATION: 'EVALUATION',
|
|
72
|
+
BRONZE: 'BRONZE',
|
|
73
|
+
SILVER: 'SILVER',
|
|
74
|
+
GOLD: 'GOLD',
|
|
83
75
|
} as const;
|
|
84
76
|
|
|
85
77
|
/**
|
|
@@ -87,14 +79,13 @@ export const UnitProductPostBodyBodyFlavour = {
|
|
|
87
79
|
|
|
88
80
|
Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
|
|
89
81
|
*/
|
|
90
|
-
export type UnitProductPostBodyBodyType =
|
|
91
|
-
|
|
82
|
+
export type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];
|
|
83
|
+
|
|
92
84
|
|
|
93
85
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
94
86
|
export const UnitProductPostBodyBodyType = {
|
|
95
|
-
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:
|
|
96
|
-
|
|
97
|
-
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION",
|
|
87
|
+
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
|
|
88
|
+
DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
|
|
98
89
|
} as const;
|
|
99
90
|
|
|
100
91
|
export type UnitProductPostBodyBody = {
|
|
@@ -126,15 +117,15 @@ export type OrganisationPostBodyBody = {
|
|
|
126
117
|
owner: string;
|
|
127
118
|
};
|
|
128
119
|
|
|
129
|
-
export type AssetPostBodyBodyScope =
|
|
130
|
-
|
|
120
|
+
export type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];
|
|
121
|
+
|
|
131
122
|
|
|
132
123
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
133
124
|
export const AssetPostBodyBodyScope = {
|
|
134
|
-
USER:
|
|
135
|
-
PRODUCT:
|
|
136
|
-
UNIT:
|
|
137
|
-
ORGANISATION:
|
|
125
|
+
USER: 'USER',
|
|
126
|
+
PRODUCT: 'PRODUCT',
|
|
127
|
+
UNIT: 'UNIT',
|
|
128
|
+
ORGANISATION: 'ORGANISATION',
|
|
138
129
|
} as const;
|
|
139
130
|
|
|
140
131
|
export type AssetPostBodyBody = {
|
|
@@ -181,12 +172,12 @@ export interface UnitDetail {
|
|
|
181
172
|
/**
|
|
182
173
|
* The kind of Service
|
|
183
174
|
*/
|
|
184
|
-
export type MerchantDetailKind =
|
|
185
|
-
|
|
175
|
+
export type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];
|
|
176
|
+
|
|
186
177
|
|
|
187
178
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
188
179
|
export const MerchantDetailKind = {
|
|
189
|
-
DATA_MANAGER:
|
|
180
|
+
DATA_MANAGER: 'DATA_MANAGER',
|
|
190
181
|
} as const;
|
|
191
182
|
|
|
192
183
|
export interface MerchantDetail {
|
|
@@ -205,7 +196,7 @@ export type MerchantGetResponse = MerchantDetail;
|
|
|
205
196
|
|
|
206
197
|
export interface MerchantsGetResponse {
|
|
207
198
|
/** The list of known Merchants
|
|
208
|
-
|
|
199
|
+
*/
|
|
209
200
|
merchants: MerchantDetail[];
|
|
210
201
|
}
|
|
211
202
|
|
|
@@ -226,12 +217,12 @@ export interface OrganisationDetail {
|
|
|
226
217
|
/**
|
|
227
218
|
* The kind of service that can use the Product
|
|
228
219
|
*/
|
|
229
|
-
export type ProductTypeServiceKind =
|
|
230
|
-
|
|
220
|
+
export type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];
|
|
221
|
+
|
|
231
222
|
|
|
232
223
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
233
224
|
export const ProductTypeServiceKind = {
|
|
234
|
-
DATA_MANAGER:
|
|
225
|
+
DATA_MANAGER: 'DATA_MANAGER',
|
|
235
226
|
} as const;
|
|
236
227
|
|
|
237
228
|
export interface ProductType {
|
|
@@ -245,7 +236,7 @@ export interface ProductType {
|
|
|
245
236
|
|
|
246
237
|
export type ProductInstanceDetailCoins = {
|
|
247
238
|
/** The number of coins used
|
|
248
|
-
|
|
239
|
+
*/
|
|
249
240
|
used: number;
|
|
250
241
|
};
|
|
251
242
|
|
|
@@ -257,44 +248,43 @@ export interface ProductInstanceDetail {
|
|
|
257
248
|
* The Product Type flavour. Not all products have flavours
|
|
258
249
|
|
|
259
250
|
*/
|
|
260
|
-
export type ProductDetailFlavour =
|
|
261
|
-
|
|
251
|
+
export type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
|
|
252
|
+
|
|
262
253
|
|
|
263
254
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
264
255
|
export const ProductDetailFlavour = {
|
|
265
|
-
EVALUATION:
|
|
266
|
-
BRONZE:
|
|
267
|
-
SILVER:
|
|
268
|
-
GOLD:
|
|
256
|
+
EVALUATION: 'EVALUATION',
|
|
257
|
+
BRONZE: 'BRONZE',
|
|
258
|
+
SILVER: 'SILVER',
|
|
259
|
+
GOLD: 'GOLD',
|
|
269
260
|
} as const;
|
|
270
261
|
|
|
271
262
|
/**
|
|
272
263
|
* The Product Type
|
|
273
264
|
|
|
274
265
|
*/
|
|
275
|
-
export type ProductDetailType =
|
|
276
|
-
|
|
266
|
+
export type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];
|
|
267
|
+
|
|
277
268
|
|
|
278
269
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
279
270
|
export const ProductDetailType = {
|
|
280
|
-
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:
|
|
281
|
-
|
|
282
|
-
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION",
|
|
271
|
+
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
|
|
272
|
+
DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
|
|
283
273
|
} as const;
|
|
284
274
|
|
|
285
275
|
export interface ProductDetail {
|
|
286
276
|
/** The Product ID
|
|
287
|
-
|
|
277
|
+
*/
|
|
288
278
|
id: string;
|
|
289
279
|
created: string;
|
|
290
280
|
/** The Product Type
|
|
291
|
-
|
|
281
|
+
*/
|
|
292
282
|
type: ProductDetailType;
|
|
293
283
|
/** The Product Type flavour. Not all products have flavours
|
|
294
|
-
|
|
284
|
+
*/
|
|
295
285
|
flavour?: ProductDetailFlavour;
|
|
296
286
|
/** The name of the Product
|
|
297
|
-
|
|
287
|
+
*/
|
|
298
288
|
name?: string;
|
|
299
289
|
}
|
|
300
290
|
|
|
@@ -323,10 +313,10 @@ export interface ProductCoinsDetail {
|
|
|
323
313
|
|
|
324
314
|
export interface ProductClaimDetail {
|
|
325
315
|
/** The service-specific ID that is using this Subscription
|
|
326
|
-
|
|
316
|
+
*/
|
|
327
317
|
id: string;
|
|
328
318
|
/** A name for the service-specific ID
|
|
329
|
-
|
|
319
|
+
*/
|
|
330
320
|
name?: string;
|
|
331
321
|
}
|
|
332
322
|
|
|
@@ -371,9 +361,7 @@ export interface ProductDmStorage {
|
|
|
371
361
|
coins: ProductCoinsDetail;
|
|
372
362
|
}
|
|
373
363
|
|
|
374
|
-
export interface ChargeAdditionalData {
|
|
375
|
-
[key: string]: any;
|
|
376
|
-
}
|
|
364
|
+
export interface ChargeAdditionalData { [key: string]: any }
|
|
377
365
|
|
|
378
366
|
export interface StorageChargeItem {
|
|
379
367
|
item_number: number;
|
|
@@ -390,7 +378,6 @@ export interface StorageCharges {
|
|
|
390
378
|
}
|
|
391
379
|
|
|
392
380
|
export interface ProcessingChargeItem {
|
|
393
|
-
item_number: number;
|
|
394
381
|
/** The most recent sequence number for this charge */
|
|
395
382
|
sqn: number;
|
|
396
383
|
name?: string;
|
|
@@ -402,31 +389,34 @@ export interface ProcessingChargeItem {
|
|
|
402
389
|
additional_data?: ChargeAdditionalData;
|
|
403
390
|
}
|
|
404
391
|
|
|
405
|
-
export type ProcessingChargesMerchantKind =
|
|
406
|
-
|
|
392
|
+
export type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];
|
|
393
|
+
|
|
407
394
|
|
|
408
395
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
409
396
|
export const ProcessingChargesMerchantKind = {
|
|
410
|
-
DATA_MANAGER:
|
|
397
|
+
DATA_MANAGER: 'DATA_MANAGER',
|
|
411
398
|
} as const;
|
|
412
399
|
|
|
413
400
|
export interface ProcessingCharges {
|
|
414
401
|
merchant_name: string;
|
|
415
402
|
merchant_kind: ProcessingChargesMerchantKind;
|
|
416
403
|
merchant_api_hostname: string;
|
|
417
|
-
|
|
418
|
-
|
|
404
|
+
/** The date when the charges concluded */
|
|
405
|
+
closed?: string;
|
|
406
|
+
/** True if charges received after the charge record was closed */
|
|
407
|
+
post_closure_charges?: boolean;
|
|
408
|
+
charge: ProcessingChargeItem;
|
|
419
409
|
}
|
|
420
410
|
|
|
421
|
-
export type AssetDetailScope =
|
|
422
|
-
|
|
411
|
+
export type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];
|
|
412
|
+
|
|
423
413
|
|
|
424
414
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
425
415
|
export const AssetDetailScope = {
|
|
426
|
-
USER:
|
|
427
|
-
PRODUCT:
|
|
428
|
-
UNIT:
|
|
429
|
-
ORGANISATION:
|
|
416
|
+
USER: 'USER',
|
|
417
|
+
PRODUCT: 'PRODUCT',
|
|
418
|
+
UNIT: 'UNIT',
|
|
419
|
+
ORGANISATION: 'ORGANISATION',
|
|
430
420
|
} as const;
|
|
431
421
|
|
|
432
422
|
export interface AssetDetail {
|
|
@@ -455,9 +445,7 @@ export interface UnitProductPostResponse {
|
|
|
455
445
|
/**
|
|
456
446
|
* The Unit's Product
|
|
457
447
|
*/
|
|
458
|
-
export type ProductUnitGetResponseProduct =
|
|
459
|
-
| ProductDmStorage
|
|
460
|
-
| ProductDmProjectTier;
|
|
448
|
+
export type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;
|
|
461
449
|
|
|
462
450
|
export interface ProductUnitGetResponse {
|
|
463
451
|
/** The Unit's Product */
|
|
@@ -469,23 +457,20 @@ export interface ProductsGetTypesResponse {
|
|
|
469
457
|
product_types: ProductType[];
|
|
470
458
|
}
|
|
471
459
|
|
|
472
|
-
export type ProductsGetResponseProductsItem =
|
|
473
|
-
| ProductDmStorage
|
|
474
|
-
| ProductDmProjectTier;
|
|
460
|
+
export type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;
|
|
475
461
|
|
|
476
462
|
export interface ProductsGetResponse {
|
|
477
463
|
/** All the Products you have access to */
|
|
478
464
|
products: ProductsGetResponseProductsItem[];
|
|
479
465
|
}
|
|
480
466
|
|
|
481
|
-
export type ProductChargesGetResponseProductType =
|
|
482
|
-
|
|
467
|
+
export type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];
|
|
468
|
+
|
|
483
469
|
|
|
484
470
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
485
471
|
export const ProductChargesGetResponseProductType = {
|
|
486
|
-
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION:
|
|
487
|
-
|
|
488
|
-
DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION",
|
|
472
|
+
DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: 'DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION',
|
|
473
|
+
DATA_MANAGER_STORAGE_SUBSCRIPTION: 'DATA_MANAGER_STORAGE_SUBSCRIPTION',
|
|
489
474
|
} as const;
|
|
490
475
|
|
|
491
476
|
export interface ProductChargesGetResponse {
|
|
@@ -514,13 +499,13 @@ export interface OrganisationsGetResponse {
|
|
|
514
499
|
export interface OrganisationUnitsGetResponse {
|
|
515
500
|
organisation: OrganisationDetail;
|
|
516
501
|
/** A list of Units
|
|
517
|
-
|
|
502
|
+
*/
|
|
518
503
|
units: UnitDetail[];
|
|
519
504
|
}
|
|
520
505
|
|
|
521
506
|
export interface UnitsGetResponse {
|
|
522
507
|
/** A list of Units
|
|
523
|
-
|
|
508
|
+
*/
|
|
524
509
|
units: OrganisationUnitsGetResponse[];
|
|
525
510
|
}
|
|
526
511
|
|
|
@@ -540,13 +525,13 @@ export interface OrganisationGetDefaultResponse {
|
|
|
540
525
|
/** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */
|
|
541
526
|
caller_is_member: boolean;
|
|
542
527
|
/** The Default Organisation ID
|
|
543
|
-
|
|
528
|
+
*/
|
|
544
529
|
id: string;
|
|
545
530
|
/** The Default Organisation Name
|
|
546
|
-
|
|
531
|
+
*/
|
|
547
532
|
name: string;
|
|
548
533
|
/** 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
|
|
549
|
-
|
|
534
|
+
*/
|
|
550
535
|
private: boolean;
|
|
551
536
|
created: string;
|
|
552
537
|
}
|
|
@@ -555,7 +540,7 @@ export interface UsersGetResponse {
|
|
|
555
540
|
organisation?: OrganisationDetail;
|
|
556
541
|
unit?: UnitDetail;
|
|
557
542
|
/** The list of Organisation Users
|
|
558
|
-
|
|
543
|
+
*/
|
|
559
544
|
users: UserDetail[];
|
|
560
545
|
}
|
|
561
546
|
|
|
@@ -566,19 +551,19 @@ export interface OrganisationPostResponse {
|
|
|
566
551
|
|
|
567
552
|
export interface StateGetVersionResponse {
|
|
568
553
|
/** 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
|
|
569
|
-
|
|
554
|
+
*/
|
|
570
555
|
version: string;
|
|
571
556
|
}
|
|
572
557
|
|
|
573
558
|
export interface AssetPostResponse {
|
|
574
559
|
/** The Asset ID
|
|
575
|
-
|
|
560
|
+
*/
|
|
576
561
|
id: string;
|
|
577
562
|
}
|
|
578
563
|
|
|
579
564
|
export interface AssetGetResponse {
|
|
580
565
|
/** A list of Assets
|
|
581
|
-
|
|
566
|
+
*/
|
|
582
567
|
assets: AssetDetail[];
|
|
583
568
|
}
|
|
584
569
|
|
|
@@ -586,3 +571,4 @@ export interface AsError {
|
|
|
586
571
|
/** Brief error text that can be presented to the user */
|
|
587
572
|
error: string;
|
|
588
573
|
}
|
|
574
|
+
|