@wix/auto_sdk_cache_cache 1.0.0 → 1.0.2

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 (65) hide show
  1. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +3 -2
  2. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +2 -1
  3. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +1 -1
  4. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +7 -3
  5. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +26 -4
  6. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +1 -1
  7. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +1 -0
  8. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +20 -1
  9. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +1 -1
  10. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +11 -4
  11. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +7 -1
  12. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +1 -1
  13. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +4 -0
  14. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +15 -3
  15. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +32 -4
  16. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +1 -1
  17. package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +3 -2
  18. package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js +2 -1
  19. package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +1 -1
  20. package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +7 -3
  21. package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js +24 -3
  22. package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +1 -1
  23. package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +1 -0
  24. package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +18 -0
  25. package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +1 -1
  26. package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +11 -4
  27. package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js +6 -1
  28. package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +1 -1
  29. package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +4 -0
  30. package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +15 -3
  31. package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +30 -3
  32. package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +1 -1
  33. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +3 -2
  34. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +2 -1
  35. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +1 -1
  36. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +7 -3
  37. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +26 -4
  38. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +1 -1
  39. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +1 -0
  40. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +20 -1
  41. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +1 -1
  42. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +11 -4
  43. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +7 -1
  44. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +1 -1
  45. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +4 -0
  46. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +15 -3
  47. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +32 -4
  48. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +1 -1
  49. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +3 -2
  50. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js +2 -1
  51. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +1 -1
  52. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +7 -3
  53. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js +24 -3
  54. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +1 -1
  55. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +1 -0
  56. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +18 -0
  57. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +1 -1
  58. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +11 -4
  59. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js +6 -1
  60. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +1 -1
  61. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +4 -0
  62. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +15 -3
  63. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +30 -3
  64. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +1 -1
  65. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
