@wix/himalaya-cli 0.1375.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 (55) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/extensions.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts +248 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-async-jobs.mjs +34 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
  5. package/dist/cli.mjs +1423 -634
  6. package/dist/preview-assets.generated.bin +0 -0
  7. package/guides/getting-started.md +23 -0
  8. package/guides/himi-json-output.md +42 -0
  9. package/guides/himi-skill.md +23 -0
  10. package/guides/importable-sdks.md +1 -0
  11. package/guides/index.json +42 -0
  12. package/guides/one-app-business-fetch.md +81 -0
  13. package/guides/one-app-business-object.md +258 -0
  14. package/guides/one-app-reference.md +55 -0
  15. package/guides/one-app-section-mappings.md +381 -0
  16. package/guides/one-app-structure.md +453 -0
  17. package/guides/one-app-to-himi-app.md +305 -0
  18. package/guides/one-app-viewer.md +401 -0
  19. package/guides/release-notes.md +10 -0
  20. package/guides/sdk-reference.json +298 -0
  21. package/guides/skill.md +24 -1
  22. package/package.json +2 -2
  23. package/templates/beauty-salon-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  24. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +14 -3
  25. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  26. package/templates/community-club-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  27. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +14 -3
  28. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  29. package/templates/events-meetups-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  30. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +14 -3
  31. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  32. package/templates/gym-fitness-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  33. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +14 -3
  34. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  35. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  36. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +14 -3
  37. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  38. package/templates/owner-lite/tier5-src/_shared/aria-async-jobs.ts +10 -0
  39. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +14 -3
  40. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  41. package/templates/podcast-creator-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  42. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +14 -3
  43. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  44. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  45. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +14 -3
  46. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  47. package/templates/restaurant-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  48. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +14 -3
  49. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  50. package/templates/retail-store-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  51. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +14 -3
  52. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
  53. package/templates/yoga-studio-owner/tier5-src/_shared/aria-async-jobs.ts +10 -0
  54. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +14 -3
  55. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +2 -0
@@ -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";
@@ -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"