@squonk/account-server-client 4.2.5 → 4.4.0-4-4.2174353771

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 (92) hide show
  1. package/actions/actions.cjs +53 -0
  2. package/actions/actions.cjs.map +1 -0
  3. package/actions/actions.d.cts +72 -0
  4. package/actions/actions.d.ts +72 -0
  5. package/actions/actions.js +53 -0
  6. package/actions/actions.js.map +1 -0
  7. package/actions/package.json +7 -0
  8. package/asset/asset.cjs +99 -126
  9. package/asset/asset.cjs.map +1 -1
  10. package/asset/asset.d.cts +99 -99
  11. package/asset/asset.d.ts +99 -99
  12. package/asset/asset.js +107 -134
  13. package/asset/asset.js.map +1 -1
  14. package/charges/charges.cjs +73 -85
  15. package/charges/charges.cjs.map +1 -1
  16. package/charges/charges.d.cts +47 -47
  17. package/charges/charges.d.ts +47 -47
  18. package/charges/charges.js +78 -90
  19. package/charges/charges.js.map +1 -1
  20. package/chunk-76ADQBHZ.js +25 -0
  21. package/chunk-76ADQBHZ.js.map +1 -0
  22. package/chunk-KHB5TJT7.cjs +25 -0
  23. package/chunk-KHB5TJT7.cjs.map +1 -0
  24. package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
  25. package/chunk-RB2KVIEK.cjs.map +1 -0
  26. package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
  27. package/chunk-XYDLYMQ2.js.map +1 -0
  28. package/event-stream/event-stream.cjs +53 -61
  29. package/event-stream/event-stream.cjs.map +1 -1
  30. package/event-stream/event-stream.d.cts +44 -44
  31. package/event-stream/event-stream.d.ts +44 -44
  32. package/event-stream/event-stream.js +58 -66
  33. package/event-stream/event-stream.js.map +1 -1
  34. package/index.cjs +56 -58
  35. package/index.cjs.map +1 -1
  36. package/index.d.cts +867 -777
  37. package/index.d.ts +867 -777
  38. package/index.js +55 -57
  39. package/index.js.map +1 -1
  40. package/merchant/merchant.cjs +38 -45
  41. package/merchant/merchant.cjs.map +1 -1
  42. package/merchant/merchant.d.cts +25 -25
  43. package/merchant/merchant.d.ts +25 -25
  44. package/merchant/merchant.js +42 -49
  45. package/merchant/merchant.js.map +1 -1
  46. package/organisation/organisation.cjs +77 -87
  47. package/organisation/organisation.cjs.map +1 -1
  48. package/organisation/organisation.d.cts +72 -70
  49. package/organisation/organisation.d.ts +72 -70
  50. package/organisation/organisation.js +83 -93
  51. package/organisation/organisation.js.map +1 -1
  52. package/package.json +15 -18
  53. package/product/product.cjs +143 -153
  54. package/product/product.cjs.map +1 -1
  55. package/product/product.d.cts +100 -100
  56. package/product/product.d.ts +100 -100
  57. package/product/product.js +153 -163
  58. package/product/product.js.map +1 -1
  59. package/src/{account-server-api.schemas.ts → API_TARGET_NAME.schemas.ts} +931 -849
  60. package/src/actions/actions.ts +249 -0
  61. package/src/asset/asset.ts +899 -634
  62. package/src/charges/charges.ts +822 -498
  63. package/src/custom-instance.ts +3 -3
  64. package/src/event-stream/event-stream.ts +530 -344
  65. package/src/index.ts +3 -3
  66. package/src/merchant/merchant.ts +355 -234
  67. package/src/options-mutator.ts +27 -0
  68. package/src/organisation/organisation.ts +812 -504
  69. package/src/product/product.ts +1373 -841
  70. package/src/state/state.ts +174 -127
  71. package/src/unit/unit.ts +1273 -603
  72. package/src/user/user.ts +895 -564
  73. package/state/state.cjs +22 -24
  74. package/state/state.cjs.map +1 -1
  75. package/state/state.d.cts +14 -14
  76. package/state/state.d.ts +14 -14
  77. package/state/state.js +24 -26
  78. package/state/state.js.map +1 -1
  79. package/unit/unit.cjs +171 -106
  80. package/unit/unit.cjs.map +1 -1
  81. package/unit/unit.d.cts +200 -90
  82. package/unit/unit.d.ts +200 -90
  83. package/unit/unit.js +179 -114
  84. package/unit/unit.js.map +1 -1
  85. package/user/user.cjs +94 -110
  86. package/user/user.cjs.map +1 -1
  87. package/user/user.d.cts +77 -77
  88. package/user/user.d.ts +77 -77
  89. package/user/user.js +101 -117
  90. package/user/user.js.map +1 -1
  91. package/chunk-EBOQPVLG.js.map +0 -1
  92. package/chunk-TKLTUR4R.cjs.map +0 -1
package/index.d.cts CHANGED
@@ -2,453 +2,498 @@ import * as axios from 'axios';
2
2
  import { AxiosRequestConfig, AxiosError } from 'axios';
3
3
 
4
4
  /**
5
- * Generated by orval v7.4.1 🍺
5
+ * Generated by orval v7.10.0 🍺
6
6
  * Do not edit manually.
7
7
  * Account Server API
8
8
  * The Informatics Matters Account Server API.
9
9
 
10
10
  A service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.
11
11
 
12
- * OpenAPI spec version: 4.2
12
+ * OpenAPI spec version: 4.4
13
13
  */
14
- type AttachAssetParams = {
15
- /**
16
- * A Merchant Identity
17
- */
18
- m_id?: QMIdParameter;
19
- };
20
- type GetUnitsParams = {
21
- /**
22
- * An object name
14
+ interface AsError {
15
+ /** Brief error text that can be presented to the user */
16
+ error: string;
17
+ }
18
+ interface ActionGetResponse {
19
+ /** A list of Actions
23
20
  */
24
- name?: QNameParameter;
25
- };
26
- type GetOrganisationsParams = {
27
- /**
28
- * An object name
21
+ actions: ActionDetail[];
22
+ /** The number of Actions returned
29
23
  */
30
- name?: QNameParameter;
31
- };
32
- /**
33
- * 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
34
- */
35
- type QUntilParameter = string;
36
- /**
37
- * 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
38
- */
39
- type QFromParameter = string;
40
- type GetUnitChargesParams = {
41
- /**
42
- * 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
24
+ count: number;
25
+ }
26
+ interface ActionDetail {
27
+ id: number;
28
+ action: string;
29
+ content: string;
30
+ timestamp: string;
31
+ merchant?: MerchantSummary;
32
+ product_id?: string;
33
+ unit_id?: string;
34
+ org_id?: string;
35
+ }
36
+ type AssetGetByIdResponse = AssetDetail;
37
+ interface AssetGetResponse {
38
+ /** A list of Assets
43
39
  */
44
- from?: QFromParameter;
45
- /**
46
- * 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
40
+ assets: AssetDetail[];
41
+ /** The number of Assets returned
47
42
  */
48
- until?: QUntilParameter;
49
- /**
50
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
43
+ count: number;
44
+ }
45
+ interface AssetPostResponse {
46
+ /** The Asset ID
51
47
  */
52
- pbp?: QPbpParameter;
48
+ id: string;
49
+ }
50
+ interface ChargesGetResponse {
51
+ coins: string;
52
+ count: number;
53
+ summary: ChargeSummary[];
54
+ organisation_charges: OrganisationChargeSummary[];
55
+ }
56
+ interface EventStreamGetPostResponse {
57
+ /** The EventStream ID */
58
+ id: number;
59
+ /** A symbolic name, used internally to identify the stream */
60
+ name: string;
61
+ /** 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. */
62
+ location: string;
63
+ /** The Event Stream format. */
64
+ format: string;
65
+ }
66
+ /**
67
+ * 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.
68
+ */
69
+ type EventStreamVersionGetResponseProtocol = (typeof EventStreamVersionGetResponseProtocol)[keyof typeof EventStreamVersionGetResponseProtocol];
70
+ declare const EventStreamVersionGetResponseProtocol: {
71
+ readonly ERROR_INTERNAL: "ERROR_INTERNAL";
72
+ readonly SERVICE_NOT_PRESENT: "SERVICE_NOT_PRESENT";
73
+ readonly WEBSOCKET: "WEBSOCKET";
53
74
  };
54
- type GetProductChargesParams = {
55
- /**
56
- * 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
57
- */
58
- from?: QFromParameter;
59
- /**
60
- * 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
75
+ interface EventStreamVersionGetResponse {
76
+ /** The EventStream implementation version */
77
+ version: string;
78
+ /** 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. */
79
+ protocol: EventStreamVersionGetResponseProtocol;
80
+ /** The name of the Event Stream implementation, often used to identify the service origin and implementation. */
81
+ name: string;
82
+ }
83
+ interface StateGetVersionResponse {
84
+ /** 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
61
85
  */
62
- until?: QUntilParameter;
63
- /**
64
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
86
+ version: string;
87
+ }
88
+ interface OrganisationPostResponse {
89
+ /** The Organisation's unique ID */
90
+ id: string;
91
+ }
92
+ interface UsersGetResponse {
93
+ count: number;
94
+ organisation?: OrganisationDetail;
95
+ unit?: UnitDetail;
96
+ /** The list of Organisation Users
65
97
  */
66
- pbp?: QPbpParameter;
98
+ users: UserDetail[];
99
+ }
100
+ /**
101
+ * The Organisation's default product privacy setting
102
+ */
103
+ type OrganisationGetDefaultResponseDefaultProductPrivacy = (typeof OrganisationGetDefaultResponseDefaultProductPrivacy)[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];
104
+ declare const OrganisationGetDefaultResponseDefaultProductPrivacy: {
105
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
106
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
107
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
108
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
67
109
  };
