@squonk/account-server-client 4.2.5 → 4.3.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.
Files changed (84) hide show
  1. package/asset/asset.cjs +99 -126
  2. package/asset/asset.cjs.map +1 -1
  3. package/asset/asset.d.cts +99 -99
  4. package/asset/asset.d.ts +99 -99
  5. package/asset/asset.js +107 -134
  6. package/asset/asset.js.map +1 -1
  7. package/charges/charges.cjs +73 -85
  8. package/charges/charges.cjs.map +1 -1
  9. package/charges/charges.d.cts +47 -47
  10. package/charges/charges.d.ts +47 -47
  11. package/charges/charges.js +78 -90
  12. package/charges/charges.js.map +1 -1
  13. package/chunk-3WKSNKHE.js +25 -0
  14. package/chunk-3WKSNKHE.js.map +1 -0
  15. package/chunk-NY2VJJG7.cjs +25 -0
  16. package/chunk-NY2VJJG7.cjs.map +1 -0
  17. package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
  18. package/chunk-RB2KVIEK.cjs.map +1 -0
  19. package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
  20. package/chunk-XYDLYMQ2.js.map +1 -0
  21. package/event-stream/event-stream.cjs +53 -61
  22. package/event-stream/event-stream.cjs.map +1 -1
  23. package/event-stream/event-stream.d.cts +44 -44
  24. package/event-stream/event-stream.d.ts +44 -44
  25. package/event-stream/event-stream.js +58 -66
  26. package/event-stream/event-stream.js.map +1 -1
  27. package/index.cjs +49 -58
  28. package/index.cjs.map +1 -1
  29. package/index.d.cts +783 -765
  30. package/index.d.ts +783 -765
  31. package/index.js +48 -57
  32. package/index.js.map +1 -1
  33. package/merchant/merchant.cjs +38 -45
  34. package/merchant/merchant.cjs.map +1 -1
  35. package/merchant/merchant.d.cts +25 -25
  36. package/merchant/merchant.d.ts +25 -25
  37. package/merchant/merchant.js +42 -49
  38. package/merchant/merchant.js.map +1 -1
  39. package/organisation/organisation.cjs +77 -87
  40. package/organisation/organisation.cjs.map +1 -1
  41. package/organisation/organisation.d.cts +72 -70
  42. package/organisation/organisation.d.ts +72 -70
  43. package/organisation/organisation.js +83 -93
  44. package/organisation/organisation.js.map +1 -1
  45. package/package.json +13 -16
  46. package/product/product.cjs +143 -153
  47. package/product/product.cjs.map +1 -1
  48. package/product/product.d.cts +100 -100
  49. package/product/product.d.ts +100 -100
  50. package/product/product.js +153 -163
  51. package/product/product.js.map +1 -1
  52. package/src/account-server-api.schemas.ts +862 -860
  53. package/src/asset/asset.ts +899 -634
  54. package/src/charges/charges.ts +822 -498
  55. package/src/custom-instance.ts +3 -3
  56. package/src/event-stream/event-stream.ts +530 -344
  57. package/src/index.ts +2 -2
  58. package/src/merchant/merchant.ts +355 -234
  59. package/src/options-mutator.ts +27 -0
  60. package/src/organisation/organisation.ts +812 -504
  61. package/src/product/product.ts +1373 -841
  62. package/src/state/state.ts +174 -127
  63. package/src/unit/unit.ts +1273 -603
  64. package/src/user/user.ts +895 -564
  65. package/state/state.cjs +22 -24
  66. package/state/state.cjs.map +1 -1
  67. package/state/state.d.cts +14 -14
  68. package/state/state.d.ts +14 -14
  69. package/state/state.js +24 -26
  70. package/state/state.js.map +1 -1
  71. package/unit/unit.cjs +171 -106
  72. package/unit/unit.cjs.map +1 -1
  73. package/unit/unit.d.cts +200 -90
  74. package/unit/unit.d.ts +200 -90
  75. package/unit/unit.js +179 -114
  76. package/unit/unit.js.map +1 -1
  77. package/user/user.cjs +94 -110
  78. package/user/user.cjs.map +1 -1
  79. package/user/user.d.cts +77 -77
  80. package/user/user.d.ts +77 -77
  81. package/user/user.js +101 -117
  82. package/user/user.js.map +1 -1
  83. package/chunk-EBOQPVLG.js.map +0 -1
  84. package/chunk-TKLTUR4R.cjs.map +0 -1
package/index.js CHANGED
@@ -3,47 +3,69 @@ import {
3
3
  customInstance,
4
4
  setAuthToken,
5
5
  setBaseUrl
6
- } from "./chunk-EBOQPVLG.js";
6
+ } from "./chunk-XYDLYMQ2.js";
7
7
 
8
8
  // src/account-server-api.schemas.ts
