@wix/himalaya-cli 0.1588.0 → 0.1590.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/torch/src/index.d.ts +39 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/capabilities.generated.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +13 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/extensions.d.ts +28 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +9 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/torch.mjs +78 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +9 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
- package/dist/cli.mjs +121 -50
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +16 -0
- package/guides/app-config.md +1 -1
- package/guides/importable-sdks.md +1 -0
- package/guides/one-app-to-himi-app.md +18 -4
- package/guides/qa-builds.md +12 -0
- package/guides/sdk-reference.json +101 -2
- package/guides/web-page-sdk-reference.md +1 -0
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/beauty-salon/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/beauty-salon/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/beauty-salon/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/beauty-salon/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/beauty-salon/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/beauty-salon-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/branded-lite/config.ts +7 -0
- package/templates/branded-lite/dev/index.ts +469 -0
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/branded-lite/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/branded-lite/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/branded-lite/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/branded-lite/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/branded-lite/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/branded-lite/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/branded-lite/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-loyalty/index.ts +3 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +5 -1
- package/templates/brandy/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/brandy/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/community-club/config.ts +7 -0
- package/templates/community-club/dev/index.ts +469 -0
- package/templates/community-club/himalaya.content.json +3 -0
- package/templates/community-club/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/community-club/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/community-club/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/community-club/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/community-club/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/community-club/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/community-club/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/community-club/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/community-club/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
- package/templates/community-club/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/community-club-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/community-club-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/events-meetups/config.ts +7 -0
- package/templates/events-meetups/dev/index.ts +469 -0
- package/templates/events-meetups/himalaya.content.json +3 -0
- package/templates/events-meetups/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/events-meetups/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/events-meetups/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/events-meetups/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/events-meetups/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/events-meetups/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
- package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/events-meetups-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/events-meetups-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/gym-fitness/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/gym-fitness/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/gym-fitness/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/gym-fitness/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/gym-fitness/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/gym-fitness/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/gym-fitness/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/gym-fitness-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/gym-fitness-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/himi-chat/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/himi-chat/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/nonprofit-cause/config.ts +7 -0
- package/templates/nonprofit-cause/dev/index.ts +469 -0
- package/templates/nonprofit-cause/himalaya.content.json +3 -0
- package/templates/nonprofit-cause/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/nonprofit-cause/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/nonprofit-cause/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/nonprofit-cause/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +9 -3
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-groups/index.ts +6 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/nonprofit-cause-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/owner-lite/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/owner-lite/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/podcast-creator/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/podcast-creator/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/podcast-creator/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/podcast-creator/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/podcast-creator-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/portfolio-creative/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/portfolio-creative/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/portfolio-creative/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/portfolio-creative/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/portfolio-creative/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/portfolio-creative-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/portfolio-creative-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/restaurant/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/restaurant/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/restaurant/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/restaurant/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/restaurant/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/restaurant/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/restaurant/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/restaurant-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/restaurant-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/retail-store/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/retail-store/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/retail-store/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/retail-store/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/retail-store/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/retail-store/tier5-src/_shared/restaurant-ordering.ts +1 -1
- package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +1 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/retail-store-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/retail-store-owner/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/yoga-studio/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/yoga-studio/tier5-src/_shared/branded-lite-hosted.ts +1 -0
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/yoga-studio/tier5-src/_shared/group-member-count.ts +15 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-bookings.ts +54 -13
- package/templates/yoga-studio/tier5-src/_shared/himi-copy.ts +10 -2
- package/templates/yoga-studio/tier5-src/_shared/himi-restaurants.ts +2 -2
- package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +2 -2
- package/templates/yoga-studio/tier5-src/himi-booking-services/index.ts +8 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +2 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +5 -5
- package/templates/yoga-studio-owner/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +5 -3
- package/templates/yoga-studio-owner/tier5-src/_shared/himi-copy.ts +10 -2
|
@@ -38,12 +38,13 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
38
38
|
readonly system_intents: readonly ["donate", "refreshShortcuts"];
|
|
39
39
|
readonly tasks: readonly ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"];
|
|
40
40
|
readonly theme: readonly ["applyOverlay", "clearOverlay", "surfaces"];
|
|
41
|
+
readonly torch: readonly ["off", "on", "status", "toggle"];
|
|
41
42
|
readonly ui: readonly ["alert", "snackbar"];
|
|
42
43
|
readonly wix_cashier: readonly ["isAvailable", "proceedToPayment"];
|
|
43
44
|
readonly wix_chat: readonly ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"];
|
|
44
45
|
};
|
|
45
46
|
/** A capability id backed by an @himalaya/* SDK binding. */
|
|
46
|
-
export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "health" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "network" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "theme" | "ui" | "wix_cashier" | "wix_chat";
|
|
47
|
+
export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "health" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "network" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "theme" | "torch" | "ui" | "wix_cashier" | "wix_chat";
|
|
47
48
|
/** All `capability.<id>.<verb>` action ids, flattened (the worker-bridge wire vocabulary). */
|
|
48
49
|
export declare const CAPABILITY_ACTION_IDS: readonly string[];
|
|
49
50
|
/** Capability id → the @himalaya/* package(s) a worker imports to reach it — every dispatch
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/torch/src/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The torch right now. `level` is 0..1 while lit, `null` while off or when unknown. */
|
|
2
|
+
export interface TorchStatus {
|
|
3
|
+
/** Does this device have a torch the app can drive? */
|
|
4
|
+
available: boolean;
|
|
5
|
+
/** Is the torch lit? */
|
|
6
|
+
on: boolean;
|
|
7
|
+
/** Brightness 0..1 while lit (1 = the brightest the device allows), else `null`. */
|
|
8
|
+
level: number | null;
|
|
9
|
+
/** Why the torch is unavailable, when it is. */
|
|
10
|
+
reason?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TorchOnOptions {
|
|
13
|
+
/** Brightness in 0..1 (default 1). Values outside the range are clamped; 0 turns the torch off.
|
|
14
|
+
* A device without adjustable strength (Android below API 33, or a single-level flash) lights at
|
|
15
|
+
* full brightness and reports `level: 1`. */
|
|
16
|
+
level?: number;
|
|
17
|
+
}
|
|
18
|
+
export type TorchErrorCode = "unavailable" | "invalid_argument" | "failed";
|
|
19
|
+
/** What every torch verb throws when the native/web arm reports a typed error. */
|
|
20
|
+
export interface TorchError extends Error {
|
|
21
|
+
code: TorchErrorCode;
|
|
22
|
+
}
|
|
23
|
+
/** Build a [TorchError]. */
|
|
24
|
+
export declare function torchError(code: TorchErrorCode, message: string): TorchError;
|
|
25
|
+
/** Narrow a caught value: `catch (e) { if (isTorchError(e) && e.code === "unavailable") … }`. */
|
|
26
|
+
export declare function isTorchError(e: unknown): e is TorchError;
|
|
27
|
+
/**
|
|
28
|
+
* Turn the torch on, at `level` (0..1, default 1). Resolves with the resulting status.
|
|
29
|
+
* Rejects `unavailable` on a device with no torch, `invalid_argument` for a non-numeric level.
|
|
30
|
+
*/
|
|
31
|
+
export declare function on(opts?: TorchOnOptions): Promise<TorchStatus>;
|
|
32
|
+
/** Turn the torch off. Idempotent — resolves (never rejects `unavailable`) when there is no torch. */
|
|
33
|
+
export declare function off(): Promise<TorchStatus>;
|
|
34
|
+
/** Flip the torch: off → on at full brightness, on → off. Rejects `unavailable` with no torch. */
|
|
35
|
+
export declare function toggle(): Promise<TorchStatus>;
|
|
36
|
+
/** Read the torch's availability and state. Never rejects for a missing torch. */
|
|
37
|
+
export declare function status(): Promise<TorchStatus>;
|
|
38
|
+
/** Capability version, for bundles that gate on a min binary version. */
|
|
39
|
+
export declare const version = 1;
|
|
@@ -36,6 +36,7 @@ import type * as SpeechSdk from "@wix/himalaya/speech";
|
|
|
36
36
|
import type * as SystemIntentsSdk from "@wix/himalaya/system-intents";
|
|
37
37
|
import type * as TasksSdk from "@wix/himalaya/tasks";
|
|
38
38
|
import type * as ThemeSdk from "@wix/himalaya/theme";
|
|
39
|
+
import type * as TorchSdk from "@wix/himalaya/torch";
|
|
39
40
|
import type * as UiSdk from "@wix/himalaya/ui";
|
|
40
41
|
import type * as WixCashierSdk from "@wix/himalaya/wix-cashier";
|
|
41
42
|
import type * as WixChatSdk from "@wix/himalaya/wix-chat";
|
|
@@ -89,6 +90,7 @@ export interface HimalayaPageCapabilities {
|
|
|
89
90
|
readonly "system_intents": PageModule<typeof SystemIntentsSdk> & PageEvents;
|
|
90
91
|
readonly "tasks": PageModule<typeof TasksSdk> & PageEvents;
|
|
91
92
|
readonly "theme": PageModule<typeof ThemeSdk> & PageEvents;
|
|
93
|
+
readonly "torch": PageModule<typeof TorchSdk> & PageEvents;
|
|
92
94
|
readonly "ui": PageModule<typeof UiSdk> & PageEvents;
|
|
93
95
|
readonly "wix_cashier": PageModule<typeof WixCashierSdk> & PageEvents;
|
|
94
96
|
readonly "wix_chat": PageModule<typeof WixChatSdk> & PageEvents;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts
CHANGED
|
@@ -638,8 +638,19 @@ export interface PushConfig {
|
|
|
638
638
|
/** A `tier5.<service>.<action>` dispatched on EVERY notification — receipt or tap
|
|
639
639
|
* — so a worker can keep a badge count or refresh a feed without navigating. It
|
|
640
640
|
* receives `templateId`, `topic`, `metaSiteId`, `notificationId`, `link`,
|
|
641
|
-
* `resolvedLink` and `tapped
|
|
641
|
+
* `resolvedLink` and `tapped`, plus (#4710) `title` and `body` — the strings the
|
|
642
|
+
* notification DISPLAYS, after rich-template interpolation — and `payloadJson`, the
|
|
643
|
+
* raw payload as a JSON object string (APNs `aps` removed, a nested Ping `data`
|
|
644
|
+
* merged in, every value a string). Over 16 KB, `payloadJson` keeps the entries that
|
|
645
|
+
* fit and `payloadTruncated` is `"true"`. All values are strings, per the dispatch
|
|
646
|
+
* bridge's contract. A notification-button press carries the same params. */
|
|
642
647
|
observerAction?: string;
|
|
648
|
+
/** Foreground presentation of a remote push (#4710). "banner" (default) shows the
|
|
649
|
+
* system notification; "silent" shows none while the app is in the foreground, for
|
|
650
|
+
* an app that already surfaces the event in-app. iOS presents with the badge only;
|
|
651
|
+
* Android posts nothing but applies the badge. The observer still receives the
|
|
652
|
+
* receipt. Background delivery is unchanged. */
|
|
653
|
+
foreground?: "banner" | "silent";
|
|
643
654
|
}
|
|
644
655
|
export type IapProductType = "subscription" | "nonConsumable" | "consumable";
|
|
645
656
|
export interface IapProduct {
|
|
@@ -837,7 +848,7 @@ export interface OrientationEnvelope {
|
|
|
837
848
|
export declare const DEFAULT_ORIENTATION_ENVELOPE: Required<OrientationEnvelope>;
|
|
838
849
|
/** Fill in the absent families. Total, so callers never branch on `undefined`. */
|
|
839
850
|
export declare function resolveOrientationEnvelope(env?: OrientationEnvelope): Required<OrientationEnvelope>;
|
|
840
|
-
export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "theme" | "l10n" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "health" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "network" | "wix_cashier" | "wix_chat" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44" | "animation";
|
|
851
|
+
export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "theme" | "l10n" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "health" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "torch" | "network" | "wix_cashier" | "wix_chat" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44" | "animation";
|
|
841
852
|
/** `defineApp({ wixIap })` — the purchases-service app a build binds this app to. */
|
|
842
853
|
export interface WixIapConfig {
|
|
843
854
|
/** The purchases service's app UUID, registered on the app's own auth site. Not a secret. */
|
|
@@ -31,6 +31,34 @@ export interface WixListGroupRulesResponse {
|
|
|
31
31
|
* is unconfirmed — needsLiveProbe. A group with no rules answers an empty `rules`.
|
|
32
32
|
*/
|
|
33
33
|
export declare function listRules(groupId: string, opts?: WixCallOptions): Promise<WixListGroupRulesResponse>;
|
|
34
|
+
export type WixGroupMembershipStatus = "UNKNOWN_STATUS" | "JOINED" | "PENDING";
|
|
35
|
+
export interface WixGroupMembership {
|
|
36
|
+
groupId?: string;
|
|
37
|
+
status?: WixGroupMembershipStatus | string;
|
|
38
|
+
/** Empty unless the membership is JOINED. */
|
|
39
|
+
role?: {
|
|
40
|
+
value?: "MEMBER" | "ADMIN" | string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface WixListMembershipsResponse {
|
|
44
|
+
memberships?: WixGroupMembership[];
|
|
45
|
+
metadata?: {
|
|
46
|
+
count?: number;
|
|
47
|
+
offset?: number;
|
|
48
|
+
total?: number;
|
|
49
|
+
tooManyToCount?: boolean;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* List a member's group memberships — GET /social-groups-proxy/members/v2/members/{memberId}/memberships.
|
|
54
|
+
*
|
|
55
|
+
* @scope member — a signed-in member lists their own memberships only; an owner-scoped token lists
|
|
56
|
+
* anyone's. Sorted by `groupId` descending by default. `limit` is at most 100.
|
|
57
|
+
*/
|
|
58
|
+
export declare function listMemberships(memberId: string, paging?: {
|
|
59
|
+
limit?: number;
|
|
60
|
+
offset?: number;
|
|
61
|
+
}, opts?: WixCallOptions): Promise<WixListMembershipsResponse>;
|
|
34
62
|
export interface WixGroupCoverImage {
|
|
35
63
|
/** A previously-uploaded Wix Media file id (from site-media generate-upload-url + PUT). */
|
|
36
64
|
mediaId?: string;
|
|
@@ -200,8 +200,9 @@ export interface WixActivityCountersQueryResponse {
|
|
|
200
200
|
activityCounters?: WixActivityCounter[];
|
|
201
201
|
}
|
|
202
202
|
export interface WixFollowCounts {
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
/** `null` when Wix returned no total for this direction: unavailable, never an assumed 0. */
|
|
204
|
+
followers: number | null;
|
|
205
|
+
following: number | null;
|
|
205
206
|
}
|
|
206
207
|
export interface WixMemberConnection {
|
|
207
208
|
memberId?: string;
|
|
@@ -212,9 +213,12 @@ export interface WixMyConnectionsResponse {
|
|
|
212
213
|
connectedMembers?: WixMemberConnection[];
|
|
213
214
|
}
|
|
214
215
|
/** Followers / following totals for a member — POST
|
|
215
|
-
* /members/v1/activity-counters/query.
|
|
216
|
-
*
|
|
217
|
-
*
|
|
216
|
+
* /members/v1/activity-counters/query. Wix keeps ONE counter per direction and creates it on the
|
|
217
|
+
* first change (live, amit1: a followed member's entry holds only `followerCount`, the follower's
|
|
218
|
+
* only `followingCount`), so each direction is reported on its own: an explicit nonnegative safe
|
|
219
|
+
* integer, or `null` when Wix returned none. A counter that is present but malformed makes the
|
|
220
|
+
* whole answer untrusted and rejects, as does an entry with neither counter or a permission
|
|
221
|
+
* failure. Callers hide an unavailable counter; a missing one is never shown as zero. */
|
|
218
222
|
export declare function getFollowCounts(memberId: string, options?: WixCallOptions): Promise<WixFollowCounts>;
|
|
219
223
|
/** Whether the signed-in member follows `targetId` — POST
|
|
220
224
|
* /members/v3/followers/my/connections. Returns false on any miss. May 403 →
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -38,6 +38,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
38
38
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
39
39
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
40
40
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
41
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
41
42
|
"ui": ["alert", "snackbar"],
|
|
42
43
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
43
44
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
53
53
|
"system_intents": ["donate", "refreshShortcuts"],
|
|
54
54
|
"tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
|
|
55
55
|
"theme": ["applyOverlay", "clearOverlay", "surfaces"],
|
|
56
|
+
"torch": ["off", "on", "status", "toggle"],
|
|
56
57
|
"ui": ["alert", "snackbar"],
|
|
57
58
|
"wix_cashier": ["isAvailable", "proceedToPayment"],
|
|
58
59
|
"wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
|
|
@@ -0,0 +1,78 @@
|
|
|
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/torch/src/index.ts
|
|
17
|
+
var ERROR_CODES = ["unavailable", "invalid_argument", "failed"];
|
|
18
|
+
function torchError(code, message) {
|
|
19
|
+
const e = new Error(message);
|
|
20
|
+
e.name = "TorchError";
|
|
21
|
+
e.code = code;
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function isTorchError(e) {
|
|
25
|
+
if (!(e instanceof Error)) return false;
|
|
26
|
+
const code = e.code;
|
|
27
|
+
return typeof code === "string" && ERROR_CODES.includes(code);
|
|
28
|
+
}
|
|
29
|
+
function unwrap(r) {
|
|
30
|
+
const err = r?.error;
|
|
31
|
+
if (err && typeof err === "object") {
|
|
32
|
+
const code = ERROR_CODES.includes(err.code ?? "") ? err.code : "failed";
|
|
33
|
+
throw torchError(code, err.message ?? code);
|
|
34
|
+
}
|
|
35
|
+
return r;
|
|
36
|
+
}
|
|
37
|
+
function toStatus(r) {
|
|
38
|
+
const o = r ?? {};
|
|
39
|
+
const on2 = o.on === true || o.on === "true";
|
|
40
|
+
const lvl = typeof o.level === "number" ? o.level : typeof o.level === "string" && o.level !== "" ? Number(o.level) : null;
|
|
41
|
+
const status2 = {
|
|
42
|
+
available: o.available === true || o.available === "true",
|
|
43
|
+
on: on2,
|
|
44
|
+
level: on2 && lvl !== null && Number.isFinite(lvl) ? lvl : null
|
|
45
|
+
};
|
|
46
|
+
if (typeof o.reason === "string" && o.reason) status2.reason = o.reason;
|
|
47
|
+
return status2;
|
|
48
|
+
}
|
|
49
|
+
async function on(opts = {}) {
|
|
50
|
+
const params = {};
|
|
51
|
+
if (opts.level !== void 0) {
|
|
52
|
+
if (typeof opts.level !== "number" || !Number.isFinite(opts.level)) {
|
|
53
|
+
throw torchError("invalid_argument", `level must be a number in 0..1, got ${String(opts.level)}`);
|
|
54
|
+
}
|
|
55
|
+
params.level = String(Math.min(1, Math.max(0, opts.level)));
|
|
56
|
+
}
|
|
57
|
+
return toStatus(unwrap(await dispatch("capability.torch.on", params)));
|
|
58
|
+
}
|
|
59
|
+
async function off() {
|
|
60
|
+
return toStatus(unwrap(await dispatch("capability.torch.off", {})));
|
|
61
|
+
}
|
|
62
|
+
async function toggle() {
|
|
63
|
+
return toStatus(unwrap(await dispatch("capability.torch.toggle", {})));
|
|
64
|
+
}
|
|
65
|
+
async function status() {
|
|
66
|
+
return toStatus(unwrap(await dispatch("capability.torch.status", {})));
|
|
67
|
+
}
|
|
68
|
+
var version = 1;
|
|
69
|
+
export {
|
|
70
|
+
isTorchError,
|
|
71
|
+
off,
|
|
72
|
+
on,
|
|
73
|
+
status,
|
|
74
|
+
toggle,
|
|
75
|
+
torchError,
|
|
76
|
+
version
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=torch.mjs.map
|
|
@@ -10,6 +10,19 @@ function listRules(groupId, opts) {
|
|
|
10
10
|
if (!groupId) throw new Error("listRules: groupId is required");
|
|
11
11
|
return wixCall("GET", `/social-groups/v2/rules/${encodeURIComponent(groupId)}`, void 0, opts);
|
|
12
12
|
}
|
|
13
|
+
function listMemberships(memberId, paging = {}, opts) {
|
|
14
|
+
if (!memberId) throw new Error("listMemberships: memberId is required");
|
|
15
|
+
const params = [
|
|
16
|
+
paging.limit !== void 0 ? `limit=${Math.max(0, Math.min(100, Math.trunc(paging.limit)))}` : "",
|
|
17
|
+
paging.offset !== void 0 ? `offset=${Math.max(0, Math.trunc(paging.offset))}` : ""
|
|
18
|
+
].filter(Boolean).join("&");
|
|
19
|
+
return wixCall(
|
|
20
|
+
"GET",
|
|
21
|
+
`/social-groups-proxy/members/v2/members/${encodeURIComponent(memberId)}/memberships${params ? `?${params}` : ""}`,
|
|
22
|
+
void 0,
|
|
23
|
+
opts
|
|
24
|
+
);
|
|
25
|
+
}
|
|
13
26
|
function createGroup(group) {
|
|
14
27
|
return wixCall("POST", "/social-groups-proxy/groups/v2/groups", { group });
|
|
15
28
|
}
|
|
@@ -106,6 +119,7 @@ export {
|
|
|
106
119
|
joinGroup,
|
|
107
120
|
leaveGroup,
|
|
108
121
|
listJoinGroupRequests,
|
|
122
|
+
listMemberships,
|
|
109
123
|
listRules,
|
|
110
124
|
queryGroups,
|
|
111
125
|
queryMembers,
|
|
@@ -87,15 +87,16 @@ async function getFollowCounts(memberId, options) {
|
|
|
87
87
|
const entry = (res.activityCounters ?? []).find((c) => c.appId === MEMBERS_FOLLOWERS_APP_ID && c.memberId === memberId);
|
|
88
88
|
const counters = entry?.counters;
|
|
89
89
|
const value = (key) => Array.isArray(counters) ? counters.find((counter) => counter?.key === key)?.count : counters?.[key]?.count;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
throw new Error("getFollowCounts:
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
followers,
|
|
97
|
-
following
|
|
90
|
+
const total = (key) => {
|
|
91
|
+
const count = value(key);
|
|
92
|
+
if (count === void 0 || count === null) return null;
|
|
93
|
+
if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0) throw new Error("getFollowCounts: a member total is malformed");
|
|
94
|
+
return count;
|
|
98
95
|
};
|
|
96
|
+
const followers = total("followerCount");
|
|
97
|
+
const following = total("followingCount");
|
|
98
|
+
if (followers === null && following === null) throw new Error("getFollowCounts: explicit member totals are unavailable");
|
|
99
|
+
return { followers, following };
|
|
99
100
|
}
|
|
100
101
|
async function isFollowingMember(targetId) {
|
|
101
102
|
if (!targetId) throw new Error("isFollowingMember: targetId is required");
|
|
@@ -254,6 +254,10 @@
|
|
|
254
254
|
"types": "./dist/_types/core/sdk/time/src/index.d.ts",
|
|
255
255
|
"import": "./dist/time.mjs"
|
|
256
256
|
},
|
|
257
|
+
"./torch": {
|
|
258
|
+
"types": "./dist/_types/core/sdk/torch/src/index.d.ts",
|
|
259
|
+
"import": "./dist/torch.mjs"
|
|
260
|
+
},
|
|
257
261
|
"./ui": {
|
|
258
262
|
"types": "./dist/_types/core/sdk/ui/src/index.d.ts",
|
|
259
263
|
"import": "./dist/ui.mjs"
|