68
- type GetOrganisationChargesParams = {
69
- /**
70
- * 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
110
+ interface OrganisationGetDefaultResponse {
111
+ /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */
112
+ caller_is_member?: boolean;
113
+ /** The Default Organisation ID
71
114
  */
72
- from?: QFromParameter;
73
- /**
74
- * 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
115
+ id?: string;
116
+ /** The Default Organisation Name
75
117
  */
76
- until?: QUntilParameter;
77
- /**
78
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
118
+ name?: string;
119
+ /** 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
79
120
  */
80
- pbp?: QPbpParameter;
81
- };
82
- type GetChargesParams = {
83
- /**
84
- * 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
121
+ private?: boolean;
122
+ created?: string;
123
+ /** The Organisation's default product privacy setting */
124
+ default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;
125
+ }
126
+ interface OrganisationUnitPostResponse {
127
+ /** The unit's unique ID */
128
+ id: string;
129
+ }
130
+ interface PersonalUnitPutResponse {
131
+ /** The unit's Organisation. Used to identify the Default organisation */
132
+ organisation_id: string;
133
+ /** The unit's unique ID */
134
+ id: string;
135
+ }
136
+ interface OrganisationChargeSummary {
137
+ organisation_id: string;
138
+ name: string;
139
+ summary: ChargeSummary[];
140
+ }
141
+ interface OrganisationUnitsGetResponse {
142
+ count?: number;
143
+ organisation: OrganisationAllDetail;
144
+ /** A list of Units
85
145
  */
86
- from?: QFromParameter;
146
+ units: UnitAllDetail[];
147
+ }
148
+ interface OrganisationChargesGetResponse {
149
+ organisation_id: string;
150
+ name: string;
151
+ coins: string;
152
+ summary: ChargeSummary[];
153
+ unit_charges: OrganisationUnitChargeSummary[];
154
+ }
155
+ interface OrganisationUnitChargeSummary {
156
+ unit_id: string;
157
+ name: string;
87
158
  /**
88
- * 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
159
+ * @minimum 1
160
+ * @maximum 28
89
161
  */
90
- until?: QUntilParameter;
162
+ billing_day: number;
163
+ /** The start of the charge period */
164
+ from: string;
165
+ /** The date where of first day after the charge period */
166
+ until: string;
167
+ summary: ChargeSummary[];
168
+ }
169
+ interface OrganisationsGetResponse {
170
+ count: number;
171
+ /** A list of Organisations */
172
+ organisations: OrganisationAllDetail[];
173
+ }
174
+ type OrganisationGetResponse = OrganisationAllDetail;
175
+ type ProductChargesGetResponseProductType = (typeof ProductChargesGetResponseProductType)[keyof typeof ProductChargesGetResponseProductType];
176
+ declare const ProductChargesGetResponseProductType: {
177
+ readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
178
+ readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
179
+ };
180
+ interface ProductChargesGetResponse {
181
+ product_id: string;
182
+ product_type: ProductChargesGetResponseProductType;
91
183
  /**
92
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
184
+ * @minimum 1
185
+ * @maximum 28
93
186
  */
94
- pbp?: QPbpParameter;
187
+ billing_day: number;
188
+ /** True if the product can be (needs to be) claimed. */
189
+ claimable: boolean;
190
+ claim?: ProductClaimDetail;
191
+ count: number;
192
+ /** The start of the charge period */
193
+ from: string;
194
+ /** The date where of first day after the charge period */
195
+ until: string;
196
+ /** The total number of coins consumed by this product for the invoice period */
197
+ coins: string;
198
+ processing_charges: ProcessingCharges[];
199
+ storage_charges: StorageCharges;
200
+ }
201
+ type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;
202
+ interface ProductsGetResponse {
203
+ count: number;
204
+ /** All the Products you have access to */
205
+ products: ProductsGetResponseProductsItem[];
206
+ }
207
+ type ProductsGetDefaultStorageCostDefaultStorageCost = {
208
+ cost: string;
209
+ units: string;
210
+ description: string;
95
211
  };
212
+ interface ProductsGetDefaultStorageCost {
213
+ default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;
214
+ }
215
+ interface ProductsGetTypesResponse {
216
+ /** The number of Product Types */
217
+ count: number;
218
+ /** All the Product Types you have access to */
219
+ product_types: ProductType[];
220
+ }
96
221
  /**
97
- * A User Identity
98
- */
99
- type QUserIdParameter = string;
100
- /**
101
- * A Product Identity
102
- */
103
- type QProductIdParameter = string;
104
- /**
105
- * A Unit Identity
106
- */
107
- type QUnitIdParameter = string;
108
- /**
109
- * An object name
222
+ * The Unit's Product
110
223
  */
111
- type QNameParameter = string;
112
- /**
113
- * A Merchant Identity
114
- */
115
- type QMIdParameter = number;
116
- type DetachAssetParams = {
117
- /**
118
- * A Merchant Identity
119
- */
120
- m_id?: QMIdParameter;
121
- };
122
- /**
123
- * An Organisation Identity
124
- */
125
- type QOrgIdParameter = string;
126
- type GetAssetParams = {
127
- /**
128
- * A User Identity
129
- */
130
- user_id?: QUserIdParameter;
131
- /**
132
- * A Product Identity
133
- */
134
- product_id?: QProductIdParameter;
135
- /**
136
- * A Unit Identity
137
- */
138
- unit_id?: QUnitIdParameter;
139
- /**
140
- * An Organisation Identity
141
- */
142
- org_id?: QOrgIdParameter;
143
- };
144
- /**
145
- * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
146
- */
147
- type QPbpParameter = number;
148
- type ProductPatchBodyBody = {
149
- /**
150
- * The name you want to give the Product
151
- * @maxLength 80
152
- */
153
- name?: string;
154
- /**
155
- * The Product's built-in coin allowance. Product allowances cannot be reduced
156
- * @minimum 1
157
- */
158
- allowance?: number;
159
- /**
160
- * 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
161
- * @minimum 1
162
- */
163
- limit?: number;
164
- };
165
- /**
166
- * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products
167
- */
168
- type UnitProductPostBodyBodyFlavour = typeof UnitProductPostBodyBodyFlavour[keyof typeof UnitProductPostBodyBodyFlavour];
169
- declare const UnitProductPostBodyBodyFlavour: {
170
- readonly EVALUATION: "EVALUATION";
171
- readonly BRONZE: "BRONZE";
172
- readonly SILVER: "SILVER";
173
- readonly GOLD: "GOLD";
174
- };
175
- /**
176
- * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
177
-
178
- Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
179
- */
180
- type UnitProductPostBodyBodyType = typeof UnitProductPostBodyBodyType[keyof typeof UnitProductPostBodyBodyType];
181
- declare const UnitProductPostBodyBodyType: {
182
- readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
183
- readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
184
- };
185
- type UnitProductPostBodyBody = {
186
- /**
187
- * The name you want to give the Product
188
- * @maxLength 80
189
- */
190
- name: string;
191
- /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
192
-
193
- Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
194
- type: UnitProductPostBodyBodyType;
195
- /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */
196
- flavour?: UnitProductPostBodyBodyFlavour;
197
- /**
198
- * The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products
199
- * @minimum 1
200
- */
201
- allowance?: number;
202
- /**
203
- * 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
204
- * @minimum 1
205
- */
206
- limit?: number;
207
- };
208
- /**
209
- * 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`.
210
-
211
- Whether the privacy can be honoured will depend on the organisation's value
212
- */
213
- type UnitPatchBodyBodyDefaultProductPrivacy = typeof UnitPatchBodyBodyDefaultProductPrivacy[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];
214
- declare const UnitPatchBodyBodyDefaultProductPrivacy: {
215
- readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
216
- readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
217
- readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
218
- readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
219
- };
220
- type UnitPatchBodyBody = {
221
- /** The new name for the Unit */
222
- name?: string;
223
- /** 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`.
224
-
225
- Whether the privacy can be honoured will depend on the organisation's value */
226
- default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;
227
- };
228
- /**
229
- * 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`.
230
-
231
- Whether the privacy can be honoured will depend on the value in any of the organisation's existing units
232
- */
233
- type OrganisationPatchBodyBodyDefaultProductPrivacy = typeof OrganisationPatchBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];
234
- declare const OrganisationPatchBodyBodyDefaultProductPrivacy: {
235
- readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
236
- readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
237
- readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
238
- readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
239
- };
240
- type OrganisationPatchBodyBody = {
241
- /** The new name for the Organisational */
224
+ type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;
225
+ interface ProductUnitGetResponse {
226
+ /** The Unit's Product */
227
+ product: ProductUnitGetResponseProduct;
228
+ }
229
+ interface UnitChargesGetResponse {
230
+ /** Whether the user making the API call is a member of the Unit */
231
+ caller_is_member: boolean;
232
+ unit_id: string;
242
233
  name?: string;
243
- /** 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`.
244
-
245
- Whether the privacy can be honoured will depend on the value in any of the organisation's existing units */
246
- default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;
247
- };
248
- /**
249
- * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value
250
- */
251
- type OrganisationUnitPostBodyBodyDefaultProductPrivacy = typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];
252
- declare const OrganisationUnitPostBodyBodyDefaultProductPrivacy: {
253
- readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
254
- readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
255
- readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
256
- readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
257
- };
258
- type OrganisationUnitPostBodyBody = {
259
- /**
260
- * The name of the unit
261
- * @maxLength 80
262
- */
263
- name: string;
264
- /**
265
- * The day you would like to be billed for the Unit's Products (a value from 1 and 28)
266
- * @minimum 1
267
- * @maximum 28
268
- */
269
- billing_day: number;
270
- /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */
271
- default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;
272
- };
273
- type PersonalUnitPutBodyBody = {
234
+ /** The Unit's owner (a username) */
235
+ owner_id: string;
236
+ /** True if the Unit is private */
237
+ private: boolean;
238
+ created: string;
239
+ coins: string;
240
+ count: number;
274
241
  /**
275
- * The day you would like to be billed for the Unit's Products (a value from 1 and 28)
276
242
  * @minimum 1
277
243
  * @maximum 28
278
244
  */
279
245
  billing_day: number;
280
- };
246
+ /** The start of the charge period */
247
+ from: string;
248
+ /** The date where of first day after the charge period */
249
+ until: string;
250
+ summary: UnitChargeSummary;
251
+ products: UnitProductChargeSummary[];
252
+ }
253
+ interface UnitChargeSummary {
254
+ charges: ChargeSummary[];
255
+ }
256
+ interface UnitProductChargeSummary {
257
+ product_id: string;
258
+ product_type: string;
259
+ charges: ChargeSummary[];
260
+ }
281
261
  /**
282
- * The default product privacy setting for the Organisation
262
+ * The type of charge
283
263
  */
