palbase 0.48.0 → 0.49.1
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/{DNHY3CE2.js → 3IB5HGS3.js} +1 -1
- package/dist/chunks/{XZBUPKKE.js → 43UVVCWJ.js} +2 -2
- package/dist/chunks/{RBSXELZS.js → 5ZTJ6ASC.js} +2 -2
- package/dist/chunks/{2XMXDML7.js → 6UFWENJ2.js} +2 -2
- package/dist/chunks/{OKKR3ICA.js → 7MGHEW2I.js} +2 -2
- package/dist/chunks/{RM6HQSHF.js → BC4MVAKN.js} +1 -1
- package/dist/chunks/{6V63HCWJ.js → CIROONIJ.js} +2 -2
- package/dist/chunks/{W6ETCH3M.js → CPYLZVYF.js} +1 -1
- package/dist/chunks/{IF2VQVJW.js → FRKQQZGT.js} +2 -2
- package/dist/chunks/{25MZG6VT.js → ILLLTWC2.js} +2 -2
- package/dist/chunks/{XOLZAQXF.js → JSWX57QN.js} +1 -1
- package/dist/chunks/{ZCSQE34V.js → K2HNQBRN.js} +1 -1
- package/dist/chunks/{35HRCFXP.js → KZGSS2TH.js} +1 -1
- package/dist/chunks/{RXOKCO4G.js → ODP6CNZD.js} +2 -2
- package/dist/chunks/{UH45TX4Q.js → OHUQF53Q.js} +1 -1
- package/dist/chunks/{ZEQXSZT5.js → QKPIIYDG.js} +2 -2
- package/dist/chunks/{WTCFMDJP.js → SK2PJNWB.js} +2 -2
- package/dist/chunks/{D6B5CW4V.js → TYLMYSRB.js} +2 -2
- package/dist/chunks/{VGAA5CK5.js → WB7EJUWD.js} +2 -2
- package/dist/chunks/{J7GTY3MT.js → WM5655CX.js} +2 -2
- package/dist/chunks/YUMXUB2P.js +2 -0
- package/dist/chunks/{BYF6XIKI.js → ZW53CCX2.js} +2 -2
- package/dist/chunks/{RGIZNWPU.js → ZXL56LUK.js} +2 -2
- package/dist/cli.js +126 -126
- 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/cloud/src/generated/project.d.ts +1 -1
- package/types/internal/src/modules/auth.d.ts +116 -0
- package/types/internal/src/modules/machines.d.ts +8 -0
- package/dist/chunks/OFL5F2SX.js +0 -2
|
@@ -523,6 +523,14 @@ export type AdminUser = {
|
|
|
523
523
|
* The user's ID.
|
|
524
524
|
*/
|
|
525
525
|
id: string;
|
|
526
|
+
/**
|
|
527
|
+
* True for an account invited (POST /admin/users/invite) that has not taken the invitation up: no password set, never signed in. It cannot sign in with a password until it does.
|
|
528
|
+
*/
|
|
529
|
+
invited: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* When the account was last invited; absent for one never invited. Kept once the invitation is taken up.
|
|
532
|
+
*/
|
|
533
|
+
invited_at?: string;
|
|
526
534
|
/**
|
|
527
535
|
* True for a guest (`POST /auth/anonymous`) until it becomes an account.
|
|
528
536
|
*/
|
|
@@ -1699,6 +1707,10 @@ export type DeviceVerifySignatureRequest = {
|
|
|
1699
1707
|
signature: string;
|
|
1700
1708
|
};
|
|
1701
1709
|
export type ErrorResponse = {
|
|
1710
|
+
/**
|
|
1711
|
+
* With user_id: whether that account's address is confirmed. One that is not was made by whoever typed the address, who may not own it: give it a role only once it is confirmed.
|
|
1712
|
+
*/
|
|
1713
|
+
email_verified?: boolean;
|
|
1702
1714
|
/**
|
|
1703
1715
|
* Machine-readable error code (snake_case)
|
|
1704
1716
|
*/
|
|
@@ -1727,6 +1739,10 @@ export type ErrorResponse = {
|
|
|
1727
1739
|
* HTTP status code (mirrors the response status)
|
|
1728
1740
|
*/
|
|
1729
1741
|
status: number;
|
|
1742
|
+
/**
|
|
1743
|
+
* On an invitation refused user_exists (POST /admin/users/invite): the account the address already has, for the caller to give what it invited for (a role). Nothing was sent, and the account is left as it is.
|
|
1744
|
+
*/
|
|
1745
|
+
user_id?: string;
|
|
1730
1746
|
};
|
|
1731
1747
|
export type ExchangeCustomTokenRequest = {
|
|
1732
1748
|
custom_token: string;
|
|
@@ -3816,6 +3832,68 @@ export type TestSignupAddress = {
|
|
|
3816
3832
|
*/
|
|
3817
3833
|
expires_at: string;
|
|
3818
3834
|
};
|
|
3835
|
+
export type AdminUserInviteRequest = {
|
|
3836
|
+
email: string;
|
|
3837
|
+
metadata?: AdminUserMetadata;
|
|
3838
|
+
/**
|
|
3839
|
+
* Where the invitation's link opens instead of Palbase's own page: a page of the app's, on the project's redirect allow-list (auth settings' additional_redirect_urls). It receives ?token= and takes it, with the password the person chooses, to POST /auth/invitations/accept. Absent: the link opens Palbase's page at the project's own address — never site_url.
|
|
3840
|
+
*/
|
|
3841
|
+
redirect_to?: string;
|
|
3842
|
+
/**
|
|
3843
|
+
* The BCP 47 language of the email and the page (absent: the project's default). Kept as the new account's.
|
|
3844
|
+
*/
|
|
3845
|
+
locale?: string;
|
|
3846
|
+
/**
|
|
3847
|
+
* Default true: Palbase emails the invitation, with the project's auth.user_invitation template. false: nothing is sent, and the answer carries the link (invitation.accept_url) for the caller to deliver.
|
|
3848
|
+
*/
|
|
3849
|
+
send_email?: boolean;
|
|
3850
|
+
};
|
|
3851
|
+
/**
|
|
3852
|
+
* An invitation sent: the invited account, and its link's life.
|
|
3853
|
+
*/
|
|
3854
|
+
export type AdminUserInvitation = {
|
|
3855
|
+
user: AdminUser;
|
|
3856
|
+
invitation: AdminUserInvitationLink;
|
|
3857
|
+
};
|
|
3858
|
+
export type InvitationAcceptRequest = {
|
|
3859
|
+
/**
|
|
3860
|
+
* The token the invitation's link carried (?token=).
|
|
3861
|
+
*/
|
|
3862
|
+
token: string;
|
|
3863
|
+
/**
|
|
3864
|
+
* The account's password, held to the project's password policy and the known-breaches check.
|
|
3865
|
+
*/
|
|
3866
|
+
password: string;
|
|
3867
|
+
};
|
|
3868
|
+
/**
|
|
3869
|
+
* The invitation page's form.
|
|
3870
|
+
*/
|
|
3871
|
+
export type HostedAcceptInvitationForm = {
|
|
3872
|
+
password: string;
|
|
3873
|
+
password_confirm: string;
|
|
3874
|
+
token: string;
|
|
3875
|
+
};
|
|
3876
|
+
/**
|
|
3877
|
+
* The invitation's link: when it lapses, whether it was sent again, and the link itself when it was not emailed.
|
|
3878
|
+
*/
|
|
3879
|
+
export type AdminUserInvitationLink = {
|
|
3880
|
+
/**
|
|
3881
|
+
* When the link stops opening the account: seven days after it was sent.
|
|
3882
|
+
*/
|
|
3883
|
+
expires_at: string;
|
|
3884
|
+
/**
|
|
3885
|
+
* True when the account was invited and had not taken the invitation up: it was invited again, its earlier links are spent, and the seven days start now.
|
|
3886
|
+
*/
|
|
3887
|
+
again: boolean;
|
|
3888
|
+
/**
|
|
3889
|
+
* Whether Palbase emailed the link (send_email).
|
|
3890
|
+
*/
|
|
3891
|
+
emailed: boolean;
|
|
3892
|
+
/**
|
|
3893
|
+
* The invitation's link, when it was not emailed (send_email false). It sets the account's password: deliver it to the person alone. Shown once.
|
|
3894
|
+
*/
|
|
3895
|
+
accept_url?: string;
|
|
3896
|
+
};
|
|
3819
3897
|
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
3820
3898
|
export interface Events {
|
|
3821
3899
|
/**
|
|
@@ -6155,5 +6233,43 @@ export declare function client(t: Transport): {
|
|
|
6155
6233
|
body: ConsentRefuseRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6156
6234
|
signal?: AbortSignal;
|
|
6157
6235
|
}): Promise<Reply<200, ConsentChoiceList>>;
|
|
6236
|
+
/**
|
|
6237
|
+
* Invite a user
|
|
6238
|
+
*
|
|
6239
|
+
* Invites a person to an account of the project's auth, as a project's server adds its staff. An address no account has: the account is made with no password (invited), and a link that sets its password is emailed (or answered, send_email false) — 201. An address made for a test (POST /admin/test-users/addresses) makes a test user, whose invitation is kept in its test inbox and sent nowhere; another .invalid address is 400 email_undeliverable. An account invited that has not taken the invitation up (no password, never signed in, not banned): it is invited again — a new link, the earlier ones spent, seven days from now, its metadata merged — 200. Any other account: 409 user_exists with its user_id and email_verified; nothing is sent and the account is left as it is (give a role to one whose address is confirmed). The link lives seven days and opens Palbase's page at the project's own address (or redirect_to): the person sets the password there, the address is confirmed, and they sign in with it. The account cannot sign in with a password before. 503 email_send_failed leaves the invitation open: the same call again sends a new link.
|
|
6240
|
+
*/
|
|
6241
|
+
adminInviteUser(input: {
|
|
6242
|
+
body: AdminUserInviteRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6243
|
+
signal?: AbortSignal;
|
|
6244
|
+
}): Promise<Reply<200, AdminUserInvitation> | Reply<201, AdminUserInvitation>>;
|
|
6245
|
+
/**
|
|
6246
|
+
* Take an invitation up
|
|
6247
|
+
*
|
|
6248
|
+
* Takes an invitation up from the app's own page (the invitation's redirect_to): sets the account's first password and confirms its address. The person then signs in with it. A link a later invitation replaced, or of a banned account, is invalid_token; one older than seven days token_expired; one whose invitation was taken up — by this link or another way (a reset, a sign-in link) — token_used.
|
|
6249
|
+
*/
|
|
6250
|
+
acceptInvitation(input: {
|
|
6251
|
+
body: InvitationAcceptRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6252
|
+
signal?: AbortSignal;
|
|
6253
|
+
}): Promise<Reply<200, SuccessResponse>>;
|
|
6254
|
+
/**
|
|
6255
|
+
* Show the invitation page
|
|
6256
|
+
*
|
|
6257
|
+
* The page an invitation's link opens (unless the invitation named a redirect_to): a form for the account's password. Opening it changes nothing.
|
|
6258
|
+
*/
|
|
6259
|
+
hostedAcceptInvitationPage(input?: {
|
|
6260
|
+
query?: {
|
|
6261
|
+
token?: string;
|
|
6262
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6263
|
+
signal?: AbortSignal;
|
|
6264
|
+
}): Promise<Reply<200, Response>>;
|
|
6265
|
+
/**
|
|
6266
|
+
* Set the account's password from the invitation page
|
|
6267
|
+
*
|
|
6268
|
+
* The page's form: sets the first password of the account the token names and confirms its address. Accepted only from the page itself (Origin).
|
|
6269
|
+
*/
|
|
6270
|
+
hostedAcceptInvitationSubmit(input: {
|
|
6271
|
+
body: HostedAcceptInvitationForm; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6272
|
+
signal?: AbortSignal;
|
|
6273
|
+
}): Promise<Reply<200, Response>>;
|
|
6158
6274
|
};
|
|
6159
6275
|
export type Client = ReturnType<typeof client>;
|
|
@@ -274,6 +274,14 @@ export type Machine = {
|
|
|
274
274
|
*/
|
|
275
275
|
former_urls?: string[];
|
|
276
276
|
autoscaling: Autoscaling;
|
|
277
|
+
/**
|
|
278
|
+
* Counts the changes of what the machine is started with that open no version: a secret of its set written, rolled back or unset (secrets:set), an address the platform gives it. Version does not move for them.
|
|
279
|
+
*/
|
|
280
|
+
config_version: number;
|
|
281
|
+
/**
|
|
282
|
+
* The config_version its copies run: less while such a change rolls out — its new copies start beside the ones that serve, which stop once the new ones are up — and equal to config_version once every copy runs with it. Asleep, it wakes with the newest.
|
|
283
|
+
*/
|
|
284
|
+
running_config_version: number;
|
|
277
285
|
};
|
|
278
286
|
/**
|
|
279
287
|
* A machine to open.
|