@qlik/api 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +8 -0
  3. package/api-keys.d.mts +313 -0
  4. package/api-keys.d.ts +313 -0
  5. package/api-keys.js +76 -0
  6. package/api-keys.mjs +76 -0
  7. package/apps.d.mts +1921 -0
  8. package/apps.d.ts +1921 -0
  9. package/apps.js +331 -0
  10. package/apps.mjs +331 -0
  11. package/audits.d.mts +262 -0
  12. package/audits.d.ts +262 -0
  13. package/audits.js +63 -0
  14. package/audits.mjs +63 -0
  15. package/auth-CSVTXOZX.js +36 -0
  16. package/auth-TE272Q34.mjs +36 -0
  17. package/auth-types-nnUcWhuU.d.mts +98 -0
  18. package/auth-types-nnUcWhuU.d.ts +98 -0
  19. package/auth.d.mts +26 -0
  20. package/auth.d.ts +26 -0
  21. package/auth.js +13 -0
  22. package/auth.mjs +13 -0
  23. package/automations.d.mts +638 -0
  24. package/automations.d.ts +638 -0
  25. package/automations.js +166 -0
  26. package/automations.mjs +166 -0
  27. package/brands.d.mts +614 -0
  28. package/brands.d.ts +614 -0
  29. package/brands.js +118 -0
  30. package/brands.mjs +118 -0
  31. package/chunk-3YE7EI7I.mjs +17 -0
  32. package/chunk-4ES65KO3.js +57 -0
  33. package/chunk-4FLMND6T.js +25 -0
  34. package/chunk-4OMEH5SW.mjs +1337 -0
  35. package/chunk-CKPJE4IA.mjs +57 -0
  36. package/chunk-GUQBHY3H.mjs +25 -0
  37. package/chunk-OULT3V2U.js +17 -0
  38. package/chunk-WM7FQU2U.mjs +21 -0
  39. package/chunk-XASXL2NC.js +1337 -0
  40. package/chunk-ZT4C7KCQ.js +21 -0
  41. package/collections.d.mts +535 -0
  42. package/collections.d.ts +535 -0
  43. package/collections.js +100 -0
  44. package/collections.mjs +100 -0
  45. package/csp-origins.d.mts +258 -0
  46. package/csp-origins.d.ts +258 -0
  47. package/csp-origins.js +66 -0
  48. package/csp-origins.mjs +66 -0
  49. package/data-assets.d.mts +195 -0
  50. package/data-assets.d.ts +195 -0
  51. package/data-assets.js +61 -0
  52. package/data-assets.mjs +61 -0
  53. package/data-connections.d.mts +527 -0
  54. package/data-connections.d.ts +527 -0
  55. package/data-connections.js +96 -0
  56. package/data-connections.mjs +96 -0
  57. package/data-credentials.d.mts +188 -0
  58. package/data-credentials.d.ts +188 -0
  59. package/data-credentials.js +56 -0
  60. package/data-credentials.mjs +56 -0
  61. package/data-files.d.mts +471 -0
  62. package/data-files.d.ts +471 -0
  63. package/data-files.js +116 -0
  64. package/data-files.mjs +116 -0
  65. package/docs/examples.md +4 -0
  66. package/enigma-session-4L373ALV.mjs +10196 -0
  67. package/enigma-session-TEB53FAF.js +10196 -0
  68. package/esm-4X3DKK5D.js +63 -0
  69. package/esm-SOWVJKOQ.mjs +63 -0
  70. package/extensions.d.mts +257 -0
  71. package/extensions.d.ts +257 -0
  72. package/extensions.js +74 -0
  73. package/extensions.mjs +74 -0
  74. package/global.types-Eto4uYwy.d.mts +102 -0
  75. package/global.types-hIvp-WdX.d.ts +102 -0
  76. package/glossaries.d.mts +1041 -0
  77. package/glossaries.d.ts +1041 -0
  78. package/glossaries.js +225 -0
  79. package/glossaries.mjs +225 -0
  80. package/groups.d.mts +379 -0
  81. package/groups.d.ts +379 -0
  82. package/groups.js +83 -0
  83. package/groups.mjs +83 -0
  84. package/identity-providers.d.mts +492 -0
  85. package/identity-providers.d.ts +492 -0
  86. package/identity-providers.js +80 -0
  87. package/identity-providers.mjs +80 -0
  88. package/index.d.mts +142 -0
  89. package/index.d.ts +142 -0
  90. package/index.js +678 -0
  91. package/index.mjs +678 -0
  92. package/invoke-fetch-MSSJAZ7K.mjs +14 -0
  93. package/invoke-fetch-PEI54KZO.js +14 -0
  94. package/items.d.mts +501 -0
  95. package/items.d.ts +501 -0
  96. package/items.js +84 -0
  97. package/items.mjs +84 -0
  98. package/licenses.d.mts +436 -0
  99. package/licenses.d.ts +436 -0
  100. package/licenses.js +87 -0
  101. package/licenses.mjs +87 -0
  102. package/package.json +264 -0
  103. package/qix-EU7PXRZ6.mjs +573 -0
  104. package/qix-RLTISYTB.js +573 -0
  105. package/qix.d.mts +11543 -0
  106. package/qix.d.ts +11543 -0
  107. package/qix.js +9 -0
  108. package/qix.mjs +9 -0
  109. package/quotas.d.mts +105 -0
  110. package/quotas.d.ts +105 -0
  111. package/quotas.js +31 -0
  112. package/quotas.mjs +31 -0
  113. package/reload-tasks.d.mts +222 -0
  114. package/reload-tasks.d.ts +222 -0
  115. package/reload-tasks.js +59 -0
  116. package/reload-tasks.mjs +59 -0
  117. package/reloads.d.mts +189 -0
  118. package/reloads.d.ts +189 -0
  119. package/reloads.js +44 -0
  120. package/reloads.mjs +44 -0
  121. package/roles.d.mts +150 -0
  122. package/roles.d.ts +150 -0
  123. package/roles.js +30 -0
  124. package/roles.mjs +30 -0
  125. package/spaces.d.mts +524 -0
  126. package/spaces.d.ts +524 -0
  127. package/spaces.js +118 -0
  128. package/spaces.mjs +118 -0
  129. package/temp-contents.d.mts +222 -0
  130. package/temp-contents.d.ts +222 -0
  131. package/temp-contents.js +60 -0
  132. package/temp-contents.mjs +60 -0
  133. package/tenants.d.mts +276 -0
  134. package/tenants.d.ts +276 -0
  135. package/tenants.js +68 -0
  136. package/tenants.mjs +68 -0
  137. package/themes.d.mts +235 -0
  138. package/themes.d.ts +235 -0
  139. package/themes.js +74 -0
  140. package/themes.mjs +74 -0
  141. package/transports.d.mts +298 -0
  142. package/transports.d.ts +298 -0
  143. package/transports.js +62 -0
  144. package/transports.mjs +62 -0
  145. package/users.d.mts +544 -0
  146. package/users.d.ts +544 -0
  147. package/users.js +99 -0
  148. package/users.mjs +99 -0
  149. package/web-integrations.d.mts +246 -0
  150. package/web-integrations.d.ts +246 -0
  151. package/web-integrations.js +59 -0
  152. package/web-integrations.mjs +59 -0
  153. package/web-notifications.d.mts +220 -0
  154. package/web-notifications.d.ts +220 -0
  155. package/web-notifications.js +66 -0
  156. package/web-notifications.mjs +66 -0
  157. package/webhooks.d.mts +422 -0
  158. package/webhooks.d.ts +422 -0
  159. package/webhooks.js +100 -0
  160. package/webhooks.mjs +100 -0
