@hitch42/applet 0.1.1-beta.15 → 0.1.1-beta.16
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/_internal/server.d.ts +10 -1
- package/dist/_internal/server.js +16 -2
- package/dist/applet.js +12 -12
- package/dist/auth-D3CrCtZq.js +21 -0
- package/dist/{build-BkhBHdMs.js → build-XHoa_sJL.js} +1 -1
- package/dist/build-ueR7XjZT.js +2 -0
- package/dist/{ci-BKw14X2h.js → ci-B5-mH-YW.js} +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/contract-BbOj5EB7.js +23 -0
- package/dist/{contract-CZdT22tB.d.ts → contract-D9wEvxGI.d.ts} +1 -1
- package/dist/{deploy-D5SBBd-j.js → deploy-C5JDIn2Y.js} +4 -3
- package/dist/device-BgIfytaR.js +135 -0
- package/dist/email-protocol-B9u_dh2p.d.ts +202 -0
- package/dist/{generate-MWjUbZnO.js → generate-BV_emZgy.js} +39 -13
- package/dist/generate-C9bWqdaB.js +2 -0
- package/dist/hitch-file-url-BPKj9zVG.js +25 -0
- package/dist/index.d.ts +15 -25
- package/dist/index.js +80 -192
- package/dist/{init-Dw7GEI5v.js → init-BGQ_bP44.js} +5 -5
- package/dist/{manifest-CuY3ICpN.js → load-config-Dkr2VxZN.js} +37 -2
- package/dist/{login-CUx3TmFQ.js → login-CceGvlMi.js} +3 -1
- package/dist/{logs-BySh9fnH.js → logs-DOkT5ots.js} +3 -3
- package/dist/{manifest-ARAy2HP7.d.ts → manifest-BSUtHbu-.d.ts} +1 -4
- package/dist/markdown-CwlqzBtP.js +88 -0
- package/dist/markdown-DSHOQIOb.d.ts +14 -0
- package/dist/markdown-editor-BmEaBzd7.d.ts +27 -0
- package/dist/markdown-editor-C5mLHGqu.js +428 -0
- package/dist/{project-NcWw8SwL.js → project-CCVqCCgU.js} +3 -2
- package/dist/react/markdown-editor.d.ts +2 -0
- package/dist/react/markdown-editor.js +2 -0
- package/dist/react/markdown.d.ts +2 -0
- package/dist/react/markdown.js +2 -0
- package/dist/react.d.ts +2 -37
- package/dist/react.js +2 -534
- package/dist/{schedules-B_p9U-vM.js → schedules-D6-3v-Az.js} +1 -1
- package/dist/server.d.ts +3 -3
- package/dist/store-B8N_8JIN.js +196 -0
- package/dist/{upload-DKZzz5kW.d.ts → upload-D_kkmne_.d.ts} +5 -9
- package/dist/{variables-D9nEFyOK.js → variables-BSFZnLxY.js} +2 -2
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +165 -35
- package/dist/workspace-8yqXsvce.js +31 -0
- package/package.json +13 -1
- package/scaffold/.agents/skills/hitch-applets/references/markdown.md +20 -2
- package/dist/build-D7FDW8iC.js +0 -2
- package/dist/email-WA4jnzZ0.js +0 -211
- package/dist/email-protocol-DqJ6YCiC.d.ts +0 -230
- package/dist/generate-WYS-jtPH.js +0 -2
- package/dist/load-config-BeQZ2yOa.js +0 -27
- package/dist/me-BW7Paary.js +0 -32
- package/dist/workspace-D0dnnlxL.js +0 -385
package/dist/email-WA4jnzZ0.js
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { oc } from "@orpc/contract";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/hitch/email.ts
|
|
4
|
-
const emailTagKeySchema = z.string().regex(/^[A-Za-z][A-Za-z0-9_]{0,63}$/);
|
|
5
|
-
const emailTagsSchema = z.record(emailTagKeySchema, z.string().min(1).max(200)).refine((tags) => Object.keys(tags).length <= 10);
|
|
6
|
-
const createEmailPixelInputSchema = z.object({ tags: emailTagsSchema.optional() }).strict();
|
|
7
|
-
const createEmailPixelOutputSchema = z.object({
|
|
8
|
-
id: z.uuid(),
|
|
9
|
-
url: z.url()
|
|
10
|
-
});
|
|
11
|
-
const getEmailTrackerInputSchema = z.object({ id: z.uuid() });
|
|
12
|
-
const markEmailTrackerSentInputSchema = z.object({
|
|
13
|
-
id: z.uuid(),
|
|
14
|
-
sentAt: z.iso.datetime({ offset: true }).optional()
|
|
15
|
-
}).strict();
|
|
16
|
-
const markEmailTrackerSentBodySchema = z.object({ sentAt: z.iso.datetime({ offset: true }).optional() }).strict();
|
|
17
|
-
const emailTrackerSchema = z.object({
|
|
18
|
-
id: z.uuid(),
|
|
19
|
-
url: z.url(),
|
|
20
|
-
tags: emailTagsSchema,
|
|
21
|
-
createdAt: z.iso.datetime(),
|
|
22
|
-
sentAt: z.iso.datetime().nullable(),
|
|
23
|
-
firstHitAt: z.iso.datetime().nullable(),
|
|
24
|
-
lastHitAt: z.iso.datetime().nullable()
|
|
25
|
-
});
|
|
26
|
-
const listEmailTrackersInputSchema = z.object({
|
|
27
|
-
filter: emailTagsSchema.optional(),
|
|
28
|
-
sentAt: z.object({
|
|
29
|
-
$gte: z.iso.datetime({ offset: true }).optional(),
|
|
30
|
-
$lt: z.iso.datetime({ offset: true }).optional()
|
|
31
|
-
}).strict().optional(),
|
|
32
|
-
cursor: z.uuid().optional(),
|
|
33
|
-
limit: z.number().int().min(1).max(200).optional()
|
|
34
|
-
}).strict();
|
|
35
|
-
const listEmailTrackersOutputSchema = z.object({
|
|
36
|
-
trackers: z.array(emailTrackerSchema),
|
|
37
|
-
nextCursor: z.uuid().nullable()
|
|
38
|
-
});
|
|
39
|
-
function emailContract(appletCode) {
|
|
40
|
-
const path = `/v1/applets/${encodeURIComponent(appletCode)}/email/tracking`;
|
|
41
|
-
return {
|
|
42
|
-
mailboxes: { list: oc.route({
|
|
43
|
-
method: "GET",
|
|
44
|
-
path: "/v1/email/mailboxes"
|
|
45
|
-
}).input(z.void()).output(listHitchEmailMailboxesOutputSchema) },
|
|
46
|
-
threads: {
|
|
47
|
-
list: oc.route({
|
|
48
|
-
method: "GET",
|
|
49
|
-
path: "/v1/email/threads"
|
|
50
|
-
}).input(listHitchEmailThreadsInputSchema).output(listHitchEmailThreadsOutputSchema),
|
|
51
|
-
get: oc.route({
|
|
52
|
-
method: "GET",
|
|
53
|
-
path: "/v1/email/threads/{id}"
|
|
54
|
-
}).input(hitchEmailIdInputSchema).output(hitchEmailThreadSchema)
|
|
55
|
-
},
|
|
56
|
-
messages: {
|
|
57
|
-
list: oc.route({
|
|
58
|
-
method: "GET",
|
|
59
|
-
path: "/v1/email/messages"
|
|
60
|
-
}).input(listHitchEmailMessagesInputSchema).output(listHitchEmailMessagesOutputSchema),
|
|
61
|
-
get: oc.route({
|
|
62
|
-
method: "GET",
|
|
63
|
-
path: "/v1/email/messages/{id}"
|
|
64
|
-
}).input(hitchEmailIdInputSchema).output(hitchEmailMessageSchema),
|
|
65
|
-
send: oc.route({
|
|
66
|
-
method: "POST",
|
|
67
|
-
path: "/v1/email/messages",
|
|
68
|
-
successStatus: 201
|
|
69
|
-
}).input(sendHitchEmailInputSchema).output(hitchEmailMessageSchema),
|
|
70
|
-
raw: oc.route({
|
|
71
|
-
method: "GET",
|
|
72
|
-
path: "/v1/email/messages/{id}/raw"
|
|
73
|
-
}).input(hitchEmailIdInputSchema).output(getHitchEmailRawOutputSchema)
|
|
74
|
-
},
|
|
75
|
-
attachments: { get: oc.route({
|
|
76
|
-
method: "GET",
|
|
77
|
-
path: "/v1/email/attachments/{id}"
|
|
78
|
-
}).input(hitchEmailIdInputSchema).output(getHitchEmailAttachmentOutputSchema) },
|
|
79
|
-
tracking: {
|
|
80
|
-
createPixel: oc.route({
|
|
81
|
-
method: "POST",
|
|
82
|
-
path: `${path}/pixels`,
|
|
83
|
-
successStatus: 201
|
|
84
|
-
}).input(createEmailPixelInputSchema.optional()).output(createEmailPixelOutputSchema),
|
|
85
|
-
markSent: oc.route({
|
|
86
|
-
method: "POST",
|
|
87
|
-
path: `${path}/{id}/sent`
|
|
88
|
-
}).input(markEmailTrackerSentInputSchema).output(emailTrackerSchema),
|
|
89
|
-
get: oc.route({
|
|
90
|
-
method: "GET",
|
|
91
|
-
path: `${path}/{id}`
|
|
92
|
-
}).input(getEmailTrackerInputSchema).output(emailTrackerSchema),
|
|
93
|
-
list: oc.route({
|
|
94
|
-
method: "POST",
|
|
95
|
-
path: `${path}/list`
|
|
96
|
-
}).input(listEmailTrackersInputSchema.optional()).output(listEmailTrackersOutputSchema)
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
const hitchEmailAddressSchema = z.object({
|
|
101
|
-
address: z.string(),
|
|
102
|
-
name: z.string().nullable()
|
|
103
|
-
});
|
|
104
|
-
const hitchMailboxSchema = z.object({
|
|
105
|
-
id: z.uuid(),
|
|
106
|
-
address: z.string(),
|
|
107
|
-
label: z.string(),
|
|
108
|
-
enabled: z.boolean(),
|
|
109
|
-
receive: z.boolean(),
|
|
110
|
-
canRead: z.boolean(),
|
|
111
|
-
canSend: z.boolean()
|
|
112
|
-
});
|
|
113
|
-
const hitchEmailAttachmentSchema = z.object({
|
|
114
|
-
id: z.uuid(),
|
|
115
|
-
filename: z.string(),
|
|
116
|
-
contentType: z.string(),
|
|
117
|
-
sizeBytes: z.number(),
|
|
118
|
-
contentId: z.string().nullable(),
|
|
119
|
-
inline: z.boolean()
|
|
120
|
-
});
|
|
121
|
-
const hitchEmailMessageSchema = z.object({
|
|
122
|
-
id: z.uuid(),
|
|
123
|
-
mailboxId: z.uuid(),
|
|
124
|
-
threadId: z.uuid(),
|
|
125
|
-
direction: z.enum(["inbound", "outbound"]),
|
|
126
|
-
status: z.enum([
|
|
127
|
-
"received",
|
|
128
|
-
"unknown",
|
|
129
|
-
"sent",
|
|
130
|
-
"failed"
|
|
131
|
-
]),
|
|
132
|
-
messageId: z.string().nullable(),
|
|
133
|
-
inReplyTo: z.string().nullable(),
|
|
134
|
-
references: z.array(z.string()),
|
|
135
|
-
from: hitchEmailAddressSchema,
|
|
136
|
-
to: z.array(hitchEmailAddressSchema),
|
|
137
|
-
cc: z.array(hitchEmailAddressSchema),
|
|
138
|
-
bcc: z.array(hitchEmailAddressSchema),
|
|
139
|
-
replyTo: z.array(hitchEmailAddressSchema),
|
|
140
|
-
subject: z.string(),
|
|
141
|
-
text: z.string().nullable(),
|
|
142
|
-
html: z.string().nullable(),
|
|
143
|
-
sentAt: z.string().nullable(),
|
|
144
|
-
automated: z.string().nullable(),
|
|
145
|
-
authentication: z.object({
|
|
146
|
-
spf: z.string().nullable(),
|
|
147
|
-
dkim: z.string().nullable(),
|
|
148
|
-
dmarc: z.string().nullable()
|
|
149
|
-
}).nullable(),
|
|
150
|
-
parseError: z.string().nullable(),
|
|
151
|
-
attachments: z.array(hitchEmailAttachmentSchema),
|
|
152
|
-
userId: z.uuid().nullable(),
|
|
153
|
-
appletId: z.uuid().nullable(),
|
|
154
|
-
requestId: z.string().nullable(),
|
|
155
|
-
errorDetail: z.string().nullable(),
|
|
156
|
-
createdAt: z.string()
|
|
157
|
-
});
|
|
158
|
-
const hitchEmailThreadSchema = z.object({
|
|
159
|
-
id: z.uuid(),
|
|
160
|
-
mailboxId: z.uuid(),
|
|
161
|
-
subject: z.string(),
|
|
162
|
-
messageCount: z.number(),
|
|
163
|
-
lastMessageAt: z.string(),
|
|
164
|
-
createdAt: z.string()
|
|
165
|
-
});
|
|
166
|
-
const listHitchEmailMailboxesOutputSchema = z.object({ data: z.array(hitchMailboxSchema) });
|
|
167
|
-
const listHitchEmailThreadsOutputSchema = z.object({
|
|
168
|
-
data: z.array(hitchEmailThreadSchema),
|
|
169
|
-
nextCursor: z.string().nullable()
|
|
170
|
-
});
|
|
171
|
-
const listHitchEmailMessagesOutputSchema = z.object({
|
|
172
|
-
data: z.array(hitchEmailMessageSchema),
|
|
173
|
-
nextCursor: z.string().nullable()
|
|
174
|
-
});
|
|
175
|
-
const getHitchEmailRawOutputSchema = z.object({ url: z.string() });
|
|
176
|
-
const getHitchEmailAttachmentOutputSchema = z.object({
|
|
177
|
-
url: z.string(),
|
|
178
|
-
filename: z.string(),
|
|
179
|
-
contentType: z.string(),
|
|
180
|
-
sizeBytes: z.number()
|
|
181
|
-
});
|
|
182
|
-
const hitchEmailIdInputSchema = z.object({ id: z.uuid() });
|
|
183
|
-
const listHitchEmailThreadsInputSchema = z.object({
|
|
184
|
-
mailboxId: z.uuid().optional(),
|
|
185
|
-
cursor: z.string().optional(),
|
|
186
|
-
limit: z.number().int().min(1).max(200).optional()
|
|
187
|
-
});
|
|
188
|
-
const listHitchEmailMessagesInputSchema = z.object({
|
|
189
|
-
mailboxId: z.uuid().optional(),
|
|
190
|
-
address: z.string().optional(),
|
|
191
|
-
threadId: z.uuid().optional(),
|
|
192
|
-
direction: z.enum(["inbound", "outbound"]).optional(),
|
|
193
|
-
since: z.iso.datetime().optional(),
|
|
194
|
-
until: z.iso.datetime().optional(),
|
|
195
|
-
cursor: z.string().optional(),
|
|
196
|
-
limit: z.number().int().min(1).max(50).optional()
|
|
197
|
-
});
|
|
198
|
-
const sendHitchEmailInputSchema = z.object({
|
|
199
|
-
mailboxId: z.uuid(),
|
|
200
|
-
to: z.array(z.string()).max(50).optional(),
|
|
201
|
-
cc: z.array(z.string()).max(50).optional(),
|
|
202
|
-
bcc: z.array(z.string()).max(50).optional(),
|
|
203
|
-
subject: z.string().max(998).optional(),
|
|
204
|
-
text: z.string().optional(),
|
|
205
|
-
html: z.string().optional(),
|
|
206
|
-
replyToMessageId: z.uuid().optional(),
|
|
207
|
-
attachmentFileIds: z.array(z.uuid()).max(32).optional(),
|
|
208
|
-
requestId: z.string().min(1).max(200).optional()
|
|
209
|
-
});
|
|
210
|
-
//#endregion
|
|
211
|
-
export { markEmailTrackerSentBodySchema as C, listHitchEmailThreadsOutputSchema as S, sendHitchEmailInputSchema as T, listEmailTrackersOutputSchema as _, emailTagsSchema as a, listHitchEmailMessagesOutputSchema as b, getHitchEmailAttachmentOutputSchema as c, hitchEmailAttachmentSchema as d, hitchEmailIdInputSchema as f, listEmailTrackersInputSchema as g, hitchMailboxSchema as h, emailTagKeySchema as i, getHitchEmailRawOutputSchema as l, hitchEmailThreadSchema as m, createEmailPixelOutputSchema as n, emailTrackerSchema as o, hitchEmailMessageSchema as p, emailContract as r, getEmailTrackerInputSchema as s, createEmailPixelInputSchema as t, hitchEmailAddressSchema as u, listHitchEmailMailboxesOutputSchema as v, markEmailTrackerSentInputSchema as w, listHitchEmailThreadsInputSchema as x, listHitchEmailMessagesInputSchema as y };
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { ContractProcedure, Meta } from "@orpc/contract";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/hitch/email.d.ts
|
|
4
|
-
type EmailTags = Record<string, string>;
|
|
5
|
-
type CreateEmailPixelInput = {
|
|
6
|
-
tags?: EmailTags;
|
|
7
|
-
};
|
|
8
|
-
type CreateEmailPixelOutput = {
|
|
9
|
-
id: string;
|
|
10
|
-
url: string;
|
|
11
|
-
};
|
|
12
|
-
type GetEmailTrackerInput = {
|
|
13
|
-
id: string;
|
|
14
|
-
};
|
|
15
|
-
type MarkEmailTrackerSentInput = {
|
|
16
|
-
id: string;
|
|
17
|
-
sentAt?: string;
|
|
18
|
-
};
|
|
19
|
-
type EmailTracker = {
|
|
20
|
-
id: string;
|
|
21
|
-
url: string;
|
|
22
|
-
tags: EmailTags;
|
|
23
|
-
createdAt: string;
|
|
24
|
-
sentAt: string | null;
|
|
25
|
-
firstHitAt: string | null;
|
|
26
|
-
lastHitAt: string | null;
|
|
27
|
-
};
|
|
28
|
-
type ListEmailTrackersInput = {
|
|
29
|
-
filter?: EmailTags;
|
|
30
|
-
sentAt?: {
|
|
31
|
-
$gte?: string;
|
|
32
|
-
$lt?: string;
|
|
33
|
-
};
|
|
34
|
-
cursor?: string;
|
|
35
|
-
limit?: number;
|
|
36
|
-
};
|
|
37
|
-
type ListEmailTrackersOutput = {
|
|
38
|
-
trackers: EmailTracker[];
|
|
39
|
-
nextCursor: string | null;
|
|
40
|
-
};
|
|
41
|
-
declare const emailTagKeySchema: z.ZodType<string, string>;
|
|
42
|
-
declare const emailTagsSchema: z.ZodType<EmailTags, EmailTags>;
|
|
43
|
-
declare const createEmailPixelInputSchema: z.ZodType<CreateEmailPixelInput, CreateEmailPixelInput>;
|
|
44
|
-
declare const createEmailPixelOutputSchema: z.ZodType<CreateEmailPixelOutput, CreateEmailPixelOutput>;
|
|
45
|
-
declare const getEmailTrackerInputSchema: z.ZodType<GetEmailTrackerInput, GetEmailTrackerInput>;
|
|
46
|
-
declare const markEmailTrackerSentInputSchema: z.ZodType<MarkEmailTrackerSentInput, MarkEmailTrackerSentInput>;
|
|
47
|
-
declare const markEmailTrackerSentBodySchema: z.ZodType<{
|
|
48
|
-
sentAt?: string;
|
|
49
|
-
}, {
|
|
50
|
-
sentAt?: string;
|
|
51
|
-
}>;
|
|
52
|
-
declare const emailTrackerSchema: z.ZodType<EmailTracker, EmailTracker>;
|
|
53
|
-
declare const listEmailTrackersInputSchema: z.ZodType<ListEmailTrackersInput, ListEmailTrackersInput>;
|
|
54
|
-
declare const listEmailTrackersOutputSchema: z.ZodType<ListEmailTrackersOutput, ListEmailTrackersOutput>;
|
|
55
|
-
type EmailContract = {
|
|
56
|
-
mailboxes: {
|
|
57
|
-
list: ContractProcedure<z.ZodType<void, void>, z.ZodType<HitchEmailMailboxesOutput, HitchEmailMailboxesOutput>, Record<never, never>, Meta>;
|
|
58
|
-
};
|
|
59
|
-
threads: {
|
|
60
|
-
list: ContractProcedure<z.ZodType<ListHitchEmailThreadsInput, ListHitchEmailThreadsInput>, z.ZodType<HitchEmailThreadsOutput, HitchEmailThreadsOutput>, Record<never, never>, Meta>;
|
|
61
|
-
get: ContractProcedure<z.ZodType<HitchEmailIdInput, HitchEmailIdInput>, z.ZodType<HitchEmailThread, HitchEmailThread>, Record<never, never>, Meta>;
|
|
62
|
-
};
|
|
63
|
-
messages: {
|
|
64
|
-
/** Newest first. Pass threadId to page through one thread. */
|
|
65
|
-
list: ContractProcedure<z.ZodType<ListHitchEmailMessagesInput, ListHitchEmailMessagesInput>, z.ZodType<HitchEmailMessagesOutput, HitchEmailMessagesOutput>, Record<never, never>, Meta>;
|
|
66
|
-
get: ContractProcedure<z.ZodType<HitchEmailIdInput, HitchEmailIdInput>, z.ZodType<HitchEmailMessage, HitchEmailMessage>, Record<never, never>, Meta>;
|
|
67
|
-
send: ContractProcedure<z.ZodType<SendHitchEmailInput, SendHitchEmailInput>, z.ZodType<HitchEmailMessage, HitchEmailMessage>, Record<never, never>, Meta>;
|
|
68
|
-
raw: ContractProcedure<z.ZodType<HitchEmailIdInput, HitchEmailIdInput>, z.ZodType<HitchEmailRawOutput, HitchEmailRawOutput>, Record<never, never>, Meta>;
|
|
69
|
-
};
|
|
70
|
-
attachments: {
|
|
71
|
-
get: ContractProcedure<z.ZodType<HitchEmailIdInput, HitchEmailIdInput>, z.ZodType<HitchEmailAttachmentOutput, HitchEmailAttachmentOutput>, Record<never, never>, Meta>;
|
|
72
|
-
};
|
|
73
|
-
tracking: {
|
|
74
|
-
createPixel: ContractProcedure<z.ZodType<CreateEmailPixelInput | undefined, CreateEmailPixelInput | undefined>, z.ZodType<CreateEmailPixelOutput, CreateEmailPixelOutput>, Record<never, never>, Meta>;
|
|
75
|
-
markSent: ContractProcedure<z.ZodType<MarkEmailTrackerSentInput, MarkEmailTrackerSentInput>, z.ZodType<EmailTracker, EmailTracker>, Record<never, never>, Meta>;
|
|
76
|
-
get: ContractProcedure<z.ZodType<GetEmailTrackerInput, GetEmailTrackerInput>, z.ZodType<EmailTracker, EmailTracker>, Record<never, never>, Meta>;
|
|
77
|
-
list: ContractProcedure<z.ZodType<ListEmailTrackersInput | undefined, ListEmailTrackersInput | undefined>, z.ZodType<ListEmailTrackersOutput, ListEmailTrackersOutput>, Record<never, never>, Meta>;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
declare function emailContract(appletCode: string): EmailContract;
|
|
81
|
-
type HitchEmailAddress = {
|
|
82
|
-
address: string;
|
|
83
|
-
name: string | null;
|
|
84
|
-
};
|
|
85
|
-
type HitchMailbox = {
|
|
86
|
-
id: string;
|
|
87
|
-
address: string;
|
|
88
|
-
label: string;
|
|
89
|
-
enabled: boolean;
|
|
90
|
-
receive: boolean;
|
|
91
|
-
canRead: boolean;
|
|
92
|
-
canSend: boolean;
|
|
93
|
-
};
|
|
94
|
-
type HitchEmailAttachment = {
|
|
95
|
-
id: string;
|
|
96
|
-
filename: string;
|
|
97
|
-
contentType: string;
|
|
98
|
-
sizeBytes: number;
|
|
99
|
-
contentId: string | null;
|
|
100
|
-
inline: boolean;
|
|
101
|
-
};
|
|
102
|
-
type HitchEmailMessage = {
|
|
103
|
-
id: string;
|
|
104
|
-
mailboxId: string;
|
|
105
|
-
threadId: string;
|
|
106
|
-
direction: "inbound" | "outbound";
|
|
107
|
-
status: "received" | "unknown" | "sent" | "failed";
|
|
108
|
-
messageId: string | null;
|
|
109
|
-
inReplyTo: string | null;
|
|
110
|
-
references: string[];
|
|
111
|
-
from: HitchEmailAddress;
|
|
112
|
-
to: HitchEmailAddress[];
|
|
113
|
-
cc: HitchEmailAddress[];
|
|
114
|
-
bcc: HitchEmailAddress[];
|
|
115
|
-
replyTo: HitchEmailAddress[];
|
|
116
|
-
subject: string;
|
|
117
|
-
text: string | null;
|
|
118
|
-
html: string | null;
|
|
119
|
-
sentAt: string | null;
|
|
120
|
-
automated: string | null;
|
|
121
|
-
authentication: {
|
|
122
|
-
spf: string | null;
|
|
123
|
-
dkim: string | null;
|
|
124
|
-
dmarc: string | null;
|
|
125
|
-
} | null;
|
|
126
|
-
parseError: string | null;
|
|
127
|
-
attachments: HitchEmailAttachment[];
|
|
128
|
-
userId: string | null;
|
|
129
|
-
appletId: string | null;
|
|
130
|
-
requestId: string | null;
|
|
131
|
-
errorDetail: string | null;
|
|
132
|
-
createdAt: string;
|
|
133
|
-
};
|
|
134
|
-
type HitchEmailThread = {
|
|
135
|
-
id: string;
|
|
136
|
-
mailboxId: string;
|
|
137
|
-
subject: string;
|
|
138
|
-
messageCount: number;
|
|
139
|
-
lastMessageAt: string;
|
|
140
|
-
createdAt: string;
|
|
141
|
-
};
|
|
142
|
-
type ListHitchEmailThreadsInput = {
|
|
143
|
-
mailboxId?: string;
|
|
144
|
-
cursor?: string;
|
|
145
|
-
limit?: number;
|
|
146
|
-
};
|
|
147
|
-
type ListHitchEmailMessagesInput = {
|
|
148
|
-
mailboxId?: string;
|
|
149
|
-
address?: string;
|
|
150
|
-
threadId?: string;
|
|
151
|
-
direction?: "inbound" | "outbound";
|
|
152
|
-
since?: string;
|
|
153
|
-
until?: string;
|
|
154
|
-
cursor?: string;
|
|
155
|
-
limit?: number;
|
|
156
|
-
};
|
|
157
|
-
type SendHitchEmailInput = {
|
|
158
|
-
mailboxId: string;
|
|
159
|
-
to?: string[];
|
|
160
|
-
cc?: string[];
|
|
161
|
-
bcc?: string[];
|
|
162
|
-
subject?: string;
|
|
163
|
-
text?: string;
|
|
164
|
-
html?: string;
|
|
165
|
-
replyToMessageId?: string;
|
|
166
|
-
attachmentFileIds?: string[];
|
|
167
|
-
requestId?: string;
|
|
168
|
-
};
|
|
169
|
-
type HitchEmailIdInput = {
|
|
170
|
-
id: string;
|
|
171
|
-
};
|
|
172
|
-
type HitchEmailMailboxesOutput = {
|
|
173
|
-
data: HitchMailbox[];
|
|
174
|
-
};
|
|
175
|
-
type HitchEmailThreadsOutput = {
|
|
176
|
-
data: HitchEmailThread[];
|
|
177
|
-
nextCursor: string | null;
|
|
178
|
-
};
|
|
179
|
-
type HitchEmailMessagesOutput = {
|
|
180
|
-
data: HitchEmailMessage[];
|
|
181
|
-
nextCursor: string | null;
|
|
182
|
-
};
|
|
183
|
-
type HitchEmailRawOutput = {
|
|
184
|
-
url: string;
|
|
185
|
-
};
|
|
186
|
-
type HitchEmailAttachmentOutput = {
|
|
187
|
-
url: string;
|
|
188
|
-
filename: string;
|
|
189
|
-
contentType: string;
|
|
190
|
-
sizeBytes: number;
|
|
191
|
-
};
|
|
192
|
-
declare const hitchEmailAddressSchema: z.ZodType<HitchEmailAddress, HitchEmailAddress>;
|
|
193
|
-
declare const hitchMailboxSchema: z.ZodType<HitchMailbox, HitchMailbox>;
|
|
194
|
-
declare const hitchEmailAttachmentSchema: z.ZodType<HitchEmailAttachment, HitchEmailAttachment>;
|
|
195
|
-
declare const hitchEmailMessageSchema: z.ZodType<HitchEmailMessage, HitchEmailMessage>;
|
|
196
|
-
declare const hitchEmailThreadSchema: z.ZodType<HitchEmailThread, HitchEmailThread>;
|
|
197
|
-
declare const listHitchEmailMailboxesOutputSchema: z.ZodType<HitchEmailMailboxesOutput, HitchEmailMailboxesOutput>;
|
|
198
|
-
declare const listHitchEmailThreadsOutputSchema: z.ZodType<HitchEmailThreadsOutput, HitchEmailThreadsOutput>;
|
|
199
|
-
declare const listHitchEmailMessagesOutputSchema: z.ZodType<HitchEmailMessagesOutput, HitchEmailMessagesOutput>;
|
|
200
|
-
declare const getHitchEmailRawOutputSchema: z.ZodType<HitchEmailRawOutput, HitchEmailRawOutput>;
|
|
201
|
-
declare const getHitchEmailAttachmentOutputSchema: z.ZodType<HitchEmailAttachmentOutput, HitchEmailAttachmentOutput>;
|
|
202
|
-
declare const hitchEmailIdInputSchema: z.ZodType<HitchEmailIdInput, HitchEmailIdInput>;
|
|
203
|
-
declare const listHitchEmailThreadsInputSchema: z.ZodType<ListHitchEmailThreadsInput, ListHitchEmailThreadsInput>;
|
|
204
|
-
declare const listHitchEmailMessagesInputSchema: z.ZodType<ListHitchEmailMessagesInput, ListHitchEmailMessagesInput>;
|
|
205
|
-
declare const sendHitchEmailInputSchema: z.ZodType<SendHitchEmailInput, SendHitchEmailInput>;
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region src/server/telephony-protocol.d.ts
|
|
208
|
-
/** Handle events at least once and without order. Use eventId for idempotency.
|
|
209
|
-
* Read the message with hitch.telephony.messages.get({ id: messageId }). */
|
|
210
|
-
type TelephonyMessageReceivedEvent = {
|
|
211
|
-
eventId: string;
|
|
212
|
-
type: "message.received";
|
|
213
|
-
messageId: string;
|
|
214
|
-
numberId: string;
|
|
215
|
-
occurredAt: string;
|
|
216
|
-
};
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region src/server/email-protocol.d.ts
|
|
219
|
-
/** Handle events at least once and without order. Use eventId for idempotency.
|
|
220
|
-
* Read the message with hitch.email.messages.get({ id: messageId }). */
|
|
221
|
-
type EmailMessageReceivedEvent = {
|
|
222
|
-
eventId: string;
|
|
223
|
-
type: "message.received";
|
|
224
|
-
messageId: string;
|
|
225
|
-
mailboxId: string;
|
|
226
|
-
threadId: string;
|
|
227
|
-
occurredAt: string;
|
|
228
|
-
};
|
|
229
|
-
//#endregion
|
|
230
|
-
export { listEmailTrackersOutputSchema as A, hitchEmailAddressSchema as C, hitchEmailThreadSchema as D, hitchEmailMessageSchema as E, listHitchEmailThreadsOutputSchema as F, markEmailTrackerSentBodySchema as I, markEmailTrackerSentInputSchema as L, listHitchEmailMessagesInputSchema as M, listHitchEmailMessagesOutputSchema as N, hitchMailboxSchema as O, listHitchEmailThreadsInputSchema as P, sendHitchEmailInputSchema as R, getHitchEmailRawOutputSchema as S, hitchEmailIdInputSchema as T, emailTagKeySchema as _, HitchEmailAddress as a, getEmailTrackerInputSchema as b, HitchEmailThread as c, ListHitchEmailMessagesInput as d, ListHitchEmailThreadsInput as f, emailContract as g, createEmailPixelOutputSchema as h, EmailTracker as i, listHitchEmailMailboxesOutputSchema as j, listEmailTrackersInputSchema as k, HitchMailbox as l, createEmailPixelInputSchema as m, TelephonyMessageReceivedEvent as n, HitchEmailAttachment as o, SendHitchEmailInput as p, EmailContract as r, HitchEmailMessage as s, EmailMessageReceivedEvent as t, ListEmailTrackersOutput as u, emailTagsSchema as v, hitchEmailAttachmentSchema as w, getHitchEmailAttachmentOutputSchema as x, emailTrackerSchema as y };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { r as appletSourceDefinitionSchema } from "./manifest-CuY3ICpN.js";
|
|
2
|
-
import { t as resolveWorkspaceOrg } from "./workspace-D0dnnlxL.js";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
4
|
-
import { resolve } from "node:path";
|
|
5
|
-
import { loadConfigFromFile } from "vite";
|
|
6
|
-
//#region src/typegen/load-config.ts
|
|
7
|
-
async function loadAppletSourceDefinition(root) {
|
|
8
|
-
const path = resolve(root, "applet.manifest.ts");
|
|
9
|
-
if (!existsSync(path)) throw new Error(`No applet manifest found at ${path}.`);
|
|
10
|
-
const loaded = await loadConfigFromFile({
|
|
11
|
-
command: "build",
|
|
12
|
-
mode: "production"
|
|
13
|
-
}, path, root);
|
|
14
|
-
if (loaded === null) throw new Error(`No applet manifest found at ${path}.`);
|
|
15
|
-
const parsed = appletSourceDefinitionSchema.safeParse(loaded.config);
|
|
16
|
-
if (!parsed.success) throw new Error(`Invalid applet manifest at ${loaded.path}: ${parsed.error.message}`);
|
|
17
|
-
return parsed.data;
|
|
18
|
-
}
|
|
19
|
-
async function loadAppletConfig(root) {
|
|
20
|
-
const { dependencies: _dependencies, devDependencies: _devDependencies, ...definition } = await loadAppletSourceDefinition(root);
|
|
21
|
-
return {
|
|
22
|
-
org: resolveWorkspaceOrg(root),
|
|
23
|
-
...definition
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { loadAppletSourceDefinition as n, loadAppletConfig as t };
|
package/dist/me-BW7Paary.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { oc } from "@orpc/contract";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/hitch/me.ts
|
|
4
|
-
const personSchema = z.object({
|
|
5
|
-
id: z.uuid(),
|
|
6
|
-
firstName: z.string(),
|
|
7
|
-
lastName: z.string(),
|
|
8
|
-
email: z.email()
|
|
9
|
-
});
|
|
10
|
-
const membershipSchema = z.object({
|
|
11
|
-
orgId: z.uuid(),
|
|
12
|
-
code: z.string(),
|
|
13
|
-
name: z.string(),
|
|
14
|
-
iconFileId: z.uuid().nullable(),
|
|
15
|
-
role: z.enum(["member", "owner"]),
|
|
16
|
-
capabilities: z.array(z.string())
|
|
17
|
-
});
|
|
18
|
-
const meSchema = z.object({
|
|
19
|
-
person: personSchema,
|
|
20
|
-
memberships: z.array(membershipSchema),
|
|
21
|
-
organization: z.object({
|
|
22
|
-
id: z.uuid(),
|
|
23
|
-
code: z.string()
|
|
24
|
-
}).nullable(),
|
|
25
|
-
multiOrg: z.boolean()
|
|
26
|
-
});
|
|
27
|
-
const meContract = { get: oc.route({
|
|
28
|
-
method: "GET",
|
|
29
|
-
path: "/v1/me"
|
|
30
|
-
}).input(z.void()).output(meSchema) };
|
|
31
|
-
//#endregion
|
|
32
|
-
export { meSchema as n, meContract as t };
|