@protobase/server 0.124.2 → 0.125.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/better-auth/auth-settings.d.ts +56 -70
- package/dist/better-auth/auth-settings.js +6 -1
- package/dist/better-auth/create-auth.d.ts +59 -69
- package/dist/better-auth/create-auth.js +15 -11
- package/dist/better-auth/names/modules/index.d.ts +83 -0
- package/dist/better-auth/names/modules/mail-senders.js +130 -69
- package/dist/better-auth/staff-checks.js +1 -1
- package/dist/better-auth/store/steps/index.js +3 -1
- package/dist/better-auth/store/steps/legacy-versions.js +4 -0
- package/dist/better-auth/store/steps/mail-senders/004-sender-verifications.js +41 -0
- package/dist/create-admin.js +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -3
- package/dist/locale/en.js +1 -5
- package/dist/locale/nl.js +1 -5
- package/dist/package.js +1 -1
- package/dist/personal-mail/listed-mail-senders.d.ts +16 -0
- package/dist/personal-mail/listed-mail-senders.js +18 -6
- package/dist/personal-mail/mail-sender.d.ts +1 -0
- package/dist/personal-mail/mail-sender.js +1 -1
- package/dist/personal-mail/mail-senders-plugin.js +44 -46
- package/dist/personal-mail/personal-mailer.js +7 -2
- package/dist/personal-mail/sender-address-state.js +8 -5
- package/dist/personal-mail/sender-store.d.ts +2 -1
- package/dist/personal-mail/verifiers/report-endpoint.js +40 -0
- package/dist/personal-mail/verifiers/sender-address-verifier.d.ts +62 -0
- package/dist/personal-mail/verifiers/sender-verifications.d.ts +6 -0
- package/dist/personal-mail/verifiers/sender-verifications.js +28 -0
- package/dist/personal-mail/verifiers/start-verification.d.ts +4 -0
- package/dist/personal-mail/verifiers/start-verification.js +34 -0
- package/dist/personal-mail/verifiers/verification-outcome.js +49 -0
- package/dist/personal-mail/verifiers/verification-secret.js +8 -0
- package/dist/personal-mail/verifiers/verification-store.d.ts +17 -0
- package/dist/personal-mail/verifiers/verification-store.js +130 -0
- package/dist/personal-mail/verifiers/verification-sweep.js +45 -0
- package/dist/personal-mail/verifiers/verifier-list.js +26 -0
- package/dist/personal-mail/verifiers/verify-tools.js +30 -0
- package/dist/webhooks/attempt.js +1 -1
- package/dist/webhooks/table/webhooks-module.d.ts +2 -2
- package/dist/workflows/workflows-module.d.ts +2 -2
- package/package.json +6 -6
- package/dist/personal-mail/alias-checks.d.ts +0 -14
- package/dist/personal-mail/alias-checks.js +0 -29
- package/dist/personal-mail/mail-check-service.js +0 -41
- package/dist/personal-mail/mail-check-settings.js +0 -18
- package/dist/personal-mail/mail-check-signing.d.ts +0 -10
- package/dist/personal-mail/mail-check-signing.js +0 -13
|
@@ -826,6 +826,89 @@ export declare const builtInModules: readonly [{
|
|
|
826
826
|
};
|
|
827
827
|
readonly indexes: ["mail_sender_default_idx", "mail_sender_shared_idx", "mail_sender_connection_address_uidx", "mail_sender_user_address_idx"];
|
|
828
828
|
};
|
|
829
|
+
readonly mail_sender_verification: {
|
|
830
|
+
readonly scope: "global";
|
|
831
|
+
readonly columns: {
|
|
832
|
+
readonly sender_id: {
|
|
833
|
+
field: "senderId";
|
|
834
|
+
attribute: {
|
|
835
|
+
readonly type: "string";
|
|
836
|
+
readonly required: true;
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
readonly verifier: {
|
|
840
|
+
field: "verifier";
|
|
841
|
+
attribute: {
|
|
842
|
+
readonly type: "string";
|
|
843
|
+
readonly required: true;
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
readonly state: {
|
|
847
|
+
field: "state";
|
|
848
|
+
attribute: {
|
|
849
|
+
readonly type: "string";
|
|
850
|
+
readonly required: true;
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
readonly secret_hash: {
|
|
854
|
+
field: "secretHash";
|
|
855
|
+
attribute: {
|
|
856
|
+
readonly type: "string";
|
|
857
|
+
readonly required: true;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
readonly created_at: {
|
|
861
|
+
field: "createdAt";
|
|
862
|
+
attribute: {
|
|
863
|
+
readonly type: "date";
|
|
864
|
+
readonly required: true;
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
readonly expires_at: {
|
|
868
|
+
field: "expiresAt";
|
|
869
|
+
attribute: {
|
|
870
|
+
readonly type: "date";
|
|
871
|
+
readonly required: true;
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
readonly next_check_at: {
|
|
875
|
+
field: "nextCheckAt";
|
|
876
|
+
attribute: {
|
|
877
|
+
readonly type: "date";
|
|
878
|
+
readonly required: true;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
readonly settled_at: {
|
|
882
|
+
field: "settledAt";
|
|
883
|
+
attribute: {
|
|
884
|
+
readonly type: "date";
|
|
885
|
+
readonly required: false;
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
readonly valid_until: {
|
|
889
|
+
field: "validUntil";
|
|
890
|
+
attribute: {
|
|
891
|
+
readonly type: "date";
|
|
892
|
+
readonly required: false;
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
readonly error_code: {
|
|
896
|
+
field: "errorCode";
|
|
897
|
+
attribute: {
|
|
898
|
+
readonly type: "string";
|
|
899
|
+
readonly required: false;
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
readonly error: {
|
|
903
|
+
field: "error";
|
|
904
|
+
attribute: {
|
|
905
|
+
readonly type: "string";
|
|
906
|
+
readonly required: false;
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
readonly indexes: ["mail_sender_verification_pending_uidx", "mail_sender_verification_secret_uidx", "mail_sender_verification_due_idx", "mail_sender_verification_expiry_idx", "mail_sender_verification_sender_idx"];
|
|
911
|
+
};
|
|
829
912
|
};
|
|
830
913
|
}, {
|
|
831
914
|
readonly id: "platform_devices";
|
|
@@ -1,78 +1,139 @@
|
|
|
1
1
|
import { own } from "../declaration.js";
|
|
2
2
|
//#region src/better-auth/names/modules/mail-senders.ts
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The From addresses people send as through a mailbox connection: one row per connection and address, with what the
|
|
5
|
+
* provider says of it; and the verifications the app's verifiers ran on them, each holding its secret's hash, never the secret.
|
|
6
|
+
*/
|
|
4
7
|
const mailSenders = {
|
|
5
8
|
id: "mail_senders",
|
|
6
9
|
requires: ["auth"],
|
|
7
|
-
tables: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
10
|
+
tables: {
|
|
11
|
+
mail_sender: {
|
|
12
|
+
model: "mailSender",
|
|
13
|
+
scope: "global",
|
|
14
|
+
columns: {
|
|
15
|
+
user_id: own("userId", {
|
|
16
|
+
type: "string",
|
|
17
|
+
required: true
|
|
18
|
+
}),
|
|
19
|
+
address: own("address", {
|
|
20
|
+
type: "string",
|
|
21
|
+
required: true
|
|
22
|
+
}),
|
|
23
|
+
name: own("name", {
|
|
24
|
+
type: "string",
|
|
25
|
+
required: false
|
|
26
|
+
}),
|
|
27
|
+
shared: own("shared", {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
required: true
|
|
30
|
+
}),
|
|
31
|
+
signature: own("signature", {
|
|
32
|
+
type: "string",
|
|
33
|
+
required: false
|
|
34
|
+
}),
|
|
35
|
+
is_default: own("isDefault", {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
required: true
|
|
38
|
+
}),
|
|
39
|
+
created_at: own("createdAt", {
|
|
40
|
+
type: "date",
|
|
41
|
+
required: true
|
|
42
|
+
}),
|
|
43
|
+
connection_id: own("connectionId", {
|
|
44
|
+
type: "string",
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
address_key: own("addressKey", {
|
|
48
|
+
type: "string",
|
|
49
|
+
required: false,
|
|
50
|
+
input: false
|
|
51
|
+
}),
|
|
52
|
+
typed_at: own("typedAt", {
|
|
53
|
+
type: "date",
|
|
54
|
+
required: false
|
|
55
|
+
}),
|
|
56
|
+
listed_at: own("listedAt", {
|
|
57
|
+
type: "date",
|
|
58
|
+
required: false
|
|
59
|
+
}),
|
|
60
|
+
provider_state: own("providerState", {
|
|
61
|
+
type: "string",
|
|
62
|
+
required: false
|
|
63
|
+
}),
|
|
64
|
+
provider_state_read_at: own("providerStateReadAt", {
|
|
65
|
+
type: "date",
|
|
66
|
+
required: false
|
|
67
|
+
}),
|
|
68
|
+
removed_at: own("removedAt", {
|
|
69
|
+
type: "date",
|
|
70
|
+
required: false
|
|
71
|
+
})
|
|
72
|
+
},
|
|
73
|
+
indexes: [
|
|
74
|
+
"mail_sender_default_idx",
|
|
75
|
+
"mail_sender_shared_idx",
|
|
76
|
+
"mail_sender_connection_address_uidx",
|
|
77
|
+
"mail_sender_user_address_idx"
|
|
78
|
+
]
|
|
68
79
|
},
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
mail_sender_verification: {
|
|
81
|
+
scope: "global",
|
|
82
|
+
columns: {
|
|
83
|
+
sender_id: own("senderId", {
|
|
84
|
+
type: "string",
|
|
85
|
+
required: true
|
|
86
|
+
}),
|
|
87
|
+
verifier: own("verifier", {
|
|
88
|
+
type: "string",
|
|
89
|
+
required: true
|
|
90
|
+
}),
|
|
91
|
+
state: own("state", {
|
|
92
|
+
type: "string",
|
|
93
|
+
required: true
|
|
94
|
+
}),
|
|
95
|
+
secret_hash: own("secretHash", {
|
|
96
|
+
type: "string",
|
|
97
|
+
required: true
|
|
98
|
+
}),
|
|
99
|
+
created_at: own("createdAt", {
|
|
100
|
+
type: "date",
|
|
101
|
+
required: true
|
|
102
|
+
}),
|
|
103
|
+
expires_at: own("expiresAt", {
|
|
104
|
+
type: "date",
|
|
105
|
+
required: true
|
|
106
|
+
}),
|
|
107
|
+
next_check_at: own("nextCheckAt", {
|
|
108
|
+
type: "date",
|
|
109
|
+
required: true
|
|
110
|
+
}),
|
|
111
|
+
settled_at: own("settledAt", {
|
|
112
|
+
type: "date",
|
|
113
|
+
required: false
|
|
114
|
+
}),
|
|
115
|
+
valid_until: own("validUntil", {
|
|
116
|
+
type: "date",
|
|
117
|
+
required: false
|
|
118
|
+
}),
|
|
119
|
+
error_code: own("errorCode", {
|
|
120
|
+
type: "string",
|
|
121
|
+
required: false
|
|
122
|
+
}),
|
|
123
|
+
error: own("error", {
|
|
124
|
+
type: "string",
|
|
125
|
+
required: false
|
|
126
|
+
})
|
|
127
|
+
},
|
|
128
|
+
indexes: [
|
|
129
|
+
"mail_sender_verification_pending_uidx",
|
|
130
|
+
"mail_sender_verification_secret_uidx",
|
|
131
|
+
"mail_sender_verification_due_idx",
|
|
132
|
+
"mail_sender_verification_expiry_idx",
|
|
133
|
+
"mail_sender_verification_sender_idx"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
}
|
|
76
137
|
};
|
|
77
138
|
//#endregion
|
|
78
139
|
export { mailSenders };
|
|
@@ -69,7 +69,7 @@ const accountChanges = [
|
|
|
69
69
|
"/account/mail-senders/add",
|
|
70
70
|
"/account/mail-senders/update",
|
|
71
71
|
"/account/mail-senders/remove",
|
|
72
|
-
"/account/mail-senders/
|
|
72
|
+
"/account/mail-senders/verify",
|
|
73
73
|
"/account/mail-senders/refresh"
|
|
74
74
|
];
|
|
75
75
|
const staffCannotChange = {
|
|
@@ -6,6 +6,7 @@ import { userNameSearch } from "./auth/005-user-name-search.js";
|
|
|
6
6
|
import { mailSenders } from "./mail-senders/001-mail-senders.js";
|
|
7
7
|
import { mailSenderNames } from "./mail-senders/002-mail-sender-names.js";
|
|
8
8
|
import { senderAddressEvidence } from "./mail-senders/003-sender-address-evidence.js";
|
|
9
|
+
import { senderVerifications } from "./mail-senders/004-sender-verifications.js";
|
|
9
10
|
import { mcp } from "./mcp/001-mcp.js";
|
|
10
11
|
import { organizations } from "./organizations/001-organizations.js";
|
|
11
12
|
import { organizationIndex } from "./organizations/002-organization-index.js";
|
|
@@ -37,7 +38,8 @@ const moduleSteps = {
|
|
|
37
38
|
mail_senders: [
|
|
38
39
|
mailSenders,
|
|
39
40
|
mailSenderNames,
|
|
40
|
-
senderAddressEvidence
|
|
41
|
+
senderAddressEvidence,
|
|
42
|
+
senderVerifications
|
|
41
43
|
],
|
|
42
44
|
platform_devices: [platformDevices]
|
|
43
45
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ddl } from "../../ddl.js";
|
|
2
|
+
//#region src/better-auth/store/steps/mail-senders/004-sender-verifications.ts
|
|
3
|
+
/**
|
|
4
|
+
* The verifications the app's verifiers run on From addresses: one row per attempt, `pending` until it settles
|
|
5
|
+
* `verified` or `failed`, at most one pending per address and verifier. It keeps only its secret's SHA-256.
|
|
6
|
+
*/
|
|
7
|
+
const senderVerifications = {
|
|
8
|
+
step: 4,
|
|
9
|
+
version: 16,
|
|
10
|
+
name: "sender_verifications",
|
|
11
|
+
title: "The verifications the app's verifiers run on From addresses",
|
|
12
|
+
tables: ["mail_sender_verification"],
|
|
13
|
+
statements: ({ table, id, idRef }) => {
|
|
14
|
+
const verification = table("mail_sender_verification");
|
|
15
|
+
const v = verification.columns;
|
|
16
|
+
const sender = table("mail_sender");
|
|
17
|
+
return [
|
|
18
|
+
ddl`create table ${verification} (
|
|
19
|
+
id ${id} primary key,
|
|
20
|
+
${v.sender_id} ${idRef} not null references ${sender} (id) on delete cascade,
|
|
21
|
+
${v.verifier} text not null,
|
|
22
|
+
${v.state} text not null check (${v.state} in ('pending', 'verified', 'failed')),
|
|
23
|
+
${v.secret_hash} text not null,
|
|
24
|
+
${v.created_at} timestamptz not null,
|
|
25
|
+
${v.expires_at} timestamptz not null,
|
|
26
|
+
${v.next_check_at} timestamptz not null,
|
|
27
|
+
${v.settled_at} timestamptz,
|
|
28
|
+
${v.valid_until} timestamptz,
|
|
29
|
+
${v.error_code} text,
|
|
30
|
+
${v.error} text check (char_length(${v.error}) <= 500)
|
|
31
|
+
)`,
|
|
32
|
+
ddl`create unique index ${verification.index("mail_sender_verification_pending_uidx")} on ${verification} (${v.sender_id}, ${v.verifier}) where ${v.state} = 'pending'`,
|
|
33
|
+
ddl`create unique index ${verification.index("mail_sender_verification_secret_uidx")} on ${verification} (${v.secret_hash})`,
|
|
34
|
+
ddl`create index ${verification.index("mail_sender_verification_due_idx")} on ${verification} (${v.next_check_at}) where ${v.state} = 'pending'`,
|
|
35
|
+
ddl`create index ${verification.index("mail_sender_verification_expiry_idx")} on ${verification} (${v.expires_at}) where ${v.state} = 'pending'`,
|
|
36
|
+
ddl`create index ${verification.index("mail_sender_verification_sender_idx")} on ${verification} (${v.sender_id}, ${v.verifier}, ${v.created_at})`
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { senderVerifications };
|
package/dist/create-admin.js
CHANGED
|
@@ -683,6 +683,7 @@ const createAdmin = ({ resources: appResources, views: appViews = [], userTables
|
|
|
683
683
|
...links && { unsubscribe: links },
|
|
684
684
|
jobs: [
|
|
685
685
|
...webhooks.jobs,
|
|
686
|
+
...auth ? auth.senderVerificationJobs : [],
|
|
686
687
|
...relay ? relay.jobs : [],
|
|
687
688
|
...engine ? engine.jobs : [],
|
|
688
689
|
...derived ? derived.jobs : [],
|
package/dist/index.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ import { RealtimeOptions, relayed, sqlSends } from "./realtime/relay/realtime-op
|
|
|
6
6
|
import { StaffSignIn } from "./better-auth/staff-log.js";
|
|
7
7
|
import { OrganizationRole, StoredMember, StoredOrganization } from "./better-auth/organizations/store.js";
|
|
8
8
|
import { MailAttachment, MailMessage, Mailer, SentMail } from "./mail/mail-message.js";
|
|
9
|
+
import { AddVerifier, SenderAddressVerifier, VerificationInput, VerificationMessage, VerificationOutcome, VerifyInput, VerifyTools } from "./personal-mail/verifiers/sender-address-verifier.js";
|
|
9
10
|
import { SenderAddressState } from "./personal-mail/sender-address-state.js";
|
|
10
11
|
import { MailSender } from "./personal-mail/mail-sender.js";
|
|
11
|
-
import { ConnectionListing } from "./personal-mail/sender-listing.js";
|
|
12
|
-
import { PersonalMail, PersonalMailMessage } from "./personal-mail/personal-mailer.js";
|
|
13
12
|
import { RoleDefinition, RolesInput } from "./better-auth/organizations/role-definitions.js";
|
|
14
13
|
import { PersonalMailEntry, PersonalMailProviderId } from "./personal-mail/personal-mail-providers.js";
|
|
14
|
+
import { ConnectionListing } from "./personal-mail/sender-listing.js";
|
|
15
|
+
import { PersonalMail, PersonalMailMessage } from "./personal-mail/personal-mailer.js";
|
|
15
16
|
import { OperatorProvider, readOperatorSettings } from "./better-auth/operator-provider.js";
|
|
16
17
|
import { SignInPolicy, SignInRule, StaffAccessRule, defaultSignInPolicy, signInPolicyMethods } from "./better-auth/sign-in-policy.js";
|
|
17
18
|
import { OrganizationsOptions } from "./better-auth/organizations/options.js";
|
|
@@ -159,7 +160,6 @@ import { BulkMailError } from "./mail/unsubscribe/bulk-mail-error.js";
|
|
|
159
160
|
import { checkMailFeedbackSchema, mailFeedbackMigration } from "./mail/feedback/feedback-schema.js";
|
|
160
161
|
import { mailFeedbackResource } from "./mail/feedback/mail-feedback-resource.js";
|
|
161
162
|
import { mailFeedbackHeaders, mailFeedbackSecret } from "./mail/feedback/feedback-signing.js";
|
|
162
|
-
import { mailCheckHeaders, mailCheckSecret } from "./personal-mail/mail-check-signing.js";
|
|
163
163
|
import { MailFeedback } from "./mail/feedback/feedback-record.js";
|
|
164
164
|
import { onDoNotDisturb } from "./status/do-not-disturb.js";
|
|
165
165
|
import { relayPresencePath } from "./relay/presence-route.js";
|
|
@@ -236,4 +236,4 @@ import { DrainResult, JobsRuntime, StartJobsOptions, startJobs } from "./jobs/ru
|
|
|
236
236
|
import { jobsDrainApp } from "./jobs/drain-route.js";
|
|
237
237
|
import { checkJobsSchema, jobsSchema, jobsSchemaMigration } from "./jobs/schema.js";
|
|
238
238
|
import { ResourceSource, configExports } from "./resource-source.js";
|
|
239
|
-
export { type Admin, type AdminAuth, type AdminOptions, type AggregateParams, type ApiFunction, type ApiKeys, type ApiKeysOptions, type ApnsEnvironment, type ApnsOptions, type ApnsSettings, type AppIcons, type AppIdentity, type AppPoolConfig, type ApplyOptions, type ApplyResult, type ApprovalAnswer, type ApprovalRequest, type ArgumentsPayload, type AssistantBackend, type AssistantOptions, type AssistantSettings, type AssistantTool, type AuditEvent, type AuditQueue, type AuthHooks, type AuthSettings, type AuthenticateSettings, type Authenticator, type BaseToolContext, type BatchOperation, type BatchResult, type BetterAuthAuthenticator, type BetterAuthAuthenticatorOptions, type BridgeClosing, type BridgeRule, type BridgeTarget, BulkMailError, type CallBackend, type CallMember, type Caller, type CallerOptions, type CallsAccess, type CallsOptions, type CapturedRow, type CascadingKey, type ChannelBroadcast, type ChannelSender, type ChatMessage, type ChatTextPart, type CheckAiInput, type CleanupEntry, type CleanupReport, type CleanupSchedule, type CoalescedChange, type CommentItem, type CommentToolsInput, type CommentUsers, type Completion, type CompletionOptions, type ConnectionListing, ConnectionsBusy, type Conversation, type ConversationRecord, type ConversationStore, type ConversationsOptions, type CorsOptions, type CorsOrigins, type CreateAdminInput, type CreateAuthOptions, type DecryptField, type DerivedClock, type DerivedCompute, type DerivedContext, type Device, type DeviceColumn, type DeviceKind, type DeviceStore, DeviceStoreError, type DrainResult, type EmailComponent, type EmailOptions, type EmailTemplate, type EncryptionStatus, type EncryptionTools, type EncryptionToolsInput, type EnqueueJob, type EnqueueOptions, type ErrorReporter, type ErrorReportingOptions, type ErrorReportingSettings, type EventData, type EventsOptions, FatalJobError, type FcmOptions, type FcmSettings, type FieldApplied, type FieldDecrypter, type FieldReader, type FieldStatus, type FileCleanupInput, type FileLimits, type FileObject, type FileProvider, type FileProviderSettings, type FileRef, type FileStore, type FileVariantObject, type FilesOptions, type FunctionApp, type FunctionCaller, type FunctionContext, type FunctionEnv, type FunctionHandler, type FunctionOptions, type FunctionRecords, type FunctionSocket, type FunctionSource, type HistoryColumn, type HistoryOptions, type HistoryPosition, type HistoryStore, HistoryStoreError, type HookContext, HttpProblem, type IssueTokenOptions, type JobContext, type JobDeclaration, type JobDefinition, type JobName, type JobOptions, type JobPayload, type JobRun, type JobsRuntime, type JoinedUser, type JsonObject, type JsonValue, type JwtOptions, type JwtVerifyOptions, type KeyFunctionContext, type LinkedAccount, type ListParams, type ListedOrganization, type LiveKitBackend, type LocalFilesOptions, type MailAttachment, type MailFeedback, type MailMessage, type MailSender, MailSenderRefusedError, MailServerTimeoutError, type MailTemplate, type Mailer, type MapLayer, type MapOptions, type MapSettings, type McpApprovals, type McpGateInput, type McpHandlerInput, type McpRoutesInput, type McpServerInput, type McpToolsInput, type McpWrites, type MemberInput, type Membership, MissingCredentials, type MobileConfig, type MobileSplash, type MobileSplashLook, ModelError, type ModelSettings, type NewDevice, type NewNotification, type NewOrganization, type NewUser, type NotificationRecipients, NotificationSendError, type NotificationsOptions, type OperatorProvider, type OrganizationRole, type OrganizationsCursor, type OrganizationsOptions, type OrganizationsPage, type OverSignIn, type PdfComponent, type PdfOptions, type PdfTemplate, type PersonalMail, type PersonalMailEntry, PersonalMailError, type PersonalMailErrorCode, type PersonalMailMessage, type PersonalMailProviderId, type PgModule, type PipelineHook, type PlatformSignIn, type PluginOption, type PluginRef, type PngIcon, type ProtectedFunctionOptions, type PublicFunctionContext, type PublicFunctionEnv, type PublicFunctionHandler, type PublicFunctionOptions, type PushAnswer, type PushMessage, PushMessageError, type PushSender, type QueryOptions, type QueryResult, type ReadableResources, type RealtimeOptions, type RealtimePrune, type RealtimeRelayOptions, type RealtimeRelaySettings, type ReasoningDetail, type ReasoningEffort, type RebindOption, type RecordGroups, type RecordKey, type RecordKeyInput, type RecordPage, type RelayChannelOptions, type RelayClientEvent, type RelayDevice, type RelayMembers, type RelayPresence, type RelayResult, type RelaySendAnswer, type RelaySendRequest, type RelaySettings, type RenderedEmail, type RenderedTemplate, type ResourceChange, type ResourceSource, type RoleDefinition, type RolesInput, type RunContext, type RuntimeOptions, type S3Bucket, type S3FilesOptions, type S3ListPage, type S3Object, type ScanGuardMode, type ScheduledDelete, type SendNotification, SenderAddressError, type SenderAddressErrorCode, SenderAddressNotFoundError, type SenderAddressState, type SentMail, type Session, type SessionOrganization, type Sharp, type SignInPolicy, type SignInRule, type SignatureOptions, type SocketEvents, type SourceOption, type SourceRef, type StaffAccessRule, type StaffSignIn, type StandardSchema, type StandardWebhookOptions, type StartJobsOptions, type StartWorkflowOptions, type StatusOptions, type StoreFileInput, type StoredMember, type StoredNotification, type StoredObject, type StoredOrganization, type StoredUser, type StrayValues, type SubscriptionDefinition, type SubscriptionEvent, type SubscriptionOptions, type TcpBridge, type TcpBridgeOptions, TemplateDataError, type TemplateOptions, type TemplateSchema, type TemplateScope, type TemplateSendOptions, type TemplateText, type TenantValue, type ToolAnnotations, type ToolCall, type ToolComment, type ToolCommentPage, type ToolComments, type ToolContext, type ToolRecord, type ToolRecords, type ToolSpec, type TrustedApp, type TurnOptions, type UnreadableEntry, type UnsubscribeLinks, type Urgency, type User, type UserCreatedHook, type UserTables, type UsersCursor, type UsersPage, type VapidSettings, type ViewSource, type WebPushFields, type WebPushOptions, type WebhooksOptions, type WidgetOptions, type WorkflowCatalog, type WorkflowTypes, type WorkflowsOptions, type WriteEvent, type WriteOperation, type WriteRecordToolsInput, addAppRoleToOwners, addCommentTool, addEveryUser, addMember, apiKeyCaller, apiKeySettings, apiKeyVariables, apnsKeyIdVariable, apnsKeyVariable, apnsSender, apnsTeamIdVariable, appNameOver, aspectRatio, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, authSchemaDrift, authSchemaMigration, authStoreTables, backgroundSettled, badRequest, batchWriteTool, beforeSignInPluginsVariable, betterAuthTokens, bridgeClosings, callsMigration, capSocketMessages, capturedBy, changesMigration, channelSendsMigration, checkAi, checkAuthSchema, checkCalls, checkChanges, checkChannelSends, checkComments, checkComputed, checkDerived, checkJobsSchema, checkMailFeedbackSchema, checkNotificationsSchema, checkQueryRunner, checkRealtimeRelay, checkRelayOptions, checkRelaySchema, checkResourcesOutsideAuthStore, checkSourceNames, checkStatusSchema, checkUnsubscribesSchema, checkUserTablesSchema, checkViewQueries, checkWebhooksSchema, checkWorkflowsSchema, coalesce, commentTools, commentsMigration, computedMigration, configExports, consoleAuditQueue, conversationKey, countRecordsTool, createAdmin, createConversations, createEncryptionTools, createFileCleanup, createOrganization, createRecordTool, createUser, defaultAppName, defaultHistoryPage, defaultSignInPolicy, defineEmail, defineFunction, defineJob, definePdf, defineTemplate, defineTool, deleteRecordTool, deleteUser, derivedMigration, describeResourceTool, deviceIdParam, deviceStore, devicesPath, enqueueJob, errorReportingSettings, errorReportingVariable, eventMatcher, fcmSender, fcmServiceAccountVariable, fileConversationStore, fileSize, fileType, forbidden, formatUri, functionApp, generateVapidKeys, getRecordTool, gmailSettingsScope, goTruePath, handleDroppedConnections, hasBuckets, hasUsers, historyIdParam, historyIdPattern, historyLimits, historyPath, historyStore, honorSocketMessageCaps, hookPath, imageSize, isBackgroundWork, isCaptured, isJobDefinition, isMailTemplate, isOAuthWellKnownPath, isSchedule, issueToken, jobDefinitions, jobsDrainApp, jobsSchema, jobsSchemaMigration, jwtAuthenticator, jwtVerifier, limitedFileStore, listCommentsTool, listOrganizations, listRecordsTool, listResourcesTool, listUsers, localFileStore, longQueryTimeoutMs, mailCheckHeaders, mailCheckSecret, mailFeedbackHeaders, mailFeedbackMigration, mailFeedbackResource, mailFeedbackSecret, mapSettings, mapStyleUrl, mapStyleVariable, maxDevicesPerUser, maxHistoryPage, maxMessageBytes, maxRecipients, maxRelayDevices, maxTokenTtlSeconds, maxTtlSeconds, maxUnreadCount, maxWidgetPropsBytes, mcpApprovals, mcpGate, mcpHandler, mcpIcons, mcpInstructions, mcpRoutes, mcpServer, mcpToolContext, mcpTools, migrationCommand, newWebhookSecret, normalizeRoles, notFound, notificationSenders, notificationsMigration, oauthWellKnownPaths, objectKey, onDoNotDisturb, organizationsPageSize, overSignIn, ownedDefinitionsMigration, parseColumns, parseRoles, passwordLength, pluginOptions, pluginsBeforeSignIn, pluginsFor, pluginsVariable, pngIcons, poolWaitMs, postgresDeviceStore, postgresHistoryStore, processor, pushMessage, queryRunnerMigration, readApnsSettings, readDbConnections, readDefinitionsVersion, readFcmSettings, readJson, readOnlyQueryTool, readOperatorSettings, readOutbox, readPlatformSignIns, readRecordTools, readRelaySettings, readVapidSettings, readWriteQueryTool, readableResources, realtimeLimits, realtimeRelayMigration, recordBlocksOf, recordOf, redactHookKeys, refusalOf, refused, relayClientEvents, relayCredentialVariable, relayHandle, relayMigration, relayPresencePath, relayResults, relaySendAnswer, relaySendPath, relaySendRequest, relaySender, relaySettings, relayUrlVariable, relayVariables, relayed, releaseConnectionsWithUsers, reloadingAdmin, removeDevicesWithUsers, removeHistoryWithUsers, removeMember, renderVariant, requestApproval, requireEnv, resourceChange, roleChoices, runInBackground, runReadOnlyQuery, runReadWriteQuery, runTurn, runtimeUrl, runtimeVariable, s3FileStore, seesAssistant, seesRuntime, sendNotification, sessionOf, setMemberRoles, setUserBanned, setUserRole, shownAppName, signInPolicyMethods, socketMessageCapOf, sourceOptions, sourcesFor, sourcesVariable, sqlSends, startErrorReporting, startJobs, startWorkflow, statusMigration, statusNames, storageCleanupSchedule, storageProvider, storeFile, storeUsage, streamChatCompletion, subscription, supabasePath, tcpBridge, thumbHash, typingResources, unauthorized, unsubscribesMigration, updateRecordTool, urgencies, userTableResources, userTablesMigration, usersPageSize, vapidPrivateKeyVariable, vapidPublicKeyVariable, vapidSubjectVariable, variantPath, verifySignature, verifyStandardWebhook, waitUntil, wantsLongQueries, webManifestPath, webPushSender, webauthnPath, webhookIssuePath, webhookParams, webhooksMigration, widget, withCacheBreakpoints, withTrustedApps, workflowInstructions, workflowReadTools, workflowTypes, workflowWriteTools, workflowsMigration, writeRecordTools };
|
|
239
|
+
export { type AddVerifier, type Admin, type AdminAuth, type AdminOptions, type AggregateParams, type ApiFunction, type ApiKeys, type ApiKeysOptions, type ApnsEnvironment, type ApnsOptions, type ApnsSettings, type AppIcons, type AppIdentity, type AppPoolConfig, type ApplyOptions, type ApplyResult, type ApprovalAnswer, type ApprovalRequest, type ArgumentsPayload, type AssistantBackend, type AssistantOptions, type AssistantSettings, type AssistantTool, type AuditEvent, type AuditQueue, type AuthHooks, type AuthSettings, type AuthenticateSettings, type Authenticator, type BaseToolContext, type BatchOperation, type BatchResult, type BetterAuthAuthenticator, type BetterAuthAuthenticatorOptions, type BridgeClosing, type BridgeRule, type BridgeTarget, BulkMailError, type CallBackend, type CallMember, type Caller, type CallerOptions, type CallsAccess, type CallsOptions, type CapturedRow, type CascadingKey, type ChannelBroadcast, type ChannelSender, type ChatMessage, type ChatTextPart, type CheckAiInput, type CleanupEntry, type CleanupReport, type CleanupSchedule, type CoalescedChange, type CommentItem, type CommentToolsInput, type CommentUsers, type Completion, type CompletionOptions, type ConnectionListing, ConnectionsBusy, type Conversation, type ConversationRecord, type ConversationStore, type ConversationsOptions, type CorsOptions, type CorsOrigins, type CreateAdminInput, type CreateAuthOptions, type DecryptField, type DerivedClock, type DerivedCompute, type DerivedContext, type Device, type DeviceColumn, type DeviceKind, type DeviceStore, DeviceStoreError, type DrainResult, type EmailComponent, type EmailOptions, type EmailTemplate, type EncryptionStatus, type EncryptionTools, type EncryptionToolsInput, type EnqueueJob, type EnqueueOptions, type ErrorReporter, type ErrorReportingOptions, type ErrorReportingSettings, type EventData, type EventsOptions, FatalJobError, type FcmOptions, type FcmSettings, type FieldApplied, type FieldDecrypter, type FieldReader, type FieldStatus, type FileCleanupInput, type FileLimits, type FileObject, type FileProvider, type FileProviderSettings, type FileRef, type FileStore, type FileVariantObject, type FilesOptions, type FunctionApp, type FunctionCaller, type FunctionContext, type FunctionEnv, type FunctionHandler, type FunctionOptions, type FunctionRecords, type FunctionSocket, type FunctionSource, type HistoryColumn, type HistoryOptions, type HistoryPosition, type HistoryStore, HistoryStoreError, type HookContext, HttpProblem, type IssueTokenOptions, type JobContext, type JobDeclaration, type JobDefinition, type JobName, type JobOptions, type JobPayload, type JobRun, type JobsRuntime, type JoinedUser, type JsonObject, type JsonValue, type JwtOptions, type JwtVerifyOptions, type KeyFunctionContext, type LinkedAccount, type ListParams, type ListedOrganization, type LiveKitBackend, type LocalFilesOptions, type MailAttachment, type MailFeedback, type MailMessage, type MailSender, MailSenderRefusedError, MailServerTimeoutError, type MailTemplate, type Mailer, type MapLayer, type MapOptions, type MapSettings, type McpApprovals, type McpGateInput, type McpHandlerInput, type McpRoutesInput, type McpServerInput, type McpToolsInput, type McpWrites, type MemberInput, type Membership, MissingCredentials, type MobileConfig, type MobileSplash, type MobileSplashLook, ModelError, type ModelSettings, type NewDevice, type NewNotification, type NewOrganization, type NewUser, type NotificationRecipients, NotificationSendError, type NotificationsOptions, type OperatorProvider, type OrganizationRole, type OrganizationsCursor, type OrganizationsOptions, type OrganizationsPage, type OverSignIn, type PdfComponent, type PdfOptions, type PdfTemplate, type PersonalMail, type PersonalMailEntry, PersonalMailError, type PersonalMailErrorCode, type PersonalMailMessage, type PersonalMailProviderId, type PgModule, type PipelineHook, type PlatformSignIn, type PluginOption, type PluginRef, type PngIcon, type ProtectedFunctionOptions, type PublicFunctionContext, type PublicFunctionEnv, type PublicFunctionHandler, type PublicFunctionOptions, type PushAnswer, type PushMessage, PushMessageError, type PushSender, type QueryOptions, type QueryResult, type ReadableResources, type RealtimeOptions, type RealtimePrune, type RealtimeRelayOptions, type RealtimeRelaySettings, type ReasoningDetail, type ReasoningEffort, type RebindOption, type RecordGroups, type RecordKey, type RecordKeyInput, type RecordPage, type RelayChannelOptions, type RelayClientEvent, type RelayDevice, type RelayMembers, type RelayPresence, type RelayResult, type RelaySendAnswer, type RelaySendRequest, type RelaySettings, type RenderedEmail, type RenderedTemplate, type ResourceChange, type ResourceSource, type RoleDefinition, type RolesInput, type RunContext, type RuntimeOptions, type S3Bucket, type S3FilesOptions, type S3ListPage, type S3Object, type ScanGuardMode, type ScheduledDelete, type SendNotification, SenderAddressError, type SenderAddressErrorCode, SenderAddressNotFoundError, type SenderAddressState, type SenderAddressVerifier, type SentMail, type Session, type SessionOrganization, type Sharp, type SignInPolicy, type SignInRule, type SignatureOptions, type SocketEvents, type SourceOption, type SourceRef, type StaffAccessRule, type StaffSignIn, type StandardSchema, type StandardWebhookOptions, type StartJobsOptions, type StartWorkflowOptions, type StatusOptions, type StoreFileInput, type StoredMember, type StoredNotification, type StoredObject, type StoredOrganization, type StoredUser, type StrayValues, type SubscriptionDefinition, type SubscriptionEvent, type SubscriptionOptions, type TcpBridge, type TcpBridgeOptions, TemplateDataError, type TemplateOptions, type TemplateSchema, type TemplateScope, type TemplateSendOptions, type TemplateText, type TenantValue, type ToolAnnotations, type ToolCall, type ToolComment, type ToolCommentPage, type ToolComments, type ToolContext, type ToolRecord, type ToolRecords, type ToolSpec, type TrustedApp, type TurnOptions, type UnreadableEntry, type UnsubscribeLinks, type Urgency, type User, type UserCreatedHook, type UserTables, type UsersCursor, type UsersPage, type VapidSettings, type VerificationInput, type VerificationMessage, type VerificationOutcome, type VerifyInput, type VerifyTools, type ViewSource, type WebPushFields, type WebPushOptions, type WebhooksOptions, type WidgetOptions, type WorkflowCatalog, type WorkflowTypes, type WorkflowsOptions, type WriteEvent, type WriteOperation, type WriteRecordToolsInput, addAppRoleToOwners, addCommentTool, addEveryUser, addMember, apiKeyCaller, apiKeySettings, apiKeyVariables, apnsKeyIdVariable, apnsKeyVariable, apnsSender, apnsTeamIdVariable, appNameOver, aspectRatio, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, authSchemaDrift, authSchemaMigration, authStoreTables, backgroundSettled, badRequest, batchWriteTool, beforeSignInPluginsVariable, betterAuthTokens, bridgeClosings, callsMigration, capSocketMessages, capturedBy, changesMigration, channelSendsMigration, checkAi, checkAuthSchema, checkCalls, checkChanges, checkChannelSends, checkComments, checkComputed, checkDerived, checkJobsSchema, checkMailFeedbackSchema, checkNotificationsSchema, checkQueryRunner, checkRealtimeRelay, checkRelayOptions, checkRelaySchema, checkResourcesOutsideAuthStore, checkSourceNames, checkStatusSchema, checkUnsubscribesSchema, checkUserTablesSchema, checkViewQueries, checkWebhooksSchema, checkWorkflowsSchema, coalesce, commentTools, commentsMigration, computedMigration, configExports, consoleAuditQueue, conversationKey, countRecordsTool, createAdmin, createConversations, createEncryptionTools, createFileCleanup, createOrganization, createRecordTool, createUser, defaultAppName, defaultHistoryPage, defaultSignInPolicy, defineEmail, defineFunction, defineJob, definePdf, defineTemplate, defineTool, deleteRecordTool, deleteUser, derivedMigration, describeResourceTool, deviceIdParam, deviceStore, devicesPath, enqueueJob, errorReportingSettings, errorReportingVariable, eventMatcher, fcmSender, fcmServiceAccountVariable, fileConversationStore, fileSize, fileType, forbidden, formatUri, functionApp, generateVapidKeys, getRecordTool, gmailSettingsScope, goTruePath, handleDroppedConnections, hasBuckets, hasUsers, historyIdParam, historyIdPattern, historyLimits, historyPath, historyStore, honorSocketMessageCaps, hookPath, imageSize, isBackgroundWork, isCaptured, isJobDefinition, isMailTemplate, isOAuthWellKnownPath, isSchedule, issueToken, jobDefinitions, jobsDrainApp, jobsSchema, jobsSchemaMigration, jwtAuthenticator, jwtVerifier, limitedFileStore, listCommentsTool, listOrganizations, listRecordsTool, listResourcesTool, listUsers, localFileStore, longQueryTimeoutMs, mailFeedbackHeaders, mailFeedbackMigration, mailFeedbackResource, mailFeedbackSecret, mapSettings, mapStyleUrl, mapStyleVariable, maxDevicesPerUser, maxHistoryPage, maxMessageBytes, maxRecipients, maxRelayDevices, maxTokenTtlSeconds, maxTtlSeconds, maxUnreadCount, maxWidgetPropsBytes, mcpApprovals, mcpGate, mcpHandler, mcpIcons, mcpInstructions, mcpRoutes, mcpServer, mcpToolContext, mcpTools, migrationCommand, newWebhookSecret, normalizeRoles, notFound, notificationSenders, notificationsMigration, oauthWellKnownPaths, objectKey, onDoNotDisturb, organizationsPageSize, overSignIn, ownedDefinitionsMigration, parseColumns, parseRoles, passwordLength, pluginOptions, pluginsBeforeSignIn, pluginsFor, pluginsVariable, pngIcons, poolWaitMs, postgresDeviceStore, postgresHistoryStore, processor, pushMessage, queryRunnerMigration, readApnsSettings, readDbConnections, readDefinitionsVersion, readFcmSettings, readJson, readOnlyQueryTool, readOperatorSettings, readOutbox, readPlatformSignIns, readRecordTools, readRelaySettings, readVapidSettings, readWriteQueryTool, readableResources, realtimeLimits, realtimeRelayMigration, recordBlocksOf, recordOf, redactHookKeys, refusalOf, refused, relayClientEvents, relayCredentialVariable, relayHandle, relayMigration, relayPresencePath, relayResults, relaySendAnswer, relaySendPath, relaySendRequest, relaySender, relaySettings, relayUrlVariable, relayVariables, relayed, releaseConnectionsWithUsers, reloadingAdmin, removeDevicesWithUsers, removeHistoryWithUsers, removeMember, renderVariant, requestApproval, requireEnv, resourceChange, roleChoices, runInBackground, runReadOnlyQuery, runReadWriteQuery, runTurn, runtimeUrl, runtimeVariable, s3FileStore, seesAssistant, seesRuntime, sendNotification, sessionOf, setMemberRoles, setUserBanned, setUserRole, shownAppName, signInPolicyMethods, socketMessageCapOf, sourceOptions, sourcesFor, sourcesVariable, sqlSends, startErrorReporting, startJobs, startWorkflow, statusMigration, statusNames, storageCleanupSchedule, storageProvider, storeFile, storeUsage, streamChatCompletion, subscription, supabasePath, tcpBridge, thumbHash, typingResources, unauthorized, unsubscribesMigration, updateRecordTool, urgencies, userTableResources, userTablesMigration, usersPageSize, vapidPrivateKeyVariable, vapidPublicKeyVariable, vapidSubjectVariable, variantPath, verifySignature, verifyStandardWebhook, waitUntil, wantsLongQueries, webManifestPath, webPushSender, webauthnPath, webhookIssuePath, webhookParams, webhooksMigration, widget, withCacheBreakpoints, withTrustedApps, workflowInstructions, workflowReadTools, workflowTypes, workflowWriteTools, workflowsMigration, writeRecordTools };
|
package/dist/index.js
CHANGED
|
@@ -37,8 +37,6 @@ import { PersonalMailError } from "./personal-mail/personal-mail-error.js";
|
|
|
37
37
|
import { gmailSettingsScope } from "./personal-mail/gmail-sender-addresses.js";
|
|
38
38
|
import { MailSenderRefusedError } from "./personal-mail/mail-sender-refused.js";
|
|
39
39
|
import { SenderAddressError, SenderAddressNotFoundError } from "./personal-mail/sender-address-error.js";
|
|
40
|
-
import { newWebhookSecret } from "./webhooks/standard-webhooks.js";
|
|
41
|
-
import { mailCheckHeaders, mailCheckSecret } from "./personal-mail/mail-check-signing.js";
|
|
42
40
|
import { passwordLength } from "./better-auth/new-account-password.js";
|
|
43
41
|
import { MailServerTimeoutError } from "./mail/mail-server-timeout.js";
|
|
44
42
|
import { readOperatorSettings } from "./better-auth/operator-provider.js";
|
|
@@ -74,6 +72,7 @@ import { eventMatcher } from "./changes/match-events.js";
|
|
|
74
72
|
import { parseColumns, readOutbox } from "./changes/outbox.js";
|
|
75
73
|
import { recordOf, resourceChange } from "./changes/resource-change.js";
|
|
76
74
|
import { defineFunction } from "./functions/define-function.js";
|
|
75
|
+
import { newWebhookSecret } from "./webhooks/standard-webhooks.js";
|
|
77
76
|
import { subscription } from "./webhooks/subscription.js";
|
|
78
77
|
import { verifySignature, verifyStandardWebhook } from "./functions/verify-signature.js";
|
|
79
78
|
import { hookPath, redactHookKeys, webhookIssuePath, webhookParams } from "./workflows/hooks/hook-paths.js";
|
|
@@ -176,4 +175,4 @@ import { defineEmail } from "./mail/define-email.js";
|
|
|
176
175
|
import { definePdf } from "./pdf/define-pdf.js";
|
|
177
176
|
import { startJobs } from "./jobs/runtime.js";
|
|
178
177
|
import { jobsDrainApp } from "./jobs/drain-route.js";
|
|
179
|
-
export { BulkMailError, ConnectionsBusy, DeviceStoreError, FatalJobError, HistoryStoreError, HttpProblem, MailSenderRefusedError, MailServerTimeoutError, MissingCredentials, ModelError, NotificationSendError, PersonalMailError, PushMessageError, SenderAddressError, SenderAddressNotFoundError, TemplateDataError, addAppRoleToOwners, addCommentTool, addEveryUser, addMember, apiKeyCaller, apiKeySettings, apiKeyVariables, apnsKeyIdVariable, apnsKeyVariable, apnsSender, apnsTeamIdVariable, appNameOver, aspectRatio, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, authSchemaDrift, authSchemaMigration, authStoreTables, backgroundSettled, badRequest, batchWriteTool, beforeSignInPluginsVariable, betterAuthTokens, bridgeClosings, callsMigration, capSocketMessages, capturedBy, changesMigration, channelSendsMigration, checkAi, checkAuthSchema, checkCalls, checkChanges, checkChannelSends, checkComments, checkComputed, checkDerived, checkJobsSchema, checkMailFeedbackSchema, checkNotificationsSchema, checkQueryRunner, checkRealtimeRelay, checkRelayOptions, checkRelaySchema, checkResourcesOutsideAuthStore, checkSourceNames, checkStatusSchema, checkUnsubscribesSchema, checkUserTablesSchema, checkViewQueries, checkWebhooksSchema, checkWorkflowsSchema, coalesce, commentTools, commentsMigration, computedMigration, configExports, consoleAuditQueue, conversationKey, countRecordsTool, createAdmin, createConversations, createEncryptionTools, createFileCleanup, createOrganization, createRecordTool, createUser, defaultAppName, defaultHistoryPage, defaultSignInPolicy, defineEmail, defineFunction, defineJob, definePdf, defineTemplate, defineTool, deleteRecordTool, deleteUser, derivedMigration, describeResourceTool, deviceIdParam, deviceStore, devicesPath, enqueueJob, errorReportingSettings, errorReportingVariable, eventMatcher, fcmSender, fcmServiceAccountVariable, fileConversationStore, fileSize, fileType, forbidden, formatUri, functionApp, generateVapidKeys, getRecordTool, gmailSettingsScope, goTruePath, handleDroppedConnections, hasBuckets, hasUsers, historyIdParam, historyIdPattern, historyLimits, historyPath, historyStore, honorSocketMessageCaps, hookPath, imageSize, isBackgroundWork, isCaptured, isJobDefinition, isMailTemplate, isOAuthWellKnownPath, isSchedule, issueToken, jobDefinitions, jobsDrainApp, jobsSchema, jobsSchemaMigration, jwtAuthenticator, jwtVerifier, limitedFileStore, listCommentsTool, listOrganizations, listRecordsTool, listResourcesTool, listUsers, localFileStore, longQueryTimeoutMs,
|
|
178
|
+
export { BulkMailError, ConnectionsBusy, DeviceStoreError, FatalJobError, HistoryStoreError, HttpProblem, MailSenderRefusedError, MailServerTimeoutError, MissingCredentials, ModelError, NotificationSendError, PersonalMailError, PushMessageError, SenderAddressError, SenderAddressNotFoundError, TemplateDataError, addAppRoleToOwners, addCommentTool, addEveryUser, addMember, apiKeyCaller, apiKeySettings, apiKeyVariables, apnsKeyIdVariable, apnsKeyVariable, apnsSender, apnsTeamIdVariable, appNameOver, aspectRatio, assistantProtocolRoutes, assistantRoles, assistantSettings, assistantVariables, authSchemaDrift, authSchemaMigration, authStoreTables, backgroundSettled, badRequest, batchWriteTool, beforeSignInPluginsVariable, betterAuthTokens, bridgeClosings, callsMigration, capSocketMessages, capturedBy, changesMigration, channelSendsMigration, checkAi, checkAuthSchema, checkCalls, checkChanges, checkChannelSends, checkComments, checkComputed, checkDerived, checkJobsSchema, checkMailFeedbackSchema, checkNotificationsSchema, checkQueryRunner, checkRealtimeRelay, checkRelayOptions, checkRelaySchema, checkResourcesOutsideAuthStore, checkSourceNames, checkStatusSchema, checkUnsubscribesSchema, checkUserTablesSchema, checkViewQueries, checkWebhooksSchema, checkWorkflowsSchema, coalesce, commentTools, commentsMigration, computedMigration, configExports, consoleAuditQueue, conversationKey, countRecordsTool, createAdmin, createConversations, createEncryptionTools, createFileCleanup, createOrganization, createRecordTool, createUser, defaultAppName, defaultHistoryPage, defaultSignInPolicy, defineEmail, defineFunction, defineJob, definePdf, defineTemplate, defineTool, deleteRecordTool, deleteUser, derivedMigration, describeResourceTool, deviceIdParam, deviceStore, devicesPath, enqueueJob, errorReportingSettings, errorReportingVariable, eventMatcher, fcmSender, fcmServiceAccountVariable, fileConversationStore, fileSize, fileType, forbidden, formatUri, functionApp, generateVapidKeys, getRecordTool, gmailSettingsScope, goTruePath, handleDroppedConnections, hasBuckets, hasUsers, historyIdParam, historyIdPattern, historyLimits, historyPath, historyStore, honorSocketMessageCaps, hookPath, imageSize, isBackgroundWork, isCaptured, isJobDefinition, isMailTemplate, isOAuthWellKnownPath, isSchedule, issueToken, jobDefinitions, jobsDrainApp, jobsSchema, jobsSchemaMigration, jwtAuthenticator, jwtVerifier, limitedFileStore, listCommentsTool, listOrganizations, listRecordsTool, listResourcesTool, listUsers, localFileStore, longQueryTimeoutMs, mailFeedbackHeaders, mailFeedbackMigration, mailFeedbackResource, mailFeedbackSecret, mapSettings, mapStyleUrl, mapStyleVariable, maxDevicesPerUser, maxHistoryPage, maxMessageBytes, maxRecipients, maxRelayDevices, maxTokenTtlSeconds, maxTtlSeconds, maxUnreadCount, maxWidgetPropsBytes, mcpApprovals, mcpGate, mcpHandler, mcpIcons, mcpInstructions, mcpRoutes, mcpServer, mcpToolContext, mcpTools, migrationCommand, newWebhookSecret, normalizeRoles, notFound, notificationSenders, notificationsMigration, oauthWellKnownPaths, objectKey, onDoNotDisturb, organizationsPageSize, overSignIn, ownedDefinitionsMigration, parseColumns, parseRoles, passwordLength, pluginOptions, pluginsBeforeSignIn, pluginsFor, pluginsVariable, pngIcons, poolWaitMs, postgresDeviceStore, postgresHistoryStore, processor, pushMessage, queryRunnerMigration, readApnsSettings, readDbConnections, readDefinitionsVersion, readFcmSettings, readJson, readOnlyQueryTool, readOperatorSettings, readOutbox, readPlatformSignIns, readRecordTools, readRelaySettings, readVapidSettings, readWriteQueryTool, readableResources, realtimeLimits, realtimeRelayMigration, recordBlocksOf, recordOf, redactHookKeys, refusalOf, refused, relayClientEvents, relayCredentialVariable, relayHandle, relayMigration, relayPresencePath, relayResults, relaySendAnswer, relaySendPath, relaySendRequest, relaySender, relaySettings, relayUrlVariable, relayVariables, relayed, releaseConnectionsWithUsers, reloadingAdmin, removeDevicesWithUsers, removeHistoryWithUsers, removeMember, renderVariant, requestApproval, requireEnv, resourceChange, roleChoices, runInBackground, runReadOnlyQuery, runReadWriteQuery, runTurn, runtimeUrl, runtimeVariable, s3FileStore, seesAssistant, seesRuntime, sendNotification, sessionOf, setMemberRoles, setUserBanned, setUserRole, shownAppName, signInPolicyMethods, socketMessageCapOf, sourceOptions, sourcesFor, sourcesVariable, sqlSends, startErrorReporting, startJobs, startWorkflow, statusMigration, statusNames, storageCleanupSchedule, storageProvider, storeFile, storeUsage, streamChatCompletion, subscription, supabasePath, tcpBridge, thumbHash, typingResources, unauthorized, unsubscribesMigration, updateRecordTool, urgencies, userTableResources, userTablesMigration, usersPageSize, vapidPrivateKeyVariable, vapidPublicKeyVariable, vapidSubjectVariable, variantPath, verifySignature, verifyStandardWebhook, waitUntil, wantsLongQueries, webManifestPath, webPushSender, webauthnPath, webhookIssuePath, webhookParams, webhooksMigration, widget, withCacheBreakpoints, withTrustedApps, workflowInstructions, workflowReadTools, workflowTypes, workflowWriteTools, workflowsMigration, writeRecordTools };
|
package/dist/locale/en.js
CHANGED
|
@@ -66,11 +66,7 @@ var en_default = {
|
|
|
66
66
|
"doneTitle": "Unsubscribed",
|
|
67
67
|
"done": "{recipient} gets no more {topic} mail."
|
|
68
68
|
},
|
|
69
|
-
"personal-mail": {
|
|
70
|
-
"MAIL_SENDER_IN_USE": "{address} is still the From address of records in this app. Give them another From address first.",
|
|
71
|
-
"ALIAS_CHECK_SUBJECT": "Test message for the From address {address}",
|
|
72
|
-
"ALIAS_CHECK_TEXT": "This is a test message to check that your mailbox can send as {address}. The app you connected your mailbox to sent it when you added or checked that address. It went to an address used only for this check. You do not need to do anything with it, and you can delete it."
|
|
73
|
-
}
|
|
69
|
+
"personal-mail": { "MAIL_SENDER_IN_USE": "{address} is still the From address of records in this app. Give them another From address first." }
|
|
74
70
|
};
|
|
75
71
|
//#endregion
|
|
76
72
|
export { en_default as default };
|
package/dist/locale/nl.js
CHANGED
|
@@ -66,11 +66,7 @@ var nl_default = {
|
|
|
66
66
|
"doneTitle": "Afgemeld",
|
|
67
67
|
"done": "{recipient} krijgt geen {topic}-mail meer."
|
|
68
68
|
},
|
|
69
|
-
"personal-mail": {
|
|
70
|
-
"MAIL_SENDER_IN_USE": "{address} is nog het afzenderadres van records in deze app. Geef ze eerst een ander afzenderadres.",
|
|
71
|
-
"ALIAS_CHECK_SUBJECT": "Testbericht voor het afzenderadres {address}",
|
|
72
|
-
"ALIAS_CHECK_TEXT": "Dit is een testbericht om te controleren dat je mailbox kan verzenden als {address}. De app waaraan je je mailbox hebt gekoppeld, stuurde het toen je dat adres toevoegde of controleerde. Het ging naar een adres dat alleen voor deze controle dient. Je hoeft er niets mee te doen en je kunt het verwijderen."
|
|
73
|
-
}
|
|
69
|
+
"personal-mail": { "MAIL_SENDER_IN_USE": "{address} is nog het afzenderadres van records in deze app. Geef ze eerst een ander afzenderadres." }
|
|
74
70
|
};
|
|
75
71
|
//#endregion
|
|
76
72
|
export { nl_default as default };
|
package/dist/package.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VerificationRow } from "./verifiers/verification-store.js";
|
|
1
2
|
import "./sender-store.js";
|
|
2
3
|
import { SenderRowState } from "./sender-address-state.js";
|
|
3
4
|
import "./mail-sender.js";
|
|
@@ -15,6 +16,21 @@ export type ListedMailSender = {
|
|
|
15
16
|
state: Exclude<SenderRowState, 'removed'>;
|
|
16
17
|
connection?: string;
|
|
17
18
|
listedAt?: string;
|
|
19
|
+
/** The latest verification by each of the app's verifiers, when it has any. */
|
|
20
|
+
verifications?: ListedVerification[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A verification as the account page lists it: pending until `expiresAt`, verified until `validUntil`, or failed with
|
|
24
|
+
* an `errorCode` and the verifier's `error` text, which is data, shown as plain text.
|
|
25
|
+
*/
|
|
26
|
+
export type ListedVerification = {
|
|
27
|
+
verifier: string;
|
|
28
|
+
state: VerificationRow['state'];
|
|
29
|
+
expiresAt?: string;
|
|
30
|
+
settledAt?: string;
|
|
31
|
+
validUntil?: string;
|
|
32
|
+
errorCode?: string;
|
|
33
|
+
error?: string;
|
|
18
34
|
};
|
|
19
35
|
/**
|
|
20
36
|
* A mailbox connection as the account page lists it: its provider, its own address when the link names it, whether
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { stateIn } from "./mail-sender.js";
|
|
2
2
|
//#region src/personal-mail/listed-mail-senders.ts
|
|
3
|
-
const
|
|
3
|
+
const iso = (at) => new Date(at).toISOString();
|
|
4
|
+
const listedVerification = (row) => ({
|
|
5
|
+
verifier: row.verifier,
|
|
6
|
+
state: row.state,
|
|
7
|
+
...row.state === "pending" && { expiresAt: iso(row.expiresAt) },
|
|
8
|
+
...row.settledAt && { settledAt: iso(row.settledAt) },
|
|
9
|
+
...row.validUntil && { validUntil: iso(row.validUntil) },
|
|
10
|
+
...row.errorCode && { errorCode: row.errorCode },
|
|
11
|
+
...row.error && { error: row.error }
|
|
12
|
+
});
|
|
13
|
+
/** `row` as the account page lists it, with its latest `verifications` when the app has verifiers. */
|
|
14
|
+
const listedSender = (book, row, verifications) => {
|
|
4
15
|
const state = stateIn(book, row);
|
|
5
16
|
if (state === "removed") return;
|
|
6
17
|
return {
|
|
@@ -11,13 +22,14 @@ const listedSender = (book, row) => {
|
|
|
11
22
|
isDefault: row.isDefault,
|
|
12
23
|
state,
|
|
13
24
|
...state !== "detached" && row.connectionId && { connection: row.connectionId },
|
|
14
|
-
...row.listedAt && { listedAt: new Date(row.listedAt).toISOString() }
|
|
25
|
+
...row.listedAt && { listedAt: new Date(row.listedAt).toISOString() },
|
|
26
|
+
...verifications && { verifications: verifications.filter(({ senderId }) => senderId === row.id).map(listedVerification) }
|
|
15
27
|
};
|
|
16
28
|
};
|
|
17
|
-
/** The person's addresses and connections, as `GET /account/mail-senders` answers them. */
|
|
18
|
-
const listedMailSenders = (book) => ({
|
|
29
|
+
/** The person's addresses and connections, as `GET /account/mail-senders` answers them, with their latest `verifications` when the app has verifiers. */
|
|
30
|
+
const listedMailSenders = (book, verifications) => ({
|
|
19
31
|
...book.ownAddress && { address: book.ownAddress },
|
|
20
|
-
senders: book.rows.flatMap((row) => listedSender(book, row) ?? []),
|
|
32
|
+
senders: book.rows.flatMap((row) => listedSender(book, row, verifications) ?? []),
|
|
21
33
|
connections: book.connections.map(({ account, provider }) => ({
|
|
22
34
|
id: account.id,
|
|
23
35
|
provider: provider.id,
|
|
@@ -27,4 +39,4 @@ const listedMailSenders = (book) => ({
|
|
|
27
39
|
}))
|
|
28
40
|
});
|
|
29
41
|
//#endregion
|
|
30
|
-
export { listedMailSenders, listedSender };
|
|
42
|
+
export { listedMailSenders, listedSender, listedVerification };
|
|
@@ -4,7 +4,7 @@ import { senderRowState } from "./sender-address-state.js";
|
|
|
4
4
|
//#region src/personal-mail/mail-sender.ts
|
|
5
5
|
const connected = (book, row) => book.connections.some(({ account }) => account.id === row.connectionId);
|
|
6
6
|
/** The state of a row of `book`'s (`senderRowState`). */
|
|
7
|
-
const stateIn = (book, row) => senderRowState(row, connected(book, row));
|
|
7
|
+
const stateIn = (book, row) => senderRowState(row, connected(book, row), book.proofs?.find(({ senderId }) => senderId === row.id)?.settledAt);
|
|
8
8
|
/** The rows a person may choose: neither removed nor detached, oldest first. */
|
|
9
9
|
const usableRows = (book) => book.rows.flatMap((row) => {
|
|
10
10
|
const state = stateIn(book, row);
|