@wix/astro 2.27.0 → 2.28.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 (177) hide show
  1. package/build/dependencies/astro-auth/backend-runtime/constants-Dbkf3D5f.mjs +6 -0
  2. package/build/dependencies/astro-auth/backend-runtime/elevatedContextualClient-tJx9dIn_.mjs +41 -0
  3. package/build/dependencies/astro-auth/backend-runtime/host-utils-B2Fs_Z4S.mjs +17 -0
  4. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.d.mts +6 -0
  5. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.mjs +3643 -0
  6. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.d.mts +6 -0
  7. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.mjs +193 -0
  8. package/build/dependencies/astro-auth/backend-runtime/routes/callback.d.mts +6 -0
  9. package/build/dependencies/astro-auth/backend-runtime/routes/callback.mjs +34 -0
  10. package/build/dependencies/astro-auth/backend-runtime/routes/login.d.mts +6 -0
  11. package/build/dependencies/astro-auth/backend-runtime/routes/login.mjs +32 -0
  12. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.d.mts +6 -0
  13. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.mjs +14 -0
  14. package/build/dependencies/astro-auth/backend-runtime/routes/logout.d.mts +6 -0
  15. package/build/dependencies/astro-auth/backend-runtime/routes/logout.mjs +19 -0
  16. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.d.mts +1 -0
  17. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.mjs +8 -0
  18. package/build/dependencies/astro-auth/backend-runtime/saveSessionTokensToCookie-DK3xvtzk.mjs +24 -0
  19. package/build/dependencies/astro-auth/backend-runtime/schemas-XrMhpOYn.mjs +2771 -0
  20. package/build/dependencies/astro-auth/browser-runtime/setup.d.ts +4 -3
  21. package/build/dependencies/astro-auth/browser-runtime/setup.js +55 -81
  22. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.d.mts +6 -0
  23. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.mjs +37 -0
  24. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.d.mts +10 -0
  25. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.mjs +22 -0
  26. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.d.mts +9 -0
  27. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.mjs +22 -0
  28. package/build/dependencies/astro-backend-extensions/backend-runtime/utils-DDHGZHjR.mjs +56 -0
  29. package/build/dependencies/astro-backend-extensions/backend-runtime/utils-mYlwmIjd.d.mts +6 -0
  30. package/build/dependencies/astro-backoffice-extensions/browser-runtime/wrapComponent.d.ts +4 -3
  31. package/build/dependencies/astro-backoffice-extensions/browser-runtime/wrapComponent.js +6 -5
  32. package/build/dependencies/astro-context-providers-extensions/browser-runtime/hmr.d.ts +10 -0
  33. package/build/dependencies/astro-context-providers-extensions/browser-runtime/hmr.js +20 -23
  34. package/build/dependencies/astro-context-providers-extensions/browser-runtime/sdk.d.ts +9 -0
  35. package/build/dependencies/astro-context-providers-extensions/browser-runtime/sdk.js +16 -15
  36. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/customElementHmr.d.ts +9 -5
  37. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/customElementHmr.js +23 -40
  38. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.d.ts +10 -1
  39. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/reactHmr.js +20 -23
  40. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.d.ts +4 -3
  41. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/renderSettingsPanel.js +14 -18
  42. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.d.ts +9 -5
  43. package/build/dependencies/astro-custom-elements-extensions/browser-runtime/wrapCustomElement.js +23 -25
  44. package/build/dependencies/astro-embedded-scripts-extensions/browser-runtime/setupContext.d.ts +8 -4
  45. package/build/dependencies/astro-embedded-scripts-extensions/browser-runtime/setupContext.js +18 -17
  46. package/build/dependencies/astro-function-libraries-extensions/browser-runtime/sdk.d.ts +9 -0
  47. package/build/dependencies/astro-function-libraries-extensions/browser-runtime/sdk.js +16 -15
  48. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.d.mts +6 -0
  49. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.mjs +53 -0
  50. package/build/dependencies/astro-monitor/backend-runtime/monitor.d.mts +6 -0
  51. package/build/dependencies/astro-monitor/backend-runtime/monitor.mjs +43 -0
  52. package/build/dependencies/astro-payment-links/backend-runtime/elevate-CDDLuCIf.mjs +9 -0
  53. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.d.mts +6 -0
  54. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.mjs +20 -0
  55. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.d.mts +6 -0
  56. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.mjs +15 -0
  57. package/build/dependencies/astro-payment-links/backend-runtime/proposal.d.mts +6 -0
  58. package/build/dependencies/astro-payment-links/backend-runtime/proposal.mjs +20 -0
  59. package/build/dependencies/astro-robots/backend-runtime/robots.d.mts +6 -0
  60. package/build/dependencies/astro-robots/backend-runtime/robots.mjs +26 -0
  61. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/hmr.d.ts +10 -0
  62. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/hmr.js +20 -23
  63. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/sdk.d.ts +12 -0
  64. package/build/dependencies/astro-site-component-panels-extensions/browser-runtime/sdk.js +10 -10
  65. package/build/dependencies/astro-site-components-extensions/browser-runtime/hmr.d.ts +10 -0
  66. package/build/dependencies/astro-site-components-extensions/browser-runtime/hmr.js +20 -23
  67. package/build/dependencies/astro-site-components-extensions/browser-runtime/sdk.d.ts +9 -0
  68. package/build/dependencies/astro-site-components-extensions/browser-runtime/sdk.js +16 -15
  69. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.d.mts +6 -0
  70. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.mjs +177 -0
  71. package/build/dependencies/astro-translations/backend-runtime/runtime/{i18n.d.ts → i18n.d.mts} +3 -2
  72. package/build/dependencies/astro-translations/backend-runtime/runtime/i18n.mjs +38 -0
  73. package/build/dependencies/astro-translations/integration/index.d.mts +105 -0
  74. package/build/dependencies/astro-translations/integration/index.mjs +264 -0
  75. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.d.ts +10 -1
  76. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/hmr.js +20 -23
  77. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.d.ts +12 -8
  78. package/build/dependencies/astro-trusted-backoffice-extensions/browser-runtime/wrapComponent.js +25 -35
  79. package/build/dependencies/astro-viewer-api/backend-runtime/api.d.mts +6 -0
  80. package/build/dependencies/astro-viewer-api/backend-runtime/api.mjs +27 -0
  81. package/build/dependencies/astro-viewer-services-extensions/browser-runtime/sdk.d.ts +9 -0
  82. package/build/dependencies/astro-viewer-services-extensions/browser-runtime/sdk.js +16 -15
  83. package/build/integration/builders-B9yQdgSz.mjs +76 -0
  84. package/build/integration/builders-DP0350YQ.d.mts +121 -0
  85. package/build/integration/builders-DVfxT6EC.mjs +225 -0
  86. package/build/integration/builders-experimental.d.mts +56 -0
  87. package/build/integration/builders-experimental.mjs +26 -0
  88. package/build/integration/builders-trusted.d.mts +75 -0
  89. package/build/integration/builders-trusted.mjs +46 -0
  90. package/build/integration/builders.d.mts +4 -0
  91. package/build/integration/builders.mjs +4 -0
  92. package/build/integration/index-B3B_5bgh.d.mts +248 -0
  93. package/build/integration/index-D5k6Bmue.d.mts +32 -0
  94. package/build/integration/index.d.mts +35 -0
  95. package/build/integration/index.mjs +29236 -0
  96. package/package.json +12 -12
  97. package/build/dependencies/astro-auth/backend-runtime/chunk-24J7STEA.js +0 -8
  98. package/build/dependencies/astro-auth/backend-runtime/chunk-352W54SQ.js +0 -70
  99. package/build/dependencies/astro-auth/backend-runtime/chunk-BIARYLOZ.js +0 -3267
  100. package/build/dependencies/astro-auth/backend-runtime/chunk-DZHZMKUF.js +0 -26
  101. package/build/dependencies/astro-auth/backend-runtime/chunk-MLKGABMK.js +0 -9
  102. package/build/dependencies/astro-auth/backend-runtime/chunk-USQSPPTM.js +0 -14
  103. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.d.ts +0 -5
  104. package/build/dependencies/astro-auth/backend-runtime/middleware/auth.js +0 -136
  105. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.d.ts +0 -5
  106. package/build/dependencies/astro-auth/backend-runtime/middleware/localization.js +0 -219
  107. package/build/dependencies/astro-auth/backend-runtime/routes/callback.d.ts +0 -5
  108. package/build/dependencies/astro-auth/backend-runtime/routes/callback.js +0 -53
  109. package/build/dependencies/astro-auth/backend-runtime/routes/login.d.ts +0 -5
  110. package/build/dependencies/astro-auth/backend-runtime/routes/login.js +0 -46
  111. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.d.ts +0 -5
  112. package/build/dependencies/astro-auth/backend-runtime/routes/logout-callback.js +0 -24
  113. package/build/dependencies/astro-auth/backend-runtime/routes/logout.d.ts +0 -5
  114. package/build/dependencies/astro-auth/backend-runtime/routes/logout.js +0 -33
  115. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.d.ts +0 -2
  116. package/build/dependencies/astro-auth/backend-runtime/runtime/backend/setupContextualClient.js +0 -10
  117. package/build/dependencies/astro-backend-extensions/backend-runtime/chunk-CPGTXQVH.js +0 -75
  118. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.d.ts +0 -5
  119. package/build/dependencies/astro-backend-extensions/backend-runtime/routes/extensions.js +0 -41
  120. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.d.ts +0 -10
  121. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupServicePlugin.js +0 -35
  122. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.d.ts +0 -9
  123. package/build/dependencies/astro-backend-extensions/backend-runtime/runtime/setupWebhook.js +0 -34
  124. package/build/dependencies/astro-backend-extensions/backend-runtime/utils-B7jr2PES.d.ts +0 -5
  125. package/build/dependencies/astro-backend-extensions/types/index.d.ts +0 -102
  126. package/build/dependencies/astro-backoffice-extensions/types/index.d.ts +0 -68
  127. package/build/dependencies/astro-context-providers-extensions/types/index.d.ts +0 -32
  128. package/build/dependencies/astro-core/types/index.d.ts +0 -109
  129. package/build/dependencies/astro-custom-elements-extensions/types/index.d.ts +0 -45
  130. package/build/dependencies/astro-embedded-scripts-extensions/types/index.d.ts +0 -18
  131. package/build/dependencies/astro-function-libraries-extensions/types/index.d.ts +0 -23
  132. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.d.ts +0 -5
  133. package/build/dependencies/astro-html-embeds/backend-runtime/html-embeds.js +0 -66
  134. package/build/dependencies/astro-payment-links/backend-runtime/chunk-656BVIJ3.js +0 -9
  135. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.d.ts +0 -5
  136. package/build/dependencies/astro-payment-links/backend-runtime/payment-checkout.js +0 -24
  137. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.d.ts +0 -5
  138. package/build/dependencies/astro-payment-links/backend-runtime/payment-link.js +0 -20
  139. package/build/dependencies/astro-payment-links/backend-runtime/proposal.d.ts +0 -5
  140. package/build/dependencies/astro-payment-links/backend-runtime/proposal.js +0 -24
  141. package/build/dependencies/astro-robots/backend-runtime/robots.d.ts +0 -5
  142. package/build/dependencies/astro-robots/backend-runtime/robots.js +0 -38
  143. package/build/dependencies/astro-site-component-panels-extensions/types/index.d.ts +0 -21
  144. package/build/dependencies/astro-site-components-extensions/types/index.d.ts +0 -48
  145. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.d.ts +0 -5
  146. package/build/dependencies/astro-translations/backend-runtime/middleware/static-translations.js +0 -189
  147. package/build/dependencies/astro-translations/backend-runtime/runtime/i18n.js +0 -42
  148. package/build/dependencies/astro-translations/integration/index.d.ts +0 -5
  149. package/build/dependencies/astro-translations/integration/index.js +0 -296
  150. package/build/dependencies/astro-trusted-backoffice-extensions/types/index.d.ts +0 -50
  151. package/build/dependencies/astro-viewer-api/backend-runtime/api.d.ts +0 -5
  152. package/build/dependencies/astro-viewer-api/backend-runtime/api.js +0 -34
  153. package/build/dependencies/astro-viewer-services-extensions/types/index.d.ts +0 -27
  154. package/build/integration/builders-experimental.d.ts +0 -53
  155. package/build/integration/builders-experimental.js +0 -20
  156. package/build/integration/builders-experimental.js.map +0 -1
  157. package/build/integration/builders-trusted.d.ts +0 -69
  158. package/build/integration/builders-trusted.js +0 -52
  159. package/build/integration/builders-trusted.js.map +0 -1
  160. package/build/integration/builders.d.ts +0 -112
  161. package/build/integration/builders.js +0 -14
  162. package/build/integration/builders.js.map +0 -1
  163. package/build/integration/chunk-23MOLCVI.js +0 -1087
  164. package/build/integration/chunk-23MOLCVI.js.map +0 -1
  165. package/build/integration/chunk-6UOFHB2M.js +0 -386
  166. package/build/integration/chunk-6UOFHB2M.js.map +0 -1
  167. package/build/integration/chunk-L6JEDTVM.js +0 -7458
  168. package/build/integration/chunk-L6JEDTVM.js.map +0 -1
  169. package/build/integration/chunk-MNQWQ2MC.js +0 -809
  170. package/build/integration/chunk-MNQWQ2MC.js.map +0 -1
  171. package/build/integration/chunk-XN6SBNMI.js +0 -23758
  172. package/build/integration/chunk-XN6SBNMI.js.map +0 -1
  173. package/build/integration/index.d-BUVlSCHa.d.ts +0 -211
  174. package/build/integration/index.d-D4c48TR0.d.ts +0 -58
  175. package/build/integration/index.d.ts +0 -34
  176. package/build/integration/index.js +0 -498
  177. package/build/integration/index.js.map +0 -1
