@smartbooks-ai/api-client 0.0.5 → 0.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 (161) hide show
  1. package/package.json +15 -16
  2. package/src/.openapi-generator/FILES +0 -56
  3. package/src/.openapi-generator/VERSION +0 -1
  4. package/src/.openapi-generator-ignore +0 -23
  5. package/src/dist/esm/index.d.ts +0 -1
  6. package/src/dist/esm/index.js +0 -1
  7. package/src/dist/esm/src/apis/AiApi.d.ts +0 -289
  8. package/src/dist/esm/src/apis/AiApi.js +0 -452
  9. package/src/dist/esm/src/apis/AnalyticsApi.d.ts +0 -242
  10. package/src/dist/esm/src/apis/AnalyticsApi.js +0 -391
  11. package/src/dist/esm/src/apis/AsyncOperationsApi.d.ts +0 -48
  12. package/src/dist/esm/src/apis/AsyncOperationsApi.js +0 -53
  13. package/src/dist/esm/src/apis/BusinessModelModulesApi.d.ts +0 -182
  14. package/src/dist/esm/src/apis/BusinessModelModulesApi.js +0 -285
  15. package/src/dist/esm/src/apis/ColorPalettesApi.d.ts +0 -62
  16. package/src/dist/esm/src/apis/ColorPalettesApi.js +0 -78
  17. package/src/dist/esm/src/apis/CommentsApi.d.ts +0 -94
  18. package/src/dist/esm/src/apis/CommentsApi.js +0 -134
  19. package/src/dist/esm/src/apis/CompaniesApi.d.ts +0 -88
  20. package/src/dist/esm/src/apis/CompaniesApi.js +0 -118
  21. package/src/dist/esm/src/apis/CompanyManagementApi.d.ts +0 -90
  22. package/src/dist/esm/src/apis/CompanyManagementApi.js +0 -123
  23. package/src/dist/esm/src/apis/ConnectionParametersApi.d.ts +0 -98
  24. package/src/dist/esm/src/apis/ConnectionParametersApi.js +0 -151
  25. package/src/dist/esm/src/apis/ConnectionTypesApi.d.ts +0 -90
  26. package/src/dist/esm/src/apis/ConnectionTypesApi.js +0 -124
  27. package/src/dist/esm/src/apis/ConnectionsApi.d.ts +0 -156
  28. package/src/dist/esm/src/apis/ConnectionsApi.js +0 -236
  29. package/src/dist/esm/src/apis/ConnectionsAuthorizationApi.d.ts +0 -74
  30. package/src/dist/esm/src/apis/ConnectionsAuthorizationApi.js +0 -108
  31. package/src/dist/esm/src/apis/ConnectionsClientCredentialsApi.d.ts +0 -72
  32. package/src/dist/esm/src/apis/ConnectionsClientCredentialsApi.js +0 -100
  33. package/src/dist/esm/src/apis/ConsolidationApi.d.ts +0 -192
  34. package/src/dist/esm/src/apis/ConsolidationApi.js +0 -297
  35. package/src/dist/esm/src/apis/CostCenterApi.d.ts +0 -130
  36. package/src/dist/esm/src/apis/CostCenterApi.js +0 -188
  37. package/src/dist/esm/src/apis/DashboardsApi.d.ts +0 -306
  38. package/src/dist/esm/src/apis/DashboardsApi.js +0 -515
  39. package/src/dist/esm/src/apis/DataSynchronizationApi.d.ts +0 -92
  40. package/src/dist/esm/src/apis/DataSynchronizationApi.js +0 -127
  41. package/src/dist/esm/src/apis/ExplanationApi.d.ts +0 -110
  42. package/src/dist/esm/src/apis/ExplanationApi.js +0 -227
  43. package/src/dist/esm/src/apis/FormatsApi.d.ts +0 -46
  44. package/src/dist/esm/src/apis/FormatsApi.js +0 -48
  45. package/src/dist/esm/src/apis/FormulasApi.d.ts +0 -62
  46. package/src/dist/esm/src/apis/FormulasApi.js +0 -81
  47. package/src/dist/esm/src/apis/FuturesApi.d.ts +0 -136
  48. package/src/dist/esm/src/apis/FuturesApi.js +0 -204
  49. package/src/dist/esm/src/apis/IdentityLinkingApi.d.ts +0 -46
  50. package/src/dist/esm/src/apis/IdentityLinkingApi.js +0 -49
  51. package/src/dist/esm/src/apis/InputApi.d.ts +0 -55
  52. package/src/dist/esm/src/apis/InputApi.js +0 -57
  53. package/src/dist/esm/src/apis/IntercompanyMatchingApi.d.ts +0 -174
  54. package/src/dist/esm/src/apis/IntercompanyMatchingApi.js +0 -260
  55. package/src/dist/esm/src/apis/InvitationsApi.d.ts +0 -156
  56. package/src/dist/esm/src/apis/InvitationsApi.js +0 -235
  57. package/src/dist/esm/src/apis/MaintenanceApi.d.ts +0 -182
  58. package/src/dist/esm/src/apis/MaintenanceApi.js +0 -278
  59. package/src/dist/esm/src/apis/ManualInputApi.d.ts +0 -204
  60. package/src/dist/esm/src/apis/ManualInputApi.js +0 -328
  61. package/src/dist/esm/src/apis/ModulesApi.d.ts +0 -88
  62. package/src/dist/esm/src/apis/ModulesApi.js +0 -112
  63. package/src/dist/esm/src/apis/NodePurposesApi.d.ts +0 -68
  64. package/src/dist/esm/src/apis/NodePurposesApi.js +0 -86
  65. package/src/dist/esm/src/apis/ProfileApi.d.ts +0 -85
  66. package/src/dist/esm/src/apis/ProfileApi.js +0 -114
  67. package/src/dist/esm/src/apis/RelationsApi.d.ts +0 -46
  68. package/src/dist/esm/src/apis/RelationsApi.js +0 -48
  69. package/src/dist/esm/src/apis/ReportGroupsApi.d.ts +0 -72
  70. package/src/dist/esm/src/apis/ReportGroupsApi.js +0 -92
  71. package/src/dist/esm/src/apis/ReportingApi.d.ts +0 -267
  72. package/src/dist/esm/src/apis/ReportingApi.js +0 -379
  73. package/src/dist/esm/src/apis/ReportingPeriodsApi.d.ts +0 -46
  74. package/src/dist/esm/src/apis/ReportingPeriodsApi.js +0 -48
  75. package/src/dist/esm/src/apis/SourceAccountsApi.d.ts +0 -46
  76. package/src/dist/esm/src/apis/SourceAccountsApi.js +0 -48
  77. package/src/dist/esm/src/apis/StructureApi.d.ts +0 -134
  78. package/src/dist/esm/src/apis/StructureApi.js +0 -163
  79. package/src/dist/esm/src/apis/StructureDefinitionApi.d.ts +0 -164
  80. package/src/dist/esm/src/apis/StructureDefinitionApi.js +0 -259
  81. package/src/dist/esm/src/apis/StructureImprovementApi.d.ts +0 -70
  82. package/src/dist/esm/src/apis/StructureImprovementApi.js +0 -91
  83. package/src/dist/esm/src/apis/TemplatesApi.d.ts +0 -120
  84. package/src/dist/esm/src/apis/TemplatesApi.js +0 -178
  85. package/src/dist/esm/src/apis/TemplatesGenerationApi.d.ts +0 -66
  86. package/src/dist/esm/src/apis/TemplatesGenerationApi.js +0 -85
  87. package/src/dist/esm/src/apis/TenantIntercompanySettingsApi.d.ts +0 -90
  88. package/src/dist/esm/src/apis/TenantIntercompanySettingsApi.js +0 -123
  89. package/src/dist/esm/src/apis/TenantsApi.d.ts +0 -124
  90. package/src/dist/esm/src/apis/TenantsApi.js +0 -180
  91. package/src/dist/esm/src/apis/TransactionDetailsApi.d.ts +0 -50
  92. package/src/dist/esm/src/apis/TransactionDetailsApi.js +0 -57
  93. package/src/dist/esm/src/apis/UsersApi.d.ts +0 -114
  94. package/src/dist/esm/src/apis/UsersApi.js +0 -165
  95. package/src/dist/esm/src/apis/WebhooksApi.d.ts +0 -68
  96. package/src/dist/esm/src/apis/WebhooksApi.js +0 -86
  97. package/src/dist/esm/src/apis/WizardApi.d.ts +0 -74
  98. package/src/dist/esm/src/apis/WizardApi.js +0 -101
  99. package/src/dist/esm/src/apis/index.d.ts +0 -46
  100. package/src/dist/esm/src/apis/index.js +0 -48
  101. package/src/dist/esm/src/index.d.ts +0 -3
  102. package/src/dist/esm/src/index.js +0 -5
  103. package/src/dist/esm/src/models/index.d.ts +0 -15406
  104. package/src/dist/esm/src/models/index.js +0 -1279
  105. package/src/dist/esm/src/runtime.d.ts +0 -181
  106. package/src/dist/esm/src/runtime.js +0 -326
  107. package/src/index.ts +0 -1
  108. package/src/package.json +0 -24
  109. package/src/src/apis/AiApi.ts +0 -1043
  110. package/src/src/apis/AnalyticsApi.ts +0 -925
  111. package/src/src/apis/AsyncOperationsApi.ts +0 -112
  112. package/src/src/apis/BusinessModelModulesApi.ts +0 -649
  113. package/src/src/apis/ColorPalettesApi.ts +0 -148
  114. package/src/src/apis/CommentsApi.ts +0 -308
  115. package/src/src/apis/CompaniesApi.ts +0 -260
  116. package/src/src/apis/CompanyManagementApi.ts +0 -270
  117. package/src/src/apis/ConnectionParametersApi.ts +0 -339
  118. package/src/src/apis/ConnectionTypesApi.ts +0 -280
  119. package/src/src/apis/ConnectionsApi.ts +0 -533
  120. package/src/src/apis/ConnectionsAuthorizationApi.ts +0 -241
  121. package/src/src/apis/ConnectionsClientCredentialsApi.ts +0 -224
  122. package/src/src/apis/ConsolidationApi.ts +0 -682
  123. package/src/src/apis/CostCenterApi.ts +0 -428
  124. package/src/src/apis/DashboardsApi.ts +0 -1179
  125. package/src/src/apis/DataSynchronizationApi.ts +0 -288
  126. package/src/src/apis/ExplanationApi.ts +0 -504
  127. package/src/src/apis/FormatsApi.ts +0 -96
  128. package/src/src/apis/FormulasApi.ts +0 -154
  129. package/src/src/apis/FuturesApi.ts +0 -463
  130. package/src/src/apis/IdentityLinkingApi.ts +0 -101
  131. package/src/src/apis/InputApi.ts +0 -126
  132. package/src/src/apis/IntercompanyMatchingApi.ts +0 -588
  133. package/src/src/apis/InvitationsApi.ts +0 -523
  134. package/src/src/apis/MaintenanceApi.ts +0 -597
  135. package/src/src/apis/ManualInputApi.ts +0 -771
  136. package/src/src/apis/ModulesApi.ts +0 -246
  137. package/src/src/apis/NodePurposesApi.ts +0 -184
  138. package/src/src/apis/ProfileApi.ts +0 -203
  139. package/src/src/apis/RelationsApi.ts +0 -99
  140. package/src/src/apis/ReportGroupsApi.ts +0 -205
  141. package/src/src/apis/ReportingApi.ts +0 -851
  142. package/src/src/apis/ReportingPeriodsApi.ts +0 -99
  143. package/src/src/apis/SourceAccountsApi.ts +0 -102
  144. package/src/src/apis/StructureApi.ts +0 -334
  145. package/src/src/apis/StructureDefinitionApi.ts +0 -601
  146. package/src/src/apis/StructureImprovementApi.ts +0 -214
  147. package/src/src/apis/TemplatesApi.ts +0 -334
  148. package/src/src/apis/TemplatesGenerationApi.ts +0 -187
  149. package/src/src/apis/TenantIntercompanySettingsApi.ts +0 -286
  150. package/src/src/apis/TenantsApi.ts +0 -374
  151. package/src/src/apis/TransactionDetailsApi.ts +0 -127
  152. package/src/src/apis/UsersApi.ts +0 -356
  153. package/src/src/apis/WebhooksApi.ts +0 -193
  154. package/src/src/apis/WizardApi.ts +0 -230
  155. package/src/src/apis/index.ts +0 -48
  156. package/src/src/index.ts +0 -5
  157. package/src/src/models/index.ts +0 -15625
  158. package/src/src/runtime.ts +0 -469
  159. package/src/tsconfig.esm.json +0 -7
  160. package/src/tsconfig.json +0 -11
  161. package/tsconfig.json +0 -11
