@wix/auto_sdk_cache_cache 1.0.7 → 1.0.9

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 (123) hide show
  1. package/build/cjs/index.d.ts +43 -1
  2. package/build/cjs/index.js +158 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +69 -1
  5. package/build/cjs/index.typings.js +138 -15
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +47 -1
  8. package/build/cjs/meta.js +124 -15
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/{src/ssr-v1-invalidate-cache-request-cache.public.d.ts → index.d.mts} +11 -8
  11. package/build/es/index.mjs +133 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/{src/ssr-v1-invalidate-cache-request-cache.universal.d.ts → index.typings.d.mts} +10 -8
  14. package/build/es/index.typings.mjs +113 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +47 -0
  17. package/build/es/meta.mjs +99 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/internal/cjs/index.d.ts +43 -1
  20. package/build/internal/cjs/index.js +158 -15
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +69 -1
  23. package/build/internal/cjs/index.typings.js +138 -15
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +47 -1
  26. package/build/internal/cjs/meta.js +124 -15
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/{cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts → es/index.d.mts} +11 -8
  29. package/build/internal/es/index.mjs +133 -0
  30. package/build/internal/es/index.mjs.map +1 -0
  31. package/build/internal/es/{src/ssr-v1-invalidate-cache-request-cache.universal.d.ts → index.typings.d.mts} +10 -8
  32. package/build/internal/es/index.typings.mjs +113 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/internal/es/meta.d.mts +47 -0
  35. package/build/internal/es/meta.mjs +99 -0
  36. package/build/internal/es/meta.mjs.map +1 -0
  37. package/package.json +12 -10
  38. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
  39. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -8
  40. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
  41. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
  42. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -86
  43. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
  44. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
  45. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -66
  46. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
  47. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +0 -40
  48. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -18
  49. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
  50. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
  51. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -3
  52. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
  53. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +0 -67
  54. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -109
  55. package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
  66. package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -5
  67. package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
  68. package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
  69. package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -81
  70. package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
  71. package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
  72. package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -38
  73. package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
  74. package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -13
  75. package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
  76. package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
  77. package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -2
  78. package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
  79. package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -81
  80. package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
  81. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
  82. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -8
  83. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
  84. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
  85. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -86
  86. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
  87. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
  88. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -66
  89. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
  90. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -18
  91. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
  92. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
  93. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -3
  94. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
  95. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +0 -67
  96. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -109
  97. package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
  98. package/build/internal/es/index.d.ts +0 -1
  99. package/build/internal/es/index.js +0 -2
  100. package/build/internal/es/index.js.map +0 -1
  101. package/build/internal/es/index.typings.d.ts +0 -1
  102. package/build/internal/es/index.typings.js +0 -2
  103. package/build/internal/es/index.typings.js.map +0 -1
  104. package/build/internal/es/meta.d.ts +0 -1
  105. package/build/internal/es/meta.js +0 -2
  106. package/build/internal/es/meta.js.map +0 -1
  107. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
  108. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -5
  109. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
  110. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
  111. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -81
  112. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
  113. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
  114. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -38
  115. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
  116. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +0 -40
  117. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -13
  118. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
  119. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
  120. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -2
  121. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
  122. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -81
  123. package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
