@frogbotai/piece-resend 0.22.0 → 0.24.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/dist/actions/cancelScheduledEmail.d.ts +21 -0
- package/dist/actions/cancelScheduledEmail.d.ts.map +1 -0
- package/dist/actions/cancelScheduledEmail.js +12 -0
- package/dist/actions/cancelScheduledEmail.js.map +1 -0
- package/dist/actions/createAudience.d.ts +20 -0
- package/dist/actions/createAudience.d.ts.map +1 -0
- package/dist/actions/createAudience.js +12 -0
- package/dist/actions/createAudience.js.map +1 -0
- package/dist/actions/createBroadcast.d.ts +37 -0
- package/dist/actions/createBroadcast.d.ts.map +1 -0
- package/dist/actions/createBroadcast.js +35 -0
- package/dist/actions/createBroadcast.js.map +1 -0
- package/dist/actions/createContact.d.ts +28 -0
- package/dist/actions/createContact.d.ts.map +1 -0
- package/dist/actions/createContact.js +26 -0
- package/dist/actions/createContact.js.map +1 -0
- package/dist/actions/createDomain.d.ts +36 -0
- package/dist/actions/createDomain.d.ts.map +1 -0
- package/dist/actions/createDomain.js +30 -0
- package/dist/actions/createDomain.js.map +1 -0
- package/dist/actions/customApiCall.d.ts +46 -0
- package/dist/actions/customApiCall.d.ts.map +1 -0
- package/dist/actions/customApiCall.js +83 -0
- package/dist/actions/customApiCall.js.map +1 -0
- package/dist/actions/deleteAudience.d.ts +21 -0
- package/dist/actions/deleteAudience.d.ts.map +1 -0
- package/dist/actions/deleteAudience.js +12 -0
- package/dist/actions/deleteAudience.js.map +1 -0
- package/dist/actions/deleteBroadcast.d.ts +21 -0
- package/dist/actions/deleteBroadcast.d.ts.map +1 -0
- package/dist/actions/deleteBroadcast.js +12 -0
- package/dist/actions/deleteBroadcast.js.map +1 -0
- package/dist/actions/deleteContact.d.ts +23 -0
- package/dist/actions/deleteContact.d.ts.map +1 -0
- package/dist/actions/deleteContact.js +15 -0
- package/dist/actions/deleteContact.js.map +1 -0
- package/dist/actions/deleteDomain.d.ts +21 -0
- package/dist/actions/deleteDomain.d.ts.map +1 -0
- package/dist/actions/deleteDomain.js +12 -0
- package/dist/actions/deleteDomain.js.map +1 -0
- package/dist/actions/getEmailStatus.d.ts +21 -0
- package/dist/actions/getEmailStatus.d.ts.map +1 -0
- package/dist/actions/getEmailStatus.js +12 -0
- package/dist/actions/getEmailStatus.js.map +1 -0
- package/dist/actions/listAudiences.d.ts +17 -0
- package/dist/actions/listAudiences.d.ts.map +1 -0
- package/dist/actions/listAudiences.js +12 -0
- package/dist/actions/listAudiences.js.map +1 -0
- package/dist/actions/listBroadcasts.d.ts +28 -0
- package/dist/actions/listBroadcasts.d.ts.map +1 -0
- package/dist/actions/listBroadcasts.js +27 -0
- package/dist/actions/listBroadcasts.js.map +1 -0
- package/dist/actions/listContacts.d.ts +22 -0
- package/dist/actions/listContacts.d.ts.map +1 -0
- package/dist/actions/listContacts.js +13 -0
- package/dist/actions/listContacts.js.map +1 -0
- package/dist/actions/listDomains.d.ts +24 -0
- package/dist/actions/listDomains.d.ts.map +1 -0
- package/dist/actions/listDomains.js +21 -0
- package/dist/actions/listDomains.js.map +1 -0
- package/dist/actions/listEmails.d.ts +27 -0
- package/dist/actions/listEmails.d.ts.map +1 -0
- package/dist/actions/listEmails.js +24 -0
- package/dist/actions/listEmails.js.map +1 -0
- package/dist/actions/rescheduleEmail.d.ts +23 -0
- package/dist/actions/rescheduleEmail.d.ts.map +1 -0
- package/dist/actions/rescheduleEmail.js +13 -0
- package/dist/actions/rescheduleEmail.js.map +1 -0
- package/dist/actions/send.d.ts +41 -0
- package/dist/actions/send.d.ts.map +1 -0
- package/dist/actions/send.js +24 -0
- package/dist/actions/send.js.map +1 -0
- package/dist/actions/sendBatchEmails.d.ts +44 -0
- package/dist/actions/sendBatchEmails.d.ts.map +1 -0
- package/dist/actions/sendBatchEmails.js +31 -0
- package/dist/actions/sendBatchEmails.js.map +1 -0
- package/dist/actions/sendBroadcast.d.ts +23 -0
- package/dist/actions/sendBroadcast.d.ts.map +1 -0
- package/dist/actions/sendBroadcast.js +17 -0
- package/dist/actions/sendBroadcast.js.map +1 -0
- package/dist/actions/types.d.ts +5 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actions/types.js +2 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/actions/updateContact.d.ts +28 -0
- package/dist/actions/updateContact.d.ts.map +1 -0
- package/dist/actions/updateContact.js +29 -0
- package/dist/actions/updateContact.js.map +1 -0
- package/dist/actions/verifyDomain.d.ts +21 -0
- package/dist/actions/verifyDomain.d.ts.map +1 -0
- package/dist/actions/verifyDomain.js +12 -0
- package/dist/actions/verifyDomain.js.map +1 -0
- package/dist/client.d.ts +20 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +37 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -0
- package/dist/email.d.ts +24 -0
- package/dist/email.d.ts.map +1 -0
- package/dist/email.js +38 -0
- package/dist/email.js.map +1 -0
- package/dist/format.d.ts +7 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +27 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +579 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -59
- package/dist/index.js.map +1 -1
- package/dist/index.test-d.d.ts +2 -0
- package/dist/index.test-d.d.ts.map +1 -0
- package/dist/index.test-d.js +54 -0
- package/dist/index.test-d.js.map +1 -0
- package/dist/piece-types.d.ts +200 -0
- package/dist/piece-types.d.ts.map +1 -0
- package/dist/piece-types.js +2 -0
- package/dist/piece-types.js.map +1 -0
- package/package.json +7 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const cancelScheduledEmail: {
|
|
3
|
+
slug: "cancelScheduledEmail";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
email_id: z.ZodString;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
email_id: string;
|
|
12
|
+
}, {
|
|
13
|
+
from?: {
|
|
14
|
+
address: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
19
|
+
}>): Promise<unknown>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=cancelScheduledEmail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelScheduledEmail.d.ts","sourceRoot":"","sources":["../../src/actions/cancelScheduledEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;gBAFiB,CAAC;;;;;CAU3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({ email_id: z.string() }).passthrough();
|
|
3
|
+
export const cancelScheduledEmail = {
|
|
4
|
+
slug: 'cancelScheduledEmail',
|
|
5
|
+
description: 'Cancel a scheduled email',
|
|
6
|
+
idempotent: false,
|
|
7
|
+
input,
|
|
8
|
+
async run({ input, client }) {
|
|
9
|
+
return client.request({ method: 'POST', path: `/emails/${input.email_id}/cancel` });
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=cancelScheduledEmail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelScheduledEmail.js","sourceRoot":"","sources":["../../src/actions/cancelScheduledEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAE/D,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,0BAA0B;IACvC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,CAAC,QAAQ,SAAS,EAAE,CAAC,CAAC;IACtF,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createAudience: {
|
|
3
|
+
slug: "createAudience";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
10
|
+
name: string;
|
|
11
|
+
}, {
|
|
12
|
+
from?: {
|
|
13
|
+
address: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
18
|
+
}>): Promise<unknown>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=createAudience.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAudience.d.ts","sourceRoot":"","sources":["../../src/actions/createAudience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc;;;;;;;;;;;;gBAAxB,CAAC;;;;;CAQoB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({ name: z.string() });
|
|
3
|
+
export const createAudience = {
|
|
4
|
+
slug: 'createAudience',
|
|
5
|
+
description: 'Create an audience',
|
|
6
|
+
idempotent: false,
|
|
7
|
+
input,
|
|
8
|
+
async run({ input, client }) {
|
|
9
|
+
return client.request({ method: 'POST', path: '/audiences', body: { name: input.name } });
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=createAudience.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAudience.js","sourceRoot":"","sources":["../../src/actions/createAudience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC5F,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createBroadcast: {
|
|
3
|
+
slug: "createBroadcast";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
audience_id: z.ZodString;
|
|
8
|
+
from: z.ZodString;
|
|
9
|
+
subject: z.ZodString;
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
reply_to: z.ZodOptional<z.ZodString>;
|
|
12
|
+
preview_text: z.ZodOptional<z.ZodString>;
|
|
13
|
+
content_type: z.ZodEnum<{
|
|
14
|
+
text: "text";
|
|
15
|
+
html: "html";
|
|
16
|
+
}>;
|
|
17
|
+
content: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
20
|
+
audience_id: string;
|
|
21
|
+
from: string;
|
|
22
|
+
subject: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
reply_to?: string;
|
|
25
|
+
preview_text?: string;
|
|
26
|
+
content_type: "html" | "text";
|
|
27
|
+
content: string;
|
|
28
|
+
}, {
|
|
29
|
+
from?: {
|
|
30
|
+
address: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
35
|
+
}>): Promise<unknown>;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=createBroadcast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createBroadcast.d.ts","sourceRoot":"","sources":["../../src/actions/createBroadcast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAXlB,CAAC;;;;;CAgCa,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { compact } from '../format.js';
|
|
3
|
+
const input = z.object({
|
|
4
|
+
audience_id: z.string(),
|
|
5
|
+
from: z.string(),
|
|
6
|
+
subject: z.string(),
|
|
7
|
+
name: z.string().optional(),
|
|
8
|
+
reply_to: z.string().optional(),
|
|
9
|
+
preview_text: z.string().optional(),
|
|
10
|
+
content_type: z.enum(['html', 'text']),
|
|
11
|
+
content: z.string(),
|
|
12
|
+
});
|
|
13
|
+
export const createBroadcast = {
|
|
14
|
+
slug: 'createBroadcast',
|
|
15
|
+
description: 'Create a broadcast',
|
|
16
|
+
idempotent: false,
|
|
17
|
+
input,
|
|
18
|
+
async run({ input, client }) {
|
|
19
|
+
const { content, content_type, ...values } = input;
|
|
20
|
+
return client.request({
|
|
21
|
+
method: 'POST',
|
|
22
|
+
path: '/broadcasts',
|
|
23
|
+
body: compact({
|
|
24
|
+
audience_id: values.audience_id,
|
|
25
|
+
from: values.from,
|
|
26
|
+
subject: values.subject,
|
|
27
|
+
name: values.name || undefined,
|
|
28
|
+
reply_to: values.reply_to || undefined,
|
|
29
|
+
preview_text: values.preview_text || undefined,
|
|
30
|
+
[content_type === 'html' ? 'html' : 'text']: content,
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=createBroadcast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createBroadcast.js","sourceRoot":"","sources":["../../src/actions/createBroadcast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;QACnD,OAAO,MAAM,CAAC,OAAO,CAAC;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,OAAO,CAAC;gBACZ,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,SAAS;gBAC9B,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,SAAS;gBACtC,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,SAAS;gBAC9C,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO;aACrD,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createContact: {
|
|
3
|
+
slug: "createContact";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
audience_id: z.ZodString;
|
|
8
|
+
email: z.ZodString;
|
|
9
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
10
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
unsubscribed: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
14
|
+
audience_id: string;
|
|
15
|
+
email: string;
|
|
16
|
+
first_name?: string;
|
|
17
|
+
last_name?: string;
|
|
18
|
+
unsubscribed?: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
from?: {
|
|
21
|
+
address: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
26
|
+
}>): Promise<unknown>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=createContact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createContact.d.ts","sourceRoot":"","sources":["../../src/actions/createContact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;gBARhB,CAAC;;;;;CAuBa,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { compact } from '../format.js';
|
|
3
|
+
const input = z.object({
|
|
4
|
+
audience_id: z.string(),
|
|
5
|
+
email: z.string(),
|
|
6
|
+
first_name: z.string().optional(),
|
|
7
|
+
last_name: z.string().optional(),
|
|
8
|
+
unsubscribed: z.boolean().optional(),
|
|
9
|
+
});
|
|
10
|
+
export const createContact = {
|
|
11
|
+
slug: 'createContact',
|
|
12
|
+
description: 'Create an audience contact',
|
|
13
|
+
idempotent: false,
|
|
14
|
+
input,
|
|
15
|
+
async run({ input, client }) {
|
|
16
|
+
const { audience_id } = input;
|
|
17
|
+
const body = compact({
|
|
18
|
+
email: input.email,
|
|
19
|
+
first_name: input.first_name || undefined,
|
|
20
|
+
last_name: input.last_name || undefined,
|
|
21
|
+
unsubscribed: input.unsubscribed,
|
|
22
|
+
});
|
|
23
|
+
return client.request({ method: 'POST', path: `/audiences/${audience_id}/contacts`, body });
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=createContact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createContact.js","sourceRoot":"","sources":["../../src/actions/createContact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;QAC9B,MAAM,IAAI,GAAG,OAAO,CAAC;YACnB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,SAAS;YACzC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,SAAS;YACvC,YAAY,EAAE,KAAK,CAAC,YAAY;SACjC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,WAAW,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9F,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createDomain: {
|
|
3
|
+
slug: "createDomain";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
"us-east-1": "us-east-1";
|
|
10
|
+
"eu-west-1": "eu-west-1";
|
|
11
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
12
|
+
"sa-east-1": "sa-east-1";
|
|
13
|
+
}>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
16
|
+
name: string;
|
|
17
|
+
region?: "us-east-1" | "eu-west-1" | "ap-northeast-1" | "sa-east-1";
|
|
18
|
+
}, {
|
|
19
|
+
from?: {
|
|
20
|
+
address: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
25
|
+
}>): Promise<{
|
|
26
|
+
id: unknown;
|
|
27
|
+
name: unknown;
|
|
28
|
+
status: unknown;
|
|
29
|
+
region: unknown;
|
|
30
|
+
created_at: unknown;
|
|
31
|
+
sending: {};
|
|
32
|
+
receiving: {};
|
|
33
|
+
dns_records: unknown;
|
|
34
|
+
}>;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=createDomain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDomain.d.ts","sourceRoot":"","sources":["../../src/actions/createDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;gBALf,CAAC;;;;;;;;;;;;;;CA2Ba,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { compact } from '../format.js';
|
|
3
|
+
const input = z.object({
|
|
4
|
+
name: z.string(),
|
|
5
|
+
region: z.enum(['us-east-1', 'eu-west-1', 'ap-northeast-1', 'sa-east-1']).optional(),
|
|
6
|
+
});
|
|
7
|
+
export const createDomain = {
|
|
8
|
+
slug: 'createDomain',
|
|
9
|
+
description: 'Create a domain',
|
|
10
|
+
idempotent: false,
|
|
11
|
+
input,
|
|
12
|
+
async run({ input, client }) {
|
|
13
|
+
const result = (await client.request({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
path: '/domains',
|
|
16
|
+
body: compact({ name: input.name, region: input.region }),
|
|
17
|
+
}));
|
|
18
|
+
return {
|
|
19
|
+
id: result.id,
|
|
20
|
+
name: result.name,
|
|
21
|
+
status: result.status,
|
|
22
|
+
region: result.region,
|
|
23
|
+
created_at: result.created_at,
|
|
24
|
+
sending: result.capabilities?.sending ?? '',
|
|
25
|
+
receiving: result.capabilities?.receiving ?? '',
|
|
26
|
+
dns_records: result.records,
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=createDomain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDomain.js","sourceRoot":"","sources":["../../src/actions/createDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;CACrF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,MAAM,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;SAC1D,CAAC,CAA4B,CAAC;QAC/B,OAAO;YACL,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAG,MAAM,CAAC,YAAoD,EAAE,OAAO,IAAI,EAAE;YACpF,SAAS,EAAG,MAAM,CAAC,YAAoD,EAAE,SAAS,IAAI,EAAE;YACxF,WAAW,EAAE,MAAM,CAAC,OAAO;SAC5B,CAAC;IACJ,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const customApiCall: {
|
|
3
|
+
slug: "customApiCall";
|
|
4
|
+
description: string;
|
|
5
|
+
input: z.ZodObject<{
|
|
6
|
+
method: z.ZodString;
|
|
7
|
+
url: z.ZodString;
|
|
8
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
+
queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10
|
+
body_type: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
none: "none";
|
|
12
|
+
json: "json";
|
|
13
|
+
form_data: "form_data";
|
|
14
|
+
raw: "raw";
|
|
15
|
+
}>>;
|
|
16
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
17
|
+
response_is_binary: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
failsafe: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
followRedirects: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
run({ input, client, req }: import("frogbot").PieceRunArgs<{
|
|
23
|
+
method: string;
|
|
24
|
+
url: string;
|
|
25
|
+
headers?: {
|
|
26
|
+
[k: string]: string;
|
|
27
|
+
};
|
|
28
|
+
queryParams?: {
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
body_type?: "none" | "json" | "form_data" | "raw";
|
|
32
|
+
body?: unknown;
|
|
33
|
+
response_is_binary?: boolean;
|
|
34
|
+
failsafe?: boolean;
|
|
35
|
+
timeout?: number;
|
|
36
|
+
followRedirects?: boolean;
|
|
37
|
+
}, {
|
|
38
|
+
from?: {
|
|
39
|
+
address: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
44
|
+
}>): Promise<unknown>;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=customApiCall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customApiCall.d.ts","sourceRoot":"","sources":["../../src/actions/customApiCall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAbzB,CAAC;;;;;CAwFsB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({
|
|
3
|
+
method: z.string(),
|
|
4
|
+
url: z.string(),
|
|
5
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
6
|
+
queryParams: z.record(z.string(), z.unknown()).optional(),
|
|
7
|
+
body_type: z.enum(['none', 'json', 'form_data', 'raw']).optional(),
|
|
8
|
+
body: z.unknown().optional(),
|
|
9
|
+
response_is_binary: z.boolean().optional(),
|
|
10
|
+
failsafe: z.boolean().optional(),
|
|
11
|
+
timeout: z.number().optional(),
|
|
12
|
+
followRedirects: z.boolean().optional(),
|
|
13
|
+
});
|
|
14
|
+
export const customApiCall = {
|
|
15
|
+
slug: 'customApiCall',
|
|
16
|
+
description: 'Make a custom Resend API call',
|
|
17
|
+
input,
|
|
18
|
+
async run({ input, client, req }) {
|
|
19
|
+
const timeout = input.timeout !== undefined
|
|
20
|
+
? AbortSignal.timeout(Math.max(0, input.timeout * 1000))
|
|
21
|
+
: undefined;
|
|
22
|
+
let bodyValue = input.body && typeof input.body === 'object' && 'data' in input.body
|
|
23
|
+
? input.body.data
|
|
24
|
+
: input.body;
|
|
25
|
+
let rawBody = input.body_type === 'raw';
|
|
26
|
+
if (input.body_type === 'form_data' && Array.isArray(bodyValue)) {
|
|
27
|
+
const form = new FormData();
|
|
28
|
+
for (const field of bodyValue) {
|
|
29
|
+
if (field.fieldType === 'file') {
|
|
30
|
+
const file = field.fileFieldValue;
|
|
31
|
+
if (file?.data) {
|
|
32
|
+
const value = file.data instanceof Blob ? file.data : new Blob([file.data]);
|
|
33
|
+
form.append(String(field.fieldName), value, file.filename);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (field.textFieldValue !== undefined) {
|
|
37
|
+
form.append(String(field.fieldName), String(field.textFieldValue));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
bodyValue = form;
|
|
41
|
+
rawBody = true;
|
|
42
|
+
}
|
|
43
|
+
const result = await client.request({
|
|
44
|
+
allowFailure: input.failsafe === true,
|
|
45
|
+
binary: input.response_is_binary,
|
|
46
|
+
method: input.method,
|
|
47
|
+
path: input.url.replace(/^https:\/\/api\.resend\.com/, ''),
|
|
48
|
+
headers: input.headers,
|
|
49
|
+
body: bodyValue,
|
|
50
|
+
query: input.queryParams,
|
|
51
|
+
rawBody,
|
|
52
|
+
redirect: input.followRedirects === false ? 'manual' : 'follow',
|
|
53
|
+
response: true,
|
|
54
|
+
signal: timeout,
|
|
55
|
+
});
|
|
56
|
+
if (!input.response_is_binary)
|
|
57
|
+
return result;
|
|
58
|
+
const response = result;
|
|
59
|
+
const collection = req.frogbot.config.files?.slug;
|
|
60
|
+
if (!collection) {
|
|
61
|
+
throw new Error('[frogbot] Piece file output requires the files collection to be configured.');
|
|
62
|
+
}
|
|
63
|
+
const contentType = response.headers['content-type'] ?? 'application/octet-stream';
|
|
64
|
+
const extension = contentType.split('/')[1]?.split(';')[0] || 'bin';
|
|
65
|
+
const doc = await req.frogbot.create({
|
|
66
|
+
collection,
|
|
67
|
+
data: {},
|
|
68
|
+
file: {
|
|
69
|
+
data: Buffer.from(response.body),
|
|
70
|
+
mimetype: contentType,
|
|
71
|
+
name: `output.${extension}`,
|
|
72
|
+
size: response.body.byteLength,
|
|
73
|
+
},
|
|
74
|
+
overrideAccess: true,
|
|
75
|
+
});
|
|
76
|
+
const url = doc.url;
|
|
77
|
+
if (typeof url !== 'string' || !url) {
|
|
78
|
+
throw new Error(`[frogbot] Upload collection '${collection}' did not return a file URL.`);
|
|
79
|
+
}
|
|
80
|
+
return { ...response, body: url };
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=customApiCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customApiCall.js","sourceRoot":"","sources":["../../src/actions/customApiCall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,C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rB,IAAI,EAAE,UAAU,SAAS,EAAE;gBAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU;aAC/B;YACD,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;QACH,MAAM,GAAG,GAAI,GAA+B,CAAC,GAAG,CAAC;QACjD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,gCAAgC,UAAU,8BAA8B,CAAC,CAAC;QAC5F,CAAC;QACD,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IACpC,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const deleteAudience: {
|
|
3
|
+
slug: "deleteAudience";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
audience_id: z.ZodString;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
audience_id: string;
|
|
12
|
+
}, {
|
|
13
|
+
from?: {
|
|
14
|
+
address: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
19
|
+
}>): Promise<unknown>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=deleteAudience.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteAudience.d.ts","sourceRoot":"","sources":["../../src/actions/deleteAudience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;gBAFuB,CAAC;;;;;CAU3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({ audience_id: z.string() }).passthrough();
|
|
3
|
+
export const deleteAudience = {
|
|
4
|
+
slug: 'deleteAudience',
|
|
5
|
+
description: 'Delete an audience',
|
|
6
|
+
idempotent: false,
|
|
7
|
+
input,
|
|
8
|
+
async run({ input, client }) {
|
|
9
|
+
return client.request({ method: 'DELETE', path: `/audiences/${input.audience_id}` });
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=deleteAudience.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteAudience.js","sourceRoot":"","sources":["../../src/actions/deleteAudience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAElE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACvF,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const deleteBroadcast: {
|
|
3
|
+
slug: "deleteBroadcast";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
broadcast_id: z.ZodString;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
broadcast_id: string;
|
|
12
|
+
}, {
|
|
13
|
+
from?: {
|
|
14
|
+
address: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
19
|
+
}>): Promise<unknown>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=deleteBroadcast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteBroadcast.d.ts","sourceRoot":"","sources":["../../src/actions/deleteBroadcast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;gBAFsB,CAAC;;;;;CAU3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({ broadcast_id: z.string() }).passthrough();
|
|
3
|
+
export const deleteBroadcast = {
|
|
4
|
+
slug: 'deleteBroadcast',
|
|
5
|
+
description: 'Delete a broadcast',
|
|
6
|
+
idempotent: false,
|
|
7
|
+
input,
|
|
8
|
+
async run({ input, client }) {
|
|
9
|
+
return client.request({ method: 'DELETE', path: `/broadcasts/${input.broadcast_id}` });
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=deleteBroadcast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteBroadcast.js","sourceRoot":"","sources":["../../src/actions/deleteBroadcast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAEnE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,oBAAoB;IACjC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const deleteContact: {
|
|
3
|
+
slug: "deleteContact";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
audience_id: z.ZodString;
|
|
8
|
+
contact_id: z.ZodString;
|
|
9
|
+
}, z.core.$loose>;
|
|
10
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
11
|
+
[k: string]: unknown;
|
|
12
|
+
audience_id: string;
|
|
13
|
+
contact_id: string;
|
|
14
|
+
}, {
|
|
15
|
+
from?: {
|
|
16
|
+
address: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
21
|
+
}>): Promise<unknown>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=deleteContact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteContact.d.ts","sourceRoot":"","sources":["../../src/actions/deleteContact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;gBAFwB,CAAC;;;;;CAa3B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({ audience_id: z.string(), contact_id: z.string() }).passthrough();
|
|
3
|
+
export const deleteContact = {
|
|
4
|
+
slug: 'deleteContact',
|
|
5
|
+
description: 'Delete an audience contact',
|
|
6
|
+
idempotent: false,
|
|
7
|
+
input,
|
|
8
|
+
async run({ input, client }) {
|
|
9
|
+
return client.request({
|
|
10
|
+
method: 'DELETE',
|
|
11
|
+
path: `/audiences/${input.audience_id}/contacts/${input.contact_id}`,
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=deleteContact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteContact.js","sourceRoot":"","sources":["../../src/actions/deleteContact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAE1F,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC;YACpB,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,cAAc,KAAK,CAAC,WAAW,aAAa,KAAK,CAAC,UAAU,EAAE;SACrE,CAAC,CAAC;IACL,CAAC;CACqB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const deleteDomain: {
|
|
3
|
+
slug: "deleteDomain";
|
|
4
|
+
description: string;
|
|
5
|
+
idempotent: false;
|
|
6
|
+
input: z.ZodObject<{
|
|
7
|
+
domain_id: z.ZodString;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
run({ input, client }: import("frogbot").PieceRunArgs<{
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
domain_id: string;
|
|
12
|
+
}, {
|
|
13
|
+
from?: {
|
|
14
|
+
address: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
request({ allowFailure, binary, body, headers, method, path, query, rawBody, redirect, response: includeResponse, signal, }: import("../client.js").ResendRequestOptions): Promise<unknown>;
|
|
19
|
+
}>): Promise<unknown>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=deleteDomain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteDomain.d.ts","sourceRoot":"","sources":["../../src/actions/deleteDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;gBAFyB,CAAC;;;;;CAU3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const input = z.object({ domain_id: z.string() }).passthrough();
|
|
3
|
+
export const deleteDomain = {
|
|
4
|
+
slug: 'deleteDomain',
|
|
5
|
+
description: 'Delete a domain',
|
|
6
|
+
idempotent: false,
|
|
7
|
+
input,
|
|
8
|
+
async run({ input, client }) {
|
|
9
|
+
return client.request({ method: 'DELETE', path: `/domains/${input.domain_id}` });
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=deleteDomain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteDomain.js","sourceRoot":"","sources":["../../src/actions/deleteDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAEhE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,iBAAiB;IAC9B,UAAU,EAAE,KAAK;IACjB,KAAK;IACL,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE;QACzB,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACnF,CAAC;CACqB,CAAC"}
|