@bodhveda/js 0.3.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 +260 -0
- package/dist/cjs/bodhveda.d.ts +184 -0
- package/dist/cjs/bodhveda.d.ts.map +1 -0
- package/dist/cjs/bodhveda.js +181 -0
- package/dist/cjs/bodhveda.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/routes.d.ts +30 -0
- package/dist/cjs/routes.d.ts.map +1 -0
- package/dist/cjs/routes.js +33 -0
- package/dist/cjs/routes.js.map +1 -0
- package/dist/cjs/types.d.ts +363 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/bodhveda.d.ts +184 -0
- package/dist/esm/bodhveda.d.ts.map +1 -0
- package/dist/esm/bodhveda.js +174 -0
- package/dist/esm/bodhveda.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/routes.d.ts +30 -0
- package/dist/esm/routes.d.ts.map +1 -0
- package/dist/esm/routes.js +30 -0
- package/dist/esm/routes.js.map +1 -0
- package/dist/esm/types.d.ts +363 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { ROUTES } from "./routes";
|
|
3
|
+
/**
|
|
4
|
+
* Main class for initializing and interacting with the Bodhveda SDK.
|
|
5
|
+
*/
|
|
6
|
+
export class Bodhveda {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of the Bodhveda SDK.
|
|
9
|
+
* @param apiKey - The API key for authentication.
|
|
10
|
+
* @param options - Optional configuration options.
|
|
11
|
+
*/
|
|
12
|
+
constructor(apiKey, options = {}) {
|
|
13
|
+
const { apiURL = "https://api.bodhveda.com" } = options;
|
|
14
|
+
const client = axios.create({
|
|
15
|
+
baseURL: apiURL,
|
|
16
|
+
headers: {
|
|
17
|
+
"Content-Type": "application/json",
|
|
18
|
+
Authorization: `Bearer ${apiKey}`,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
client.interceptors.response.use((response) => response.data, // Unwrap the main data object from the response.
|
|
22
|
+
(error) => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
if (axios.isAxiosError(error) && ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data)) {
|
|
25
|
+
throw (_b = error.response) === null || _b === void 0 ? void 0 : _b.data; // Throw the API's error response directly.
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.notifications = new Notifications(client);
|
|
32
|
+
this.recipients = new Recipients(client);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Class for managing notifications.
|
|
37
|
+
*/
|
|
38
|
+
class Notifications {
|
|
39
|
+
/**
|
|
40
|
+
* Creates an instance of the Notifications class.
|
|
41
|
+
* @param client - The Axios client instance.
|
|
42
|
+
*/
|
|
43
|
+
constructor(client) {
|
|
44
|
+
this.client = client;
|
|
45
|
+
}
|
|
46
|
+
async send(req) {
|
|
47
|
+
const response = await this.client.post(ROUTES.notifications.send, req);
|
|
48
|
+
return response.data;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Class for managing recipients.
|
|
53
|
+
*/
|
|
54
|
+
class Recipients {
|
|
55
|
+
/**
|
|
56
|
+
* Creates an instance of the Recipients class.
|
|
57
|
+
* @param client - The Axios client instance.
|
|
58
|
+
*/
|
|
59
|
+
constructor(client) {
|
|
60
|
+
this.client = client;
|
|
61
|
+
this.notifications = new RecipientsNotifications(client);
|
|
62
|
+
this.preferences = new RecipientsPreferences(client);
|
|
63
|
+
this.contacts = new RecipientsContacts(client);
|
|
64
|
+
}
|
|
65
|
+
async create(req) {
|
|
66
|
+
const response = await this.client.post(ROUTES.recipients.create, req);
|
|
67
|
+
return response.data;
|
|
68
|
+
}
|
|
69
|
+
async createBatch(req) {
|
|
70
|
+
const response = await this.client.post(ROUTES.recipients.createBatch, req);
|
|
71
|
+
return response.data;
|
|
72
|
+
}
|
|
73
|
+
async get(recipientID) {
|
|
74
|
+
const response = await this.client.get(ROUTES.recipients.get(recipientID));
|
|
75
|
+
return response.data;
|
|
76
|
+
}
|
|
77
|
+
async update(recipientID, req) {
|
|
78
|
+
const response = await this.client.patch(ROUTES.recipients.update(recipientID), req);
|
|
79
|
+
return response.data;
|
|
80
|
+
}
|
|
81
|
+
async delete(recipientID) {
|
|
82
|
+
await this.client.delete(ROUTES.recipients.delete(recipientID));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Class for managing recipient notifications.
|
|
87
|
+
*/
|
|
88
|
+
class RecipientsNotifications {
|
|
89
|
+
/**
|
|
90
|
+
* Creates an instance of the RecipientsNotifications class.
|
|
91
|
+
* @param client - The Axios client instance.
|
|
92
|
+
*/
|
|
93
|
+
constructor(client) {
|
|
94
|
+
this.client = client;
|
|
95
|
+
}
|
|
96
|
+
async list(recipientID, req) {
|
|
97
|
+
const response = await this.client.get(ROUTES.recipients.notifications.list(recipientID), {
|
|
98
|
+
params: req,
|
|
99
|
+
});
|
|
100
|
+
return response.data;
|
|
101
|
+
}
|
|
102
|
+
async unreadCount(recipientID) {
|
|
103
|
+
const response = await this.client.get(ROUTES.recipients.notifications.unreadCount(recipientID));
|
|
104
|
+
return response.data;
|
|
105
|
+
}
|
|
106
|
+
async updateState(recipientID, req) {
|
|
107
|
+
const response = await this.client.patch(ROUTES.recipients.notifications.udpateState(recipientID), req);
|
|
108
|
+
return response.data;
|
|
109
|
+
}
|
|
110
|
+
async delete(recipientID, req) {
|
|
111
|
+
const response = await this.client.delete(ROUTES.recipients.notifications.delete(recipientID), {
|
|
112
|
+
data: req,
|
|
113
|
+
});
|
|
114
|
+
return response.data;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Class for managing recipient preferences.
|
|
119
|
+
*/
|
|
120
|
+
class RecipientsPreferences {
|
|
121
|
+
/**
|
|
122
|
+
* Creates an instance of the RecipientsPreferences class.
|
|
123
|
+
* @param client - The Axios client instance.
|
|
124
|
+
*/
|
|
125
|
+
constructor(client) {
|
|
126
|
+
this.client = client;
|
|
127
|
+
}
|
|
128
|
+
async list(recipientID) {
|
|
129
|
+
const response = await this.client.get(ROUTES.recipients.preferences.list(recipientID));
|
|
130
|
+
return response.data;
|
|
131
|
+
}
|
|
132
|
+
async set(recipientID, req) {
|
|
133
|
+
const response = await this.client.patch(ROUTES.recipients.preferences.set(recipientID), {
|
|
134
|
+
target: req.target,
|
|
135
|
+
medium: req.medium,
|
|
136
|
+
state: req.state,
|
|
137
|
+
});
|
|
138
|
+
return response.data;
|
|
139
|
+
}
|
|
140
|
+
async check(recipientID, req) {
|
|
141
|
+
const response = await this.client.get(ROUTES.recipients.preferences.check(recipientID), {
|
|
142
|
+
params: { ...req.target, medium: req.medium },
|
|
143
|
+
});
|
|
144
|
+
return response.data;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Class for managing recipient contacts.
|
|
149
|
+
*/
|
|
150
|
+
class RecipientsContacts {
|
|
151
|
+
/**
|
|
152
|
+
* Creates an instance of the RecipientsContacts class.
|
|
153
|
+
* @param client - The Axios client instance.
|
|
154
|
+
*/
|
|
155
|
+
constructor(client) {
|
|
156
|
+
this.client = client;
|
|
157
|
+
}
|
|
158
|
+
async list(recipientID) {
|
|
159
|
+
const response = await this.client.get(ROUTES.recipients.contacts.list(recipientID));
|
|
160
|
+
return response.data;
|
|
161
|
+
}
|
|
162
|
+
async create(recipientID, req) {
|
|
163
|
+
const response = await this.client.post(ROUTES.recipients.contacts.create(recipientID), req);
|
|
164
|
+
return response.data;
|
|
165
|
+
}
|
|
166
|
+
async update(recipientID, contactID, req) {
|
|
167
|
+
const response = await this.client.patch(ROUTES.recipients.contacts.update(recipientID, contactID), req);
|
|
168
|
+
return response.data;
|
|
169
|
+
}
|
|
170
|
+
async delete(recipientID, contactID) {
|
|
171
|
+
await this.client.delete(ROUTES.recipients.contacts.delete(recipientID, contactID));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=bodhveda.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bodhveda.js","sourceRoot":"","sources":["../../src/bodhveda.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AA8BzD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAuBlC;;GAEG;AACH,MAAM,OAAO,QAAQ;IAIjB;;;;OAIG;IACH,YAAY,MAAc,EAAE,UAA2B,EAAE;QACrD,MAAM,EAAE,MAAM,GAAG,0BAA0B,EAAE,GAAG,OAAO,CAAC;QAExD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YACxB,OAAO,EAAE,MAAM;YACf,OAAO,EAAE;gBACL,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,MAAM,EAAE;aACpC;SACJ,CAAC,CAAC;QAEH,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAC5B,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,iDAAiD;QAC9E,CAAC,KAAiB,EAAE,EAAE;;YAClB,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,KAAI,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,CAAA,EAAE,CAAC;gBACpD,MAAM,MAAA,KAA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AU,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,EACzD,GAAG,CACN,CAAC;QACF,OAAO,QAAQ,CAAC,IAAsC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,SAAiB;QAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CACpB,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAC5D,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const ROUTES: {
|
|
2
|
+
notifications: {
|
|
3
|
+
send: string;
|
|
4
|
+
};
|
|
5
|
+
recipients: {
|
|
6
|
+
create: string;
|
|
7
|
+
createBatch: string;
|
|
8
|
+
get: (recipientID: string) => string;
|
|
9
|
+
update: (recipientID: string) => string;
|
|
10
|
+
delete: (recipientID: string) => string;
|
|
11
|
+
notifications: {
|
|
12
|
+
list: (recipientID: string) => string;
|
|
13
|
+
unreadCount: (recipientID: string) => string;
|
|
14
|
+
udpateState: (recipientID: string) => string;
|
|
15
|
+
delete: (recipientID: string) => string;
|
|
16
|
+
};
|
|
17
|
+
preferences: {
|
|
18
|
+
list: (recipientID: string) => string;
|
|
19
|
+
set: (recipientID: string) => string;
|
|
20
|
+
check: (recipientID: string) => string;
|
|
21
|
+
};
|
|
22
|
+
contacts: {
|
|
23
|
+
list: (recipientID: string) => string;
|
|
24
|
+
create: (recipientID: string) => string;
|
|
25
|
+
update: (recipientID: string, contactID: number) => string;
|
|
26
|
+
delete: (recipientID: string, contactID: number) => string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;2BAQQ,MAAM;8BAEH,MAAM;8BAEN,MAAM;;gCAIJ,MAAM;uCAEC,MAAM;uCAIN,MAAM;kCAEX,MAAM;;;gCAKR,MAAM;+BAEP,MAAM;iCAEJ,MAAM;;;gCAOP,MAAM;kCAEJ,MAAM;kCAEN,MAAM,aAAa,MAAM;kCAIzB,MAAM,aAAa,MAAM;;;CAM1D,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const ROUTES = {
|
|
2
|
+
notifications: {
|
|
3
|
+
send: "/notifications/send",
|
|
4
|
+
},
|
|
5
|
+
recipients: {
|
|
6
|
+
create: "/recipients",
|
|
7
|
+
createBatch: "/recipients/batch",
|
|
8
|
+
get: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}`,
|
|
9
|
+
update: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}`,
|
|
10
|
+
delete: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}`,
|
|
11
|
+
notifications: {
|
|
12
|
+
list: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/notifications`,
|
|
13
|
+
unreadCount: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/notifications/unread-count`,
|
|
14
|
+
udpateState: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/notifications`,
|
|
15
|
+
delete: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/notifications`,
|
|
16
|
+
},
|
|
17
|
+
preferences: {
|
|
18
|
+
list: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/preferences`,
|
|
19
|
+
set: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/preferences`,
|
|
20
|
+
check: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/preferences/check`,
|
|
21
|
+
},
|
|
22
|
+
contacts: {
|
|
23
|
+
list: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/contacts`,
|
|
24
|
+
create: (recipientID) => `/recipients/${encodeURIComponent(recipientID)}/contacts`,
|
|
25
|
+
update: (recipientID, contactID) => `/recipients/${encodeURIComponent(recipientID)}/contacts/${contactID}`,
|
|
26
|
+
delete: (recipientID, contactID) => `/recipients/${encodeURIComponent(recipientID)}/contacts/${contactID}`,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,aAAa,EAAE;QACX,IAAI,EAAE,qBAAqB;KAC9B;IAED,UAAU,EAAE;QACR,MAAM,EAAE,aAAa;QACrB,WAAW,EAAE,mBAAmB;QAChC,GAAG,EAAE,CAAC,WAAmB,EAAE,EAAE,CACzB,eAAe,kBAAkB,CAAC,WAAW,CAAC,EAAE;QACpD,MAAM,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC5B,eAAe,kBAAkB,CAAC,WAAW,CAAC,EAAE;QACpD,MAAM,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC5B,eAAe,kBAAkB,CAAC,WAAW,CAAC,EAAE;QAEpD,aAAa,EAAE;YACX,IAAI,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC1B,eAAe,kBAAkB,CAAC,WAAW,CAAC,gBAAgB;YAClE,WAAW,EAAE,CAAC,WAAmB,EAAE,EAAE,CACjC,eAAe,kBAAkB,CAC7B,WAAW,CACd,6BAA6B;YAClC,WAAW,EAAE,CAAC,WAAmB,EAAE,EAAE,CACjC,eAAe,kBAAkB,CAAC,WAAW,CAAC,gBAAgB;YAClE,MAAM,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC5B,eAAe,kBAAkB,CAAC,WAAW,CAAC,gBAAgB;SACrE;QAED,WAAW,EAAE;YACT,IAAI,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC1B,eAAe,kBAAkB,CAAC,WAAW,CAAC,cAAc;YAChE,GAAG,EAAE,CAAC,WAAmB,EAAE,EAAE,CACzB,eAAe,kBAAkB,CAAC,WAAW,CAAC,cAAc;YAChE,KAAK,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC3B,eAAe,kBAAkB,CAC7B,WAAW,CACd,oBAAoB;SAC5B;QAED,QAAQ,EAAE;YACN,IAAI,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC1B,eAAe,kBAAkB,CAAC,WAAW,CAAC,WAAW;YAC7D,MAAM,EAAE,CAAC,WAAmB,EAAE,EAAE,CAC5B,eAAe,kBAAkB,CAAC,WAAW,CAAC,WAAW;YAC7D,MAAM,EAAE,CAAC,WAAmB,EAAE,SAAiB,EAAE,EAAE,CAC/C,eAAe,kBAAkB,CAC7B,WAAW,CACd,aAAa,SAAS,EAAE;YAC7B,MAAM,EAAE,CAAC,WAAmB,EAAE,SAAiB,EAAE,EAAE,CAC/C,eAAe,kBAAkB,CAC7B,WAAW,CACd,aAAa,SAAS,EAAE;SAChC;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a target for notifications.
|
|
3
|
+
*/
|
|
4
|
+
export interface Target {
|
|
5
|
+
channel: string;
|
|
6
|
+
topic: string;
|
|
7
|
+
event: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A medium a preference applies to. In-app and email are toggled independently
|
|
11
|
+
* for the same target.
|
|
12
|
+
*/
|
|
13
|
+
export type PreferenceMedium = "in_app" | "email";
|
|
14
|
+
/**
|
|
15
|
+
* Represents a preference target, extending the Target interface.
|
|
16
|
+
*/
|
|
17
|
+
export interface TargetWithLabel extends Target {
|
|
18
|
+
/**
|
|
19
|
+
* The medium this preference applies to (`in_app` or `email`).
|
|
20
|
+
*/
|
|
21
|
+
medium?: PreferenceMedium;
|
|
22
|
+
label?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Represents the state of a preference that was just written. It describes the
|
|
26
|
+
* stored rule, so it carries no catalog context — reads answer a different
|
|
27
|
+
* question and reply with {@link ResolvedPreferenceState}.
|
|
28
|
+
*/
|
|
29
|
+
export interface PreferenceState {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* `true` when the recipient has no rule of their own for this exact
|
|
33
|
+
* (target, medium).
|
|
34
|
+
*/
|
|
35
|
+
inherited: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* What a preference read returns: whether a send would ACTUALLY deliver, plus
|
|
39
|
+
* the context to explain it.
|
|
40
|
+
*/
|
|
41
|
+
export interface ResolvedPreferenceState {
|
|
42
|
+
/**
|
|
43
|
+
* The resolved decision — what a send to this (target, medium) would do.
|
|
44
|
+
*
|
|
45
|
+
* This is not a stored flag. It is resolved through the recipient's exact
|
|
46
|
+
* rule, their `topic: "any"` rule, the project's exact rule, the project's
|
|
47
|
+
* `topic: "any"` rule, and finally the medium's default — `in_app` delivers,
|
|
48
|
+
* every other medium does not.
|
|
49
|
+
*/
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* `true` when the recipient has no rule of their own for this exact
|
|
53
|
+
* (target, medium); the value came from elsewhere in the cascade.
|
|
54
|
+
*/
|
|
55
|
+
inherited: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether a project-level rule exists for this exact (target, medium).
|
|
58
|
+
*
|
|
59
|
+
* Context for deciding what to render, **not** a gate: an explicit recipient
|
|
60
|
+
* rule on an uncataloged pair still delivers, and `in_app` delivers by
|
|
61
|
+
* default with no catalog entry at all. `enabled` is the answer.
|
|
62
|
+
*/
|
|
63
|
+
cataloged: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Represents a resolved preference with a target and state.
|
|
67
|
+
*/
|
|
68
|
+
export interface Preference {
|
|
69
|
+
target: TargetWithLabel;
|
|
70
|
+
state: ResolvedPreferenceState;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Represents the state of a notification.
|
|
74
|
+
*/
|
|
75
|
+
export interface NotificationState {
|
|
76
|
+
opened: boolean;
|
|
77
|
+
read: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Represents a notification.
|
|
81
|
+
*/
|
|
82
|
+
export interface Notification {
|
|
83
|
+
id: number;
|
|
84
|
+
recipient_id: string;
|
|
85
|
+
payload: unknown;
|
|
86
|
+
target: Target;
|
|
87
|
+
state: NotificationState;
|
|
88
|
+
broadcast_id: number | null;
|
|
89
|
+
created_at: string;
|
|
90
|
+
updated_at: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Represents a broadcast.
|
|
94
|
+
*/
|
|
95
|
+
export interface Broadcast {
|
|
96
|
+
id: number;
|
|
97
|
+
payload: unknown;
|
|
98
|
+
target: Target;
|
|
99
|
+
created_at: string;
|
|
100
|
+
updated_at: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Represents a recipient.
|
|
104
|
+
*/
|
|
105
|
+
export interface Recipient {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
created_at: string;
|
|
109
|
+
updated_at: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Represents a request to create a recipient.
|
|
113
|
+
*/
|
|
114
|
+
export interface CreateRecipientRequest {
|
|
115
|
+
id: string;
|
|
116
|
+
name?: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Represents the response after creating a recipient.
|
|
120
|
+
*/
|
|
121
|
+
export interface CreateRecipientResponse extends Recipient {
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Represents a request to create multiple recipients in a batch.
|
|
125
|
+
*/
|
|
126
|
+
export interface CreateRecipientsBatchRequest {
|
|
127
|
+
recipients: CreateRecipientRequest[];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Represents a result item for batch creation of recipients.
|
|
131
|
+
*/
|
|
132
|
+
interface BatchCreateRecipientResultItem {
|
|
133
|
+
id: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Represents a result item with error details for batch creation of recipients.
|
|
137
|
+
*/
|
|
138
|
+
interface BatchCreatereRecicpientResultItemWithError extends BatchCreateRecipientResultItem {
|
|
139
|
+
batch_index: number;
|
|
140
|
+
errors: {
|
|
141
|
+
message: string;
|
|
142
|
+
description: string;
|
|
143
|
+
property_path?: string;
|
|
144
|
+
invalid_value?: unknown;
|
|
145
|
+
}[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Represents the response after creating multiple recipients in a batch.
|
|
149
|
+
*/
|
|
150
|
+
export interface CreateRecipientsBatchResponse {
|
|
151
|
+
created: BatchCreateRecipientResultItem[];
|
|
152
|
+
updated: BatchCreateRecipientResultItem[];
|
|
153
|
+
failed: BatchCreatereRecicpientResultItemWithError[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Represents the response after retrieving a recipient.
|
|
157
|
+
*/
|
|
158
|
+
export interface GetRecipientResponse extends Recipient {
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Represents a request to update a recipient.
|
|
162
|
+
*/
|
|
163
|
+
export interface UpdateRecipientRequest {
|
|
164
|
+
name?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Represents the response after updating a recipient.
|
|
168
|
+
*/
|
|
169
|
+
export interface UpdateRecipientResponse extends Recipient {
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Typed email content for a send. Its presence makes email eligible for this
|
|
173
|
+
* send (direct-only); absence means no email. Bodhveda is a pass-through — the
|
|
174
|
+
* caller renders its own template and passes the result. `subject` is required
|
|
175
|
+
* and at least one of `html`/`text` must be set; `text` is recommended for
|
|
176
|
+
* deliverability and is auto-derived from `html` when omitted.
|
|
177
|
+
*/
|
|
178
|
+
export interface EmailContent {
|
|
179
|
+
subject: string;
|
|
180
|
+
html?: string;
|
|
181
|
+
text?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Represents a request to send a notification.
|
|
185
|
+
*/
|
|
186
|
+
export interface SendNotificationRequest {
|
|
187
|
+
payload: unknown;
|
|
188
|
+
recipient_id?: string;
|
|
189
|
+
target?: Target;
|
|
190
|
+
/**
|
|
191
|
+
* Optional typed email block. Present ⇒ email is attempted (direct sends
|
|
192
|
+
* only); absent ⇒ no email. Gated by catalog + per-medium preference + a
|
|
193
|
+
* primary email contact.
|
|
194
|
+
*/
|
|
195
|
+
email?: EmailContent;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* A per-medium delivery outcome returned on a direct send (email in v1).
|
|
199
|
+
*/
|
|
200
|
+
export interface NotificationDelivery {
|
|
201
|
+
medium: string;
|
|
202
|
+
status: string;
|
|
203
|
+
address?: string;
|
|
204
|
+
failure_reason?: string;
|
|
205
|
+
created_at: string;
|
|
206
|
+
updated_at: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Represents the response after sending a notification.
|
|
210
|
+
*/
|
|
211
|
+
export interface SendNotificationResponse {
|
|
212
|
+
notification: Notification | null;
|
|
213
|
+
broadcast: Broadcast | null;
|
|
214
|
+
/**
|
|
215
|
+
* Per-medium delivery outcomes for a direct send (email). A partial-medium
|
|
216
|
+
* failure never rejects the send — the outcome is reported here.
|
|
217
|
+
*/
|
|
218
|
+
deliveries?: NotificationDelivery[];
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Represents a request to list notifications.
|
|
222
|
+
*/
|
|
223
|
+
export interface ListNotificationsRequest {
|
|
224
|
+
limit?: number;
|
|
225
|
+
before?: string;
|
|
226
|
+
after?: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Represents the response after listing notifications.
|
|
230
|
+
*/
|
|
231
|
+
export interface ListNotificationsResponse {
|
|
232
|
+
notifications: Notification[];
|
|
233
|
+
cursor: {
|
|
234
|
+
before: string | null;
|
|
235
|
+
after: string | null;
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Represents the response with the count of unread notifications.
|
|
240
|
+
*/
|
|
241
|
+
export interface UnreadCountResponse {
|
|
242
|
+
unread_count: number;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Represents a request to update the state of notifications.
|
|
246
|
+
*/
|
|
247
|
+
export interface UpdateNotificationsStateRequest {
|
|
248
|
+
ids: number[];
|
|
249
|
+
state: Partial<NotificationState>;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Represents the response after updating the state of notifications.
|
|
253
|
+
*/
|
|
254
|
+
export interface UpdateNotificationsStateResponse {
|
|
255
|
+
updated_count: number;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Represents a request to delete notifications.
|
|
259
|
+
*/
|
|
260
|
+
export interface DeleteNotificationsRequest {
|
|
261
|
+
ids: number[];
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Represents the response after deleting notifications.
|
|
265
|
+
*/
|
|
266
|
+
export interface DeleteNotificationsResponse {
|
|
267
|
+
deleted_count: number;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Represents the response after listing preferences.
|
|
271
|
+
*/
|
|
272
|
+
export interface ListPreferencesResponse {
|
|
273
|
+
preferences: Preference[];
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Represents a request to set a preference.
|
|
277
|
+
*/
|
|
278
|
+
export interface SetPreferenceRequest {
|
|
279
|
+
target: Target;
|
|
280
|
+
/**
|
|
281
|
+
* The medium this preference applies to. Defaults to `in_app` when omitted.
|
|
282
|
+
*/
|
|
283
|
+
medium?: PreferenceMedium;
|
|
284
|
+
state: {
|
|
285
|
+
enabled: boolean;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Represents the response after setting a preference.
|
|
290
|
+
*/
|
|
291
|
+
export interface SetPreferenceResponse {
|
|
292
|
+
target: TargetWithLabel;
|
|
293
|
+
state: PreferenceState;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Represents a request to check a preference.
|
|
297
|
+
*/
|
|
298
|
+
export interface CheckPreferenceRequest {
|
|
299
|
+
target: Target;
|
|
300
|
+
/**
|
|
301
|
+
* The medium to check. Defaults to `in_app` when omitted.
|
|
302
|
+
*/
|
|
303
|
+
medium?: PreferenceMedium;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Represents the response after checking a preference. The target need not be
|
|
307
|
+
* cataloged, or stored at all — any (channel, topic, event) resolves.
|
|
308
|
+
*/
|
|
309
|
+
export interface CheckPreferenceResponse {
|
|
310
|
+
target: TargetWithLabel;
|
|
311
|
+
state: ResolvedPreferenceState;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* A delivery transport a recipient contact can be registered for. Only `email`
|
|
315
|
+
* is exercised today; the rest are reserved for future transports.
|
|
316
|
+
*/
|
|
317
|
+
export type Medium = "email" | "sms" | "web_push" | "mobile_push";
|
|
318
|
+
/**
|
|
319
|
+
* Represents a per-medium contact address for a recipient.
|
|
320
|
+
*/
|
|
321
|
+
export interface RecipientContact {
|
|
322
|
+
id: number;
|
|
323
|
+
medium: Medium;
|
|
324
|
+
address: string;
|
|
325
|
+
is_primary: boolean;
|
|
326
|
+
verified_at: string | null;
|
|
327
|
+
created_at: string;
|
|
328
|
+
updated_at: string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Represents a request to add a contact to a recipient.
|
|
332
|
+
*/
|
|
333
|
+
export interface CreateRecipientContactRequest {
|
|
334
|
+
medium: Medium;
|
|
335
|
+
address: string;
|
|
336
|
+
is_primary?: boolean;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Represents the response after creating a recipient contact.
|
|
340
|
+
*/
|
|
341
|
+
export interface CreateRecipientContactResponse extends RecipientContact {
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Represents the response after listing a recipient's contacts.
|
|
345
|
+
*/
|
|
346
|
+
export interface ListRecipientContactsResponse {
|
|
347
|
+
contacts: RecipientContact[];
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Represents a request to update a recipient's contact. Both fields are
|
|
351
|
+
* optional; a changed address invalidates the contact's verification.
|
|
352
|
+
*/
|
|
353
|
+
export interface UpdateRecipientContactRequest {
|
|
354
|
+
address?: string;
|
|
355
|
+
is_primary?: boolean;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Represents the response after updating a recipient contact.
|
|
359
|
+
*/
|
|
360
|
+
export interface UpdateRecipientContactResponse extends RecipientContact {
|
|
361
|
+
}
|
|
362
|
+
export {};
|
|
363
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,OAAO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