@wix/himalaya-cli 0.1374.0 → 0.1376.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +11 -3
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/checkout-source.d.ts +5 -2
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/index.d.ts +1 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/extensions.d.ts +1 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts +248 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +6 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +3 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2 -1
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-async-jobs.mjs +34 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
  11. package/dist/cli.mjs +1428 -637
  12. package/dist/preview-assets.generated.bin +0 -0
  13. package/guides/getting-started.md +23 -0
  14. package/guides/himi-json-output.md +42 -0
  15. package/guides/himi-skill.md +23 -0
  16. package/guides/iap-screen-adoption.md +7 -5
  17. package/guides/importable-sdks.md +1 -0
  18. package/guides/index.json +42 -0
  19. package/guides/one-app-business-fetch.md +81 -0
  20. package/guides/one-app-business-object.md +258 -0
  21. package/guides/one-app-reference.md +55 -0
  22. package/guides/one-app-section-mappings.md +381 -0
  23. package/guides/one-app-structure.md +453 -0
  24. package/guides/one-app-to-himi-app.md +305 -0
  25. package/guides/one-app-viewer.md +401 -0
  26. package/guides/release-notes.md +10 -0
  27. package/guides/sdk-reference.json +314 -4
  28. package/guides/skill.md +24 -1
  29. package/package.json +2 -2
  30. package/template-icons/base44-podcast.png +0 -0
  31. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -5
  32. package/templates/beauty-salon-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  33. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +14 -3
  34. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  35. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -5
  36. package/templates/community-club-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  37. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +14 -3
  38. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  39. package/templates/events-meetups-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  40. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +14 -3
  41. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  42. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -5
  43. package/templates/gym-fitness-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  44. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +14 -3
  45. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  46. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  47. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +14 -3
  48. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  49. package/templates/owner-lite/tier5-src/_shared/aria-async-jobs.ts +10 -0
  50. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +14 -3
  51. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  52. package/templates/podcast-creator-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  53. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +14 -3
  54. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  55. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -5
  56. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  57. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +14 -3
  58. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  59. package/templates/restaurant-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  60. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +14 -3
  61. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  62. package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -5
  63. package/templates/retail-store-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  64. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +14 -3
  65. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  66. package/templates/yoga-studio-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  67. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +14 -3
  68. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