@@ -1,75 +0,0 @@
1
- // src/runtime/contextualClient.ts
2
- import { createClient } from "@wix/sdk";
3
- var elevateNeededError = new Error(
4
- "Contextual client is not available for events and service plugins, please use elevate() instead."
5
- );
6
- var contextualClient = createClient({
7
- auth: {
8
- getActiveToken: () => {
9
- throw elevateNeededError;
10
- },
11
- getAuthHeaders: async () => {
12
- throw elevateNeededError;
13
- }
14
- }
15
- });
16
-
17
- // src/runtime/authAsyncLocalStorage.ts
18
- import { AsyncLocalStorage } from "async_hooks";
19
- var authAsyncLocalStorage = new AsyncLocalStorage();
20
-
21
- // src/runtime/elevatedContextualClient.ts
22
- import { createClient as createClient2 } from "@wix/sdk";
23
- var elevatedContextualClient = createClient2({
24
- auth: {
25
- getAuthHeaders: async (host) => {
26
- const store = authAsyncLocalStorage.getStore();
27
- if (!store) {
28
- throw new Error("Cannot find an authentication strategy");
29
- }
30
- if (store.elevatedAuth) {
31
- return store.elevatedAuth.getAuthHeaders(host);
32
- }
33
- throw new Error("Cannot find an elevated authentication strategy");
34
- }
35
- }
36
- });
37
-
38
- // src/runtime/utils.ts
39
- import { AppStrategy, createClient as createClient3 } from "@wix/sdk";
40
- import { wixContext } from "@wix/sdk-context";
41
- function createAppStrategy(opts = {}) {
42
- return AppStrategy({
43
- ...opts,
44
- appId: import.meta.env.WIX_CLIENT_ID
45
- });
46
- }
47
- async function setupClient(fn) {
48
- let authOptions = {};
49
- const client = createClient3({
50
- auth: () => AppStrategy({
51
- appId: import.meta.env.WIX_CLIENT_ID,
52
- ...authOptions
53
- })
54
- });
55
- const olderClient = wixContext.client;
56
- client.enableContext("module");
57
- await fn();
58
- if (olderClient) {
59
- olderClient.enableContext("module");
60
- }
61
- return {
62
- client,
63
- setAuthOptions: (options) => {
64
- authOptions = options;
65
- }
66
- };
67
- }
68
-
69
- export {
70
- contextualClient,
71
- authAsyncLocalStorage,
72
- elevatedContextualClient,
73
- createAppStrategy,
74
- setupClient
75
- };
@@ -1,5 +0,0 @@
1
- import { APIRoute } from 'astro';
2
-
3
- declare const ALL: APIRoute;
4
-
5
- export { ALL };
@@ -1,41 +0,0 @@
1
- // src/routes/extensions.ts
2
- import { WIX_CLIENT_PUBLIC_KEY, WIX_CLIENT_SECRET } from "astro:env/server";
3
- var authOptions = {
4
- appSecret: WIX_CLIENT_SECRET,
5
- publicKey: WIX_CLIENT_PUBLIC_KEY
6
- };
7
- var runExtension = await createServeExtensionRunner();
8
- var ALL = async (context) => {
9
- const componentId = context.params.compId;
10
- if (componentId == null) {
11
- return new Response(null, { status: 404 });
12
- }
13
- try {
14
- return await runExtension({
15
- componentId,
16
- payload: await context.request.text(),
17
- url: context.request.url
18
- });
19
- } catch (error) {
20
- return Response.json(error, { status: 500 });
21
- }
22
- };
23
- async function createServeExtensionRunner() {
24
- const { entries } = await import("@virtual/wix-backend-entries");
25
- return async ({
26
- componentId,
27
- payload,
28
- url
29
- }) => {
30
- const loadModule = entries[componentId];
31
- if (loadModule == null) {
32
- return new Response(null, { status: 404 });
33
- }
34
- const module = await loadModule();
35
- const result = await module.default({ authOptions, payload, url });
36
- return Response.json(result ?? null);
37
- };
38
- }
39
- export {
40
- ALL
41
- };
@@ -1,10 +0,0 @@
1
- import { A as AppStrategyOptions } from '../utils-B7jr2PES.js';
2
- import '@wix/sdk';
3
-
4
- declare function setupServicePlugin(fn: () => Promise<unknown>): Promise<({ authOptions, payload, url, }: {
5
- authOptions: AppStrategyOptions;
6
- payload: string;
7
- url: string;
8
- }) => Promise<unknown>>;
9
-
10
- export { setupServicePlugin };
@@ -1,35 +0,0 @@
1
- import {
2
- authAsyncLocalStorage,
3
- contextualClient,
4
- createAppStrategy,
5
- elevatedContextualClient,
6
- setupClient
7
- } from "../chunk-CPGTXQVH.js";
8
-
9
- // src/runtime/setupServicePlugin.ts
10
- contextualClient.enableContext("module");
11
- elevatedContextualClient.enableContext("module", { elevated: true });
12
- async function setupServicePlugin(fn) {
13
- const { client, setAuthOptions } = await setupClient(fn);
14
- return async function({
15
- authOptions,
16
- payload,
17
- url
18
- }) {
19
- setAuthOptions(authOptions);
20
- const processedRequest = await client.servicePlugins.parseJWT(payload);
21
- return authAsyncLocalStorage.run(
22
- {
23
- auth: null,
24
- elevatedAuth: createAppStrategy({
25
- instanceId: processedRequest.metadata.instanceId,
26
- ...authOptions
27
- })
28
- },
29
- async () => client.servicePlugins.executeHandler(processedRequest, url)
30
- );
31
- };
32
- }
33
- export {
34
- setupServicePlugin
35
- };
@@ -1,9 +0,0 @@
1
- import { A as AppStrategyOptions } from '../utils-B7jr2PES.js';
2
- import '@wix/sdk';
3
-
4
- declare function setupWebhook(fn: () => Promise<unknown>): Promise<({ authOptions, payload, }: {
5
- authOptions: AppStrategyOptions;
6
- payload: string;
7
- }) => Promise<void>>;
8
-
9
- export { setupWebhook };
@@ -1,34 +0,0 @@
1
- import {
2
- authAsyncLocalStorage,
3
- contextualClient,
4
- createAppStrategy,
5
- elevatedContextualClient,
6
- setupClient
7
- } from "../chunk-CPGTXQVH.js";
8
-
9
- // src/runtime/setupWebhook.ts
10
- contextualClient.enableContext("module");
11
- elevatedContextualClient.enableContext("module", { elevated: true });
12
- async function setupWebhook(fn) {
13
- const { client, setAuthOptions } = await setupClient(fn);
14
- return async function({
15
- authOptions,
16
- payload
17
- }) {
18
- setAuthOptions(authOptions);
19
- const processedRequest = await client.webhooks.parseJWT(payload);
20
- return authAsyncLocalStorage.run(
21
- {
22
- auth: null,
23
- elevatedAuth: createAppStrategy({
24
- instanceId: processedRequest.instanceId,
25
- ...authOptions
26
- })
27
- },
28
- async () => client.webhooks.executeHandlers(processedRequest)
29
- );
30
- };
31
- }
32
- export {
33
- setupWebhook
34
- };
@@ -1,5 +0,0 @@
1
- import { AppStrategy } from '@wix/sdk';
2
-
3
- type AppStrategyOptions = Partial<Parameters<typeof AppStrategy>[0]>;
4
-
5
- export type { AppStrategyOptions as A };
@@ -1,102 +0,0 @@
1
- import { WixIntegration } from '@wix/astro-core';
2
-
3
- declare const createIntegration: () => WixIntegration;
4
-
5
- interface BookingsStaffSortingProvider {
6
- type: 'BookingsStaffSortingProvider';
7
- options: Options$7;
8
- }
9
- interface Options$7 {
10
- id: string;
11
- name: string;
12
- dashboardPluginId?: string;
13
- methodDescription: string;
14
- methodName: string;
15
- source: string;
16
- }
17
- declare function bookingsStaffSortingProvider(options: Options$7): BookingsStaffSortingProvider;
18
-
19
- interface EcomAdditionalFees {
20
- type: 'EcomAdditionalFees';
21
- options: Options$6;
22
- }
23
- interface Options$6 {
24
- id: string;
25
- name: string;
26
- source: string;
27
- }
28
- declare function ecomAdditionalFees(options: Options$6): EcomAdditionalFees;
29
-
30
- interface EcomDiscountsTrigger {
31
- type: 'EcomDiscountsTrigger';
32
- options: Options$5;
33
- }
34
- interface Options$5 {
35
- id: string;
36
- name: string;
37
- source: string;
38
- }
39
- declare function ecomDiscountTriggers(options: Options$5): EcomDiscountsTrigger;
40
-
41
- interface EcomGiftCardsProvider {
42
- type: 'EcomGiftCardsProvider';
43
- options: Options$4;
44
- }
45
- interface Options$4 {
46
- id: string;
47
- name: string;
48
- source: string;
49
- }
50
- declare function ecomGiftCards(options: Options$4): EcomGiftCardsProvider;
51
-
52
- interface EcomPaymentSettings {
53
- type: 'EcomPaymentSettings';
54
- options: Options$3;
55
- }
56
- interface Options$3 {
57
- id: string;
58
- name: string;
59
- fallbackValueForRequires3dSecure?: boolean;
60
- source: string;
61
- }
62
- declare function ecomPaymentSettings(options: Options$3): EcomPaymentSettings;
63
-
64
- interface EcomShippingRates {
65
- type: 'EcomShippingRates';
66
- options: Options$2;
67
- }
68
- interface Options$2 {
69
- id: string;
70
- name: string;
71
- dashboardUrl?: string;
72
- description?: string;
73
- fallbackDefinitionMandatory?: boolean;
74
- learnMoreUrl?: string;
75
- source: string;
76
- thumbnailUrl?: string;
77
- }
78
- declare function ecomShippingRates(options: Options$2): EcomShippingRates;
79
-
80
- interface EcomValidations {
81
- type: 'EcomValidations';
82
- options: Options$1;
83
- }
84
- interface Options$1 {
85
- id: string;
86
- name: string;
87
- source: string;
88
- validateInCart?: boolean;
89
- }
90
- declare function ecomValidations(options: Options$1): EcomValidations;
91
-
92
- interface Webhook {
93
- type: 'Webhook';
94
- options: Options;
95
- }
96
- interface Options {
97
- id: string;
98
- source: string;
99
- }
100
- declare function webhook(options: Options): Webhook;
101
-
102
- export { bookingsStaffSortingProvider, createIntegration as default, ecomAdditionalFees, ecomDiscountTriggers, ecomGiftCards, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
@@ -1,68 +0,0 @@
1
- import { WixIntegration } from '@wix/astro-core';
2
-
3
- declare const createIntegration: () => WixIntegration;
4
-
5
- interface BackofficeExtensionMenuPlugin {
6
- type: 'BackofficeExtensionMenuPlugin';
7
- options: Options$3;
8
- }
9
- interface Options$3 {
10
- id: string;
11
- action: {
12
- navigateToPage: {
13
- pageId: string;
14
- };
15
- } | {
16
- openModal: {
17
- componentId: string;
18
- };
19
- };
20
- description?: string;
21
- extends: string;
22
- iconKey: string;
23
- subtitle?: string;
24
- title: string;
25
- }
26
- declare function backofficeExtensionMenuPlugin(options: Options$3): BackofficeExtensionMenuPlugin;
27
-
28
- interface BackofficeExtensionWidget {
29
- type: 'BackofficeExtensionWidget';
30
- options: Options$2;
31
- }
32
- interface Options$2 {
33
- id: string;
34
- component: string;
35
- description?: string;
36
- extends: string;
37
- height?: number;
38
- title: string;
39
- }
40
- declare function backofficeExtensionWidget(options: Options$2): BackofficeExtensionWidget;
41
-
42
- interface BackofficeModal {
43
- type: 'BackofficeModal';
44
- options: Options$1;
45
- }
46
- interface Options$1 {
47
- id: string;
48
- component: string;
49
- height?: number;
50
- iconKey?: string;
51
- title: string;
52
- width?: number;
53
- }
54
- declare function backofficeModal(options: Options$1): BackofficeModal;
55
-
56
- interface BackofficePage {
57
- type: 'BackofficePage';
58
- options: Options;
59
- }
60
- interface Options {
61
- id: string;
62
- component: string;
63
- routePath: string;
64
- title: string;
65
- }
66
- declare function backofficePage(options: Options): BackofficePage;
67
-
68
- export { backofficeExtensionMenuPlugin, backofficeExtensionWidget, backofficeModal, backofficePage, createIntegration as default };
@@ -1,32 +0,0 @@
1
- import { WixIntegration, BaseExtension } from '@wix/astro-core';
2
-
3
- declare const createIntegration: () => WixIntegration;
4
-
5
- interface ContextProvider extends BaseExtension {
6
- type: 'ContextProvider';
7
- options: Options;
8
- }
9
- interface Options {
10
- id: string;
11
- type: string;
12
- context?: Record<string, unknown>;
13
- data?: Record<string, unknown>;
14
- resources: {
15
- [key: string]: unknown;
16
- client: {
17
- [key: string]: unknown;
18
- url: string;
19
- };
20
- contextSpecifier: {
21
- [key: string]: unknown;
22
- hook: string;
23
- };
24
- editor?: {
25
- [key: string]: unknown;
26
- url: string;
27
- };
28
- };
29
- }
30
- declare function contextProvider(options: Options): ContextProvider;
31
-
32
- export { contextProvider, createIntegration as default };
@@ -1,109 +0,0 @@
1
- import { AstroIntegration } from 'astro';
2
- import { DevCenterAppManifest, BaseDevCenterComponent } from '@wix/dev-center-schemas';
3
- import { ViteDevServer, InlineConfig } from 'vite';
4
- import EventEmitter from 'node:events';
5
-
6
- interface EventMap {
7
- change: [];
8
- }
9
- declare class Model extends EventEmitter<EventMap> {
10
- appId: string;
11
- env: Record<string, string>;
12
- extensions: BaseExtension[];
13
- rootDir: string;
14
- srcDir: string;
15
- private server;
16
- constructor({ appId, env, extensions, rootDir, server, srcDir, }: {
17
- appId: string;
18
- env: Record<string, string>;
19
- extensions: BaseExtension[];
20
- rootDir: string;
21
- server: ViteDevServer;
22
- srcDir: string;
23
- });
24
- }
25
-
26
- interface BaseExtension {
27
- type: string;
28
- }
29
- interface BuildMetadata {
30
- appManifestPath: string;
31
- clientDir: string;
32
- outDir: string;
33
- serverDir?: string;
34
- serverUrlPlaceholder: string;
35
- staticsUrlPlaceholder: string;
36
- }
37
- type CreateExtensionViteConfig = (opts: {
38
- name: string;
39
- config: InlineConfig;
40
- }) => InlineConfig;
41
- interface DevMetadata {
42
- serverUrlPlaceholder: string;
43
- staticsUrlPlaceholder: string;
44
- }
45
- interface IntegrationHooks {
46
- /**
47
- * Called before the app manifest is created.
48
- *
49
- * Let's integrations contribute or change the app manifest.
50
- */
51
- 'wix:app-manifest:setup': (options: {
52
- model: Model;
53
- serverUrlPlaceholder: string;
54
- staticsUrlPlaceholder: string;
55
- updateAppManifest: (newAppManifest: Partial<DevCenterAppManifest>) => void;
56
- }) => Promise<void> | void;
57
- /**
58
- * Called after the wix model has been set up initially.
59
- */
60
- 'wix:model:setup': (options: {
61
- model: Model;
62
- }) => Promise<void> | void;
63
- /**
64
- * Called during `astro dev`, after a change has been made to files that affect the
65
- * wix model.
66
- */
67
- 'wix:model:changed': (options: {
68
- model: Model;
69
- }) => Promise<void> | void;
70
- /**
71
- * Called after main astro dev server has been started.
72
- */
73
- 'wix:server:start': (options: {
74
- createExtensionViteConfig: CreateExtensionViteConfig;
75
- setupExtensionProxy: (server: ViteDevServer) => void;
76
- }) => Promise<void> | void;
77
- /**
78
- * Wrapper around `astro:build:setup`, called during `astro build`.
79
- */
80
- 'wix:build:setup': (options: {
81
- createExtensionViteConfig: CreateExtensionViteConfig;
82
- target: 'client' | 'server';
83
- updateConfig: (newConfig: InlineConfig) => void;
84
- vite: InlineConfig;
85
- }) => Promise<void> | void;
86
- }
87
- type WixIntegration = AstroIntegration & {
88
- hooks: {
89
- [K in keyof IntegrationHooks]?: IntegrationHooks[K];
90
- };
91
- };
92
-
93
- declare const createIntegration: ({ integrations, }: {
94
- integrations: WixIntegration[];
95
- }) => AstroIntegration;
96
-
97
- declare class App {
98
- private extensions;
99
- use(extension: BaseDevCenterComponent | BaseExtension): this;
100
- }
101
- declare function app(): App;
102
-
103
- interface GenericExtension {
104
- type: 'GenericExtension';
105
- options: BaseDevCenterComponent;
106
- }
107
- declare function genericExtension(options: BaseDevCenterComponent): GenericExtension;
108
-
109
- export { type BaseExtension, type BuildMetadata, type CreateExtensionViteConfig, type DevMetadata, type IntegrationHooks, Model, type WixIntegration, app, createIntegration as default, genericExtension };
@@ -1,45 +0,0 @@
1
- import { WixIntegration, BaseExtension } from '@wix/astro-core';
2
- import { DevCenterCustomElementBehaviors, DevCenterCustomElementSize, DevCenterCustomElementPresets, DevCenterSitePluginMarketData, DevCenterSitePluginPlacements } from '@wix/dev-center-schemas';
3
-
4
- declare const createIntegration: () => WixIntegration;
5
-
6
- interface CustomElement {
7
- type: 'CustomElement';
8
- options: Options$1;
9
- }
10
- interface Options$1 {
11
- id: string;
12
- name: string;
13
- behaviors?: DevCenterCustomElementBehaviors;
14
- element: string;
15
- height: DevCenterCustomElementSize['height'];
16
- installation: {
17
- autoAdd: boolean;
18
- essential?: boolean;
19
- };
20
- presets?: DevCenterCustomElementPresets;
21
- settings?: string;
22
- tagName: string;
23
- width: DevCenterCustomElementSize['width'];
24
- }
25
- declare function customElement(options: Options$1): CustomElement;
26
-
27
- interface SitePlugin extends BaseExtension {
28
- type: 'SitePlugin';
29
- options: Options;
30
- }
31
- interface Options {
32
- id: string;
33
- name: string;
34
- element: string;
35
- installation: {
36
- autoAdd: boolean;
37
- };
38
- marketData?: DevCenterSitePluginMarketData;
39
- placements: DevCenterSitePluginPlacements[];
40
- settings: string;
41
- tagName: string;
42
- }
43
- declare function sitePlugin(options: Options): SitePlugin;
44
-
45
- export { customElement, createIntegration as default, sitePlugin };
@@ -1,18 +0,0 @@
1
- import { WixIntegration, BaseExtension } from '@wix/astro-core';
2
-
3
- declare const createIntegration: () => WixIntegration;
4
-
5
- interface EmbeddedScript extends BaseExtension {
6
- type: 'EmbeddedScript';
7
- options: Options;
8
- }
9
- interface Options {
10
- id: string;
11
- name: string;
12
- placement: 'BODY_END' | 'BODY_START' | 'HEAD';
13
- scriptType: 'ADVERTISING' | 'ANALYTICS' | 'ESSENTIAL' | 'FUNCTIONAL';
14
- source: string;
15
- }
16
- declare function embeddedScript(options: Options): EmbeddedScript;
17
-
18
- export { createIntegration as default, embeddedScript };
@@ -1,23 +0,0 @@
1
- import { WixIntegration, BaseExtension } from '@wix/astro-core';
2
-
3
- declare const createIntegration: () => WixIntegration;
4
-
5
- interface FunctionLibrary extends BaseExtension {
6
- type: 'FunctionLibrary';
7
- options: Options;
8
- }
9
- interface Options {
10
- id: string;
11
- type: string;
12
- functions: Record<string, unknown>;
13
- resources: {
14
- [key: string]: unknown;
15
- client: {
16
- [key: string]: unknown;
17
- url: string;
18
- };
19
- };
20
- }
21
- declare function functionLibrary(options: Options): FunctionLibrary;
22
-
23
- export { createIntegration as default, functionLibrary };
@@ -1,5 +0,0 @@
1
- import { MiddlewareHandler } from 'astro';
2
-
3
- declare const onRequest: MiddlewareHandler;
4
-
5
- export { onRequest };