palbase 0.23.1 → 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/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{35PCXXWS.js → 2PXBKWY3.js} +2 -2
- package/dist/chunks/{GO3DJFL2.js → 62SDWDU2.js} +2 -2
- package/dist/chunks/{XE5MJSS4.js → 73GUQ7O4.js} +2 -2
- package/dist/chunks/{JZJXMPER.js → CH6ZG2CY.js} +2 -2
- package/dist/chunks/{4RAFUD5J.js → CIB3ZU7S.js} +1 -1
- package/dist/chunks/{KQSO62BH.js → DEWQF7ZN.js} +2 -2
- package/dist/chunks/{4N6DBTHE.js → DY2NTT6S.js} +2 -2
- package/dist/chunks/{E2UEUE4B.js → GYHD3G7Y.js} +2 -2
- package/dist/chunks/{R5NMH5PL.js → IRWYRK5U.js} +2 -2
- package/dist/chunks/{QY4VHBSI.js → KKJGCMY5.js} +1 -1
- package/dist/chunks/{5QTY55XZ.js → KYKFUOCQ.js} +1 -1
- package/dist/chunks/{U5FQV4H6.js → L55KFXFC.js} +2 -2
- package/dist/chunks/{BAGSKVPB.js → L63LAEZQ.js} +2 -2
- package/dist/chunks/{D6PLSRTA.js → MNJAIOQ4.js} +1 -1
- package/dist/chunks/{YTTNY3PC.js → PHFDYTEI.js} +2 -2
- package/dist/chunks/{TZC63UZ7.js → QE2USQPS.js} +2 -2
- package/dist/chunks/{OLYFCCY7.js → RHFDGY22.js} +1 -1
- package/dist/chunks/SCQMIFKF.js +2 -0
- package/dist/chunks/{OUNCAINB.js → SSWYXBEI.js} +1 -1
- package/dist/chunks/{IHEOFZ2Z.js → UHG2DI6L.js} +2 -2
- package/dist/chunks/{BB57HGRH.js → UKRESDGU.js} +2 -2
- package/dist/chunks/{A3LKL4L6.js → UQKXHCHK.js} +2 -2
- package/dist/chunks/{675S5LPE.js → V44VJIJC.js} +1 -1
- package/dist/cli.js +103 -103
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/ai/src/chats.d.ts +2 -1
- package/types/cloud/src/generated/project.d.ts +2 -2
- package/types/internal/src/modules/auth.d.ts +84 -13
- package/types/internal/src/modules/notify.d.ts +68 -1
- package/types/internal/src/modules/stores.d.ts +4 -0
- package/dist/chunks/G3XVTFYH.js +0 -2
|
@@ -401,7 +401,7 @@ export type AdminTestUserCreateRequest = {
|
|
|
401
401
|
*/
|
|
402
402
|
count?: number;
|
|
403
403
|
/**
|
|
404
|
-
* Test users to create
|
|
404
|
+
* Test users to create, each of the kind it says (AdminTestUserSpec).
|
|
405
405
|
*/
|
|
406
406
|
users?: AdminTestUserSpec[];
|
|
407
407
|
/**
|
|
@@ -416,9 +416,37 @@ export type AdminTestUserCredential = {
|
|
|
416
416
|
access_token?: string;
|
|
417
417
|
email: string;
|
|
418
418
|
/**
|
|
419
|
-
*
|
|
419
|
+
* The fixed code its email accepts, when it was given one.
|
|
420
420
|
*/
|
|
421
|
-
|
|
421
|
+
email_otp?: string;
|
|
422
|
+
/**
|
|
423
|
+
* Whether its email is verified.
|
|
424
|
+
*/
|
|
425
|
+
email_verified: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* The second factor it was made with.
|
|
428
|
+
*/
|
|
429
|
+
mfa?: "totp" | "sms" | "email";
|
|
430
|
+
/**
|
|
431
|
+
* Its phone's fixed code, when it has a phone.
|
|
432
|
+
*/
|
|
433
|
+
otp?: string;
|
|
434
|
+
/**
|
|
435
|
+
* In clear. Shown once. Absent for a passwordless user.
|
|
436
|
+
*/
|
|
437
|
+
password?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Its phone, when it has one.
|
|
440
|
+
*/
|
|
441
|
+
phone?: string;
|
|
442
|
+
/**
|
|
443
|
+
* A totp factor's key (base32), shown once: a test makes its codes with it.
|
|
444
|
+
*/
|
|
445
|
+
totp_secret?: string;
|
|
446
|
+
/**
|
|
447
|
+
* A totp factor's otpauth:// address, shown once.
|
|
448
|
+
*/
|
|
449
|
+
totp_url?: string;
|
|
422
450
|
user_id: string;
|
|
423
451
|
};
|
|
424
452
|
export type AdminTestUserList = {
|
|
@@ -439,17 +467,39 @@ export type AdminTestUserPhoneRequest = {
|
|
|
439
467
|
phone: string;
|
|
440
468
|
};
|
|
441
469
|
/**
|
|
442
|
-
* One test user
|
|
470
|
+
* One test user, of the kind it says. What it leaves out is made: an address (test-…@test.invalid, which receives no mail — its mail is kept in its test inbox, GET /notify/test-users/{user_id}/messages), a password (unless passwordless), its phone's fixed code. A real address of the developer's gets its mail too.
|
|
443
471
|
*/
|
|
444
472
|
export type AdminTestUserSpec = {
|
|
445
|
-
email: string;
|
|
446
473
|
/**
|
|
447
|
-
*
|
|
474
|
+
* Its address: made when omitted.
|
|
475
|
+
*/
|
|
476
|
+
email?: string;
|
|
477
|
+
/**
|
|
478
|
+
* The fixed code its email accepts — its verification code and its email second factor — for a person with no inbox to read (an app store's reviewer). The mail is still sent, carrying it. Six digits.
|
|
479
|
+
*/
|
|
480
|
+
email_otp?: string;
|
|
481
|
+
/**
|
|
482
|
+
* false makes its email unverified, for an app's verification to be tested on it (its code or link comes to its test inbox). Default true.
|
|
483
|
+
*/
|
|
484
|
+
email_verified?: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* A second factor it has from the start: totp (its key answered once, totp_secret), sms (its phone, with its fixed code) or email (a verified address).
|
|
487
|
+
*/
|
|
488
|
+
mfa?: "totp" | "sms" | "email";
|
|
489
|
+
/**
|
|
490
|
+
* The fixed code its phone accepts at sign-in: its phone is texted nothing. Made when phone is given without it. Requires phone.
|
|
448
491
|
*/
|
|
449
492
|
otp?: string;
|
|
450
|
-
password: string;
|
|
451
493
|
/**
|
|
452
|
-
*
|
|
494
|
+
* Its password: made when omitted, unless passwordless.
|
|
495
|
+
*/
|
|
496
|
+
password?: string;
|
|
497
|
+
/**
|
|
498
|
+
* No password: it signs in by a link, a code or a passkey. Not with password.
|
|
499
|
+
*/
|
|
500
|
+
passwordless?: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* E.164: a verified phone, texted nothing.
|
|
453
503
|
*/
|
|
454
504
|
phone?: string;
|
|
455
505
|
};
|
|
@@ -1038,9 +1088,9 @@ export type AuthSettings = {
|
|
|
1038
1088
|
*/
|
|
1039
1089
|
risk_strict_step_up: number;
|
|
1040
1090
|
/**
|
|
1041
|
-
* The changes to how an account signs in that its user is mailed about, each with its own template (auth.security_<kind>): a password changed, the email address changed (told to the address the account had), a provider linked or unlinked, a second factor added or removed, a passkey added or removed. By default a second factor or a passkey added or removed (mfa_factor_enrolled, mfa_factor_removed, passkey_added, passkey_removed); the others as the project chooses. Mail goes to a confirmed address only, in the user's locale.
|
|
1091
|
+
* The changes to how an account signs in that its user is mailed about, each with its own template (auth.security_<kind>): a password changed, the email address changed (told to the address the account had), a provider linked or unlinked, a second factor added or removed, a recovery code spent at a sign-in, a passkey added or removed. By default a second factor added or removed, a recovery code spent, a passkey added or removed (mfa_factor_enrolled, mfa_factor_removed, mfa_recovery_code_used, passkey_added, passkey_removed); the others as the project chooses. Mail goes to a confirmed address only, in the user's locale.
|
|
1042
1092
|
*/
|
|
1043
|
-
security_notifications?: ("password_changed" | "email_changed" | "identity_linked" | "identity_unlinked" | "mfa_factor_enrolled" | "mfa_factor_removed" | "passkey_added" | "passkey_removed")[];
|
|
1093
|
+
security_notifications?: ("password_changed" | "email_changed" | "identity_linked" | "identity_unlinked" | "mfa_factor_enrolled" | "mfa_factor_removed" | "mfa_recovery_code_used" | "passkey_added" | "passkey_removed")[];
|
|
1044
1094
|
/**
|
|
1045
1095
|
* Bind each session to the device it was opened on: a refresh from another device fingerprint, browser or operating system ends the session; a network change is recorded in the audit log. Default false.
|
|
1046
1096
|
*/
|
|
@@ -1121,9 +1171,9 @@ export type AuthSettingsUpdateRequest = {
|
|
|
1121
1171
|
*/
|
|
1122
1172
|
risk_strict_step_up?: number;
|
|
1123
1173
|
/**
|
|
1124
|
-
* The changes to how an account signs in that its user is mailed about, each with its own template (auth.security_<kind>): a password changed, the email address changed (told to the address the account had), a provider linked or unlinked, a second factor added or removed, a passkey added or removed. By default a second factor or a passkey added or removed (mfa_factor_enrolled, mfa_factor_removed, passkey_added, passkey_removed); the others as the project chooses. Mail goes to a confirmed address only, in the user's locale. Present (even []) replaces the kinds; absent keeps them.
|
|
1174
|
+
* The changes to how an account signs in that its user is mailed about, each with its own template (auth.security_<kind>): a password changed, the email address changed (told to the address the account had), a provider linked or unlinked, a second factor added or removed, a recovery code spent at a sign-in, a passkey added or removed. By default a second factor added or removed, a recovery code spent, a passkey added or removed (mfa_factor_enrolled, mfa_factor_removed, mfa_recovery_code_used, passkey_added, passkey_removed); the others as the project chooses. Mail goes to a confirmed address only, in the user's locale. Present (even []) replaces the kinds; absent keeps them.
|
|
1125
1175
|
*/
|
|
1126
|
-
security_notifications?: ("password_changed" | "email_changed" | "identity_linked" | "identity_unlinked" | "mfa_factor_enrolled" | "mfa_factor_removed" | "passkey_added" | "passkey_removed")[];
|
|
1176
|
+
security_notifications?: ("password_changed" | "email_changed" | "identity_linked" | "identity_unlinked" | "mfa_factor_enrolled" | "mfa_factor_removed" | "mfa_recovery_code_used" | "passkey_added" | "passkey_removed")[];
|
|
1127
1177
|
/**
|
|
1128
1178
|
* Bind each session to the device it was opened on: a refresh from another device fingerprint, browser or operating system ends the session; a network change is recorded in the audit log. Default false.
|
|
1129
1179
|
*/
|
|
@@ -3753,6 +3803,19 @@ export type WebAuthnSignupBeginResponse = {
|
|
|
3753
3803
|
*/
|
|
3754
3804
|
user_id: string;
|
|
3755
3805
|
};
|
|
3806
|
+
/**
|
|
3807
|
+
* An address made for an app's sign-up to be tested with.
|
|
3808
|
+
*/
|
|
3809
|
+
export type TestSignupAddress = {
|
|
3810
|
+
/**
|
|
3811
|
+
* signup-…@test.invalid: a sign-up with it (POST /auth/signup) opens a test user, whose mail is kept in its test inbox.
|
|
3812
|
+
*/
|
|
3813
|
+
email: string;
|
|
3814
|
+
/**
|
|
3815
|
+
* When it lapses unused (a day), freeing its place of the test-user cap.
|
|
3816
|
+
*/
|
|
3817
|
+
expires_at: string;
|
|
3818
|
+
};
|
|
3756
3819
|
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
3757
3820
|
export interface Events {
|
|
3758
3821
|
/**
|
|
@@ -4328,7 +4391,7 @@ export declare function client(t: Transport): {
|
|
|
4328
4391
|
/**
|
|
4329
4392
|
* Create test users
|
|
4330
4393
|
*
|
|
4331
|
-
* Creates test users, all or none, and returns their credentials once: passwords are never retrievable afterwards. Either send users (each
|
|
4394
|
+
* Creates test users, all or none, and returns their credentials once: passwords and totp keys are never retrievable afterwards. Either send users (each of the kind it says: an address and password of its own or made, passwordless, unverified, a phone with its fixed code, a fixed email code, a second factor) or a count of users to create with generated credentials; users wins when both are present. At most 1000 per request. Test users skip the breach check and the minimum password length, and are not counted as active users. Their mail and texts are kept in their test inbox (GET /notify/test-users/{user_id}/messages): a phone is texted nothing, a generated address (…@test.invalid) is mailed nothing, a real address is mailed as well. with_tokens also returns an access token per user. 409 user_exists when an email is already taken; 409 test_user_cap_exceeded when the batch would exceed the project's test-user cap (its test users and its unused sign-up addresses). Send an Idempotency-Key to make the call safe to retry.
|
|
4332
4395
|
*/
|
|
4333
4396
|
adminCreateTestUsers(input: {
|
|
4334
4397
|
headers?: {
|
|
@@ -4346,6 +4409,14 @@ export declare function client(t: Transport): {
|
|
|
4346
4409
|
body: AdminTestUserPhoneRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4347
4410
|
signal?: AbortSignal;
|
|
4348
4411
|
}): Promise<Reply<204, undefined>>;
|
|
4412
|
+
/**
|
|
4413
|
+
* Make a sign-up address for a test
|
|
4414
|
+
*
|
|
4415
|
+
* Makes an address for an app's sign-up to be tested with: a sign-up with it (POST /auth/signup) opens a test user — its token says test, it is not counted as an active user, and its verification mail is kept in its test inbox (GET /notify/test-users/{user_id}/messages), never sent. Only the secret key makes one; it holds a place of the project's test-user cap until it is used (once) or lapses a day later. A sign-up with any other address opens an ordinary user. 409 test_user_cap_exceeded when the cap is full.
|
|
4416
|
+
*/
|
|
4417
|
+
adminCreateTestSignupAddress(input?: {
|
|
4418
|
+
signal?: AbortSignal;
|
|
4419
|
+
}): Promise<Reply<201, TestSignupAddress>>;
|
|
4349
4420
|
/**
|
|
4350
4421
|
* Delete a test user
|
|
4351
4422
|
*
|
|
@@ -19,7 +19,7 @@ export type ChannelReadiness = {
|
|
|
19
19
|
*/
|
|
20
20
|
reports: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* The project's own providers in failover order, or shared
|
|
22
|
+
* The project's own providers in failover order, or shared: the platform's sender (email), or Palbase's Twilio Verify (verify), its codes billed at Twilio's price.
|
|
23
23
|
*/
|
|
24
24
|
via: string[];
|
|
25
25
|
};
|
|
@@ -2418,6 +2418,59 @@ export type SendGridEvent = {
|
|
|
2418
2418
|
* SendGrid's Event Webhook call: an array of events.
|
|
2419
2419
|
*/
|
|
2420
2420
|
export type SendGridEvents = SendGridEvent[];
|
|
2421
|
+
export type TestInboxList = {
|
|
2422
|
+
messages: TestInboxMessage[];
|
|
2423
|
+
};
|
|
2424
|
+
/**
|
|
2425
|
+
* A test user's kept message: what it said, to whom, and the code and link it carried.
|
|
2426
|
+
*/
|
|
2427
|
+
export type TestInboxMessage = {
|
|
2428
|
+
channel: "email" | "sms";
|
|
2429
|
+
/**
|
|
2430
|
+
* The code it carried: its template's (code, otp_code), else the first number of 4 to 10 digits in its subject or text.
|
|
2431
|
+
*/
|
|
2432
|
+
code?: string;
|
|
2433
|
+
created_at: string;
|
|
2434
|
+
/**
|
|
2435
|
+
* Whether it was also sent: a test user's real address is mailed; a generated one and a phone are not.
|
|
2436
|
+
*/
|
|
2437
|
+
delivered: boolean;
|
|
2438
|
+
/**
|
|
2439
|
+
* An email's HTML.
|
|
2440
|
+
*/
|
|
2441
|
+
html?: string;
|
|
2442
|
+
/**
|
|
2443
|
+
* The message's id, as its delivery report (GET /notify/messages/{id}) has it.
|
|
2444
|
+
*/
|
|
2445
|
+
id: string;
|
|
2446
|
+
/**
|
|
2447
|
+
* The link it carried: its template's (magic_link, reset_link, verify_link, …), else the first in it.
|
|
2448
|
+
*/
|
|
2449
|
+
link?: string;
|
|
2450
|
+
/**
|
|
2451
|
+
* Every link in it, in order.
|
|
2452
|
+
*/
|
|
2453
|
+
links: string[];
|
|
2454
|
+
/**
|
|
2455
|
+
* An email's subject.
|
|
2456
|
+
*/
|
|
2457
|
+
subject?: string;
|
|
2458
|
+
template?: string;
|
|
2459
|
+
/**
|
|
2460
|
+
* An email's text, or a text message's body.
|
|
2461
|
+
*/
|
|
2462
|
+
text: string;
|
|
2463
|
+
/**
|
|
2464
|
+
* The address or number it went to.
|
|
2465
|
+
*/
|
|
2466
|
+
to: string;
|
|
2467
|
+
/**
|
|
2468
|
+
* What its template was rendered with.
|
|
2469
|
+
*/
|
|
2470
|
+
variables?: {
|
|
2471
|
+
[key: string]: unknown;
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2421
2474
|
/**
|
|
2422
2475
|
* A text accepted for sending, and what its body takes on the wire — or skipped: its user turned its category off by SMS (nothing queued or counted, no message_id), or a send rule skipped it (its message in the log with skip_reason; the number's per-minute and per-day texts are not spent).
|
|
2423
2476
|
*/
|
|
@@ -3389,6 +3442,20 @@ export declare function client(t: Transport): {
|
|
|
3389
3442
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3390
3443
|
signal?: AbortSignal;
|
|
3391
3444
|
}): Promise<Reply<204, undefined>>;
|
|
3445
|
+
/**
|
|
3446
|
+
* List a test user's messages
|
|
3447
|
+
*
|
|
3448
|
+
* A test user's kept messages, the 50 newest first: every email and text the project sent it in the last 7 days — auth's sign-in links and codes, its resets and verifications, and the project's own sends — with what each said, and its code and link picked out. A test user's phone is texted nothing and its generated address (…@test.invalid) is mailed nothing: the kept copy is the message; a real address of a test user is mailed as well (delivered). A user who is not a test user is refused, 403 not_a_test_user: no one else's mail is kept.
|
|
3449
|
+
*/
|
|
3450
|
+
listTestUserMessages(input: {
|
|
3451
|
+
path: {
|
|
3452
|
+
user_id: string;
|
|
3453
|
+
};
|
|
3454
|
+
query?: {
|
|
3455
|
+
channel?: "email" | "sms";
|
|
3456
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3457
|
+
signal?: AbortSignal;
|
|
3458
|
+
}): Promise<Reply<200, TestInboxList>>;
|
|
3392
3459
|
/**
|
|
3393
3460
|
* List topics
|
|
3394
3461
|
*
|
|
@@ -2523,6 +2523,10 @@ export type AppleSession = {
|
|
|
2523
2523
|
* Who asked for the sign-in link: a developer's id, or the key's.
|
|
2524
2524
|
*/
|
|
2525
2525
|
connected_by?: string;
|
|
2526
|
+
/**
|
|
2527
|
+
* The team's ID at the Developer Portal: the App ID prefix its apps are signed with, once Apple said it.
|
|
2528
|
+
*/
|
|
2529
|
+
developer_team_id?: string;
|
|
2526
2530
|
/**
|
|
2527
2531
|
* When Apple's end of it was found.
|
|
2528
2532
|
*/
|