@squonk/account-server-client 4.9.0-beta.2 → 4.9.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/api/api-schemas/assetDetailScope.cjs +2 -1
  2. package/dist/api/api-schemas/assetDetailScope.cjs.map +1 -1
  3. package/dist/api/api-schemas/assetDetailScope.d.cts +1 -0
  4. package/dist/api/api-schemas/assetDetailScope.d.ts +1 -0
  5. package/dist/api/api-schemas/assetDetailScope.js +2 -1
  6. package/dist/api/api-schemas/assetDetailScope.js.map +1 -1
  7. package/dist/api/api-schemas/assetPostBodyBody.d.cts +2 -2
  8. package/dist/api/api-schemas/assetPostBodyBody.d.ts +2 -2
  9. package/dist/api/api-schemas/assetPostBodyBodyScope.cjs +2 -1
  10. package/dist/api/api-schemas/assetPostBodyBodyScope.cjs.map +1 -1
  11. package/dist/api/api-schemas/assetPostBodyBodyScope.d.cts +2 -1
  12. package/dist/api/api-schemas/assetPostBodyBodyScope.d.ts +2 -1
  13. package/dist/api/api-schemas/assetPostBodyBodyScope.js +2 -1
  14. package/dist/api/api-schemas/assetPostBodyBodyScope.js.map +1 -1
  15. package/dist/api/asset/asset.cjs +7 -7
  16. package/dist/api/asset/asset.cjs.map +1 -1
  17. package/dist/api/asset/asset.d.cts +7 -7
  18. package/dist/api/asset/asset.d.ts +7 -7
  19. package/dist/api/asset/asset.fetch.cjs +7 -7
  20. package/dist/api/asset/asset.fetch.cjs.map +1 -1
  21. package/dist/api/asset/asset.fetch.d.cts +7 -7
  22. package/dist/api/asset/asset.fetch.d.ts +7 -7
  23. package/dist/api/asset/asset.fetch.js +7 -7
  24. package/dist/api/asset/asset.fetch.js.map +1 -1
  25. package/dist/api/asset/asset.js +7 -7
  26. package/dist/api/asset/asset.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/api/api-schemas/assetDetailScope.fetch.ts +1 -0
  29. package/src/api/api-schemas/assetDetailScope.ts +1 -0
  30. package/src/api/api-schemas/assetPostBodyBody.fetch.ts +2 -2
  31. package/src/api/api-schemas/assetPostBodyBody.ts +2 -2
  32. package/src/api/api-schemas/assetPostBodyBodyScope.fetch.ts +2 -1
  33. package/src/api/api-schemas/assetPostBodyBodyScope.ts +2 -1
  34. package/src/api/asset/asset.fetch.ts +7 -7
  35. package/src/api/asset/asset.ts +7 -7
