fusio-sdk 3.0.5 → 3.0.7

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 +9 -1
  4. package/dist/src/generated/backend/ActionTag.js +58 -2
  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 +11 -1
  20. package/dist/src/generated/backend/EventTag.js +82 -2
  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 +6 -1
  30. package/dist/src/generated/backend/OperationTag.js +43 -2
  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 +8 -1
  40. package/dist/src/generated/backend/SchemaTag.js +59 -2
  41. package/dist/src/generated/backend/ScopeTag.d.ts +7 -1
  42. package/dist/src/generated/backend/ScopeTag.js +48 -2
  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 PaymentTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<PaymentCheckoutResponse>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async checkout(provider, payload) {
@@ -27,6 +29,10 @@ export class PaymentTag 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 500:
35
+ throw new MessageException(error.response.data);
30
36
  default:
31
37
  throw new UnknownStatusCodeException('The server returned an unknown status code');
32
38
  }
@@ -36,6 +42,7 @@ export class PaymentTag extends TagAbstract {
36
42
  }
37
43
  /**
38
44
  * @returns {Promise<PaymentPortalResponse>}
45
+ * @throws {MessageException}
39
46
  * @throws {ClientException}
40
47
  */
41
48
  async portal(provider, payload) {
@@ -55,6 +62,10 @@ export class PaymentTag extends TagAbstract {
55
62
  catch (error) {
56
63
  if (axios.isAxiosError(error) && error.response) {
57
64
  switch (error.response.status) {
65
+ case 401:
66
+ throw new MessageException(error.response.data);
67
+ case 500:
68
+ throw new MessageException(error.response.data);
58
69
  default:
59
70
  throw new UnknownStatusCodeException('The server returned an unknown status code');
60
71
  }
@@ -8,11 +8,13 @@ import { PlanCollection } from "./PlanCollection";
8
8
  export declare class PlanTag extends TagAbstract {
9
9
  /**
10
10
  * @returns {Promise<Plan>}
11
+ * @throws {MessageException}
11
12
  * @throws {ClientException}
12
13
  */
13
14
  get(planId: string): Promise<Plan>;
14
15
  /**
15
16
  * @returns {Promise<PlanCollection>}
17
+ * @throws {MessageException}
16
18
  * @throws {ClientException}
17
19
  */
18
20
  getAll(startIndex?: number, count?: number, search?: string): Promise<PlanCollection>;
@@ -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 PlanTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Plan>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async get(planId) {
@@ -26,6 +28,14 @@ export class PlanTag 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 PlanTag extends TagAbstract {
35
45
  }
36
46
  /**
37
47
  * @returns {Promise<PlanCollection>}
48
+ * @throws {MessageException}
38
49
  * @throws {ClientException}
39
50
  */
40
51
  async getAll(startIndex, count, search) {
@@ -55,6 +66,10 @@ export class PlanTag extends TagAbstract {
55
66
  catch (error) {
56
67
  if (axios.isAxiosError(error) && error.response) {
57
68
  switch (error.response.status) {
69
+ case 401:
70
+ throw new MessageException(error.response.data);
71
+ case 500:
72
+ throw new MessageException(error.response.data);
58
73
  default:
59
74
  throw new UnknownStatusCodeException('The server returned an unknown status code');
60
75
  }
@@ -7,6 +7,7 @@ import { ScopeCollection } from "./ScopeCollection";
7
7
  export declare class ScopeTag extends TagAbstract {
8
8
  /**
9
9
  * @returns {Promise<ScopeCollection>}
10
+ * @throws {MessageException}
10
11
  * @throws {ClientException}
11
12
  */
12
13
  getAll(startIndex?: number, count?: number, search?: string): Promise<ScopeCollection>;
@@ -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 ScopeTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<ScopeCollection>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async getAll(startIndex, count, search) {
@@ -28,6 +30,10 @@ export class ScopeTag extends TagAbstract {
28
30
  catch (error) {
29
31
  if (axios.isAxiosError(error) && error.response) {
30
32
  switch (error.response.status) {
33
+ case 401:
34
+ throw new MessageException(error.response.data);
35
+ case 500:
36
+ throw new MessageException(error.response.data);
31
37
  default:
32
38
  throw new UnknownStatusCodeException('The server returned an unknown status code');
33
39
  }
@@ -11,26 +11,31 @@ import { Message } from "./Message";
11
11
  export declare class SubscriptionTag extends TagAbstract {
12
12
  /**
13
13
  * @returns {Promise<Message>}
14
+ * @throws {MessageException}
14
15
  * @throws {ClientException}
15
16
  */
16
17
  delete(subscriptionId: string): Promise<Message>;
17
18
  /**
18
19
  * @returns {Promise<Message>}
20
+ * @throws {MessageException}
19
21
  * @throws {ClientException}
20
22
  */
21
23
  update(subscriptionId: string, payload: EventSubscriptionUpdate): Promise<Message>;
22
24
  /**
23
25
  * @returns {Promise<EventSubscription>}
26
+ * @throws {MessageException}
24
27
  * @throws {ClientException}
25
28
  */
26
29
  get(subscriptionId: string): Promise<EventSubscription>;
27
30
  /**
28
31
  * @returns {Promise<Message>}
32
+ * @throws {MessageException}
29
33
  * @throws {ClientException}
30
34
  */
31
35
  create(payload: EventSubscriptionCreate): Promise<Message>;
32
36
  /**
33
37
  * @returns {Promise<EventSubscriptionCollection>}
38
+ * @throws {MessageException}
34
39
  * @throws {ClientException}
35
40
  */
36
41
  getAll(startIndex?: number, count?: number, search?: string): Promise<EventSubscriptionCollection>;
@@ -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 SubscriptionTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Message>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async delete(subscriptionId) {
@@ -26,6 +28,14 @@ export class SubscriptionTag 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 SubscriptionTag extends TagAbstract {
35
45
  }
36
46
  /**
37
47
  * @returns {Promise<Message>}
48
+ * @throws {MessageException}
38
49
  * @throws {ClientException}
39
50
  */
40
51
  async update(subscriptionId, payload) {
@@ -54,6 +65,16 @@ export class SubscriptionTag 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 SubscriptionTag extends TagAbstract {
63
84
  }
64
85
  /**
65
86
  * @returns {Promise<EventSubscription>}
87
+ * @throws {MessageException}
66
88
  * @throws {ClientException}
67
89
  */
68
90
  async get(subscriptionId) {
@@ -81,6 +103,14 @@ export class SubscriptionTag 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 SubscriptionTag 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 SubscriptionTag 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 SubscriptionTag extends TagAbstract {
116
153
  }
117
154
  /**
118
155
  * @returns {Promise<EventSubscriptionCollection>}
156
+ * @throws {MessageException}
119
157
  * @throws {ClientException}
120
158
  */
121
159
  async getAll(startIndex, count, search) {
@@ -136,6 +174,10 @@ export class SubscriptionTag 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
  }
@@ -8,11 +8,13 @@ import { TransactionCollection } from "./TransactionCollection";
8
8
  export declare class TransactionTag extends TagAbstract {
9
9
  /**
10
10
  * @returns {Promise<Transaction>}
11
+ * @throws {MessageException}
11
12
  * @throws {ClientException}
12
13
  */
13
14
  get(transactionId: string): Promise<Transaction>;
14
15
  /**
15
16
  * @returns {Promise<TransactionCollection>}
17
+ * @throws {MessageException}
16
18
  * @throws {ClientException}
17
19
  */
18
20
  getAll(startIndex?: number, count?: number, search?: string): Promise<TransactionCollection>;
@@ -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 TransactionTag extends TagAbstract {
9
10
  /**
10
11
  * @returns {Promise<Transaction>}
12
+ * @throws {MessageException}
11
13
  * @throws {ClientException}
12
14
  */
13
15
  async get(transactionId) {
@@ -26,6 +28,14 @@ export class TransactionTag 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 TransactionTag extends TagAbstract {
35
45
  }
36
46
  /**
37
47
  * @returns {Promise<TransactionCollection>}
48
+ * @throws {MessageException}
38
49
  * @throws {ClientException}
39
50
  */
40
51
  async getAll(startIndex, count, search) {
@@ -55,6 +66,10 @@ export class TransactionTag extends TagAbstract {
55
66
  catch (error) {
56
67
  if (axios.isAxiosError(error) && error.response) {
57
68
  switch (error.response.status) {
69
+ case 401:
70
+ throw new MessageException(error.response.data);
71
+ case 500:
72
+ throw new MessageException(error.response.data);
58
73
  default:
59
74
  throw new UnknownStatusCodeException('The server returned an unknown status code');
60
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fusio-sdk",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "SDK to talk to the Fusio API",
5
5
  "keywords": [
6
6
  "API",