@wix/auto_sdk_cache_cache 1.0.8 → 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
package/build/cjs/meta.js CHANGED
@@ -1,18 +1,127 @@
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/ssr-v1-invalidate-cache-request-cache.meta.js"), exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ invalidateCache: () => invalidateCache2,
24
+ purgeSiteCache: () => purgeSiteCache2
25
+ });
26
+ module.exports = __toCommonJS(meta_exports);
27
+
28
+ // src/ssr-v1-invalidate-cache-request-cache.http.ts
29
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
30
+ function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
31
+ const domainToMappings = {
32
+ "api._api_base_domain_": [
33
+ {
34
+ srcPath: "/wix-public-html-cache-invalidate-webapp",
35
+ destPath: ""
36
+ }
37
+ ],
38
+ "manage._base_domain_": [
39
+ {
40
+ srcPath: "/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache",
41
+ destPath: "/v1/purge-site-cache"
42
+ }
43
+ ]
44
+ };
45
+ return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
46
+ }
47
+ var PACKAGE_NAME = "@wix/auto_sdk_cache_cache";
48
+ function invalidateCache(payload) {
49
+ function __invalidateCache({ host }) {
50
+ const metadata = {
51
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
52
+ method: "POST",
53
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache",
54
+ packageName: PACKAGE_NAME,
55
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
56
+ protoPath: "/v1/invalidate-cache",
57
+ data: payload,
58
+ host
59
+ }),
60
+ data: payload
61
+ };
62
+ return metadata;
63
+ }
64
+ return __invalidateCache;
65
+ }
66
+ function purgeSiteCache(payload) {
67
+ function __purgeSiteCache({ host }) {
68
+ const metadata = {
69
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
70
+ method: "POST",
71
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache",
72
+ packageName: PACKAGE_NAME,
73
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
74
+ protoPath: "/v1/purge-site-cache",
75
+ data: payload,
76
+ host
77
+ }),
78
+ data: payload
79
+ };
80
+ return metadata;
81
+ }
82
+ return __purgeSiteCache;
83
+ }
84
+
85
+ // src/ssr-v1-invalidate-cache-request-cache.meta.ts
86
+ function invalidateCache2() {
87
+ const payload = {};
88
+ const getRequestOptions = invalidateCache(payload);
89
+ const getUrl = (context) => {
90
+ const { url } = getRequestOptions(context);
91
+ return url;
92
+ };
93
+ return {
94
+ getUrl,
95
+ httpMethod: "POST",
96
+ path: "/v1/invalidate-cache",
97
+ pathParams: {},
98
+ __requestType: null,
99
+ __originalRequestType: null,
100
+ __responseType: null,
101
+ __originalResponseType: null
102
+ };
103
+ }
104
+ function purgeSiteCache2() {
105
+ const payload = {};
106
+ const getRequestOptions = purgeSiteCache(payload);
107
+ const getUrl = (context) => {
108
+ const { url } = getRequestOptions(context);
109
+ return url;
110
+ };
111
+ return {
112
+ getUrl,
113
+ httpMethod: "POST",
114
+ path: "/v1/purge-site-cache",
115
+ pathParams: {},
116
+ __requestType: null,
117
+ __originalRequestType: null,
118
+ __responseType: null,
119
+ __originalResponseType: null
120
+ };
121
+ }
122
+ // Annotate the CommonJS export names for ESM import in node:
123
+ 0 && (module.exports = {
124
+ invalidateCache,
125
+ purgeSiteCache
126
+ });
18
127
  //# sourceMappingURL=meta.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sFAAoE"}