9
- var UnitProductPostBodyBodyFlavour = {
9
+ var EventStreamVersionGetResponseProtocol = {
10
+ ERROR_INTERNAL: "ERROR_INTERNAL",
11
+ SERVICE_NOT_PRESENT: "SERVICE_NOT_PRESENT",
12
+ WEBSOCKET: "WEBSOCKET"
13
+ };
14
+ var OrganisationGetDefaultResponseDefaultProductPrivacy = {
15
+ ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
16
+ ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
17
+ DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
18
+ DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
19
+ };
20
+ var ProductChargesGetResponseProductType = {
21
+ DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
22
+ DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
23
+ };
24
+ var ChargeSummaryType = { PROCESSING: "PROCESSING", STORAGE: "STORAGE" };
25
+ var AssetDetailScope = {
26
+ USER: "USER",
27
+ PRODUCT: "PRODUCT",
28
+ UNIT: "UNIT",
29
+ ORGANISATION: "ORGANISATION",
30
+ GLOBAL: "GLOBAL"
31
+ };
32
+ var ProcessingChargesMerchantKind = { DATA_MANAGER: "DATA_MANAGER" };
33
+ var ProductDetailType = {
34
+ DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
35
+ DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
36
+ };
37
+ var ProductDetailFlavour = {
10
38
  EVALUATION: "EVALUATION",
11
39
  BRONZE: "BRONZE",
12
40
  SILVER: "SILVER",
13
41
  GOLD: "GOLD"
14
42
  };
15
- var UnitProductPostBodyBodyType = {
16
- DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
17
- DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
18
- };
19
- var UnitPatchBodyBodyDefaultProductPrivacy = {
43
+ var ProductTypeServiceKind = { DATA_MANAGER: "DATA_MANAGER" };
44
+ var OrganisationAllDetailDefaultProductPrivacy = {
20
45
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
21
46
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
22
47
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
23
48
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
24
49
  };
25
- var OrganisationPatchBodyBodyDefaultProductPrivacy = {
50
+ var OrganisationDetailDefaultProductPrivacy = {
26
51
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
27
52
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
28
53
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
29
54
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
30
55
  };
31
- var OrganisationUnitPostBodyBodyDefaultProductPrivacy = {
56
+ var MerchantDetailKind = { DATA_MANAGER: "DATA_MANAGER" };
57
+ var UnitAllDetailDefaultProductPrivacy = {
32
58
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
33
59
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
34
60
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
35
61
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
36
62
  };
37
- var OrganisationPostBodyBodyDefaultProductPrivacy = {
63
+ var UnitDetailDefaultProductPrivacy = {
38
64
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
39
65
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
40
66
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
41
67
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
42
68
  };
43
- var EventStreamPostBodyBodyFormat = {
44
- PROTOCOL_STRING: "PROTOCOL_STRING",
45
- JSON_STRING: "JSON_STRING"
46
- };
47
69
  var AssetPostBodyBodyScope = {
48
70
  USER: "USER",
49
71
  PRODUCT: "PRODUCT",
@@ -51,75 +73,44 @@ var AssetPostBodyBodyScope = {
51
73
  ORGANISATION: "ORGANISATION",
52
74
  GLOBAL: "GLOBAL"
53
75
  };
54
- var UnitDetailDefaultProductPrivacy = {
76
+ var EventStreamPostBodyBodyFormat = {
77
+ PROTOCOL_STRING: "PROTOCOL_STRING",
78
+ JSON_STRING: "JSON_STRING"
79
+ };
80
+ var OrganisationPostBodyBodyDefaultProductPrivacy = {
55
81
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
56
82
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
57
83
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
58
84
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
59
85
  };
60
- var UnitAllDetailDefaultProductPrivacy = {
86
+ var OrganisationUnitPostBodyBodyDefaultProductPrivacy = {
61
87
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
62
88
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
63
89
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
64
90
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
65
91
  };
66
- var MerchantDetailKind = {
67
- DATA_MANAGER: "DATA_MANAGER"
68
- };
69
- var OrganisationDetailDefaultProductPrivacy = {
92
+ var OrganisationPatchBodyBodyDefaultProductPrivacy = {
70
93
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
71
94
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
72
95
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
73
96
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
74
97
  };
75
- var OrganisationAllDetailDefaultProductPrivacy = {
98
+ var UnitPatchBodyBodyDefaultProductPrivacy = {
76
99
  ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
77
100
  ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
78
101
  DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
79
102
  DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
80
103
  };
81
- var ProductTypeServiceKind = {
82
- DATA_MANAGER: "DATA_MANAGER"
104
+ var UnitProductPostBodyBodyType = {
105
+ DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
106
+ DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
83
107
  };
84
- var ProductDetailFlavour = {
108
+ var UnitProductPostBodyBodyFlavour = {
85
109
  EVALUATION: "EVALUATION",
86
110
  BRONZE: "BRONZE",
87
111
  SILVER: "SILVER",
88
112
  GOLD: "GOLD"
89
113
  };
90
- var ProductDetailType = {
91
- DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
92
- DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
93
- };
94
- var ProcessingChargesMerchantKind = {
95
- DATA_MANAGER: "DATA_MANAGER"
96
- };
97
- var AssetDetailScope = {
98
- USER: "USER",
99
- PRODUCT: "PRODUCT",
100
- UNIT: "UNIT",
101
- ORGANISATION: "ORGANISATION",
102
- GLOBAL: "GLOBAL"
103
- };
104
- var ChargeSummaryType = {
105
- PROCESSING: "PROCESSING",
106
- STORAGE: "STORAGE"
107
- };
108
- var ProductChargesGetResponseProductType = {
109
- DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION",
110
- DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION"
111
- };
112
- var OrganisationGetDefaultResponseDefaultProductPrivacy = {
113
- ALWAYS_PUBLIC: "ALWAYS_PUBLIC",
114
- ALWAYS_PRIVATE: "ALWAYS_PRIVATE",
115
- DEFAULT_PUBLIC: "DEFAULT_PUBLIC",
116
- DEFAULT_PRIVATE: "DEFAULT_PRIVATE"
117
- };
118
- var EventStreamVersionGetResponseProtocol = {
119
- ERROR_INTERNAL: "ERROR_INTERNAL",
120
- SERVICE_NOT_PRESENT: "SERVICE_NOT_PRESENT",
121
- WEBSOCKET: "WEBSOCKET"
122
- };
123
114
  export {
124
115
  AXIOS_INSTANCE,
125
116
  AssetDetailScope,
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.4.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.2\n */\nexport type AttachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\nexport type GetUnitsParams = {\n/**\n * An object name\n */\nname?: QNameParameter;\n};\n\nexport type GetOrganisationsParams = {\n/**\n * An object name\n */\nname?: QNameParameter;\n};\n\n/**\n * A date where assets prior to this will be returned. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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 * An object name\n */\nexport type QNameParameter = string;\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\nexport type DetachAssetParams = {\n/**\n * A Merchant Identity\n */\nm_id?: QMIdParameter;\n};\n\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\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 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 /**\n * The name you want to give the Product\n * @maxLength 80\n */\n name?: string;\n /**\n * The Product's built-in coin allowance. Product allowances cannot be reduced\n * @minimum 1\n */\n allowance?: number;\n /**\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 * @minimum 1\n */\n limit?: number;\n};\n\n/**\n * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products\n */\nexport type UnitProductPostBodyBodyFlavour = 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\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\nexport type UnitProductPostBodyBody = {\n /**\n * The name you want to give the Product\n * @maxLength 80\n */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /**\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 * @minimum 1\n */\n allowance?: number;\n /**\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 * @minimum 1\n */\n limit?: number;\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 name for the Unit */\n name?: string;\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};\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 name for the Organisational */\n name?: string;\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};\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 /**\n * The name of the unit\n * @maxLength 80\n */\n name: string;\n /**\n * The day you would like to be billed for the Unit's Products (a value from 1 and 28)\n * @minimum 1\n * @maximum 28\n */\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};\n\nexport type PersonalUnitPutBodyBody = {\n /**\n * The day you would like to be billed for the Unit's Products (a value from 1 and 28)\n * @minimum 1\n * @maximum 28\n */\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 /**\n * The name of the organisation\n * @maxLength 80\n */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\n};\n\nexport type EventStreamPostBodyBodyFormat = typeof EventStreamPostBodyBodyFormat[keyof typeof EventStreamPostBodyBodyFormat];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const EventStreamPostBodyBodyFormat = {\n PROTOCOL_STRING: 'PROTOCOL_STRING',\n JSON_STRING: 'JSON_STRING',\n} as const;\n\nexport type EventStreamPostBodyBody = {\n format?: EventStreamPostBodyBodyFormat;\n};\n\n/**\n * 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.\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 /**\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 * @maxLength 80\n * @pattern ^[a-z0-9-]{1,63}$\n */\n name: string;\n /** A file containing the content for the asset. You must provide a value here or in **content_string** but not both */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in **content_file** but not both */\n content_string?: string;\n /** 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. */\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? Secret assets are not revealed in a subsequent **GET** but are revealed to merchants they are connected to. */\n secret: boolean;\n /** An optional description for the Asset */\n description?: string;\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 user: UserDetail;\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\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 /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Unit's billing day */\n billing_day: number;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitAllDetailDefaultProductPrivacy = typeof UnitAllDetailDefaultProductPrivacy[keyof typeof UnitAllDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitAllDetailDefaultProductPrivacy = {\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 UnitAllDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Unit's billing day */\n billing_day: number;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitAllDetailDefaultProductPrivacy;\n /** A list of users that are members of the Unit */\n users: UserDetail[];\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 unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\nexport interface MerchantsGetResponse {\n 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 /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationAllDetailDefaultProductPrivacy = typeof OrganisationAllDetailDefaultProductPrivacy[keyof typeof OrganisationAllDetailDefaultProductPrivacy];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationAllDetailDefaultProductPrivacy = {\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 OrganisationAllDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationAllDetailDefaultProductPrivacy;\n /** A list of users that are members of the Organisation */\n users: UserDetail[];\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 type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\nexport type ProductInstanceDetailCoins = {\n /** The number of coins used\n */\n used: number;\n};\n\nexport interface ProductInstanceDetail {\n coins: ProductInstanceDetailCoins;\n}\n\n/**\n * The Product Type flavour. Not all products have flavours\n\n */\nexport type ProductDetailFlavour = 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\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\nexport interface ProductDetail {\n /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted 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 day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\nexport interface ProductClaimDetail {\n /** The service-specific ID that is using this Subscription\n */\n id: string;\n /** A name for the service-specific ID\n */\n name?: string;\n}\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationAllDetail;\n unit: UnitAllDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationAllDetail;\n unit: UnitAllDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n}\n\nexport interface ChargeAdditionalData { [key: string]: unknown }\n\nexport interface StorageChargeItem {\n item_number: number;\n /** The date and time of the processing charge */\n date: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate?: string;\n /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport type ProcessingChargesMerchantKind = 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 merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\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 /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n charge: ProcessingChargeItem;\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 creator: string;\n id: string;\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n disabled: boolean;\n content: string;\n created: string;\n content_modified?: string;\n description?: string;\n merchants: MerchantDetail[];\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UnitGetResponse = UnitAllDetail;\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 type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n count: number;\n /**\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\n/**\n * The Unit's Product\n */\nexport type ProductUnitGetResponseProduct = 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 units: string;\n description: 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 product_id: string;\n product_type: ProductChargesGetResponseProductType;\n /**\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n count: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type OrganisationGetResponse = OrganisationAllDetail;\n\nexport interface OrganisationsGetResponse {\n count: number;\n /** A list of Organisations */\n organisations: OrganisationAllDetail[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n /**\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n count?: number;\n organisation: OrganisationAllDetail;\n /** A list of Units\n */\n units: UnitAllDetail[];\n}\n\nexport interface OrganisationChargeSummary {\n organisation_id: string;\n name: string;\n summary: ChargeSummary[];\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\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 /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n created?: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;\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\n/**\n * The Event Stream protocol, used to inform the client how to connect to given locations and handle events. At the moment the AS only supports web-sockets.\n */\nexport type EventStreamVersionGetResponseProtocol = typeof EventStreamVersionGetResponseProtocol[keyof typeof EventStreamVersionGetResponseProtocol];\n\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const EventStreamVersionGetResponseProtocol = {\n ERROR_INTERNAL: 'ERROR_INTERNAL',\n SERVICE_NOT_PRESENT: 'SERVICE_NOT_PRESENT',\n WEBSOCKET: 'WEBSOCKET',\n} as const;\n\nexport interface EventStreamVersionGetResponse {\n /** The EventStream implementation version */\n version: string;\n /** The Event Stream protocol, used to inform the client how to connect to given locations and handle events. At the moment the AS only supports web-sockets. */\n protocol: EventStreamVersionGetResponseProtocol;\n /** The name of the Event Stream implementation, often used to identify the service origin and implementation. */\n name: string;\n}\n\nexport interface EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** The Event Stream location. This will be a URL where events can be fetched. The protocol is typically a WebSocket, but the protocol is defined by the specific Event Stream Service that has been deployed. */\n location: string;\n /** The Event Stream format. */\n format: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n count: number;\n summary: ChargeSummary[];\n organisation_charges: OrganisationChargeSummary[];\n}\n\nexport interface AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface AssetGetResponse {\n /** A list of Assets\n */\n assets: AssetDetail[];\n /** 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":";;;;;;;;AA4LO,IAAM,iCAAiC;AAAA,EAC5C,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAWO,IAAM,8BAA8B;AAAA,EACzC,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAmCO,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;AAkCO,IAAM,gDAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAkBO,IAAM,gCAAgC;AAAA,EAC3C,iBAAiB;AAAA,EACjB,aAAa;AACf;AAaO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAoDO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,qCAAqC;AAAA,EAChD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA6BO,IAAM,qBAAqB;AAAA,EAChC,cAAc;AAChB;AA8BO,IAAM,0CAA0C;AAAA,EACrD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAyBO,IAAM,6CAA6C;AAAA,EACxD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,yBAAyB;AAAA,EACpC,cAAc;AAChB;AA6BO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAUO,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAuIO,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;AAuCO,IAAM,oBAAoB;AAAA,EAC/B,YAAY;AAAA,EACZ,SAAS;AACX;AAmFO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAwFO,IAAM,sDAAsD;AAAA,EACjE,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA8CO,IAAM,wCAAwC;AAAA,EACnD,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,WAAW;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/account-server-api.schemas.ts"],"sourcesContent":["/**\n * Generated by orval v7.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.3\n */\nexport interface AsError {\n /** Brief error text that can be presented to the user */\n error: string;\n}\n\nexport type AssetGetByIdResponse = AssetDetail;\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 AssetPostResponse {\n /** The Asset ID\n */\n id: string;\n}\n\nexport interface ChargesGetResponse {\n coins: string;\n count: number;\n summary: ChargeSummary[];\n organisation_charges: OrganisationChargeSummary[];\n}\n\nexport interface EventStreamGetPostResponse {\n /** The EventStream ID */\n id: number;\n /** A symbolic name, used internally to identify the stream */\n name: string;\n /** The Event Stream location. This will be a URL where events can be fetched. The protocol is typically a WebSocket, but the protocol is defined by the specific Event Stream Service that has been deployed. */\n location: string;\n /** The Event Stream format. */\n format: string;\n}\n\n/**\n * The Event Stream protocol, used to inform the client how to connect to given locations and handle events. At the moment the AS only supports web-sockets.\n */\nexport type EventStreamVersionGetResponseProtocol =\n (typeof EventStreamVersionGetResponseProtocol)[keyof typeof EventStreamVersionGetResponseProtocol];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const EventStreamVersionGetResponseProtocol = {\n ERROR_INTERNAL: \"ERROR_INTERNAL\",\n SERVICE_NOT_PRESENT: \"SERVICE_NOT_PRESENT\",\n WEBSOCKET: \"WEBSOCKET\",\n} as const;\n\nexport interface EventStreamVersionGetResponse {\n /** The EventStream implementation version */\n version: string;\n /** The Event Stream protocol, used to inform the client how to connect to given locations and handle events. At the moment the AS only supports web-sockets. */\n protocol: EventStreamVersionGetResponseProtocol;\n /** The name of the Event Stream implementation, often used to identify the service origin and implementation. */\n name: 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 OrganisationPostResponse {\n /** The Organisation's unique ID */\n id: string;\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\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationGetDefaultResponseDefaultProductPrivacy =\n (typeof OrganisationGetDefaultResponseDefaultProductPrivacy)[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];\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 /** The Default Organisation ID\n */\n id?: string;\n /** The Default Organisation Name\n */\n name?: string;\n /** True if the Organisation is private. The Default organisation is always public, although it does not contain a membership (unless you're admin) and only houses Personal Units\n */\n private?: boolean;\n created?: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;\n}\n\nexport interface OrganisationUnitPostResponse {\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface PersonalUnitPutResponse {\n /** The unit's Organisation. Used to identify the Default organisation */\n organisation_id: string;\n /** The unit's unique ID */\n id: string;\n}\n\nexport interface OrganisationChargeSummary {\n organisation_id: string;\n name: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationUnitsGetResponse {\n count?: number;\n organisation: OrganisationAllDetail;\n /** A list of Units\n */\n units: UnitAllDetail[];\n}\n\nexport interface OrganisationChargesGetResponse {\n organisation_id: string;\n name: string;\n coins: string;\n summary: ChargeSummary[];\n unit_charges: OrganisationUnitChargeSummary[];\n}\n\nexport interface OrganisationUnitChargeSummary {\n unit_id: string;\n name: string;\n /**\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: ChargeSummary[];\n}\n\nexport interface OrganisationsGetResponse {\n count: number;\n /** A list of Organisations */\n organisations: OrganisationAllDetail[];\n}\n\nexport type OrganisationGetResponse = OrganisationAllDetail;\n\nexport type ProductChargesGetResponseProductType =\n (typeof ProductChargesGetResponseProductType)[keyof typeof ProductChargesGetResponseProductType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductChargesGetResponseProductType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: \"DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION\",\n DATA_MANAGER_STORAGE_SUBSCRIPTION: \"DATA_MANAGER_STORAGE_SUBSCRIPTION\",\n} as const;\n\nexport interface ProductChargesGetResponse {\n product_id: string;\n product_type: ProductChargesGetResponseProductType;\n /**\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n count: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n /** The total number of coins consumed by this product for the invoice period */\n coins: string;\n processing_charges: ProcessingCharges[];\n storage_charges: StorageCharges;\n}\n\nexport type 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 ProductsGetDefaultStorageCostDefaultStorageCost = {\n cost: string;\n units: string;\n description: string;\n};\n\nexport interface ProductsGetDefaultStorageCost {\n default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;\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\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 UnitChargesGetResponse {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n unit_id: string;\n name?: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n coins: string;\n count: number;\n /**\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\n /** The start of the charge period */\n from: string;\n /** The date where of first day after the charge period */\n until: string;\n summary: UnitChargeSummary;\n products: UnitProductChargeSummary[];\n}\n\nexport interface UnitChargeSummary {\n charges: ChargeSummary[];\n}\n\nexport interface UnitProductChargeSummary {\n product_id: string;\n product_type: string;\n charges: ChargeSummary[];\n}\n\n/**\n * The type of charge\n */\nexport type ChargeSummaryType = (typeof ChargeSummaryType)[keyof typeof ChargeSummaryType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ChargeSummaryType = { PROCESSING: \"PROCESSING\", STORAGE: \"STORAGE\" } as const;\n\nexport interface ChargeSummary {\n /** The type of charge */\n type: ChargeSummaryType;\n /** The cost, in coins of the charge */\n coins: string;\n}\n\nexport interface UnitProductPostResponse {\n /** The Product's unique ID */\n id: string;\n}\n\nexport type UnitGetResponse = UnitAllDetail;\n\nexport interface UnitsGetResponse {\n /** A list of Units\n */\n units: OrganisationUnitsGetResponse[];\n}\n\nexport type UserAccountGetResponse = UserAccountDetail;\n\nexport type AssetDetailScope = (typeof AssetDetailScope)[keyof typeof AssetDetailScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetDetailScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n GLOBAL: \"GLOBAL\",\n} as const;\n\nexport interface AssetDetail {\n creator: string;\n id: string;\n name: string;\n scope: AssetDetailScope;\n scope_id: string;\n secret: boolean;\n disabled: boolean;\n content: string;\n created: string;\n content_modified?: string;\n description?: string;\n merchants: MerchantDetail[];\n}\n\nexport type ProcessingChargesMerchantKind =\n (typeof ProcessingChargesMerchantKind)[keyof typeof ProcessingChargesMerchantKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProcessingChargesMerchantKind = { DATA_MANAGER: \"DATA_MANAGER\" } as const;\n\nexport interface ProcessingCharges {\n merchant_name: string;\n merchant_kind: ProcessingChargesMerchantKind;\n merchant_api_hostname: string;\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 /** True if charges were received after the charge record was finalised */\n post_final_charges?: boolean;\n charge: ProcessingChargeItem;\n}\n\nexport interface ProcessingChargeItem {\n /** The charge record number */\n id: number;\n /** The most recent sequence number for this charge */\n sqn: number;\n name?: string;\n username: string;\n /** The date and time of the processing charge */\n timestamp: string;\n /** The coin-cost of the storage */\n coins: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface StorageCharges {\n num_items: number;\n items: StorageChargeItem[];\n}\n\nexport interface StorageChargeItem {\n item_number: number;\n /** The date and time of the processing charge */\n date: string;\n /** The coin-cost of the storage */\n coins: string;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate?: string;\n /** The date when the charges concluded */\n closed?: string;\n additional_data?: ChargeAdditionalData;\n}\n\nexport interface ChargeAdditionalData {\n [key: string]: unknown;\n}\n\nexport interface ProductDmStorage {\n product: ProductDetail;\n organisation: OrganisationAllDetail;\n unit: UnitAllDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n}\n\nexport interface ProductDmProjectTier {\n product: ProductDetail;\n organisation: OrganisationAllDetail;\n unit: UnitAllDetail;\n storage: ProductDmStorageDetail;\n coins: ProductCoinsDetail;\n instance: ProductInstanceDetail;\n /** True if the product can be (needs to be) claimed. */\n claimable: boolean;\n claim?: ProductClaimDetail;\n}\n\nexport type ProductDmStorageDetailSize = {\n /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */\n peak: string;\n /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */\n current: string;\n /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */\n unit_size: string;\n /** The peak number of storage units used today */\n units_used: number;\n};\n\nexport type ProductDmStorageDetailCoins = {\n /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */\n used: number;\n /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */\n unit_cost: number;\n};\n\nexport interface ProductDmStorageDetail {\n size: ProductDmStorageDetailSize;\n coins: ProductDmStorageDetailCoins;\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 interface ProductCoinsDetail {\n /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */\n allowance: number;\n /** The limit on your billing period spend. You can exceed the allowance but you cannot exceed the spend limit. Once reached the dependent may be restricted */\n limit: number;\n /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */\n used: number;\n /** True if the product is operating at or beyond its coin limit. When it is authority to perform actions using the product are severely limited. */\n at_limit: boolean;\n /** The current burn rate, the approximate amount of coins you are currently consuming each day */\n current_burn_rate: number;\n /** The predicted 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 day of the month when the bill is due, and the end of the current billing period */\n billing_day: number;\n /** A multiplier applied to your coin usage within your allowance */\n allowance_multiplier: number;\n /** A multiplier that will be applied to coin used beyond your allowance */\n overspend_multiplier: number;\n /** The number of days remaining, in the current billing period */\n remaining_days: number;\n}\n\n/**\n * The Product Type\n\n */\nexport type ProductDetailType = (typeof ProductDetailType)[keyof typeof ProductDetailType];\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// 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 /** The Product ID\n */\n id: string;\n created: string;\n /** The Product Type\n */\n type: ProductDetailType;\n /** The Product Type flavour. Not all products have flavours\n */\n flavour?: ProductDetailFlavour;\n /** The name of the Product\n */\n name?: string;\n}\n\nexport 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 kind of service that can use the Product\n */\nexport type ProductTypeServiceKind =\n (typeof ProductTypeServiceKind)[keyof typeof ProductTypeServiceKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const ProductTypeServiceKind = { DATA_MANAGER: \"DATA_MANAGER\" } as const;\n\nexport interface ProductType {\n /** A product type, this is a unique string amongst all types known to the Account Server */\n type: string;\n /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */\n flavour?: string;\n /** The kind of service that can use the Product */\n service_kind?: ProductTypeServiceKind;\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationAllDetailDefaultProductPrivacy =\n (typeof OrganisationAllDetailDefaultProductPrivacy)[keyof typeof OrganisationAllDetailDefaultProductPrivacy];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const OrganisationAllDetailDefaultProductPrivacy = {\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 OrganisationAllDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationAllDetailDefaultProductPrivacy;\n /** A list of users that are members of the Organisation */\n users: UserDetail[];\n}\n\n/**\n * The Organisation's default product privacy setting\n */\nexport type OrganisationDetailDefaultProductPrivacy =\n (typeof OrganisationDetailDefaultProductPrivacy)[keyof typeof OrganisationDetailDefaultProductPrivacy];\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 /** The Organisation's unique ID */\n id: string;\n /** The Organisation's name */\n name: string;\n /** The username of the Organisation's owner. Not all Organisations have an owner. The Default Organisation has no owner. */\n owner_id?: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Organisation's default product privacy setting */\n default_product_privacy: OrganisationDetailDefaultProductPrivacy;\n}\n\nexport interface MerchantsGetResponse {\n count?: number;\n /** The list of known Merchants\n */\n merchants: MerchantDetail[];\n}\n\nexport type MerchantGetResponse = MerchantDetail;\n\n/**\n * The kind of Service\n */\nexport type MerchantDetailKind = (typeof MerchantDetailKind)[keyof typeof MerchantDetailKind];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const MerchantDetailKind = { DATA_MANAGER: \"DATA_MANAGER\" } as const;\n\nexport interface MerchantDetail {\n /** The unique ID of the Service */\n id: number;\n created: string;\n /** The kind of Service */\n kind: MerchantDetailKind;\n /** The name assigned to the Service */\n name: string;\n /** The hostname used by the Service */\n api_hostname: string;\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitAllDetailDefaultProductPrivacy =\n (typeof UnitAllDetailDefaultProductPrivacy)[keyof typeof UnitAllDetailDefaultProductPrivacy];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitAllDetailDefaultProductPrivacy = {\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 UnitAllDetail {\n /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Unit's billing day */\n billing_day: number;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitAllDetailDefaultProductPrivacy;\n /** A list of users that are members of the Unit */\n users: UserDetail[];\n}\n\n/**\n * The Unit's default product privacy setting\n */\nexport type UnitDetailDefaultProductPrivacy =\n (typeof UnitDetailDefaultProductPrivacy)[keyof typeof UnitDetailDefaultProductPrivacy];\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 /** Whether the user making the API call is a member of the Unit */\n caller_is_member: boolean;\n /** The Unit's unique identity */\n id: string;\n /** The Unit's name */\n name: string;\n /** The Unit's owner (a username) */\n owner_id: string;\n /** True if the Unit is private */\n private: boolean;\n created: string;\n /** The Unit's billing day */\n billing_day: number;\n /** The Unit's default product privacy setting */\n default_product_privacy: UnitDetailDefaultProductPrivacy;\n}\n\nexport interface UserAccountDetail {\n user: UserDetail;\n /** Whether the caller has admin privilege */\n caller_has_admin_privilege: boolean;\n /** The roles assigned to the user recognised by the Account Server */\n account_server_roles: string[];\n}\n\nexport interface UserDetail {\n /** The user identity (username) */\n id: string;\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\n/**\n * 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.\n */\nexport type AssetPostBodyBodyScope =\n (typeof AssetPostBodyBodyScope)[keyof typeof AssetPostBodyBodyScope];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const AssetPostBodyBodyScope = {\n USER: \"USER\",\n PRODUCT: \"PRODUCT\",\n UNIT: \"UNIT\",\n ORGANISATION: \"ORGANISATION\",\n GLOBAL: \"GLOBAL\",\n} as const;\n\nexport type AssetPostBodyBody = {\n /**\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 * @maxLength 80\n * @pattern ^[a-z0-9-]{1,63}$\n */\n name: string;\n /** A file containing the content for the asset. You must provide a value here or in **content_string** but not both */\n content_file?: Blob;\n /** The textual content of the asset. You must provide a value here or in **content_file** but not both */\n content_string?: string;\n /** 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. */\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? Secret assets are not revealed in a subsequent **GET** but are revealed to merchants they are connected to. */\n secret: boolean;\n /** An optional description for the Asset */\n description?: string;\n};\n\nexport type EventStreamPostBodyBodyFormat =\n (typeof EventStreamPostBodyBodyFormat)[keyof typeof EventStreamPostBodyBodyFormat];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const EventStreamPostBodyBodyFormat = {\n PROTOCOL_STRING: \"PROTOCOL_STRING\",\n JSON_STRING: \"JSON_STRING\",\n} as const;\n\nexport type EventStreamPostBodyBody = { format?: EventStreamPostBodyBodyFormat };\n\n/**\n * The default product privacy setting for the Organisation\n */\nexport type OrganisationPostBodyBodyDefaultProductPrivacy =\n (typeof OrganisationPostBodyBodyDefaultProductPrivacy)[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];\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 /**\n * The name of the organisation\n * @maxLength 80\n */\n name: string;\n /** The name of the organisation owner. A user ID */\n owner: string;\n /** The default product privacy setting for the Organisation */\n default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;\n};\n\nexport type PersonalUnitPutBodyBody = {\n /**\n * The day you would like to be billed for the Unit's Products (a value from 1 and 28)\n * @minimum 1\n * @maximum 28\n */\n billing_day: number;\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 =\n (typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy)[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];\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 /**\n * The name of the unit\n * @maxLength 80\n */\n name: string;\n /**\n * The day you would like to be billed for the Unit's Products (a value from 1 and 28)\n * @minimum 1\n * @maximum 28\n */\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};\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 =\n (typeof OrganisationPatchBodyBodyDefaultProductPrivacy)[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];\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 name for the Organisational */\n name?: string;\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};\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 =\n (typeof UnitPatchBodyBodyDefaultProductPrivacy)[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];\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 name for the Unit */\n name?: string;\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};\n\n/**\n * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products\n */\nexport type UnitProductPostBodyBodyType =\n (typeof UnitProductPostBodyBodyType)[keyof typeof UnitProductPostBodyBodyType];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyType = {\n DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: \"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 =\n (typeof UnitProductPostBodyBodyFlavour)[keyof typeof UnitProductPostBodyBodyFlavour];\n\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const UnitProductPostBodyBodyFlavour = {\n EVALUATION: \"EVALUATION\",\n BRONZE: \"BRONZE\",\n SILVER: \"SILVER\",\n GOLD: \"GOLD\",\n} as const;\n\nexport type UnitProductPostBodyBody = {\n /**\n * The name you want to give the Product\n * @maxLength 80\n */\n name: string;\n /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.\n\nProject Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */\n type: UnitProductPostBodyBodyType;\n /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */\n flavour?: UnitProductPostBodyBodyFlavour;\n /**\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 * @minimum 1\n */\n allowance?: number;\n /**\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 * @minimum 1\n */\n limit?: number;\n};\n\nexport type ProductPatchBodyBody = {\n /**\n * The name you want to give the Product\n * @maxLength 80\n */\n name?: string;\n /**\n * The Product's built-in coin allowance. Product allowances cannot be reduced\n * @minimum 1\n */\n allowance?: number;\n /**\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 * @minimum 1\n */\n limit?: number;\n};\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\n/**\n * An Organisation Identity\n */\nexport type QOrgIdParameter = string;\n\n/**\n * A Merchant Identity\n */\nexport type QMIdParameter = number;\n\n/**\n * An object name\n */\nexport type QNameParameter = string;\n\n/**\n * A Unit Identity\n */\nexport type QUnitIdParameter = string;\n\n/**\n * A Product Identity\n */\nexport type QProductIdParameter = string;\n\n/**\n * A User Identity\n */\nexport type QUserIdParameter = string;\n\n/**\n * A date from which to retrieve assets. 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\n/**\n * A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\nexport type QUntilParameter = string;\n\nexport type GetChargesParams = {\n /**\n * A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n * @minimum -23\n * @maximum 0\n */\n pbp?: QPbpParameter;\n};\n\nexport type GetOrganisationChargesParams = {\n /**\n * A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n * @minimum -23\n * @maximum 0\n */\n pbp?: QPbpParameter;\n};\n\nexport type GetProductChargesParams = {\n /**\n * A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n * @minimum -23\n * @maximum 0\n */\n pbp?: QPbpParameter;\n};\n\nexport type GetUnitChargesParams = {\n /**\n * A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided\n */\n from?: QFromParameter;\n /**\n * A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided\n */\n until?: QUntilParameter;\n /**\n * A charge Prior Billing Period, 0 implies \"current\" and -23 is for the period 23 months ago.\n * @minimum -23\n * @maximum 0\n */\n pbp?: QPbpParameter;\n};\n\nexport type GetOrganisationsParams = {\n /**\n * An object name\n */\n name?: QNameParameter;\n};\n\nexport type GetUnitsParams = {\n /**\n * An object name\n */\n name?: QNameParameter;\n};\n\nexport type GetAssetParams = {\n /**\n * A User Identity\n * @minLength 3\n * @maxLength 80\n * @pattern ^\\w(?:\\w*(?:[@.-]\\w+)?)*$\n */\n user_id?: QUserIdParameter;\n /**\n * A Product Identity\n * @pattern ^product-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$\n */\n product_id?: QProductIdParameter;\n /**\n * A Unit Identity\n * @pattern ^unit-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$\n */\n unit_id?: QUnitIdParameter;\n /**\n * An Organisation Identity\n * @pattern ^org-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$\n */\n org_id?: QOrgIdParameter;\n};\n\nexport type AttachAssetParams = {\n /**\n * A Merchant Identity\n * @minimum 1\n */\n m_id?: QMIdParameter;\n};\n\nexport type DetachAssetParams = {\n /**\n * A Merchant Identity\n * @minimum 1\n */\n m_id?: QMIdParameter;\n};\n"],"mappings":";;;;;;;;AAyDO,IAAM,wCAAwC;AAAA,EACnD,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,WAAW;AACb;AAsCO,IAAM,sDAAsD;AAAA,EACjE,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAgFO,IAAM,uCAAuC;AAAA,EAClD,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AAoGO,IAAM,oBAAoB,EAAE,YAAY,cAAc,SAAS,UAAU;AA2BzE,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AAqBO,IAAM,gCAAgC,EAAE,cAAc,eAAe;AAyIrE,IAAM,oBAAoB;AAAA,EAC/B,wCAAwC;AAAA,EACxC,mCAAmC;AACrC;AASO,IAAM,uBAAuB;AAAA,EAClC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;AAmCO,IAAM,yBAAyB,EAAE,cAAc,eAAe;AAkB9D,IAAM,6CAA6C;AAAA,EACxD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,0CAA0C;AAAA,EACrD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAiCO,IAAM,qBAAqB,EAAE,cAAc,eAAe;AAqB1D,IAAM,qCAAqC;AAAA,EAChD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA6BO,IAAM,kCAAkC;AAAA,EAC7C,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAiDO,IAAM,yBAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,QAAQ;AACV;AA2BO,IAAM,gCAAgC;AAAA,EAC3C,iBAAiB;AAAA,EACjB,aAAa;AACf;AAWO,IAAM,gDAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA8BO,IAAM,oDAAoD;AAAA,EAC/D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AA2BO,IAAM,iDAAiD;AAAA,EAC5D,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAoBO,IAAM,yCAAyC;AAAA,EACpD,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;AAoBO,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;","names":[]}
@@ -1,83 +1,76 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
4
-
5
- // src/merchant/merchant.ts
3
+ var _chunkNY2VJJG7cjs = require('../chunk-NY2VJJG7.cjs');
6
4
 
7
5
 
6
+ var _chunkRB2KVIEKcjs = require('../chunk-RB2KVIEK.cjs');
8
7
 
8
+ // src/merchant/merchant.ts
9
9
  var _reactquery = require('@tanstack/react-query');
10
10
  var getMerchants = (options, signal) => {
11
- return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
12
- {
13
- url: `/merchant`,
14
- method: "GET",
15
- signal
16
- },
17
- options
18
- );
11
+ return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/merchant`, method: "GET", signal }, options);
19
12
  };
20
13
  var getGetMerchantsQueryKey = () => {
21
- return ["account-server-api", `/merchant`];
14
+ return [`/merchant`];
22
15
  };
23
- var getGetMerchantsQueryOptions = (options) => {
16
+ var useGetMerchantsQueryOptions = (options) => {
24
17
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
25
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetMerchantsQueryKey()));
18
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _ => _.queryKey]), () => ( getGetMerchantsQueryKey()));
26
19
  const queryFn = ({ signal }) => getMerchants(requestOptions, signal);
27
- return { queryKey, queryFn, ...queryOptions };
20
+ const customOptions = _chunkNY2VJJG7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
21
+ return customOptions;
28
22
  };
29
- function useGetMerchants(options) {
30
- const queryOptions = getGetMerchantsQueryOptions(options);
31
- const query = _reactquery.useQuery.call(void 0, queryOptions);
23
+ function useGetMerchants(options, queryClient) {
24
+ const queryOptions = useGetMerchantsQueryOptions(options);
25
+ const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
32
26
  query.queryKey = queryOptions.queryKey;
33
27
  return query;
34
28
  }
35
- var getGetMerchantsSuspenseQueryOptions = (options) => {
29
+ var useGetMerchantsSuspenseQueryOptions = (options) => {
36
30
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
37
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetMerchantsQueryKey()));
31
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _2 => _2.queryKey]), () => ( getGetMerchantsQueryKey()));
38
32
  const queryFn = ({ signal }) => getMerchants(requestOptions, signal);
39
- return { queryKey, queryFn, ...queryOptions };
33
+ const customOptions = _chunkNY2VJJG7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
34
+ return customOptions;
40
35
  };
41
- function useGetMerchantsSuspense(options) {
42
- const queryOptions = getGetMerchantsSuspenseQueryOptions(options);
43
- const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
36
+ function useGetMerchantsSuspense(options, queryClient) {
37
+ const queryOptions = useGetMerchantsSuspenseQueryOptions(options);
38
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
44
39
  query.queryKey = queryOptions.queryKey;
45
40
  return query;
46
41
  }
47
42
  var getService = (mId, options, signal) => {
48
- return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
49
- {
50
- url: `/merchant/${mId}`,
51
- method: "GET",
52
- signal
53
- },
43
+ return _chunkRB2KVIEKcjs.customInstance.call(void 0,
44
+ { url: `/merchant/${mId}`, method: "GET", signal },
54
45
  options
55
46
  );
56
47
  };
57
48
  var getGetServiceQueryKey = (mId) => {
58
- return ["account-server-api", `/merchant/${mId}`];
49
+ return [`/merchant/${mId}`];
59
50
  };
60
- var getGetServiceQueryOptions = (mId, options) => {
51
+ var useGetServiceQueryOptions = (mId, options) => {
61
52
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
62
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetServiceQueryKey(mId)));
53
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _3 => _3.queryKey]), () => ( getGetServiceQueryKey(mId)));
63
54
  const queryFn = ({ signal }) => getService(mId, requestOptions, signal);
64
- return { queryKey, queryFn, enabled: !!mId, ...queryOptions };
55
+ const customOptions = _chunkNY2VJJG7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
56
+ return customOptions;
65
57
  };
66
- function useGetService(mId, options) {
67
- const queryOptions = getGetServiceQueryOptions(mId, options);
68
- const query = _reactquery.useQuery.call(void 0, queryOptions);
58
+ function useGetService(mId, options, queryClient) {
59
+ const queryOptions = useGetServiceQueryOptions(mId, options);
60
+ const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
69
61
  query.queryKey = queryOptions.queryKey;
70
62
  return query;
71
63
  }
72
- var getGetServiceSuspenseQueryOptions = (mId, options) => {
64
+ var useGetServiceSuspenseQueryOptions = (mId, options) => {
73
65
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
74
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetServiceQueryKey(mId)));
66
+ const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _4 => _4.queryKey]), () => ( getGetServiceQueryKey(mId)));
75
67
  const queryFn = ({ signal }) => getService(mId, requestOptions, signal);
76
- return { queryKey, queryFn, ...queryOptions };
68
+ const customOptions = _chunkNY2VJJG7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
69
+ return customOptions;
77
70
  };
78
- function useGetServiceSuspense(mId, options) {
79
- const queryOptions = getGetServiceSuspenseQueryOptions(mId, options);
80
- const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
71
+ function useGetServiceSuspense(mId, options, queryClient) {
72
+ const queryOptions = useGetServiceSuspenseQueryOptions(mId, options);
73
+ const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
81
74
  query.queryKey = queryOptions.queryKey;
82
75
  return query;
83
76
  }
@@ -94,5 +87,5 @@ function useGetServiceSuspense(mId, options) {
94
87
 
95
88
 
96
89
 
97
- exports.getGetMerchantsQueryKey = getGetMerchantsQueryKey; exports.getGetMerchantsQueryOptions = getGetMerchantsQueryOptions; exports.getGetMerchantsSuspenseQueryOptions = getGetMerchantsSuspenseQueryOptions; exports.getGetServiceQueryKey = getGetServiceQueryKey; exports.getGetServiceQueryOptions = getGetServiceQueryOptions; exports.getGetServiceSuspenseQueryOptions = getGetServiceSuspenseQueryOptions; exports.getMerchants = getMerchants; exports.getService = getService; exports.useGetMerchants = useGetMerchants; exports.useGetMerchantsSuspense = useGetMerchantsSuspense; exports.useGetService = useGetService; exports.useGetServiceSuspense = useGetServiceSuspense;
90
+ exports.getGetMerchantsQueryKey = getGetMerchantsQueryKey; exports.getGetServiceQueryKey = getGetServiceQueryKey; exports.getMerchants = getMerchants; exports.getService = getService; exports.useGetMerchants = useGetMerchants; exports.useGetMerchantsQueryOptions = useGetMerchantsQueryOptions; exports.useGetMerchantsSuspense = useGetMerchantsSuspense; exports.useGetMerchantsSuspenseQueryOptions = useGetMerchantsSuspenseQueryOptions; exports.useGetService = useGetService; exports.useGetServiceQueryOptions = useGetServiceQueryOptions; exports.useGetServiceSuspense = useGetServiceSuspense; exports.useGetServiceSuspenseQueryOptions = useGetServiceSuspenseQueryOptions;
98
91
  //# sourceMappingURL=merchant.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","../../src/merchant/merchant.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AAAA,mDACK;AAgCA,IAAM,aAAA,EAAe,CAE3B,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,SAAA,CAAA;AAAA,MAAa,MAAA,EAAQ,KAAA;AAAA,MAAO;AAAA,IACpC,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,wBAAA,EAA0B,CAAA,EAAA,GAAM;AACzC,EAAA,OAAO,CAAC,oBAAA,EAAsB,CAAA,SAAA,CAAW,CAAA;AACzC,CAAA;AAGG,IAAM,4BAAA,EAA8B,CAAwF,OAAA,EAAA,GAC9H;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,uBAAA,CAAwB,GAAA;AAIlE,EAAA,MAAM,QAAA,EAAmE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,YAAA,CAAa,cAAA,EAAgB,MAAM,CAAA;AAM7H,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,aAAY,CAAA;AAC/C,CAAA;AAkCO,SAAS,eAAA,CACd,OAAA,EAEmF;AAEnF,EAAA,MAAM,aAAA,EAAe,2BAAA,CAA4B,OAAO,CAAA;AAExD,EAAA,MAAM,MAAA,EAAQ,kCAAA,YAAqB,CAAA;AAEnC,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;AAIO,IAAM,oCAAA,EAAsC,CAAwF,OAAA,EAAA,GACtI;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,uBAAA,CAAwB,GAAA;AAIlE,EAAA,MAAM,QAAA,EAAmE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,YAAA,CAAa,cAAA,EAAgB,MAAM,CAAA;AAM7H,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,aAAY,CAAA;AAC/C,CAAA;AAsBO,SAAS,uBAAA,CACd,OAAA,EAE2F;AAE3F,EAAA,MAAM,aAAA,EAAe,mCAAA,CAAoC,OAAO,CAAA;AAEhE,EAAA,MAAM,MAAA,EAAQ,0CAAA,YAA6B,CAAA;AAE3C,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;AASO,IAAM,WAAA,EAAa,CACtB,GAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,UAAA,EAAa,GAAG,CAAA,CAAA;AAAY,MAAA;AAAO,MAAA;AAC3C,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGiC;AACzB,EAAA;AACR;AAGS;AAGC,EAAA;AAEM,EAAA;AAIiE,EAAA;AAM9D,EAAA;AACvB;AAmCc;AAIS,EAAA;AAEE,EAAA;AAEN,EAAA;AAEV,EAAA;AACT;AAIa;AAGC,EAAA;AAEM,EAAA;AAIiE,EAAA;AAM9D,EAAA;AACvB;AAsBgB;AAKO,EAAA;AAEP,EAAA;AAEG,EAAA;AAEV,EAAA;AACT;ADhP4B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.4.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 **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.2\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n MerchantDetail,\n MerchantsGetResponse\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 Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantsGetResponse>(\n {url: `/merchant`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMerchantsQueryKey = () => {\n return [\"account-server-api\", `/merchant`] as const;\n }\n\n \nexport const getGetMerchantsQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsQueryError = ErrorType<AsError | void>\n\n\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets all Merchants\n */\n\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetMerchantsQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetMerchantsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets all Merchants\n */\n\nexport function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetMerchantsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantDetail>(\n {url: `/merchant/${mId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetServiceQueryKey = (mId: number,) => {\n return [\"account-server-api\", `/merchant/${mId}`] as const;\n }\n\n \nexport const getGetServiceQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceQueryError = ErrorType<AsError | void>\n\n\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets a specific Merchant\n */\n\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetServiceQueryOptions(mId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetServiceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>\n\n\nexport function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets a specific Merchant\n */\n\nexport function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
1
+ {"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","../../src/merchant/merchant.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACA;ACGA,mDAA2C;AA8BpC,IAAM,aAAA,EAAe,CAC1B,OAAA,EACA,MAAA,EAAA,GACG;AACH,EAAA,OAAO,8CAAA,EAAuC,GAAA,EAAK,CAAA,SAAA,CAAA,EAAa,MAAA,EAAQ,KAAA,EAAO,OAAO,CAAA,EAAG,OAAO,CAAA;AAClG,CAAA;AAEO,IAAM,wBAAA,EAA0B,CAAA,EAAA,GAAM;AAC3C,EAAA,OAAO,CAAC,CAAA,SAAA,CAAW,CAAA;AACrB,CAAA;AAEO,IAAM,4BAAA,EAA8B,CAGzC,OAAA,EAAA,GAGI;AACJ,EAAA,MAAM,EAAE,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAe,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAErE,EAAA,MAAM,SAAA,mCAAW,YAAA,2BAAc,UAAA,UAAY,uBAAA,CAAwB,GAAA;AAEnE,EAAA,MAAM,QAAA,EAAmE,CAAC,EAAE,OAAO,CAAA,EAAA,GACjF,YAAA,CAAa,cAAA,EAAgB,MAAM,CAAA;AAErC,EAAA,MAAM,cAAA,EAAgB,4CAAA,EAAe,GAAG,YAAA,EAAc,QAAA,EAAU,QAAQ,CAAC,CAAA;AAEzE,EAAA,OAAO,aAAA;AAKT,CAAA;AAuDO,SAAS,eAAA,CAId,OAAA,EAIA,WAAA,EACgF;AAChF,EAAA,MAAM,aAAA,EAAe,2BAAA,CAA4B,OAAO,CAAA;AAExD,EAAA,MAAM,MAAA,EAAQ,kCAAA,YAAS,EAAc,WAAW,CAAA;AAIhD,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;AAEO,IAAM,oCAAA,EAAsC,CAGjD,OAAA,EAAA,GAGI;AACJ,EAAA,MAAM,EAAE,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAe,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAErE,EAAA,MAAM,SAAA,mCAAW,YAAA,6BAAc,UAAA,UAAY,uBAAA,CAAwB,GAAA;AAEnE,EAAA,MAAM,QAAA,EAAmE,CAAC,EAAE,OAAO,CAAA,EAAA,GACjF,YAAA,CAAa,cAAA,EAAgB,MAAM,CAAA;AAErC,EAAA,MAAM,cAAA,EAAgB,4CAAA,EAAe,GAAG,YAAA,EAAc,QAAA,EAAU,QAAQ,CAAC,CAAA;AAEzE,EAAA,OAAO,aAAA;AAKT,CAAA;AA6CO,SAAS,uBAAA,CAId,OAAA,EAMA,WAAA,EACwF;AACxF,EAAA,MAAM,aAAA,EAAe,mCAAA,CAAoC,OAAO,CAAA;AAEhE,EAAA,MAAM,MAAA,EAAQ,0CAAA,YAAiB,EAAc,WAAW,CAAA;AAKxD,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;AAOO,IAAM,WAAA,EAAa,CACxB,GAAA,EACA,OAAA,EACA,MAAA,EAAA,GACG;AACH,EAAA,OAAO,8CAAA;AAAA,IACL,EAAE,GAAA,EAAK,CAAA,UAAA,EAAa,GAAG,CAAA,CAAA;AACvB,IAAA;AACF,EAAA;AACF;AAEqC;AACT,EAAA;AAC5B;AAEa;AAUI,EAAA;AAEE,EAAA;AAEgE,EAAA;AAG3D,EAAA;AAEf,EAAA;AAGT;AA+DE;AAMqB,EAAA;AAEE,EAAA;AAIN,EAAA;AAEV,EAAA;AACT;AAEa;AAUI,EAAA;AAEE,EAAA;AAEgE,EAAA;AAG3D,EAAA;AAEf,EAAA;AAKT;AA0CgB;AAWO,EAAA;AAEP,EAAA;AAKG,EAAA;AAEV,EAAA;AACT;ADnX4B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","sourcesContent":[null,"/**\n * Generated by orval v7.10.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.3\n */\nimport { useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type { AsError, MerchantDetail, MerchantsGetResponse } from \"../account-server-api.schemas\";\n\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { queryMutator } from \".././options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<MerchantsGetResponse>({ url: `/merchant`, method: \"GET\", signal }, options);\n};\n\nexport const getGetMerchantsQueryKey = () => {\n return [`/merchant`] as const;\n};\n\nexport const useGetMerchantsQueryOptions = <\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) =>\n getMerchants(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>;\nexport type GetMerchantsQueryError = ErrorType<AsError | void>;\n\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n Awaited<ReturnType<typeof getMerchants>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n Awaited<ReturnType<typeof getMerchants>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Merchants\n */\n\nexport function useGetMerchants<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetMerchantsQueryOptions(options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetMerchantsSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) =>\n getMerchants(requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>;\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets all Merchants\n */\n\nexport function useGetMerchantsSuspense<\n TData = Awaited<ReturnType<typeof getMerchants>>,\n TError = ErrorType<AsError | void>,\n>(\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetMerchantsSuspenseQueryOptions(options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<MerchantDetail>(\n { url: `/merchant/${mId}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetServiceQueryKey = (mId: number) => {\n return [`/merchant/${mId}`] as const;\n};\n\nexport const useGetServiceQueryOptions = <\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) =>\n getService(mId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n};\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>;\nexport type GetServiceQueryError = ErrorType<AsError | void>;\n\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n Awaited<ReturnType<typeof getService>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n Awaited<ReturnType<typeof getService>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets a specific Merchant\n */\n\nexport function useGetService<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetServiceQueryOptions(mId, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetServiceSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) =>\n getService(mId, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>;\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets a specific Merchant\n */\n\nexport function useGetServiceSuspense<\n TData = Awaited<ReturnType<typeof getService>>,\n TError = ErrorType<AsError | void>,\n>(\n mId: number,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetServiceSuspenseQueryOptions(mId, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"]}