palbase 0.23.2 → 0.25.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/{FN6YSHEH.js → 2MYJV4YR.js} +2 -2
- package/dist/chunks/{2243L7FH.js → 4GJ2ZPTN.js} +2 -2
- package/dist/chunks/{Z6GSSELT.js → 4YCXKEZV.js} +1 -1
- package/dist/chunks/{465GAZ3I.js → 5BIBYYM4.js} +1 -1
- package/dist/chunks/{LEL23GGZ.js → B773R25P.js} +2 -2
- package/dist/chunks/{LPIIPAL7.js → C7SBJV6T.js} +1 -1
- package/dist/chunks/{XZF67QTC.js → DUMTTL2J.js} +2 -2
- package/dist/chunks/{GJLB5E6X.js → EVUBM4NK.js} +2 -2
- package/dist/chunks/{P7I67ZXV.js → GFYILAJU.js} +2 -2
- package/dist/chunks/{3B2LXO7V.js → HFKZ7GWV.js} +2 -2
- package/dist/chunks/{4UCTKDVC.js → J3KELWNZ.js} +1 -1
- package/dist/chunks/{RKVNNZKK.js → MQK4YZM7.js} +1 -1
- package/dist/chunks/{6FQTH7CU.js → NANJIH3L.js} +2 -2
- package/dist/chunks/{32K2WSMI.js → NLPK3G5Q.js} +2 -2
- package/dist/chunks/{5BNDQNJE.js → OFLYZJK7.js} +1 -1
- package/dist/chunks/{CHQC4TAI.js → Q45P37LH.js} +1 -1
- package/dist/chunks/{RLYVZSYC.js → S4GD7FCI.js} +2 -2
- package/dist/chunks/{DBHBPJXF.js → UN5JMFWV.js} +2 -2
- package/dist/chunks/{RIU2G5NL.js → VF4FX3QH.js} +2 -2
- package/dist/chunks/{UGWQ7AK7.js → WS7DI7CS.js} +2 -2
- package/dist/chunks/{LI5A2ZUO.js → Y5PIIC4Y.js} +2 -2
- package/dist/chunks/YAVAXQGR.js +2 -0
- package/dist/chunks/{E6O2BDH6.js → Z347DQJS.js} +2 -2
- package/dist/cli.js +138 -138
- 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 +3 -3
- package/types/internal/src/modules/auth.d.ts +84 -13
- package/types/internal/src/modules/machines.d.ts +616 -0
- package/types/internal/src/modules/notify.d.ts +68 -1
- package/types/internal/src/modules/storage.d.ts +4 -4
- package/types/internal/src/modules/stores.d.ts +4 -0
- package/dist/chunks/THGKKTVR.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
|
*
|