@wix/himalaya-cli 0.1323.0 → 0.1325.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/stdlib/flows/checkout/src/index.d.ts +6 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/order-refs.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/purchase-fields.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +9 -35
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/extensions.d.ts +79 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/extensions.d.ts +221 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +0 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +38 -21
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +30 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +20 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2890 -54
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +80 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +45 -17
- package/dist/cli.mjs +5 -4
- package/fixtures/wix-canned.json +61 -6
- package/guides/iap-pricing.md +9 -0
- package/guides/iap-screen-adoption.md +77 -0
- package/guides/importable-sdks.md +2 -0
- package/guides/index.json +6 -0
- package/guides/release-notes.md +25 -0
- package/guides/sdk-reference.json +539 -32
- package/guides/wix-api-usage.md +5 -0
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +1 -1
- package/templates/beauty-salon/dev/index.ts +46 -18
- package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-store-collection.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/home-service.ts +2 -1
- package/templates/beauty-salon/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +48 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-order/index.ts +24 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +153 -64
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +24 -3
- package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +8 -3
- package/templates/beauty-salon/tier5-src/himi-store-shop/index.ts +10 -0
- package/templates/beauty-salon/tier5-src/wix-spaces-plan-detail/index.ts +8 -3
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/branded-lite/config.ts +1 -8
- package/templates/branded-lite/dev/index.ts +46 -134
- package/templates/branded-lite/himalaya.content.json +0 -3
- package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/branded-lite/tier5-src/_shared/himi-store-collection.ts +1 -1
- package/templates/branded-lite/tier5-src/_shared/home-service.ts +2 -1
- package/templates/branded-lite/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +48 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-order/index.ts +24 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +153 -64
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +24 -3
- package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +8 -3
- package/templates/branded-lite/tier5-src/himi-store-shop/index.ts +10 -0
- package/templates/branded-lite/tier5-src/wix-spaces-plan-detail/index.ts +8 -3
- package/templates/community-club/config.ts +1 -8
- package/templates/community-club/dev/index.ts +3 -117
- package/templates/community-club/himalaya.content.json +0 -3
- package/templates/community-club/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/community-club/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/community-club/tier5-src/_shared/home-service.ts +2 -1
- package/templates/community-club/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/community-club/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/community-club-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/events-meetups/config.ts +1 -8
- package/templates/events-meetups/dev/index.ts +3 -117
- package/templates/events-meetups/himalaya.content.json +0 -3
- package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/events-meetups/tier5-src/_shared/home-service.ts +2 -1
- package/templates/events-meetups/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/events-meetups-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/gym-fitness/config.ts +1 -1
- package/templates/gym-fitness/dev/index.ts +46 -18
- package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/gym-fitness/tier5-src/_shared/himi-store-collection.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/home-service.ts +2 -1
- package/templates/gym-fitness/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +48 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-order/index.ts +24 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +153 -64
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +24 -3
- package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +8 -3
- package/templates/gym-fitness/tier5-src/himi-store-shop/index.ts +10 -0
- package/templates/gym-fitness/tier5-src/wix-spaces-plan-detail/index.ts +8 -3
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/nonprofit-cause/config.ts +1 -8
- package/templates/nonprofit-cause/dev/index.ts +29 -129
- package/templates/nonprofit-cause/himalaya.content.json +0 -3
- package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/nonprofit-cause/tier5-src/_shared/home-service.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +153 -64
- package/templates/nonprofit-cause/tier5-src/wix-spaces-plan-detail/index.ts +8 -3
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/owner-lite/tier5-src/_shared/home-service.ts +2 -1
- package/templates/podcast-creator/config.ts +1 -1
- package/templates/podcast-creator/dev/index.ts +29 -13
- package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/podcast-creator/tier5-src/_shared/home-service.ts +2 -1
- package/templates/podcast-creator/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +153 -64
- package/templates/podcast-creator/tier5-src/wix-spaces-plan-detail/index.ts +8 -3
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/portfolio-creative/config.ts +1 -1
- package/templates/portfolio-creative/dev/index.ts +20 -6
- package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-collection.ts +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/home-service.ts +2 -1
- package/templates/portfolio-creative/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +48 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-order/index.ts +24 -3
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +24 -3
- package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +8 -3
- package/templates/portfolio-creative/tier5-src/himi-store-shop/index.ts +10 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/restaurant/config.ts +1 -1
- package/templates/restaurant/dev/index.ts +3 -1
- package/templates/restaurant/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/restaurant/tier5-src/_shared/home-service.ts +2 -1
- package/templates/restaurant/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/restaurant/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/restaurant-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/retail-store/config.ts +1 -1
- package/templates/retail-store/dev/index.ts +20 -6
- package/templates/retail-store/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/retail-store/tier5-src/_shared/himi-store-collection.ts +1 -1
- package/templates/retail-store/tier5-src/_shared/home-service.ts +2 -1
- package/templates/retail-store/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/retail-store/tier5-src/_shared/iap-worker.ts +42 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +48 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/retail-store/tier5-src/himi-branded-lite-order/index.ts +24 -3
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +24 -3
- package/templates/retail-store/tier5-src/himi-store-saved/index.ts +8 -3
- package/templates/retail-store/tier5-src/himi-store-shop/index.ts +10 -0
- package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/retail-store-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/yoga-studio/config.ts +1 -1
- package/templates/yoga-studio/dev/index.ts +29 -13
- package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/yoga-studio/tier5-src/_shared/home-service.ts +2 -1
- package/templates/yoga-studio/tier5-src/_shared/iap-presentation.ts +53 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +16 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +153 -64
- package/templates/yoga-studio/tier5-src/wix-spaces-plan-detail/index.ts +8 -3
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +1 -1
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +3 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/home-service.ts +2 -1
- package/templates/branded-lite/tier5-src/wix-spaces-create-group/index.ts +0 -29
- package/templates/community-club/tier5-src/wix-spaces-create-group/index.ts +0 -29
- package/templates/events-meetups/tier5-src/wix-spaces-create-group/index.ts +0 -29
- package/templates/nonprofit-cause/tier5-src/wix-spaces-create-group/index.ts +0 -29
|
@@ -11,6 +11,8 @@ export interface Entitlement {
|
|
|
11
11
|
* rather than offering to sell it to them again. "" when not entitled. */
|
|
12
12
|
planId: string;
|
|
13
13
|
}
|
|
14
|
+
/** Active plan ids for one member-scoped catalog scan. An incomplete scan rejects so callers cannot offer a duplicate purchase. */
|
|
15
|
+
export declare function activePlanIds(): Promise<string[]>;
|
|
14
16
|
/**
|
|
15
17
|
* Does the signed-in member hold a plan that grants access right now?
|
|
16
18
|
*
|
|
@@ -23,16 +25,10 @@ export interface Entitlement {
|
|
|
23
25
|
* the wrong (owner) endpoint is so dangerous: the 403 is indistinguishable from
|
|
24
26
|
* an honest "no orders". Use this function and that cannot happen.
|
|
25
27
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* member collects a `DRAFT` order every time they abandon a checkout. Asking for
|
|
29
|
-
* everything and scanning it means the DRAFTs eventually crowd the single ACTIVE
|
|
30
|
-
* order off the page — and because this function fails closed, that reads as
|
|
31
|
-
* "never paid" and locks a paying member out with no error anywhere. Asking only
|
|
32
|
-
* for ACTIVE makes the page hold nothing but access, so the count of abandoned
|
|
33
|
-
* checkouts cannot decide whether someone gets what they bought.
|
|
28
|
+
* ACTIVE is filtered server-side so abandoned checkouts cannot crowd access
|
|
29
|
+
* off the page. When `planId` is supplied, page until that exact plan is found.
|
|
34
30
|
*/
|
|
35
|
-
export declare function entitlement(): Promise<Entitlement>;
|
|
31
|
+
export declare function entitlement(planId?: string): Promise<Entitlement>;
|
|
36
32
|
/** Shorthand for the common gate. Fails closed, like `entitlement`. */
|
|
37
33
|
export declare function isEntitled(): Promise<boolean>;
|
|
38
34
|
export type PayOutcome =
|
|
@@ -68,7 +64,7 @@ export interface PayRequest {
|
|
|
68
64
|
cashierUrl?: () => Promise<string | undefined>;
|
|
69
65
|
/** Re-read immediately before money moves (the wallet charge, the cashier opening). The caller's
|
|
70
66
|
* own route can change while a rail is being chosen; false stops the flow with nothing charged. */
|
|
71
|
-
mayCharge?: () => boolean
|
|
67
|
+
mayCharge?: () => boolean | Promise<boolean>;
|
|
72
68
|
}
|
|
73
69
|
/**
|
|
74
70
|
* Collect payment through the two sanctioned rails, in order.
|
|
@@ -14,4 +14,5 @@ export declare function pruneExpiredHolds(partition: OrderRefPartition, now: num
|
|
|
14
14
|
/** References one member keeps at once. When full, the oldest reference from before Apple's sheet
|
|
15
15
|
* is evicted; a partition full of handed-over payments refuses new sales instead. */
|
|
16
16
|
export declare const MAX_ORDER_REFS = 16;
|
|
17
|
+
/** Persists unfinished orders per app and member, using the host KV unless storage is supplied. */
|
|
17
18
|
export declare function createWorkerOrderRefStore(storage?: KeyValueStorage): OrderRefStore;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IapItemView } from "@wix/himalaya/iap";
|
|
2
2
|
import type { AppleIapCheckoutState } from "./apple-iap-contract.js";
|
|
3
3
|
import type { IapPurchaseCopy, IapPurchaseFields, IapPurchaseReadiness } from "./commerce-contract.js";
|
|
4
|
+
/** Projects a shared checkout into customer-facing action fields; a price alone never grants access. */
|
|
4
5
|
export declare function iapPurchaseFields(view: IapItemView, state: AppleIapCheckoutState, readiness: IapPurchaseReadiness, copy: IapPurchaseCopy): IapPurchaseFields;
|
|
@@ -126,38 +126,9 @@ export interface PlanRow {
|
|
|
126
126
|
joinedLabel: string;
|
|
127
127
|
/** Per-row CTA, so the template needs no conditional of its own. */
|
|
128
128
|
cta: string;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
isLoading: boolean;
|
|
133
|
-
notLoading: boolean;
|
|
134
|
-
rows: PlanRow[];
|
|
135
|
-
hasRows: boolean;
|
|
136
|
-
noRows: boolean;
|
|
137
|
-
/** Ready, and the site sells nothing. Distinct from `noRows`, which is also
|
|
138
|
-
* true while still loading — showing "no plans" during the first fetch would
|
|
139
|
-
* flash the wrong answer. `hiddenPath` binds a single path, so this decision
|
|
140
|
-
* is made HERE rather than by combining flags in the descriptor. */
|
|
141
|
-
emptyCatalog: boolean;
|
|
142
|
-
notEmptyCatalog: boolean;
|
|
143
|
-
headline: string;
|
|
144
|
-
subhead: string;
|
|
145
|
-
/** Result banner after a join attempt. */
|
|
146
|
-
notice: string;
|
|
147
|
-
noNotice: boolean;
|
|
148
|
-
error: string;
|
|
149
|
-
noError: boolean;
|
|
150
|
-
/** True once the member holds any access-granting plan. */
|
|
151
|
-
entitled: boolean;
|
|
152
|
-
notEntitled: boolean;
|
|
153
|
-
/** True ONLY when the current notice is "you must sign in". Distinct from
|
|
154
|
-
* `noNotice`: a successful join, a cancellation, a handoff and a backend
|
|
155
|
-
* failure all set a notice too, and routing any of those to a sign-in screen
|
|
156
|
-
* sends the member somewhere that cannot help them. Every action sets this
|
|
157
|
-
* explicitly rather than inheriting it, so a stale `true` cannot survive the
|
|
158
|
-
* next attempt. */
|
|
159
|
-
needsSignIn: boolean;
|
|
160
|
-
notNeedsSignIn: boolean;
|
|
129
|
+
appleSupported: boolean;
|
|
130
|
+
joinDisabled: boolean;
|
|
131
|
+
joinNote: string;
|
|
161
132
|
}
|
|
162
133
|
/** Every user-facing string on the paywall. Override any subset. */
|
|
163
134
|
export interface CheckoutCopy {
|
|
@@ -199,11 +170,14 @@ export interface CheckoutServiceOptions {
|
|
|
199
170
|
* const svc = createCheckoutService({ returnTo: "myapp://screen/library" });
|
|
200
171
|
* export default svc; export { svc };
|
|
201
172
|
*/
|
|
202
|
-
export declare function createCheckoutService(opts?: CheckoutServiceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<
|
|
203
|
-
|
|
173
|
+
export declare function createCheckoutService(opts?: CheckoutServiceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<any> & {
|
|
174
|
+
pricingPublish: () => Promise<any>;
|
|
175
|
+
pricingRefresh: (...args: never[]) => Promise<any>;
|
|
176
|
+
iapPoll: (...args: never[]) => Promise<any>;
|
|
177
|
+
load: (...args: never[]) => Promise<any>;
|
|
204
178
|
join: (input?: {
|
|
205
179
|
id?: string;
|
|
206
|
-
}) => Promise<
|
|
180
|
+
}) => Promise<any>;
|
|
207
181
|
};
|
|
208
182
|
export interface CheckoutScreenOptions {
|
|
209
183
|
/** Where the built worker bundle is served from. */
|
|
@@ -8,6 +8,15 @@ export type WixBlogCommentRow = {
|
|
|
8
8
|
/** [rico] #3372 — the comment's Ricos document (`content.richContent`) as the API returned it, for a
|
|
9
9
|
* RichContent row; undefined when the comment has none. */
|
|
10
10
|
richContent?: unknown;
|
|
11
|
+
/** Set only on a reply row `listGroupPostComments` flattens in from `commentReplies` —
|
|
12
|
+
* absent on a top-level comment. */
|
|
13
|
+
parentCommentId?: string;
|
|
14
|
+
/** Set only on a TOP-LEVEL comment row, true when its reply thread had more replies than
|
|
15
|
+
* `repliesLimit` returned. There is no confirmed endpoint in this SDK to fetch the rest —
|
|
16
|
+
* `WixRepliesListResponse`'s own `pagingMetadata` carries a cursor, but nothing in the
|
|
17
|
+
* ingested spec calls it by itself — so this is a signal to show "N more replies" rather
|
|
18
|
+
* than silently truncating, not something a caller can page past yet. */
|
|
19
|
+
hasMoreReplies?: boolean;
|
|
11
20
|
};
|
|
12
21
|
type BlogCommentLike = {
|
|
13
22
|
id?: string;
|
|
@@ -22,4 +31,74 @@ type BlogCommentLike = {
|
|
|
22
31
|
export declare function blogCommentRow(comment: BlogCommentLike | undefined): WixBlogCommentRow;
|
|
23
32
|
export declare function createBlogComment(postId: string, text: string): Promise<WixBlogCommentRow>;
|
|
24
33
|
export declare function listBlogComments(postId: string): Promise<WixBlogCommentRow[]>;
|
|
34
|
+
/** The appId Wix Groups registers as its comments provider. Same value as
|
|
35
|
+
* GROUPS_APP_ID/GROUPS_APP_DEF_ID used elsewhere in this repo (social-feed's
|
|
36
|
+
* reactions/create-post calls) — Groups is one of the apps where the comments
|
|
37
|
+
* provider id and the app-def-id coincide. Source: comments-ng's own CONSUMERS.md. */
|
|
38
|
+
export declare const GROUPS_COMMENTS_APP_ID = "148c2287-c669-d849-d153-463c7486a694";
|
|
39
|
+
/**
|
|
40
|
+
* Posts a comment (or a reply, when `parentCommentId` is given) on a group feed post —
|
|
41
|
+
* POST /comments/v1/comments, body { comment: { appId, contextId: groupId, resourceId:
|
|
42
|
+
* feedItemId, content, parentComment? } }. Same underlying RPC as the generated
|
|
43
|
+
* `createComment`, scoped to a group feed item by the appId/contextId/resourceId
|
|
44
|
+
* convention in comments-ng's own CONSUMERS.md (source-verified; see the file header).
|
|
45
|
+
*
|
|
46
|
+
* verify-live: no round-trip against a real group post yet — the scoping comes from the
|
|
47
|
+
* comments-ng consumer table, not a live create+list.
|
|
48
|
+
*
|
|
49
|
+
* @scope member — requires a signed-in site member.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createGroupPostComment(groupId: string, feedItemId: string, text: string, parentCommentId?: string): Promise<WixBlogCommentRow>;
|
|
52
|
+
export interface WixListGroupPostCommentsResult {
|
|
53
|
+
comments: WixBlogCommentRow[];
|
|
54
|
+
/** `undefined` when the response carried none — a thread with more pages has one. */
|
|
55
|
+
pagingMetadata?: {
|
|
56
|
+
count?: number;
|
|
57
|
+
hasNext?: boolean;
|
|
58
|
+
cursors?: {
|
|
59
|
+
next?: string;
|
|
60
|
+
prev?: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface WixListGroupPostCommentsOptions {
|
|
65
|
+
/** From a prior call's `pagingMetadata.cursors.next` — fetches the next page. */
|
|
66
|
+
cursor?: string;
|
|
67
|
+
/** Top-level comments per page. Defaults to the server's own default (unset). */
|
|
68
|
+
limit?: number;
|
|
69
|
+
/** Replies to include inline PER parent comment. Defaults to 20 — unset, the
|
|
70
|
+
* server's documented default is to include none at all (see below). */
|
|
71
|
+
repliesLimit?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Lists a group feed post's comment thread — GET /comments/v1/comments/list-by-resource,
|
|
75
|
+
* scoped by appId/contextId=groupId/resourceId=feedItemId (query string, never a GET
|
|
76
|
+
* body — see the comment above). Same underlying RPC as the generated
|
|
77
|
+
* `listCommentsByResource`.
|
|
78
|
+
*
|
|
79
|
+
* Replies ride the SAME response, under `commentReplies` — keyed by parent comment id —
|
|
80
|
+
* but ONLY when the request's `cursorPaging.repliesLimit` asks for them; the field exists
|
|
81
|
+
* precisely because the server does not include replies by default. This function sends
|
|
82
|
+
* `cursorPaging.repliesLimit=20` unless `opts.repliesLimit` overrides it, and forwards
|
|
83
|
+
* `opts.cursor`/`opts.limit` into `cursorPaging.cursor`/`cursorPaging.limit` so a caller
|
|
84
|
+
* can actually page past `pagingMetadata.hasNext` instead of being stuck on page one. The
|
|
85
|
+
* generator could not resolve a precise shape for the `commentReplies` map
|
|
86
|
+
* (`Record<string, unknown>`), so its value is read as `{ replies?, pagingMetadata? }` here —
|
|
87
|
+
* inferred from the already-typed, structurally identical `WixRepliesListResponse`, not
|
|
88
|
+
* live-verified against a real multi-reply thread. Each reply is flattened into the SAME
|
|
89
|
+
* row list, tagged with `parentCommentId`, directly after its parent, oldest reply first.
|
|
90
|
+
* Top-level comments keep the SERVER's order: the request sends no sort (none is confirmed
|
|
91
|
+
* for this provider), so re-sorting a page on the client would break chronology at a page
|
|
92
|
+
* boundary whenever the server pages newest-first. Kept as-is, consecutive pages append
|
|
93
|
+
* consistently, whatever order the server uses. A thread with more replies than `repliesLimit` sets its PARENT row's
|
|
94
|
+
* `hasMoreReplies: true` instead of silently dropping them — there is no confirmed endpoint
|
|
95
|
+
* in this SDK to page a single thread's replies, so this is a signal, not a cursor.
|
|
96
|
+
*
|
|
97
|
+
* verify-live: no round-trip against a real group post yet — the appId/contextId/resourceId
|
|
98
|
+
* shape comes from the comments-ng consumer table, not a live call.
|
|
99
|
+
*
|
|
100
|
+
* @scope member — a signed-in site member reading a group they can see; whether an
|
|
101
|
+
* anonymous visitor can read a PUBLIC group's comments is unconfirmed — needsLiveProbe.
|
|
102
|
+
*/
|
|
103
|
+
export declare function listGroupPostComments(groupId: string, feedItemId: string, opts?: WixListGroupPostCommentsOptions): Promise<WixListGroupPostCommentsResult>;
|
|
25
104
|
export {};
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import type { WixGroup } from "./index.js";
|
|
1
|
+
import type { WixGroup, WixGroupsQueryRequest, WixQueryGroupsResponse, WixCallOptions } from "./index.js";
|
|
2
|
+
/**
|
|
3
|
+
* List/search groups — POST /social-groups-proxy/groups/v2/groups/query.
|
|
4
|
+
*
|
|
5
|
+
* @scope visitor — browsing public groups needs no sign-in; this is an
|
|
6
|
+
* already-working consumer-app feature (group discovery). Whether a
|
|
7
|
+
* private/secret group's existence is visible to a non-member is unconfirmed
|
|
8
|
+
* — needsLiveProbe.
|
|
9
|
+
*/
|
|
10
|
+
export declare function queryGroups(req?: WixGroupsQueryRequest, opts?: WixCallOptions): Promise<WixQueryGroupsResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a single group by id — GET /social-groups-proxy/groups/v2/groups/{id}.
|
|
13
|
+
*
|
|
14
|
+
* @scope visitor — same reasoning as `queryGroups`: reading a group's detail is
|
|
15
|
+
* an already-working consumer-app feature with no sign-in required for a
|
|
16
|
+
* public group.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getGroup(id: string, opts?: WixCallOptions): Promise<WixGroup>;
|
|
2
19
|
export interface WixGroupCoverImage {
|
|
3
20
|
/** A previously-uploaded Wix Media file id (from site-media generate-upload-url + PUT). */
|
|
4
21
|
mediaId?: string;
|
|
@@ -9,8 +26,24 @@ export interface WixGroupAccessRestriction {
|
|
|
9
26
|
/** UNKNOWN | ADMIN_APPROVAL | PAID_PLANS | EVENTS */
|
|
10
27
|
type?: string;
|
|
11
28
|
}
|
|
29
|
+
/** The real `GroupSettings` shape, ingested from `@wix/auto_sdk_groups_groups`
|
|
30
|
+
* (codegen/wix/auto/specs/groups_groups/types.d.ts) at its latest published version as of
|
|
31
|
+
* 2026-10-06 — re-ingestion confirmed no additional fields exist upstream. Do NOT add
|
|
32
|
+
* fields beyond this list without re-ingesting or a live probe first. */
|
|
33
|
+
export interface WixGroupSettings {
|
|
34
|
+
membersCanInvite?: boolean;
|
|
35
|
+
membersCanApprove?: boolean;
|
|
36
|
+
welcomeMemberPostEnabled?: boolean;
|
|
37
|
+
groupDetailsChangedPostEnabled?: boolean;
|
|
38
|
+
showMemberList?: boolean;
|
|
39
|
+
/** No enum is pinned anywhere in the ingested spec — needsLiveProbe. */
|
|
40
|
+
allowedToInviteMembers?: string;
|
|
41
|
+
/** No enum is pinned anywhere in the ingested spec — needsLiveProbe. */
|
|
42
|
+
allowedToApproveJoinRequests?: string;
|
|
43
|
+
aiSpamProtectionEnabled?: boolean;
|
|
44
|
+
}
|
|
12
45
|
/** Writable group fields for create/update. */
|
|
13
|
-
export interface
|
|
46
|
+
export interface WixGroupWriteInput {
|
|
14
47
|
/** Required on create. */
|
|
15
48
|
name?: string;
|
|
16
49
|
/** UNKNOWN | PUBLIC | PRIVATE | SECRET */
|
|
@@ -21,15 +54,16 @@ export interface WixGroupWrite {
|
|
|
21
54
|
description?: string;
|
|
22
55
|
coverImage?: WixGroupCoverImage | null;
|
|
23
56
|
accessRestriction?: WixGroupAccessRestriction;
|
|
57
|
+
settings?: WixGroupSettings;
|
|
24
58
|
}
|
|
25
59
|
export interface WixCreateGroupRequest {
|
|
26
|
-
group:
|
|
60
|
+
group: WixGroupWriteInput;
|
|
27
61
|
}
|
|
28
62
|
export interface WixCreateGroupResponse {
|
|
29
63
|
group: WixGroup;
|
|
30
64
|
}
|
|
31
65
|
export interface WixUpdateGroupRequest {
|
|
32
|
-
group:
|
|
66
|
+
group: WixGroupWriteInput & {
|
|
33
67
|
id: string;
|
|
34
68
|
};
|
|
35
69
|
}
|
|
@@ -38,11 +72,35 @@ export interface WixUpdateGroupResponse {
|
|
|
38
72
|
}
|
|
39
73
|
export interface WixDeleteGroupResponse {
|
|
40
74
|
}
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Create a group — POST /social-groups-proxy/groups/v2/groups. `name` is required;
|
|
77
|
+
* the entity is wrapped as `{ group }`.
|
|
78
|
+
*
|
|
79
|
+
* @scope owner — CONFIRMED: requires a true owner/admin-scoped API token. Returns
|
|
80
|
+
* HTTP 403 for every member session, including the site owner's own account signed
|
|
81
|
+
* in via a normal member-login flow. There is NO member-side workaround — do not
|
|
82
|
+
* wire this to a consumer-facing "create group" action. See the section note above
|
|
83
|
+
* for the reproduction.
|
|
84
|
+
*/
|
|
85
|
+
export declare function createGroup(group: WixGroupWriteInput): Promise<WixCreateGroupResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* Update a group — PATCH /social-groups-proxy/groups/v2/groups/{id} (field-mask style).
|
|
88
|
+
* Only the supplied fields change; the request carries `{ group: { id, ... } }`.
|
|
89
|
+
*
|
|
90
|
+
* @scope owner — VERY LIKELY the same owner/admin-scoped-token requirement as
|
|
91
|
+
* `createGroup` (same entity, same write-class, originally verified together via
|
|
92
|
+
* "the real Owner Create/Edit-Group flow") — but NOT independently re-tested
|
|
93
|
+
* against a member session this round. needsLiveProbe to confirm directly rather
|
|
94
|
+
* than by inference.
|
|
95
|
+
*/
|
|
96
|
+
export declare function updateGroup(groupId: string, group: WixGroupWriteInput): Promise<WixUpdateGroupResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* Delete a group — DELETE /social-groups-proxy/groups/v2/groups/{id}.
|
|
99
|
+
*
|
|
100
|
+
* @scope owner — VERY LIKELY the same owner/admin-scoped-token requirement as
|
|
101
|
+
* `createGroup` (same reasoning as `updateGroup` above) — not independently
|
|
102
|
+
* re-tested against a member session this round. needsLiveProbe.
|
|
103
|
+
*/
|
|
46
104
|
export declare function deleteGroup(groupId: string): Promise<WixDeleteGroupResponse>;
|
|
47
105
|
export interface WixGroupJoinResponse {
|
|
48
106
|
member?: {
|
|
@@ -53,9 +111,18 @@ export interface WixGroupJoinResponse {
|
|
|
53
111
|
};
|
|
54
112
|
};
|
|
55
113
|
}
|
|
56
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* Join a group as the signed-in member — POST /social-groups/v2/groups/{id}/join.
|
|
116
|
+
*
|
|
117
|
+
* @scope member — a self-service action any signed-in member session can reach
|
|
118
|
+
* (distinct REST base from group CRUD above, which is owner-only). Verified live.
|
|
119
|
+
*/
|
|
57
120
|
export declare function joinGroup(groupId: string): Promise<WixGroupJoinResponse>;
|
|
58
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Leave a group as the signed-in member — POST /social-groups/v2/groups/{id}/leave.
|
|
123
|
+
*
|
|
124
|
+
* @scope member — same reasoning as `joinGroup`. Verified live.
|
|
125
|
+
*/
|
|
59
126
|
export declare function leaveGroup(groupId: string): Promise<Record<string, never>>;
|
|
60
127
|
export interface WixGroupMember {
|
|
61
128
|
/** Site member id (resolve to name/photo via the Members API). */
|
|
@@ -74,7 +141,147 @@ export interface WixQueryGroupMembersResponse {
|
|
|
74
141
|
total?: number;
|
|
75
142
|
};
|
|
76
143
|
}
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
144
|
+
/**
|
|
145
|
+
* Query a group's members — POST /social-groups-proxy/members/v2/groups/{groupId}/members/query.
|
|
146
|
+
* The members service lives behind the `members` proxy base (NOT `groups`);
|
|
147
|
+
* live-verified 2026-06-19 (the `groups` base 404s, this base returns 200).
|
|
148
|
+
*
|
|
149
|
+
* @scope member — reachable by a signed-in member session (listing a group's
|
|
150
|
+
* members is an already-working consumer-app feature); visitor/anonymous
|
|
151
|
+
* readability for a public group is unconfirmed — needsLiveProbe.
|
|
152
|
+
*/
|
|
80
153
|
export declare function queryMembers(groupId: string, limit?: number): Promise<WixQueryGroupMembersResponse>;
|
|
154
|
+
export interface WixJoinGroupRequest {
|
|
155
|
+
siteMemberId?: string;
|
|
156
|
+
contactId?: string;
|
|
157
|
+
/** No enum is pinned anywhere in the ingested spec — needsLiveProbe. */
|
|
158
|
+
status?: string;
|
|
159
|
+
requestDetails?: {
|
|
160
|
+
rejectionReason?: string;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface WixListJoinGroupRequestsResponse {
|
|
164
|
+
joinGroupRequests?: WixJoinGroupRequest[];
|
|
165
|
+
metadata?: {
|
|
166
|
+
count?: number;
|
|
167
|
+
offset?: number;
|
|
168
|
+
total?: number;
|
|
169
|
+
tooManyToCount?: boolean;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* List a group's pending join requests — GET /social-groups-proxy/join/v2/groups/{groupId}/join-requests.
|
|
174
|
+
*
|
|
175
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
176
|
+
* ingested Social Groups spec.
|
|
177
|
+
*
|
|
178
|
+
* @scope member — documented as reachable by a signed-in member whose in-group
|
|
179
|
+
* role is admin/manager (not an owner-scoped API token — see the section's "OPEN
|
|
180
|
+
* QUESTION" note); a regular member gets 403. Not independently live-probed.
|
|
181
|
+
*/
|
|
182
|
+
export declare function listJoinGroupRequests(groupId: string, limit?: number, offset?: number): Promise<WixListJoinGroupRequestsResponse>;
|
|
183
|
+
export interface WixApproveJoinGroupRequestsResponse {
|
|
184
|
+
joinGroupRequests?: WixJoinGroupRequest[];
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Approve pending join requests — POST /social-groups-proxy/join/v2/groups/{groupId}/join-requests/approve,
|
|
188
|
+
* body { groupId, memberIds }.
|
|
189
|
+
*
|
|
190
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
191
|
+
* ingested Social Groups spec.
|
|
192
|
+
*
|
|
193
|
+
* @scope member — same documented-but-unverified basis as `listJoinGroupRequests`
|
|
194
|
+
* (see the section's "OPEN QUESTION" note) — a regular member gets 403.
|
|
195
|
+
*/
|
|
196
|
+
export declare function approveJoinGroupRequests(groupId: string, memberIds: string[]): Promise<WixApproveJoinGroupRequestsResponse>;
|
|
197
|
+
export interface WixJoinGroupRequestRejection {
|
|
198
|
+
memberId: string;
|
|
199
|
+
reason?: string;
|
|
200
|
+
}
|
|
201
|
+
export interface WixRejectJoinGroupRequestsResponse {
|
|
202
|
+
joinGroupRequests?: WixJoinGroupRequest[];
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Reject pending join requests — POST /social-groups-proxy/join/v2/groups/{groupId}/join-requests/reject,
|
|
206
|
+
* body { groupId, rejections }.
|
|
207
|
+
*
|
|
208
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
209
|
+
* ingested Social Groups spec.
|
|
210
|
+
*
|
|
211
|
+
* @scope member — same documented-but-unverified basis as `listJoinGroupRequests`
|
|
212
|
+
* (see the section's "OPEN QUESTION" note) — a regular member gets 403.
|
|
213
|
+
*/
|
|
214
|
+
export declare function rejectJoinGroupRequests(groupId: string, rejections: WixJoinGroupRequestRejection[]): Promise<WixRejectJoinGroupRequestsResponse>;
|
|
215
|
+
export interface WixGroupRole {
|
|
216
|
+
value?: string;
|
|
217
|
+
}
|
|
218
|
+
export interface WixAssignRoleResponse {
|
|
219
|
+
groupId?: string;
|
|
220
|
+
memberIds?: string[];
|
|
221
|
+
role?: WixGroupRole;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Assign a role to group members — POST /social-groups-proxy/roles/v2/groups/{groupId}/roles/assign,
|
|
225
|
+
* body { groupId, memberIds, role: { value } }. `role` is a loose string, not a union: no
|
|
226
|
+
* literal role value (e.g. "ADMIN"/"MEMBER") is pinned anywhere in the ingested spec —
|
|
227
|
+
* needsLiveProbe.
|
|
228
|
+
*
|
|
229
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
230
|
+
* ingested Social Groups spec.
|
|
231
|
+
*
|
|
232
|
+
* @scope member — documented as reachable by a signed-in member whose in-group
|
|
233
|
+
* role is admin/manager, not an owner-scoped API token (see the join-request
|
|
234
|
+
* moderation section's "OPEN QUESTION" note above) — a regular member gets 403.
|
|
235
|
+
* Not independently live-probed.
|
|
236
|
+
*/
|
|
237
|
+
export declare function assignRole(groupId: string, memberIds: string[], role: string): Promise<WixAssignRoleResponse>;
|
|
238
|
+
export interface WixUnassignRoleResponse {
|
|
239
|
+
groupId?: string;
|
|
240
|
+
siteMemberIds?: string[];
|
|
241
|
+
memberIds?: string[];
|
|
242
|
+
role?: WixGroupRole;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Remove a role from group members — POST /social-groups-proxy/roles/v2/groups/{groupId}/roles/unassign,
|
|
246
|
+
* body { groupId, memberIds, role: { value } }. Same unconfirmed-enum caveat as `assignRole`.
|
|
247
|
+
*
|
|
248
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
249
|
+
* ingested Social Groups spec.
|
|
250
|
+
*
|
|
251
|
+
* @scope member — same documented-but-unverified basis as `assignRole` — a regular
|
|
252
|
+
* member gets 403.
|
|
253
|
+
*/
|
|
254
|
+
export declare function unassignRole(groupId: string, memberIds: string[], role: string): Promise<WixUnassignRoleResponse>;
|
|
255
|
+
export interface WixRemoveGroupMembersResponse {
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Remove members from a group — DELETE /social-groups-proxy/members/v2/groups/{groupId}/members,
|
|
259
|
+
* `memberIds` repeated in the QUERY STRING (`?memberIds=a&memberIds=b`), no body — every
|
|
260
|
+
* no-path-param DELETE this repo has confirmed against Wix's own generated clients sends its
|
|
261
|
+
* request that way (codegen/wix/tests/delete-query-string.test.ts); unlike a GET/HEAD body,
|
|
262
|
+
* which the gateway drops unconditionally, a DELETE body is NOT dropped — this is a convention
|
|
263
|
+
* match with Wix's own generated clients, not a gateway constraint. Same `members` proxy base
|
|
264
|
+
* `queryMembers` already live-verified (2026-06-19) uses; this specific verb+path combination
|
|
265
|
+
* is not yet live-probed.
|
|
266
|
+
*
|
|
267
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
268
|
+
* ingested Social Groups spec.
|
|
269
|
+
*
|
|
270
|
+
* @scope member — same documented-but-unverified basis as `assignRole` — a regular
|
|
271
|
+
* member gets 403.
|
|
272
|
+
*/
|
|
273
|
+
export declare function removeGroupMembers(groupId: string, memberIds: string[]): Promise<WixRemoveGroupMembersResponse>;
|
|
274
|
+
/**
|
|
275
|
+
* Update a group's settings — PATCH /social-groups-proxy/groups/v2/groups/{id} (field-mask),
|
|
276
|
+
* via the existing `updateGroup` RPC, body { group: { id, settings } }. No separate settings
|
|
277
|
+
* endpoint exists.
|
|
278
|
+
*
|
|
279
|
+
* verify-live: not yet called against a real group — path and shape come from the
|
|
280
|
+
* ingested Social Groups spec.
|
|
281
|
+
*
|
|
282
|
+
* @scope owner — rides the SAME `updateGroup` RPC that is very likely owner-token-only
|
|
283
|
+
* (see `updateGroup`'s own doc above) — reclassified from an earlier "group-admin
|
|
284
|
+
* member" assumption once `createGroup`'s owner-only finding showed group CRUD writes
|
|
285
|
+
* are gated by API-token tier, not in-group role. Not independently live-probed.
|
|
286
|
+
*/
|
|
287
|
+
export declare function updateGroupSettings(groupId: string, settings: WixGroupSettings): Promise<WixUpdateGroupResponse>;
|
|
@@ -86,6 +86,4 @@ export interface WixUpdateGroupResponse {
|
|
|
86
86
|
}
|
|
87
87
|
export interface WixDeleteGroupResponse {
|
|
88
88
|
}
|
|
89
|
-
export declare function queryGroups(req?: WixGroupsQueryRequest, opts?: WixCallOptions): Promise<WixQueryGroupsResponse>;
|
|
90
|
-
export declare function getGroup(id: string, opts?: WixCallOptions): Promise<WixGroup>;
|
|
91
89
|
export * from "./extensions.js";
|
|
@@ -62,17 +62,26 @@ export interface WixListFeedItemsResponse {
|
|
|
62
62
|
profiles?: WixFeedProfile[];
|
|
63
63
|
nextPageCursor?: string;
|
|
64
64
|
}
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
65
|
+
/**
|
|
66
|
+
* List a group's activity feed — GET
|
|
67
|
+
* https://social.wix.com/serverless/mobile/feed/v4/feedPosts (the ENRICHED read the
|
|
68
|
+
* real mobile app uses). Each item carries content (Ricos blocks), commentsCount, and
|
|
69
|
+
* reactionsList (count = length); the response's top-level `profiles[]` resolves each
|
|
70
|
+
* item's author.id → userName + profileImage. Verified live (200). Replaces the lean
|
|
71
|
+
* GET /api/v1/feed/items read, which omitted counts + author.
|
|
72
|
+
*
|
|
73
|
+
* @scope member — verified live with a signed-in member session; visitor/anonymous
|
|
74
|
+
* readability of a public group's feed is unconfirmed.
|
|
75
|
+
*/
|
|
71
76
|
export declare function listFeedItems(groupId: string, limit?: number): Promise<WixListFeedItemsResponse>;
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
77
|
+
/**
|
|
78
|
+
* Create a feed post in a group as the signed-in member — POST
|
|
79
|
+
* https://social.wix.com/api/v1/feed/items. `content` is the post text (modern
|
|
80
|
+
* posts are Ricos rich-content serialized to a string; plain text also works with
|
|
81
|
+
* contentType PLAIN_TEXT). Verified live (returns the created FeedItem).
|
|
82
|
+
*
|
|
83
|
+
* @scope member — requires a signed-in site member. Verified live.
|
|
84
|
+
*/
|
|
76
85
|
export declare function createFeedItem(groupId: string, content: string): Promise<WixFeedItem>;
|
|
77
86
|
export interface WixReactionsSummary {
|
|
78
87
|
total?: number;
|
|
@@ -81,16 +90,24 @@ export interface WixReactionsSummary {
|
|
|
81
90
|
/** The default "like" reaction is the THUMBS_UP emoji — NOT the literal "LIKE".
|
|
82
91
|
* The real client's DEFAULT_REACTION is ReactionCode.THUMBS_UP ('👍'). */
|
|
83
92
|
export declare const DEFAULT_REACTION = "\uD83D\uDC4D";
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
93
|
+
/**
|
|
94
|
+
* Like (react to) a feed item as the signed-in member. Verified live (200 →
|
|
95
|
+
* { total, reactionCodeCounts }). The real mobile app posts to the Groups
|
|
96
|
+
* mobile-serverless wrapper (NOT the raw /api/v1/reactions REST route, which
|
|
97
|
+
* 404s for the member): POST /serverless/mobile/feed/v3/addReaction with
|
|
98
|
+
* { containerId=groupId, appDefId(Groups), reactionCode(emoji), resourceId=feedItemId, mode }.
|
|
99
|
+
* Auth is the signed instance (the wixApi bridge attaches it). `mode:"APPEND"`
|
|
100
|
+
* adds without clearing other reactions. (RE'd from wix-one-app-feed
|
|
101
|
+
* feed-api.reactionPress + groups-mobile-serverless addReaction.)
|
|
102
|
+
*
|
|
103
|
+
* @scope member — requires a signed-in site member. Verified live.
|
|
104
|
+
*/
|
|
92
105
|
export declare function reactToFeedItem(feedItemId: string, groupId: string, reactionCode?: string): Promise<WixReactionsSummary>;
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
106
|
+
/**
|
|
107
|
+
* Remove the member's reaction from a feed item — POST
|
|
108
|
+
* /serverless/mobile/feed/v2/removeReaction (same body minus `mode`).
|
|
109
|
+
* Verified live (200 → total decremented).
|
|
110
|
+
*
|
|
111
|
+
* @scope member — requires a signed-in site member. Verified live.
|
|
112
|
+
*/
|
|
96
113
|
export declare function unreactFeedItem(feedItemId: string, groupId: string, reactionCode?: string): Promise<WixReactionsSummary>;
|
|
@@ -26,6 +26,7 @@ export type WixMediaSlot = string | {
|
|
|
26
26
|
export declare function mediaSlotUrl(value: WixMediaSlot | undefined, size?: WixImageSize | null): string;
|
|
27
27
|
export interface StoreProduct {
|
|
28
28
|
id?: string;
|
|
29
|
+
productType?: string;
|
|
29
30
|
name?: string;
|
|
30
31
|
slug?: string;
|
|
31
32
|
description?: string;
|
|
@@ -104,20 +104,36 @@ function listMyPlanOrders(opts = {}) {
|
|
|
104
104
|
|
|
105
105
|
// ../../stdlib/flows/checkout/src/index.ts
|
|
106
106
|
var GRANTS_ACCESS = "ACTIVE";
|
|
107
|
-
async function
|
|
107
|
+
async function activePlanIds() {
|
|
108
|
+
const ids = /* @__PURE__ */ new Set();
|
|
109
|
+
const pages = /* @__PURE__ */ new Set();
|
|
110
|
+
for (let offset = 0; ; offset += 50) {
|
|
111
|
+
const response = await listMyPlanOrders({ statuses: [GRANTS_ACCESS], limit: 50, offset });
|
|
112
|
+
const orders = response.orders ?? [];
|
|
113
|
+
const signature = JSON.stringify(orders);
|
|
114
|
+
if (pages.has(signature)) throw new Error("Active plan order pagination did not advance.");
|
|
115
|
+
pages.add(signature);
|
|
116
|
+
for (const order of orders) if (order.status === GRANTS_ACCESS && order.planId) ids.add(order.planId);
|
|
117
|
+
if (orders.length < 50) break;
|
|
118
|
+
}
|
|
119
|
+
return [...ids];
|
|
120
|
+
}
|
|
121
|
+
async function entitlement(planId) {
|
|
108
122
|
try {
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
const pages = /* @__PURE__ */ new Set();
|
|
124
|
+
for (let offset = 0; ; offset += 50) {
|
|
125
|
+
const res = await listMyPlanOrders({ statuses: [GRANTS_ACCESS], limit: 50, offset });
|
|
126
|
+
const orders = res.orders ?? [];
|
|
127
|
+
const page = JSON.stringify(orders.map((order) => [order.id, order.planId, order.status]));
|
|
128
|
+
if (orders.length === 50 && pages.has(page)) break;
|
|
129
|
+
pages.add(page);
|
|
130
|
+
const active = orders.find((order) => order.status === GRANTS_ACCESS && (!planId || order.planId === planId));
|
|
131
|
+
if (active) return { entitled: true, planName: active.planName ?? "", planId: active.planId ?? "" };
|
|
132
|
+
if (orders.length < 50) break;
|
|
133
|
+
}
|
|
118
134
|
} catch {
|
|
119
|
-
return { entitled: false, planName: "", planId: "" };
|
|
120
135
|
}
|
|
136
|
+
return { entitled: false, planName: "", planId: "" };
|
|
121
137
|
}
|
|
122
138
|
async function isEntitled() {
|
|
123
139
|
return (await entitlement()).entitled;
|
|
@@ -129,7 +145,7 @@ async function payOrder(req) {
|
|
|
129
145
|
}
|
|
130
146
|
const availability = await isAvailable().catch(() => "unavailable");
|
|
131
147
|
if (availability === "full" && req.snapshotId) {
|
|
132
|
-
if (req.mayCharge?.() === false) return WITHDRAWN;
|
|
148
|
+
if (await req.mayCharge?.() === false) return WITHDRAWN;
|
|
133
149
|
const r = await proceedToPayment({
|
|
134
150
|
appId: req.appId,
|
|
135
151
|
snapshotId: req.snapshotId,
|
|
@@ -150,7 +166,7 @@ async function payOrder(req) {
|
|
|
150
166
|
if (req.cashierUrl) {
|
|
151
167
|
const url = await req.cashierUrl().catch(() => void 0);
|
|
152
168
|
if (url) {
|
|
153
|
-
if (req.mayCharge?.() === false) return WITHDRAWN;
|
|
169
|
+
if (await req.mayCharge?.() === false) return WITHDRAWN;
|
|
154
170
|
const opened = await open(url, "in_app_browser").catch(() => ({ opened: false }));
|
|
155
171
|
if (opened.opened) return { kind: "handoff" };
|
|
156
172
|
}
|
|
@@ -162,6 +178,7 @@ async function payOrder(req) {
|
|
|
162
178
|
}
|
|
163
179
|
export {
|
|
164
180
|
GRANTS_ACCESS,
|
|
181
|
+
activePlanIds,
|
|
165
182
|
entitlement,
|
|
166
183
|
isEntitled,
|
|
167
184
|
payOrder as payCashierOrder,
|