@@ -0,0 +1,298 @@
1
+ import { A as ApiCallOptions } from './global.types-Eto4uYwy.mjs';
2
+ import './auth-types-nnUcWhuU.mjs';
3
+
4
+ type DeleteConfigNotFoundError = {
5
+ errors?: {
6
+ /** The error code. */
7
+ code: string;
8
+ /** Summary of the problem */
9
+ title: string;
10
+ }[];
11
+ };
12
+ type ErrorPublic = {
13
+ /** The error code. */
14
+ code: string;
15
+ /** Summary of the problem. */
16
+ title: string;
17
+ };
18
+ type ErrorsPublic = {
19
+ errors?: ErrorPublic[];
20
+ };
21
+ type PatchEmailConfigError = {
22
+ errors?: {
23
+ /** The error code. */
24
+ code: string;
25
+ /** Summary of the problem */
26
+ title: string;
27
+ }[];
28
+ };
29
+ type SendTestMailConfigNotFoundError = {
30
+ errors?: {
31
+ /** The error code. */
32
+ code: string;
33
+ /** Summary of the problem */
34
+ title: string;
35
+ }[];
36
+ };
37
+ type TenantAdminError = {
38
+ errors?: {
39
+ /** The error code. */
40
+ code: string;
41
+ /** Summary of the problem */
42
+ title: string;
43
+ }[];
44
+ };
45
+ type VerifyConnectionConfigNotFoundError = {
46
+ errors?: {
47
+ /** The error code. */
48
+ code: string;
49
+ /** Summary of the problem */
50
+ title: string;
51
+ }[];
52
+ };
53
+ type Email = {
54
+ /** email body */
55
+ body?: string;
56
+ /** email recipient (email address) */
57
+ recipient?: string;
58
+ /** email subject */
59
+ subject?: string;
60
+ };
61
+ type EmailConfigFieldPatch = {
62
+ /** The operation to be performed. */
63
+ op: "replace, remove, add";
64
+ /** The path for the given resource field to patch. */
65
+ path: "/username" | "/serverAddress" | "/serverPort" | "/securityType" | "/emailAddress" | "/emailPassword";
66
+ /** The value to be used for this operation. */
67
+ value: string;
68
+ };
69
+ type EmailConfigGet = {
70
+ /** Number of authentication failures */
71
+ authFailures?: number;
72
+ /** used for SMTP authentication */
73
+ emailAddress?: string;
74
+ /** Is the configuration valid */
75
+ isValid?: boolean;
76
+ /** Last modification time. Formatted as a ISO 8601 string. */
77
+ modificationTime?: string;
78
+ /** Indicates if password is defined for this smtp config. The password itself is not returned! */
79
+ passwordExists?: boolean;
80
+ /** one of none, StartTLS or SSL/TLS */
81
+ securityType?: string;
82
+ /** domain name or IP address of SMTP server */
83
+ serverAddress?: string;
84
+ /** smtp server listening port */
85
+ serverPort?: number;
86
+ /** Contains statusCode and statusReason */
87
+ status?: SmtpConfigStatus;
88
+ /** The tenant Id */
89
+ tenantId?: string;
90
+ /** user name */
91
+ username?: string;
92
+ };
93
+ type EmailConfigPatch = EmailConfigFieldPatch[];
94
+ type SmtpCheck = {
95
+ /** true if smtp config is correct and complete. Will return false if smtp-config does not exist at all */
96
+ isValid?: boolean;
97
+ };
98
+ type SmtpConfigStatus = {
99
+ /** Status code */
100
+ statusCode?: number;
101
+ /** Status reason */
102
+ statusReason?: string;
103
+ };
104
+ type SmtpResult = {
105
+ /** could not resolve domain name, connection refused, connection timed out, SSL mismatch */
106
+ connectionFailed?: boolean;
107
+ /** error message from SMTP middleware .. a bit technical but could be useful to administrator */
108
+ message?: string;
109
+ /** smtp result code string from the SMTP server. eg. "250 2.6.0" */
110
+ smtpResponseCode?: number;
111
+ /** was SMTP operation successful or not. Other fields herein provide more detail */
112
+ success?: boolean;
113
+ };
114
+ /**
115
+ * Deletes email configuration for a given tenant id (retrieved from JWT).
116
+ * @throws DeleteEmailConfigHttpError
117
+ */
118
+ declare const deleteEmailConfig: (options?: ApiCallOptions) => Promise<DeleteEmailConfigHttpResponse>;
119
+ type DeleteEmailConfigHttpResponse = {
120
+ data: void;
121
+ headers: Headers;
122
+ status: number;
123
+ };
124
+ type DeleteEmailConfig403HttpError = {
125
+ data: TenantAdminError;
126
+ headers: Headers;
127
+ status: 403;
128
+ };
129
+ type DeleteEmailConfig404HttpError = {
130
+ data: DeleteConfigNotFoundError;
131
+ headers: Headers;
132
+ status: 404;
133
+ };
134
+ type DeleteEmailConfigdefaultHttpError = {
135
+ data: ErrorsPublic;
136
+ headers: Headers;
137
+ status: "default";
138
+ };
139
+ type DeleteEmailConfigHttpError = DeleteEmailConfig403HttpError | DeleteEmailConfig404HttpError | DeleteEmailConfigdefaultHttpError;
140
+ /**
141
+ * Returns the email configuration for a given tenant id (retrieved from JWT).
142
+ * @throws GetEmailConfigHttpError
143
+ */
144
+ declare const getEmailConfig: (options?: ApiCallOptions) => Promise<GetEmailConfigHttpResponse>;
145
+ type GetEmailConfigHttpResponse = {
146
+ data: EmailConfigGet;
147
+ headers: Headers;
148
+ status: number;
149
+ };
150
+ type GetEmailConfig403HttpError = {
151
+ data: TenantAdminError;
152
+ headers: Headers;
153
+ status: 403;
154
+ };
155
+ type GetEmailConfigdefaultHttpError = {
156
+ data: ErrorsPublic;
157
+ headers: Headers;
158
+ status: "default";
159
+ };
160
+ type GetEmailConfigHttpError = GetEmailConfig403HttpError | GetEmailConfigdefaultHttpError;
161
+ /**
162
+ * Patch the email configuration for a given tenant id (retrieved from JWT).
163
+ * @param body an object with the body content
164
+ * @throws PatchEmailConfigHttpError
165
+ */
166
+ declare const patchEmailConfig: (body: EmailConfigPatch, options?: ApiCallOptions) => Promise<PatchEmailConfigHttpResponse>;
167
+ type PatchEmailConfigHttpResponse = {
168
+ data: void;
169
+ headers: Headers;
170
+ status: number;
171
+ };
172
+ type PatchEmailConfig400HttpError = {
173
+ data: PatchEmailConfigError;
174
+ headers: Headers;
175
+ status: 400;
176
+ };
177
+ type PatchEmailConfig403HttpError = {
178
+ data: TenantAdminError;
179
+ headers: Headers;
180
+ status: 403;
181
+ };
182
+ type PatchEmailConfigdefaultHttpError = {
183
+ data: ErrorsPublic;
184
+ headers: Headers;
185
+ status: "default";
186
+ };
187
+ type PatchEmailConfigHttpError = PatchEmailConfig400HttpError | PatchEmailConfig403HttpError | PatchEmailConfigdefaultHttpError;
188
+ /**
189
+ * Send a test mail with the supplied email info (subject, body, recipient). Email config from database is used for the connection.
190
+ * @param body an object with the body content
191
+ * @throws SendTestEmailHttpError
192
+ */
193
+ declare const sendTestEmail: (body: Email, options?: ApiCallOptions) => Promise<SendTestEmailHttpResponse>;
194
+ type SendTestEmailHttpResponse = {
195
+ data: SmtpResult;
196
+ headers: Headers;
197
+ status: number;
198
+ };
199
+ type SendTestEmail403HttpError = {
200
+ data: TenantAdminError;
201
+ headers: Headers;
202
+ status: 403;
203
+ };
204
+ type SendTestEmail404HttpError = {
205
+ data: SendTestMailConfigNotFoundError;
206
+ headers: Headers;
207
+ status: 404;
208
+ };
209
+ type SendTestEmaildefaultHttpError = {
210
+ data: ErrorsPublic;
211
+ headers: Headers;
212
+ status: "default";
213
+ };
214
+ type SendTestEmailHttpError = SendTestEmail403HttpError | SendTestEmail404HttpError | SendTestEmaildefaultHttpError;
215
+ /**
216
+ * Returns the isValid value for the email configuration for the tenant. Will return false if no email configuration exists.
217
+ * @throws ValidateEmailConfigHttpError
218
+ */
219
+ declare const validateEmailConfig: (options?: ApiCallOptions) => Promise<ValidateEmailConfigHttpResponse>;
220
+ type ValidateEmailConfigHttpResponse = {
221
+ data: SmtpCheck;
222
+ headers: Headers;
223
+ status: number;
224
+ };
225
+ type ValidateEmailConfigHttpError = {
226
+ data: ErrorsPublic;
227
+ headers: Headers;
228
+ status: number;
229
+ };
230
+ /**
231
+ * Verifies connection to email server for tenant provided via JWT
232
+ * @throws VerifyEmailConfigConnectionHttpError
233
+ */
234
+ declare const verifyEmailConfigConnection: (options?: ApiCallOptions) => Promise<VerifyEmailConfigConnectionHttpResponse>;
235
+ type VerifyEmailConfigConnectionHttpResponse = {
236
+ data: SmtpResult;
237
+ headers: Headers;
238
+ status: number;
239
+ };
240
+ type VerifyEmailConfigConnection404HttpError = {
241
+ data: VerifyConnectionConfigNotFoundError;
242
+ headers: Headers;
243
+ status: 404;
244
+ };
245
+ type VerifyEmailConfigConnectiondefaultHttpError = {
246
+ data: ErrorsPublic;
247
+ headers: Headers;
248
+ status: "default";
249
+ };
250
+ type VerifyEmailConfigConnectionHttpError = VerifyEmailConfigConnection404HttpError | VerifyEmailConfigConnectiondefaultHttpError;
251
+ /**
252
+ * Clears the cache for transports api requests.
253
+ */
254
+ declare function clearCache(): void;
255
+ interface TransportsAPI {
256
+ /**
257
+ * Deletes email configuration for a given tenant id (retrieved from JWT).
258
+ * @throws DeleteEmailConfigHttpError
259
+ */
260
+ deleteEmailConfig: typeof deleteEmailConfig;
261
+ /**
262
+ * Returns the email configuration for a given tenant id (retrieved from JWT).
263
+ * @throws GetEmailConfigHttpError
264
+ */
265
+ getEmailConfig: typeof getEmailConfig;
266
+ /**
267
+ * Patch the email configuration for a given tenant id (retrieved from JWT).
268
+ * @param body an object with the body content
269
+ * @throws PatchEmailConfigHttpError
270
+ */
271
+ patchEmailConfig: typeof patchEmailConfig;
272
+ /**
273
+ * Send a test mail with the supplied email info (subject, body, recipient). Email config from database is used for the connection.
274
+ * @param body an object with the body content
275
+ * @throws SendTestEmailHttpError
276
+ */
277
+ sendTestEmail: typeof sendTestEmail;
278
+ /**
279
+ * Returns the isValid value for the email configuration for the tenant. Will return false if no email configuration exists.
280
+ * @throws ValidateEmailConfigHttpError
281
+ */
282
+ validateEmailConfig: typeof validateEmailConfig;
283
+ /**
284
+ * Verifies connection to email server for tenant provided via JWT
285
+ * @throws VerifyEmailConfigConnectionHttpError
286
+ */
287
+ verifyEmailConfigConnection: typeof verifyEmailConfigConnection;
288
+ /**
289
+ * Clears the cache for transports api requests.
290
+ */
291
+ clearCache: typeof clearCache;
292
+ }
293
+ /**
294
+ * Functions for the transports api
295
+ */
296
+ declare const transportsExport: TransportsAPI;
297
+
298
+ export { type DeleteConfigNotFoundError, type DeleteEmailConfig403HttpError, type DeleteEmailConfig404HttpError, type DeleteEmailConfigHttpError, type DeleteEmailConfigHttpResponse, type DeleteEmailConfigdefaultHttpError, type Email, type EmailConfigFieldPatch, type EmailConfigGet, type EmailConfigPatch, type ErrorPublic, type ErrorsPublic, type GetEmailConfig403HttpError, type GetEmailConfigHttpError, type GetEmailConfigHttpResponse, type GetEmailConfigdefaultHttpError, type PatchEmailConfig400HttpError, type PatchEmailConfig403HttpError, type PatchEmailConfigError, type PatchEmailConfigHttpError, type PatchEmailConfigHttpResponse, type PatchEmailConfigdefaultHttpError, type SendTestEmail403HttpError, type SendTestEmail404HttpError, type SendTestEmailHttpError, type SendTestEmailHttpResponse, type SendTestEmaildefaultHttpError, type SendTestMailConfigNotFoundError, type SmtpCheck, type SmtpConfigStatus, type SmtpResult, type TenantAdminError, type TransportsAPI, type ValidateEmailConfigHttpError, type ValidateEmailConfigHttpResponse, type VerifyConnectionConfigNotFoundError, type VerifyEmailConfigConnection404HttpError, type VerifyEmailConfigConnectionHttpError, type VerifyEmailConfigConnectionHttpResponse, type VerifyEmailConfigConnectiondefaultHttpError, clearCache, transportsExport as default, deleteEmailConfig, getEmailConfig, patchEmailConfig, sendTestEmail, validateEmailConfig, verifyEmailConfigConnection };
@@ -0,0 +1,298 @@
1
+ import { A as ApiCallOptions } from './global.types-hIvp-WdX.js';
2
+ import './auth-types-nnUcWhuU.js';
3
+
4
+ type DeleteConfigNotFoundError = {
5
+ errors?: {
6
+ /** The error code. */
7
+ code: string;
8
+ /** Summary of the problem */
9
+ title: string;
10
+ }[];
11
+ };
12
+ type ErrorPublic = {
13
+ /** The error code. */
14
+ code: string;
15
+ /** Summary of the problem. */
16
+ title: string;
17
+ };
18
+ type ErrorsPublic = {
19
+ errors?: ErrorPublic[];
20
+ };
21
+ type PatchEmailConfigError = {
22
+ errors?: {
23
+ /** The error code. */
24
+ code: string;
25
+ /** Summary of the problem */
26
+ title: string;
27
+ }[];
28
+ };
29
+ type SendTestMailConfigNotFoundError = {
30
+ errors?: {
31
+ /** The error code. */
32
+ code: string;
33
+ /** Summary of the problem */
34
+ title: string;
35
+ }[];
36
+ };
37
+ type TenantAdminError = {
38
+ errors?: {
39
+ /** The error code. */
40
+ code: string;
41
+ /** Summary of the problem */
42
+ title: string;
43
+ }[];
44
+ };
45
+ type VerifyConnectionConfigNotFoundError = {
46
+ errors?: {
47
+ /** The error code. */
48
+ code: string;
49
+ /** Summary of the problem */
50
+ title: string;
51
+ }[];
52
+ };
53
+ type Email = {
54
+ /** email body */
55
+ body?: string;
56
+ /** email recipient (email address) */
57
+ recipient?: string;
58
+ /** email subject */
59
+ subject?: string;
60
+ };
61
+ type EmailConfigFieldPatch = {
62
+ /** The operation to be performed. */
63
+ op: "replace, remove, add";
64
+ /** The path for the given resource field to patch. */
65
+ path: "/username" | "/serverAddress" | "/serverPort" | "/securityType" | "/emailAddress" | "/emailPassword";
66
+ /** The value to be used for this operation. */
67
+ value: string;
68
+ };
69
+ type EmailConfigGet = {
70
+ /** Number of authentication failures */
71
+ authFailures?: number;
72
+ /** used for SMTP authentication */
73
+ emailAddress?: string;
74
+ /** Is the configuration valid */
75
+ isValid?: boolean;
76
+ /** Last modification time. Formatted as a ISO 8601 string. */
77
+ modificationTime?: string;
78
+ /** Indicates if password is defined for this smtp config. The password itself is not returned! */
79
+ passwordExists?: boolean;
80
+ /** one of none, StartTLS or SSL/TLS */
81
+ securityType?: string;
82
+ /** domain name or IP address of SMTP server */
83
+ serverAddress?: string;
84
+ /** smtp server listening port */
85
+ serverPort?: number;
86
+ /** Contains statusCode and statusReason */
87
+ status?: SmtpConfigStatus;
88
+ /** The tenant Id */
89
+ tenantId?: string;
90
+ /** user name */
91
+ username?: string;
92
+ };
93
+ type EmailConfigPatch = EmailConfigFieldPatch[];
94
+ type SmtpCheck = {
95
+ /** true if smtp config is correct and complete. Will return false if smtp-config does not exist at all */
96
+ isValid?: boolean;
97
+ };
98
+ type SmtpConfigStatus = {
99
+ /** Status code */
100
+ statusCode?: number;
101
+ /** Status reason */
102
+ statusReason?: string;
103
+ };
104
+ type SmtpResult = {
105
+ /** could not resolve domain name, connection refused, connection timed out, SSL mismatch */
106
+ connectionFailed?: boolean;
107
+ /** error message from SMTP middleware .. a bit technical but could be useful to administrator */
108
+ message?: string;
109
+ /** smtp result code string from the SMTP server. eg. "250 2.6.0" */
110
+ smtpResponseCode?: number;
111
+ /** was SMTP operation successful or not. Other fields herein provide more detail */
112
+ success?: boolean;
113
+ };
114
+ /**
115
+ * Deletes email configuration for a given tenant id (retrieved from JWT).
116
+ * @throws DeleteEmailConfigHttpError
117
+ */
118
+ declare const deleteEmailConfig: (options?: ApiCallOptions) => Promise<DeleteEmailConfigHttpResponse>;
119
+ type DeleteEmailConfigHttpResponse = {
120
+ data: void;
121
+ headers: Headers;
122
+ status: number;
123
+ };
124
+ type DeleteEmailConfig403HttpError = {
125
+ data: TenantAdminError;
126
+ headers: Headers;
127
+ status: 403;
128
+ };
129
+ type DeleteEmailConfig404HttpError = {
130
+ data: DeleteConfigNotFoundError;
131
+ headers: Headers;
132
+ status: 404;
133
+ };
134
+ type DeleteEmailConfigdefaultHttpError = {
135
+ data: ErrorsPublic;
136
+ headers: Headers;
137
+ status: "default";
138
+ };
139
+ type DeleteEmailConfigHttpError = DeleteEmailConfig403HttpError | DeleteEmailConfig404HttpError | DeleteEmailConfigdefaultHttpError;
140
+ /**
141
+ * Returns the email configuration for a given tenant id (retrieved from JWT).
142
+ * @throws GetEmailConfigHttpError
143
+ */
144
+ declare const getEmailConfig: (options?: ApiCallOptions) => Promise<GetEmailConfigHttpResponse>;
145
+ type GetEmailConfigHttpResponse = {
146
+ data: EmailConfigGet;
147
+ headers: Headers;
148
+ status: number;
149
+ };
150
+ type GetEmailConfig403HttpError = {
151
+ data: TenantAdminError;
152
+ headers: Headers;
153
+ status: 403;
154
+ };
155
+ type GetEmailConfigdefaultHttpError = {
156
+ data: ErrorsPublic;
157
+ headers: Headers;
158
+ status: "default";
159
+ };
160
+ type GetEmailConfigHttpError = GetEmailConfig403HttpError | GetEmailConfigdefaultHttpError;
161
+ /**
162
+ * Patch the email configuration for a given tenant id (retrieved from JWT).
163
+ * @param body an object with the body content
164
+ * @throws PatchEmailConfigHttpError
165
+ */
166
+ declare const patchEmailConfig: (body: EmailConfigPatch, options?: ApiCallOptions) => Promise<PatchEmailConfigHttpResponse>;
167
+ type PatchEmailConfigHttpResponse = {
168
+ data: void;
169
+ headers: Headers;
170
+ status: number;
171
+ };
172
+ type PatchEmailConfig400HttpError = {
173
+ data: PatchEmailConfigError;
174
+ headers: Headers;
175
+ status: 400;
176
+ };
177
+ type PatchEmailConfig403HttpError = {
178
+ data: TenantAdminError;
179
+ headers: Headers;
180
+ status: 403;
181
+ };
182
+ type PatchEmailConfigdefaultHttpError = {
183
+ data: ErrorsPublic;
184
+ headers: Headers;
185
+ status: "default";
186
+ };
187
+ type PatchEmailConfigHttpError = PatchEmailConfig400HttpError | PatchEmailConfig403HttpError | PatchEmailConfigdefaultHttpError;
188
+ /**
189
+ * Send a test mail with the supplied email info (subject, body, recipient). Email config from database is used for the connection.
190
+ * @param body an object with the body content
191
+ * @throws SendTestEmailHttpError
192
+ */
193
+ declare const sendTestEmail: (body: Email, options?: ApiCallOptions) => Promise<SendTestEmailHttpResponse>;
194
+ type SendTestEmailHttpResponse = {
195
+ data: SmtpResult;
196
+ headers: Headers;
197
+ status: number;
198
+ };
199
+ type SendTestEmail403HttpError = {
200
+ data: TenantAdminError;
201
+ headers: Headers;
202
+ status: 403;
203
+ };
204
+ type SendTestEmail404HttpError = {
205
+ data: SendTestMailConfigNotFoundError;
206
+ headers: Headers;
207
+ status: 404;
208
+ };
209
+ type SendTestEmaildefaultHttpError = {
210
+ data: ErrorsPublic;
211
+ headers: Headers;
212
+ status: "default";
213
+ };
214
+ type SendTestEmailHttpError = SendTestEmail403HttpError | SendTestEmail404HttpError | SendTestEmaildefaultHttpError;
215
+ /**
216
+ * Returns the isValid value for the email configuration for the tenant. Will return false if no email configuration exists.
217
+ * @throws ValidateEmailConfigHttpError
218
+ */
219
+ declare const validateEmailConfig: (options?: ApiCallOptions) => Promise<ValidateEmailConfigHttpResponse>;
220
+ type ValidateEmailConfigHttpResponse = {
221
+ data: SmtpCheck;
222
+ headers: Headers;
223
+ status: number;
224
+ };
225
+ type ValidateEmailConfigHttpError = {
226
+ data: ErrorsPublic;
227
+ headers: Headers;
228
+ status: number;
229
+ };
230
+ /**
231
+ * Verifies connection to email server for tenant provided via JWT
232
+ * @throws VerifyEmailConfigConnectionHttpError
233
+ */
234
+ declare const verifyEmailConfigConnection: (options?: ApiCallOptions) => Promise<VerifyEmailConfigConnectionHttpResponse>;
235
+ type VerifyEmailConfigConnectionHttpResponse = {
236
+ data: SmtpResult;
237
+ headers: Headers;
238
+ status: number;
239
+ };
240
+ type VerifyEmailConfigConnection404HttpError = {
241
+ data: VerifyConnectionConfigNotFoundError;
242
+ headers: Headers;
243
+ status: 404;
244
+ };
245
+ type VerifyEmailConfigConnectiondefaultHttpError = {
246
+ data: ErrorsPublic;
247
+ headers: Headers;
248
+ status: "default";
249
+ };
250
+ type VerifyEmailConfigConnectionHttpError = VerifyEmailConfigConnection404HttpError | VerifyEmailConfigConnectiondefaultHttpError;
251
+ /**
252
+ * Clears the cache for transports api requests.
253
+ */
254
+ declare function clearCache(): void;
255
+ interface TransportsAPI {
256
+ /**
257
+ * Deletes email configuration for a given tenant id (retrieved from JWT).
258
+ * @throws DeleteEmailConfigHttpError
259
+ */
260
+ deleteEmailConfig: typeof deleteEmailConfig;
261
+ /**
262
+ * Returns the email configuration for a given tenant id (retrieved from JWT).
263
+ * @throws GetEmailConfigHttpError
264
+ */
265
+ getEmailConfig: typeof getEmailConfig;
266
+ /**
267
+ * Patch the email configuration for a given tenant id (retrieved from JWT).
268
+ * @param body an object with the body content
269
+ * @throws PatchEmailConfigHttpError
270
+ */
271
+ patchEmailConfig: typeof patchEmailConfig;
272
+ /**
273
+ * Send a test mail with the supplied email info (subject, body, recipient). Email config from database is used for the connection.
274
+ * @param body an object with the body content
275
+ * @throws SendTestEmailHttpError
276
+ */
277
+ sendTestEmail: typeof sendTestEmail;
278
+ /**
279
+ * Returns the isValid value for the email configuration for the tenant. Will return false if no email configuration exists.
280
+ * @throws ValidateEmailConfigHttpError
281
+ */
282
+ validateEmailConfig: typeof validateEmailConfig;
283
+ /**
284
+ * Verifies connection to email server for tenant provided via JWT
285
+ * @throws VerifyEmailConfigConnectionHttpError
286
+ */
287
+ verifyEmailConfigConnection: typeof verifyEmailConfigConnection;
288
+ /**
289
+ * Clears the cache for transports api requests.
290
+ */
291
+ clearCache: typeof clearCache;
292
+ }
293
+ /**
294
+ * Functions for the transports api
295
+ */
296
+ declare const transportsExport: TransportsAPI;
297
+
298
+ export { type DeleteConfigNotFoundError, type DeleteEmailConfig403HttpError, type DeleteEmailConfig404HttpError, type DeleteEmailConfigHttpError, type DeleteEmailConfigHttpResponse, type DeleteEmailConfigdefaultHttpError, type Email, type EmailConfigFieldPatch, type EmailConfigGet, type EmailConfigPatch, type ErrorPublic, type ErrorsPublic, type GetEmailConfig403HttpError, type GetEmailConfigHttpError, type GetEmailConfigHttpResponse, type GetEmailConfigdefaultHttpError, type PatchEmailConfig400HttpError, type PatchEmailConfig403HttpError, type PatchEmailConfigError, type PatchEmailConfigHttpError, type PatchEmailConfigHttpResponse, type PatchEmailConfigdefaultHttpError, type SendTestEmail403HttpError, type SendTestEmail404HttpError, type SendTestEmailHttpError, type SendTestEmailHttpResponse, type SendTestEmaildefaultHttpError, type SendTestMailConfigNotFoundError, type SmtpCheck, type SmtpConfigStatus, type SmtpResult, type TenantAdminError, type TransportsAPI, type ValidateEmailConfigHttpError, type ValidateEmailConfigHttpResponse, type VerifyConnectionConfigNotFoundError, type VerifyEmailConfigConnection404HttpError, type VerifyEmailConfigConnectionHttpError, type VerifyEmailConfigConnectionHttpResponse, type VerifyEmailConfigConnectiondefaultHttpError, clearCache, transportsExport as default, deleteEmailConfig, getEmailConfig, patchEmailConfig, sendTestEmail, validateEmailConfig, verifyEmailConfigConnection };
package/transports.js ADDED
@@ -0,0 +1,62 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkOULT3V2Ujs = require('./chunk-OULT3V2U.js');
5
+ require('./chunk-ZT4C7KCQ.js');
6
+
7
+ // src/public/rest/transports.ts
8
+ var deleteEmailConfig = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "transports", {
9
+ method: "delete",
10
+ pathTemplate: "/api/v1/transports/email-config",
11
+ options
12
+ });
13
+ var getEmailConfig = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "transports", {
14
+ method: "get",
15
+ pathTemplate: "/api/v1/transports/email-config",
16
+ options
17
+ });
18
+ var patchEmailConfig = async (body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "transports", {
19
+ method: "patch",
20
+ pathTemplate: "/api/v1/transports/email-config",
21
+ body,
22
+ options
23
+ });
24
+ var sendTestEmail = async (body, options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "transports", {
25
+ method: "post",
26
+ pathTemplate: "/api/v1/transports/email-config/actions/send-test-email",
27
+ body,
28
+ options
29
+ });
30
+ var validateEmailConfig = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "transports", {
31
+ method: "post",
32
+ pathTemplate: "/api/v1/transports/email-config/actions/validate",
33
+ options
34
+ });
35
+ var verifyEmailConfigConnection = async (options) => _chunkOULT3V2Ujs.invokeFetch.call(void 0, "transports", {
36
+ method: "post",
37
+ pathTemplate: "/api/v1/transports/email-config/actions/verify-connection",
38
+ options
39
+ });
40
+ function clearCache() {
41
+ return _chunkOULT3V2Ujs.clearApiCache.call(void 0, "transports");
42
+ }
43
+ var transportsExport = {
44
+ deleteEmailConfig,
45
+ getEmailConfig,
46
+ patchEmailConfig,
47
+ sendTestEmail,
48
+ validateEmailConfig,
49
+ verifyEmailConfigConnection,
50
+ clearCache
51
+ };
52
+ var transports_default = transportsExport;
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+ exports.clearCache = clearCache; exports.default = transports_default; exports.deleteEmailConfig = deleteEmailConfig; exports.getEmailConfig = getEmailConfig; exports.patchEmailConfig = patchEmailConfig; exports.sendTestEmail = sendTestEmail; exports.validateEmailConfig = validateEmailConfig; exports.verifyEmailConfigConnection = verifyEmailConfigConnection;