@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.
- package/build/cjs/index.d.ts +43 -1
- package/build/cjs/index.js +158 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +69 -1
- package/build/cjs/index.typings.js +138 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +47 -1
- package/build/cjs/meta.js +124 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{src/ssr-v1-invalidate-cache-request-cache.public.d.ts → index.d.mts} +11 -8
- package/build/es/index.mjs +133 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/{src/ssr-v1-invalidate-cache-request-cache.universal.d.ts → index.typings.d.mts} +10 -8
- package/build/es/index.typings.mjs +113 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +47 -0
- package/build/es/meta.mjs +99 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +43 -1
- package/build/internal/cjs/index.js +158 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +69 -1
- package/build/internal/cjs/index.typings.js +138 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +47 -1
- package/build/internal/cjs/meta.js +124 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/{cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts → es/index.d.mts} +11 -8
- package/build/internal/es/index.mjs +133 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/{src/ssr-v1-invalidate-cache-request-cache.universal.d.ts → index.typings.d.mts} +10 -8
- package/build/internal/es/index.typings.mjs +113 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +47 -0
- package/build/internal/es/meta.mjs +99 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -8
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -86
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -66
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +0 -40
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -18
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -3
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +0 -67
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -109
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -5
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -81
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -38
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -13
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -2
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -81
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -8
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -86
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -66
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -18
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -3
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +0 -67
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -109
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -5
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -81
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -38
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +0 -40
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -13
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -2
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -81
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
package/build/cjs/index.d.ts
CHANGED
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { InvalidationMethods } from './index.typings.js';
|
|
3
|
+
export { InvalidateCacheRequest, InvalidateCacheResponse, InvalidationMethodsInvalidateByOneOf, PurgeSiteCacheRequest, PurgeSiteCacheResponse } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function invalidateCache$1(httpClient: HttpClient): InvalidateCacheSignature;
|
|
6
|
+
interface InvalidateCacheSignature {
|
|
7
|
+
/**
|
|
8
|
+
* <blockquote class="important">
|
|
9
|
+
*
|
|
10
|
+
* __Important:__
|
|
11
|
+
* This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
|
|
12
|
+
*
|
|
13
|
+
* </blockquote>
|
|
14
|
+
*
|
|
15
|
+
* Invalidates or clears previously cached return values based on specified tags.
|
|
16
|
+
*
|
|
17
|
+
* 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).
|
|
18
|
+
*
|
|
19
|
+
* For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
|
|
20
|
+
*
|
|
21
|
+
* Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
|
|
22
|
+
*
|
|
23
|
+
* >**Notes:**
|
|
24
|
+
* >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
|
|
25
|
+
* >- 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.
|
|
26
|
+
* >- 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.
|
|
27
|
+
* @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.
|
|
28
|
+
*/
|
|
29
|
+
(invalidationMethods: InvalidationMethods[]): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
declare function purgeSiteCache$1(httpClient: HttpClient): PurgeSiteCacheSignature;
|
|
32
|
+
interface PurgeSiteCacheSignature {
|
|
33
|
+
/**
|
|
34
|
+
* Invalidates or clears previously cached return values based on metaSiteID.
|
|
35
|
+
* Takes the metaSiteID from the context and performs a hard purge.
|
|
36
|
+
*/
|
|
37
|
+
(): Promise<void>;
|
|
38
|
+
}
|
|
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 };
|
package/build/cjs/index.js
CHANGED
|
@@ -1,18 +1,161 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
invalidateCache: () => invalidateCache4,
|
|
24
|
+
purgeSiteCache: () => purgeSiteCache4
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// src/ssr-v1-invalidate-cache-request-cache.universal.ts
|
|
29
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
30
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
31
|
+
|
|
32
|
+
// src/ssr-v1-invalidate-cache-request-cache.http.ts
|
|
33
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
34
|
+
function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
|
|
35
|
+
const domainToMappings = {
|
|
36
|
+
"api._api_base_domain_": [
|
|
37
|
+
{
|
|
38
|
+
srcPath: "/wix-public-html-cache-invalidate-webapp",
|
|
39
|
+
destPath: ""
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"manage._base_domain_": [
|
|
43
|
+
{
|
|
44
|
+
srcPath: "/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache",
|
|
45
|
+
destPath: "/v1/purge-site-cache"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
};
|
|
49
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
50
|
+
}
|
|
51
|
+
var PACKAGE_NAME = "@wix/auto_sdk_cache_cache";
|
|
52
|
+
function invalidateCache(payload) {
|
|
53
|
+
function __invalidateCache({ host }) {
|
|
54
|
+
const metadata = {
|
|
55
|
+
entityFqdn: "wix.ssr.v1.invalidate_cache_request",
|
|
56
|
+
method: "POST",
|
|
57
|
+
methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache",
|
|
58
|
+
packageName: PACKAGE_NAME,
|
|
59
|
+
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
60
|
+
protoPath: "/v1/invalidate-cache",
|
|
61
|
+
data: payload,
|
|
62
|
+
host
|
|
63
|
+
}),
|
|
64
|
+
data: payload
|
|
65
|
+
};
|
|
66
|
+
return metadata;
|
|
67
|
+
}
|
|
68
|
+
return __invalidateCache;
|
|
69
|
+
}
|
|
70
|
+
function purgeSiteCache(payload) {
|
|
71
|
+
function __purgeSiteCache({ host }) {
|
|
72
|
+
const metadata = {
|
|
73
|
+
entityFqdn: "wix.ssr.v1.invalidate_cache_request",
|
|
74
|
+
method: "POST",
|
|
75
|
+
methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache",
|
|
76
|
+
packageName: PACKAGE_NAME,
|
|
77
|
+
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
78
|
+
protoPath: "/v1/purge-site-cache",
|
|
79
|
+
data: payload,
|
|
80
|
+
host
|
|
81
|
+
}),
|
|
82
|
+
data: payload
|
|
83
|
+
};
|
|
84
|
+
return metadata;
|
|
85
|
+
}
|
|
86
|
+
return __purgeSiteCache;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// src/ssr-v1-invalidate-cache-request-cache.universal.ts
|
|
90
|
+
async function invalidateCache2(invalidationMethods) {
|
|
91
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
92
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
93
|
+
invalidationMethods
|
|
94
|
+
});
|
|
95
|
+
const reqOpts = invalidateCache(payload);
|
|
96
|
+
sideEffects?.onSiteCall?.();
|
|
97
|
+
try {
|
|
98
|
+
const result = await httpClient.request(reqOpts);
|
|
99
|
+
sideEffects?.onSuccess?.(result);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
102
|
+
err,
|
|
103
|
+
{
|
|
104
|
+
spreadPathsToArguments: {},
|
|
105
|
+
explicitPathsToArguments: { invalidationMethods: "$[0]" },
|
|
106
|
+
singleArgumentUnchanged: false
|
|
107
|
+
},
|
|
108
|
+
["invalidationMethods"]
|
|
109
|
+
);
|
|
110
|
+
sideEffects?.onError?.(err);
|
|
111
|
+
throw transformedError;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async function purgeSiteCache2() {
|
|
115
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
116
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
117
|
+
const reqOpts = purgeSiteCache(payload);
|
|
118
|
+
sideEffects?.onSiteCall?.();
|
|
119
|
+
try {
|
|
120
|
+
const result = await httpClient.request(reqOpts);
|
|
121
|
+
sideEffects?.onSuccess?.(result);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
124
|
+
err,
|
|
125
|
+
{
|
|
126
|
+
spreadPathsToArguments: {},
|
|
127
|
+
explicitPathsToArguments: {},
|
|
128
|
+
singleArgumentUnchanged: false
|
|
129
|
+
},
|
|
130
|
+
[]
|
|
131
|
+
);
|
|
132
|
+
sideEffects?.onError?.(err);
|
|
133
|
+
throw transformedError;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// src/ssr-v1-invalidate-cache-request-cache.public.ts
|
|
138
|
+
function invalidateCache3(httpClient) {
|
|
139
|
+
return (invalidationMethods) => invalidateCache2(
|
|
140
|
+
invalidationMethods,
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
{ httpClient }
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function purgeSiteCache3(httpClient) {
|
|
146
|
+
return () => purgeSiteCache2(
|
|
147
|
+
// @ts-ignore
|
|
148
|
+
{ httpClient }
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// src/ssr-v1-invalidate-cache-request-cache.context.ts
|
|
153
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
154
|
+
var invalidateCache4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(invalidateCache3);
|
|
155
|
+
var purgeSiteCache4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(purgeSiteCache3);
|
|
156
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
157
|
+
0 && (module.exports = {
|
|
158
|
+
invalidateCache,
|
|
159
|
+
purgeSiteCache
|
|
160
|
+
});
|
|
18
161
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yFAAuE"}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../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":["export * from './src/ssr-v1-invalidate-cache-request-cache.context.js';\n","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;AAAA;AAAA,yBAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAAsD;;;ACDtD,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;;;AD7BA,eAAsBC,iBACpB,qBACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;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,uBAAmB,uBAAAC;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,cAAU,qEAAsC,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,uBAAmB,uBAAAD;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,SAASE,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,IAAAC,uBAAiC;AAG1B,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,kBAEK,2DAAiBA,eAAoB;","names":["invalidateCache","purgeSiteCache","invalidateCache","sdkTransformError","purgeSiteCache","invalidateCache","purgeSiteCache","import_rest_modules","invalidateCache","purgeSiteCache"]}
|
|
@@ -1 +1,69 @@
|
|
|
1
|
-
|
|
1
|
+
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
|
+
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
|
+
interface InvalidationMethodsInvalidateByOneOf {
|
|
18
|
+
/**
|
|
19
|
+
* *Required.** Identifier of the caches to invalidate.
|
|
20
|
+
* @maxLength 500
|
|
21
|
+
* @minLength 1
|
|
22
|
+
*/
|
|
23
|
+
tag?: string;
|
|
24
|
+
}
|
|
25
|
+
interface InvalidateCacheResponse {
|
|
26
|
+
}
|
|
27
|
+
interface PurgeSiteCacheRequest {
|
|
28
|
+
}
|
|
29
|
+
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
|
+
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
|
+
declare function purgeSiteCache(): Promise<void>;
|
|
68
|
+
|
|
69
|
+
export { type InvalidateCacheRequest, type InvalidateCacheResponse, type InvalidationMethods, type InvalidationMethodsInvalidateByOneOf, type PurgeSiteCacheRequest, type PurgeSiteCacheResponse, invalidateCache, purgeSiteCache };
|
|
@@ -1,18 +1,141 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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
|
+
// index.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
invalidateCache: () => invalidateCache2,
|
|
24
|
+
purgeSiteCache: () => purgeSiteCache2
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
27
|
+
|
|
28
|
+
// src/ssr-v1-invalidate-cache-request-cache.universal.ts
|
|
29
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
30
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
31
|
+
|
|
32
|
+
// src/ssr-v1-invalidate-cache-request-cache.http.ts
|
|
33
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
34
|
+
function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
|
|
35
|
+
const domainToMappings = {
|
|
36
|
+
"api._api_base_domain_": [
|
|
37
|
+
{
|
|
38
|
+
srcPath: "/wix-public-html-cache-invalidate-webapp",
|
|
39
|
+
destPath: ""
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"manage._base_domain_": [
|
|
43
|
+
{
|
|
44
|
+
srcPath: "/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache",
|
|
45
|
+
destPath: "/v1/purge-site-cache"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
};
|
|
49
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
50
|
+
}
|
|
51
|
+
var PACKAGE_NAME = "@wix/auto_sdk_cache_cache";
|
|
52
|
+
function invalidateCache(payload) {
|
|
53
|
+
function __invalidateCache({ host }) {
|
|
54
|
+
const metadata = {
|
|
55
|
+
entityFqdn: "wix.ssr.v1.invalidate_cache_request",
|
|
56
|
+
method: "POST",
|
|
57
|
+
methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache",
|
|
58
|
+
packageName: PACKAGE_NAME,
|
|
59
|
+
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
60
|
+
protoPath: "/v1/invalidate-cache",
|
|
61
|
+
data: payload,
|
|
62
|
+
host
|
|
63
|
+
}),
|
|
64
|
+
data: payload
|
|
65
|
+
};
|
|
66
|
+
return metadata;
|
|
67
|
+
}
|
|
68
|
+
return __invalidateCache;
|
|
69
|
+
}
|
|
70
|
+
function purgeSiteCache(payload) {
|
|
71
|
+
function __purgeSiteCache({ host }) {
|
|
72
|
+
const metadata = {
|
|
73
|
+
entityFqdn: "wix.ssr.v1.invalidate_cache_request",
|
|
74
|
+
method: "POST",
|
|
75
|
+
methodFqn: "com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache",
|
|
76
|
+
packageName: PACKAGE_NAME,
|
|
77
|
+
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
78
|
+
protoPath: "/v1/purge-site-cache",
|
|
79
|
+
data: payload,
|
|
80
|
+
host
|
|
81
|
+
}),
|
|
82
|
+
data: payload
|
|
83
|
+
};
|
|
84
|
+
return metadata;
|
|
85
|
+
}
|
|
86
|
+
return __purgeSiteCache;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// src/ssr-v1-invalidate-cache-request-cache.universal.ts
|
|
90
|
+
async function invalidateCache2(invalidationMethods) {
|
|
91
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
92
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
93
|
+
invalidationMethods
|
|
94
|
+
});
|
|
95
|
+
const reqOpts = invalidateCache(payload);
|
|
96
|
+
sideEffects?.onSiteCall?.();
|
|
97
|
+
try {
|
|
98
|
+
const result = await httpClient.request(reqOpts);
|
|
99
|
+
sideEffects?.onSuccess?.(result);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
102
|
+
err,
|
|
103
|
+
{
|
|
104
|
+
spreadPathsToArguments: {},
|
|
105
|
+
explicitPathsToArguments: { invalidationMethods: "$[0]" },
|
|
106
|
+
singleArgumentUnchanged: false
|
|
107
|
+
},
|
|
108
|
+
["invalidationMethods"]
|
|
109
|
+
);
|
|
110
|
+
sideEffects?.onError?.(err);
|
|
111
|
+
throw transformedError;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async function purgeSiteCache2() {
|
|
115
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
116
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
117
|
+
const reqOpts = purgeSiteCache(payload);
|
|
118
|
+
sideEffects?.onSiteCall?.();
|
|
119
|
+
try {
|
|
120
|
+
const result = await httpClient.request(reqOpts);
|
|
121
|
+
sideEffects?.onSuccess?.(result);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
124
|
+
err,
|
|
125
|
+
{
|
|
126
|
+
spreadPathsToArguments: {},
|
|
127
|
+
explicitPathsToArguments: {},
|
|
128
|
+
singleArgumentUnchanged: false
|
|
129
|
+
},
|
|
130
|
+
[]
|
|
131
|
+
);
|
|
132
|
+
sideEffects?.onError?.(err);
|
|
133
|
+
throw transformedError;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
invalidateCache,
|
|
139
|
+
purgeSiteCache
|
|
140
|
+
});
|
|
18
141
|
//# sourceMappingURL=index.typings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2FAAyE"}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/ssr-v1-invalidate-cache-request-cache.universal.ts","../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"sourcesContent":["export * from './src/ssr-v1-invalidate-cache-request-cache.universal.js';\n","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;AAAA;AAAA,yBAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAAsD;;;ACDtD,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;;;AD7BA,eAAsBC,iBACpB,qBACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;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,uBAAmB,uBAAAC;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,cAAU,qEAAsC,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,uBAAmB,uBAAAD;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","invalidateCache","sdkTransformError","purgeSiteCache"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -1 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
import { InvalidateCacheRequest as InvalidateCacheRequest$1, InvalidateCacheResponse as InvalidateCacheResponse$1, PurgeSiteCacheRequest as PurgeSiteCacheRequest$1, PurgeSiteCacheResponse as PurgeSiteCacheResponse$1 } from './index.typings.js';
|
|
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 };
|