1
+ {"version":3,"sources":["../../meta.ts","../../src/ssr-v1-invalidate-cache-request-cache.http.ts","../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"sourcesContent":["export * from './src/ssr-v1-invalidate-cache-request-cache.meta.js';\n","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;AAAA;AAAA,yBAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAA2B;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,aAAO,gCAAW,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,SAASC,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","invalidateCache","purgeSiteCache"]}
@@ -1,9 +1,8 @@
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;
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { InvalidationMethods } from './index.typings.mjs';
3
+ export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethodsInvalidateByOneOf, PurgeSiteCacheRequest, PurgeSiteCacheResponse } from './index.typings.mjs';
4
+
5
+ declare function invalidateCache$1(httpClient: HttpClient): InvalidateCacheSignature;
7
6
  interface InvalidateCacheSignature {
8
7
  /**
9
8
  * <blockquote class="important">
@@ -29,7 +28,7 @@ interface InvalidateCacheSignature {
29
28
  */
30
29
  (invalidationMethods: InvalidationMethods[]): Promise<void>;
31
30
  }
32
- export declare function purgeSiteCache(httpClient: HttpClient): PurgeSiteCacheSignature;
31
+ declare function purgeSiteCache$1(httpClient: HttpClient): PurgeSiteCacheSignature;
33
32
  interface PurgeSiteCacheSignature {
34
33
  /**
35
34
  * Invalidates or clears previously cached return values based on metaSiteID.
@@ -37,4 +36,8 @@ interface PurgeSiteCacheSignature {
37
36
  */
38
37
  (): Promise<void>;
39
38
  }
40
- export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, PurgeSiteCacheRequest, PurgeSiteCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
39
+
40
+ declare const invalidateCache: MaybeContext<BuildRESTFunction<typeof invalidateCache$1> & typeof invalidateCache$1>;
41
+ declare const purgeSiteCache: MaybeContext<BuildRESTFunction<typeof purgeSiteCache$1> & typeof purgeSiteCache$1>;
42
+
43
+ export { InvalidationMethods, invalidateCache, purgeSiteCache };
@@ -0,0 +1,133 @@
1
+ // src/ssr-v1-invalidate-cache-request-cache.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { renameKeysFromSDKRequestToRESTRequest } from "@wix/sdk-runtime/rename-all-nested-keys";
4
+
5
+ // src/ssr-v1-invalidate-cache-request-cache.http.ts
6
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
7
+ function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
8
+ const domainToMappings = {
9
+ "api._api_base_domain_": [
10
+ {
11
+ srcPath: "/wix-public-html-cache-invalidate-webapp",
12
+ destPath: ""
13
+ }
14
+ ],
15
+ "manage._base_domain_": [
16
+ {
17
+ srcPath: "/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache",
18
+ destPath: "/v1/purge-site-cache"
19
+ }
20
+ ]
21
+ };
22
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
23
+ }
24
+ var PACKAGE_NAME = "@wix/auto_sdk_cache_cache";
25
+ function invalidateCache(payload) {
26
+ function __invalidateCache({ host }) {
27
+ const metadata = {
28
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
29
+ method: "POST",
30
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache",
31
+ packageName: PACKAGE_NAME,
32
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
33
+ protoPath: "/v1/invalidate-cache",
34
+ data: payload,
35
+ host
36
+ }),
37
+ data: payload
38
+ };
39
+ return metadata;
40
+ }
41
+ return __invalidateCache;
42
+ }
43
+ function purgeSiteCache(payload) {
44
+ function __purgeSiteCache({ host }) {
45
+ const metadata = {
46
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
47
+ method: "POST",
48
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache",
49
+ packageName: PACKAGE_NAME,
50
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
51
+ protoPath: "/v1/purge-site-cache",
52
+ data: payload,
53
+ host
54
+ }),
55
+ data: payload
56
+ };
57
+ return metadata;
58
+ }
59
+ return __purgeSiteCache;
60
+ }
61
+
62
+ // src/ssr-v1-invalidate-cache-request-cache.universal.ts
63
+ async function invalidateCache2(invalidationMethods) {
64
+ const { httpClient, sideEffects } = arguments[1];
65
+ const payload = renameKeysFromSDKRequestToRESTRequest({
66
+ invalidationMethods
67
+ });
68
+ const reqOpts = invalidateCache(payload);
69
+ sideEffects?.onSiteCall?.();
70
+ try {
71
+ const result = await httpClient.request(reqOpts);
72
+ sideEffects?.onSuccess?.(result);
73
+ } catch (err) {
74
+ const transformedError = sdkTransformError(
75
+ err,
76
+ {
77
+ spreadPathsToArguments: {},
78
+ explicitPathsToArguments: { invalidationMethods: "$[0]" },
79
+ singleArgumentUnchanged: false
80
+ },
81
+ ["invalidationMethods"]
82
+ );
83
+ sideEffects?.onError?.(err);
84
+ throw transformedError;
85
+ }
86
+ }
87
+ async function purgeSiteCache2() {
88
+ const { httpClient, sideEffects } = arguments[0];
89
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
90
+ const reqOpts = purgeSiteCache(payload);
91
+ sideEffects?.onSiteCall?.();
92
+ try {
93
+ const result = await httpClient.request(reqOpts);
94
+ sideEffects?.onSuccess?.(result);
95
+ } catch (err) {
96
+ const transformedError = sdkTransformError(
97
+ err,
98
+ {
99
+ spreadPathsToArguments: {},
100
+ explicitPathsToArguments: {},
101
+ singleArgumentUnchanged: false
102
+ },
103
+ []
104
+ );
105
+ sideEffects?.onError?.(err);
106
+ throw transformedError;
107
+ }
108
+ }
109
+
110
+ // src/ssr-v1-invalidate-cache-request-cache.public.ts
111
+ function invalidateCache3(httpClient) {
112
+ return (invalidationMethods) => invalidateCache2(
113
+ invalidationMethods,
114
+ // @ts-ignore
115
+ { httpClient }
116
+ );
117
+ }
118
+ function purgeSiteCache3(httpClient) {
119
+ return () => purgeSiteCache2(
120
+ // @ts-ignore
121
+ { httpClient }
122
+ );
123
+ }
124
+
125
+ // src/ssr-v1-invalidate-cache-request-cache.context.ts
126
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
127
+ var invalidateCache4 = /* @__PURE__ */ createRESTModule(invalidateCache3);
128
+ var purgeSiteCache4 = /* @__PURE__ */ createRESTModule(purgeSiteCache3);
129
+ export {
130
+ invalidateCache4 as invalidateCache,
131
+ purgeSiteCache4 as purgeSiteCache
132
+ };
133
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ssr-v1-invalidate-cache-request-cache.universal.ts","../../src/ssr-v1-invalidate-cache-request-cache.http.ts","../../src/ssr-v1-invalidate-cache-request-cache.public.ts","../../src/ssr-v1-invalidate-cache-request-cache.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixSsrV1InvalidateCacheRequest from './ssr-v1-invalidate-cache-request-cache.http.js';\n\nexport interface InvalidateCacheRequest {\n /**\n * 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.\n * @maxSize 100\n */\n invalidationMethods?: InvalidationMethods[];\n}\n\nexport interface InvalidationMethods\n extends InvalidationMethodsInvalidateByOneOf {\n /**\n * *Required.** Identifier of the caches to invalidate.\n * @maxLength 500\n * @minLength 1\n */\n tag?: string;\n}\n\n/** @oneof */\nexport interface InvalidationMethodsInvalidateByOneOf {\n /**\n * *Required.** Identifier of the caches to invalidate.\n * @maxLength 500\n * @minLength 1\n */\n tag?: string;\n}\n\nexport interface InvalidateCacheResponse {}\n\nexport interface PurgeSiteCacheRequest {}\n\nexport interface PurgeSiteCacheResponse {}\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 * @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.\n * @public\n * @documentationMaturity preview\n * @requiredField invalidationMethods\n * @permissionId SSR.INVALIDATE_CACHE\n * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache\n */\nexport async function invalidateCache(\n invalidationMethods: InvalidationMethods[]\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n invalidationMethods: invalidationMethods,\n });\n\n const reqOpts =\n ambassadorWixSsrV1InvalidateCacheRequest.invalidateCache(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { invalidationMethods: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['invalidationMethods']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @public\n * @documentationMaturity preview\n * @permissionId SSR.PURGE_SITE_CACHE\n * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache\n */\nexport async function purgeSiteCache(): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 { HttpClient } from '@wix/sdk-types';\nimport {\n InvalidationMethods,\n invalidateCache as universalInvalidateCache,\n purgeSiteCache as universalPurgeSiteCache,\n} from './ssr-v1-invalidate-cache-request-cache.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/cache' };\n\nexport function invalidateCache(\n httpClient: HttpClient\n): InvalidateCacheSignature {\n return (invalidationMethods: InvalidationMethods[]) =>\n universalInvalidateCache(\n invalidationMethods,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface InvalidateCacheSignature {\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 * @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.\n */\n (invalidationMethods: InvalidationMethods[]): Promise<void>;\n}\n\nexport function purgeSiteCache(\n httpClient: HttpClient\n): PurgeSiteCacheSignature {\n return () =>\n universalPurgeSiteCache(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface PurgeSiteCacheSignature {\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 */\n (): Promise<void>;\n}\n\nexport {\n InvalidateCacheRequest,\n InvalidateCacheResponse,\n InvalidationMethods,\n InvalidationMethodsInvalidateByOneOf,\n PurgeSiteCacheRequest,\n PurgeSiteCacheResponse,\n} from './ssr-v1-invalidate-cache-request-cache.universal.js';\n","import {\n invalidateCache as publicInvalidateCache,\n purgeSiteCache as publicPurgeSiteCache,\n} from './ssr-v1-invalidate-cache-request-cache.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const invalidateCache: MaybeContext<\n BuildRESTFunction<typeof publicInvalidateCache> & typeof publicInvalidateCache\n> = /*#__PURE__*/ createRESTModule(publicInvalidateCache);\nexport const purgeSiteCache: MaybeContext<\n BuildRESTFunction<typeof publicPurgeSiteCache> & typeof publicPurgeSiteCache\n> = /*#__PURE__*/ createRESTModule(publicPurgeSiteCache);\n\nexport {\n InvalidateCacheRequest,\n InvalidationMethods,\n InvalidationMethodsInvalidateByOneOf,\n InvalidateCacheResponse,\n PurgeSiteCacheRequest,\n PurgeSiteCacheResponse,\n} from './ssr-v1-invalidate-cache-request-cache.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,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;;;AD7BA,eAAsBA,iBACpB,qBACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACqC,gBAAgB,OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,qBAAqB,OAAO;AAAA,QACxD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,qBAAqB;AAAA,IACxB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAUA,eAAsBC,kBAAgC;AAEpD,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,CAAC,CAAC;AAExD,QAAM,UACqC,eAAe,OAAO;AAEjE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEnIO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CAAC,wBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA4BO,SAASC,gBACd,YACyB;AACzB,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;AClDA,SAAS,wBAAwB;AAG1B,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,kBAEK,iCAAiBA,eAAoB;","names":["invalidateCache","purgeSiteCache","invalidateCache","purgeSiteCache","invalidateCache","purgeSiteCache"]}
@@ -1,11 +1,11 @@
1
- export interface InvalidateCacheRequest {
1
+ interface InvalidateCacheRequest {
2
2
  /**
3
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
4
  * @maxSize 100
5
5
  */
6
6
  invalidationMethods?: InvalidationMethods[];
7
7
  }
8
- export interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
8
+ interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
9
9
  /**
10
10
  * *Required.** Identifier of the caches to invalidate.
11
11
  * @maxLength 500
@@ -14,7 +14,7 @@ export interface InvalidationMethods extends InvalidationMethodsInvalidateByOneO
14
14
  tag?: string;
15
15
  }
16
16
  /** @oneof */
17
- export interface InvalidationMethodsInvalidateByOneOf {
17
+ interface InvalidationMethodsInvalidateByOneOf {
18
18
  /**
19
19
  * *Required.** Identifier of the caches to invalidate.
20
20
  * @maxLength 500
@@ -22,11 +22,11 @@ export interface InvalidationMethodsInvalidateByOneOf {
22
22
  */
23
23
  tag?: string;
24
24
  }
25
- export interface InvalidateCacheResponse {
25
+ interface InvalidateCacheResponse {
26
26
  }
27
- export interface PurgeSiteCacheRequest {
27
+ interface PurgeSiteCacheRequest {
28
28
  }
29
- export interface PurgeSiteCacheResponse {
29
+ interface PurgeSiteCacheResponse {
30
30
  }
31
31
  /**
32
32
  * <blockquote class="important">
@@ -55,7 +55,7 @@ export interface PurgeSiteCacheResponse {
55
55
  * @permissionId SSR.INVALIDATE_CACHE
56
56
  * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache
57
57
  */
58
- export declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise<void>;
58
+ declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise<void>;
59
59
  /**
60
60
  * Invalidates or clears previously cached return values based on metaSiteID.
61
61
  * Takes the metaSiteID from the context and performs a hard purge.
@@ -64,4 +64,6 @@ export declare function invalidateCache(invalidationMethods: InvalidationMethods
64
64
  * @permissionId SSR.PURGE_SITE_CACHE
65
65
  * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
66
66
  */
67
- export declare function purgeSiteCache(): Promise<void>;
67
+ declare function purgeSiteCache(): Promise<void>;
68
+
69
+ export { type InvalidateCacheRequest, type InvalidateCacheResponse, type InvalidationMethods, type InvalidationMethodsInvalidateByOneOf, type PurgeSiteCacheRequest, type PurgeSiteCacheResponse, invalidateCache, purgeSiteCache };
@@ -0,0 +1,113 @@
1
+ // src/ssr-v1-invalidate-cache-request-cache.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { renameKeysFromSDKRequestToRESTRequest } from "@wix/sdk-runtime/rename-all-nested-keys";
4
+
5
+ // src/ssr-v1-invalidate-cache-request-cache.http.ts
6
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
7
+ function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
8
+ const domainToMappings = {
9
+ "api._api_base_domain_": [
10
+ {
11
+ srcPath: "/wix-public-html-cache-invalidate-webapp",
12
+ destPath: ""
13
+ }
14
+ ],
15
+ "manage._base_domain_": [
16
+ {
17
+ srcPath: "/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache",
18
+ destPath: "/v1/purge-site-cache"
19
+ }
20
+ ]
21
+ };
22
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
23
+ }
24
+ var PACKAGE_NAME = "@wix/auto_sdk_cache_cache";
25
+ function invalidateCache(payload) {
26
+ function __invalidateCache({ host }) {
27
+ const metadata = {
28
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
29
+ method: "POST",
30
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache",
31
+ packageName: PACKAGE_NAME,
32
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
33
+ protoPath: "/v1/invalidate-cache",
34
+ data: payload,
35
+ host
36
+ }),
37
+ data: payload
38
+ };
39
+ return metadata;
40
+ }
41
+ return __invalidateCache;
42
+ }
43
+ function purgeSiteCache(payload) {
44
+ function __purgeSiteCache({ host }) {
45
+ const metadata = {
46
+ entityFqdn: "wix.ssr.v1.invalidate_cache_request",
47
+ method: "POST",
48
+ methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache",
49
+ packageName: PACKAGE_NAME,
50
+ url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
51
+ protoPath: "/v1/purge-site-cache",
52
+ data: payload,
53
+ host
54
+ }),
55
+ data: payload
56
+ };
57
+ return metadata;
58
+ }
59
+ return __purgeSiteCache;
60
+ }
61
+
62
+ // src/ssr-v1-invalidate-cache-request-cache.universal.ts
63
+ async function invalidateCache2(invalidationMethods) {
64
+ const { httpClient, sideEffects } = arguments[1];
65
+ const payload = renameKeysFromSDKRequestToRESTRequest({
66
+ invalidationMethods
67
+ });
68
+ const reqOpts = invalidateCache(payload);
69
+ sideEffects?.onSiteCall?.();
70
+ try {
71
+ const result = await httpClient.request(reqOpts);
72
+ sideEffects?.onSuccess?.(result);
73
+ } catch (err) {
74
+ const transformedError = sdkTransformError(
75
+ err,
76
+ {
77
+ spreadPathsToArguments: {},
78
+ explicitPathsToArguments: { invalidationMethods: "$[0]" },
79
+ singleArgumentUnchanged: false
80
+ },
81
+ ["invalidationMethods"]
82
+ );
83
+ sideEffects?.onError?.(err);
84
+ throw transformedError;
85
+ }
86
+ }
87
+ async function purgeSiteCache2() {
88
+ const { httpClient, sideEffects } = arguments[0];
89
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
90
+ const reqOpts = purgeSiteCache(payload);
91
+ sideEffects?.onSiteCall?.();
92
+ try {
93
+ const result = await httpClient.request(reqOpts);
94
+ sideEffects?.onSuccess?.(result);
95
+ } catch (err) {
96
+ const transformedError = sdkTransformError(
97
+ err,
98
+ {
99
+ spreadPathsToArguments: {},
100
+ explicitPathsToArguments: {},
101
+ singleArgumentUnchanged: false
102
+ },
103
+ []
104
+ );
105
+ sideEffects?.onError?.(err);
106
+ throw transformedError;
107
+ }
108
+ }
109
+ export {
110
+ invalidateCache2 as invalidateCache,
111
+ purgeSiteCache2 as purgeSiteCache
112
+ };
113
+ //# sourceMappingURL=index.typings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ssr-v1-invalidate-cache-request-cache.universal.ts","../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient } from '@wix/sdk-types';\nimport * as ambassadorWixSsrV1InvalidateCacheRequest from './ssr-v1-invalidate-cache-request-cache.http.js';\n\nexport interface InvalidateCacheRequest {\n /**\n * 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.\n * @maxSize 100\n */\n invalidationMethods?: InvalidationMethods[];\n}\n\nexport interface InvalidationMethods\n extends InvalidationMethodsInvalidateByOneOf {\n /**\n * *Required.** Identifier of the caches to invalidate.\n * @maxLength 500\n * @minLength 1\n */\n tag?: string;\n}\n\n/** @oneof */\nexport interface InvalidationMethodsInvalidateByOneOf {\n /**\n * *Required.** Identifier of the caches to invalidate.\n * @maxLength 500\n * @minLength 1\n */\n tag?: string;\n}\n\nexport interface InvalidateCacheResponse {}\n\nexport interface PurgeSiteCacheRequest {}\n\nexport interface PurgeSiteCacheResponse {}\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 * @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.\n * @public\n * @documentationMaturity preview\n * @requiredField invalidationMethods\n * @permissionId SSR.INVALIDATE_CACHE\n * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache\n */\nexport async function invalidateCache(\n invalidationMethods: InvalidationMethods[]\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n invalidationMethods: invalidationMethods,\n });\n\n const reqOpts =\n ambassadorWixSsrV1InvalidateCacheRequest.invalidateCache(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { invalidationMethods: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['invalidationMethods']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\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 * @public\n * @documentationMaturity preview\n * @permissionId SSR.PURGE_SITE_CACHE\n * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache\n */\nexport async function purgeSiteCache(): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,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;;;AD7BA,eAAsBA,iBACpB,qBACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACqC,gBAAgB,OAAO;AAElE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,qBAAqB,OAAO;AAAA,QACxD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,qBAAqB;AAAA,IACxB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAUA,eAAsBC,kBAAgC;AAEpD,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,CAAC,CAAC;AAExD,QAAM,UACqC,eAAe,OAAO;AAEjE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["invalidateCache","purgeSiteCache"]}
@@ -0,0 +1,47 @@
1
+ import { InvalidateCacheRequest as InvalidateCacheRequest$1, InvalidateCacheResponse as InvalidateCacheResponse$1, PurgeSiteCacheRequest as PurgeSiteCacheRequest$1, PurgeSiteCacheResponse as PurgeSiteCacheResponse$1 } from './index.typings.mjs';
2
+
3
+ interface InvalidateCacheRequest {
4
+ /**
5
+ * 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.
6
+ * @maxSize 100
7
+ */
8
+ invalidationMethods?: InvalidationMethods[];
9
+ }
10
+ interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
11
+ /**
12
+ * *Required.** Identifier of the caches to invalidate.
13
+ * @maxLength 500
14
+ * @minLength 1
15
+ */
16
+ tag?: string;
17
+ }
18
+ /** @oneof */
19
+ interface InvalidationMethodsInvalidateByOneOf {
20
+ /**
21
+ * *Required.** Identifier of the caches to invalidate.
22
+ * @maxLength 500
23
+ * @minLength 1
24
+ */
25
+ tag?: string;
26
+ }
27
+ interface InvalidateCacheResponse {
28
+ }
29
+ interface PurgeSiteCacheRequest {
30
+ }
31
+ interface PurgeSiteCacheResponse {
32
+ }
33
+
34
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
35
+ getUrl: (context: any) => string;
36
+ httpMethod: K;
37
+ path: string;
38
+ pathParams: M;
39
+ __requestType: T;
40
+ __originalRequestType: S;
41
+ __responseType: Q;
42
+ __originalResponseType: R;
43
+ };
44
+ declare function invalidateCache(): __PublicMethodMetaInfo<'POST', {}, InvalidateCacheRequest$1, InvalidateCacheRequest, InvalidateCacheResponse$1, InvalidateCacheResponse>;
45
+ declare function purgeSiteCache(): __PublicMethodMetaInfo<'POST', {}, PurgeSiteCacheRequest$1, PurgeSiteCacheRequest, PurgeSiteCacheResponse$1, PurgeSiteCacheResponse>;
46
+
47
+ export { type __PublicMethodMetaInfo, invalidateCache, purgeSiteCache };