@monocloud/management-core 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -13
- package/dist/index.cjs +122 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +264 -13
- package/dist/index.d.mts +264 -13
- package/dist/index.mjs +119 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,102 +1,323 @@
|
|
|
1
1
|
//#region src/exceptions/monocloud-exception.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The MonoCloud Exception
|
|
4
|
+
* @export
|
|
5
|
+
* @class MonoCloudException
|
|
6
|
+
*/
|
|
2
7
|
declare class MonoCloudException extends Error {}
|
|
3
8
|
//#endregion
|
|
4
9
|
//#region src/models/problem-details.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* The Problem Details
|
|
12
|
+
* @export
|
|
13
|
+
* @class ProblemDetails
|
|
14
|
+
*/
|
|
5
15
|
declare class ProblemDetails {
|
|
16
|
+
/**
|
|
17
|
+
* The type of error
|
|
18
|
+
* @type {string}
|
|
19
|
+
* @memberof ProblemDetails
|
|
20
|
+
*/
|
|
6
21
|
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* The title of the error
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ProblemDetails
|
|
26
|
+
*/
|
|
7
27
|
title: string;
|
|
28
|
+
/**
|
|
29
|
+
* The status code representing the error
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ProblemDetails
|
|
32
|
+
*/
|
|
8
33
|
status: number;
|
|
34
|
+
/**
|
|
35
|
+
* The error details
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ProblemDetails
|
|
38
|
+
*/
|
|
9
39
|
detail: string;
|
|
40
|
+
/**
|
|
41
|
+
* The instance
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ProblemDetails
|
|
44
|
+
*/
|
|
10
45
|
instance: string;
|
|
46
|
+
/**
|
|
47
|
+
* Additional data about the error
|
|
48
|
+
*/
|
|
11
49
|
[key: string]: any;
|
|
12
50
|
constructor(response: ProblemDetails);
|
|
13
51
|
}
|
|
14
52
|
//#endregion
|
|
15
53
|
//#region src/exceptions/monocloud-request-exception.d.ts
|
|
16
54
|
declare class MonoCloudRequestException extends MonoCloudException {
|
|
55
|
+
/**
|
|
56
|
+
* The problem details received from the server.
|
|
57
|
+
* @type {ProblemDetails}
|
|
58
|
+
* @memberof MonoCloudRequestException
|
|
59
|
+
*/
|
|
17
60
|
response?: ProblemDetails;
|
|
61
|
+
/**
|
|
62
|
+
* Initializes the MonoCloudRequestException Class
|
|
63
|
+
* @param response - The problem details returned from the server.
|
|
64
|
+
*/
|
|
18
65
|
constructor(response: ProblemDetails);
|
|
66
|
+
/**
|
|
67
|
+
* Initializes the MonoCloudRequestException Class
|
|
68
|
+
* @param message - The error message.
|
|
69
|
+
*/
|
|
19
70
|
constructor(message: string);
|
|
71
|
+
/**
|
|
72
|
+
* Initializes the MonoCloudRequestException Class
|
|
73
|
+
* @param response - The problem details returned from the server.
|
|
74
|
+
* @param message - The error message.
|
|
75
|
+
*/
|
|
20
76
|
constructor(response: ProblemDetails, message: string);
|
|
21
77
|
}
|
|
22
78
|
//#endregion
|
|
23
79
|
//#region src/exceptions/monocloud-bad-request-exception.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* The MonoCloud Bad Request Exception
|
|
82
|
+
* @export
|
|
83
|
+
* @class MonoCloudBadRequestException
|
|
84
|
+
*/
|
|
24
85
|
declare class MonoCloudBadRequestException extends MonoCloudRequestException {
|
|
86
|
+
/**
|
|
87
|
+
* Initializes the MonoCloudBadRequestException Class
|
|
88
|
+
* @param response - The problem details returned from the server.
|
|
89
|
+
*/
|
|
25
90
|
constructor(response: ProblemDetails);
|
|
91
|
+
/**
|
|
92
|
+
* Initializes the MonoCloudBadRequestException Class
|
|
93
|
+
* @param message - The error message.
|
|
94
|
+
*/
|
|
26
95
|
constructor(message: string);
|
|
27
96
|
}
|
|
28
97
|
//#endregion
|
|
29
98
|
//#region src/exceptions/monocloud-conflict-exception.d.ts
|
|
99
|
+
/**
|
|
100
|
+
* The MonoCloud Conflict Exception
|
|
101
|
+
* @export
|
|
102
|
+
* @class MonoCloudConflictException
|
|
103
|
+
*/
|
|
30
104
|
declare class MonoCloudConflictException extends MonoCloudRequestException {
|
|
105
|
+
/**
|
|
106
|
+
* Initializes the MonoCloudConflictException Class
|
|
107
|
+
* @param response - The problem details returned from the server.
|
|
108
|
+
*/
|
|
31
109
|
constructor(response: ProblemDetails);
|
|
110
|
+
/**
|
|
111
|
+
* Initializes the MonoCloudConflictException Class
|
|
112
|
+
* @param message - The error message.
|
|
113
|
+
*/
|
|
32
114
|
constructor(message: string);
|
|
33
115
|
}
|
|
34
116
|
//#endregion
|
|
35
|
-
//#region src/models/
|
|
36
|
-
|
|
117
|
+
//#region src/models/identity-error.d.ts
|
|
118
|
+
/**
|
|
119
|
+
* Identity Error: Represents a validation or processing error returned by the identity system.
|
|
120
|
+
* @export
|
|
121
|
+
* @class IdentityError
|
|
122
|
+
*/
|
|
123
|
+
declare class IdentityError {
|
|
124
|
+
/**
|
|
125
|
+
* Machine-readable error code.
|
|
126
|
+
* @type {string}
|
|
127
|
+
* @memberof IdentityError
|
|
128
|
+
*/
|
|
37
129
|
code: string;
|
|
130
|
+
/**
|
|
131
|
+
* Human-readable description of the error.
|
|
132
|
+
* @type {string}
|
|
133
|
+
* @memberof IdentityError
|
|
134
|
+
*/
|
|
38
135
|
description: string;
|
|
39
|
-
|
|
40
|
-
constructor(code: string, description: string, field?: string);
|
|
136
|
+
constructor(code: string, description: string);
|
|
41
137
|
}
|
|
42
138
|
//#endregion
|
|
43
|
-
//#region src/models/
|
|
44
|
-
declare class
|
|
45
|
-
errors:
|
|
139
|
+
//#region src/models/identity-validation-problem-details.d.ts
|
|
140
|
+
declare class IdentityValidationProblemDetails extends ProblemDetails {
|
|
141
|
+
errors: IdentityError[];
|
|
46
142
|
constructor(response: ProblemDetails);
|
|
47
143
|
}
|
|
48
144
|
//#endregion
|
|
49
|
-
//#region src/exceptions/monocloud-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
145
|
+
//#region src/exceptions/monocloud-identity-validation-exception.d.ts
|
|
146
|
+
/**
|
|
147
|
+
* The MonoCloud Identity Validation Exception
|
|
148
|
+
* @export
|
|
149
|
+
* @class MonoCloudIdentityValidationException
|
|
150
|
+
*/
|
|
151
|
+
declare class MonoCloudIdentityValidationException extends MonoCloudRequestException {
|
|
152
|
+
errors: IdentityError[];
|
|
153
|
+
/**
|
|
154
|
+
* Initializes the MonoCloudIdentityValidationException Class
|
|
155
|
+
* @param response - The problem details returned from the server.
|
|
156
|
+
*/
|
|
157
|
+
constructor(response: IdentityValidationProblemDetails);
|
|
53
158
|
}
|
|
54
159
|
//#endregion
|
|
55
160
|
//#region src/exceptions/monocloud-forbidden-exception.d.ts
|
|
161
|
+
/**
|
|
162
|
+
* The MonoCloud Forbidden Exception
|
|
163
|
+
* @export
|
|
164
|
+
* @class MonoCloudForbiddenException
|
|
165
|
+
*/
|
|
56
166
|
declare class MonoCloudForbiddenException extends MonoCloudRequestException {
|
|
167
|
+
/**
|
|
168
|
+
* Initializes the MonoCloudForbiddenException Class
|
|
169
|
+
* @param response - The problem details returned from the server.
|
|
170
|
+
*/
|
|
57
171
|
constructor(response: ProblemDetails);
|
|
172
|
+
/**
|
|
173
|
+
* Initializes the MonoCloudForbiddenException Class
|
|
174
|
+
* @param message - The error message.
|
|
175
|
+
*/
|
|
58
176
|
constructor(message: string);
|
|
59
177
|
}
|
|
60
178
|
//#endregion
|
|
61
179
|
//#region src/models/key-validation-problem-details.d.ts
|
|
180
|
+
/**
|
|
181
|
+
* The Key Validation Problem Details
|
|
182
|
+
* @export
|
|
183
|
+
* @class KeyValidationProblemDetails
|
|
184
|
+
*/
|
|
62
185
|
declare class KeyValidationProblemDetails extends ProblemDetails {
|
|
186
|
+
/**
|
|
187
|
+
* A collection of errors
|
|
188
|
+
* @type {Record<string, string[]>}
|
|
189
|
+
* @memberof KeyValidationProblemDetails
|
|
190
|
+
*/
|
|
63
191
|
errors: Record<string, string[]>;
|
|
64
192
|
constructor(response: ProblemDetails);
|
|
65
193
|
}
|
|
66
194
|
//#endregion
|
|
67
195
|
//#region src/exceptions/monocloud-key-validation-exception.d.ts
|
|
196
|
+
/**
|
|
197
|
+
* The MonoCloud Key Validation Exception
|
|
198
|
+
* @export
|
|
199
|
+
* @class MonoCloudKeyValidationException
|
|
200
|
+
*/
|
|
68
201
|
declare class MonoCloudKeyValidationException extends MonoCloudRequestException {
|
|
69
202
|
errors: Record<string, string[]>;
|
|
203
|
+
/**
|
|
204
|
+
* Initializes the MonoCloudKeyValidationException Class
|
|
205
|
+
* @param response - The problem details returned from the server.
|
|
206
|
+
*/
|
|
70
207
|
constructor(response: KeyValidationProblemDetails);
|
|
71
208
|
}
|
|
72
209
|
//#endregion
|
|
73
210
|
//#region src/exceptions/monocloud-model-state-exception.d.ts
|
|
211
|
+
/**
|
|
212
|
+
* The MonoCloud Model State Exception
|
|
213
|
+
* @export
|
|
214
|
+
* @class MonoCloudModelStateException
|
|
215
|
+
*/
|
|
74
216
|
declare class MonoCloudModelStateException extends MonoCloudRequestException {
|
|
217
|
+
/**
|
|
218
|
+
* Initializes the MonoCloudModelStateException Class
|
|
219
|
+
* @param response - The problem details returned from the server.
|
|
220
|
+
*/
|
|
75
221
|
constructor(response: ProblemDetails);
|
|
222
|
+
/**
|
|
223
|
+
* Initializes the MonoCloudModelStateException Class
|
|
224
|
+
* @param message - The error message.
|
|
225
|
+
*/
|
|
76
226
|
constructor(message: string);
|
|
77
227
|
}
|
|
78
228
|
//#endregion
|
|
79
229
|
//#region src/exceptions/monocloud-not-found-exception.d.ts
|
|
230
|
+
/**
|
|
231
|
+
* The MonoCloud Not Found Exception
|
|
232
|
+
* @export
|
|
233
|
+
* @class MonoCloudNotFoundException
|
|
234
|
+
*/
|
|
80
235
|
declare class MonoCloudNotFoundException extends MonoCloudRequestException {
|
|
236
|
+
/**
|
|
237
|
+
* Initializes the MonoCloudNotFoundException Class
|
|
238
|
+
* @param response - The problem details returned from the server.
|
|
239
|
+
*/
|
|
81
240
|
constructor(response: ProblemDetails);
|
|
241
|
+
/**
|
|
242
|
+
* Initializes the MonoCloudNotFoundException Class
|
|
243
|
+
* @param message - The error message.
|
|
244
|
+
*/
|
|
82
245
|
constructor(message: string);
|
|
83
246
|
}
|
|
84
247
|
//#endregion
|
|
85
248
|
//#region src/exceptions/monocloud-resource-exhausted-exception.d.ts
|
|
249
|
+
/**
|
|
250
|
+
* The MonoCloud Resource Exhausted Exception
|
|
251
|
+
* @export
|
|
252
|
+
* @class MonoCloudResourceExhaustedException
|
|
253
|
+
*/
|
|
86
254
|
declare class MonoCloudResourceExhaustedException extends MonoCloudRequestException {
|
|
255
|
+
/**
|
|
256
|
+
* Initializes the MonoCloudResourceExhaustedException Class
|
|
257
|
+
* @param response - The problem details returned from the server.
|
|
258
|
+
*/
|
|
87
259
|
constructor(response: ProblemDetails);
|
|
260
|
+
/**
|
|
261
|
+
* Initializes the MonoCloudResourceExhaustedException Class
|
|
262
|
+
* @param message - The error message.
|
|
263
|
+
*/
|
|
88
264
|
constructor(message: string);
|
|
89
265
|
}
|
|
90
266
|
//#endregion
|
|
91
267
|
//#region src/exceptions/monocloud-server-exception.d.ts
|
|
268
|
+
/**
|
|
269
|
+
* The MonoCloud Server Exception
|
|
270
|
+
* @export
|
|
271
|
+
* @class MonoCloudServerException
|
|
272
|
+
*/
|
|
92
273
|
declare class MonoCloudServerException extends MonoCloudRequestException {
|
|
274
|
+
/**
|
|
275
|
+
* Initializes the MonoCloudServerException Class
|
|
276
|
+
* @param response - The problem details returned from the server.
|
|
277
|
+
*/
|
|
93
278
|
constructor(response: ProblemDetails);
|
|
279
|
+
/**
|
|
280
|
+
* Initializes the MonoCloudServerException Class
|
|
281
|
+
* @param message - The error message.
|
|
282
|
+
*/
|
|
94
283
|
constructor(message: string);
|
|
95
284
|
}
|
|
96
285
|
//#endregion
|
|
97
286
|
//#region src/exceptions/monocloud-unauthorized-exception.d.ts
|
|
287
|
+
/**
|
|
288
|
+
* The MonoCloud Unauthorized Exception
|
|
289
|
+
* @export
|
|
290
|
+
* @class MonoCloudUnauthorizedException
|
|
291
|
+
*/
|
|
98
292
|
declare class MonoCloudUnauthorizedException extends MonoCloudRequestException {
|
|
293
|
+
/**
|
|
294
|
+
* Initializes the MonoCloudUnauthorizedException Class
|
|
295
|
+
* @param response - The problem details returned from the server.
|
|
296
|
+
*/
|
|
99
297
|
constructor(response: ProblemDetails);
|
|
298
|
+
/**
|
|
299
|
+
* Initializes the MonoCloudUnauthorizedException Class
|
|
300
|
+
* @param message - The error message.
|
|
301
|
+
*/
|
|
302
|
+
constructor(message: string);
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/exceptions/monocloud-payment-required-exception.d.ts
|
|
306
|
+
/**
|
|
307
|
+
* The MonoCloud Payment Required Exception
|
|
308
|
+
* @export
|
|
309
|
+
* @class MonoCloudPaymentRequiredException
|
|
310
|
+
*/
|
|
311
|
+
declare class MonoCloudPaymentRequiredException extends MonoCloudRequestException {
|
|
312
|
+
/**
|
|
313
|
+
* Initializes the MonoCloudPaymentRequiredException Class
|
|
314
|
+
* @param response - The problem details returned from the server.
|
|
315
|
+
*/
|
|
316
|
+
constructor(response: ProblemDetails);
|
|
317
|
+
/**
|
|
318
|
+
* Initializes the MonoCloudPaymentRequiredException Class
|
|
319
|
+
* @param message - The error message.
|
|
320
|
+
*/
|
|
100
321
|
constructor(message: string);
|
|
101
322
|
}
|
|
102
323
|
//#endregion
|
|
@@ -118,11 +339,41 @@ declare class MonoCloudResponse<TResult = unknown> {
|
|
|
118
339
|
}
|
|
119
340
|
//#endregion
|
|
120
341
|
//#region src/models/page-model.d.ts
|
|
342
|
+
/**
|
|
343
|
+
* The Page Model
|
|
344
|
+
* @export
|
|
345
|
+
* @interface PageModel
|
|
346
|
+
*/
|
|
121
347
|
interface PageModel {
|
|
348
|
+
/**
|
|
349
|
+
* Page Size
|
|
350
|
+
* @type {number}
|
|
351
|
+
* @memberof PageModel
|
|
352
|
+
*/
|
|
122
353
|
page_size: number;
|
|
354
|
+
/**
|
|
355
|
+
* Current Page
|
|
356
|
+
* @type {number}
|
|
357
|
+
* @memberof PageModel
|
|
358
|
+
*/
|
|
123
359
|
current_page: number;
|
|
360
|
+
/**
|
|
361
|
+
* Total Number of Items
|
|
362
|
+
* @type {number}
|
|
363
|
+
* @memberof PageModel
|
|
364
|
+
*/
|
|
124
365
|
total_count: number;
|
|
366
|
+
/**
|
|
367
|
+
* Specfies whether there is a previous page
|
|
368
|
+
* @type {boolean}
|
|
369
|
+
* @memberof PageModel
|
|
370
|
+
*/
|
|
125
371
|
has_previous: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Specfies whether there is a next page
|
|
374
|
+
* @type {boolean}
|
|
375
|
+
* @memberof PageModel
|
|
376
|
+
*/
|
|
126
377
|
has_next: boolean;
|
|
127
378
|
}
|
|
128
379
|
//#endregion
|
|
@@ -141,7 +392,7 @@ interface MonoCloudRequest {
|
|
|
141
392
|
}
|
|
142
393
|
//#endregion
|
|
143
394
|
//#region src/models/fetcher.d.ts
|
|
144
|
-
type Fetcher = (input: string | URL
|
|
395
|
+
type Fetcher = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
145
396
|
//#endregion
|
|
146
397
|
//#region src/base/monocloud-client-base.d.ts
|
|
147
398
|
declare abstract class MonoCloudClientBase {
|
|
@@ -155,5 +406,5 @@ declare abstract class MonoCloudClientBase {
|
|
|
155
406
|
private buildUrl;
|
|
156
407
|
}
|
|
157
408
|
//#endregion
|
|
158
|
-
export { type
|
|
409
|
+
export { type Fetcher, type IdentityError, IdentityValidationProblemDetails, KeyValidationProblemDetails, MonoCloudBadRequestException, MonoCloudClientBase, type MonoCloudConfig, MonoCloudConflictException, MonoCloudException, MonoCloudForbiddenException, MonoCloudIdentityValidationException, MonoCloudKeyValidationException, MonoCloudModelStateException, MonoCloudNotFoundException, MonoCloudPageResponse, MonoCloudPaymentRequiredException, type MonoCloudRequest, MonoCloudRequestException, MonoCloudResourceExhaustedException, MonoCloudResponse, MonoCloudServerException, MonoCloudUnauthorizedException, ProblemDetails };
|
|
159
410
|
//# sourceMappingURL=index.d.cts.map
|