@@ -21,9 +21,9 @@ export type AssetPostBodyBody = {
21
21
  content_file?: Blob;
22
22
  /** The textual content of the asset. You must provide a value here or in **content_file** but not both */
23
23
  content_string?: string;
24
- /** An enumeration of the scope of the asset. This can be one of `USER`, `PRODUCT`, `UNIT`, `ORGANISATION`, or `GLOBAL`. Assets that are not `GLOBAL` need a scope ID. */
24
+ /** An enumeration of the scope of the asset. This can be one of `USER`, `PRODUCT`, `UNIT`, `ORGANISATION`, `GLOBAL`, or `INTERNAL`. `PRODUCT`, `UNIT` and `ORGANISATION` assets need a scope ID. `INTERNAL` assets are read only by the Account Server (for its own use, by a **Capability** for example). Only an administrator can create, see or alter them, and they cannot be attached to a **Merchant**. */
25
25
  scope: AssetPostBodyBodyScope;
26
- /** 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. */
26
+ /** 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 and Internal assets do not have a scope (any scope_id provided is ignored). */
27
27
  scope_id?: string;
28
28
  /** Is this a secret asset? Secret assets are not revealed in a subsequent **GET** but are revealed to merchants they are connected to. */
29
29
  secret: boolean;
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  /**
13
- * An enumeration of the scope of the asset. This can be one of `USER`, `PRODUCT`, `UNIT`, `ORGANISATION`, or `GLOBAL`. Assets that are not `GLOBAL` need a scope ID.
13
+ * An enumeration of the scope of the asset. This can be one of `USER`, `PRODUCT`, `UNIT`, `ORGANISATION`, `GLOBAL`, or `INTERNAL`. `PRODUCT`, `UNIT` and `ORGANISATION` assets need a scope ID. `INTERNAL` assets are read only by the Account Server (for its own use, by a **Capability** for example). Only an administrator can create, see or alter them, and they cannot be attached to a **Merchant**.
14
14
  */
15
15
  export type AssetPostBodyBodyScope =
16
16
  (typeof AssetPostBodyBodyScope)[keyof typeof AssetPostBodyBodyScope];
@@ -21,4 +21,5 @@ export const AssetPostBodyBodyScope = {
21
21
  UNIT: "UNIT",
22
22
  ORGANISATION: "ORGANISATION",
23
23
  GLOBAL: "GLOBAL",
24
+ INTERNAL: "INTERNAL",
24
25
  } as const;
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  /**
13
- * An enumeration of the scope of the asset. This can be one of `USER`, `PRODUCT`, `UNIT`, `ORGANISATION`, or `GLOBAL`. Assets that are not `GLOBAL` need a scope ID.
13
+ * An enumeration of the scope of the asset. This can be one of `USER`, `PRODUCT`, `UNIT`, `ORGANISATION`, `GLOBAL`, or `INTERNAL`. `PRODUCT`, `UNIT` and `ORGANISATION` assets need a scope ID. `INTERNAL` assets are read only by the Account Server (for its own use, by a **Capability** for example). Only an administrator can create, see or alter them, and they cannot be attached to a **Merchant**.
14
14
  */
15
15
  export type AssetPostBodyBodyScope =
16
16
  (typeof AssetPostBodyBodyScope)[keyof typeof AssetPostBodyBodyScope];
@@ -21,4 +21,5 @@ export const AssetPostBodyBodyScope = {
21
21
  UNIT: "UNIT",
22
22
  ORGANISATION: "ORGANISATION",
23
23
  GLOBAL: "GLOBAL",
24
+ INTERNAL: "INTERNAL",
24
25
  } as const;
@@ -325,7 +325,7 @@ export const getCreateAssetUrl = () => {
325
325
  };
326
326
 
327
327
  /**
328
- * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**
328
+ * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**. An administrator can also create an **Internal** Asset, one that is read only by the Account Server
329
329
  *
330
330
  * Assets 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**.
331
331
  *
@@ -704,7 +704,7 @@ export const getPatchAssetUrl = (assetId: string) => {
704
704
  *
705
705
  * 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.
706
706
  *
707
- * 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.
707
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
708
708
  * @summary Adjust an existing Asset
709
709
  */
710
710
  export const patchAsset = async (
@@ -816,7 +816,7 @@ export const getDeleteAssetUrl = (assetId: string) => {
816
816
  /**
817
817
  * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted
818
818
  *
819
- * 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.
819
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
820
820
  * @summary Deletes an Asset
821
821
  */
822
822
  export const deleteAsset = async (
@@ -915,7 +915,7 @@ export const getDisableAssetUrl = (assetId: string) => {
915
915
  /**
916
916
  * Disables a known Asset
917
917
  *
918
- * 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.
918
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
919
919
  * @summary Disables an Asset
920
920
  */
921
921
  export const disableAsset = async (
@@ -1014,7 +1014,7 @@ export const getEnableAssetUrl = (assetId: string) => {
1014
1014
  /**
1015
1015
  * Enables a known Asset
1016
1016
  *
1017
- * 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.
1017
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
1018
1018
  * @summary Enables an Asset
1019
1019
  */
1020
1020
  export const enableAsset = async (
@@ -1125,7 +1125,7 @@ export const getAttachAssetUrl = (assetId: string, params?: AttachAssetParams) =
1125
1125
  /**
1126
1126
  * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.
1127
1127
  *
1128
- * 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.
1128
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
1129
1129
  * @summary Attaches an Asset to a Merchant
1130
1130
  */
1131
1131
  export const attachAsset = async (
@@ -1237,7 +1237,7 @@ export const getDetachAssetUrl = (assetId: string, params?: DetachAssetParams) =
1237
1237
  /**
1238
1238
  * Detaches an Asset from a **Merchant**
1239
1239
  *
1240
- * 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.
1240
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
1241
1241
  * @summary Detaches an Asset from a Merchant
1242
1242
  */
1243
1243
  export const detachAsset = async (
@@ -277,7 +277,7 @@ export function useGetAssetSuspense<
277
277
  }
278
278
 
279
279
  /**
280
- * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**
280
+ * Creates an Asset, which can be attached to a **User** account, a **Product**, **Unit**, **Organisation** or can be made **Global**. An administrator can also create an **Internal** Asset, one that is read only by the Account Server
281
281
  *
282
282
  * Assets 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**.
283
283
  *
@@ -616,7 +616,7 @@ export function useGetSpecificAssetSuspense<
616
616
  *
617
617
  * 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.
618
618
  *
619
- * 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.
619
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
620
620
  * @summary Adjust an existing Asset
621
621
  */
622
622
  export const patchAsset = (
@@ -713,7 +713,7 @@ export const usePatchAsset = <TError = ErrorType<void | AsError>, TContext = unk
713
713
  /**
714
714
  * Deletes a known Asset. Assets that are attached to **Merchants** cannot be deleted
715
715
  *
716
- * 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.
716
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
717
717
  * @summary Deletes an Asset
718
718
  */
719
719
  export const deleteAsset = (
@@ -789,7 +789,7 @@ export const useDeleteAsset = <TError = ErrorType<AsError | void>, TContext = un
789
789
  /**
790
790
  * Disables a known Asset
791
791
  *
792
- * 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.
792
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
793
793
  * @summary Disables an Asset
794
794
  */
795
795
  export const disableAsset = (
@@ -868,7 +868,7 @@ export const useDisableAsset = <TError = ErrorType<AsError | void>, TContext = u
868
868
  /**
869
869
  * Enables a known Asset
870
870
  *
871
- * 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.
871
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
872
872
  * @summary Enables an Asset
873
873
  */
874
874
  export const enableAsset = (
@@ -947,7 +947,7 @@ export const useEnableAsset = <TError = ErrorType<AsError | void>, TContext = un
947
947
  /**
948
948
  * Attaches an Asset to a **Merchant**. This allows the **Merchant** to query the Asset. **Merchants** cannot obtain Assets that are not attached to them.
949
949
  *
950
- * 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.
950
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
951
951
  * @summary Attaches an Asset to a Merchant
952
952
  */
953
953
  export const attachAsset = (
@@ -1027,7 +1027,7 @@ export const useAttachAsset = <TError = ErrorType<AsError | void>, TContext = un
1027
1027
  /**
1028
1028
  * Detaches an Asset from a **Merchant**
1029
1029
  *
1030
- * 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.
1030
+ * 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. Only administrators can alter `INTERNAL` assets. Administrators can patch any asset.
1031
1031
  * @summary Detaches an Asset from a Merchant
1032
1032
  */
1033
1033
  export const detachAsset = (