@@ -0,0 +1,99 @@
1
+ // src/ssr-v1-invalidate-cache-request-cache.http.ts
2
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
3
+ function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
4
+ const domainToMappings = {
5
+ "api._api_base_domain_": [
6
+ {
7
+ srcPath: "/wix-public-html-cache-invalidate-webapp",
8
+ destPath: ""
9
+ }
10
+ ],
11
+ "manage._base_domain_": [
12
+ {
13
+ srcPath: "/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache",
14
+ destPath: "/v1/purge-site-cache"
15
+ }
16
+ ]
17
+ };
18
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
19
+ }
20
+ var PACKAGE_NAME = "@wix/auto_sdk_cache_cache";
21
+ function invalidateCache(payload) {
22
+ function __invalidateCache({ host }) {
23
+ const metadata = {
24
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
25
+ method: "POST",
26
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache",
27
+ packageName: PACKAGE_NAME,
28
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
29
+ protoPath: "/v1/invalidate-cache",
30
+ data: payload,
31
+ host
32
+ }),
33
+ data: payload
34
+ };
35
+ return metadata;
36
+ }
37
+ return __invalidateCache;
38
+ }
39
+ function purgeSiteCache(payload) {
40
+ function __purgeSiteCache({ host }) {
41
+ const metadata = {
42
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
43
+ method: "POST",
44
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache",
45
+ packageName: PACKAGE_NAME,
46
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
47
+ protoPath: "/v1/purge-site-cache",
48
+ data: payload,
49
+ host
50
+ }),
51
+ data: payload
52
+ };
53
+ return metadata;
54
+ }
55
+ return __purgeSiteCache;
56
+ }
57
+
58
+ // src/ssr-v1-invalidate-cache-request-cache.meta.ts
59
+ function invalidateCache2() {
60
+ const payload = {};
61
+ const getRequestOptions = invalidateCache(payload);
62
+ const getUrl = (context) => {
63
+ const { url } = getRequestOptions(context);
64
+ return url;
65
+ };
66
+ return {
67
+ getUrl,
68
+ httpMethod: "POST",
69
+ path: "/v1/invalidate-cache",
70
+ pathParams: {},
71
+ __requestType: null,
72
+ __originalRequestType: null,
73
+ __responseType: null,
74
+ __originalResponseType: null
75
+ };
76
+ }
77
+ function purgeSiteCache2() {
78
+ const payload = {};
79
+ const getRequestOptions = purgeSiteCache(payload);
80
+ const getUrl = (context) => {
81
+ const { url } = getRequestOptions(context);
82
+ return url;
83
+ };
84
+ return {
85
+ getUrl,
86
+ httpMethod: "POST",
87
+ path: "/v1/purge-site-cache",
88
+ pathParams: {},
89
+ __requestType: null,
90
+ __originalRequestType: null,
91
+ __responseType: null,
92
+ __originalResponseType: null
93
+ };
94
+ }
95
+ export {
96
+ invalidateCache2 as invalidateCache,
97
+ purgeSiteCache2 as purgeSiteCache
98
+ };
99
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/ssr-v1-invalidate-cache-request-cache.http.ts","../../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"sourcesContent":["import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-public-html-cache-invalidate-webapp',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath:\n '/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache',\n destPath: '/v1/purge-site-cache',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_cache_cache';\n\n/**\n * <blockquote class=\"important\">\n *\n * __Important:__\n * This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.\n *\n * </blockquote>\n *\n * Invalidates or clears previously cached return values based on specified tags.\n *\n * 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).\n *\n * For example, an array such as `[{ tag: \"contacts\" }, { tag: \"labels\" }]` will clear any cached return values tagged with \"contacts\" or \"labels.\"\n *\n * Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.\n *\n * >**Notes:**\n * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.\n * >- 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.\n * >- 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.\n */\nexport function invalidateCache(payload: object): RequestOptionsFactory<any> {\n function __invalidateCache({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ssr.v1.invalidate_cache_request',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({\n protoPath: '/v1/invalidate-cache',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __invalidateCache;\n}\n\n/**\n * Invalidates or clears previously cached return values based on metaSiteID.\n * Takes the metaSiteID from the context and performs a hard purge.\n */\nexport function purgeSiteCache(payload: object): RequestOptionsFactory<any> {\n function __purgeSiteCache({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ssr.v1.invalidate_cache_request',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({\n protoPath: '/v1/purge-site-cache',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __purgeSiteCache;\n}\n","import * as ambassadorWixSsrV1InvalidateCacheRequest from './ssr-v1-invalidate-cache-request-cache.http.js';\nimport * as ambassadorWixSsrV1InvalidateCacheRequestTypes from './ssr-v1-invalidate-cache-request-cache.types.js';\nimport * as ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes from './ssr-v1-invalidate-cache-request-cache.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function invalidateCache(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheRequest,\n ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheRequest,\n ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheResponse,\n ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixSsrV1InvalidateCacheRequest.invalidateCache(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/invalidate-cache',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function purgeSiteCache(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheRequest,\n ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheRequest,\n ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheResponse,\n ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/purge-site-cache',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SACE;AAAA,QACF,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAuBd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,+DAA+D;AAAA,QAClE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAMO,SAAS,eAAe,SAA6C;AAC1E,WAAS,iBAAiB,EAAE,KAAK,GAAQ;AACvC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,+DAA+D;AAAA,QAClE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACzEO,SAASA,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,gBAAgB,OAAO;AAElE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,kBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,eAAe,OAAO;AAEjE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["invalidateCache","purgeSiteCache"]}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_cache_cache",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
+ "license": "MIT",
4
5
  "publishConfig": {
5
6
  "registry": "https://registry.npmjs.org/",
6
7
  "access": "public"
@@ -8,18 +9,18 @@
8
9
  "keywords": [],
9
10
  "sideEffects": false,
10
11
  "main": "./build/cjs/index.js",
11
- "types": "./build/es/index.d.ts",
12
+ "types": "./build/cjs/index.d.ts",
12
13
  "exports": {
13
14
  ".": {
14
- "import": "./build/es/index.js",
15
+ "import": "./build/es/index.mjs",
15
16
  "require": "./build/cjs/index.js",
16
- "types": "./build/es/index.d.ts"
17
+ "types": "./build/es/index.d.mts"
17
18
  },
18
19
  "./package.json": "./package.json",
19
20
  "./meta": {
20
- "import": "./build/es/meta.js",
21
+ "import": "./build/es/meta.mjs",
21
22
  "require": "./build/cjs/meta.js",
22
- "types": "./build/es/meta.d.ts"
23
+ "types": "./build/es/meta.d.mts"
23
24
  }
24
25
  },
25
26
  "files": [
@@ -28,14 +29,15 @@
28
29
  "service-plugins"
29
30
  ],
30
31
  "dependencies": {
31
- "@wix/sdk-runtime": "^0.3.35",
32
- "@wix/sdk-types": "^1.12.4"
32
+ "@wix/sdk-runtime": "^0.3.55",
33
+ "@wix/sdk-types": "^1.13.35"
33
34
  },
34
35
  "devDependencies": {
36
+ "tsup": "^8.4.0",
35
37
  "typescript": "^5.3.2"
36
38
  },
37
39
  "scripts": {
38
- "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
40
+ "build": "tsup",
39
41
  "test": ":"
40
42
  },
41
43
  "wix": {
@@ -48,5 +50,5 @@
48
50
  "fqdn": "wix.ssr.v1.invalidate_cache_request"
49
51
  }
50
52
  },
51
- "falconPackageHash": "ee507c3683e25b8b2b29cf64cfbe460099a98d71aee5738800456863"
53
+ "falconPackageHash": "c4cdc3eb5ae367cb25eae23e17e1e3a1877b5ec3655317ac5b2d5c38"
52
54
  }