@@ -1,246 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Smartbooks Restful API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 0.0.1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import type { ModuleInfoResponse, ModuleSubaccountsTableAccount } from '../models/index';
15
- import * as runtime from '../runtime';
16
-
17
- export interface ModulesApiGetItemPublicRequest {
18
- companyCode: string;
19
- moduleCode: string;
20
- }
21
-
22
- export interface ModulesApiPostAccountRequest {
23
- companyCode: string;
24
- moduleCode: string;
25
- subaccountsTableCode: string;
26
- moduleSubaccountsTableAccount: ModuleSubaccountsTableAccount;
27
- }
28
-
29
- /**
30
- * ModulesApi - interface
31
- *
32
- * @export
33
- * @interface ModulesApiInterface
34
- */
35
- export interface ModulesApiInterface {
36
- /**
37
- * Get a module by code
38
- * @summary Get module
39
- * @param {string} companyCode
40
- * @param {string} moduleCode
41
- * @param {*} [options] Override http request option.
42
- * @throws {RequiredError}
43
- * @memberof ModulesApiInterface
44
- */
45
- getItemPublicRaw(
46
- requestParameters: ModulesApiGetItemPublicRequest,
47
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
48
- ): Promise<runtime.ApiResponse<ModuleInfoResponse>>;
49
-
50
- /**
51
- * Get a module by code
52
- * Get module
53
- */
54
- getItemPublic(
55
- companyCode: string,
56
- moduleCode: string,
57
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
58
- ): Promise<ModuleInfoResponse>;
59
-
60
- /**
61
- * Add an account to a subaccounts table of a module
62
- * @summary Add account
63
- * @param {string} companyCode
64
- * @param {string} moduleCode
65
- * @param {string} subaccountsTableCode
66
- * @param {ModuleSubaccountsTableAccount} moduleSubaccountsTableAccount
67
- * @param {*} [options] Override http request option.
68
- * @throws {RequiredError}
69
- * @memberof ModulesApiInterface
70
- */
71
- postAccountRaw(
72
- requestParameters: ModulesApiPostAccountRequest,
73
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
74
- ): Promise<runtime.ApiResponse<void>>;
75
-
76
- /**
77
- * Add an account to a subaccounts table of a module
78
- * Add account
79
- */
80
- postAccount(
81
- companyCode: string,
82
- moduleCode: string,
83
- subaccountsTableCode: string,
84
- moduleSubaccountsTableAccount: ModuleSubaccountsTableAccount,
85
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
86
- ): Promise<void>;
87
- }
88
-
89
- /**
90
- *
91
- */
92
- export class ModulesApi extends runtime.BaseAPI implements ModulesApiInterface {
93
- /**
94
- * Get a module by code
95
- * Get module
96
- */
97
- async getItemPublicRaw(
98
- requestParameters: ModulesApiGetItemPublicRequest,
99
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
100
- ): Promise<runtime.ApiResponse<ModuleInfoResponse>> {
101
- if (requestParameters['companyCode'] == null) {
102
- throw new runtime.RequiredError(
103
- 'companyCode',
104
- 'Required parameter "companyCode" was null or undefined when calling getItemPublic().',
105
- );
106
- }
107
-
108
- if (requestParameters['moduleCode'] == null) {
109
- throw new runtime.RequiredError(
110
- 'moduleCode',
111
- 'Required parameter "moduleCode" was null or undefined when calling getItemPublic().',
112
- );
113
- }
114
-
115
- const queryParameters: any = {};
116
-
117
- const headerParameters: runtime.HTTPHeaders = {};
118
-
119
- if (this.configuration && this.configuration.accessToken) {
120
- const token = this.configuration.accessToken;
121
- const tokenString = await token('bearerToken', ['modeling:read']);
122
-
123
- if (tokenString) {
124
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
125
- }
126
- }
127
- const response = await this.request(
128
- {
129
- path: `/api/v1/c/{company_code}/modules/{moduleCode}`
130
- .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
131
- .replace(`{${'moduleCode'}}`, encodeURIComponent(String(requestParameters['moduleCode']))),
132
- method: 'GET',
133
- headers: headerParameters,
134
- query: queryParameters,
135
- },
136
- initOverrides,
137
- );
138
-
139
- return new runtime.JSONApiResponse(response);
140
- }
141
-
142
- /**
143
- * Get a module by code
144
- * Get module
145
- */
146
- async getItemPublic(
147
- companyCode: string,
148
- moduleCode: string,
149
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
150
- ): Promise<ModuleInfoResponse> {
151
- const response = await this.getItemPublicRaw({ companyCode: companyCode, moduleCode: moduleCode }, initOverrides);
152
- return await response.value();
153
- }
154
-
155
- /**
156
- * Add an account to a subaccounts table of a module
157
- * Add account
158
- */
159
- async postAccountRaw(
160
- requestParameters: ModulesApiPostAccountRequest,
161
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
162
- ): Promise<runtime.ApiResponse<void>> {
163
- if (requestParameters['companyCode'] == null) {
164
- throw new runtime.RequiredError(
165
- 'companyCode',
166
- 'Required parameter "companyCode" was null or undefined when calling postAccount().',
167
- );
168
- }
169
-
170
- if (requestParameters['moduleCode'] == null) {
171
- throw new runtime.RequiredError(
172
- 'moduleCode',
173
- 'Required parameter "moduleCode" was null or undefined when calling postAccount().',
174
- );
175
- }
176
-
177
- if (requestParameters['subaccountsTableCode'] == null) {
178
- throw new runtime.RequiredError(
179
- 'subaccountsTableCode',
180
- 'Required parameter "subaccountsTableCode" was null or undefined when calling postAccount().',
181
- );
182
- }
183
-
184
- if (requestParameters['moduleSubaccountsTableAccount'] == null) {
185
- throw new runtime.RequiredError(
186
- 'moduleSubaccountsTableAccount',
187
- 'Required parameter "moduleSubaccountsTableAccount" was null or undefined when calling postAccount().',
188
- );
189
- }
190
-
191
- const queryParameters: any = {};
192
-
193
- const headerParameters: runtime.HTTPHeaders = {};
194
-
195
- headerParameters['Content-Type'] = 'application/json';
196
-
197
- if (this.configuration && this.configuration.accessToken) {
198
- const token = this.configuration.accessToken;
199
- const tokenString = await token('bearerToken', ['modeling:write']);
200
-
201
- if (tokenString) {
202
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
203
- }
204
- }
205
- const response = await this.request(
206
- {
207
- path: `/api/v1/c/{company_code}/modules/{moduleCode}/subaccountstables/{subaccountsTableCode}/accounts`
208
- .replace(`{${'company_code'}}`, encodeURIComponent(String(requestParameters['companyCode'])))
209
- .replace(`{${'moduleCode'}}`, encodeURIComponent(String(requestParameters['moduleCode'])))
210
- .replace(
211
- `{${'subaccountsTableCode'}}`,
212
- encodeURIComponent(String(requestParameters['subaccountsTableCode'])),
213
- ),
214
- method: 'POST',
215
- headers: headerParameters,
216
- query: queryParameters,
217
- body: requestParameters['moduleSubaccountsTableAccount'],
218
- },
219
- initOverrides,
220
- );
221
-
222
- return new runtime.VoidApiResponse(response);
223
- }
224
-
225
- /**
226
- * Add an account to a subaccounts table of a module
227
- * Add account
228
- */
229
- async postAccount(
230
- companyCode: string,
231
- moduleCode: string,
232
- subaccountsTableCode: string,
233
- moduleSubaccountsTableAccount: ModuleSubaccountsTableAccount,
234
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
235
- ): Promise<void> {
236
- await this.postAccountRaw(
237
- {
238
- companyCode: companyCode,
239
- moduleCode: moduleCode,
240
- subaccountsTableCode: subaccountsTableCode,
241
- moduleSubaccountsTableAccount: moduleSubaccountsTableAccount,
242
- },
243
- initOverrides,
244
- );
245
- }
246
- }
@@ -1,184 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Smartbooks Restful API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 0.0.1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import type { NodePurposes } from '../models/index';
15
- import * as runtime from '../runtime';
16
-
17
- export interface NodePurposesApiGetRequest {
18
- companyCode: string;
19
- }
20
-
21
- export interface NodePurposesApiPostRequest {
22
- companyCode: string;
23
- nodePurposes: NodePurposes;
24
- }
25
-
26
- /**
27
- * NodePurposesApi - interface
28
- *
29
- * @export
30
- * @interface NodePurposesApiInterface
31
- */
32
- export interface NodePurposesApiInterface {
33
- /**
34
- *
35
- * @param {string} companyCode
36
- * @param {*} [options] Override http request option.
37
- * @throws {RequiredError}
38
- * @memberof NodePurposesApiInterface
39
- */
40
- getRaw(
41
- requestParameters: NodePurposesApiGetRequest,
42
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
43
- ): Promise<runtime.ApiResponse<NodePurposes>>;
44
-
45
- /**
46
- */
47
- get(companyCode: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NodePurposes>;
48
-
49
- /**
50
- *
51
- * @param {string} companyCode
52
- * @param {NodePurposes} nodePurposes
53
- * @param {*} [options] Override http request option.
54
- * @throws {RequiredError}
55
- * @memberof NodePurposesApiInterface
56
- */
57
- postRaw(
58
- requestParameters: NodePurposesApiPostRequest,
59
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
60
- ): Promise<runtime.ApiResponse<NodePurposes>>;
61
-
62
- /**
63
- */
64
- post(
65
- companyCode: string,
66
- nodePurposes: NodePurposes,
67
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
68
- ): Promise<NodePurposes>;
69
- }
70
-
71
- /**
72
- *
73
- */
74
- export class NodePurposesApi extends runtime.BaseAPI implements NodePurposesApiInterface {
75
- /**
76
- */
77
- async getRaw(
78
- requestParameters: NodePurposesApiGetRequest,
79
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
80
- ): Promise<runtime.ApiResponse<NodePurposes>> {
81
- if (requestParameters['companyCode'] == null) {
82
- throw new runtime.RequiredError(
83
- 'companyCode',
84
- 'Required parameter "companyCode" was null or undefined when calling get().',
85
- );
86
- }
87
-
88
- const queryParameters: any = {};
89
-
90
- const headerParameters: runtime.HTTPHeaders = {};
91
-
92
- if (this.configuration && this.configuration.accessToken) {
93
- const token = this.configuration.accessToken;
94
- const tokenString = await token('bearerToken', ['internal']);
95
-
96
- if (tokenString) {
97
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
98
- }
99
- }
100
- const response = await this.request(
101
- {
102
- path: `/api/v1/c/{company_code}/node_purposes`.replace(
103
- `{${'company_code'}}`,
104
- encodeURIComponent(String(requestParameters['companyCode'])),
105
- ),
106
- method: 'GET',
107
- headers: headerParameters,
108
- query: queryParameters,
109
- },
110
- initOverrides,
111
- );
112
-
113
- return new runtime.JSONApiResponse(response);
114
- }
115
-
116
- /**
117
- */
118
- async get(companyCode: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NodePurposes> {
119
- const response = await this.getRaw({ companyCode: companyCode }, initOverrides);
120
- return await response.value();
121
- }
122
-
123
- /**
124
- */
125
- async postRaw(
126
- requestParameters: NodePurposesApiPostRequest,
127
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
128
- ): Promise<runtime.ApiResponse<NodePurposes>> {
129
- if (requestParameters['companyCode'] == null) {
130
- throw new runtime.RequiredError(
131
- 'companyCode',
132
- 'Required parameter "companyCode" was null or undefined when calling post().',
133
- );
134
- }
135
-
136
- if (requestParameters['nodePurposes'] == null) {
137
- throw new runtime.RequiredError(
138
- 'nodePurposes',
139
- 'Required parameter "nodePurposes" was null or undefined when calling post().',
140
- );
141
- }
142
-
143
- const queryParameters: any = {};
144
-
145
- const headerParameters: runtime.HTTPHeaders = {};
146
-
147
- headerParameters['Content-Type'] = 'application/json';
148
-
149
- if (this.configuration && this.configuration.accessToken) {
150
- const token = this.configuration.accessToken;
151
- const tokenString = await token('bearerToken', ['internal']);
152
-
153
- if (tokenString) {
154
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
155
- }
156
- }
157
- const response = await this.request(
158
- {
159
- path: `/api/v1/c/{company_code}/node_purposes`.replace(
160
- `{${'company_code'}}`,
161
- encodeURIComponent(String(requestParameters['companyCode'])),
162
- ),
163
- method: 'POST',
164
- headers: headerParameters,
165
- query: queryParameters,
166
- body: requestParameters['nodePurposes'],
167
- },
168
- initOverrides,
169
- );
170
-
171
- return new runtime.JSONApiResponse(response);
172
- }
173
-
174
- /**
175
- */
176
- async post(
177
- companyCode: string,
178
- nodePurposes: NodePurposes,
179
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
180
- ): Promise<NodePurposes> {
181
- const response = await this.postRaw({ companyCode: companyCode, nodePurposes: nodePurposes }, initOverrides);
182
- return await response.value();
183
- }
184
- }
@@ -1,203 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Smartbooks Restful API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 0.0.1
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import type { Profile, TenantPostRequest, TenantResponse } from '../models/index';
15
- import * as runtime from '../runtime';
16
-
17
- export interface ProfileApiCreateTenantRequest {
18
- tenantPostRequest: TenantPostRequest;
19
- }
20
-
21
- /**
22
- * ProfileApi - interface
23
- *
24
- * @export
25
- * @interface ProfileApiInterface
26
- */
27
- export interface ProfileApiInterface {
28
- /**
29
- *
30
- * @param {TenantPostRequest} tenantPostRequest
31
- * @param {*} [options] Override http request option.
32
- * @throws {RequiredError}
33
- * @memberof ProfileApiInterface
34
- */
35
- createTenantRaw(
36
- requestParameters: ProfileApiCreateTenantRequest,
37
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
38
- ): Promise<runtime.ApiResponse<TenantResponse>>;
39
-
40
- /**
41
- */
42
- createTenant(
43
- tenantPostRequest: TenantPostRequest,
44
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
45
- ): Promise<TenantResponse>;
46
-
47
- /**
48
- * Get profile details including allowed tenants and companies
49
- * @summary Get profile
50
- * @param {*} [options] Override http request option.
51
- * @throws {RequiredError}
52
- * @memberof ProfileApiInterface
53
- */
54
- myRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>>;
55
-
56
- /**
57
- * Get profile details including allowed tenants and companies
58
- * Get profile
59
- */
60
- my(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile>;
61
-
62
- /**
63
- *
64
- * @param {*} [options] Override http request option.
65
- * @throws {RequiredError}
66
- * @memberof ProfileApiInterface
67
- */
68
- postRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>>;
69
-
70
- /**
71
- */
72
- post(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile>;
73
- }
74
-
75
- /**
76
- *
77
- */
78
- export class ProfileApi extends runtime.BaseAPI implements ProfileApiInterface {
79
- /**
80
- */
81
- async createTenantRaw(
82
- requestParameters: ProfileApiCreateTenantRequest,
83
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
84
- ): Promise<runtime.ApiResponse<TenantResponse>> {
85
- if (requestParameters['tenantPostRequest'] == null) {
86
- throw new runtime.RequiredError(
87
- 'tenantPostRequest',
88
- 'Required parameter "tenantPostRequest" was null or undefined when calling createTenant().',
89
- );
90
- }
91
-
92
- const queryParameters: any = {};
93
-
94
- const headerParameters: runtime.HTTPHeaders = {};
95
-
96
- headerParameters['Content-Type'] = 'application/json';
97
-
98
- if (this.configuration && this.configuration.accessToken) {
99
- const token = this.configuration.accessToken;
100
- const tokenString = await token('bearerToken', ['internal']);
101
-
102
- if (tokenString) {
103
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
104
- }
105
- }
106
- const response = await this.request(
107
- {
108
- path: `/api/v1/profile/my/tenants`,
109
- method: 'POST',
110
- headers: headerParameters,
111
- query: queryParameters,
112
- body: requestParameters['tenantPostRequest'],
113
- },
114
- initOverrides,
115
- );
116
-
117
- return new runtime.JSONApiResponse(response);
118
- }
119
-
120
- /**
121
- */
122
- async createTenant(
123
- tenantPostRequest: TenantPostRequest,
124
- initOverrides?: RequestInit | runtime.InitOverrideFunction,
125
- ): Promise<TenantResponse> {
126
- const response = await this.createTenantRaw({ tenantPostRequest: tenantPostRequest }, initOverrides);
127
- return await response.value();
128
- }
129
-
130
- /**
131
- * Get profile details including allowed tenants and companies
132
- * Get profile
133
- */
134
- async myRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>> {
135
- const queryParameters: any = {};
136
-
137
- const headerParameters: runtime.HTTPHeaders = {};
138
-
139
- if (this.configuration && this.configuration.accessToken) {
140
- const token = this.configuration.accessToken;
141
- const tokenString = await token('bearerToken', ['profile:read']);
142
-
143
- if (tokenString) {
144
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
145
- }
146
- }
147
- const response = await this.request(
148
- {
149
- path: `/api/v1/profile/my`,
150
- method: 'GET',
151
- headers: headerParameters,
152
- query: queryParameters,
153
- },
154
- initOverrides,
155
- );
156
-
157
- return new runtime.JSONApiResponse(response);
158
- }
159
-
160
- /**
161
- * Get profile details including allowed tenants and companies
162
- * Get profile
163
- */
164
- async my(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile> {
165
- const response = await this.myRaw(initOverrides);
166
- return await response.value();
167
- }
168
-
169
- /**
170
- */
171
- async postRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>> {
172
- const queryParameters: any = {};
173
-
174
- const headerParameters: runtime.HTTPHeaders = {};
175
-
176
- if (this.configuration && this.configuration.accessToken) {
177
- const token = this.configuration.accessToken;
178
- const tokenString = await token('bearerToken', ['internal']);
179
-
180
- if (tokenString) {
181
- headerParameters['Authorization'] = `Bearer ${tokenString}`;
182
- }
183
- }
184
- const response = await this.request(
185
- {
186
- path: `/api/v1/profile/my`,
187
- method: 'POST',
188
- headers: headerParameters,
189
- query: queryParameters,
190
- },
191
- initOverrides,
192
- );
193
-
194
- return new runtime.JSONApiResponse(response);
195
- }
196
-
197
- /**
198
- */
199
- async post(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile> {
200
- const response = await this.postRaw(initOverrides);
201
- return await response.value();
202
- }
203
- }