fusio-sdk 3.0.5 → 3.0.6

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 (77) hide show
  1. package/dist/src/generated/backend/AccountTag.d.ts +3 -0
  2. package/dist/src/generated/backend/AccountTag.js +20 -0
  3. package/dist/src/generated/backend/ActionTag.d.ts +8 -0
  4. package/dist/src/generated/backend/ActionTag.js +57 -0
  5. package/dist/src/generated/backend/AppTag.d.ts +8 -0
  6. package/dist/src/generated/backend/AppTag.js +63 -0
  7. package/dist/src/generated/backend/AuditTag.d.ts +2 -0
  8. package/dist/src/generated/backend/AuditTag.js +15 -0
  9. package/dist/src/generated/backend/CategoryTag.d.ts +5 -0
  10. package/dist/src/generated/backend/CategoryTag.js +42 -0
  11. package/dist/src/generated/backend/ConfigTag.d.ts +3 -0
  12. package/dist/src/generated/backend/ConfigTag.js +26 -0
  13. package/dist/src/generated/backend/ConnectionTag.d.ts +12 -2
  14. package/dist/src/generated/backend/ConnectionTag.js +72 -1
  15. package/dist/src/generated/backend/CronjobTag.d.ts +5 -0
  16. package/dist/src/generated/backend/CronjobTag.js +42 -0
  17. package/dist/src/generated/backend/DashboardTag.d.ts +1 -0
  18. package/dist/src/generated/backend/DashboardTag.js +6 -0
  19. package/dist/src/generated/backend/EventTag.d.ts +10 -0
  20. package/dist/src/generated/backend/EventTag.js +81 -0
  21. package/dist/src/generated/backend/GeneratorTag.d.ts +4 -0
  22. package/dist/src/generated/backend/GeneratorTag.js +21 -0
  23. package/dist/src/generated/backend/LogTag.d.ts +4 -0
  24. package/dist/src/generated/backend/LogTag.js +25 -0
  25. package/dist/src/generated/backend/MarketplaceTag.d.ts +5 -0
  26. package/dist/src/generated/backend/MarketplaceTag.js +40 -0
  27. package/dist/src/generated/backend/MessageException.d.ts +11 -0
  28. package/dist/src/generated/backend/MessageException.js +14 -0
  29. package/dist/src/generated/backend/OperationTag.d.ts +5 -0
  30. package/dist/src/generated/backend/OperationTag.js +42 -0
  31. package/dist/src/generated/backend/PageTag.d.ts +5 -0
  32. package/dist/src/generated/backend/PageTag.js +42 -0
  33. package/dist/src/generated/backend/PlanTag.d.ts +5 -0
  34. package/dist/src/generated/backend/PlanTag.js +42 -0
  35. package/dist/src/generated/backend/RateTag.d.ts +5 -0
  36. package/dist/src/generated/backend/RateTag.js +42 -0
  37. package/dist/src/generated/backend/RoleTag.d.ts +5 -0
  38. package/dist/src/generated/backend/RoleTag.js +42 -0
  39. package/dist/src/generated/backend/SchemaTag.d.ts +7 -0
  40. package/dist/src/generated/backend/SchemaTag.js +58 -0
  41. package/dist/src/generated/backend/ScopeTag.d.ts +6 -0
  42. package/dist/src/generated/backend/ScopeTag.js +47 -0
  43. package/dist/src/generated/backend/SdkTag.d.ts +2 -0
  44. package/dist/src/generated/backend/SdkTag.js +11 -0
  45. package/dist/src/generated/backend/StatisticTag.d.ts +10 -0
  46. package/dist/src/generated/backend/StatisticTag.js +51 -0
  47. package/dist/src/generated/backend/TransactionTag.d.ts +2 -0
  48. package/dist/src/generated/backend/TransactionTag.js +15 -0
  49. package/dist/src/generated/backend/TrashTag.d.ts +3 -0
  50. package/dist/src/generated/backend/TrashTag.js +18 -0
  51. package/dist/src/generated/backend/UserTag.d.ts +5 -0
  52. package/dist/src/generated/backend/UserTag.js +42 -0
  53. package/dist/src/generated/consumer/AccountTag.d.ts +12 -0
  54. package/dist/src/generated/consumer/AccountTag.js +77 -0
  55. package/dist/src/generated/consumer/AppTag.d.ts +5 -0
  56. package/dist/src/generated/consumer/AppTag.js +42 -0
  57. package/dist/src/generated/consumer/EventTag.d.ts +1 -0
  58. package/dist/src/generated/consumer/EventTag.js +6 -0
  59. package/dist/src/generated/consumer/GrantTag.d.ts +2 -0
  60. package/dist/src/generated/consumer/GrantTag.js +15 -0
  61. package/dist/src/generated/consumer/LogTag.d.ts +2 -0
  62. package/dist/src/generated/consumer/LogTag.js +15 -0
  63. package/dist/src/generated/consumer/MessageException.d.ts +11 -0
  64. package/dist/src/generated/consumer/MessageException.js +14 -0
  65. package/dist/src/generated/consumer/PageTag.d.ts +2 -0
  66. package/dist/src/generated/consumer/PageTag.js +15 -0
  67. package/dist/src/generated/consumer/PaymentTag.d.ts +2 -0
  68. package/dist/src/generated/consumer/PaymentTag.js +11 -0
  69. package/dist/src/generated/consumer/PlanTag.d.ts +2 -0
  70. package/dist/src/generated/consumer/PlanTag.js +15 -0
  71. package/dist/src/generated/consumer/ScopeTag.d.ts +1 -0
  72. package/dist/src/generated/consumer/ScopeTag.js +6 -0
  73. package/dist/src/generated/consumer/SubscriptionTag.d.ts +5 -0
  74. package/dist/src/generated/consumer/SubscriptionTag.js +42 -0
  75. package/dist/src/generated/consumer/TransactionTag.d.ts +2 -0
  76. package/dist/src/generated/consumer/TransactionTag.js +15 -0
  77. package/package.json +1 -1
