@wix/himalaya-cli 0.1149.0 → 0.1151.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.
Files changed (26) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +4 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/base44/src/index.d.ts +78 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +2 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +17 -1
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/base44.mjs +145 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +13 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -0
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
  19. package/dist/cli.mjs +2418 -773
  20. package/dist/preview-assets.generated.bin +0 -0
  21. package/guides/app-config.md +1 -1
  22. package/guides/iap-products.md +215 -0
  23. package/guides/importable-sdks.md +1 -0
  24. package/guides/index.json +6 -0
  25. package/guides/sdk-reference.json +103 -0
  26. package/package.json +2 -2
@@ -81,6 +81,7 @@ export interface NavigationConfig {
81
81
  authConfig?: AuthConfigBlock;
82
82
  iapConfig?: import("@wix/himalaya/core").IapConfig;
83
83
  cashierConfig?: import("@wix/himalaya/core").CashierConfig;
84
+ base44Config?: import("@wix/himalaya/core").Base44Config;
84
85
  wixPlatformConfig?: WixPlatformConfig;
85
86
  devGatewayConfig?: DevGatewayConfig;
86
87
  dataSchema?: import("@wix/himalaya/core").DataSchemaConfig;
@@ -245,6 +245,10 @@ export interface DerivedAppMeta {
245
245
  * (which OS wallet sheets @himalaya/wix-cashier may present; read natively by
246
246
  * WixCashierCapability at boot, like iapConfig). Absent ⇒ wallets disabled. */
247
247
  cashier?: import("@wix/himalaya/core").CashierConfig;
248
+ /** Forwarded from AppConfig.base44 — feeds the OTA `base44Config` block (which Base44 app
249
+ * `@himalaya/base44` talks to; the web host reads it, native boots install it). Public ids
250
+ * only — the access token never leaves the device. */
251
+ base44?: import("@wix/himalaya/core").Base44Config;
248
252
  /** Forwarded from AppConfig.wixPlatform — feeds the OTA `wixPlatformConfig`
249
253
  * block (RFC 0042 Phase 2 per-member productionization; read natively by
250
254
  * WixPlatformCapability at boot, like iapConfig). */
@@ -0,0 +1,78 @@
1
+ export type Json = null | boolean | number | string | Json[] | {
2
+ [key: string]: Json;
3
+ };
4
+ export type JsonObject = {
5
+ [key: string]: Json;
6
+ };
7
+ /** A Base44 user record, as returned by `auth.me()`. Never carries a token. */
8
+ export type Base44User = JsonObject & {
9
+ id?: string;
10
+ email?: string;
11
+ full_name?: string;
12
+ role?: string;
13
+ };
14
+ /** An entity row. Base44 adds `id`, `created_date`, `updated_date`, `created_by`. */
15
+ export type Base44Row = JsonObject & {
16
+ id?: string;
17
+ };
18
+ export interface ListOptions {
19
+ /** Field to sort by; prefix with `-` for descending (e.g. `"-created_date"`). */
20
+ sort?: string;
21
+ limit?: number;
22
+ skip?: number;
23
+ fields?: string[];
24
+ }
25
+ export interface AuthStatus {
26
+ signedIn: boolean;
27
+ user: Base44User | null;
28
+ }
29
+ export interface LoginResult {
30
+ user: Base44User;
31
+ }
32
+ /** A rejected Base44 call. `status` is the HTTP status (0 when the request never got a reply).
33
+ * An `Error` with extra fields rather than a subclass: Tier-5 bundles target an engine
34
+ * profile without `class` syntax, so use {@link isBase44Error} instead of `instanceof`. */
35
+ export interface Base44Error extends Error {
36
+ name: "Base44Error";
37
+ status: number;
38
+ code: string;
39
+ }
40
+ /** Build a {@link Base44Error}. Exported for workers and hosts that need to raise one. */
41
+ export declare function base44Error(status: number, message: string, code: string): Base44Error;
42
+ /** Whether `value` is a rejected Base44 call — the `instanceof` a bundle cannot use. */
43
+ export declare function isBase44Error(value: unknown): value is Base44Error;
44
+ /** Normalize anything a native arm, the bridge, or the network produced into a Base44Error. */
45
+ export declare function toBase44Error(raw: unknown): Base44Error;
46
+ export declare const auth: {
47
+ /** Sign in with email + password. Native stores the token; you get the user. */
48
+ loginViaEmailPassword(email: string, password: string): Promise<LoginResult>;
49
+ register(email: string, password: string): Promise<JsonObject>;
50
+ /** Send a one-time login code to `email`. */
51
+ loginViaOtp(email: string): Promise<JsonObject>;
52
+ /** Verify the one-time code. Native stores the token; you get the user. */
53
+ verifyOtp(email: string, otpCode: string): Promise<LoginResult>;
54
+ /** Request a password-reset email. */
55
+ resetPassword(email: string): Promise<void>;
56
+ me(): Promise<Base44User>;
57
+ updateMe(patch: JsonObject): Promise<Base44User>;
58
+ /** Whether a user is signed in, and who. Never rejects for a signed-out user. */
59
+ status(): Promise<AuthStatus>;
60
+ /** Drop the stored token. Later entity calls run anonymously (public data only). */
61
+ logout(): Promise<void>;
62
+ };
63
+ export interface EntityHandle {
64
+ list(opts?: ListOptions): Promise<Base44Row[]>;
65
+ filter(query: JsonObject, opts?: ListOptions): Promise<Base44Row[]>;
66
+ get(id: string): Promise<Base44Row>;
67
+ create(data: JsonObject): Promise<Base44Row>;
68
+ update(id: string, patch: JsonObject): Promise<Base44Row>;
69
+ delete(id: string): Promise<void>;
70
+ bulkCreate(rows: JsonObject[]): Promise<Base44Row[]>;
71
+ }
72
+ /** Typed access to one entity of the configured Base44 app, e.g. `entities("Task").list()`. */
73
+ export declare function entities(name: string): EntityHandle;
74
+ export declare const functions: {
75
+ /** Invoke a Base44 backend function by name. Resolves with its JSON reply. */
76
+ invoke(name: string, data?: JsonObject): Promise<Json>;
77
+ };
78
+ export declare const version = 1;
@@ -2,6 +2,7 @@
2
2
  export declare const CAPABILITY_REGISTRY: {
3
3
  readonly app_info: readonly ["get"];
4
4
  readonly audio_record: readonly ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"];
5
+ readonly base44: readonly ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"];
5
6
  readonly biometrics: readonly ["available", "confirm"];
6
7
  readonly browser_auth: readonly ["start"];
7
8
  readonly calendar: readonly ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"];
@@ -38,6 +39,6 @@ export declare const CAPABILITY_REGISTRY: {
38
39
  readonly wix_cashier: readonly ["isAvailable", "proceedToPayment"];
39
40
  };
40
41
  /** A capability id backed by an @himalaya/* SDK binding. */
41
- export type SdkCapability = "app_info" | "audio_record" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "ui" | "wix_cashier";
42
+ export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "ui" | "wix_cashier";
42
43
  /** All `capability.<id>.<verb>` action ids, flattened (the worker-bridge wire vocabulary). */
43
44
  export declare const CAPABILITY_ACTION_IDS: readonly string[];
@@ -266,6 +266,15 @@ export interface AppConfig {
266
266
  * Absent ⇒ the app uses no CMS collections. See docs/cms-collections.md.
267
267
  */
268
268
  cms?: CmsConfig;
269
+ /**
270
+ * The Base44 app this app's Tier-5 workers talk to through `@himalaya/base44`
271
+ * (requires the `base44` capability). Workers never pass the app id: the web host
272
+ * reads it from the served app-config (`base44Config`), and a native app passes it to
273
+ * the opt-in backend's `install(appId)` at boot (base44-optin-reconcile.test.ts keeps
274
+ * the two equal). The app id is public (it is in every page of the Base44 app), not a
275
+ * secret. Absent ⇒ no Base44 backend.
276
+ */
277
+ base44?: Base44Config;
269
278
  /** Unified app-owned KV and Wix Data declaration. */
270
279
  data?: DataResourcesConfig;
271
280
  /**
@@ -710,7 +719,14 @@ export interface OrientationEnvelope {
710
719
  export declare const DEFAULT_ORIENTATION_ENVELOPE: Required<OrientationEnvelope>;
711
720
  /** Fill in the absent families. Total, so callers never branch on `undefined`. */
712
721
  export declare function resolveOrientationEnvelope(env?: OrientationEnvelope): Required<OrientationEnvelope>;
713
- export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "wix_cashier" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot";
722
+ export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "wix_cashier" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44";
723
+ /** `defineApp({ base44 })` — which Base44 app `@himalaya/base44` talks to. */
724
+ export interface Base44Config {
725
+ /** The Base44 app id (24 hex chars, e.g. `69725232345f461f64ad1623`). */
726
+ appId: string;
727
+ /** Base44 API origin. Absent ⇒ `https://base44.app`. */
728
+ serverUrl?: string;
729
+ }
714
730
  export interface ServerUrls {
715
731
  screen: string;
716
732
  actions: string;
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -0,0 +1,145 @@
1
+ // ../../core/sdk/dispatch/src/index.ts
2
+ function dispatch(handlerId, params, _options) {
3
+ const himalaya = globalThis.himalaya;
4
+ if (!himalaya) {
5
+ return Promise.reject(
6
+ new Error("@himalaya/dispatch: called outside a Himalaya runtime. This bundle must run inside a JSWorker (Tier 5).")
7
+ );
8
+ }
9
+ const stringParams = {};
10
+ if (params) {
11
+ for (const [k, v] of Object.entries(params)) stringParams[k] = String(v);
12
+ }
13
+ return himalaya.dispatch(handlerId, stringParams);
14
+ }
15
+
16
+ // ../../core/sdk/base44/src/index.ts
17
+ function base44Error(status, message, code) {
18
+ const err = new Error(message);
19
+ err.name = "Base44Error";
20
+ err.status = status;
21
+ err.code = code;
22
+ return err;
23
+ }
24
+ function isBase44Error(value) {
25
+ return value instanceof Error && value.name === "Base44Error" && typeof value.status === "number";
26
+ }
27
+ function assertDeclared() {
28
+ const runtime = globalThis.himalaya;
29
+ if (!runtime) return;
30
+ if (!Array.isArray(runtime.capabilities) || !runtime.capabilities.includes("base44")) {
31
+ throw new Error("@himalaya/base44: capability 'base44' was not declared by this bundle");
32
+ }
33
+ }
34
+ function toBase44Error(raw) {
35
+ if (isBase44Error(raw)) return raw;
36
+ if (raw && typeof raw === "object") {
37
+ const r = raw;
38
+ const status = typeof r.status === "number" ? r.status : Number(r.status) || 0;
39
+ const message = typeof r.message === "string" && r.message ? r.message : "Base44 request failed";
40
+ const code = typeof r.code === "string" && r.code ? r.code : status ? `http_${status}` : "unknown";
41
+ return base44Error(status, message, code);
42
+ }
43
+ return base44Error(0, typeof raw === "string" && raw ? raw : "Base44 request failed", "unknown");
44
+ }
45
+ async function dispatch2(id, params = {}) {
46
+ assertDeclared();
47
+ try {
48
+ return await dispatch(id, params);
49
+ } catch (err) {
50
+ throw base44Error(0, err instanceof Error ? err.message : String(err), "dispatch_failed");
51
+ }
52
+ }
53
+ function unwrap(reply) {
54
+ const env = reply ?? {};
55
+ if (env.ok === false || env.error) throw toBase44Error(env.error ?? {});
56
+ return env.data ?? null;
57
+ }
58
+ var json = (value) => JSON.stringify(value ?? {});
59
+ function listParams(entity, opts) {
60
+ if (!entity) throw new Error("@himalaya/base44: entity name is required");
61
+ return { entity, opts: json(opts ?? {}) };
62
+ }
63
+ function requireId(id, op) {
64
+ if (!id) throw new Error(`@himalaya/base44: ${op}: id is required`);
65
+ return id;
66
+ }
67
+ var auth = {
68
+ /** Sign in with email + password. Native stores the token; you get the user. */
69
+ async loginViaEmailPassword(email, password) {
70
+ return unwrap(await dispatch2("capability.base44.authLoginViaEmailPassword", { email, password }));
71
+ },
72
+ async register(email, password) {
73
+ return unwrap(await dispatch2("capability.base44.authRegister", { email, password }));
74
+ },
75
+ /** Send a one-time login code to `email`. */
76
+ async loginViaOtp(email) {
77
+ return unwrap(await dispatch2("capability.base44.authLoginViaOtp", { email }));
78
+ },
79
+ /** Verify the one-time code. Native stores the token; you get the user. */
80
+ async verifyOtp(email, otpCode) {
81
+ return unwrap(await dispatch2("capability.base44.authVerifyOtp", { email, otpCode }));
82
+ },
83
+ /** Request a password-reset email. */
84
+ async resetPassword(email) {
85
+ unwrap(await dispatch2("capability.base44.authResetPassword", { email }));
86
+ },
87
+ async me() {
88
+ return unwrap(await dispatch2("capability.base44.authMe"));
89
+ },
90
+ async updateMe(patch) {
91
+ return unwrap(await dispatch2("capability.base44.authUpdateMe", { data: json(patch) }));
92
+ },
93
+ /** Whether a user is signed in, and who. Never rejects for a signed-out user. */
94
+ async status() {
95
+ const s = unwrap(await dispatch2("capability.base44.authStatus"));
96
+ return { signedIn: s?.signedIn === true, user: s?.user ?? null };
97
+ },
98
+ /** Drop the stored token. Later entity calls run anonymously (public data only). */
99
+ async logout() {
100
+ unwrap(await dispatch2("capability.base44.authLogout"));
101
+ }
102
+ };
103
+ function entities(name) {
104
+ return {
105
+ async list(opts) {
106
+ return unwrap(await dispatch2("capability.base44.entitiesList", listParams(name, opts))) ?? [];
107
+ },
108
+ async filter(query, opts) {
109
+ return unwrap(await dispatch2("capability.base44.entitiesFilter", { ...listParams(name, opts), query: json(query) })) ?? [];
110
+ },
111
+ async get(id) {
112
+ return unwrap(await dispatch2("capability.base44.entitiesGet", { entity: name, id: requireId(id, "get") }));
113
+ },
114
+ async create(data) {
115
+ return unwrap(await dispatch2("capability.base44.entitiesCreate", { entity: name, data: json(data) }));
116
+ },
117
+ async update(id, patch) {
118
+ return unwrap(await dispatch2("capability.base44.entitiesUpdate", { entity: name, id: requireId(id, "update"), data: json(patch) }));
119
+ },
120
+ async delete(id) {
121
+ unwrap(await dispatch2("capability.base44.entitiesDelete", { entity: name, id: requireId(id, "delete") }));
122
+ },
123
+ async bulkCreate(rows) {
124
+ return unwrap(await dispatch2("capability.base44.entitiesBulkCreate", { entity: name, data: JSON.stringify(rows ?? []) })) ?? [];
125
+ }
126
+ };
127
+ }
128
+ var functions = {
129
+ /** Invoke a Base44 backend function by name. Resolves with its JSON reply. */
130
+ async invoke(name, data = {}) {
131
+ if (!name) throw new Error("@himalaya/base44: functions.invoke: name is required");
132
+ return unwrap(await dispatch2("capability.base44.functionsInvoke", { name, data: json(data) }));
133
+ }
134
+ };
135
+ var version = 1;
136
+ export {
137
+ auth,
138
+ base44Error,
139
+ entities,
140
+ functions,
141
+ isBase44Error,
142
+ toBase44Error,
143
+ version
144
+ };
145
+ //# sourceMappingURL=base44.mjs.map
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -7465,6 +7465,18 @@ function validateLadderConfig(config) {
7465
7465
  );
7466
7466
  }
7467
7467
  }
7468
+ function validateBase44Config(config) {
7469
+ const b = config.base44;
7470
+ if (!b || typeof b.appId !== "string" || !/^[A-Za-z0-9]{8,64}$/.test(b.appId)) {
7471
+ throw new Error(`defineApp: base44.appId must be a Base44 app id (alphanumeric). Got "${b?.appId}".`);
7472
+ }
7473
+ if (b.serverUrl !== void 0 && !/^https:\/\/[^/\s]+$/.test(b.serverUrl)) {
7474
+ throw new Error(`defineApp: base44.serverUrl must be an https origin with no path. Got "${b.serverUrl}".`);
7475
+ }
7476
+ if (!config.capabilities?.includes("base44")) {
7477
+ throw new Error('defineApp: base44 is configured but the "base44" capability is not declared.');
7478
+ }
7479
+ }
7468
7480
  function validateConfigShape(config) {
7469
7481
  if (!config.id || !/^[a-z0-9.]+$/.test(config.id)) {
7470
7482
  throw new Error(
@@ -7494,6 +7506,7 @@ function validateConfigShape(config) {
7494
7506
  throw new Error("defineApp: tier5Cap.maxBundleKilobytes must be positive.");
7495
7507
  }
7496
7508
  }
7509
+ if (config.base44 !== void 0) validateBase44Config(config);
7497
7510
  if (config.richContentEditor !== void 0 && typeof config.richContentEditor !== "boolean") {
7498
7511
  throw new Error("defineApp: richContentEditor must be a boolean (RFC 0063 \xA79 opt-in).");
7499
7512
  }
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -2,6 +2,7 @@
2
2
  var CAPABILITY_REGISTRY = {
3
3
  "app_info": ["get"],
4
4
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
5
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
5
6
  "biometrics": ["available", "confirm"],
6
7
  "browser_auth": ["start"],
7
8
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -9080,6 +9080,7 @@ function deriveAppMeta(name, m, platforms = {}) {
9080
9080
  linkableScreens: config.navigation?.linkableScreens,
9081
9081
  auth: config.auth,
9082
9082
  iap: config.iap,
9083
+ base44: config.base44,
9083
9084
  // RFC 0042 Phase 2 — optional per-app Wix Platform productionization block.
9084
9085
  // Read loosely (AppConfig in @himalaya/core doesn't type it yet) so apps can
9085
9086
  // opt in without a core-types bump; absent ⇒ all members keep the dev seam.
@@ -17,6 +17,7 @@ function dispatch(handlerId, params, _options) {
17
17
  var CAPABILITY_REGISTRY = {
18
18
  "app_info": ["get"],
19
19
  "audio_record": ["cancel", "cancelSession", "getPermissionStatus", "getSession", "listSegments", "listSessions", "pause", "requestPermission", "resume", "start", "startSession", "stop", "stopSession", "subscribeLevel", "watchNext", "watchStart", "watchStop"],
20
+ "base44": ["authLoginViaEmailPassword", "authLoginViaOtp", "authLogout", "authMe", "authRegister", "authResetPassword", "authStatus", "authUpdateMe", "authVerifyOtp", "entitiesBulkCreate", "entitiesCreate", "entitiesDelete", "entitiesFilter", "entitiesGet", "entitiesList", "entitiesUpdate", "functionsInvoke"],
20
21
  "biometrics": ["available", "confirm"],
21
22
  "browser_auth": ["start"],
22
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
@@ -42,6 +42,10 @@
42
42
  "types": "./dist/_types/stdlib/auth-providers/google/src/index.d.ts",
43
43
  "import": "./dist/auth-google.mjs"
44
44
  },
45
+ "./base44": {
46
+ "types": "./dist/_types/core/sdk/base44/src/index.d.ts",
47
+ "import": "./dist/base44.mjs"
48
+ },
45
49
  "./biometrics": {
46
50
  "types": "./dist/_types/core/sdk/biometrics/src/index.d.ts",
47
51
  "import": "./dist/biometrics.mjs"