@solytude/listmonk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +542 -0
- package/dist/chunk-saezhne8.js +14 -0
- package/dist/chunk-saezhne8.js.map +9 -0
- package/dist/client.d.ts +430 -0
- package/dist/errors/api.d.ts +178 -0
- package/dist/errors/base.d.ts +47 -0
- package/dist/errors/configuration.d.ts +49 -0
- package/dist/errors/index.d.ts +13 -0
- package/dist/errors/network.d.ts +69 -0
- package/dist/errors/validation.d.ts +57 -0
- package/dist/http/auth.d.ts +39 -0
- package/dist/http/client.d.ts +149 -0
- package/dist/http/hooks.d.ts +90 -0
- package/dist/http/index.d.ts +10 -0
- package/dist/http/resource.d.ts +100 -0
- package/dist/http/sse.d.ts +36 -0
- package/dist/http/url.d.ts +51 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +16039 -0
- package/dist/index.js.map +120 -0
- package/dist/resources/admin/admin.d.ts +92 -0
- package/dist/resources/admin/index.d.ts +10 -0
- package/dist/resources/admin/schemas.d.ts +23 -0
- package/dist/resources/admin/types.d.ts +29 -0
- package/dist/resources/bounces/bounces.d.ts +262 -0
- package/dist/resources/bounces/index.d.ts +10 -0
- package/dist/resources/bounces/schemas.d.ts +86 -0
- package/dist/resources/bounces/types.d.ts +37 -0
- package/dist/resources/campaigns/campaigns.d.ts +339 -0
- package/dist/resources/campaigns/index.d.ts +10 -0
- package/dist/resources/campaigns/schemas.d.ts +374 -0
- package/dist/resources/campaigns/types.d.ts +111 -0
- package/dist/resources/dashboard/dashboard.d.ts +73 -0
- package/dist/resources/dashboard/index.d.ts +10 -0
- package/dist/resources/dashboard/schemas.d.ts +55 -0
- package/dist/resources/dashboard/types.d.ts +22 -0
- package/dist/resources/import/import.d.ts +215 -0
- package/dist/resources/import/index.d.ts +10 -0
- package/dist/resources/import/schemas.d.ts +109 -0
- package/dist/resources/import/types.d.ts +72 -0
- package/dist/resources/lists/index.d.ts +10 -0
- package/dist/resources/lists/lists.d.ts +180 -0
- package/dist/resources/lists/schemas.d.ts +176 -0
- package/dist/resources/lists/types.d.ts +56 -0
- package/dist/resources/maintenance/index.d.ts +10 -0
- package/dist/resources/maintenance/maintenance.d.ts +92 -0
- package/dist/resources/maintenance/schemas.d.ts +36 -0
- package/dist/resources/maintenance/types.d.ts +31 -0
- package/dist/resources/media/index.d.ts +10 -0
- package/dist/resources/media/media.d.ts +198 -0
- package/dist/resources/media/schemas.d.ts +48 -0
- package/dist/resources/media/types.d.ts +48 -0
- package/dist/resources/public/index.d.ts +10 -0
- package/dist/resources/public/public.d.ts +111 -0
- package/dist/resources/public/schemas.d.ts +52 -0
- package/dist/resources/public/types.d.ts +30 -0
- package/dist/resources/settings/index.d.ts +10 -0
- package/dist/resources/settings/schemas.d.ts +374 -0
- package/dist/resources/settings/settings.d.ts +106 -0
- package/dist/resources/settings/types.d.ts +78 -0
- package/dist/resources/subscribers/index.d.ts +10 -0
- package/dist/resources/subscribers/schemas.d.ts +360 -0
- package/dist/resources/subscribers/subscribers.d.ts +308 -0
- package/dist/resources/subscribers/types.d.ts +113 -0
- package/dist/resources/templates/index.d.ts +10 -0
- package/dist/resources/templates/schemas.d.ts +110 -0
- package/dist/resources/templates/templates.d.ts +225 -0
- package/dist/resources/templates/types.d.ts +45 -0
- package/dist/resources/tx/index.d.ts +10 -0
- package/dist/resources/tx/schemas.d.ts +67 -0
- package/dist/resources/tx/tx.d.ts +167 -0
- package/dist/resources/tx/types.d.ts +88 -0
- package/dist/schemas/common.d.ts +48 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/testing/errors.d.ts +25 -0
- package/dist/testing/factories/bounce.d.ts +43 -0
- package/dist/testing/factories/campaign.d.ts +43 -0
- package/dist/testing/factories/common.d.ts +54 -0
- package/dist/testing/factories/index.d.ts +12 -0
- package/dist/testing/factories/list.d.ts +43 -0
- package/dist/testing/factories/media.d.ts +40 -0
- package/dist/testing/factories/subscriber.d.ts +43 -0
- package/dist/testing/factories/template.d.ts +40 -0
- package/dist/testing/index.d.ts +39 -0
- package/dist/testing/index.js +573 -0
- package/dist/testing/index.js.map +32 -0
- package/dist/testing/mock-client.d.ts +119 -0
- package/dist/testing/mock-function.d.ts +28 -0
- package/dist/testing/resources/admin.d.ts +20 -0
- package/dist/testing/resources/bounces.d.ts +22 -0
- package/dist/testing/resources/campaigns.d.ts +31 -0
- package/dist/testing/resources/dashboard.d.ts +17 -0
- package/dist/testing/resources/import.d.ts +19 -0
- package/dist/testing/resources/index.d.ts +18 -0
- package/dist/testing/resources/lists.d.ts +24 -0
- package/dist/testing/resources/maintenance.d.ts +18 -0
- package/dist/testing/resources/media.d.ts +21 -0
- package/dist/testing/resources/public.d.ts +18 -0
- package/dist/testing/resources/settings.d.ts +19 -0
- package/dist/testing/resources/subscribers.d.ts +33 -0
- package/dist/testing/resources/templates.d.ts +24 -0
- package/dist/testing/resources/tx.d.ts +16 -0
- package/dist/testing/types.d.ts +138 -0
- package/dist/types/config.d.ts +59 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/pagination.d.ts +37 -0
- package/package.json +97 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript types for media module.
|
|
3
|
+
*
|
|
4
|
+
* All types are inferred from Zod schemas to ensure runtime
|
|
5
|
+
* validation matches compile-time types.
|
|
6
|
+
*
|
|
7
|
+
* @module resources/media/types
|
|
8
|
+
*/
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
import type { MediaSchema, MediaUploadObjectSchema } from "./schemas";
|
|
11
|
+
/**
|
|
12
|
+
* Complete media entity.
|
|
13
|
+
*
|
|
14
|
+
* Represents an uploaded media file (image, PDF, etc.) with metadata.
|
|
15
|
+
*/
|
|
16
|
+
export type Media = z.infer<typeof MediaSchema>;
|
|
17
|
+
/**
|
|
18
|
+
* Node.js pattern for file upload: { filename, content }.
|
|
19
|
+
*/
|
|
20
|
+
export type MediaUploadObject = z.infer<typeof MediaUploadObjectSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* Input for media file upload.
|
|
23
|
+
*
|
|
24
|
+
* Supports:
|
|
25
|
+
* - Web API: File objects (filename extracted from file.name)
|
|
26
|
+
* - Node.js/Bun: Object with filename and Buffer/Uint8Array content
|
|
27
|
+
*
|
|
28
|
+
* NOTE: Plain Blob objects are NOT supported because they lack a filename.
|
|
29
|
+
* Use File (which extends Blob) or { filename, content } pattern instead.
|
|
30
|
+
*
|
|
31
|
+
* @example Browser (File API)
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const file = new File([content], 'image.jpg', { type: 'image/jpeg' });
|
|
34
|
+
* await client.media.upload(file);
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example Node.js (Buffer pattern)
|
|
38
|
+
* ```typescript
|
|
39
|
+
* await client.media.upload({
|
|
40
|
+
* filename: 'image.jpg',
|
|
41
|
+
* content: Buffer.from(imageData),
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export type MediaUploadInput = File | {
|
|
46
|
+
filename: string;
|
|
47
|
+
content: Buffer | Uint8Array;
|
|
48
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public resource module.
|
|
3
|
+
*
|
|
4
|
+
* Provides access to unauthenticated public endpoints for the listmonk API.
|
|
5
|
+
*
|
|
6
|
+
* @module resources/public
|
|
7
|
+
*/
|
|
8
|
+
export { PublicResource } from "./public";
|
|
9
|
+
export type { CaptchaAlgorithm, PublicList, PublicSubscribeRequest, PublicSubscribeResponse, AltchaCaptchaChallenge, } from "./types";
|
|
10
|
+
export { CaptchaAlgorithmSchema, PublicListSchema, PublicListsResponseSchema, PublicSubscribeRequestSchema, PublicSubscribeResponseSchema, AltchaCaptchaChallengeSchema, } from "./schemas";
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public resource for unauthenticated endpoints.
|
|
3
|
+
*
|
|
4
|
+
* @module resources/public
|
|
5
|
+
*/
|
|
6
|
+
import { APIResource } from "../../http/resource";
|
|
7
|
+
import type { PublicList, PublicSubscribeRequest, PublicSubscribeResponse, AltchaCaptchaChallenge } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* Resource for public (unauthenticated) endpoints on listmonk.
|
|
10
|
+
*
|
|
11
|
+
* These endpoints don't require authentication and are intended
|
|
12
|
+
* for use in public subscription forms and similar scenarios.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // Get public lists
|
|
17
|
+
* const lists = await client.public.getLists();
|
|
18
|
+
*
|
|
19
|
+
* // Submit subscription
|
|
20
|
+
* await client.public.subscribe({
|
|
21
|
+
* email: 'user@example.com',
|
|
22
|
+
* list_uuids: [lists[0].uuid],
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class PublicResource extends APIResource {
|
|
27
|
+
/**
|
|
28
|
+
* Makes an unauthenticated GET request.
|
|
29
|
+
*/
|
|
30
|
+
private getPublic;
|
|
31
|
+
/**
|
|
32
|
+
* Makes an unauthenticated POST request.
|
|
33
|
+
*/
|
|
34
|
+
private postPublic;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves public lists.
|
|
37
|
+
*
|
|
38
|
+
* Returns only lists marked as public, with minimal information
|
|
39
|
+
* (UUID and name) suitable for subscription forms.
|
|
40
|
+
*
|
|
41
|
+
* @returns Array of public lists
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const lists = await client.public.getLists();
|
|
46
|
+
*
|
|
47
|
+
* for (const list of lists) {
|
|
48
|
+
* console.log(`${list.name} (${list.uuid})`);
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
getLists(): Promise<PublicList[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Submits a public subscription request.
|
|
55
|
+
*
|
|
56
|
+
* Used for building custom subscription forms that integrate
|
|
57
|
+
* with listmonk's double opt-in workflow.
|
|
58
|
+
*
|
|
59
|
+
* @param request - Subscription request data
|
|
60
|
+
* @returns Response indicating opt-in status
|
|
61
|
+
* @throws {ListmonkApiError} On invalid email, CAPTCHA, or disabled subscriptions
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* // Simple subscription
|
|
66
|
+
* const result = await client.public.subscribe({
|
|
67
|
+
* email: 'user@example.com',
|
|
68
|
+
* list_uuids: ['550e8400-e29b-41d4-a716-446655440000'],
|
|
69
|
+
* });
|
|
70
|
+
*
|
|
71
|
+
* if (result.has_optin) {
|
|
72
|
+
* console.log('Confirmation email sent (double opt-in)');
|
|
73
|
+
* } else {
|
|
74
|
+
* console.log('Subscribed directly (single opt-in)');
|
|
75
|
+
* }
|
|
76
|
+
*
|
|
77
|
+
* // With name and CAPTCHA
|
|
78
|
+
* await client.public.subscribe({
|
|
79
|
+
* email: 'user@example.com',
|
|
80
|
+
* name: 'John Doe',
|
|
81
|
+
* list_uuids: ['550e8400-e29b-41d4-a716-446655440000'],
|
|
82
|
+
* altcha: 'base64EncodedCaptchaSolution',
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
subscribe(request: PublicSubscribeRequest): Promise<PublicSubscribeResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* Retrieves an Altcha CAPTCHA challenge.
|
|
89
|
+
*
|
|
90
|
+
* The challenge object should be passed to the Altcha widget
|
|
91
|
+
* on the client side for proof-of-work solving.
|
|
92
|
+
*
|
|
93
|
+
* @returns CAPTCHA challenge object
|
|
94
|
+
* @throws {ListmonkNotFoundError} If Altcha CAPTCHA is not enabled
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* try {
|
|
99
|
+
* const challenge = await client.public.getCaptchaChallenge();
|
|
100
|
+
* console.log(`Algorithm: ${challenge.algorithm}`);
|
|
101
|
+
* console.log(`Max number: ${challenge.maxNumber}`);
|
|
102
|
+
* // Pass to Altcha widget for solving
|
|
103
|
+
* } catch (error) {
|
|
104
|
+
* if (error.status === 404) {
|
|
105
|
+
* console.log('CAPTCHA not enabled on this server');
|
|
106
|
+
* }
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
getCaptchaChallenge(): Promise<AltchaCaptchaChallenge>;
|
|
111
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for public endpoint requests and responses.
|
|
3
|
+
*
|
|
4
|
+
* @module resources/public/schemas
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { PublicListSchema } from "../lists/schemas";
|
|
8
|
+
/**
|
|
9
|
+
* CAPTCHA algorithm for Altcha.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CaptchaAlgorithmSchema: z.ZodEnum<{
|
|
12
|
+
"SHA-1": "SHA-1";
|
|
13
|
+
"SHA-256": "SHA-256";
|
|
14
|
+
"SHA-512": "SHA-512";
|
|
15
|
+
}>;
|
|
16
|
+
export { PublicListSchema };
|
|
17
|
+
/**
|
|
18
|
+
* Public lists response (array of public lists).
|
|
19
|
+
*/
|
|
20
|
+
export declare const PublicListsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
21
|
+
uuid: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
/**
|
|
25
|
+
* Public subscription request.
|
|
26
|
+
*/
|
|
27
|
+
export declare const PublicSubscribeRequestSchema: z.ZodObject<{
|
|
28
|
+
email: z.ZodString;
|
|
29
|
+
name: z.ZodOptional<z.ZodString>;
|
|
30
|
+
list_uuids: z.ZodArray<z.ZodString>;
|
|
31
|
+
altcha: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
/**
|
|
34
|
+
* Public subscription response.
|
|
35
|
+
*/
|
|
36
|
+
export declare const PublicSubscribeResponseSchema: z.ZodObject<{
|
|
37
|
+
has_optin: z.ZodBoolean;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
/**
|
|
40
|
+
* Altcha CAPTCHA challenge object.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AltchaCaptchaChallengeSchema: z.ZodObject<{
|
|
43
|
+
algorithm: z.ZodEnum<{
|
|
44
|
+
"SHA-1": "SHA-1";
|
|
45
|
+
"SHA-256": "SHA-256";
|
|
46
|
+
"SHA-512": "SHA-512";
|
|
47
|
+
}>;
|
|
48
|
+
challenge: z.ZodString;
|
|
49
|
+
maxNumber: z.ZodNumber;
|
|
50
|
+
salt: z.ZodString;
|
|
51
|
+
signature: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript types for public module.
|
|
3
|
+
*
|
|
4
|
+
* All types are inferred from Zod schemas to ensure runtime
|
|
5
|
+
* validation matches compile-time types.
|
|
6
|
+
*
|
|
7
|
+
* @module resources/public/types
|
|
8
|
+
*/
|
|
9
|
+
import type { z } from "zod";
|
|
10
|
+
import type { CaptchaAlgorithmSchema, PublicListSchema, PublicSubscribeRequestSchema, PublicSubscribeResponseSchema, AltchaCaptchaChallengeSchema } from "./schemas";
|
|
11
|
+
/**
|
|
12
|
+
* CAPTCHA algorithm for Altcha.
|
|
13
|
+
*/
|
|
14
|
+
export type CaptchaAlgorithm = z.infer<typeof CaptchaAlgorithmSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Public list info (minimal fields for public forms).
|
|
17
|
+
*/
|
|
18
|
+
export type PublicList = z.infer<typeof PublicListSchema>;
|
|
19
|
+
/**
|
|
20
|
+
* Public subscription request (input type).
|
|
21
|
+
*/
|
|
22
|
+
export type PublicSubscribeRequest = z.input<typeof PublicSubscribeRequestSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* Public subscription response.
|
|
25
|
+
*/
|
|
26
|
+
export type PublicSubscribeResponse = z.infer<typeof PublicSubscribeResponseSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* Altcha CAPTCHA challenge object.
|
|
29
|
+
*/
|
|
30
|
+
export type AltchaCaptchaChallenge = z.infer<typeof AltchaCaptchaChallengeSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings resource module.
|
|
3
|
+
*
|
|
4
|
+
* Provides complete settings management for the listmonk API.
|
|
5
|
+
*
|
|
6
|
+
* @module resources/settings
|
|
7
|
+
*/
|
|
8
|
+
export { SettingsResource } from "./settings";
|
|
9
|
+
export type { SmtpAuthProtocol, TlsType, UploadProvider, CaptchaProvider, ServerHealth, ServerConfig, Settings, SettingsUpdateResponse, SmtpConfig, MessengerConfig, SecurityCaptcha, SecurityOidc, BouncePostmark, BounceForwardEmail, BounceBox, SmtpTestConfig, SmtpTestResult, } from "./types";
|
|
10
|
+
export { SmtpAuthProtocolSchema, TlsTypeSchema, UploadProviderSchema, CaptchaProviderSchema, ServerHealthSchema, ServerConfigSchema, SecurityCaptchaSchema, SecurityOidcSchema, SmtpConfigSchema, MessengerConfigSchema, BouncePostmarkSchema, BounceForwardEmailSchema, BounceBoxSchema, SettingsSchema, SettingsUpdateResponseSchema, SmtpTestConfigSchema, SmtpTestResultSchema, } from "./schemas";
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for settings-related requests and responses.
|
|
3
|
+
*
|
|
4
|
+
* @module resources/settings/schemas
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
/**
|
|
8
|
+
* SMTP authentication protocol.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SmtpAuthProtocolSchema: z.ZodEnum<{
|
|
11
|
+
plain: "plain";
|
|
12
|
+
login: "login";
|
|
13
|
+
cram: "cram";
|
|
14
|
+
none: "none";
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* TLS configuration type.
|
|
18
|
+
*/
|
|
19
|
+
export declare const TlsTypeSchema: z.ZodEnum<{
|
|
20
|
+
none: "none";
|
|
21
|
+
STARTTLS: "STARTTLS";
|
|
22
|
+
TLS: "TLS";
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Upload provider type.
|
|
26
|
+
*/
|
|
27
|
+
export declare const UploadProviderSchema: z.ZodEnum<{
|
|
28
|
+
filesystem: "filesystem";
|
|
29
|
+
s3: "s3";
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* CAPTCHA provider type.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CaptchaProviderSchema: z.ZodNullable<z.ZodEnum<{
|
|
35
|
+
altcha: "altcha";
|
|
36
|
+
hcaptcha: "hcaptcha";
|
|
37
|
+
}>>;
|
|
38
|
+
/**
|
|
39
|
+
* Server health check response.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ServerHealthSchema: z.ZodLiteral<true>;
|
|
42
|
+
/**
|
|
43
|
+
* Server configuration response.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ServerConfigSchema: z.ZodObject<{
|
|
46
|
+
root_url: z.ZodString;
|
|
47
|
+
from_email: z.ZodString;
|
|
48
|
+
lang: z.ZodString;
|
|
49
|
+
langs: z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
code: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
public_subscription: z.ZodObject<{
|
|
54
|
+
enabled: z.ZodBoolean;
|
|
55
|
+
captcha_enabled: z.ZodBoolean;
|
|
56
|
+
captcha_provider: z.ZodNullable<z.ZodEnum<{
|
|
57
|
+
altcha: "altcha";
|
|
58
|
+
hcaptcha: "hcaptcha";
|
|
59
|
+
}>>;
|
|
60
|
+
captcha_key: z.ZodNullable<z.ZodString>;
|
|
61
|
+
altcha_complexity: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
media_provider: z.ZodEnum<{
|
|
64
|
+
filesystem: "filesystem";
|
|
65
|
+
s3: "s3";
|
|
66
|
+
}>;
|
|
67
|
+
messengers: z.ZodArray<z.ZodString>;
|
|
68
|
+
permissions: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
69
|
+
update: z.ZodNullable<z.ZodObject<{
|
|
70
|
+
release_version: z.ZodString;
|
|
71
|
+
release_date: z.ZodString;
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
description: z.ZodString;
|
|
74
|
+
is_new: z.ZodBoolean;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
needs_restart: z.ZodBoolean;
|
|
77
|
+
has_legacy_user: z.ZodBoolean;
|
|
78
|
+
version: z.ZodString;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
/**
|
|
81
|
+
* Security CAPTCHA configuration.
|
|
82
|
+
*/
|
|
83
|
+
export declare const SecurityCaptchaSchema: z.ZodObject<{
|
|
84
|
+
altcha: z.ZodObject<{
|
|
85
|
+
enabled: z.ZodBoolean;
|
|
86
|
+
complexity: z.ZodNumber;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
hcaptcha: z.ZodObject<{
|
|
89
|
+
enabled: z.ZodBoolean;
|
|
90
|
+
key: z.ZodString;
|
|
91
|
+
secret: z.ZodString;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
/**
|
|
95
|
+
* Security OIDC configuration.
|
|
96
|
+
*/
|
|
97
|
+
export declare const SecurityOidcSchema: z.ZodObject<{
|
|
98
|
+
enabled: z.ZodBoolean;
|
|
99
|
+
provider_url: z.ZodString;
|
|
100
|
+
provider_name: z.ZodString;
|
|
101
|
+
client_id: z.ZodString;
|
|
102
|
+
client_secret: z.ZodString;
|
|
103
|
+
auto_create_users: z.ZodBoolean;
|
|
104
|
+
default_user_role_id: z.ZodNullable<z.ZodNumber>;
|
|
105
|
+
default_list_role_id: z.ZodNullable<z.ZodNumber>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
/**
|
|
108
|
+
* SMTP server configuration.
|
|
109
|
+
*/
|
|
110
|
+
export declare const SmtpConfigSchema: z.ZodObject<{
|
|
111
|
+
uuid: z.ZodString;
|
|
112
|
+
enabled: z.ZodBoolean;
|
|
113
|
+
host: z.ZodString;
|
|
114
|
+
port: z.ZodNumber;
|
|
115
|
+
hello_hostname: z.ZodOptional<z.ZodString>;
|
|
116
|
+
auth_protocol: z.ZodEnum<{
|
|
117
|
+
plain: "plain";
|
|
118
|
+
login: "login";
|
|
119
|
+
cram: "cram";
|
|
120
|
+
none: "none";
|
|
121
|
+
}>;
|
|
122
|
+
username: z.ZodString;
|
|
123
|
+
password: z.ZodString;
|
|
124
|
+
email_headers: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
125
|
+
max_conns: z.ZodNumber;
|
|
126
|
+
max_msg_retries: z.ZodNumber;
|
|
127
|
+
idle_timeout: z.ZodString;
|
|
128
|
+
wait_timeout: z.ZodString;
|
|
129
|
+
tls_type: z.ZodEnum<{
|
|
130
|
+
none: "none";
|
|
131
|
+
STARTTLS: "STARTTLS";
|
|
132
|
+
TLS: "TLS";
|
|
133
|
+
}>;
|
|
134
|
+
tls_skip_verify: z.ZodBoolean;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
/**
|
|
137
|
+
* Messenger configuration.
|
|
138
|
+
*/
|
|
139
|
+
export declare const MessengerConfigSchema: z.ZodObject<{
|
|
140
|
+
uuid: z.ZodString;
|
|
141
|
+
enabled: z.ZodBoolean;
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
root_url: z.ZodString;
|
|
144
|
+
username: z.ZodString;
|
|
145
|
+
password: z.ZodString;
|
|
146
|
+
max_conns: z.ZodNumber;
|
|
147
|
+
timeout: z.ZodString;
|
|
148
|
+
max_msg_retries: z.ZodNumber;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
/**
|
|
151
|
+
* Bounce Postmark configuration.
|
|
152
|
+
*/
|
|
153
|
+
export declare const BouncePostmarkSchema: z.ZodObject<{
|
|
154
|
+
enabled: z.ZodBoolean;
|
|
155
|
+
username: z.ZodString;
|
|
156
|
+
password: z.ZodString;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
/**
|
|
159
|
+
* Bounce Forward Email configuration.
|
|
160
|
+
*/
|
|
161
|
+
export declare const BounceForwardEmailSchema: z.ZodObject<{
|
|
162
|
+
enabled: z.ZodBoolean;
|
|
163
|
+
key: z.ZodString;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
/**
|
|
166
|
+
* Bounce mailbox configuration.
|
|
167
|
+
*/
|
|
168
|
+
export declare const BounceBoxSchema: z.ZodObject<{
|
|
169
|
+
uuid: z.ZodString;
|
|
170
|
+
enabled: z.ZodBoolean;
|
|
171
|
+
type: z.ZodEnum<{
|
|
172
|
+
pop: "pop";
|
|
173
|
+
imap: "imap";
|
|
174
|
+
}>;
|
|
175
|
+
host: z.ZodString;
|
|
176
|
+
port: z.ZodNumber;
|
|
177
|
+
auth_protocol: z.ZodString;
|
|
178
|
+
return_path: z.ZodString;
|
|
179
|
+
username: z.ZodString;
|
|
180
|
+
password: z.ZodString;
|
|
181
|
+
tls_type: z.ZodEnum<{
|
|
182
|
+
none: "none";
|
|
183
|
+
STARTTLS: "STARTTLS";
|
|
184
|
+
TLS: "TLS";
|
|
185
|
+
}>;
|
|
186
|
+
tls_skip_verify: z.ZodBoolean;
|
|
187
|
+
scan_interval: z.ZodString;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
/**
|
|
190
|
+
* Complete settings object with passthrough for forward compatibility.
|
|
191
|
+
*/
|
|
192
|
+
export declare const SettingsSchema: z.ZodObject<{
|
|
193
|
+
"app.site_name": z.ZodString;
|
|
194
|
+
"app.root_url": z.ZodString;
|
|
195
|
+
"app.logo_url": z.ZodString;
|
|
196
|
+
"app.favicon_url": z.ZodString;
|
|
197
|
+
"app.from_email": z.ZodString;
|
|
198
|
+
"app.notify_emails": z.ZodArray<z.ZodString>;
|
|
199
|
+
"app.lang": z.ZodString;
|
|
200
|
+
"app.enable_public_sub_page": z.ZodBoolean;
|
|
201
|
+
"app.enable_public_archive": z.ZodBoolean;
|
|
202
|
+
"app.enable_public_archive_rss_content": z.ZodBoolean;
|
|
203
|
+
"app.send_optin_confirmation": z.ZodBoolean;
|
|
204
|
+
"app.check_updates": z.ZodBoolean;
|
|
205
|
+
"app.batch_size": z.ZodNumber;
|
|
206
|
+
"app.concurrency": z.ZodNumber;
|
|
207
|
+
"app.max_send_errors": z.ZodNumber;
|
|
208
|
+
"app.message_rate": z.ZodNumber;
|
|
209
|
+
"app.message_sliding_window": z.ZodBoolean;
|
|
210
|
+
"app.message_sliding_window_duration": z.ZodString;
|
|
211
|
+
"app.message_sliding_window_rate": z.ZodNumber;
|
|
212
|
+
"app.cache_slow_queries": z.ZodBoolean;
|
|
213
|
+
"app.cache_slow_queries_interval": z.ZodString;
|
|
214
|
+
"privacy.individual_tracking": z.ZodBoolean;
|
|
215
|
+
"privacy.unsubscribe_header": z.ZodBoolean;
|
|
216
|
+
"privacy.allow_blocklist": z.ZodBoolean;
|
|
217
|
+
"privacy.allow_preferences": z.ZodBoolean;
|
|
218
|
+
"privacy.allow_export": z.ZodBoolean;
|
|
219
|
+
"privacy.allow_wipe": z.ZodBoolean;
|
|
220
|
+
"privacy.exportable": z.ZodArray<z.ZodString>;
|
|
221
|
+
"privacy.record_optin_ip": z.ZodBoolean;
|
|
222
|
+
"privacy.domain_blocklist": z.ZodArray<z.ZodString>;
|
|
223
|
+
"privacy.domain_allowlist": z.ZodArray<z.ZodString>;
|
|
224
|
+
"security.captcha": z.ZodObject<{
|
|
225
|
+
altcha: z.ZodObject<{
|
|
226
|
+
enabled: z.ZodBoolean;
|
|
227
|
+
complexity: z.ZodNumber;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
hcaptcha: z.ZodObject<{
|
|
230
|
+
enabled: z.ZodBoolean;
|
|
231
|
+
key: z.ZodString;
|
|
232
|
+
secret: z.ZodString;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
"security.oidc": z.ZodObject<{
|
|
236
|
+
enabled: z.ZodBoolean;
|
|
237
|
+
provider_url: z.ZodString;
|
|
238
|
+
provider_name: z.ZodString;
|
|
239
|
+
client_id: z.ZodString;
|
|
240
|
+
client_secret: z.ZodString;
|
|
241
|
+
auto_create_users: z.ZodBoolean;
|
|
242
|
+
default_user_role_id: z.ZodNullable<z.ZodNumber>;
|
|
243
|
+
default_list_role_id: z.ZodNullable<z.ZodNumber>;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
"security.cors_origins": z.ZodArray<z.ZodString>;
|
|
246
|
+
"upload.provider": z.ZodEnum<{
|
|
247
|
+
filesystem: "filesystem";
|
|
248
|
+
s3: "s3";
|
|
249
|
+
}>;
|
|
250
|
+
"upload.extensions": z.ZodArray<z.ZodString>;
|
|
251
|
+
"upload.filesystem.upload_path": z.ZodString;
|
|
252
|
+
"upload.filesystem.upload_uri": z.ZodString;
|
|
253
|
+
"upload.s3.url": z.ZodString;
|
|
254
|
+
"upload.s3.public_url": z.ZodString;
|
|
255
|
+
"upload.s3.aws_access_key_id": z.ZodString;
|
|
256
|
+
"upload.s3.aws_secret_access_key": z.ZodString;
|
|
257
|
+
"upload.s3.aws_default_region": z.ZodString;
|
|
258
|
+
"upload.s3.bucket": z.ZodString;
|
|
259
|
+
"upload.s3.bucket_domain": z.ZodString;
|
|
260
|
+
"upload.s3.bucket_path": z.ZodString;
|
|
261
|
+
"upload.s3.bucket_type": z.ZodString;
|
|
262
|
+
"upload.s3.expiry": z.ZodString;
|
|
263
|
+
smtp: z.ZodArray<z.ZodObject<{
|
|
264
|
+
uuid: z.ZodString;
|
|
265
|
+
enabled: z.ZodBoolean;
|
|
266
|
+
host: z.ZodString;
|
|
267
|
+
port: z.ZodNumber;
|
|
268
|
+
hello_hostname: z.ZodOptional<z.ZodString>;
|
|
269
|
+
auth_protocol: z.ZodEnum<{
|
|
270
|
+
plain: "plain";
|
|
271
|
+
login: "login";
|
|
272
|
+
cram: "cram";
|
|
273
|
+
none: "none";
|
|
274
|
+
}>;
|
|
275
|
+
username: z.ZodString;
|
|
276
|
+
password: z.ZodString;
|
|
277
|
+
email_headers: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
278
|
+
max_conns: z.ZodNumber;
|
|
279
|
+
max_msg_retries: z.ZodNumber;
|
|
280
|
+
idle_timeout: z.ZodString;
|
|
281
|
+
wait_timeout: z.ZodString;
|
|
282
|
+
tls_type: z.ZodEnum<{
|
|
283
|
+
none: "none";
|
|
284
|
+
STARTTLS: "STARTTLS";
|
|
285
|
+
TLS: "TLS";
|
|
286
|
+
}>;
|
|
287
|
+
tls_skip_verify: z.ZodBoolean;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
messengers: z.ZodArray<z.ZodObject<{
|
|
290
|
+
uuid: z.ZodString;
|
|
291
|
+
enabled: z.ZodBoolean;
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
root_url: z.ZodString;
|
|
294
|
+
username: z.ZodString;
|
|
295
|
+
password: z.ZodString;
|
|
296
|
+
max_conns: z.ZodNumber;
|
|
297
|
+
timeout: z.ZodString;
|
|
298
|
+
max_msg_retries: z.ZodNumber;
|
|
299
|
+
}, z.core.$strip>>;
|
|
300
|
+
"bounce.enabled": z.ZodBoolean;
|
|
301
|
+
"bounce.enable_webhooks": z.ZodBoolean;
|
|
302
|
+
"bounce.actions": z.ZodRecord<z.ZodString, z.ZodString>;
|
|
303
|
+
"bounce.ses_enabled": z.ZodBoolean;
|
|
304
|
+
"bounce.sendgrid_enabled": z.ZodBoolean;
|
|
305
|
+
"bounce.sendgrid_key": z.ZodString;
|
|
306
|
+
"bounce.postmark": z.ZodObject<{
|
|
307
|
+
enabled: z.ZodBoolean;
|
|
308
|
+
username: z.ZodString;
|
|
309
|
+
password: z.ZodString;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
"bounce.forward_email": z.ZodObject<{
|
|
312
|
+
enabled: z.ZodBoolean;
|
|
313
|
+
key: z.ZodString;
|
|
314
|
+
}, z.core.$strip>;
|
|
315
|
+
"bounce.boxes": z.ZodArray<z.ZodObject<{
|
|
316
|
+
uuid: z.ZodString;
|
|
317
|
+
enabled: z.ZodBoolean;
|
|
318
|
+
type: z.ZodEnum<{
|
|
319
|
+
pop: "pop";
|
|
320
|
+
imap: "imap";
|
|
321
|
+
}>;
|
|
322
|
+
host: z.ZodString;
|
|
323
|
+
port: z.ZodNumber;
|
|
324
|
+
auth_protocol: z.ZodString;
|
|
325
|
+
return_path: z.ZodString;
|
|
326
|
+
username: z.ZodString;
|
|
327
|
+
password: z.ZodString;
|
|
328
|
+
tls_type: z.ZodEnum<{
|
|
329
|
+
none: "none";
|
|
330
|
+
STARTTLS: "STARTTLS";
|
|
331
|
+
TLS: "TLS";
|
|
332
|
+
}>;
|
|
333
|
+
tls_skip_verify: z.ZodBoolean;
|
|
334
|
+
scan_interval: z.ZodString;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
"appearance.admin.custom_css": z.ZodString;
|
|
337
|
+
"appearance.admin.custom_js": z.ZodString;
|
|
338
|
+
"appearance.public.custom_css": z.ZodString;
|
|
339
|
+
"appearance.public.custom_js": z.ZodString;
|
|
340
|
+
}, z.core.$loose>;
|
|
341
|
+
/**
|
|
342
|
+
* Response from settings update.
|
|
343
|
+
* Can be either `true` or `{ needs_restart: true }` when campaigns are running.
|
|
344
|
+
*/
|
|
345
|
+
export declare const SettingsUpdateResponseSchema: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
346
|
+
needs_restart: z.ZodLiteral<true>;
|
|
347
|
+
}, z.core.$strip>]>;
|
|
348
|
+
/**
|
|
349
|
+
* SMTP test configuration request.
|
|
350
|
+
*/
|
|
351
|
+
export declare const SmtpTestConfigSchema: z.ZodObject<{
|
|
352
|
+
host: z.ZodString;
|
|
353
|
+
port: z.ZodNumber;
|
|
354
|
+
hello_hostname: z.ZodOptional<z.ZodString>;
|
|
355
|
+
auth_protocol: z.ZodEnum<{
|
|
356
|
+
plain: "plain";
|
|
357
|
+
login: "login";
|
|
358
|
+
cram: "cram";
|
|
359
|
+
none: "none";
|
|
360
|
+
}>;
|
|
361
|
+
username: z.ZodString;
|
|
362
|
+
password: z.ZodString;
|
|
363
|
+
tls_type: z.ZodEnum<{
|
|
364
|
+
none: "none";
|
|
365
|
+
STARTTLS: "STARTTLS";
|
|
366
|
+
TLS: "TLS";
|
|
367
|
+
}>;
|
|
368
|
+
tls_skip_verify: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
369
|
+
email: z.ZodString;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
/**
|
|
372
|
+
* SMTP test result response (array of log lines).
|
|
373
|
+
*/
|
|
374
|
+
export declare const SmtpTestResultSchema: z.ZodArray<z.ZodString>;
|