284
- type OrganisationPostBodyBodyDefaultProductPrivacy = typeof OrganisationPostBodyBodyDefaultProductPrivacy[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];
285
- declare const OrganisationPostBodyBodyDefaultProductPrivacy: {
286
- readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
287
- readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
288
- readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
289
- readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
264
+ type ChargeSummaryType = (typeof ChargeSummaryType)[keyof typeof ChargeSummaryType];
265
+ declare const ChargeSummaryType: {
266
+ readonly PROCESSING: "PROCESSING";
267
+ readonly STORAGE: "STORAGE";
290
268
  };
291
- type OrganisationPostBodyBody = {
292
- /**
293
- * The name of the organisation
294
- * @maxLength 80
269
+ interface ChargeSummary {
270
+ /** The type of charge */
271
+ type: ChargeSummaryType;
272
+ /** The cost, in coins of the charge */
273
+ coins: string;
274
+ }
275
+ interface UnitProductPostResponse {
276
+ /** The Product's unique ID */
277
+ id: string;
278
+ }
279
+ type UnitGetResponse = UnitAllDetail;
280
+ interface UnitsGetResponse {
281
+ /** A list of Units
295
282
  */
296
- name: string;
297
- /** The name of the organisation owner. A user ID */
298
- owner: string;
299
- /** The default product privacy setting for the Organisation */
300
- default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
301
- };
302
- type EventStreamPostBodyBodyFormat = typeof EventStreamPostBodyBodyFormat[keyof typeof EventStreamPostBodyBodyFormat];
303
- declare const EventStreamPostBodyBodyFormat: {
304
- readonly PROTOCOL_STRING: "PROTOCOL_STRING";
305
- readonly JSON_STRING: "JSON_STRING";
306
- };
307
- type EventStreamPostBodyBody = {
308
- format?: EventStreamPostBodyBodyFormat;
309
- };
310
- /**
311
- * 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.
312
- */
313
- type AssetPostBodyBodyScope = typeof AssetPostBodyBodyScope[keyof typeof AssetPostBodyBodyScope];
314
- declare const AssetPostBodyBodyScope: {
283
+ units: OrganisationUnitsGetResponse[];
284
+ }
285
+ type UserAccountGetResponse = UserAccountDetail;
286
+ type AssetDetailScope = (typeof AssetDetailScope)[keyof typeof AssetDetailScope];
287
+ declare const AssetDetailScope: {
315
288
  readonly USER: "USER";
316
289
  readonly PRODUCT: "PRODUCT";
317
290
  readonly UNIT: "UNIT";
318
291
  readonly ORGANISATION: "ORGANISATION";
319
292
  readonly GLOBAL: "GLOBAL";
320
293
  };
321
- type AssetPostBodyBody = {
322
- /**
323
- * 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
324
- * @maxLength 80
325
- * @pattern ^[a-z0-9-]{1,63}$
326
- */
294
+ interface AssetDetail {
295
+ creator: string;
296
+ id: string;
327
297
  name: string;
328
- /** A file containing the content for the asset. You must provide a value here or in **content_string** but not both */
329
- content_file?: Blob;
330
- /** The textual content of the asset. You must provide a value here or in **content_file** but not both */
331
- content_string?: string;
332
- /** 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. */
333
- scope: AssetPostBodyBodyScope;
334
- /** 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. */
335
- scope_id?: string;
336
- /** Is this a secret asset? Secret assets are not revealed in a subsequent **GET** but are revealed to merchants they are connected to. */
298
+ scope: AssetDetailScope;
299
+ scope_id: string;
337
300
  secret: boolean;
338
- /** An optional description for the Asset */
301
+ disabled: boolean;
302
+ content: string;
303
+ created: string;
304
+ content_modified?: string;
339
305
  description?: string;
306
+ merchants: MerchantDetail[];
307
+ }
308
+ type ProcessingChargesMerchantKind = (typeof ProcessingChargesMerchantKind)[keyof typeof ProcessingChargesMerchantKind];
309
+ declare const ProcessingChargesMerchantKind: {
310
+ readonly DATA_MANAGER: "DATA_MANAGER";
340
311
  };
341
- type AssetPatchBodyBody = {
342
- /** A file containing the content for the asset. You must provide a value here or in content_string */
343
- content_file?: Blob;
344
- /** The textual content of the asset. You must provide a value here or in content_file */
345
- content_string?: string;
346
- /** An optional description for the Asset */
347
- description?: string;
312
+ interface ProcessingCharges {
313
+ merchant_name: string;
314
+ merchant_kind: ProcessingChargesMerchantKind;
315
+ merchant_api_hostname: string;
316
+ /** The date when the process stopped */
317
+ closed?: string;
318
+ /** 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. */
319
+ final: boolean;
320
+ /** True if charges were received after the charge record was finalised */
321
+ post_final_charges?: boolean;
322
+ charge: ProcessingChargeItem;
323
+ }
324
+ interface ProcessingChargeItem {
325
+ /** The charge record number */
326
+ id: number;
327
+ /** The most recent sequence number for this charge */
328
+ sqn: number;
329
+ name?: string;
330
+ username: string;
331
+ /** The date and time of the processing charge */
332
+ timestamp: string;
333
+ /** The coin-cost of the storage */
334
+ coins: string;
335
+ additional_data?: ChargeAdditionalData;
336
+ }
337
+ interface StorageCharges {
338
+ num_items: number;
339
+ items: StorageChargeItem[];
340
+ }
341
+ interface StorageChargeItem {
342
+ item_number: number;
343
+ /** The date and time of the processing charge */
344
+ date: string;
345
+ /** The coin-cost of the storage */
346
+ coins: string;
347
+ /** The current burn rate, the approximate amount of coins you are currently consuming each day */
348
+ current_burn_rate?: string;
349
+ /** The date when the charges concluded */
350
+ closed?: string;
351
+ additional_data?: ChargeAdditionalData;
352
+ }
353
+ interface ChargeAdditionalData {
354
+ [key: string]: unknown;
355
+ }
356
+ interface ProductDmStorage {
357
+ product: ProductDetail;
358
+ organisation: OrganisationAllDetail;
359
+ unit: UnitAllDetail;
360
+ storage: ProductDmStorageDetail;
361
+ coins: ProductCoinsDetail;
362
+ /** True if the product can be (needs to be) claimed. */
363
+ claimable: boolean;
364
+ }
365
+ interface ProductDmProjectTier {
366
+ product: ProductDetail;
367
+ organisation: OrganisationAllDetail;
368
+ unit: UnitAllDetail;
369
+ storage: ProductDmStorageDetail;
370
+ coins: ProductCoinsDetail;
371
+ instance: ProductInstanceDetail;
372
+ /** True if the product can be (needs to be) claimed. */
373
+ claimable: boolean;
374
+ claim?: ProductClaimDetail;
375
+ }
376
+ type ProductDmStorageDetailSize = {
377
+ /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */
378
+ peak: string;
379
+ /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */
380
+ current: string;
381
+ /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */
382
+ unit_size: string;
383
+ /** The peak number of storage units used today */
384
+ units_used: number;
348
385
  };
349
- interface UserDetail {
350
- /** The user identity (username) */
386
+ type ProductDmStorageDetailCoins = {
387
+ /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */
388
+ used: number;
389
+ /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */
390
+ unit_cost: number;
391
+ };
392
+ interface ProductDmStorageDetail {
393
+ size: ProductDmStorageDetailSize;
394
+ coins: ProductDmStorageDetailCoins;
395
+ }
396
+ interface ProductClaimDetail {
397
+ /** The service-specific ID that is using this Subscription
398
+ */
351
399
  id: string;
400
+ /** A name for the service-specific ID
401
+ */
402
+ name?: string;
352
403
  }
353
- interface UserAccountDetail {
354
- user: UserDetail;
355
- /** Whether the caller has admin privilege */
356
- caller_has_admin_privilege: boolean;
357
- /** The roles assigned to the user recognised by the Account Server */
358
- account_server_roles: string[];
404
+ interface ProductCoinsDetail {
405
+ /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */
406
+ allowance: number;
407
+ /** 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 */
408
+ limit: number;
409
+ /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */
410
+ used: number;
411
+ /** 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. */
412
+ at_limit: boolean;
413
+ /** The current burn rate, the approximate amount of coins you are currently consuming each day */
414
+ current_burn_rate: number;
415
+ /** 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 */
416
+ billing_prediction: number;
417
+ /** 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 */
418
+ billing_prediction_storage_contribution: number;
419
+ /** The day of the month when the bill is due, and the end of the current billing period */
420
+ billing_day: number;
421
+ /** A multiplier applied to your coin usage within your allowance */
422
+ allowance_multiplier: number;
423
+ /** A multiplier that will be applied to coin used beyond your allowance */
424
+ overspend_multiplier: number;
425
+ /** The number of days remaining, in the current billing period */
426
+ remaining_days: number;
359
427
  }
360
428
  /**
361
- * The Unit's default product privacy setting
429
+ * The Product Type
430
+
362
431
  */
363
- type UnitDetailDefaultProductPrivacy = typeof UnitDetailDefaultProductPrivacy[keyof typeof UnitDetailDefaultProductPrivacy];
364
- declare const UnitDetailDefaultProductPrivacy: {
365
- readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
366
- readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
367
- readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
368
- readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
432
+ type ProductDetailType = (typeof ProductDetailType)[keyof typeof ProductDetailType];
433
+ declare const ProductDetailType: {
434
+ readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
435
+ readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
369
436
  };
370
- interface UnitDetail {
371
- /** Whether the user making the API call is a member of the Unit */
372
- caller_is_member: boolean;
373
- /** The Unit's unique identity */
374
- id: string;
375
- /** The Unit's name */
376
- name: string;
377
- /** The Unit's owner (a username) */
378
- owner_id: string;
379
- /** True if the Unit is private */
380
- private: boolean;
381
- created: string;
382
- /** The Unit's billing day */
383
- billing_day: number;
384
- /** The Unit's default product privacy setting */
385
- default_product_privacy: UnitDetailDefaultProductPrivacy;
386
- }
387
437
  /**
388
- * The Unit's default product privacy setting
438
+ * The Product Type flavour. Not all products have flavours
439
+
389
440
  */
390
- type UnitAllDetailDefaultProductPrivacy = typeof UnitAllDetailDefaultProductPrivacy[keyof typeof UnitAllDetailDefaultProductPrivacy];
391
- declare const UnitAllDetailDefaultProductPrivacy: {
392
- readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
393
- readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
394
- readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
395
- readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
441
+ type ProductDetailFlavour = (typeof ProductDetailFlavour)[keyof typeof ProductDetailFlavour];
442
+ declare const ProductDetailFlavour: {
443
+ readonly EVALUATION: "EVALUATION";
444
+ readonly BRONZE: "BRONZE";
445
+ readonly SILVER: "SILVER";
446
+ readonly GOLD: "GOLD";
396
447
  };
397
- interface UnitAllDetail {
398
- /** Whether the user making the API call is a member of the Unit */
399
- caller_is_member: boolean;
400
- /** The Unit's unique identity */
448
+ interface ProductDetail {
449
+ /** The Product ID
450
+ */
401
451
  id: string;
402
- /** The Unit's name */
403
- name: string;
404
- /** The Unit's owner (a username) */
405
- owner_id: string;
406
- /** True if the Unit is private */
407
- private: boolean;
408
452
  created: string;
409
- /** The Unit's billing day */
410
- billing_day: number;
411
- /** The Unit's default product privacy setting */
412
- default_product_privacy: UnitAllDetailDefaultProductPrivacy;
413
- /** A list of users that are members of the Unit */
414
- users: UserDetail[];
453
+ /** The Product Type
454
+ */
455
+ type: ProductDetailType;
456
+ /** The Product Type flavour. Not all products have flavours
457
+ */
458
+ flavour?: ProductDetailFlavour;
459
+ /** The name of the Product
460
+ */
461
+ name?: string;
462
+ }
463
+ type ProductInstanceDetailCoins = {
464
+ /** The number of coins used
465
+ */
466
+ used: number;
467
+ };
468
+ interface ProductInstanceDetail {
469
+ coins: ProductInstanceDetailCoins;
415
470
  }
416
471
  /**
417
- * The kind of Service
472
+ * The kind of service that can use the Product
418
473
  */
419
- type MerchantDetailKind = typeof MerchantDetailKind[keyof typeof MerchantDetailKind];
420
- declare const MerchantDetailKind: {
474
+ type ProductTypeServiceKind = (typeof ProductTypeServiceKind)[keyof typeof ProductTypeServiceKind];
475
+ declare const ProductTypeServiceKind: {
421
476
  readonly DATA_MANAGER: "DATA_MANAGER";
422
477
  };
423
- interface MerchantDetail {
424
- /** The unique ID of the Service */
425
- id: number;
426
- created: string;
427
- /** The kind of Service */
428
- kind: MerchantDetailKind;
429
- /** The name assigned to the Service */
430
- name: string;
431
- /** The hostname used by the Service */
432
- api_hostname: string;
433
- }
434
- type MerchantGetResponse = MerchantDetail;
435
- interface MerchantsGetResponse {
436
- count?: number;
437
- /** The list of known Merchants
438
- */
439
- merchants: MerchantDetail[];
478
+ interface ProductType {
479
+ /** A product type, this is a unique string amongst all types known to the Account Server */
480
+ type: string;
481
+ /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */
482
+ flavour?: string;
483
+ /** The kind of service that can use the Product */
484
+ service_kind?: ProductTypeServiceKind;
440
485
  }
441
486
  /**
442
487
  * The Organisation's default product privacy setting
443
488
  */
444
- type OrganisationDetailDefaultProductPrivacy = typeof OrganisationDetailDefaultProductPrivacy[keyof typeof OrganisationDetailDefaultProductPrivacy];
445
- declare const OrganisationDetailDefaultProductPrivacy: {
489
+ type OrganisationAllDetailDefaultProductPrivacy = (typeof OrganisationAllDetailDefaultProductPrivacy)[keyof typeof OrganisationAllDetailDefaultProductPrivacy];
490
+ declare const OrganisationAllDetailDefaultProductPrivacy: {
446
491
  readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
447
492
  readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
448
493
  readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
449
494
  readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
450
495
  };
451
- interface OrganisationDetail {
496
+ interface OrganisationAllDetail {
452
497
  /** Whether the user making the API call is a member of the Unit */
453
498
  caller_is_member: boolean;
454
499
  /** The Organisation's unique ID */
@@ -461,19 +506,21 @@ interface OrganisationDetail {
461
506
  private: boolean;
462
507
  created: string;
463
508
  /** The Organisation's default product privacy setting */
464
- default_product_privacy: OrganisationDetailDefaultProductPrivacy;
509
+ default_product_privacy: OrganisationAllDetailDefaultProductPrivacy;
510
+ /** A list of users that are members of the Organisation */
511
+ users: UserDetail[];
465
512
  }
466
513
  /**
467
514
  * The Organisation's default product privacy setting
468
515
  */
469
- type OrganisationAllDetailDefaultProductPrivacy = typeof OrganisationAllDetailDefaultProductPrivacy[keyof typeof OrganisationAllDetailDefaultProductPrivacy];
470
- declare const OrganisationAllDetailDefaultProductPrivacy: {
516
+ type OrganisationDetailDefaultProductPrivacy = (typeof OrganisationDetailDefaultProductPrivacy)[keyof typeof OrganisationDetailDefaultProductPrivacy];
517
+ declare const OrganisationDetailDefaultProductPrivacy: {
471
518
  readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
472
519
  readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
473
520
  readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
474
521
  readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
475
522
  };
476
- interface OrganisationAllDetail {
523
+ interface OrganisationDetail {
477
524
  /** Whether the user making the API call is a member of the Unit */
478
525
  caller_is_member: boolean;
479
526
  /** The Organisation's unique ID */
@@ -486,462 +533,505 @@ interface OrganisationAllDetail {
486
533
  private: boolean;
487
534
  created: string;
488
535
  /** The Organisation's default product privacy setting */
489
- default_product_privacy: OrganisationAllDetailDefaultProductPrivacy;
490
- /** A list of users that are members of the Organisation */
491
- users: UserDetail[];
536
+ default_product_privacy: OrganisationDetailDefaultProductPrivacy;
492
537
  }
493
- /**
494
- * The kind of service that can use the Product
538
+ interface MerchantsGetResponse {
539
+ count?: number;
540
+ /** The list of known Merchants
541
+ */
542
+ merchants: MerchantDetail[];
543
+ }
544
+ type MerchantGetResponse = MerchantDetail;
545
+ /**
546
+ * The kind of Service
495
547
  */
496
- type ProductTypeServiceKind = typeof ProductTypeServiceKind[keyof typeof ProductTypeServiceKind];
497
- declare const ProductTypeServiceKind: {
548
+ type MerchantDetailKind = (typeof MerchantDetailKind)[keyof typeof MerchantDetailKind];
549
+ declare const MerchantDetailKind: {
498
550
  readonly DATA_MANAGER: "DATA_MANAGER";
499
551
  };
500
- interface ProductType {
501
- /** A product type, this is a unique string amongst all types known to the Account Server */
502
- type: string;
503
- /** A product flavour. Not all types have a flavour, those that do have a type-specific flavour string */
504
- flavour?: string;
505
- /** The kind of service that can use the Product */
506
- service_kind?: ProductTypeServiceKind;
507
- }
508
- type ProductInstanceDetailCoins = {
509
- /** The number of coins used
510
- */
511
- used: number;
512
- };
513
- interface ProductInstanceDetail {
514
- coins: ProductInstanceDetailCoins;
552
+ interface MerchantDetail {
553
+ /** The unique ID of the Service */
554
+ id: number;
555
+ created: string;
556
+ /** The kind of Service */
557
+ kind: MerchantDetailKind;
558
+ /** The name assigned to the Service */
559
+ name: string;
560
+ /** The hostname used by the Service */
561
+ api_hostname: string;
515
562
  }
516
563
  /**
517
- * The Product Type flavour. Not all products have flavours
518
-
564
+ * The kind of Service
519
565
  */
520
- type ProductDetailFlavour = typeof ProductDetailFlavour[keyof typeof ProductDetailFlavour];
521
- declare const ProductDetailFlavour: {
522
- readonly EVALUATION: "EVALUATION";
523
- readonly BRONZE: "BRONZE";
524
- readonly SILVER: "SILVER";
525
- readonly GOLD: "GOLD";
566
+ type MerchantSummaryKind = (typeof MerchantSummaryKind)[keyof typeof MerchantSummaryKind];
567
+ declare const MerchantSummaryKind: {
568
+ readonly DATA_MANAGER: "DATA_MANAGER";
526
569
  };
570
+ interface MerchantSummary {
571
+ /** The unique ID of the Merchant */
572
+ id: number;
573
+ /** The kind of Service */
574
+ kind: MerchantSummaryKind;
575
+ /** The name assigned to the Service */
576
+ name: string;
577
+ }
527
578
  /**
528
- * The Product Type
529
-
579
+ * The Unit's default product privacy setting
530
580
  */
531
- type ProductDetailType = typeof ProductDetailType[keyof typeof ProductDetailType];
532
- declare const ProductDetailType: {
533
- readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
534
- readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
581
+ type UnitAllDetailDefaultProductPrivacy = (typeof UnitAllDetailDefaultProductPrivacy)[keyof typeof UnitAllDetailDefaultProductPrivacy];
582
+ declare const UnitAllDetailDefaultProductPrivacy: {
583
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
584
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
585
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
586
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
535
587
  };
536
- interface ProductDetail {
537
- /** The Product ID
538
- */
588
+ interface UnitAllDetail {
589
+ /** Whether the user making the API call is a member of the Unit */
590
+ caller_is_member: boolean;
591
+ /** The Unit's unique identity */
539
592
  id: string;
593
+ /** The Unit's name */
594
+ name: string;
595
+ /** The Unit's owner (a username) */
596
+ owner_id: string;
597
+ /** True if the Unit is private */
598
+ private: boolean;
540
599
  created: string;
541
- /** The Product Type
542
- */
543
- type: ProductDetailType;
544
- /** The Product Type flavour. Not all products have flavours
545
- */
546
- flavour?: ProductDetailFlavour;
547
- /** The name of the Product
548
- */
549
- name?: string;
550
- }
551
- interface ProductCoinsDetail {
552
- /** The billing allowance. When you exceed this during the current billing period the *cost multiplier* will increase */
553
- allowance: number;
554
- /** 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 */
555
- limit: number;
556
- /** The total number of coins consumed (in this billing period), excluding the coins that have been consumed for the current day */
557
- used: number;
558
- /** 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. */
559
- at_limit: boolean;
560
- /** The current burn rate, the approximate amount of coins you are currently consuming each day */
561
- current_burn_rate: number;
562
- /** 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 */
563
- billing_prediction: number;
564
- /** 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 */
565
- billing_prediction_storage_contribution: number;
566
- /** The day of the month when the bill is due, and the end of the current billing period */
600
+ /** The Unit's billing day */
567
601
  billing_day: number;
568
- /** A multiplier applied to your coin usage within your allowance */
569
- allowance_multiplier: number;
570
- /** A multiplier that will be applied to coin used beyond your allowance */
571
- overspend_multiplier: number;
572
- /** The number of days remaining, in the current billing period */
573
- remaining_days: number;
574
- }
575
- interface ProductClaimDetail {
576
- /** The service-specific ID that is using this Subscription
577
- */
578
- id: string;
579
- /** A name for the service-specific ID
580
- */
581
- name?: string;
602
+ /** The Unit's default product privacy setting */
603
+ default_product_privacy: UnitAllDetailDefaultProductPrivacy;
604
+ /** A list of users that are members of the Unit */
605
+ users: UserDetail[];
582
606
  }
583
- type ProductDmStorageDetailCoins = {
584
- /** The number of coins currently committed for the current day. This is added to the accumulated coins at the start of each day */
585
- used: number;
586
- /** The coin cost of a 'unit' of storage or part thereof. The unit size is defined in the storage section of the response */
587
- unit_cost: number;
588
- };
589
- type ProductDmStorageDetailSize = {
590
- /** The humanised size of the peak storage used for the current day. The value is reset at the start of each day */
591
- peak: string;
592
- /** The humanised size of the current storage used for the current day and used to calculate the 'burn rate' */
593
- current: string;
594
- /** The humanised storage unit. The cost of storage is based on the daily peak of the number of units (or part thereof) used */
595
- unit_size: string;
596
- /** The peak number of storage units used today */
597
- units_used: number;
607
+ /**
608
+ * The Unit's default product privacy setting
609
+ */
610
+ type UnitDetailDefaultProductPrivacy = (typeof UnitDetailDefaultProductPrivacy)[keyof typeof UnitDetailDefaultProductPrivacy];
611
+ declare const UnitDetailDefaultProductPrivacy: {
612
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
613
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
614
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
615
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
598
616
  };
599
- interface ProductDmStorageDetail {
600
- size: ProductDmStorageDetailSize;
601
- coins: ProductDmStorageDetailCoins;
602
- }
603
- interface ProductDmProjectTier {
604
- product: ProductDetail;
605
- organisation: OrganisationAllDetail;
606
- unit: UnitAllDetail;
607
- storage: ProductDmStorageDetail;
608
- coins: ProductCoinsDetail;
609
- instance: ProductInstanceDetail;
610
- /** True if the product can be (needs to be) claimed. */
611
- claimable: boolean;
612
- claim?: ProductClaimDetail;
613
- }
614
- interface ProductDmStorage {
615
- product: ProductDetail;
616
- organisation: OrganisationAllDetail;
617
- unit: UnitAllDetail;
618
- storage: ProductDmStorageDetail;
619
- coins: ProductCoinsDetail;
620
- /** True if the product can be (needs to be) claimed. */
621
- claimable: boolean;
622
- }
623
- interface ChargeAdditionalData {
624
- [key: string]: unknown;
625
- }
626
- interface StorageChargeItem {
627
- item_number: number;
628
- /** The date and time of the processing charge */
629
- date: string;
630
- /** The coin-cost of the storage */
631
- coins: string;
632
- /** The current burn rate, the approximate amount of coins you are currently consuming each day */
633
- current_burn_rate?: string;
634
- /** The date when the charges concluded */
635
- closed?: string;
636
- additional_data?: ChargeAdditionalData;
617
+ interface UnitDetail {
618
+ /** Whether the user making the API call is a member of the Unit */
619
+ caller_is_member: boolean;
620
+ /** The Unit's unique identity */
621
+ id: string;
622
+ /** The Unit's name */
623
+ name: string;
624
+ /** The Unit's owner (a username) */
625
+ owner_id: string;
626
+ /** True if the Unit is private */
627
+ private: boolean;
628
+ created: string;
629
+ /** The Unit's billing day */
630
+ billing_day: number;
631
+ /** The Unit's default product privacy setting */
632
+ default_product_privacy: UnitDetailDefaultProductPrivacy;
637
633
  }
638
- interface StorageCharges {
639
- num_items: number;
640
- items: StorageChargeItem[];
634
+ interface UserAccountDetail {
635
+ user: UserDetail;
636
+ /** Whether the caller has admin privilege */
637
+ caller_has_admin_privilege: boolean;
638
+ /** The roles assigned to the user recognised by the Account Server */
639
+ account_server_roles: string[];
641
640
  }
642
- interface ProcessingChargeItem {
643
- /** The charge record number */
644
- id: number;
645
- /** The most recent sequence number for this charge */
646
- sqn: number;
647
- name?: string;
648
- username: string;
649
- /** The date and time of the processing charge */
650
- timestamp: string;
651
- /** The coin-cost of the storage */
652
- coins: string;
653
- additional_data?: ChargeAdditionalData;
641
+ interface UserDetail {
642
+ /** The user identity (username) */
643
+ id: string;
654
644
  }
655
- type ProcessingChargesMerchantKind = typeof ProcessingChargesMerchantKind[keyof typeof ProcessingChargesMerchantKind];
656
- declare const ProcessingChargesMerchantKind: {
657
- readonly DATA_MANAGER: "DATA_MANAGER";
645
+ type AssetPatchBodyBody = {
646
+ /** A file containing the content for the asset. You must provide a value here or in content_string */
647
+ content_file?: Blob;
648
+ /** The textual content of the asset. You must provide a value here or in content_file */
649
+ content_string?: string;
650
+ /** An optional description for the Asset */
651
+ description?: string;
658
652
  };
659
- interface ProcessingCharges {
660
- merchant_name: string;
661
- merchant_kind: ProcessingChargesMerchantKind;
662
- merchant_api_hostname: string;
663
- /** The date when the process stopped */
664
- closed?: string;
665
- /** 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. */
666
- final: boolean;
667
- /** True if charges were received after the charge record was finalised */
668
- post_final_charges?: boolean;
669
- charge: ProcessingChargeItem;
670
- }
671
- type AssetDetailScope = typeof AssetDetailScope[keyof typeof AssetDetailScope];
672
- declare const AssetDetailScope: {
653
+ /**
654
+ * 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.
655
+ */
656
+ type AssetPostBodyBodyScope = (typeof AssetPostBodyBodyScope)[keyof typeof AssetPostBodyBodyScope];
657
+ declare const AssetPostBodyBodyScope: {
673
658
  readonly USER: "USER";
674
659
  readonly PRODUCT: "PRODUCT";
675
660
  readonly UNIT: "UNIT";
676
661
  readonly ORGANISATION: "ORGANISATION";
677
662
  readonly GLOBAL: "GLOBAL";
678
663
  };
679
- interface AssetDetail {
680
- creator: string;
681
- id: string;
664
+ type AssetPostBodyBody = {
665
+ /**
666
+ * 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
667
+ * @maxLength 80
668
+ * @pattern ^[a-z0-9-]{1,63}$
669
+ */
682
670
  name: string;
683
- scope: AssetDetailScope;
684
- scope_id: string;
685
- secret: boolean;
686
- disabled: boolean;
687
- content: string;
688
- created: string;
689
- content_modified?: string;
671
+ /** A file containing the content for the asset. You must provide a value here or in **content_string** but not both */
672
+ content_file?: Blob;
673
+ /** The textual content of the asset. You must provide a value here or in **content_file** but not both */
674
+ content_string?: string;
675
+ /** 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. */
676
+ scope: AssetPostBodyBodyScope;
677
+ /** 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. */
678
+ scope_id?: string;
679
+ /** Is this a secret asset? Secret assets are not revealed in a subsequent **GET** but are revealed to merchants they are connected to. */
680
+ secret: boolean;
681
+ /** An optional description for the Asset */
690
682
  description?: string;
691
- merchants: MerchantDetail[];
692
- }
693
- type UserAccountGetResponse = UserAccountDetail;
694
- interface UnitsGetResponse {
695
- /** A list of Units
696
- */
697
- units: OrganisationUnitsGetResponse[];
698
- }
699
- type UnitGetResponse = UnitAllDetail;
700
- interface UnitProductPostResponse {
701
- /** The Product's unique ID */
702
- id: string;
703
- }
683
+ };
684
+ type EventStreamPostBodyBodyFormat = (typeof EventStreamPostBodyBodyFormat)[keyof typeof EventStreamPostBodyBodyFormat];
685
+ declare const EventStreamPostBodyBodyFormat: {
686
+ readonly PROTOCOL_STRING: "PROTOCOL_STRING";
687
+ readonly JSON_STRING: "JSON_STRING";
688
+ };
689
+ type EventStreamPostBodyBody = {
690
+ format?: EventStreamPostBodyBodyFormat;
691
+ };
704
692
  /**
705
- * The type of charge
693
+ * The default product privacy setting for the Organisation
706
694
  */
707
- type ChargeSummaryType = typeof ChargeSummaryType[keyof typeof ChargeSummaryType];
708
- declare const ChargeSummaryType: {
709
- readonly PROCESSING: "PROCESSING";
710
- readonly STORAGE: "STORAGE";
695
+ type OrganisationPostBodyBodyDefaultProductPrivacy = (typeof OrganisationPostBodyBodyDefaultProductPrivacy)[keyof typeof OrganisationPostBodyBodyDefaultProductPrivacy];
696
+ declare const OrganisationPostBodyBodyDefaultProductPrivacy: {
697
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
698
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
699
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
700
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
711
701
  };
712
- interface ChargeSummary {
713
- /** The type of charge */
714
- type: ChargeSummaryType;
715
- /** The cost, in coins of the charge */
716
- coins: string;
717
- }
718
- interface UnitProductChargeSummary {
719
- product_id: string;
720
- product_type: string;
721
- charges: ChargeSummary[];
722
- }
723
- interface UnitChargeSummary {
724
- charges: ChargeSummary[];
725
- }
726
- interface UnitChargesGetResponse {
727
- /** Whether the user making the API call is a member of the Unit */
728
- caller_is_member: boolean;
729
- unit_id: string;
730
- name?: string;
731
- /** The Unit's owner (a username) */
732
- owner_id: string;
733
- /** True if the Unit is private */
734
- private: boolean;
735
- created: string;
736
- coins: string;
737
- count: number;
702
+ type OrganisationPostBodyBody = {
703
+ /**
704
+ * The name of the organisation
705
+ * @maxLength 80
706
+ */
707
+ name: string;
708
+ /** The name of the organisation owner. A user ID */
709
+ owner: string;
710
+ /** The default product privacy setting for the Organisation */
711
+ default_product_privacy?: OrganisationPostBodyBodyDefaultProductPrivacy;
712
+ };
713
+ type PersonalUnitPutBodyBody = {
738
714
  /**
715
+ * The day you would like to be billed for the Unit's Products (a value from 1 and 28)
739
716
  * @minimum 1
740
717
  * @maximum 28
741
718
  */
742
719
  billing_day: number;
743
- /** The start of the charge period */
744
- from: string;
745
- /** The date where of first day after the charge period */
746
- until: string;
747
- summary: UnitChargeSummary;
748
- products: UnitProductChargeSummary[];
749
- }
720
+ };
750
721
  /**
751
- * The Unit's Product
722
+ * The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value
752
723
  */
753
- type ProductUnitGetResponseProduct = ProductDmStorage | ProductDmProjectTier;
754
- interface ProductUnitGetResponse {
755
- /** The Unit's Product */
756
- product: ProductUnitGetResponseProduct;
757
- }
758
- interface ProductsGetTypesResponse {
759
- /** The number of Product Types */
760
- count: number;
761
- /** All the Product Types you have access to */
762
- product_types: ProductType[];
763
- }
764
- type ProductsGetDefaultStorageCostDefaultStorageCost = {
765
- cost: string;
766
- units: string;
767
- description: string;
768
- };
769
- interface ProductsGetDefaultStorageCost {
770
- default_storage_cost: ProductsGetDefaultStorageCostDefaultStorageCost;
771
- }
772
- type ProductsGetResponseProductsItem = ProductDmStorage | ProductDmProjectTier;
773
- interface ProductsGetResponse {
774
- count: number;
775
- /** All the Products you have access to */
776
- products: ProductsGetResponseProductsItem[];
777
- }
778
- type ProductChargesGetResponseProductType = typeof ProductChargesGetResponseProductType[keyof typeof ProductChargesGetResponseProductType];
779
- declare const ProductChargesGetResponseProductType: {
780
- readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
781
- readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
724
+ type OrganisationUnitPostBodyBodyDefaultProductPrivacy = (typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy)[keyof typeof OrganisationUnitPostBodyBodyDefaultProductPrivacy];
725
+ declare const OrganisationUnitPostBodyBodyDefaultProductPrivacy: {
726
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
727
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
728
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
729
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
782
730
  };
783
- interface ProductChargesGetResponse {
784
- product_id: string;
785
- product_type: ProductChargesGetResponseProductType;
731
+ type OrganisationUnitPostBodyBody = {
786
732
  /**
787
- * @minimum 1
788
- * @maximum 28
733
+ * The name of the unit
734
+ * @maxLength 80
789
735
  */
790
- billing_day: number;
791
- /** True if the product can be (needs to be) claimed. */
792
- claimable: boolean;
793
- claim?: ProductClaimDetail;
794
- count: number;
795
- /** The start of the charge period */
796
- from: string;
797
- /** The date where of first day after the charge period */
798
- until: string;
799
- /** The total number of coins consumed by this product for the invoice period */
800
- coins: string;
801
- processing_charges: ProcessingCharges[];
802
- storage_charges: StorageCharges;
803
- }
804
- type OrganisationGetResponse = OrganisationAllDetail;
805
- interface OrganisationsGetResponse {
806
- count: number;
807
- /** A list of Organisations */
808
- organisations: OrganisationAllDetail[];
809
- }
810
- interface OrganisationUnitChargeSummary {
811
- unit_id: string;
812
736
  name: string;
813
737
  /**
738
+ * The day you would like to be billed for the Unit's Products (a value from 1 and 28)
814
739
  * @minimum 1
815
740
  * @maximum 28
816
741
  */
817
742
  billing_day: number;
818
- /** The start of the charge period */
819
- from: string;
820
- /** The date where of first day after the charge period */
821
- until: string;
822
- summary: ChargeSummary[];
823
- }
824
- interface OrganisationChargesGetResponse {
825
- organisation_id: string;
826
- name: string;
827
- coins: string;
828
- summary: ChargeSummary[];
829
- unit_charges: OrganisationUnitChargeSummary[];
830
- }
831
- interface OrganisationUnitsGetResponse {
832
- count?: number;
833
- organisation: OrganisationAllDetail;
834
- /** A list of Units
835
- */
836
- units: UnitAllDetail[];
837
- }
838
- interface OrganisationChargeSummary {
839
- organisation_id: string;
840
- name: string;
841
- summary: ChargeSummary[];
842
- }
843
- interface PersonalUnitPutResponse {
844
- /** The unit's Organisation. Used to identify the Default organisation */
845
- organisation_id: string;
846
- /** The unit's unique ID */
847
- id: string;
848
- }
849
- interface OrganisationUnitPostResponse {
850
- /** The unit's unique ID */
851
- id: string;
852
- }
743
+ /** The default product privacy setting for products in the unit. Whether the privacy can be honoured will depend on the organisation's value */
744
+ default_product_privacy?: OrganisationUnitPostBodyBodyDefaultProductPrivacy;
745
+ };
853
746
  /**
854
- * The Organisation's default product privacy setting
747
+ * 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`.
748
+
749
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units
855
750
  */
856
- type OrganisationGetDefaultResponseDefaultProductPrivacy = typeof OrganisationGetDefaultResponseDefaultProductPrivacy[keyof typeof OrganisationGetDefaultResponseDefaultProductPrivacy];
857
- declare const OrganisationGetDefaultResponseDefaultProductPrivacy: {
751
+ type OrganisationPatchBodyBodyDefaultProductPrivacy = (typeof OrganisationPatchBodyBodyDefaultProductPrivacy)[keyof typeof OrganisationPatchBodyBodyDefaultProductPrivacy];
752
+ declare const OrganisationPatchBodyBodyDefaultProductPrivacy: {
858
753
  readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
859
754
  readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
860
755
  readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
861
756
  readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
862
757
  };
863
- interface OrganisationGetDefaultResponse {
864
- /** Whether the user making the API call is a member of the Default Organisation. Only admin users are members of the Default organisation */
865
- caller_is_member?: boolean;
866
- /** The Default Organisation ID
867
- */
868
- id?: string;
869
- /** The Default Organisation Name
870
- */
758
+ type OrganisationPatchBodyBody = {
759
+ /** The new name for the Organisational */
871
760
  name?: string;
872
- /** 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
873
- */
874
- private?: boolean;
875
- created?: string;
876
- /** The Organisation's default product privacy setting */
877
- default_product_privacy?: OrganisationGetDefaultResponseDefaultProductPrivacy;
878
- }
879
- interface UsersGetResponse {
880
- count: number;
881
- organisation?: OrganisationDetail;
882
- unit?: UnitDetail;
883
- /** The list of Organisation Users
884
- */
885
- users: UserDetail[];
886
- }
887
- interface OrganisationPostResponse {
888
- /** The Organisation's unique ID */
889
- id: string;
890
- }
891
- interface StateGetVersionResponse {
892
- /** 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
893
- */
894
- version: string;
895
- }
761
+ /** 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`.
762
+
763
+ Whether the privacy can be honoured will depend on the value in any of the organisation's existing units */
764
+ default_product_privacy?: OrganisationPatchBodyBodyDefaultProductPrivacy;
765
+ };
896
766
  /**
897
- * 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.
767
+ * 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`.
768
+
769
+ Whether the privacy can be honoured will depend on the organisation's value
898
770
  */
899
- type EventStreamVersionGetResponseProtocol = typeof EventStreamVersionGetResponseProtocol[keyof typeof EventStreamVersionGetResponseProtocol];
900
- declare const EventStreamVersionGetResponseProtocol: {
901
- readonly ERROR_INTERNAL: "ERROR_INTERNAL";
902
- readonly SERVICE_NOT_PRESENT: "SERVICE_NOT_PRESENT";
903
- readonly WEBSOCKET: "WEBSOCKET";
771
+ type UnitPatchBodyBodyDefaultProductPrivacy = (typeof UnitPatchBodyBodyDefaultProductPrivacy)[keyof typeof UnitPatchBodyBodyDefaultProductPrivacy];
772
+ declare const UnitPatchBodyBodyDefaultProductPrivacy: {
773
+ readonly ALWAYS_PUBLIC: "ALWAYS_PUBLIC";
774
+ readonly ALWAYS_PRIVATE: "ALWAYS_PRIVATE";
775
+ readonly DEFAULT_PUBLIC: "DEFAULT_PUBLIC";
776
+ readonly DEFAULT_PRIVATE: "DEFAULT_PRIVATE";
777
+ };
778
+ type UnitPatchBodyBody = {
779
+ /** The new name for the Unit */
780
+ name?: string;
781
+ /** 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`.
782
+
783
+ Whether the privacy can be honoured will depend on the organisation's value */
784
+ default_product_privacy?: UnitPatchBodyBodyDefaultProductPrivacy;
785
+ };
786
+ /**
787
+ * The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
788
+
789
+ Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products
790
+ */
791
+ type UnitProductPostBodyBodyType = (typeof UnitProductPostBodyBodyType)[keyof typeof UnitProductPostBodyBodyType];
792
+ declare const UnitProductPostBodyBodyType: {
793
+ readonly DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION: "DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION";
794
+ readonly DATA_MANAGER_STORAGE_SUBSCRIPTION: "DATA_MANAGER_STORAGE_SUBSCRIPTION";
795
+ };
796
+ /**
797
+ * The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products
798
+ */
799
+ type UnitProductPostBodyBodyFlavour = (typeof UnitProductPostBodyBodyFlavour)[keyof typeof UnitProductPostBodyBodyFlavour];
800
+ declare const UnitProductPostBodyBodyFlavour: {
801
+ readonly EVALUATION: "EVALUATION";
802
+ readonly BRONZE: "BRONZE";
803
+ readonly SILVER: "SILVER";
804
+ readonly GOLD: "GOLD";
805
+ };
806
+ type UnitProductPostBodyBody = {
807
+ /**
808
+ * The name you want to give the Product
809
+ * @maxLength 80
810
+ */
811
+ name: string;
812
+ /** The Type of Product. Storage subscriptions require an **Allowance** to be defined and the **Flavour** must not be provided.
813
+
814
+ Project Tier subscriptions have built-in allowances and Limits so you must not provide values for these for these products */
815
+ type: UnitProductPostBodyBodyType;
816
+ /** The Flavour of the Product. Used only for Project Tier Products. Do not set this for Storage products */
817
+ flavour?: UnitProductPostBodyBodyFlavour;
818
+ /**
819
+ * The Product's coin allowance. You must provide this for Storage products but you must not provide a value for Project Tier Products
820
+ * @minimum 1
821
+ */
822
+ allowance?: number;
823
+ /**
824
+ * 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
825
+ * @minimum 1
826
+ */
827
+ limit?: number;
828
+ };
829
+ type ProductPatchBodyBody = {
830
+ /**
831
+ * The name you want to give the Product
832
+ * @maxLength 80
833
+ */
834
+ name?: string;
835
+ /**
836
+ * The Product's built-in coin allowance. Product allowances cannot be reduced
837
+ * @minimum 1
838
+ */
839
+ allowance?: number;
840
+ /**
841
+ * 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
842
+ * @minimum 1
843
+ */
844
+ limit?: number;
845
+ };
846
+ /**
847
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
848
+ */
849
+ type QPbpParameter = number;
850
+ /**
851
+ * An Organisation Identity
852
+ */
853
+ type QOrgIdParameter = string;
854
+ /**
855
+ * A Merchant Identity
856
+ */
857
+ type QMIdParameter = number;
858
+ /**
859
+ * An object name
860
+ */
861
+ type QNameParameter = string;
862
+ /**
863
+ * A Unit Identity
864
+ */
865
+ type QUnitIdParameter = string;
866
+ /**
867
+ * A Product Identity
868
+ */
869
+ type QProductIdParameter = string;
870
+ /**
871
+ * A User Identity
872
+ */
873
+ type QUserIdParameter = string;
874
+ type QFormatParameter = (typeof QFormatParameter)[keyof typeof QFormatParameter];
875
+ declare const QFormatParameter: {
876
+ readonly PROTOCOL_STRING: "PROTOCOL_STRING";
877
+ readonly JSON_STRING: "JSON_STRING";
878
+ };
879
+ /**
880
+ * 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
881
+ */
882
+ type QFromParameter = string;
883
+ /**
884
+ * 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
885
+ */
886
+ type QUntilParameter = string;
887
+ type GetChargesParams = {
888
+ /**
889
+ * 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
890
+ */
891
+ from?: QFromParameter;
892
+ /**
893
+ * 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
894
+ */
895
+ until?: QUntilParameter;
896
+ /**
897
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
898
+ * @minimum -23
899
+ * @maximum 0
900
+ */
901
+ pbp?: QPbpParameter;
902
+ };
903
+ type GetOrganisationChargesParams = {
904
+ /**
905
+ * 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
906
+ */
907
+ from?: QFromParameter;
908
+ /**
909
+ * 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
910
+ */
911
+ until?: QUntilParameter;
912
+ /**
913
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
914
+ * @minimum -23
915
+ * @maximum 0
916
+ */
917
+ pbp?: QPbpParameter;
918
+ };
919
+ type GetProductChargesParams = {
920
+ /**
921
+ * 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
922
+ */
923
+ from?: QFromParameter;
924
+ /**
925
+ * 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
926
+ */
927
+ until?: QUntilParameter;
928
+ /**
929
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
930
+ * @minimum -23
931
+ * @maximum 0
932
+ */
933
+ pbp?: QPbpParameter;
934
+ };
935
+ type GetUnitChargesParams = {
936
+ /**
937
+ * 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
938
+ */
939
+ from?: QFromParameter;
940
+ /**
941
+ * 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
942
+ */
943
+ until?: QUntilParameter;
944
+ /**
945
+ * A charge Prior Billing Period, 0 implies "current" and -23 is for the period 23 months ago.
946
+ * @minimum -23
947
+ * @maximum 0
948
+ */
949
+ pbp?: QPbpParameter;
950
+ };
951
+ type GetOrganisationsParams = {
952
+ /**
953
+ * An object name
954
+ */
955
+ name?: QNameParameter;
956
+ };
957
+ type GetUnitsParams = {
958
+ /**
959
+ * An object name
960
+ */
961
+ name?: QNameParameter;
962
+ };
963
+ type GetAssetParams = {
964
+ /**
965
+ * A User Identity
966
+ * @minLength 3
967
+ * @maxLength 80
968
+ * @pattern ^\w(?:\w*(?:[@.-]\w+)?)*$
969
+ */
970
+ user_id?: QUserIdParameter;
971
+ /**
972
+ * A Product Identity
973
+ * @pattern ^product-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
974
+ */
975
+ product_id?: QProductIdParameter;
976
+ /**
977
+ * A Unit Identity
978
+ * @pattern ^unit-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
979
+ */
980
+ unit_id?: QUnitIdParameter;
981
+ /**
982
+ * An Organisation Identity
983
+ * @pattern ^org-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
984
+ */
985
+ org_id?: QOrgIdParameter;
986
+ };
987
+ type AttachAssetParams = {
988
+ /**
989
+ * A Merchant Identity
990
+ * @minimum 1
991
+ */
992
+ m_id?: QMIdParameter;
993
+ };
994
+ type DetachAssetParams = {
995
+ /**
996
+ * A Merchant Identity
997
+ * @minimum 1
998
+ */
999
+ m_id?: QMIdParameter;
1000
+ };
1001
+ type GetActionsParams = {
1002
+ /**
1003
+ * The required format for delivered content.
1004
+ */
1005
+ format?: QFormatParameter;
1006
+ /**
1007
+ * 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
1008
+ */
1009
+ from?: QFromParameter;
1010
+ /**
1011
+ * A Merchant Identity
1012
+ * @minimum 1
1013
+ */
1014
+ m_id?: QMIdParameter;
1015
+ /**
1016
+ * An Organisation Identity
1017
+ * @pattern ^org-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
1018
+ */
1019
+ org_id?: QOrgIdParameter;
1020
+ /**
1021
+ * A Product Identity
1022
+ * @pattern ^product-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
1023
+ */
1024
+ product_id?: QProductIdParameter;
1025
+ /**
1026
+ * 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
1027
+ */
1028
+ until?: QUntilParameter;
1029
+ /**
1030
+ * A Unit Identity
1031
+ * @pattern ^unit-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
1032
+ */
1033
+ unit_id?: QUnitIdParameter;
904
1034
  };
905
- interface EventStreamVersionGetResponse {
906
- /** The EventStream implementation version */
907
- version: string;
908
- /** 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. */
909
- protocol: EventStreamVersionGetResponseProtocol;
910
- /** The name of the Event Stream implementation, often used to identify the service origin and implementation. */
911
- name: string;
912
- }
913
- interface EventStreamGetPostResponse {
914
- /** The EventStream ID */
915
- id: number;
916
- /** 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. */
917
- location: string;
918
- /** The Event Stream format. */
919
- format: string;
920
- }
921
- interface ChargesGetResponse {
922
- coins: string;
923
- count: number;
924
- summary: ChargeSummary[];
925
- organisation_charges: OrganisationChargeSummary[];
926
- }
927
- interface AssetPostResponse {
928
- /** The Asset ID
929
- */
930
- id: string;
931
- }
932
- interface AssetGetResponse {
933
- /** A list of Assets
934
- */
935
- assets: AssetDetail[];
936
- /** The number of Assets returned
937
- */
938
- count: number;
939
- }
940
- type AssetGetByIdResponse = AssetDetail;
941
- interface AsError {
942
- /** Brief error text that can be presented to the user */
943
- error: string;
944
- }
945
1035
 
946
1036
  declare const AXIOS_INSTANCE: axios.AxiosInstance;
947
1037
  /**
@@ -958,4 +1048,4 @@ declare const setBaseUrl: (baseUrl: string) => void;
958
1048
  declare const customInstance: <TReturn>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<TReturn>;
959
1049
  type ErrorType<TError> = AxiosError<TError>;
960
1050
 
961
- export { AXIOS_INSTANCE, type AsError, type AssetDetail, AssetDetailScope, type AssetGetByIdResponse, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type EventStreamPostBodyBody, EventStreamPostBodyBodyFormat, type EventStreamVersionGetResponse, EventStreamVersionGetResponseProtocol, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetOrganisationsParams, type GetProductChargesParams, type GetUnitChargesParams, type GetUnitsParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantsGetResponse, type OrganisationAllDetail, OrganisationAllDetailDefaultProductPrivacy, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, OrganisationGetDefaultResponseDefaultProductPrivacy, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, type QFromParameter, type QMIdParameter, type QNameParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitAllDetail, UnitAllDetailDefaultProductPrivacy, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };
1051
+ export { AXIOS_INSTANCE, type ActionDetail, type ActionGetResponse, type AsError, type AssetDetail, AssetDetailScope, type AssetGetByIdResponse, type AssetGetResponse, type AssetPatchBodyBody, type AssetPostBodyBody, AssetPostBodyBodyScope, type AssetPostResponse, type AttachAssetParams, type ChargeAdditionalData, type ChargeSummary, ChargeSummaryType, type ChargesGetResponse, type DetachAssetParams, type ErrorType, type EventStreamGetPostResponse, type EventStreamPostBodyBody, EventStreamPostBodyBodyFormat, type EventStreamVersionGetResponse, EventStreamVersionGetResponseProtocol, type GetActionsParams, type GetAssetParams, type GetChargesParams, type GetOrganisationChargesParams, type GetOrganisationsParams, type GetProductChargesParams, type GetUnitChargesParams, type GetUnitsParams, type MerchantDetail, MerchantDetailKind, type MerchantGetResponse, type MerchantSummary, MerchantSummaryKind, type MerchantsGetResponse, type OrganisationAllDetail, OrganisationAllDetailDefaultProductPrivacy, type OrganisationChargeSummary, type OrganisationChargesGetResponse, type OrganisationDetail, OrganisationDetailDefaultProductPrivacy, type OrganisationGetDefaultResponse, OrganisationGetDefaultResponseDefaultProductPrivacy, type OrganisationGetResponse, type OrganisationPatchBodyBody, OrganisationPatchBodyBodyDefaultProductPrivacy, type OrganisationPostBodyBody, OrganisationPostBodyBodyDefaultProductPrivacy, type OrganisationPostResponse, type OrganisationUnitChargeSummary, type OrganisationUnitPostBodyBody, OrganisationUnitPostBodyBodyDefaultProductPrivacy, type OrganisationUnitPostResponse, type OrganisationUnitsGetResponse, type OrganisationsGetResponse, type PersonalUnitPutBodyBody, type PersonalUnitPutResponse, type ProcessingChargeItem, type ProcessingCharges, ProcessingChargesMerchantKind, type ProductChargesGetResponse, ProductChargesGetResponseProductType, type ProductClaimDetail, type ProductCoinsDetail, type ProductDetail, ProductDetailFlavour, ProductDetailType, type ProductDmProjectTier, type ProductDmStorage, type ProductDmStorageDetail, type ProductDmStorageDetailCoins, type ProductDmStorageDetailSize, type ProductInstanceDetail, type ProductInstanceDetailCoins, type ProductPatchBodyBody, type ProductType, ProductTypeServiceKind, type ProductUnitGetResponse, type ProductUnitGetResponseProduct, type ProductsGetDefaultStorageCost, type ProductsGetDefaultStorageCostDefaultStorageCost, type ProductsGetResponse, type ProductsGetResponseProductsItem, type ProductsGetTypesResponse, QFormatParameter, type QFromParameter, type QMIdParameter, type QNameParameter, type QOrgIdParameter, type QPbpParameter, type QProductIdParameter, type QUnitIdParameter, type QUntilParameter, type QUserIdParameter, type StateGetVersionResponse, type StorageChargeItem, type StorageCharges, type UnitAllDetail, UnitAllDetailDefaultProductPrivacy, type UnitChargeSummary, type UnitChargesGetResponse, type UnitDetail, UnitDetailDefaultProductPrivacy, type UnitGetResponse, type UnitPatchBodyBody, UnitPatchBodyBodyDefaultProductPrivacy, type UnitProductChargeSummary, type UnitProductPostBodyBody, UnitProductPostBodyBodyFlavour, UnitProductPostBodyBodyType, type UnitProductPostResponse, type UnitsGetResponse, type UserAccountDetail, type UserAccountGetResponse, type UserDetail, type UsersGetResponse, customInstance, setAuthToken, setBaseUrl };