@@ -1,5 +0,0 @@
1
- import { invalidateCache as publicInvalidateCache, purgeSiteCache as publicPurgeSiteCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
2
- import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
- export declare const invalidateCache: MaybeContext<BuildRESTFunction<typeof publicInvalidateCache> & typeof publicInvalidateCache>;
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,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.purgeSiteCache = exports.invalidateCache = void 0;
4
- const ssr_v1_invalidate_cache_request_cache_public_js_1 = require("./ssr-v1-invalidate-cache-request-cache.public.js");
5
- const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
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);
8
- //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.context.js.map
@@ -1 +0,0 @@
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"}
@@ -1,28 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- /**
3
- * <blockquote class="important">
4
- *
5
- * __Important:__
6
- * This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
7
- *
8
- * </blockquote>
9
- *
10
- * Invalidates or clears previously cached return values based on specified tags.
11
- *
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
- *
14
- * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
15
- *
16
- * Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
17
- *
18
- * >**Notes:**
19
- * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
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
- * >- 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.
22
- */
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,86 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.purgeSiteCache = exports.invalidateCache = void 0;
4
- const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
5
- function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
6
- const domainToMappings = {
7
- 'api._api_base_domain_': [
8
- {
9
- srcPath: '/wix-public-html-cache-invalidate-webapp',
10
- destPath: '',
11
- },
12
- ],
13
- 'manage._base_domain_': [
14
- {
15
- srcPath: '/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache',
16
- destPath: '/v1/purge-site-cache',
17
- },
18
- ],
19
- };
20
- return (0, rest_modules_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
21
- }
22
- const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
23
- /**
24
- * <blockquote class="important">
25
- *
26
- * __Important:__
27
- * This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
28
- *
29
- * </blockquote>
30
- *
31
- * Invalidates or clears previously cached return values based on specified tags.
32
- *
33
- * 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).
34
- *
35
- * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
36
- *
37
- * Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
38
- *
39
- * >**Notes:**
40
- * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
41
- * >- 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.
42
- * >- 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.
43
- */
44
- function invalidateCache(payload) {
45
- function __invalidateCache({ host }) {
46
- const metadata = {
47
- entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
48
- method: 'POST',
49
- methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache',
50
- packageName: PACKAGE_NAME,
51
- url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
52
- protoPath: '/v1/invalidate-cache',
53
- data: payload,
54
- host,
55
- }),
56
- data: payload,
57
- };
58
- return metadata;
59
- }
60
- return __invalidateCache;
61
- }
62
- exports.invalidateCache = invalidateCache;
63
- /**
64
- * Invalidates or clears previously cached return values based on metaSiteID.
65
- * Takes the metaSiteID from the context and performs a hard purge.
66
- */
67
- function purgeSiteCache(payload) {
68
- function __purgeSiteCache({ host }) {
69
- const metadata = {
70
- entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
71
- method: 'POST',
72
- methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache',
73
- packageName: PACKAGE_NAME,
74
- url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
75
- protoPath: '/v1/purge-site-cache',
76
- data: payload,
77
- host,
78
- }),
79
- data: payload,
80
- };
81
- return metadata;
82
- }
83
- return __purgeSiteCache;
84
- }
85
- exports.purgeSiteCache = purgeSiteCache;
86
- //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.http.js.map
@@ -1 +0,0 @@
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;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EACL,mEAAmE;gBACrE,QAAQ,EAAE,sBAAsB;aACjC;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"}
@@ -1,14 +0,0 @@
1
- import * as ambassadorWixSsrV1InvalidateCacheRequestTypes from './ssr-v1-invalidate-cache-request-cache.types.js';
2
- import * as ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes from './ssr-v1-invalidate-cache-request-cache.universal.js';
3
- export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4
- getUrl: (context: any) => string;
5
- httpMethod: K;
6
- path: string;
7
- pathParams: M;
8
- __requestType: T;
9
- __originalRequestType: S;
10
- __responseType: Q;
11
- __originalResponseType: R;
12
- };
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>;
@@ -1,66 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.purgeSiteCache = exports.invalidateCache = void 0;
27
- const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-invalidate-cache-request-cache.http.js"));
28
- function invalidateCache() {
29
- const payload = {};
30
- const getRequestOptions = ambassadorWixSsrV1InvalidateCacheRequest.invalidateCache(payload);
31
- const getUrl = (context) => {
32
- const { url } = getRequestOptions(context);
33
- return url;
34
- };
35
- return {
36
- getUrl,
37
- httpMethod: 'POST',
38
- path: '/v1/invalidate-cache',
39
- pathParams: {},
40
- __requestType: null,
41
- __originalRequestType: null,
42
- __responseType: null,
43
- __originalResponseType: null,
44
- };
45
- }
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;
66
- //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.meta.js.map
@@ -1 +0,0 @@
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"}
@@ -1,40 +0,0 @@
1
- import { HttpClient } from '@wix/sdk-types';
2
- import { InvalidationMethods } from './ssr-v1-invalidate-cache-request-cache.universal.js';
3
- export declare const __metadata: {
4
- PACKAGE_NAME: string;
5
- };
6
- export declare function invalidateCache(httpClient: HttpClient): InvalidateCacheSignature;
7
- interface InvalidateCacheSignature {
8
- /**
9
- * <blockquote class="important">
10
- *
11
- * __Important:__
12
- * This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
13
- *
14
- * </blockquote>
15
- *
16
- * Invalidates or clears previously cached return values based on specified tags.
17
- *
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
- *
20
- * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
21
- *
22
- * Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
23
- *
24
- * >**Notes:**
25
- * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
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
- * >- 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.
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.
29
- */
30
- (invalidationMethods: InvalidationMethods[]): Promise<void>;
31
- }
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,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.purgeSiteCache = exports.invalidateCache = exports.__metadata = void 0;
4
- const ssr_v1_invalidate_cache_request_cache_universal_js_1 = require("./ssr-v1-invalidate-cache-request-cache.universal.js");
5
- exports.__metadata = { PACKAGE_NAME: '@wix/cache' };
6
- function invalidateCache(httpClient) {
7
- return (invalidationMethods) => (0, ssr_v1_invalidate_cache_request_cache_universal_js_1.invalidateCache)(invalidationMethods,
8
- // @ts-ignore
9
- { httpClient });
10
- }
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;
18
- //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.public.js.map
@@ -1 +0,0 @@
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"}
@@ -1,30 +0,0 @@
1
- export interface InvalidateCacheRequest {
2
- /**
3
- * 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.
4
- * @maxSize 100
5
- */
6
- invalidationMethods?: InvalidationMethods[];
7
- }
8
- export interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
9
- /**
10
- * *Required.** Identifier of the caches to invalidate.
11
- * @maxLength 500
12
- * @minLength 1
13
- */
14
- tag?: string;
15
- }
16
- /** @oneof */
17
- export interface InvalidationMethodsInvalidateByOneOf {
18
- /**
19
- * *Required.** Identifier of the caches to invalidate.
20
- * @maxLength 500
21
- * @minLength 1
22
- */
23
- tag?: string;
24
- }
25
- export interface InvalidateCacheResponse {
26
- }
27
- export interface PurgeSiteCacheRequest {
28
- }
29
- export interface PurgeSiteCacheResponse {
30
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ssr-v1-invalidate-cache-request-cache.types.js","sourceRoot":"","sources":["../../../src/ssr-v1-invalidate-cache-request-cache.types.ts"],"names":[],"mappings":""}
@@ -1,67 +0,0 @@
1
- export interface InvalidateCacheRequest {
2
- /**
3
- * 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.
4
- * @maxSize 100
5
- */
6
- invalidationMethods?: InvalidationMethods[];
7
- }
8
- export interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
9
- /**
10
- * *Required.** Identifier of the caches to invalidate.
11
- * @maxLength 500
12
- * @minLength 1
13
- */
14
- tag?: string;
15
- }
16
- /** @oneof */
17
- export interface InvalidationMethodsInvalidateByOneOf {
18
- /**
19
- * *Required.** Identifier of the caches to invalidate.
20
- * @maxLength 500
21
- * @minLength 1
22
- */
23
- tag?: string;
24
- }
25
- export interface InvalidateCacheResponse {
26
- }
27
- export interface PurgeSiteCacheRequest {
28
- }
29
- export interface PurgeSiteCacheResponse {
30
- }
31
- /**
32
- * <blockquote class="important">
33
- *
34
- * __Important:__
35
- * This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
36
- *
37
- * </blockquote>
38
- *
39
- * Invalidates or clears previously cached return values based on specified tags.
40
- *
41
- * 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).
42
- *
43
- * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
44
- *
45
- * Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
46
- *
47
- * >**Notes:**
48
- * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
49
- * >- 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.
50
- * >- 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
- * @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
- * @public
53
- * @documentationMaturity preview
54
- * @requiredField invalidationMethods
55
- * @permissionId SSR.INVALIDATE_CACHE
56
- * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache
57
- */
58
- export declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise<void>;
59
- /**
60
- * Invalidates or clears previously cached return values based on metaSiteID.
61
- * Takes the metaSiteID from the context and performs a hard purge.
62
- * @public
63
- * @documentationMaturity preview
64
- * @permissionId SSR.PURGE_SITE_CACHE
65
- * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
66
- */
67
- export declare function purgeSiteCache(): Promise<void>;