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