@wix/himalaya-cli 0.1309.0 → 0.1310.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/iap/src/delivery-contract.d.ts +3 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/delivery.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/host-session.d.ts +31 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +19 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-wire.d.ts +2 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments.d.ts +11 -12
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +17 -9
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +6 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +119 -65
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +117 -35
- package/dist/cli.mjs +22 -21
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/qa-builds.md +16 -12
- package/guides/sdk-reference.json +61 -25
- package/package.json +2 -2
|
@@ -1638,13 +1638,13 @@
|
|
|
1638
1638
|
"name": "PurchaseContext",
|
|
1639
1639
|
"kind": "interface",
|
|
1640
1640
|
"jsdoc": "/** A catalog item resolved by the backend for the captured member. */",
|
|
1641
|
-
"decl": "export interface PurchaseContext {\n productId: string;\n /** Canonical UUID
|
|
1641
|
+
"decl": "export interface PurchaseContext {\n productId: string;\n /** Canonical UUID for this one sale (D61: a per-payment purchase intent, not the member). */\n appAccountToken: string;\n /** Opaque site/member scope the acknowledgement must echo. */\n scopeKey: string;\n}"
|
|
1642
1642
|
},
|
|
1643
1643
|
{
|
|
1644
1644
|
"name": "MemberContext",
|
|
1645
1645
|
"kind": "interface",
|
|
1646
|
-
"jsdoc": "/** The current member's
|
|
1647
|
-
"decl": "export interface MemberContext {\n
|
|
1646
|
+
"jsdoc": "/** The current member's scope, used to recover purchases without a catalog item. It names no\n * token: each payment has its own, and the backend decides whose a transaction is. */",
|
|
1647
|
+
"decl": "export interface MemberContext {\n scopeKey: string;\n}"
|
|
1648
1648
|
},
|
|
1649
1649
|
{
|
|
1650
1650
|
"name": "ContextResult",
|
|
@@ -1722,7 +1722,7 @@
|
|
|
1722
1722
|
"name": "PurchaseCoordinatorDependencies",
|
|
1723
1723
|
"kind": "interface",
|
|
1724
1724
|
"jsdoc": "",
|
|
1725
|
-
"decl": "export interface PurchaseCoordinatorDependencies {\n store: TransactionStore;\n backend: DeliveryBackend;\n session: SessionProvider;\n clock: Clock;\n /** Extra milliseconds added to a backoff step; inject for deterministic tests. */\n jitter?: (baseDelayMs: number) => number;\n /** Receives a fresh safe snapshot after every change. */\n onState?: (state: DeliveryState) => void;\n}"
|
|
1725
|
+
"decl": "export interface PurchaseCoordinatorDependencies {\n store: TransactionStore;\n backend: DeliveryBackend;\n session: SessionProvider;\n clock: Clock;\n /** Extra milliseconds added to a backoff step; inject for deterministic tests. */\n jitter?: (baseDelayMs: number) => number;\n /** Receives a fresh safe snapshot after every change. */\n onState?: (state: DeliveryState) => void;\n /** Called inside the purchase job when StoreKit defers for Ask to Buy, after the unfinished\n * queue has been listed and before the job returns. The next queued purchase has not started. */\n onAwaitingApproval?: (productId: string) => void;\n}"
|
|
1726
1726
|
},
|
|
1727
1727
|
{
|
|
1728
1728
|
"name": "PurchaseCoordinator",
|
|
@@ -1946,11 +1946,17 @@
|
|
|
1946
1946
|
"jsdoc": "/** Where the Payments service is reachable through the Wix gateway. */",
|
|
1947
1947
|
"decl": "export interface WixIapRoute {\n /** The gateway path that maps to the service's `/v1`, without a trailing slash. No public route\n * was in the generated gateway metadata on 2026-10-08, so there is deliberately no default. */\n prefix: string;\n}"
|
|
1948
1948
|
},
|
|
1949
|
+
{
|
|
1950
|
+
"name": "HostCallExpectation",
|
|
1951
|
+
"kind": "interface",
|
|
1952
|
+
"jsdoc": "/** Captured when a protected call starts. The native bridge checks it and never puts it on\n * the HTTP request. */",
|
|
1953
|
+
"decl": "export interface HostCallExpectation {\n generation: number;\n kind: \"member\";\n memberId: string;\n siteId: string;\n appId: string;\n}"
|
|
1954
|
+
},
|
|
1949
1955
|
{
|
|
1950
1956
|
"name": "WixTransport",
|
|
1951
1957
|
"kind": "interface",
|
|
1952
|
-
"jsdoc": "/** The host's Wix REST bridge (`himalaya.wixApi`). Resolves the parsed body of a 2xx and\n * rejects with `HTTP <status> [<code>]: <message>` otherwise. Credentials are attached\n * natively, never in TypeScript. */",
|
|
1953
|
-
"decl": "export interface WixTransport {\n call(method: \"GET\" | \"POST\"
|
|
1958
|
+
"jsdoc": "/** The host's Wix REST bridge (`himalaya.wixApi`). Resolves the parsed body of a 2xx and\n * rejects with `HTTP <status> [<code>]: <message>` otherwise. Credentials are attached\n * natively, never in TypeScript. `expectation` is bridge metadata, not a header. */",
|
|
1959
|
+
"decl": "export interface WixTransport {\n call(\n method: \"GET\" | \"POST\",\n path: string,\n body?: unknown,\n headers?: Record<string, string>,\n expectation?: HostCallExpectation,\n ): Promise<unknown>;\n}"
|
|
1954
1960
|
},
|
|
1955
1961
|
{
|
|
1956
1962
|
"name": "MemberIdentitySource",
|
|
@@ -1974,7 +1980,7 @@
|
|
|
1974
1980
|
"name": "WixIapOperation",
|
|
1975
1981
|
"kind": "type",
|
|
1976
1982
|
"jsdoc": "",
|
|
1977
|
-
"decl": "export type WixIapOperation = \"startPayment\" | \"completePayment\" | \"
|
|
1983
|
+
"decl": "export type WixIapOperation = \"startPayment\" | \"completePayment\" | \"getPayment\";"
|
|
1978
1984
|
},
|
|
1979
1985
|
{
|
|
1980
1986
|
"name": "StartPaymentErrorCode",
|
|
@@ -1986,13 +1992,7 @@
|
|
|
1986
1992
|
"name": "CompletePaymentErrorCode",
|
|
1987
1993
|
"kind": "type",
|
|
1988
1994
|
"jsdoc": "",
|
|
1989
|
-
"decl": "export type CompletePaymentErrorCode = \"INVALID_PURCHASE\" | \"OWNED_BY_ANOTHER_CUSTOMER\" | \"PURCHASE_REVOKED\"\n | \"NOT_PURCHASED\" | \"ZERO_PRICE\" | \"NO_MATCHING_PAYMENT\" | \"APP_NOT_CONFIGURED\";"
|
|
1990
|
-
},
|
|
1991
|
-
{
|
|
1992
|
-
"name": "GetCustomerIdErrorCode",
|
|
1993
|
-
"kind": "type",
|
|
1994
|
-
"jsdoc": "",
|
|
1995
|
-
"decl": "export type GetCustomerIdErrorCode = \"APP_NOT_CONFIGURED\";"
|
|
1995
|
+
"decl": "export type CompletePaymentErrorCode = \"INVALID_PURCHASE\" | \"OWNED_BY_ANOTHER_CUSTOMER\" | \"PURCHASE_REVOKED\"\n | \"NOT_PURCHASED\" | \"ZERO_PRICE\" | \"NO_MATCHING_PAYMENT\" | \"PAYMENT_NOT_PENDING\" | \"APP_NOT_CONFIGURED\";"
|
|
1996
1996
|
},
|
|
1997
1997
|
{
|
|
1998
1998
|
"name": "GetPaymentErrorCode",
|
|
@@ -2015,21 +2015,15 @@
|
|
|
2015
2015
|
{
|
|
2016
2016
|
"name": "StartPaymentResult",
|
|
2017
2017
|
"kind": "type",
|
|
2018
|
-
"jsdoc": "/** `
|
|
2019
|
-
"decl": "export type StartPaymentResult =\n | { status: \"started\"; payment: WixIapPayment; storeProductId: string;
|
|
2018
|
+
"jsdoc": "/** `appAccountToken` goes to StoreKit with the purchase. It is minted for this one payment (a\n * purchase intent, D61), not the member: StartPayment for the same Wix transaction again returns\n * the same payment and the same token. Keep it out of screen state. */",
|
|
2019
|
+
"decl": "export type StartPaymentResult =\n | { status: \"started\"; payment: WixIapPayment; storeProductId: string; appAccountToken: string }\n | WixIapFailure<StartPaymentErrorCode>;"
|
|
2020
2020
|
},
|
|
2021
2021
|
{
|
|
2022
2022
|
"name": "CompletePaymentResult",
|
|
2023
2023
|
"kind": "type",
|
|
2024
|
-
"jsdoc": "/** `matched`: the server verified the proof and
|
|
2024
|
+
"jsdoc": "/** `matched`: the server verified the proof and paid the payment whose token the Apple transaction\n * carries. Its status may still be `approving`. */",
|
|
2025
2025
|
"decl": "export type CompletePaymentResult = { status: \"matched\"; payment: WixIapPayment } | WixIapFailure<CompletePaymentErrorCode>;"
|
|
2026
2026
|
},
|
|
2027
|
-
{
|
|
2028
|
-
"name": "CustomerIdResult",
|
|
2029
|
-
"kind": "type",
|
|
2030
|
-
"jsdoc": "",
|
|
2031
|
-
"decl": "export type CustomerIdResult = { status: \"found\"; customerId: string } | WixIapFailure<GetCustomerIdErrorCode>;"
|
|
2032
|
-
},
|
|
2033
2027
|
{
|
|
2034
2028
|
"name": "GetPaymentResult",
|
|
2035
2029
|
"kind": "type",
|
|
@@ -2047,16 +2041,58 @@
|
|
|
2047
2041
|
"name": "WixIapClient",
|
|
2048
2042
|
"kind": "interface",
|
|
2049
2043
|
"jsdoc": "",
|
|
2050
|
-
"decl": "export interface WixIapClient {\n /** StartPayment for a pending `appleIAP` Wix Payments transaction the member placed. Returns the\n * store product to sell and
|
|
2044
|
+
"decl": "export interface WixIapClient {\n /** StartPayment for a pending `appleIAP` Wix Payments transaction the member placed. Returns the\n * store product to sell and this payment's `appAccountToken` to pass to StoreKit. */\n startPayment(input: { wixTransactionId: string }): Promise<StartPaymentResult>;\n /** CompletePayment with held Apple proof, sent unchanged: the service pays the payment whose\n * token the transaction carries. Success can still be `approving`. */\n completePayment(transaction: AppleTransaction): Promise<CompletePaymentResult>;\n /** GetPayment: one of the member's own Payments. */\n getPayment(input: { paymentId: string }): Promise<GetPaymentResult>;\n}",
|
|
2051
2045
|
"verified": false
|
|
2052
2046
|
},
|
|
2053
2047
|
{
|
|
2054
2048
|
"name": "createWixIapClient",
|
|
2055
2049
|
"kind": "function",
|
|
2056
|
-
"jsdoc": "/**\n * Creates a client for Wix's in-app-purchase payments service (`mobile-apps-wix-iap`), which pays\n * a Wix order with a store purchase the member makes in the app.\n *\n * NOT ENABLED and not production-ready. No app wires it, and no call reaches the service: it has\n * no public gateway route yet, so `route` must be supplied and there is no default. It calls\n * StartPayment (`POST …/payments/start`), CompletePayment (`POST …/payments/complete`)
|
|
2050
|
+
"jsdoc": "/**\n * Creates a client for Wix's in-app-purchase payments service (`mobile-apps-wix-iap`), which pays\n * a Wix order with a store purchase the member makes in the app.\n *\n * NOT ENABLED and not production-ready. No app wires it, and no call reaches the service: it has\n * no public gateway route yet, so `route` must be supplied and there is no default. It calls\n * StartPayment (`POST …/payments/start`), CompletePayment (`POST …/payments/complete`)\n * and GetPayment (`GET …/payments/{id}`) through the\n * `wix_api` bridge. A matched or approved Payment is not durable access and never finishes the\n * store transaction.\n *\n * Production use stays blocked: there is no public route or member authorization on the service,\n * no trusted app-binding source, and checkout stays disabled. When this client uses the host\n * bridge, it also requires the host's identity clock and passes that captured expectation\n * through the bridge. An injected transport keeps the previous call shape unless the session\n * itself exposes an identity.\n */",
|
|
2057
2051
|
"decl": "export function createWixIapClient(deps: WixIapClientDependencies): WixIapClient;",
|
|
2058
2052
|
"verified": false
|
|
2059
2053
|
},
|
|
2054
|
+
{
|
|
2055
|
+
"name": "HostSessionView",
|
|
2056
|
+
"kind": "interface",
|
|
2057
|
+
"jsdoc": "",
|
|
2058
|
+
"decl": "export interface HostSessionView extends SessionSnapshot {\n memberId: string | null;\n siteId: string | null;\n appId: string | null;\n ready: boolean;\n epoch: number;\n}"
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"name": "HostIdentitySource",
|
|
2062
|
+
"kind": "interface",
|
|
2063
|
+
"jsdoc": "/** A session provider that can also name the principal captured for one generation. */",
|
|
2064
|
+
"decl": "export interface HostIdentitySource {\n readonly identityBound: boolean;\n identity(session: SessionSnapshot): HostCallExpectation | null;\n}"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"name": "HostSessionProvider",
|
|
2068
|
+
"kind": "interface",
|
|
2069
|
+
"jsdoc": "",
|
|
2070
|
+
"decl": "export interface HostSessionProvider extends SessionProvider, HostIdentitySource {}"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
"name": "createHostSession",
|
|
2074
|
+
"kind": "function",
|
|
2075
|
+
"jsdoc": "/** Wraps a host session clock as the session provider the delivery coordinator and the wix-iap\n * client share. Ignores a generation older than the last one read, and keeps the first member\n * expectation captured for each generation for `identity()`. */",
|
|
2076
|
+
"decl": "export function createHostSession(source: {\n identityBound: boolean;\n current(): unknown;\n subscribe(listener: () => void): () => void;\n}): HostSessionProvider;"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"name": "hostSessionFromGlobal",
|
|
2080
|
+
"kind": "function",
|
|
2081
|
+
"jsdoc": "/** The session on `globalThis.himalaya`. Web publishes `identityBound: false`. */",
|
|
2082
|
+
"decl": "export function hostSessionFromGlobal(): HostSessionProvider;"
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
"name": "memberIdentityOf",
|
|
2086
|
+
"kind": "function",
|
|
2087
|
+
"jsdoc": "/** The member a host session names for a captured generation, as the identity port the Apple-IAP\n * checkout and the wix-iap client take: null when that generation has no signed-in member. */",
|
|
2088
|
+
"decl": "export function memberIdentityOf(source: HostIdentitySource): MemberIdentitySource;"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"name": "readIdentityBound",
|
|
2092
|
+
"kind": "function",
|
|
2093
|
+
"jsdoc": "/** Whether the host fences protected calls to the captured member (`identityBound`). Web does not. */",
|
|
2094
|
+
"decl": "export function readIdentityBound(): boolean;"
|
|
2095
|
+
},
|
|
2060
2096
|
{
|
|
2061
2097
|
"name": "ProductType",
|
|
2062
2098
|
"kind": "type",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1310.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "aed0d12edf97361177bd9f7e6ba033b9cce8f83615824cd195882dbf"
|
|
75
75
|
}
|