@krak-stack/notifications-admin 0.0.0-stage → 0.2.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/CHANGELOG.md +15 -0
- package/README.md +94 -2
- package/dist/atoms.d.ts +10 -0
- package/dist/atoms.js +328 -0
- package/dist/campaign.atom.d.ts +281 -0
- package/dist/campaigns.d.ts +51 -0
- package/dist/campaigns.js +8 -0
- package/dist/chunk-28xppc9m.js +404 -0
- package/dist/chunk-aqmv7g24.js +29 -0
- package/dist/chunk-dxjvd9tb.js +419 -0
- package/dist/chunk-t0qhq7pj.js +272 -0
- package/dist/chunk-tck9drx2.js +134 -0
- package/dist/chunk-wkxc1y7w.js +704 -0
- package/dist/contact.atom.d.ts +96 -0
- package/dist/contacts.d.ts +67 -0
- package/dist/contacts.js +11 -0
- package/dist/deliveries.d.ts +42 -0
- package/dist/deliveries.js +8 -0
- package/dist/delivery.atom.d.ts +196 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +29 -0
- package/dist/operations.atom.d.ts +244 -0
- package/dist/operations.d.ts +106 -0
- package/dist/operations.js +13 -0
- package/dist/presentation.d.ts +15 -0
- package/dist/presentation.js +10 -0
- package/package.json +80 -4
- package/tailwind.css +2 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Atom, AsyncResult } from "effect/reactivity";
|
|
2
|
+
import { TableState } from "@krak-stack/notifications/admin/table.schema";
|
|
3
|
+
export declare const makeSendContactAtoms: (baseUrl: string) => {
|
|
4
|
+
contacts: (arg: string) => Atom.Writable<AsyncResult.AsyncResult<{
|
|
5
|
+
items: readonly {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly locale: "en" | "fr";
|
|
9
|
+
readonly email: string;
|
|
10
|
+
readonly emailConsent: "subscribed" | "unknown" | "unsubscribed";
|
|
11
|
+
readonly createdAt: Date;
|
|
12
|
+
readonly updatedAt: Date;
|
|
13
|
+
}[];
|
|
14
|
+
total: number;
|
|
15
|
+
nextCursor: null;
|
|
16
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, Atom.Atom<AsyncResult.AsyncResult<AsyncResult.AsyncResult<{
|
|
17
|
+
items: readonly {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly locale: "en" | "fr";
|
|
21
|
+
readonly email: string;
|
|
22
|
+
readonly emailConsent: "subscribed" | "unknown" | "unsubscribed";
|
|
23
|
+
readonly createdAt: Date;
|
|
24
|
+
readonly updatedAt: Date;
|
|
25
|
+
}[];
|
|
26
|
+
total: number;
|
|
27
|
+
nextCursor: null;
|
|
28
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, unknown>>>;
|
|
29
|
+
contact: (arg: string) => Atom.Writable<AsyncResult.AsyncResult<{
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly locale: "en" | "fr";
|
|
33
|
+
readonly email: string;
|
|
34
|
+
readonly emailConsent: "subscribed" | "unknown" | "unsubscribed";
|
|
35
|
+
readonly createdAt: Date;
|
|
36
|
+
readonly updatedAt: Date;
|
|
37
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, Atom.Atom<AsyncResult.AsyncResult<AsyncResult.AsyncResult<{
|
|
38
|
+
readonly id: string;
|
|
39
|
+
readonly name: string;
|
|
40
|
+
readonly locale: "en" | "fr";
|
|
41
|
+
readonly email: string;
|
|
42
|
+
readonly emailConsent: "subscribed" | "unknown" | "unsubscribed";
|
|
43
|
+
readonly createdAt: Date;
|
|
44
|
+
readonly updatedAt: Date;
|
|
45
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, unknown>>>;
|
|
46
|
+
history: (id: string, table?: typeof TableState.Type) => Atom.Writable<AsyncResult.AsyncResult<{
|
|
47
|
+
items: readonly {
|
|
48
|
+
readonly requestId: string;
|
|
49
|
+
readonly status: "subscribed" | "unsubscribed";
|
|
50
|
+
readonly noticeVersion: string;
|
|
51
|
+
readonly contactId: string;
|
|
52
|
+
readonly source: string;
|
|
53
|
+
readonly actor: string;
|
|
54
|
+
readonly occurredAt: Date;
|
|
55
|
+
}[];
|
|
56
|
+
total: number;
|
|
57
|
+
nextCursor: null;
|
|
58
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, Atom.Atom<AsyncResult.AsyncResult<AsyncResult.AsyncResult<{
|
|
59
|
+
items: readonly {
|
|
60
|
+
readonly requestId: string;
|
|
61
|
+
readonly status: "subscribed" | "unsubscribed";
|
|
62
|
+
readonly noticeVersion: string;
|
|
63
|
+
readonly contactId: string;
|
|
64
|
+
readonly source: string;
|
|
65
|
+
readonly actor: string;
|
|
66
|
+
readonly occurredAt: Date;
|
|
67
|
+
}[];
|
|
68
|
+
total: number;
|
|
69
|
+
nextCursor: null;
|
|
70
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, unknown>>>;
|
|
71
|
+
create: Atom.AtomResultFn<{
|
|
72
|
+
readonly email: string;
|
|
73
|
+
readonly name?: string | undefined;
|
|
74
|
+
readonly locale?: "en" | "fr" | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
readonly id: string;
|
|
77
|
+
readonly name: string;
|
|
78
|
+
readonly locale: "en" | "fr";
|
|
79
|
+
readonly email: string;
|
|
80
|
+
readonly emailConsent: "subscribed" | "unknown" | "unsubscribed";
|
|
81
|
+
readonly createdAt: Date;
|
|
82
|
+
readonly updatedAt: Date;
|
|
83
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendConflict | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>;
|
|
84
|
+
withdraw: (arg: string) => Atom.AtomResultFn<{
|
|
85
|
+
contactId: string;
|
|
86
|
+
requestId: string;
|
|
87
|
+
}, {
|
|
88
|
+
readonly requestId: string;
|
|
89
|
+
readonly status: "subscribed" | "unsubscribed";
|
|
90
|
+
readonly noticeVersion: string;
|
|
91
|
+
readonly contactId: string;
|
|
92
|
+
readonly source: string;
|
|
93
|
+
readonly actor: string;
|
|
94
|
+
readonly occurredAt: Date;
|
|
95
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendConflict | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>;
|
|
96
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CreateContact, type Contact, type ContactPage, type EmailConsentEvent, type ConsentEventPage } from "@krak-stack/notifications/admin/schema";
|
|
2
|
+
import type { DataTableProps } from "@krak-stack/registry/data-table";
|
|
3
|
+
export { SendContacts as NotificationContacts, SendContactDetails as NotificationContactDetails, };
|
|
4
|
+
export type { SendContactsProps as NotificationContactsProps, SendContactsMessages as NotificationContactsMessages, };
|
|
5
|
+
export interface SendContactsMessages {
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly description: string;
|
|
8
|
+
readonly create: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly email: string;
|
|
11
|
+
readonly consent: string;
|
|
12
|
+
readonly unknown: string;
|
|
13
|
+
readonly subscribed: string;
|
|
14
|
+
readonly unsubscribed: string;
|
|
15
|
+
readonly withdraw: string;
|
|
16
|
+
readonly save: string;
|
|
17
|
+
readonly savingFailed: string;
|
|
18
|
+
readonly loading: string;
|
|
19
|
+
readonly empty: string;
|
|
20
|
+
readonly previous: string;
|
|
21
|
+
readonly next: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SendContactsProps {
|
|
24
|
+
readonly table?: Pick<DataTableProps<Contact>, "state" | "onStateChange" | "features" | "status">;
|
|
25
|
+
readonly page: typeof ContactPage.Type | undefined;
|
|
26
|
+
readonly pending?: boolean;
|
|
27
|
+
readonly error?: string;
|
|
28
|
+
readonly messages: SendContactsMessages;
|
|
29
|
+
readonly defaultContactLocale: "en" | "fr";
|
|
30
|
+
readonly onCreate: (input: CreateContact) => Promise<Contact | void>;
|
|
31
|
+
readonly onWithdraw: (contact: Contact) => Promise<typeof EmailConsentEvent.Type | void>;
|
|
32
|
+
readonly inspection?: {
|
|
33
|
+
readonly label: string;
|
|
34
|
+
readonly onSelect: (contact: Contact) => void;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export declare const SendContacts: ({ page, pending, error, messages, defaultContactLocale, onCreate, onWithdraw, inspection, table, }: SendContactsProps) => import("react").JSX.Element;
|
|
38
|
+
export interface SendContactDetailsMessages {
|
|
39
|
+
readonly title: string;
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly email: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly locale: string;
|
|
44
|
+
readonly consent: string;
|
|
45
|
+
readonly created: string;
|
|
46
|
+
readonly updated: string;
|
|
47
|
+
readonly requestId: string;
|
|
48
|
+
readonly status: string;
|
|
49
|
+
readonly source: string;
|
|
50
|
+
readonly actor: string;
|
|
51
|
+
readonly noticeVersion: string;
|
|
52
|
+
readonly occurred: string;
|
|
53
|
+
readonly previous: string;
|
|
54
|
+
readonly next: string;
|
|
55
|
+
readonly close: string;
|
|
56
|
+
readonly activity: string;
|
|
57
|
+
readonly states: Readonly<Record<Contact["emailConsent"], string>>;
|
|
58
|
+
}
|
|
59
|
+
export declare const SendContactDetails: ({ contact, history, messages: m, error, onClose, onActivity, table, }: {
|
|
60
|
+
contact: Contact | undefined;
|
|
61
|
+
history: typeof ConsentEventPage.Type | undefined;
|
|
62
|
+
table?: Pick<DataTableProps<typeof EmailConsentEvent.Type>, "state" | "onStateChange" | "features" | "status">;
|
|
63
|
+
messages: SendContactDetailsMessages;
|
|
64
|
+
error?: string;
|
|
65
|
+
onClose: () => void;
|
|
66
|
+
onActivity: (id: string) => void;
|
|
67
|
+
}) => import("react").JSX.Element;
|
package/dist/contacts.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SendContacts2,
|
|
3
|
+
SendContactDetails2
|
|
4
|
+
} from "./chunk-t0qhq7pj.js";
|
|
5
|
+
import"./chunk-tck9drx2.js";
|
|
6
|
+
export {
|
|
7
|
+
SendContactDetails2 as NotificationContactDetails,
|
|
8
|
+
SendContacts2 as NotificationContacts,
|
|
9
|
+
SendContactDetails2 as SendContactDetails,
|
|
10
|
+
SendContacts2 as SendContacts
|
|
11
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type * as S from "@krak-stack/notifications/admin/delivery.schema";
|
|
2
|
+
import { type DataTablePublicState } from "@krak-stack/registry/data-table";
|
|
3
|
+
import type { SendOperationsMessages } from "./operations.js";
|
|
4
|
+
export interface NotificationDeliveryMessages {
|
|
5
|
+
readonly common: SendOperationsMessages;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly description: string;
|
|
8
|
+
readonly source: string;
|
|
9
|
+
readonly sources: Readonly<Record<typeof S.DeliverySource.Type, string>>;
|
|
10
|
+
readonly recipientUserId: string;
|
|
11
|
+
readonly organizationId: string;
|
|
12
|
+
readonly workspaceId: string;
|
|
13
|
+
readonly template: string;
|
|
14
|
+
readonly purposes: Readonly<Record<(typeof S.AdminDelivery.Type)["purpose"], string>>;
|
|
15
|
+
readonly eventKey: string;
|
|
16
|
+
readonly references: string;
|
|
17
|
+
readonly feedbackNotice: string;
|
|
18
|
+
readonly feedbackCovered: string;
|
|
19
|
+
readonly feedbackUnavailable: string;
|
|
20
|
+
}
|
|
21
|
+
export interface NotificationDeliveriesProps {
|
|
22
|
+
readonly messages: NotificationDeliveryMessages;
|
|
23
|
+
readonly source: typeof S.DeliverySource.Type;
|
|
24
|
+
readonly onSource: (source: typeof S.DeliverySource.Type) => void;
|
|
25
|
+
readonly view: "overview" | "activity";
|
|
26
|
+
readonly onView: (view: "overview" | "activity") => void;
|
|
27
|
+
readonly overview?: typeof S.DeliveryOverview.Type;
|
|
28
|
+
readonly activity?: typeof S.AdminDeliveryPage.Type;
|
|
29
|
+
readonly table: DataTablePublicState;
|
|
30
|
+
readonly total: number;
|
|
31
|
+
readonly onTable: (table: DataTablePublicState) => void;
|
|
32
|
+
readonly pending: boolean;
|
|
33
|
+
readonly error?: string;
|
|
34
|
+
readonly inspection?: typeof S.AdminDeliveryInspection.Type;
|
|
35
|
+
readonly inspecting: boolean;
|
|
36
|
+
readonly inspectionError?: string;
|
|
37
|
+
readonly onInspect: (id: string | undefined) => void;
|
|
38
|
+
readonly onRefresh: () => void;
|
|
39
|
+
readonly onContact?: (id: string) => void;
|
|
40
|
+
readonly onCampaign?: (id: string) => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const NotificationDeliveries: (p: NotificationDeliveriesProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { Atom, AsyncResult } from "effect/reactivity";
|
|
2
|
+
import { type DeliveryOverview, type AdminDeliveryPage } from "@krak-stack/notifications/admin/delivery.schema";
|
|
3
|
+
import { NotificationScope } from "@krak-stack/notifications/schema";
|
|
4
|
+
export declare const deliveryQueryKey: (input: {
|
|
5
|
+
readonly view: "activity" | "overview";
|
|
6
|
+
readonly source?: "all" | "contacts" | "engine" | undefined;
|
|
7
|
+
readonly scope?: {
|
|
8
|
+
readonly recipientUserId: string | null;
|
|
9
|
+
readonly organizationId: string | null;
|
|
10
|
+
readonly workspaceId: string | null;
|
|
11
|
+
} | undefined;
|
|
12
|
+
readonly table: {
|
|
13
|
+
readonly page: number;
|
|
14
|
+
readonly pageSize: number;
|
|
15
|
+
readonly globalFilter?: string | undefined;
|
|
16
|
+
readonly filters?: readonly ({
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly kind: "text";
|
|
19
|
+
readonly operator: "contains" | "endsWith" | "equals" | "startsWith";
|
|
20
|
+
readonly value: string;
|
|
21
|
+
} | {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly kind: "values";
|
|
24
|
+
readonly values: readonly [string, ...string[]];
|
|
25
|
+
} | {
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly kind: "boolean";
|
|
28
|
+
readonly value: boolean;
|
|
29
|
+
} | {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly kind: "number";
|
|
32
|
+
readonly min?: number | undefined;
|
|
33
|
+
readonly max?: number | undefined;
|
|
34
|
+
} | {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly kind: "date";
|
|
37
|
+
readonly from?: string | undefined;
|
|
38
|
+
readonly to?: string | undefined;
|
|
39
|
+
})[] | undefined;
|
|
40
|
+
readonly sort?: readonly {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly direction: "asc" | "desc";
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
};
|
|
45
|
+
}, options?: import("effect/SchemaAST").ParseOptions) => string;
|
|
46
|
+
export declare const deliveryInspectionKey: (input: {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly queryKey: string;
|
|
49
|
+
}, options?: import("effect/SchemaAST").ParseOptions) => string;
|
|
50
|
+
interface Data {
|
|
51
|
+
readonly overview?: typeof DeliveryOverview.Type;
|
|
52
|
+
readonly activity?: typeof AdminDeliveryPage.Type;
|
|
53
|
+
}
|
|
54
|
+
interface Resource {
|
|
55
|
+
readonly atom: Atom.Atom<AsyncResult.AsyncResult<Data, unknown>>;
|
|
56
|
+
readonly refresh: Atom.Atom<unknown>;
|
|
57
|
+
}
|
|
58
|
+
export declare const makeNotificationDeliveryAtoms: (options: {
|
|
59
|
+
baseUrl: string;
|
|
60
|
+
authorizationKey: string;
|
|
61
|
+
scope?: NotificationScope;
|
|
62
|
+
}) => {
|
|
63
|
+
query: (arg: string) => Resource;
|
|
64
|
+
inspection: (arg: string) => Atom.Writable<AsyncResult.AsyncResult<{
|
|
65
|
+
readonly delivery: {
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly source: "contacts" | "engine";
|
|
68
|
+
readonly recipientUserId: string | null;
|
|
69
|
+
readonly organizationId: string | null;
|
|
70
|
+
readonly workspaceId: string | null;
|
|
71
|
+
readonly contactId: string | null;
|
|
72
|
+
readonly campaignId: string | null;
|
|
73
|
+
readonly campaignName: string | null;
|
|
74
|
+
readonly recipientAddress: string;
|
|
75
|
+
readonly recipientName: string | null;
|
|
76
|
+
readonly eventKey: string;
|
|
77
|
+
readonly purpose: "marketing" | "notification" | "transactional";
|
|
78
|
+
readonly template: string | null;
|
|
79
|
+
readonly status: "cancelled" | "failed" | "processing" | "queued" | "retrying" | "sent" | "suppressed";
|
|
80
|
+
readonly attempts: number;
|
|
81
|
+
readonly maxAttempts: number;
|
|
82
|
+
readonly provider: string | null;
|
|
83
|
+
readonly providerMessageId: string | null;
|
|
84
|
+
readonly errorMessage: string | null;
|
|
85
|
+
readonly createdAt: Date;
|
|
86
|
+
readonly updatedAt: Date;
|
|
87
|
+
readonly scheduledFor: Date;
|
|
88
|
+
readonly sentAt: Date | null;
|
|
89
|
+
};
|
|
90
|
+
readonly attempts: readonly {
|
|
91
|
+
readonly id: string;
|
|
92
|
+
readonly deliveryId: string;
|
|
93
|
+
readonly jobId: string;
|
|
94
|
+
readonly generation: number;
|
|
95
|
+
readonly attempt: number;
|
|
96
|
+
readonly outcome: {
|
|
97
|
+
readonly _tag: "Sent";
|
|
98
|
+
readonly provider: string;
|
|
99
|
+
readonly providerMessageId: string | null;
|
|
100
|
+
} | {
|
|
101
|
+
readonly _tag: "RetryableFailure";
|
|
102
|
+
readonly message: string;
|
|
103
|
+
readonly retryAfter: Date | null;
|
|
104
|
+
} | {
|
|
105
|
+
readonly _tag: "PermanentFailure";
|
|
106
|
+
readonly message: string;
|
|
107
|
+
} | {
|
|
108
|
+
readonly _tag: "Unavailable";
|
|
109
|
+
readonly message: string;
|
|
110
|
+
readonly retryAfter: Date | null;
|
|
111
|
+
} | {
|
|
112
|
+
readonly _tag: "Skipped";
|
|
113
|
+
readonly reason: "cancelled" | "deferred" | "expired" | "stale" | "suppressed" | "terminal";
|
|
114
|
+
} | null;
|
|
115
|
+
readonly queuedAt: Date;
|
|
116
|
+
readonly startedAt: Date | null;
|
|
117
|
+
readonly completedAt: Date | null;
|
|
118
|
+
readonly createdAt: Date;
|
|
119
|
+
}[];
|
|
120
|
+
readonly references: readonly {
|
|
121
|
+
readonly deliveryId: string;
|
|
122
|
+
readonly namespace: string;
|
|
123
|
+
readonly value: string;
|
|
124
|
+
readonly createdAt: Date;
|
|
125
|
+
}[];
|
|
126
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, Atom.Atom<AsyncResult.AsyncResult<AsyncResult.AsyncResult<{
|
|
127
|
+
readonly delivery: {
|
|
128
|
+
readonly id: string;
|
|
129
|
+
readonly source: "contacts" | "engine";
|
|
130
|
+
readonly recipientUserId: string | null;
|
|
131
|
+
readonly organizationId: string | null;
|
|
132
|
+
readonly workspaceId: string | null;
|
|
133
|
+
readonly contactId: string | null;
|
|
134
|
+
readonly campaignId: string | null;
|
|
135
|
+
readonly campaignName: string | null;
|
|
136
|
+
readonly recipientAddress: string;
|
|
137
|
+
readonly recipientName: string | null;
|
|
138
|
+
readonly eventKey: string;
|
|
139
|
+
readonly purpose: "marketing" | "notification" | "transactional";
|
|
140
|
+
readonly template: string | null;
|
|
141
|
+
readonly status: "cancelled" | "failed" | "processing" | "queued" | "retrying" | "sent" | "suppressed";
|
|
142
|
+
readonly attempts: number;
|
|
143
|
+
readonly maxAttempts: number;
|
|
144
|
+
readonly provider: string | null;
|
|
145
|
+
readonly providerMessageId: string | null;
|
|
146
|
+
readonly errorMessage: string | null;
|
|
147
|
+
readonly createdAt: Date;
|
|
148
|
+
readonly updatedAt: Date;
|
|
149
|
+
readonly scheduledFor: Date;
|
|
150
|
+
readonly sentAt: Date | null;
|
|
151
|
+
};
|
|
152
|
+
readonly attempts: readonly {
|
|
153
|
+
readonly id: string;
|
|
154
|
+
readonly deliveryId: string;
|
|
155
|
+
readonly jobId: string;
|
|
156
|
+
readonly generation: number;
|
|
157
|
+
readonly attempt: number;
|
|
158
|
+
readonly outcome: {
|
|
159
|
+
readonly _tag: "Sent";
|
|
160
|
+
readonly provider: string;
|
|
161
|
+
readonly providerMessageId: string | null;
|
|
162
|
+
} | {
|
|
163
|
+
readonly _tag: "RetryableFailure";
|
|
164
|
+
readonly message: string;
|
|
165
|
+
readonly retryAfter: Date | null;
|
|
166
|
+
} | {
|
|
167
|
+
readonly _tag: "PermanentFailure";
|
|
168
|
+
readonly message: string;
|
|
169
|
+
} | {
|
|
170
|
+
readonly _tag: "Unavailable";
|
|
171
|
+
readonly message: string;
|
|
172
|
+
readonly retryAfter: Date | null;
|
|
173
|
+
} | {
|
|
174
|
+
readonly _tag: "Skipped";
|
|
175
|
+
readonly reason: "cancelled" | "deferred" | "expired" | "stale" | "suppressed" | "terminal";
|
|
176
|
+
} | null;
|
|
177
|
+
readonly queuedAt: Date;
|
|
178
|
+
readonly startedAt: Date | null;
|
|
179
|
+
readonly completedAt: Date | null;
|
|
180
|
+
readonly createdAt: Date;
|
|
181
|
+
}[];
|
|
182
|
+
readonly references: readonly {
|
|
183
|
+
readonly deliveryId: string;
|
|
184
|
+
readonly namespace: string;
|
|
185
|
+
readonly value: string;
|
|
186
|
+
readonly createdAt: Date;
|
|
187
|
+
}[];
|
|
188
|
+
}, import("effect/http-api/HttpApiError").Forbidden | import("effect/http-api/HttpApiError").InternalServerError | import("@krak-stack/notifications/admin/schema").SendNotFound | import("@krak-stack/notifications/admin/schema").SendValidationError | import("effect/http-api/HttpApiError").Unauthorized>, unknown>>>;
|
|
189
|
+
authorizationKey: string;
|
|
190
|
+
scope: {
|
|
191
|
+
readonly recipientUserId: string | null;
|
|
192
|
+
readonly organizationId: string | null;
|
|
193
|
+
readonly workspaceId: string | null;
|
|
194
|
+
} | undefined;
|
|
195
|
+
};
|
|
196
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import"./chunk-tck9drx2.js";
|
|
2
|
+
import {
|
|
3
|
+
SendContacts2,
|
|
4
|
+
SendContactDetails2
|
|
5
|
+
} from "./chunk-t0qhq7pj.js";
|
|
6
|
+
import {
|
|
7
|
+
SendCampaignAdmin2
|
|
8
|
+
} from "./chunk-dxjvd9tb.js";
|
|
9
|
+
import {
|
|
10
|
+
NotificationDeliveries2
|
|
11
|
+
} from "./chunk-28xppc9m.js";
|
|
12
|
+
import {
|
|
13
|
+
NotificationPresentationProvider2
|
|
14
|
+
} from "./chunk-aqmv7g24.js";
|
|
15
|
+
import {
|
|
16
|
+
SendOperationsAdmin2
|
|
17
|
+
} from "./chunk-wkxc1y7w.js";
|
|
18
|
+
export {
|
|
19
|
+
SendCampaignAdmin2 as NotificationCampaigns,
|
|
20
|
+
SendContactDetails2 as NotificationContactDetails,
|
|
21
|
+
SendContacts2 as NotificationContacts,
|
|
22
|
+
NotificationDeliveries2 as NotificationDeliveries,
|
|
23
|
+
SendOperationsAdmin2 as NotificationOperations,
|
|
24
|
+
NotificationPresentationProvider2 as NotificationPresentationProvider,
|
|
25
|
+
SendCampaignAdmin2 as SendCampaignAdmin,
|
|
26
|
+
SendContactDetails2 as SendContactDetails,
|
|
27
|
+
SendContacts2 as SendContacts,
|
|
28
|
+
SendOperationsAdmin2 as SendOperationsAdmin
|
|
29
|
+
};
|