@medalsocial/sdk 0.1.2 → 1.1.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.
@@ -0,0 +1,436 @@
1
+ import Medal, { ApiResponse, EmailSendResult, ContactCreateResult, ContactNoteResult, ConsentResult, DealCreateResult } from '../src/index.mjs';
2
+ import { z } from 'zod';
3
+
4
+ declare const SendEmailSchema: z.ZodObject<{
5
+ template_slug: z.ZodString;
6
+ to: z.ZodString;
7
+ name: z.ZodOptional<z.ZodString>;
8
+ locale: z.ZodOptional<z.ZodString>;
9
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ template_slug: string;
12
+ to: string;
13
+ name?: string | undefined;
14
+ locale?: string | undefined;
15
+ variables?: Record<string, string> | undefined;
16
+ }, {
17
+ template_slug: string;
18
+ to: string;
19
+ name?: string | undefined;
20
+ locale?: string | undefined;
21
+ variables?: Record<string, string> | undefined;
22
+ }>;
23
+ declare const CreateContactSchema: z.ZodObject<{
24
+ email: z.ZodString;
25
+ first_name: z.ZodOptional<z.ZodString>;
26
+ last_name: z.ZodOptional<z.ZodString>;
27
+ phone: z.ZodOptional<z.ZodString>;
28
+ company: z.ZodOptional<z.ZodString>;
29
+ job_title: z.ZodOptional<z.ZodString>;
30
+ status: z.ZodOptional<z.ZodEnum<["lead", "prospect", "customer", "churned", "archived"]>>;
31
+ notes: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ email: string;
34
+ status?: "lead" | "prospect" | "customer" | "churned" | "archived" | undefined;
35
+ first_name?: string | undefined;
36
+ last_name?: string | undefined;
37
+ phone?: string | undefined;
38
+ company?: string | undefined;
39
+ job_title?: string | undefined;
40
+ notes?: string | undefined;
41
+ }, {
42
+ email: string;
43
+ status?: "lead" | "prospect" | "customer" | "churned" | "archived" | undefined;
44
+ first_name?: string | undefined;
45
+ last_name?: string | undefined;
46
+ phone?: string | undefined;
47
+ company?: string | undefined;
48
+ job_title?: string | undefined;
49
+ notes?: string | undefined;
50
+ }>;
51
+ declare const AddContactNoteSchema: z.ZodObject<{
52
+ contactId: z.ZodString;
53
+ content: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ contactId: string;
56
+ content: string;
57
+ }, {
58
+ contactId: string;
59
+ content: string;
60
+ }>;
61
+ declare const CookieConsentSchema: z.ZodObject<{
62
+ domain: z.ZodString;
63
+ consentStatus: z.ZodEnum<["granted", "denied", "partial"]>;
64
+ consentTimestamp: z.ZodString;
65
+ ipAddress: z.ZodOptional<z.ZodString>;
66
+ userAgent: z.ZodOptional<z.ZodString>;
67
+ cookiePreferences: z.ZodObject<{
68
+ necessary: z.ZodOptional<z.ZodObject<{
69
+ allowed: z.ZodBoolean;
70
+ }, "strip", z.ZodTypeAny, {
71
+ allowed: boolean;
72
+ }, {
73
+ allowed: boolean;
74
+ }>>;
75
+ analytics: z.ZodOptional<z.ZodObject<{
76
+ allowed: z.ZodBoolean;
77
+ }, "strip", z.ZodTypeAny, {
78
+ allowed: boolean;
79
+ }, {
80
+ allowed: boolean;
81
+ }>>;
82
+ marketing: z.ZodOptional<z.ZodObject<{
83
+ allowed: z.ZodBoolean;
84
+ }, "strip", z.ZodTypeAny, {
85
+ allowed: boolean;
86
+ }, {
87
+ allowed: boolean;
88
+ }>>;
89
+ functional: z.ZodOptional<z.ZodObject<{
90
+ allowed: z.ZodBoolean;
91
+ }, "strip", z.ZodTypeAny, {
92
+ allowed: boolean;
93
+ }, {
94
+ allowed: boolean;
95
+ }>>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ necessary?: {
98
+ allowed: boolean;
99
+ } | undefined;
100
+ analytics?: {
101
+ allowed: boolean;
102
+ } | undefined;
103
+ marketing?: {
104
+ allowed: boolean;
105
+ } | undefined;
106
+ functional?: {
107
+ allowed: boolean;
108
+ } | undefined;
109
+ }, {
110
+ necessary?: {
111
+ allowed: boolean;
112
+ } | undefined;
113
+ analytics?: {
114
+ allowed: boolean;
115
+ } | undefined;
116
+ marketing?: {
117
+ allowed: boolean;
118
+ } | undefined;
119
+ functional?: {
120
+ allowed: boolean;
121
+ } | undefined;
122
+ }>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ domain: string;
125
+ consentStatus: "granted" | "denied" | "partial";
126
+ consentTimestamp: string;
127
+ cookiePreferences: {
128
+ necessary?: {
129
+ allowed: boolean;
130
+ } | undefined;
131
+ analytics?: {
132
+ allowed: boolean;
133
+ } | undefined;
134
+ marketing?: {
135
+ allowed: boolean;
136
+ } | undefined;
137
+ functional?: {
138
+ allowed: boolean;
139
+ } | undefined;
140
+ };
141
+ ipAddress?: string | undefined;
142
+ userAgent?: string | undefined;
143
+ }, {
144
+ domain: string;
145
+ consentStatus: "granted" | "denied" | "partial";
146
+ consentTimestamp: string;
147
+ cookiePreferences: {
148
+ necessary?: {
149
+ allowed: boolean;
150
+ } | undefined;
151
+ analytics?: {
152
+ allowed: boolean;
153
+ } | undefined;
154
+ marketing?: {
155
+ allowed: boolean;
156
+ } | undefined;
157
+ functional?: {
158
+ allowed: boolean;
159
+ } | undefined;
160
+ };
161
+ ipAddress?: string | undefined;
162
+ userAgent?: string | undefined;
163
+ }>;
164
+ declare const RecordConsentSchema: z.ZodObject<{
165
+ email: z.ZodString;
166
+ consent_type: z.ZodEnum<["marketing_email", "analytics_tracking", "third_party_sharing"]>;
167
+ granted: z.ZodBoolean;
168
+ source: z.ZodOptional<z.ZodString>;
169
+ ip_address: z.ZodOptional<z.ZodString>;
170
+ }, "strip", z.ZodTypeAny, {
171
+ email: string;
172
+ granted: boolean;
173
+ consent_type: "marketing_email" | "analytics_tracking" | "third_party_sharing";
174
+ source?: string | undefined;
175
+ ip_address?: string | undefined;
176
+ }, {
177
+ email: string;
178
+ granted: boolean;
179
+ consent_type: "marketing_email" | "analytics_tracking" | "third_party_sharing";
180
+ source?: string | undefined;
181
+ ip_address?: string | undefined;
182
+ }>;
183
+ declare const CreateDealSchema: z.ZodObject<{
184
+ title: z.ZodString;
185
+ description: z.ZodOptional<z.ZodString>;
186
+ value: z.ZodOptional<z.ZodNumber>;
187
+ currency: z.ZodOptional<z.ZodString>;
188
+ contact_email: z.ZodOptional<z.ZodString>;
189
+ notes: z.ZodOptional<z.ZodString>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ title: string;
192
+ value?: number | undefined;
193
+ notes?: string | undefined;
194
+ description?: string | undefined;
195
+ currency?: string | undefined;
196
+ contact_email?: string | undefined;
197
+ }, {
198
+ title: string;
199
+ value?: number | undefined;
200
+ notes?: string | undefined;
201
+ description?: string | undefined;
202
+ currency?: string | undefined;
203
+ contact_email?: string | undefined;
204
+ }>;
205
+ declare function createMedalTools(client: Medal): {
206
+ sendEmail: {
207
+ description: string;
208
+ parameters: z.ZodObject<{
209
+ template_slug: z.ZodString;
210
+ to: z.ZodString;
211
+ name: z.ZodOptional<z.ZodString>;
212
+ locale: z.ZodOptional<z.ZodString>;
213
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ template_slug: string;
216
+ to: string;
217
+ name?: string | undefined;
218
+ locale?: string | undefined;
219
+ variables?: Record<string, string> | undefined;
220
+ }, {
221
+ template_slug: string;
222
+ to: string;
223
+ name?: string | undefined;
224
+ locale?: string | undefined;
225
+ variables?: Record<string, string> | undefined;
226
+ }>;
227
+ execute: (args: z.infer<typeof SendEmailSchema>) => Promise<ApiResponse<EmailSendResult>>;
228
+ };
229
+ createContact: {
230
+ description: string;
231
+ parameters: z.ZodObject<{
232
+ email: z.ZodString;
233
+ first_name: z.ZodOptional<z.ZodString>;
234
+ last_name: z.ZodOptional<z.ZodString>;
235
+ phone: z.ZodOptional<z.ZodString>;
236
+ company: z.ZodOptional<z.ZodString>;
237
+ job_title: z.ZodOptional<z.ZodString>;
238
+ status: z.ZodOptional<z.ZodEnum<["lead", "prospect", "customer", "churned", "archived"]>>;
239
+ notes: z.ZodOptional<z.ZodString>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ email: string;
242
+ status?: "lead" | "prospect" | "customer" | "churned" | "archived" | undefined;
243
+ first_name?: string | undefined;
244
+ last_name?: string | undefined;
245
+ phone?: string | undefined;
246
+ company?: string | undefined;
247
+ job_title?: string | undefined;
248
+ notes?: string | undefined;
249
+ }, {
250
+ email: string;
251
+ status?: "lead" | "prospect" | "customer" | "churned" | "archived" | undefined;
252
+ first_name?: string | undefined;
253
+ last_name?: string | undefined;
254
+ phone?: string | undefined;
255
+ company?: string | undefined;
256
+ job_title?: string | undefined;
257
+ notes?: string | undefined;
258
+ }>;
259
+ execute: (args: z.infer<typeof CreateContactSchema>) => Promise<ApiResponse<ContactCreateResult>>;
260
+ };
261
+ addContactNote: {
262
+ description: string;
263
+ parameters: z.ZodObject<{
264
+ contactId: z.ZodString;
265
+ content: z.ZodString;
266
+ }, "strip", z.ZodTypeAny, {
267
+ contactId: string;
268
+ content: string;
269
+ }, {
270
+ contactId: string;
271
+ content: string;
272
+ }>;
273
+ execute: (args: z.infer<typeof AddContactNoteSchema>) => Promise<ApiResponse<ContactNoteResult>>;
274
+ };
275
+ recordCookieConsent: {
276
+ description: string;
277
+ parameters: z.ZodObject<{
278
+ domain: z.ZodString;
279
+ consentStatus: z.ZodEnum<["granted", "denied", "partial"]>;
280
+ consentTimestamp: z.ZodString;
281
+ ipAddress: z.ZodOptional<z.ZodString>;
282
+ userAgent: z.ZodOptional<z.ZodString>;
283
+ cookiePreferences: z.ZodObject<{
284
+ necessary: z.ZodOptional<z.ZodObject<{
285
+ allowed: z.ZodBoolean;
286
+ }, "strip", z.ZodTypeAny, {
287
+ allowed: boolean;
288
+ }, {
289
+ allowed: boolean;
290
+ }>>;
291
+ analytics: z.ZodOptional<z.ZodObject<{
292
+ allowed: z.ZodBoolean;
293
+ }, "strip", z.ZodTypeAny, {
294
+ allowed: boolean;
295
+ }, {
296
+ allowed: boolean;
297
+ }>>;
298
+ marketing: z.ZodOptional<z.ZodObject<{
299
+ allowed: z.ZodBoolean;
300
+ }, "strip", z.ZodTypeAny, {
301
+ allowed: boolean;
302
+ }, {
303
+ allowed: boolean;
304
+ }>>;
305
+ functional: z.ZodOptional<z.ZodObject<{
306
+ allowed: z.ZodBoolean;
307
+ }, "strip", z.ZodTypeAny, {
308
+ allowed: boolean;
309
+ }, {
310
+ allowed: boolean;
311
+ }>>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ necessary?: {
314
+ allowed: boolean;
315
+ } | undefined;
316
+ analytics?: {
317
+ allowed: boolean;
318
+ } | undefined;
319
+ marketing?: {
320
+ allowed: boolean;
321
+ } | undefined;
322
+ functional?: {
323
+ allowed: boolean;
324
+ } | undefined;
325
+ }, {
326
+ necessary?: {
327
+ allowed: boolean;
328
+ } | undefined;
329
+ analytics?: {
330
+ allowed: boolean;
331
+ } | undefined;
332
+ marketing?: {
333
+ allowed: boolean;
334
+ } | undefined;
335
+ functional?: {
336
+ allowed: boolean;
337
+ } | undefined;
338
+ }>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ domain: string;
341
+ consentStatus: "granted" | "denied" | "partial";
342
+ consentTimestamp: string;
343
+ cookiePreferences: {
344
+ necessary?: {
345
+ allowed: boolean;
346
+ } | undefined;
347
+ analytics?: {
348
+ allowed: boolean;
349
+ } | undefined;
350
+ marketing?: {
351
+ allowed: boolean;
352
+ } | undefined;
353
+ functional?: {
354
+ allowed: boolean;
355
+ } | undefined;
356
+ };
357
+ ipAddress?: string | undefined;
358
+ userAgent?: string | undefined;
359
+ }, {
360
+ domain: string;
361
+ consentStatus: "granted" | "denied" | "partial";
362
+ consentTimestamp: string;
363
+ cookiePreferences: {
364
+ necessary?: {
365
+ allowed: boolean;
366
+ } | undefined;
367
+ analytics?: {
368
+ allowed: boolean;
369
+ } | undefined;
370
+ marketing?: {
371
+ allowed: boolean;
372
+ } | undefined;
373
+ functional?: {
374
+ allowed: boolean;
375
+ } | undefined;
376
+ };
377
+ ipAddress?: string | undefined;
378
+ userAgent?: string | undefined;
379
+ }>;
380
+ execute: (args: z.infer<typeof CookieConsentSchema>) => Promise<{
381
+ success: boolean;
382
+ logId?: string;
383
+ }>;
384
+ };
385
+ recordConsent: {
386
+ description: string;
387
+ parameters: z.ZodObject<{
388
+ email: z.ZodString;
389
+ consent_type: z.ZodEnum<["marketing_email", "analytics_tracking", "third_party_sharing"]>;
390
+ granted: z.ZodBoolean;
391
+ source: z.ZodOptional<z.ZodString>;
392
+ ip_address: z.ZodOptional<z.ZodString>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ email: string;
395
+ granted: boolean;
396
+ consent_type: "marketing_email" | "analytics_tracking" | "third_party_sharing";
397
+ source?: string | undefined;
398
+ ip_address?: string | undefined;
399
+ }, {
400
+ email: string;
401
+ granted: boolean;
402
+ consent_type: "marketing_email" | "analytics_tracking" | "third_party_sharing";
403
+ source?: string | undefined;
404
+ ip_address?: string | undefined;
405
+ }>;
406
+ execute: (args: z.infer<typeof RecordConsentSchema>) => Promise<ApiResponse<ConsentResult>>;
407
+ };
408
+ createDeal: {
409
+ description: string;
410
+ parameters: z.ZodObject<{
411
+ title: z.ZodString;
412
+ description: z.ZodOptional<z.ZodString>;
413
+ value: z.ZodOptional<z.ZodNumber>;
414
+ currency: z.ZodOptional<z.ZodString>;
415
+ contact_email: z.ZodOptional<z.ZodString>;
416
+ notes: z.ZodOptional<z.ZodString>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ title: string;
419
+ value?: number | undefined;
420
+ notes?: string | undefined;
421
+ description?: string | undefined;
422
+ currency?: string | undefined;
423
+ contact_email?: string | undefined;
424
+ }, {
425
+ title: string;
426
+ value?: number | undefined;
427
+ notes?: string | undefined;
428
+ description?: string | undefined;
429
+ currency?: string | undefined;
430
+ contact_email?: string | undefined;
431
+ }>;
432
+ execute: (args: z.infer<typeof CreateDealSchema>) => Promise<ApiResponse<DealCreateResult>>;
433
+ };
434
+ };
435
+
436
+ export { createMedalTools };