@@ -5,9 +5,11 @@
5
5
  import axios from "axios";
6
6
  import { TagAbstract } from "sdkgen-client";
7
7
  import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
8
+ import { MessageException } from "./MessageException";
8
9
  export class CategoryTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Message>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async delete(categoryId) {
@@ -26,6 +28,14 @@ export class CategoryTag extends TagAbstract {
26
28
  catch (error) {
27
29
  if (axios.isAxiosError(error) && error.response) {
28
30
  switch (error.response.status) {
31
+ case 401:
32
+ throw new MessageException(error.response.data);
33
+ case 404:
34
+ throw new MessageException(error.response.data);
35
+ case 410:
36
+ throw new MessageException(error.response.data);
37
+ case 500:
38
+ throw new MessageException(error.response.data);
29
39
  default:
30
40
  throw new UnknownStatusCodeException('The server returned an unknown status code');
31
41
  }
@@ -35,6 +45,7 @@ export class CategoryTag extends TagAbstract {
35
45
  }
36
46
  /**
37
47
  * @returns {Promise<Message>}
48
+ * @throws {MessageException}
38
49
  * @throws {ClientException}
39
50
  */
40
51
  async update(categoryId, payload) {
@@ -54,6 +65,16 @@ export class CategoryTag extends TagAbstract {
54
65
  catch (error) {
55
66
  if (axios.isAxiosError(error) && error.response) {
56
67
  switch (error.response.status) {
68
+ case 400:
69
+ throw new MessageException(error.response.data);
70
+ case 401:
71
+ throw new MessageException(error.response.data);
72
+ case 404:
73
+ throw new MessageException(error.response.data);
74
+ case 410:
75
+ throw new MessageException(error.response.data);
76
+ case 500:
77
+ throw new MessageException(error.response.data);
57
78
  default:
58
79
  throw new UnknownStatusCodeException('The server returned an unknown status code');
59
80
  }
@@ -63,6 +84,7 @@ export class CategoryTag extends TagAbstract {
63
84
  }
64
85
  /**
65
86
  * @returns {Promise<Category>}
87
+ * @throws {MessageException}
66
88
  * @throws {ClientException}
67
89
  */
68
90
  async get(categoryId) {
@@ -81,6 +103,14 @@ export class CategoryTag extends TagAbstract {
81
103
  catch (error) {
82
104
  if (axios.isAxiosError(error) && error.response) {
83
105
  switch (error.response.status) {
106
+ case 401:
107
+ throw new MessageException(error.response.data);
108
+ case 404:
109
+ throw new MessageException(error.response.data);
110
+ case 410:
111
+ throw new MessageException(error.response.data);
112
+ case 500:
113
+ throw new MessageException(error.response.data);
84
114
  default:
85
115
  throw new UnknownStatusCodeException('The server returned an unknown status code');
86
116
  }
@@ -90,6 +120,7 @@ export class CategoryTag extends TagAbstract {
90
120
  }
91
121
  /**
92
122
  * @returns {Promise<Message>}
123
+ * @throws {MessageException}
93
124
  * @throws {ClientException}
94
125
  */
95
126
  async insert(payload) {
@@ -107,6 +138,12 @@ export class CategoryTag extends TagAbstract {
107
138
  catch (error) {
108
139
  if (axios.isAxiosError(error) && error.response) {
109
140
  switch (error.response.status) {
141
+ case 400:
142
+ throw new MessageException(error.response.data);
143
+ case 401:
144
+ throw new MessageException(error.response.data);
145
+ case 500:
146
+ throw new MessageException(error.response.data);
110
147
  default:
111
148
  throw new UnknownStatusCodeException('The server returned an unknown status code');
112
149
  }
@@ -116,6 +153,7 @@ export class CategoryTag extends TagAbstract {
116
153
  }
117
154
  /**
118
155
  * @returns {Promise<CategoryCollection>}
156
+ * @throws {MessageException}
119
157
  * @throws {ClientException}
120
158
  */
121
159
  async getAll(startIndex, count, search) {
@@ -136,6 +174,10 @@ export class CategoryTag extends TagAbstract {
136
174
  catch (error) {
137
175
  if (axios.isAxiosError(error) && error.response) {
138
176
  switch (error.response.status) {
177
+ case 401:
178
+ throw new MessageException(error.response.data);
179
+ case 500:
180
+ throw new MessageException(error.response.data);
139
181
  default:
140
182
  throw new UnknownStatusCodeException('The server returned an unknown status code');
141
183
  }
@@ -10,16 +10,19 @@ import { Message } from "./Message";
10
10
  export declare class ConfigTag extends TagAbstract {
11
11
  /**
12
12
  * @returns {Promise<Message>}
13
+ * @throws {MessageException}
13
14
  * @throws {ClientException}
14
15
  */
15
16
  update(configId: string, payload: ConfigUpdate): Promise<Message>;
16
17
  /**
17
18
  * @returns {Promise<Config>}
19
+ * @throws {MessageException}
18
20
  * @throws {ClientException}
19
21
  */
20
22
  get(configId: string): Promise<Config>;
21
23
  /**
22
24
  * @returns {Promise<ConfigCollection>}
25
+ * @throws {MessageException}
23
26
  * @throws {ClientException}
24
27
  */
25
28
  getAll(startIndex?: number, count?: number, search?: string): Promise<ConfigCollection>;
@@ -5,9 +5,11 @@
5
5
  import axios from "axios";
6
6
  import { TagAbstract } from "sdkgen-client";
7
7
  import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
8
+ import { MessageException } from "./MessageException";
8
9
  export class ConfigTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Message>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async update(configId, payload) {
@@ -27,6 +29,16 @@ export class ConfigTag extends TagAbstract {
27
29
  catch (error) {
28
30
  if (axios.isAxiosError(error) && error.response) {
29
31
  switch (error.response.status) {
32
+ case 400:
33
+ throw new MessageException(error.response.data);
34
+ case 401:
35
+ throw new MessageException(error.response.data);
36
+ case 404:
37
+ throw new MessageException(error.response.data);
38
+ case 410:
39
+ throw new MessageException(error.response.data);
40
+ case 500:
41
+ throw new MessageException(error.response.data);
30
42
  default:
31
43
  throw new UnknownStatusCodeException('The server returned an unknown status code');
32
44
  }
@@ -36,6 +48,7 @@ export class ConfigTag extends TagAbstract {
36
48
  }
37
49
  /**
38
50
  * @returns {Promise<Config>}
51
+ * @throws {MessageException}
39
52
  * @throws {ClientException}
40
53
  */
41
54
  async get(configId) {
@@ -54,6 +67,14 @@ export class ConfigTag extends TagAbstract {
54
67
  catch (error) {
55
68
  if (axios.isAxiosError(error) && error.response) {
56
69
  switch (error.response.status) {
70
+ case 401:
71
+ throw new MessageException(error.response.data);
72
+ case 404:
73
+ throw new MessageException(error.response.data);
74
+ case 410:
75
+ throw new MessageException(error.response.data);
76
+ case 500:
77
+ throw new MessageException(error.response.data);
57
78
  default:
58
79
  throw new UnknownStatusCodeException('The server returned an unknown status code');
59
80
  }
@@ -63,6 +84,7 @@ export class ConfigTag extends TagAbstract {
63
84
  }
64
85
  /**
65
86
  * @returns {Promise<ConfigCollection>}
87
+ * @throws {MessageException}
66
88
  * @throws {ClientException}
67
89
  */
68
90
  async getAll(startIndex, count, search) {
@@ -83,6 +105,10 @@ export class ConfigTag extends TagAbstract {
83
105
  catch (error) {
84
106
  if (axios.isAxiosError(error) && error.response) {
85
107
  switch (error.response.status) {
108
+ case 401:
109
+ throw new MessageException(error.response.data);
110
+ case 500:
111
+ throw new MessageException(error.response.data);
86
112
  default:
87
113
  throw new UnknownStatusCodeException('The server returned an unknown status code');
88
114
  }
@@ -15,51 +15,61 @@ import { Message } from "./Message";
15
15
  export declare class ConnectionTag extends TagAbstract {
16
16
  /**
17
17
  * @returns {Promise<ConnectionIntrospectionEntity>}
18
+ * @throws {MessageException}
18
19
  * @throws {ClientException}
19
20
  */
20
21
  getIntrospectionForEntity(connectionId: string, entity: string): Promise<ConnectionIntrospectionEntity>;
21
22
  /**
22
23
  * @returns {Promise<ConnectionIntrospectionEntities>}
24
+ * @throws {MessageException}
23
25
  * @throws {ClientException}
24
26
  */
25
27
  getIntrospection(connectionId: string): Promise<ConnectionIntrospectionEntities>;
26
28
  /**
27
29
  * @returns {Promise<Message>}
30
+ * @throws {MessageException}
28
31
  * @throws {ClientException}
29
32
  */
30
33
  getRedirect(connectionId: string): Promise<Message>;
31
34
  /**
32
35
  * @returns {Promise<Message>}
36
+ * @throws {MessageException}
33
37
  * @throws {ClientException}
34
38
  */
35
39
  delete(connectionId: string): Promise<Message>;
36
40
  /**
37
41
  * @returns {Promise<Message>}
42
+ * @throws {MessageException}
38
43
  * @throws {ClientException}
39
44
  */
40
45
  update(connectionId: string, payload: ConnectionUpdate): Promise<Message>;
41
46
  /**
42
47
  * @returns {Promise<Connection>}
48
+ * @throws {MessageException}
43
49
  * @throws {ClientException}
44
50
  */
45
51
  get(connectionId: string): Promise<Connection>;
46
52
  /**
47
53
  * @returns {Promise<FormContainer>}
54
+ * @throws {MessageException}
48
55
  * @throws {ClientException}
49
56
  */
50
57
  getForm(_class?: string): Promise<FormContainer>;
51
58
  /**
52
59
  * @returns {Promise<ConnectionIndex>}
60
+ * @throws {MessageException}
53
61
  * @throws {ClientException}
54
62
  */
55
63
  getClasses(): Promise<ConnectionIndex>;
56
64
  /**
57
- * @returns {Promise<ConnectionCollection>}
65
+ * @returns {Promise<Message>}
66
+ * @throws {MessageException}
58
67
  * @throws {ClientException}
59
68
  */
60
- create(payload: ConnectionCreate): Promise<ConnectionCollection>;
69
+ create(payload: ConnectionCreate): Promise<Message>;
61
70
  /**
62
71
  * @returns {Promise<ConnectionCollection>}
72
+ * @throws {MessageException}
63
73
  * @throws {ClientException}
64
74
  */
65
75
  getAll(startIndex?: number, count?: number, search?: string): Promise<ConnectionCollection>;
@@ -5,9 +5,11 @@
5
5
  import axios from "axios";
6
6
  import { TagAbstract } from "sdkgen-client";
7
7
  import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
8
+ import { MessageException } from "./MessageException";
8
9
  export class ConnectionTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<ConnectionIntrospectionEntity>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async getIntrospectionForEntity(connectionId, entity) {
@@ -27,6 +29,12 @@ export class ConnectionTag extends TagAbstract {
27
29
  catch (error) {
28
30
  if (axios.isAxiosError(error) && error.response) {
29
31
  switch (error.response.status) {
32
+ case 401:
33
+ throw new MessageException(error.response.data);
34
+ case 404:
35
+ throw new MessageException(error.response.data);
36
+ case 500:
37
+ throw new MessageException(error.response.data);
30
38
  default:
31
39
  throw new UnknownStatusCodeException('The server returned an unknown status code');
32
40
  }
@@ -36,6 +44,7 @@ export class ConnectionTag extends TagAbstract {
36
44
  }
37
45
  /**
38
46
  * @returns {Promise<ConnectionIntrospectionEntities>}
47
+ * @throws {MessageException}
39
48
  * @throws {ClientException}
40
49
  */
41
50
  async getIntrospection(connectionId) {
@@ -54,6 +63,12 @@ export class ConnectionTag extends TagAbstract {
54
63
  catch (error) {
55
64
  if (axios.isAxiosError(error) && error.response) {
56
65
  switch (error.response.status) {
66
+ case 401:
67
+ throw new MessageException(error.response.data);
68
+ case 404:
69
+ throw new MessageException(error.response.data);
70
+ case 500:
71
+ throw new MessageException(error.response.data);
57
72
  default:
58
73
  throw new UnknownStatusCodeException('The server returned an unknown status code');
59
74
  }
@@ -63,6 +78,7 @@ export class ConnectionTag extends TagAbstract {
63
78
  }
64
79
  /**
65
80
  * @returns {Promise<Message>}
81
+ * @throws {MessageException}
66
82
  * @throws {ClientException}
67
83
  */
68
84
  async getRedirect(connectionId) {
@@ -81,6 +97,10 @@ export class ConnectionTag extends TagAbstract {
81
97
  catch (error) {
82
98
  if (axios.isAxiosError(error) && error.response) {
83
99
  switch (error.response.status) {
100
+ case 401:
101
+ throw new MessageException(error.response.data);
102
+ case 500:
103
+ throw new MessageException(error.response.data);
84
104
  default:
85
105
  throw new UnknownStatusCodeException('The server returned an unknown status code');
86
106
  }
@@ -90,6 +110,7 @@ export class ConnectionTag extends TagAbstract {
90
110
  }
91
111
  /**
92
112
  * @returns {Promise<Message>}
113
+ * @throws {MessageException}
93
114
  * @throws {ClientException}
94
115
  */
95
116
  async delete(connectionId) {
@@ -108,6 +129,14 @@ export class ConnectionTag extends TagAbstract {
108
129
  catch (error) {
109
130
  if (axios.isAxiosError(error) && error.response) {
110
131
  switch (error.response.status) {
132
+ case 401:
133
+ throw new MessageException(error.response.data);
134
+ case 404:
135
+ throw new MessageException(error.response.data);
136
+ case 410:
137
+ throw new MessageException(error.response.data);
138
+ case 500:
139
+ throw new MessageException(error.response.data);
111
140
  default:
112
141
  throw new UnknownStatusCodeException('The server returned an unknown status code');
113
142
  }
@@ -117,6 +146,7 @@ export class ConnectionTag extends TagAbstract {
117
146
  }
118
147
  /**
119
148
  * @returns {Promise<Message>}
149
+ * @throws {MessageException}
120
150
  * @throws {ClientException}
121
151
  */
122
152
  async update(connectionId, payload) {
@@ -136,6 +166,16 @@ export class ConnectionTag extends TagAbstract {
136
166
  catch (error) {
137
167
  if (axios.isAxiosError(error) && error.response) {
138
168
  switch (error.response.status) {
169
+ case 400:
170
+ throw new MessageException(error.response.data);
171
+ case 401:
172
+ throw new MessageException(error.response.data);
173
+ case 404:
174
+ throw new MessageException(error.response.data);
175
+ case 410:
176
+ throw new MessageException(error.response.data);
177
+ case 500:
178
+ throw new MessageException(error.response.data);
139
179
  default:
140
180
  throw new UnknownStatusCodeException('The server returned an unknown status code');
141
181
  }
@@ -145,6 +185,7 @@ export class ConnectionTag extends TagAbstract {
145
185
  }
146
186
  /**
147
187
  * @returns {Promise<Connection>}
188
+ * @throws {MessageException}
148
189
  * @throws {ClientException}
149
190
  */
150
191
  async get(connectionId) {
@@ -163,6 +204,14 @@ export class ConnectionTag extends TagAbstract {
163
204
  catch (error) {
164
205
  if (axios.isAxiosError(error) && error.response) {
165
206
  switch (error.response.status) {
207
+ case 404:
208
+ throw new MessageException(error.response.data);
209
+ case 401:
210
+ throw new MessageException(error.response.data);
211
+ case 410:
212
+ throw new MessageException(error.response.data);
213
+ case 500:
214
+ throw new MessageException(error.response.data);
166
215
  default:
167
216
  throw new UnknownStatusCodeException('The server returned an unknown status code');
168
217
  }
@@ -172,6 +221,7 @@ export class ConnectionTag extends TagAbstract {
172
221
  }
173
222
  /**
174
223
  * @returns {Promise<FormContainer>}
224
+ * @throws {MessageException}
175
225
  * @throws {ClientException}
176
226
  */
177
227
  async getForm(_class) {
@@ -190,6 +240,10 @@ export class ConnectionTag extends TagAbstract {
190
240
  catch (error) {
191
241
  if (axios.isAxiosError(error) && error.response) {
192
242
  switch (error.response.status) {
243
+ case 401:
244
+ throw new MessageException(error.response.data);
245
+ case 500:
246
+ throw new MessageException(error.response.data);
193
247
  default:
194
248
  throw new UnknownStatusCodeException('The server returned an unknown status code');
195
249
  }
@@ -199,6 +253,7 @@ export class ConnectionTag extends TagAbstract {
199
253
  }
200
254
  /**
201
255
  * @returns {Promise<ConnectionIndex>}
256
+ * @throws {MessageException}
202
257
  * @throws {ClientException}
203
258
  */
204
259
  async getClasses() {
@@ -215,6 +270,10 @@ export class ConnectionTag extends TagAbstract {
215
270
  catch (error) {
216
271
  if (axios.isAxiosError(error) && error.response) {
217
272
  switch (error.response.status) {
273
+ case 401:
274
+ throw new MessageException(error.response.data);
275
+ case 500:
276
+ throw new MessageException(error.response.data);
218
277
  default:
219
278
  throw new UnknownStatusCodeException('The server returned an unknown status code');
220
279
  }
@@ -223,7 +282,8 @@ export class ConnectionTag extends TagAbstract {
223
282
  }
224
283
  }
225
284
  /**
226
- * @returns {Promise<ConnectionCollection>}
285
+ * @returns {Promise<Message>}
286
+ * @throws {MessageException}
227
287
  * @throws {ClientException}
228
288
  */
229
289
  async create(payload) {
@@ -241,6 +301,12 @@ export class ConnectionTag extends TagAbstract {
241
301
  catch (error) {
242
302
  if (axios.isAxiosError(error) && error.response) {
243
303
  switch (error.response.status) {
304
+ case 400:
305
+ throw new MessageException(error.response.data);
306
+ case 401:
307
+ throw new MessageException(error.response.data);
308
+ case 500:
309
+ throw new MessageException(error.response.data);
244
310
  default:
245
311
  throw new UnknownStatusCodeException('The server returned an unknown status code');
246
312
  }
@@ -250,6 +316,7 @@ export class ConnectionTag extends TagAbstract {
250
316
  }
251
317
  /**
252
318
  * @returns {Promise<ConnectionCollection>}
319
+ * @throws {MessageException}
253
320
  * @throws {ClientException}
254
321
  */
255
322
  async getAll(startIndex, count, search) {
@@ -270,6 +337,10 @@ export class ConnectionTag extends TagAbstract {
270
337
  catch (error) {
271
338
  if (axios.isAxiosError(error) && error.response) {
272
339
  switch (error.response.status) {
340
+ case 401:
341
+ throw new MessageException(error.response.data);
342
+ case 500:
343
+ throw new MessageException(error.response.data);
273
344
  default:
274
345
  throw new UnknownStatusCodeException('The server returned an unknown status code');
275
346
  }
@@ -11,26 +11,31 @@ import { Message } from "./Message";
11
11
  export declare class CronjobTag extends TagAbstract {
12
12
  /**
13
13
  * @returns {Promise<Message>}
14
+ * @throws {MessageException}
14
15
  * @throws {ClientException}
15
16
  */
16
17
  delete(cronjobId: string): Promise<Message>;
17
18
  /**
18
19
  * @returns {Promise<Message>}
20
+ * @throws {MessageException}
19
21
  * @throws {ClientException}
20
22
  */
21
23
  update(cronjobId: string, payload: CronjobUpdate): Promise<Message>;
22
24
  /**
23
25
  * @returns {Promise<Cronjob>}
26
+ * @throws {MessageException}
24
27
  * @throws {ClientException}
25
28
  */
26
29
  get(cronjobId: string): Promise<Cronjob>;
27
30
  /**
28
31
  * @returns {Promise<Message>}
32
+ * @throws {MessageException}
29
33
  * @throws {ClientException}
30
34
  */
31
35
  create(payload: CronjobCreate): Promise<Message>;
32
36
  /**
33
37
  * @returns {Promise<CronjobCollection>}
38
+ * @throws {MessageException}
34
39
  * @throws {ClientException}
35
40
  */
36
41
  getAll(startIndex?: number, count?: number, search?: string): Promise<CronjobCollection>;
@@ -5,9 +5,11 @@
5
5
  import axios from "axios";
6
6
  import { TagAbstract } from "sdkgen-client";
7
7
  import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
8
+ import { MessageException } from "./MessageException";
8
9
  export class CronjobTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Message>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async delete(cronjobId) {
@@ -26,6 +28,14 @@ export class CronjobTag extends TagAbstract {
26
28
  catch (error) {
27
29
  if (axios.isAxiosError(error) && error.response) {
28
30
  switch (error.response.status) {
31
+ case 401:
32
+ throw new MessageException(error.response.data);
33
+ case 404:
34
+ throw new MessageException(error.response.data);
35
+ case 410:
36
+ throw new MessageException(error.response.data);
37
+ case 500:
38
+ throw new MessageException(error.response.data);
29
39
  default:
30
40
  throw new UnknownStatusCodeException('The server returned an unknown status code');
31
41
  }
@@ -35,6 +45,7 @@ export class CronjobTag extends TagAbstract {
35
45
  }
36
46
  /**
37
47
  * @returns {Promise<Message>}
48
+ * @throws {MessageException}
38
49
  * @throws {ClientException}
39
50
  */
40
51
  async update(cronjobId, payload) {
@@ -54,6 +65,16 @@ export class CronjobTag extends TagAbstract {
54
65
  catch (error) {
55
66
  if (axios.isAxiosError(error) && error.response) {
56
67
  switch (error.response.status) {
68
+ case 400:
69
+ throw new MessageException(error.response.data);
70
+ case 401:
71
+ throw new MessageException(error.response.data);
72
+ case 404:
73
+ throw new MessageException(error.response.data);
74
+ case 410:
75
+ throw new MessageException(error.response.data);
76
+ case 500:
77
+ throw new MessageException(error.response.data);
57
78
  default:
58
79
  throw new UnknownStatusCodeException('The server returned an unknown status code');
59
80
  }
@@ -63,6 +84,7 @@ export class CronjobTag extends TagAbstract {
63
84
  }
64
85
  /**
65
86
  * @returns {Promise<Cronjob>}
87
+ * @throws {MessageException}
66
88
  * @throws {ClientException}
67
89
  */
68
90
  async get(cronjobId) {
@@ -81,6 +103,14 @@ export class CronjobTag extends TagAbstract {
81
103
  catch (error) {
82
104
  if (axios.isAxiosError(error) && error.response) {
83
105
  switch (error.response.status) {
106
+ case 401:
107
+ throw new MessageException(error.response.data);
108
+ case 404:
109
+ throw new MessageException(error.response.data);
110
+ case 410:
111
+ throw new MessageException(error.response.data);
112
+ case 500:
113
+ throw new MessageException(error.response.data);
84
114
  default:
85
115
  throw new UnknownStatusCodeException('The server returned an unknown status code');
86
116
  }
@@ -90,6 +120,7 @@ export class CronjobTag extends TagAbstract {
90
120
  }
91
121
  /**
92
122
  * @returns {Promise<Message>}
123
+ * @throws {MessageException}
93
124
  * @throws {ClientException}
94
125
  */
95
126
  async create(payload) {
@@ -107,6 +138,12 @@ export class CronjobTag extends TagAbstract {
107
138
  catch (error) {
108
139
  if (axios.isAxiosError(error) && error.response) {
109
140
  switch (error.response.status) {
141
+ case 400:
142
+ throw new MessageException(error.response.data);
143
+ case 401:
144
+ throw new MessageException(error.response.data);
145
+ case 500:
146
+ throw new MessageException(error.response.data);
110
147
  default:
111
148
  throw new UnknownStatusCodeException('The server returned an unknown status code');
112
149
  }
@@ -116,6 +153,7 @@ export class CronjobTag extends TagAbstract {
116
153
  }
117
154
  /**
118
155
  * @returns {Promise<CronjobCollection>}
156
+ * @throws {MessageException}
119
157
  * @throws {ClientException}
120
158
  */
121
159
  async getAll(startIndex, count, search) {
@@ -136,6 +174,10 @@ export class CronjobTag extends TagAbstract {
136
174
  catch (error) {
137
175
  if (axios.isAxiosError(error) && error.response) {
138
176
  switch (error.response.status) {
177
+ case 401:
178
+ throw new MessageException(error.response.data);
179
+ case 500:
180
+ throw new MessageException(error.response.data);
139
181
  default:
140
182
  throw new UnknownStatusCodeException('The server returned an unknown status code');
141
183
  }
@@ -7,6 +7,7 @@ import { Dashboard } from "./Dashboard";
7
7
  export declare class DashboardTag extends TagAbstract {
8
8
  /**
9
9
  * @returns {Promise<Dashboard>}
10
+ * @throws {MessageException}
10
11
  * @throws {ClientException}
11
12
  */
12
13
  getAll(): Promise<Dashboard>;
@@ -5,9 +5,11 @@
5
5
  import axios from "axios";
6
6
  import { TagAbstract } from "sdkgen-client";
7
7
  import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
8
+ import { MessageException } from "./MessageException";
8
9
  export class DashboardTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Dashboard>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async getAll() {
@@ -24,6 +26,10 @@ export class DashboardTag extends TagAbstract {
24
26
  catch (error) {
25
27
  if (axios.isAxiosError(error) && error.response) {
26
28
  switch (error.response.status) {
29
+ case 401:
30
+ throw new MessageException(error.response.data);
31
+ case 500:
32
+ throw new MessageException(error.response.data);
27
33
  default:
28
34
  throw new UnknownStatusCodeException('The server returned an unknown status code');
29
35
  }