- import { invalidateCache as publicInvalidateCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
1
+ import { invalidateCache as publicInvalidateCache, purgeSiteCache as publicPurgeSiteCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
2
2
  import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
3
  export declare const invalidateCache: MaybeContext<BuildRESTFunction<typeof publicInvalidateCache> & typeof publicInvalidateCache>;
4
- export { InvalidateCacheRequest, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, InvalidateCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
4
+ export declare const purgeSiteCache: MaybeContext<BuildRESTFunction<typeof publicPurgeSiteCache> & typeof publicPurgeSiteCache>;
5
+ export { InvalidateCacheRequest, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, InvalidateCacheResponse, PurgeSiteCacheRequest, PurgeSiteCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.invalidateCache = void 0;
3
+ exports.purgeSiteCache = exports.invalidateCache = void 0;
4
4
  const ssr_v1_invalidate_cache_request_cache_public_js_1 = require("./ssr-v1-invalidate-cache-request-cache.public.js");
5
5
  const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
6
6
  exports.invalidateCache = (0, rest_modules_1.createRESTModule)(ssr_v1_invalidate_cache_request_cache_public_js_1.invalidateCache);
7
+ exports.purgeSiteCache = (0, rest_modules_1.createRESTModule)(ssr_v1_invalidate_cache_request_cache_public_js_1.purgeSiteCache);
7
8
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.context.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.context.ts"],"names":[],"mappings":";;;AAAA,uHAA6G;AAC7G,gEAAiE;AAGpD,QAAA,eAAe,GAEV,IAAA,+BAAgB,EAAC,iEAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.context.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.context.ts"],"names":[],"mappings":";;;AAAA,uHAG2D;AAC3D,gEAAiE;AAGpD,QAAA,eAAe,GAEV,IAAA,+BAAgB,EAAC,iEAAqB,CAAC,CAAC;AAC7C,QAAA,cAAc,GAET,IAAA,+BAAgB,EAAC,gEAAoB,CAAC,CAAC"}
@@ -9,7 +9,7 @@ import { RequestOptionsFactory } from '@wix/sdk-types';
9
9
  *
10
10
  * Invalidates or clears previously cached return values based on specified tags.
11
11
  *
12
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
12
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
13
13
  *
14
14
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
15
15
  *
@@ -18,7 +18,11 @@ import { RequestOptionsFactory } from '@wix/sdk-types';
18
18
  * >**Notes:**
19
19
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
20
20
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
21
- *
22
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
21
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
23
22
  */
24
23
  export declare function invalidateCache(payload: object): RequestOptionsFactory<any>;
24
+ /**
25
+ * Invalidates or clears previously cached return values based on metaSiteID.
26
+ * Takes the metaSiteID from the context and performs a hard purge.
27
+ */
28
+ export declare function purgeSiteCache(payload: object): RequestOptionsFactory<any>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.invalidateCache = void 0;
3
+ exports.purgeSiteCache = exports.invalidateCache = void 0;
4
4
  const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
5
5
  function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
6
6
  const domainToMappings = {
@@ -24,7 +24,7 @@ const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
24
24
  *
25
25
  * Invalidates or clears previously cached return values based on specified tags.
26
26
  *
27
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
27
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
28
28
  *
29
29
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
30
30
  *
@@ -33,8 +33,7 @@ const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
33
33
  * >**Notes:**
34
34
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
35
35
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
36
- *
37
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
36
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
38
37
  */
39
38
  function invalidateCache(payload) {
40
39
  function __invalidateCache({ host }) {
@@ -55,4 +54,27 @@ function invalidateCache(payload) {
55
54
  return __invalidateCache;
56
55
  }
57
56
  exports.invalidateCache = invalidateCache;
57
+ /**
58
+ * Invalidates or clears previously cached return values based on metaSiteID.
59
+ * Takes the metaSiteID from the context and performs a hard purge.
60
+ */
61
+ function purgeSiteCache(payload) {
62
+ function __purgeSiteCache({ host }) {
63
+ const metadata = {
64
+ entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
65
+ method: 'POST',
66
+ methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache',
67
+ packageName: PACKAGE_NAME,
68
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
69
+ protoPath: '/v1/purge-site-cache',
70
+ data: payload,
71
+ host,
72
+ }),
73
+ data: payload,
74
+ };
75
+ return metadata;
76
+ }
77
+ return __purgeSiteCache;
78
+ }
79
+ exports.purgeSiteCache = purgeSiteCache;
58
80
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.http.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.http.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"names":[],"mappings":";;;AAAA,gEAA2D;AAI3D,SAAS,8DAA8D,CACrE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,IAAA,yBAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2EAA2E;YAC7E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AApBD,0CAoBC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.http.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"names":[],"mappings":";;;AAAA,gEAA2D;AAI3D,SAAS,8DAA8D,CACrE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,IAAA,yBAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2EAA2E;YAC7E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AApBD,0CAoBC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,OAAe;IAC5C,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,0EAA0E;YAC5E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AApBD,wCAoBC"}
@@ -11,3 +11,4 @@ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unk
11
11
  __originalResponseType: R;
12
12
  };
13
13
  export declare function invalidateCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheResponse>;
14
+ export declare function purgeSiteCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheResponse>;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.invalidateCache = void 0;
26
+ exports.purgeSiteCache = exports.invalidateCache = void 0;
27
27
  const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-invalidate-cache-request-cache.http.js"));
28
28
  function invalidateCache() {
29
29
  const payload = {};
@@ -44,4 +44,23 @@ function invalidateCache() {
44
44
  };
45
45
  }
46
46
  exports.invalidateCache = invalidateCache;
47
+ function purgeSiteCache() {
48
+ const payload = {};
49
+ const getRequestOptions = ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);
50
+ const getUrl = (context) => {
51
+ const { url } = getRequestOptions(context);
52
+ return url;
53
+ };
54
+ return {
55
+ getUrl,
56
+ httpMethod: 'POST',
57
+ path: '/v1/purge-site-cache',
58
+ pathParams: {},
59
+ __requestType: null,
60
+ __originalRequestType: null,
61
+ __responseType: null,
62
+ __originalResponseType: null,
63
+ };
64
+ }
65
+ exports.purgeSiteCache = purgeSiteCache;
47
66
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.meta.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0HAA4G;AAsB5G,SAAgB,eAAe;IAQ7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,0CA4BC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.meta.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0HAA4G;AAsB5G,SAAgB,eAAe;IAQ7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,0CA4BC;AAED,SAAgB,cAAc;IAQ5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEnE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,wCA4BC"}
@@ -15,7 +15,7 @@ interface InvalidateCacheSignature {
15
15
  *
16
16
  * Invalidates or clears previously cached return values based on specified tags.
17
17
  *
18
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
18
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
19
19
  *
20
20
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
21
21
  *
@@ -24,10 +24,17 @@ interface InvalidateCacheSignature {
24
24
  * >**Notes:**
25
25
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
26
26
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
27
- *
28
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
27
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
29
28
  * @param - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
30
29
  */
31
30
  (invalidationMethods: InvalidationMethods[]): Promise<void>;
32
31
  }
33
- export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
32
+ export declare function purgeSiteCache(httpClient: HttpClient): PurgeSiteCacheSignature;
33
+ interface PurgeSiteCacheSignature {
34
+ /**
35
+ * Invalidates or clears previously cached return values based on metaSiteID.
36
+ * Takes the metaSiteID from the context and performs a hard purge.
37
+ */
38
+ (): Promise<void>;
39
+ }
40
+ export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, PurgeSiteCacheRequest, PurgeSiteCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.invalidateCache = exports.__metadata = void 0;
3
+ exports.purgeSiteCache = exports.invalidateCache = exports.__metadata = void 0;
4
4
  const ssr_v1_invalidate_cache_request_cache_universal_js_1 = require("./ssr-v1-invalidate-cache-request-cache.universal.js");
5
5
  exports.__metadata = { PACKAGE_NAME: '@wix/cache' };
6
6
  function invalidateCache(httpClient) {
@@ -9,4 +9,10 @@ function invalidateCache(httpClient) {
9
9
  { httpClient });
10
10
  }
11
11
  exports.invalidateCache = invalidateCache;
12
+ function purgeSiteCache(httpClient) {
13
+ return () => (0, ssr_v1_invalidate_cache_request_cache_universal_js_1.purgeSiteCache)(
14
+ // @ts-ignore
15
+ { httpClient });
16
+ }
17
+ exports.purgeSiteCache = purgeSiteCache;
12
18
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.public.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.public.ts"],"names":[],"mappings":";;;AACA,6HAG8D;AAEjD,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,SAAgB,eAAe,CAC7B,UAAsB;IAEtB,OAAO,CAAC,mBAA0C,EAAE,EAAE,CACpD,IAAA,oEAAwB,EACtB,mBAAmB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,0CASC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.public.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.public.ts"],"names":[],"mappings":";;;AACA,6HAI8D;AAEjD,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,SAAgB,eAAe,CAC7B,UAAsB;IAEtB,OAAO,CAAC,mBAA0C,EAAE,EAAE,CACpD,IAAA,oEAAwB,EACtB,mBAAmB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,0CASC;AA4BD,SAAgB,cAAc,CAC5B,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,IAAA,mEAAuB;IACrB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,wCAQC"}
@@ -13,3 +13,7 @@ export interface InvalidationMethodsInvalidateByOneOf {
13
13
  }
14
14
  export interface InvalidateCacheResponse {
15
15
  }
16
+ export interface PurgeSiteCacheRequest {
17
+ }
18
+ export interface PurgeSiteCacheResponse {
19
+ }
@@ -13,6 +13,10 @@ export interface InvalidationMethodsInvalidateByOneOf {
13
13
  }
14
14
  export interface InvalidateCacheResponse {
15
15
  }
16
+ export interface PurgeSiteCacheRequest {
17
+ }
18
+ export interface PurgeSiteCacheResponse {
19
+ }
16
20
  /**
17
21
  * <blockquote class="important">
18
22
  *
@@ -23,7 +27,7 @@ export interface InvalidateCacheResponse {
23
27
  *
24
28
  * Invalidates or clears previously cached return values based on specified tags.
25
29
  *
26
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
30
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
27
31
  *
28
32
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
29
33
  *
@@ -32,8 +36,7 @@ export interface InvalidateCacheResponse {
32
36
  * >**Notes:**
33
37
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
34
38
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
35
- *
36
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
39
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
37
40
  * @param invalidationMethods - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
38
41
  * @public
39
42
  * @documentationMaturity preview
@@ -42,3 +45,12 @@ export interface InvalidateCacheResponse {
42
45
  * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache
43
46
  */
44
47
  export declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise<void>;
48
+ /**
49
+ * Invalidates or clears previously cached return values based on metaSiteID.
50
+ * Takes the metaSiteID from the context and performs a hard purge.
51
+ * @public
52
+ * @documentationMaturity preview
53
+ * @permissionId SSR.INVALIDATE_SITE_CACHE
54
+ * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
55
+ */
56
+ export declare function purgeSiteCache(): Promise<void>;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.invalidateCache = void 0;
26
+ exports.purgeSiteCache = exports.invalidateCache = void 0;
27
27
  const transform_error_1 = require("@wix/sdk-runtime/transform-error");
28
28
  const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
29
29
  const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-invalidate-cache-request-cache.http.js"));
@@ -37,7 +37,7 @@ const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-
37
37
  *
38
38
  * Invalidates or clears previously cached return values based on specified tags.
39
39
  *
40
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
40
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
41
41
  *
42
42
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
43
43
  *
@@ -46,8 +46,7 @@ const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-
46
46
  * >**Notes:**
47
47
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
48
48
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
49
- *
50
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
49
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
51
50
  * @param invalidationMethods - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
52
51
  * @public
53
52
  * @documentationMaturity preview
@@ -78,4 +77,33 @@ async function invalidateCache(invalidationMethods) {
78
77
  }
79
78
  }
80
79
  exports.invalidateCache = invalidateCache;
80
+ /**
81
+ * Invalidates or clears previously cached return values based on metaSiteID.
82
+ * Takes the metaSiteID from the context and performs a hard purge.
83
+ * @public
84
+ * @documentationMaturity preview
85
+ * @permissionId SSR.INVALIDATE_SITE_CACHE
86
+ * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
87
+ */
88
+ async function purgeSiteCache() {
89
+ // @ts-ignore
90
+ const { httpClient, sideEffects } = arguments[0];
91
+ const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
92
+ const reqOpts = ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);
93
+ sideEffects?.onSiteCall?.();
94
+ try {
95
+ const result = await httpClient.request(reqOpts);
96
+ sideEffects?.onSuccess?.(result);
97
+ }
98
+ catch (err) {
99
+ const transformedError = (0, transform_error_1.transformError)(err, {
100
+ spreadPathsToArguments: {},
101
+ explicitPathsToArguments: {},
102
+ singleArgumentUnchanged: false,
103
+ }, []);
104
+ sideEffects?.onError?.(err);
105
+ throw transformedError;
106
+ }
107
+ }
108
+ exports.purgeSiteCache = purgeSiteCache;
81
109
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.universal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.universal.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAAgG;AAEhG,0HAA4G;AAqB5G;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACI,KAAK,UAAU,eAAe,CACnC,mBAA0C;IAE1C,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,mBAAmB,EAAE,mBAAmB;KACzC,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE;YACzD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,qBAAqB,CAAC,CACxB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAlCD,0CAkCC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.universal.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAAgG;AAEhG,0HAA4G;AAyB5G;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACI,KAAK,UAAU,eAAe,CACnC,mBAA0C;IAE1C,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,mBAAmB,EAAE,mBAAmB;KACzC,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE;YACzD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,qBAAqB,CAAC,CACxB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAlCD,0CAkCC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,cAAc;IAClC,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC,EAAE,CAAC,CAAC;IAE1D,MAAM,OAAO,GACX,wCAAwC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEnE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE;YAC5B,uBAAuB,EAAE,KAAK;SAC/B,EACD,EAAE,CACH,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA9BD,wCA8BC"}
@@ -1,4 +1,5 @@
1
- import { invalidateCache as publicInvalidateCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
1
+ import { invalidateCache as publicInvalidateCache, purgeSiteCache as publicPurgeSiteCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
2
2
  import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
3
  export declare const invalidateCache: MaybeContext<BuildRESTFunction<typeof publicInvalidateCache> & typeof publicInvalidateCache>;
4
- export { InvalidateCacheRequest, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, InvalidateCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
4
+ export declare const purgeSiteCache: MaybeContext<BuildRESTFunction<typeof publicPurgeSiteCache> & typeof publicPurgeSiteCache>;
5
+ export { InvalidateCacheRequest, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, InvalidateCacheResponse, PurgeSiteCacheRequest, PurgeSiteCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
@@ -1,4 +1,5 @@
1
- import { invalidateCache as publicInvalidateCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
1
+ import { invalidateCache as publicInvalidateCache, purgeSiteCache as publicPurgeSiteCache, } from './ssr-v1-invalidate-cache-request-cache.public.js';
2
2
  import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
3
3
  export const invalidateCache = /*#__PURE__*/ createRESTModule(publicInvalidateCache);
4
+ export const purgeSiteCache = /*#__PURE__*/ createRESTModule(publicPurgeSiteCache);
4
5
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.context.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,eAAe,GAExB,aAAa,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.context.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,IAAI,qBAAqB,EACxC,cAAc,IAAI,oBAAoB,GACvC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,eAAe,GAExB,aAAa,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC"}
@@ -9,7 +9,7 @@ import { RequestOptionsFactory } from '@wix/sdk-types';
9
9
  *
10
10
  * Invalidates or clears previously cached return values based on specified tags.
11
11
  *
12
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
12
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
13
13
  *
14
14
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
15
15
  *
@@ -18,7 +18,11 @@ import { RequestOptionsFactory } from '@wix/sdk-types';
18
18
  * >**Notes:**
19
19
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
20
20
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
21
- *
22
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
21
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
23
22
  */
24
23
  export declare function invalidateCache(payload: object): RequestOptionsFactory<any>;
24
+ /**
25
+ * Invalidates or clears previously cached return values based on metaSiteID.
26
+ * Takes the metaSiteID from the context and performs a hard purge.
27
+ */
28
+ export declare function purgeSiteCache(payload: object): RequestOptionsFactory<any>;
@@ -21,7 +21,7 @@ const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
21
21
  *
22
22
  * Invalidates or clears previously cached return values based on specified tags.
23
23
  *
24
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
24
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
25
25
  *
26
26
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
27
27
  *
@@ -30,8 +30,7 @@ const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
30
30
  * >**Notes:**
31
31
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
32
32
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
33
- *
34
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
33
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
35
34
  */
36
35
  export function invalidateCache(payload) {
37
36
  function __invalidateCache({ host }) {
@@ -51,4 +50,26 @@ export function invalidateCache(payload) {
51
50
  }
52
51
  return __invalidateCache;
53
52
  }
53
+ /**
54
+ * Invalidates or clears previously cached return values based on metaSiteID.
55
+ * Takes the metaSiteID from the context and performs a hard purge.
56
+ */
57
+ export function purgeSiteCache(payload) {
58
+ function __purgeSiteCache({ host }) {
59
+ const metadata = {
60
+ entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
61
+ method: 'POST',
62
+ methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache',
63
+ packageName: PACKAGE_NAME,
64
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
65
+ protoPath: '/v1/purge-site-cache',
66
+ data: payload,
67
+ host,
68
+ }),
69
+ data: payload,
70
+ };
71
+ return metadata;
72
+ }
73
+ return __purgeSiteCache;
74
+ }
54
75
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.http.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.http.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,8DAA8D,CACrE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2EAA2E;YAC7E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.http.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,8DAA8D,CACrE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2EAA2E;YAC7E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,0EAA0E;YAC5E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -11,3 +11,4 @@ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unk
11
11
  __originalResponseType: R;
12
12
  };
13
13
  export declare function invalidateCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheResponse>;
14
+ export declare function purgeSiteCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheResponse>;
@@ -17,4 +17,22 @@ export function invalidateCache() {
17
17
  __originalResponseType: null,
18
18
  };
19
19
  }
20
+ export function purgeSiteCache() {
21
+ const payload = {};
22
+ const getRequestOptions = ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);
23
+ const getUrl = (context) => {
24
+ const { url } = getRequestOptions(context);
25
+ return url;
26
+ };
27
+ return {
28
+ getUrl,
29
+ httpMethod: 'POST',
30
+ path: '/v1/purge-site-cache',
31
+ pathParams: {},
32
+ __requestType: null,
33
+ __originalRequestType: null,
34
+ __responseType: null,
35
+ __originalResponseType: null,
36
+ };
37
+ }
20
38
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.meta.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,wCAAwC,MAAM,iDAAiD,CAAC;AAsB5G,MAAM,UAAU,eAAe;IAQ7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.meta.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,wCAAwC,MAAM,iDAAiD,CAAC;AAsB5G,MAAM,UAAU,eAAe;IAQ7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc;IAQ5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEnE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
@@ -15,7 +15,7 @@ interface InvalidateCacheSignature {
15
15
  *
16
16
  * Invalidates or clears previously cached return values based on specified tags.
17
17
  *
18
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
18
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
19
19
  *
20
20
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
21
21
  *
@@ -24,10 +24,17 @@ interface InvalidateCacheSignature {
24
24
  * >**Notes:**
25
25
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
26
26
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
27
- *
28
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
27
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
29
28
  * @param - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
30
29
  */
31
30
  (invalidationMethods: InvalidationMethods[]): Promise<void>;
32
31
  }
33
- export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
32
+ export declare function purgeSiteCache(httpClient: HttpClient): PurgeSiteCacheSignature;
33
+ interface PurgeSiteCacheSignature {
34
+ /**
35
+ * Invalidates or clears previously cached return values based on metaSiteID.
36
+ * Takes the metaSiteID from the context and performs a hard purge.
37
+ */
38
+ (): Promise<void>;
39
+ }
40
+ export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, PurgeSiteCacheRequest, PurgeSiteCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
@@ -1,8 +1,13 @@
1
- import { invalidateCache as universalInvalidateCache, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
1
+ import { invalidateCache as universalInvalidateCache, purgeSiteCache as universalPurgeSiteCache, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
2
2
  export const __metadata = { PACKAGE_NAME: '@wix/cache' };
3
3
  export function invalidateCache(httpClient) {
4
4
  return (invalidationMethods) => universalInvalidateCache(invalidationMethods,
5
5
  // @ts-ignore
6
6
  { httpClient });
7
7
  }
8
+ export function purgeSiteCache(httpClient) {
9
+ return () => universalPurgeSiteCache(
10
+ // @ts-ignore
11
+ { httpClient });
12
+ }
8
13
  //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.public.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.public.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,IAAI,wBAAwB,GAC5C,MAAM,sDAAsD,CAAC;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,MAAM,UAAU,eAAe,CAC7B,UAAsB;IAEtB,OAAO,CAAC,mBAA0C,EAAE,EAAE,CACpD,wBAAwB,CACtB,mBAAmB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.public.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.public.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,IAAI,wBAAwB,EAC3C,cAAc,IAAI,uBAAuB,GAC1C,MAAM,sDAAsD,CAAC;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,MAAM,UAAU,eAAe,CAC7B,UAAsB;IAEtB,OAAO,CAAC,mBAA0C,EAAE,EAAE,CACpD,wBAAwB,CACtB,mBAAmB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AA4BD,MAAM,UAAU,cAAc,CAC5B,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,uBAAuB;IACrB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC"}
@@ -13,3 +13,7 @@ export interface InvalidationMethodsInvalidateByOneOf {
13
13
  }
14
14
  export interface InvalidateCacheResponse {
15
15
  }
16
+ export interface PurgeSiteCacheRequest {
17
+ }
18
+ export interface PurgeSiteCacheResponse {
19
+ }
@@ -13,6 +13,10 @@ export interface InvalidationMethodsInvalidateByOneOf {
13
13
  }
14
14
  export interface InvalidateCacheResponse {
15
15
  }
16
+ export interface PurgeSiteCacheRequest {
17
+ }
18
+ export interface PurgeSiteCacheResponse {
19
+ }
16
20
  /**
17
21
  * <blockquote class="important">
18
22
  *
@@ -23,7 +27,7 @@ export interface InvalidateCacheResponse {
23
27
  *
24
28
  * Invalidates or clears previously cached return values based on specified tags.
25
29
  *
26
- * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of web methods ([SDK](https://dev.wix.com/docs/sdk/core-modules/web-methods/web-method) | [Velo](https://dev.wix.com/docs/velo/api-reference/wix-web-module/web-method)) and routers (currently [Velo](https://dev.wix.com/docs/velo/api-reference/wix-router/ok) only).
30
+ * The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
27
31
  *
28
32
  * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
29
33
  *
@@ -32,8 +36,7 @@ export interface InvalidateCacheResponse {
32
36
  * >**Notes:**
33
37
  * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
34
38
  * >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
35
- *
36
- * >- (Velo only) Call Invalidate Cache to invalidate your web method and router caches. To invalidate Server Side Rendering (SSR) caches for your site, use the `invalidateCache()` function from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
39
+ * >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
37
40
  * @param invalidationMethods - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
38
41
  * @public
39
42
  * @documentationMaturity preview
@@ -42,3 +45,12 @@ export interface InvalidateCacheResponse {
42
45
  * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache
43
46
  */
44
47
  export declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise<void>;
48
+ /**
49
+ * Invalidates or clears previously cached return values based on metaSiteID.
50
+ * Takes the metaSiteID from the context and performs a hard purge.
51
+ * @public
52
+ * @documentationMaturity preview
53
+ * @permissionId SSR.INVALIDATE_SITE_CACHE
54
+ * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
55
+ */
56
+ export declare function purgeSiteCache(): Promise<void>;