@@ -41,11 +41,18 @@ export interface AppleSaleRule {
41
41
  * Whether Wix Stores items sell through the App Store, through wix-iap StartItemPayment
42
42
  * (catalyst-server #24496), which places the member's eCom order for one catalog item. OFF: that RPC
43
43
  * is not deployed, the member's identity across Serve → wix-iap → eCom is unproven, and a paid Stores
44
- * order is not yet proven to deliver the download. The one switch: it adds the Stores rule to
45
- * `APPLE_SALE_RULES`, which the mapping source and `himi store iap connect` read, and turns on the
46
- * checkout's path (`itemPaymentEnabled` in @himalaya/iap-checkout).
44
+ * order is not yet proven to deliver the download. Enabling this also enables the Stores rule in
45
+ * `APPLE_SALE_RULES` and selects `itemPaymentEnabled` in @himalaya/iap-checkout.
47
46
  */
48
47
  export declare const STORES_ITEM_PAYMENT_ENABLED = false;
48
+ /**
49
+ * Whether Wix Stores items sell through the App Store at all: the Stores rule in `APPLE_SALE_RULES`
50
+ * and the product screen's Buy. With StartItemPayment off, a sale uses the app's own order: an eCom
51
+ * checkout and order, its `appleIAP` cashier charge, then StartPayment. ON for mapped digital
52
+ * products. Member checkout, the eCom IAP flag, cashier item identity and digital fulfillment
53
+ * remain unverified in Sandbox.
54
+ */
55
+ export declare const STORES_APPLE_SALES_ENABLED = true;
49
56
  /** StartItemPayment's CatalogReference: the purchases catalog sells a Stores product under its product
50
57
  * id (eCom's `catalogItemId`). One-time unlocks only, whatever the backend also accepts. */
51
58
  export declare const STORES_PRODUCT_SALE_RULE: AppleSaleRule;
@@ -59,6 +66,7 @@ export declare const PRICING_PLAN_APPLE_SALES_ENABLED = false;
59
66
  * Wix Stores and one-time unlimited Pricing Plans join only with their independent switches.
60
67
  */
61
68
  export declare function appleSaleRules(options?: {
69
+ storesAppleSalesEnabled?: boolean;
62
70
  storesItemPaymentEnabled?: boolean;
63
71
  pricingPlanAppleSalesEnabled?: boolean;
64
72
  }): Readonly<Record<string, AppleSaleRule>>;
@@ -6,8 +6,11 @@ export declare function appleIapCheckoutEnabled(): boolean;
6
6
  /**
7
7
  * Whether an item whose adapter names it in eCom's catalog (a Wix Stores product) is paid through
8
8
  * wix-iap StartItemPayment, which places the member's eCom order server-side. The same switch as
9
- * the Stores sale rule (`STORES_ITEM_PAYMENT_ENABLED`, @himalaya/iap), so Stores items reach an App
10
- * Store route only when this path sells them. Turning it off again stops only new attempts: stored
9
+ * `STORES_ITEM_PAYMENT_ENABLED` in @himalaya/iap; otherwise an enabled Stores sale uses the app's
10
+ * own order. Turning it off again stops only new attempts: stored
11
11
  * ones are still held, completed and tracked (docs/iap-wix-checkout.md).
12
12
  */
13
13
  export declare function itemPaymentEnabled(): boolean;
14
+ /** Whether Wix Stores items sell through the App Store, by either path: StartItemPayment when
15
+ * `itemPaymentEnabled`, otherwise the app's own eCom order (`STORES_APPLE_SALES_ENABLED`). */
16
+ export declare function storesAppleSalesEnabled(): boolean;
@@ -3,6 +3,6 @@ export { iapPurchaseFields } from "./purchase-fields.js";
3
3
  export { createAppleIapCheckout } from "./apple-iap.js";
4
4
  export { onlineProgramOrders, pricingPlanOrders, storesProductOrders, classifyCart } from "./iap-verticals/index.js";
5
5
  export { createWorkerOrderRefStore } from "./order-refs.js";
6
- export { itemPaymentEnabled } from "./checkout-source.js";
6
+ export { itemPaymentEnabled, storesAppleSalesEnabled } from "./checkout-source.js";
7
7
  export type { AccessRead, AppleIapCheckout, AppleIapCheckoutDependencies, AppleIapCheckoutPhase, AppleIapCheckoutState, BridgeOutcome, BridgeRefusal, CashierRoute, IapEligibility, IapOrderAdapter, IapOrderItem, OrderAttempt, OrderFailureCode, OrderPartitionKey, OrderRef, OrderRefPartition, OrderRefStage, OrderRefStore, PaymentAccess, PaymentProgress, SessionBoundBridge, VerticalRef, WixBridge, } from "./apple-iap-contract.js";
8
8
  export type { AppleIapCheckoutRoutes, IapCommerce, IapCommerceOptions, IapPurchaseCopy, IapPurchaseFields, IapPurchaseGap, IapPurchaseReadiness, } from "./commerce-contract.js";
@@ -0,0 +1,248 @@
1
+ declare global {
2
+ var himalaya: {
3
+ wixApi?: {
4
+ call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ };
6
+ };
7
+ }
8
+ /** Per-call options. `site` addresses ONE call at a business other than the app's
9
+ * active one, so a cross-site rollup can read several businesses concurrently without
10
+ * `setActiveSite` moving the whole process between them. Omitted ⇒ the active business,
11
+ * byte-identical to a call that never passed options.
12
+ *
13
+ * `site.forSite(msid)` from `@himalaya/wix-platform` returns a value of this shape, so
14
+ * it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
15
+ export interface WixCallOptions {
16
+ site?: string;
17
+ }
18
+ /** Send a typed request through the host's authenticated Wix API bridge.
19
+ * The host supplies the owner session; callers supply the HTTP method, gateway path and optional body.
20
+ * Rejects if the bridge is unavailable or the service returns an error.
21
+ * @scope owner — uses the active business owner session. */
22
+ export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
23
+ export interface WixAccountInfo {
24
+ accountId?: string;
25
+ parentAccountId?: string;
26
+ siteId?: string;
27
+ }
28
+ export interface WixIdentificationData {
29
+ anonymousVisitorId?: string;
30
+ memberId?: string;
31
+ wixUserId?: string;
32
+ appId?: string;
33
+ identityType?: unknown;
34
+ }
35
+ export interface WixIdentificationDataIdOneOf {
36
+ anonymousVisitorId?: string;
37
+ memberId?: string;
38
+ wixUserId?: string;
39
+ appId?: string;
40
+ }
41
+ export interface WixMessageEnvelope {
42
+ instanceId?: string;
43
+ eventType?: string;
44
+ identity?: WixIdentificationData;
45
+ data?: string;
46
+ accountInfo?: WixAccountInfo;
47
+ }
48
+ export interface WixApplicationError {
49
+ code?: string;
50
+ description?: string;
51
+ data?: Record<string, unknown>;
52
+ }
53
+ export interface WixCursorPaging {
54
+ limit?: number;
55
+ cursor?: string;
56
+ }
57
+ export interface WixActionEvent {
58
+ bodyAsJson?: string;
59
+ }
60
+ export interface WixDomainEvent {
61
+ createdEvent?: WixEntityCreatedEvent;
62
+ updatedEvent?: WixEntityUpdatedEvent;
63
+ deletedEvent?: WixEntityDeletedEvent;
64
+ actionEvent?: WixActionEvent;
65
+ id?: string;
66
+ entityFqdn?: string;
67
+ slug?: string;
68
+ entityId?: string;
69
+ eventTime?: string;
70
+ triggeredByAnonymizeRequest?: boolean;
71
+ originatedFrom?: string;
72
+ entityEventSequence?: string;
73
+ }
74
+ export interface WixDomainEventBodyOneOf {
75
+ createdEvent?: WixEntityCreatedEvent;
76
+ updatedEvent?: WixEntityUpdatedEvent;
77
+ deletedEvent?: WixEntityDeletedEvent;
78
+ actionEvent?: WixActionEvent;
79
+ }
80
+ export interface WixEntityCreatedEvent {
81
+ entityAsJson?: string;
82
+ triggeredByUndelete?: boolean;
83
+ restoreInfo?: WixRestoreInfo;
84
+ additionalMetadataAsJson?: string;
85
+ }
86
+ export interface WixEntityDeletedEvent {
87
+ movedToTrash?: boolean;
88
+ deletedEntityAsJson?: string;
89
+ additionalMetadataAsJson?: string;
90
+ }
91
+ export interface WixEntityUpdatedEvent {
92
+ currentEntityAsJson?: string;
93
+ previousEntityAsJson?: string;
94
+ modifiedFields?: Record<string, unknown>;
95
+ additionalMetadataAsJson?: string;
96
+ }
97
+ export interface WixRestoreInfo {
98
+ deletedDate?: string;
99
+ }
100
+ export interface WixAsyncJob {
101
+ id?: string;
102
+ metadata?: Record<string, unknown>;
103
+ status?: unknown;
104
+ counters?: WixCounters;
105
+ createdDate?: string;
106
+ updatedDate?: string;
107
+ owner?: WixOwner;
108
+ createdBy?: WixCreatedBy;
109
+ counts?: WixCounts;
110
+ }
111
+ export interface WixCounters {
112
+ itemsToProcess?: number;
113
+ itemsSucceeded?: number;
114
+ itemsFailed?: number;
115
+ errorCountByCode?: Record<string, number>;
116
+ }
117
+ export interface WixCounts {
118
+ total?: number;
119
+ successCount?: number;
120
+ failCount?: number;
121
+ errorByCodeCount?: Record<string, number>;
122
+ }
123
+ export interface WixCreatedBy {
124
+ anonymousVisitorIdOptions?: WixAnonymousVisitorIdOptions;
125
+ memberIdOptions?: WixMemberIdOptions;
126
+ wixUserIdOptions?: WixUserIdOptions;
127
+ appIdOptions?: WixAppIdOptions;
128
+ type?: unknown;
129
+ }
130
+ export interface WixCreatedByOptionsOneOf {
131
+ anonymousVisitorIdOptions?: WixAnonymousVisitorIdOptions;
132
+ memberIdOptions?: WixMemberIdOptions;
133
+ wixUserIdOptions?: WixUserIdOptions;
134
+ appIdOptions?: WixAppIdOptions;
135
+ }
136
+ export interface WixAnonymousVisitorIdOptions {
137
+ anonymousVisitorId?: string;
138
+ }
139
+ export interface WixAppIdOptions {
140
+ appId?: string;
141
+ }
142
+ export interface WixMemberIdOptions {
143
+ memberId?: string;
144
+ }
145
+ export interface WixUserIdOptions {
146
+ wixUserId?: string;
147
+ }
148
+ export interface WixOwner {
149
+ anonymousVisitorId?: string;
150
+ memberId?: string;
151
+ wixUserId?: string;
152
+ appId?: string;
153
+ serviceId?: string;
154
+ }
155
+ export interface WixOwnerIdOneOf {
156
+ anonymousVisitorId?: string;
157
+ memberId?: string;
158
+ wixUserId?: string;
159
+ appId?: string;
160
+ serviceId?: string;
161
+ }
162
+ export interface WixAsyncJobFailedEvent {
163
+ jobId?: string;
164
+ }
165
+ export interface WixAsyncJobFinishedEvent {
166
+ jobId?: string;
167
+ }
168
+ export interface WixAsyncJobItem {
169
+ id?: string;
170
+ data?: Record<string, unknown>;
171
+ entityId?: string;
172
+ success?: boolean;
173
+ error?: WixApplicationError;
174
+ }
175
+ export interface WixAsyncJobItemAddedEvent {
176
+ jobId?: string;
177
+ jobItem?: WixAsyncJobItem;
178
+ }
179
+ export interface WixAsyncJobItemFailedEvent {
180
+ jobId?: string;
181
+ jobItem?: WixAsyncJobItem;
182
+ }
183
+ export interface WixCompleteAsyncJobRequest {
184
+ jobId: string;
185
+ status?: unknown;
186
+ }
187
+ export interface WixCompleteAsyncJobResponse {
188
+ }
189
+ export interface WixCreateAsyncJobRequest {
190
+ job: WixAsyncJob;
191
+ }
192
+ export interface WixCreateAsyncJobResponse {
193
+ job?: WixAsyncJob;
194
+ }
195
+ export interface WixDeleteAsyncJobRequest {
196
+ jobId: string;
197
+ }
198
+ export interface WixDeleteAsyncJobResponse {
199
+ }
200
+ export interface WixGetAsyncJobRequest {
201
+ jobId: string;
202
+ }
203
+ export interface WixGetAsyncJobResponse {
204
+ job?: WixAsyncJob;
205
+ }
206
+ export interface WixListAsyncJobItemsRequest {
207
+ jobId: string;
208
+ paging?: WixCursorPaging;
209
+ hasError?: boolean;
210
+ statusFilter?: unknown;
211
+ }
212
+ export interface WixListAsyncJobItemsResponse {
213
+ results?: WixAsyncJobItem[];
214
+ pagingMetadata?: WixPagingMetadataV2;
215
+ }
216
+ export interface WixReportAsyncJobProgressRequest {
217
+ jobId: string;
218
+ items?: WixAsyncJobItem[];
219
+ }
220
+ export interface WixReportAsyncJobProgressResponse {
221
+ }
222
+ export interface WixUpdateAsyncJobRequest {
223
+ job?: WixAsyncJob;
224
+ mask?: string[];
225
+ }
226
+ export interface WixUpdateAsyncJobResponse {
227
+ job?: WixAsyncJob;
228
+ }
229
+ export interface WixCursors {
230
+ next?: string;
231
+ prev?: string;
232
+ }
233
+ export interface WixPagingMetadataV2 {
234
+ count?: number;
235
+ cursors?: WixCursors;
236
+ hasNext?: boolean;
237
+ }
238
+ /**
239
+ * Read the current state of an async job created by an owner action. Pass its non-empty jobId. The operation requires the administration permission INFRA.ASYNC_JOB_READ. INITIALIZED and PROCESSING are pending; FINISHED and FAILED are terminal. A missing job field is not a completed job. An unknown job rejects with HTTP 404 and JOB_NOT_FOUND; transport errors reject and may be retried.
240
+ *
241
+ * The service REQUIRES `jobId`; a call without it is rejected outright.
242
+ *
243
+ * @scope owner — requires an owner / business identity — a visitor session gets 403.
244
+ *
245
+ * GET /async-jobs/v1/async-jobs/{jobId}
246
+ */
247
+ export declare function getAsyncJob(jobId: string, opts?: WixCallOptions): Promise<WixGetAsyncJobResponse>;
248
+ export * from "./extensions.js";
@@ -686,6 +686,7 @@ var sameReference = (value, reference) => isObject2(value) && value.kind === ref
686
686
  // ../../core/sdk/iap/src/wix-payments-contract.ts
687
687
  var HIMALAYA_SERVE_IAP_ROUTE = { prefix: "/himalaya-serve/v1/iap" };
688
688
  var STORES_ITEM_PAYMENT_ENABLED = false;
689
+ var STORES_APPLE_SALES_ENABLED = true;
689
690
  var STORES_PRODUCT_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
690
691
  var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
691
692
  var PRICING_PLAN_APPLE_SALES_ENABLED = false;
@@ -693,7 +694,7 @@ var PRICING_PLAN_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSU
693
694
  function appleSaleRules(options = {}) {
694
695
  return {
695
696
  onlineProgram: ONLINE_PROGRAM_SALE_RULE,
696
- ...options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
697
+ ...(options.storesAppleSalesEnabled ?? STORES_APPLE_SALES_ENABLED) || (options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED) ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
697
698
  ...options.pricingPlanAppleSalesEnabled ?? PRICING_PLAN_APPLE_SALES_ENABLED ? { pricingPlan: PRICING_PLAN_SALE_RULE } : {}
698
699
  };
699
700
  }
@@ -1441,6 +1442,9 @@ function appleIapCheckoutEnabled() {
1441
1442
  function itemPaymentEnabled() {
1442
1443
  return STORES_ITEM_PAYMENT_ENABLED;
1443
1444
  }
1445
+ function storesAppleSalesEnabled() {
1446
+ return STORES_APPLE_SALES_ENABLED || STORES_ITEM_PAYMENT_ENABLED;
1447
+ }
1444
1448
 
1445
1449
  // ../../stdlib/flows/iap-checkout/src/cashier-charges.ts
1446
1450
  async function ensureAppleIapCharge(bridge, route, orderId) {
@@ -3045,6 +3049,7 @@ export {
3045
3049
  itemPaymentEnabled,
3046
3050
  onlineProgramOrders,
3047
3051
  pricingPlanOrders,
3052
+ storesAppleSalesEnabled,
3048
3053
  storesProductOrders
3049
3054
  };
3050
3055
  //# sourceMappingURL=iap-checkout.mjs.map
@@ -664,6 +664,7 @@ var IAP_CATALOG_KINDS = ["onlineProgram", "storesProduct", "pricingPlan"];
664
664
  // ../../core/sdk/iap/src/wix-payments-contract.ts
665
665
  var HIMALAYA_SERVE_IAP_ROUTE = { prefix: "/himalaya-serve/v1/iap" };
666
666
  var STORES_ITEM_PAYMENT_ENABLED = false;
667
+ var STORES_APPLE_SALES_ENABLED = true;
667
668
  var STORES_PRODUCT_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
668
669
  var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
669
670
  var PRICING_PLAN_APPLE_SALES_ENABLED = false;
@@ -671,7 +672,7 @@ var PRICING_PLAN_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSU
671
672
  function appleSaleRules(options = {}) {
672
673
  return {
673
674
  onlineProgram: ONLINE_PROGRAM_SALE_RULE,
674
- ...options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
675
+ ...(options.storesAppleSalesEnabled ?? STORES_APPLE_SALES_ENABLED) || (options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED) ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
675
676
  ...options.pricingPlanAppleSalesEnabled ?? PRICING_PLAN_APPLE_SALES_ENABLED ? { pricingPlan: PRICING_PLAN_SALE_RULE } : {}
676
677
  };
677
678
  }
@@ -1479,6 +1480,7 @@ export {
1479
1480
  MAX_AUTOMATIC_ATTEMPTS,
1480
1481
  MAX_RETRY_DELAY_MS,
1481
1482
  PRICING_PLAN_APPLE_SALES_ENABLED,
1483
+ STORES_APPLE_SALES_ENABLED,
1482
1484
  STORES_ITEM_PAYMENT_ENABLED,
1483
1485
  STORES_PRODUCT_SALE_RULE,
1484
1486
  appleManagedStore,
@@ -939,6 +939,7 @@ var sameReference = (value, reference) => isObject2(value) && value.kind === ref
939
939
  // ../../core/sdk/iap/src/wix-payments-contract.ts
940
940
  var HIMALAYA_SERVE_IAP_ROUTE = { prefix: "/himalaya-serve/v1/iap" };
941
941
  var STORES_ITEM_PAYMENT_ENABLED = false;
942
+ var STORES_APPLE_SALES_ENABLED = true;
942
943
  var STORES_PRODUCT_SALE_RULE = { appProductId: (id2) => id2, productType: "NON_CONSUMABLE" };
943
944
  var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id2) => id2, productType: "NON_CONSUMABLE" };
944
945
  var PRICING_PLAN_APPLE_SALES_ENABLED = false;
@@ -946,7 +947,7 @@ var PRICING_PLAN_SALE_RULE = { appProductId: (id2) => id2, productType: "NON_CON
946
947
  function appleSaleRules(options = {}) {
947
948
  return {
948
949
  onlineProgram: ONLINE_PROGRAM_SALE_RULE,
949
- ...options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
950
+ ...(options.storesAppleSalesEnabled ?? STORES_APPLE_SALES_ENABLED) || (options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED) ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
950
951
  ...options.pricingPlanAppleSalesEnabled ?? PRICING_PLAN_APPLE_SALES_ENABLED ? { pricingPlan: PRICING_PLAN_SALE_RULE } : {}
951
952
  };
952
953
  }
@@ -0,0 +1,34 @@
1
+ // ../../stdlib/wix-sdk/async-jobs/src/index.ts
2
+ function wixCallHeaders(opts) {
3
+ const site = opts?.site?.trim();
4
+ return site ? { "wix-site-id": site } : void 0;
5
+ }
6
+ function wixCall(method, path, body, opts) {
7
+ if (!globalThis.himalaya?.wixApi) {
8
+ return Promise.reject(
9
+ new Error(
10
+ "@himalaya/wix-async-jobs: host did not install the wixApi bridge"
11
+ )
12
+ );
13
+ }
14
+ return globalThis.himalaya.wixApi.call(
15
+ method,
16
+ path,
17
+ body,
18
+ wixCallHeaders(opts)
19
+ );
20
+ }
21
+ function getAsyncJob(jobId, opts) {
22
+ if (!jobId) throw new Error("getAsyncJob: jobId is required");
23
+ return wixCall(
24
+ "GET",
25
+ `/async-jobs/v1/async-jobs/${encodeURIComponent(jobId)}`,
26
+ void 0,
27
+ opts
28
+ );
29
+ }
30
+ export {
31
+ getAsyncJob,
32
+ wixCall
33
+ };
34
+ //# sourceMappingURL=wix-async-jobs.mjs.map
@@ -270,6 +270,10 @@
270
270
  "types": "./dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts",
271
271
  "import": "./dist/wix-analytics.mjs"
272
272
  },
273
+ "./wix-async-jobs": {
274
+ "types": "./dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts",
275
+ "import": "./dist/wix-async-jobs.mjs"
276
+ },
273
277
  "./wix-auth": {
274
278
  "types": "./dist/_types/stdlib/auth-providers/wix/src/index.d.ts",
275
279
  "import": "./dist/wix-auth.mjs"