palbase 0.16.0 → 0.17.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/{EHWHP4MD.js → 25FDQIKY.js} +2 -2
- package/dist/chunks/{2JBRAHJV.js → 45DR7TF6.js} +2 -2
- package/dist/chunks/{C5PO7C6L.js → 4GIYAC3R.js} +1 -1
- package/dist/chunks/{EJHB65XA.js → 55C2GHGA.js} +2 -2
- package/dist/chunks/56S5CF3M.js +13 -0
- package/dist/chunks/{QN5WMSP7.js → 6CEXEK2F.js} +2 -2
- package/dist/chunks/{5W7IKTRI.js → 6VLC4QJY.js} +2 -2
- package/dist/chunks/{7HYPHYX5.js → CPQR6PSB.js} +1 -1
- package/dist/chunks/{VTUZYTKZ.js → ENZI5RN5.js} +1 -1
- package/dist/chunks/{WCTVLG4W.js → FQLY6TBH.js} +2 -2
- package/dist/chunks/{HVC5H5HY.js → GL5Y2PAS.js} +2 -2
- package/dist/chunks/{JOWAWH33.js → HPQSHDEH.js} +2 -2
- package/dist/chunks/{IA4LTPBJ.js → IG2INK7Z.js} +2 -2
- package/dist/chunks/JGUQKVFH.js +22 -0
- package/dist/chunks/{YUBOQ3NU.js → K2CN4CGB.js} +1 -1
- package/dist/chunks/{A4YMCQOP.js → K3KCYVMN.js} +1 -1
- package/dist/chunks/{L73SEFXF.js → KBO5NELQ.js} +7 -7
- package/dist/chunks/{VNLECYBD.js → KUTBWXNL.js} +1 -1
- package/dist/chunks/{TIC3NMUT.js → MI5QEZ7Y.js} +1 -1
- package/dist/chunks/{S7WYS4NC.js → O6LRXDFY.js} +2 -2
- package/dist/chunks/V72PBUK4.js +2 -0
- package/dist/chunks/{TGVFGW5G.js → WW4HVDSO.js} +2 -2
- package/dist/chunks/{CXZ6WKOI.js → XAHQAK65.js} +2 -2
- package/dist/cli.js +125 -120
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.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 +2 -2
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/internal/src/modules/ai.d.ts +39 -0
- package/types/internal/src/modules/events.d.ts +4 -3
- package/types/internal/src/modules/index.d.ts +1 -0
- package/types/internal/src/modules/messaging.d.ts +2322 -0
- package/types/internal/src/modules/notify.d.ts +54 -1
- package/types/internal/src/modules/stores.d.ts +685 -3
- package/types/web/src/backend-error.d.ts +3 -1
- package/types/web/src/socket.d.ts +7 -0
- package/dist/chunks/CFGQWDV5.js +0 -22
- package/dist/chunks/LY7D5Q3R.js +0 -2
- package/dist/chunks/NQNE5PZW.js +0 -13
|
@@ -45,6 +45,14 @@ export type DeliveryEvent = {
|
|
|
45
45
|
* A device — never its token: a signed-in user's, or, with no one signed in on it, its installation's (user_id absent).
|
|
46
46
|
*/
|
|
47
47
|
export type Device = {
|
|
48
|
+
/**
|
|
49
|
+
* The APNs environment an iOS token is for: the one its SDK said, or the one a push reached it through.
|
|
50
|
+
*/
|
|
51
|
+
apns_environment?: "sandbox" | "production";
|
|
52
|
+
/**
|
|
53
|
+
* The project's app the device registered from: the one whose publishable key it presented. An iOS push goes to its bundle.
|
|
54
|
+
*/
|
|
55
|
+
app_id?: string;
|
|
48
56
|
app_version?: string;
|
|
49
57
|
created_at: string;
|
|
50
58
|
device_id: string;
|
|
@@ -80,6 +88,10 @@ export type DevicePage = {
|
|
|
80
88
|
* A device's push token as the app's push SDK gave it: FCM's, APNs' (a PushKit VoIP token on ios_voip), Expo's (ExponentPushToken[…]), or a browser's push subscription (platform web: PushSubscription.toJSON(), its endpoint one of the browsers' push services). A token another device held moves here.
|
|
81
89
|
*/
|
|
82
90
|
export type DeviceRegistration = {
|
|
91
|
+
/**
|
|
92
|
+
* The Apple Push Notification service environment an iOS token is for: sandbox (an app run from Xcode, a development-signed build) or production (TestFlight, the App Store, ad hoc). Palbase sends through it, to the bundle of the app whose publishable key registered the device. Absent: Palbase tries both and keeps the one that delivers.
|
|
93
|
+
*/
|
|
94
|
+
apns_environment?: ("sandbox" | "production") | null;
|
|
83
95
|
app_version?: string | null;
|
|
84
96
|
/**
|
|
85
97
|
* The app's own stable name for the device.
|
|
@@ -1957,6 +1969,14 @@ export type NotifyProvider = {
|
|
|
1957
1969
|
active: boolean;
|
|
1958
1970
|
channel: "email" | "sms" | "verify" | "whatsapp" | "push" | "iys";
|
|
1959
1971
|
created_at: string;
|
|
1972
|
+
/**
|
|
1973
|
+
* Since when the provider's sends have failed for its own fault — its credential refused, a topic an APNs key may not send to: every send through it fails alike until it is fixed. A send to the app it failed for that goes through ends it, and so does saving it anew. Null while it works.
|
|
1974
|
+
*/
|
|
1975
|
+
failing_since: string | null;
|
|
1976
|
+
/**
|
|
1977
|
+
* The provider's last such error (APNs error 403: InvalidProviderToken). Null while it works.
|
|
1978
|
+
*/
|
|
1979
|
+
last_error: string | null;
|
|
1960
1980
|
/**
|
|
1961
1981
|
* Lower is tried first.
|
|
1962
1982
|
*/
|
|
@@ -1976,7 +1996,7 @@ export type NotifyProviderList = {
|
|
|
1976
1996
|
export type NotifyProviderWrite = {
|
|
1977
1997
|
active?: boolean;
|
|
1978
1998
|
/**
|
|
1979
|
-
* The provider's credentials, by channel. email — acs {connection_string, from_email}; ses {region, access_key_id, secret_access_key, from_domain}; sendgrid {api_key, from_domain, webhook_public_key: the signed Event Webhook's verification key, for delivery reports}; smtp {host, port, username, password, from_email, use_starttls}. sms — twilio {account_sid, auth_token or api_key_sid + api_key_secret, from_number or messaging_service_sid; with the auth token Twilio reports each text's delivery}; vonage {api_key, api_secret, from, signature_secret + signature_method (md5hash, md5, sha1, sha256, sha512) for its signed delivery receipts}; acs {connection_string, from_number}. verify — twilio_verify {account_sid, auth_token or api_key_sid + api_key_secret, service_sid}. whatsapp — meta {phone_number_id, access_token, api_version, app_secret + verify_token for its webhook}. push — fcm {the service account JSON}; apns {private_key, team_id, key_id, bundle_id,
|
|
1999
|
+
* The provider's credentials, by channel. email — acs {connection_string, from_email}; ses {region, access_key_id, secret_access_key, from_domain}; sendgrid {api_key, from_domain, webhook_public_key: the signed Event Webhook's verification key, for delivery reports}; smtp {host, port, username, password, from_email, use_starttls}. sms — twilio {account_sid, auth_token or api_key_sid + api_key_secret, from_number or messaging_service_sid; with the auth token Twilio reports each text's delivery}; vonage {api_key, api_secret, from, signature_secret + signature_method (md5hash, md5, sha1, sha256, sha512) for its signed delivery receipts}; acs {connection_string, from_number}. verify — twilio_verify {account_sid, auth_token or api_key_sid + api_key_secret, service_sid}. whatsapp — meta {phone_number_id, access_token, api_version, app_secret + verify_token for its webhook}. push — fcm {the service account JSON}; apns {private_key, team_id, key_id: a team-scoped APNs key, asked of Apple when saved; bundle_id and is_production optional — a push goes to the bundle of the app the device registered from, through the APNs environment it said}; expo {access_token}.
|
|
1980
2000
|
*/
|
|
1981
2001
|
credentials: {
|
|
1982
2002
|
[key: string]: unknown;
|
|
@@ -2095,11 +2115,40 @@ export type PushDelivery = {
|
|
|
2095
2115
|
platform: string;
|
|
2096
2116
|
provider: string;
|
|
2097
2117
|
provider_message_id?: string;
|
|
2118
|
+
/**
|
|
2119
|
+
* Where an APNs push went: its environment and the app's bundle (production com.centauri).
|
|
2120
|
+
*/
|
|
2121
|
+
route?: string;
|
|
2098
2122
|
/**
|
|
2099
2123
|
* The furthest it got.
|
|
2100
2124
|
*/
|
|
2101
2125
|
status: "sent" | "failed" | "token_invalid" | "delivered" | "not_shown" | "dismissed" | "opened" | "action" | "unconfirmed";
|
|
2102
2126
|
};
|
|
2127
|
+
/**
|
|
2128
|
+
* notification.push_failing: a push provider that has started failing for its own fault.
|
|
2129
|
+
*/
|
|
2130
|
+
export type PushFailingEvent = {
|
|
2131
|
+
/**
|
|
2132
|
+
* push.
|
|
2133
|
+
*/
|
|
2134
|
+
channel: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* The provider's error (APNs error 403: InvalidProviderToken).
|
|
2137
|
+
*/
|
|
2138
|
+
error: string;
|
|
2139
|
+
/**
|
|
2140
|
+
* When it started failing.
|
|
2141
|
+
*/
|
|
2142
|
+
failing_since: string;
|
|
2143
|
+
/**
|
|
2144
|
+
* The project whose provider it is: the platform's own copy names the customer's.
|
|
2145
|
+
*/
|
|
2146
|
+
project_id: string;
|
|
2147
|
+
/**
|
|
2148
|
+
* apns, fcm or expo.
|
|
2149
|
+
*/
|
|
2150
|
+
provider: string;
|
|
2151
|
+
};
|
|
2103
2152
|
/**
|
|
2104
2153
|
* One report from the app about a push on this device.
|
|
2105
2154
|
*/
|
|
@@ -2685,6 +2734,10 @@ export interface Events {
|
|
|
2685
2734
|
* notification.opened: the person opened a push.
|
|
2686
2735
|
*/
|
|
2687
2736
|
"notification.opened": NotificationEvent;
|
|
2737
|
+
/**
|
|
2738
|
+
* notification.push_failing: a push provider has started failing for its own fault — its APNs key refused, a topic the key may not send to — and every push through it fails until its setting is fixed. Told to the project and to the platform's own (whose Studio mails the organization's owners), at most once a day a provider.
|
|
2739
|
+
*/
|
|
2740
|
+
"notification.push_failing": PushFailingEvent;
|
|
2688
2741
|
/**
|
|
2689
2742
|
* notification.read: the recipient read it (WhatsApp).
|
|
2690
2743
|
*/
|