@wix/auto_sdk_seo_seo-patterns 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/build/cjs/index.d.ts +141 -0
  2. package/build/cjs/index.js +455 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +777 -0
  5. package/build/cjs/index.typings.js +398 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +592 -0
  8. package/build/cjs/meta.js +335 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +312 -0
  11. package/build/cjs/schemas.js +717 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +141 -0
  14. package/build/es/index.mjs +423 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +777 -0
  17. package/build/es/index.typings.mjs +366 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +592 -0
  20. package/build/es/meta.mjs +300 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +312 -0
  24. package/build/es/schemas.mjs +669 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +141 -0
  27. package/build/internal/cjs/index.js +455 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +777 -0
  30. package/build/internal/cjs/index.typings.js +398 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +634 -0
  33. package/build/internal/cjs/meta.js +335 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +312 -0
  36. package/build/internal/cjs/schemas.js +717 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +141 -0
  39. package/build/internal/es/index.mjs +423 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +777 -0
  42. package/build/internal/es/index.typings.mjs +366 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +634 -0
  45. package/build/internal/es/meta.mjs +300 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +312 -0
  48. package/build/internal/es/schemas.mjs +669 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,141 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { GetSeoPatternOptions, GetSeoPatternResponse, GetSeoPatternApplicationErrors, ListSeoPatternsResponse, ListSeoPatternVariablesResponse, ListSeoPatternVariablesApplicationErrors, SeoPattern, CreateSeoPatternApplicationErrors, SetSeoPatternOptions, SetSeoPatternResponse, SetSeoPatternApplicationErrors, ResetSeoPatternToDefaultOptions, ResetSeoPatternToDefaultResponse, ResetSeoPatternToDefaultApplicationErrors } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, CreateSeoPatternRequest, CreateSeoPatternResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetSeoPatternRequest, IdentificationData, IdentificationDataIdOneOf, ListSeoPatternVariablesRequest, ListSeoPatternsRequest, MessageEnvelope, Origin, OriginWithLiterals, PatternSource, PatternSourceWithLiterals, ResetSeoPatternToDefaultRequest, RestoreInfo, SeoPatternBlob, SeoPatternVariable, SetSeoPatternRequest, Tag, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
+
5
+ declare function getSeoPattern$1(httpClient: HttpClient): GetSeoPatternSignature;
6
+ interface GetSeoPatternSignature {
7
+ /**
8
+ * Retrieves the SEO pattern in effect for a page type.
9
+ *
10
+ * The response contains both the site's own pattern, which is empty when the site has
11
+ * none, and the Wix default, with `source` reporting which of the two is in effect. A
12
+ * page type with no pattern of its own isn't an error.
13
+ *
14
+ * Fails with `PAGE_TYPE_NOT_ON_SITE` if the page type comes from a Wix app that isn't
15
+ * installed on the site.
16
+ * @param - Page type whose pattern to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
17
+ * `STORES_PRODUCT`.
18
+ */
19
+ (pageType: string, options?: GetSeoPatternOptions): Promise<NonNullablePaths<GetSeoPatternResponse, `seoPattern.pageType` | `seoPattern.pattern.tags` | `seoPattern.pattern.tags.${number}.type` | `seoPattern.pattern.tags.${number}.children` | `seoPattern.pattern.tags.${number}.custom` | `seoPattern.pattern.tags.${number}.disabled` | `seoPattern.source` | `seoPattern.origin`, 6> & {
20
+ __applicationErrorsType?: GetSeoPatternApplicationErrors;
21
+ }>;
22
+ }
23
+ declare function listSeoPatterns$1(httpClient: HttpClient): ListSeoPatternsSignature;
24
+ interface ListSeoPatternsSignature {
25
+ /**
26
+ * Retrieves the patterns stored for a site, one per page type.
27
+ *
28
+ * Only page types that have had a pattern stored are returned, so this isn't an
29
+ * inventory of a site's page types: a page type still on its Wix default is absent.
30
+ * A page type that was reset to its default remains in the list, with an empty
31
+ * `pattern` and `source` of `PATTERN_SOURCE_DEFAULT`.
32
+ *
33
+ * The response isn't paged. A site has a bounded number of page types, and all of them
34
+ * are returned in one call.
35
+ */
36
+ (): Promise<NonNullablePaths<ListSeoPatternsResponse, `seoPatterns` | `seoPatterns.${number}.pageType` | `seoPatterns.${number}.source` | `seoPatterns.${number}.origin`, 4>>;
37
+ }
38
+ declare function listSeoPatternVariables$1(httpClient: HttpClient): ListSeoPatternVariablesSignature;
39
+ interface ListSeoPatternVariablesSignature {
40
+ /**
41
+ * Retrieves the variables a pattern for a page type may reference.
42
+ *
43
+ * A pattern may reference only the variables its page type offers, so call this method
44
+ * before writing a pattern. A pattern referencing any other variable is rejected with
45
+ * `INVALID_PATTERN`.
46
+ *
47
+ * Variables for the page's own tags and variables for its structured data are returned
48
+ * in separate fields, and a pattern may use either.
49
+ *
50
+ * Fails with `PAGE_TYPE_NOT_ON_SITE` if the page type comes from a Wix app that isn't
51
+ * installed on the site.
52
+ * @param - Page type whose variables to retrieve. For example, `STATIC_PAGE`, `BLOG_POST`, or
53
+ * `STORES_PRODUCT`.
54
+ */
55
+ (pageType: string): Promise<NonNullablePaths<ListSeoPatternVariablesResponse, `variables` | `variables.${number}.key` | `variables.${number}.userVisible` | `structuredDataVariables` | `structuredDataVariables.${number}.key` | `structuredDataVariables.${number}.userVisible`, 4> & {
56
+ __applicationErrorsType?: ListSeoPatternVariablesApplicationErrors;
57
+ }>;
58
+ }
59
+ declare function createSeoPattern$1(httpClient: HttpClient): CreateSeoPatternSignature;
60
+ interface CreateSeoPatternSignature {
61
+ /**
62
+ * Creates a pattern for a page type that's still on its Wix default.
63
+ *
64
+ * The pattern must contain at least one tag. An empty pattern is stored and read back
65
+ * as no pattern at all, so it's rejected rather than saved as a pattern that does
66
+ * nothing. To leave a page type on its Wix default, create nothing for it.
67
+ *
68
+ * To change a pattern that already exists, call Set SEO Pattern. Creating a second
69
+ * pattern for the same page type fails with `PATTERN_ALREADY_EXISTS`.
70
+ *
71
+ * Fails with `PAGE_TYPE_NOT_ON_SITE` if the page type comes from a Wix app that isn't
72
+ * installed on the site.
73
+ * @param - Page type whose pattern to create a pattern for. For example, `STATIC_PAGE`, `BLOG_POST`, or
74
+ * `STORES_PRODUCT`.
75
+ * @param - Pattern to create for the page type.
76
+ *
77
+ * `pattern` is the only field to send. The page type comes from the request path, and
78
+ * every other field is read-only. To create a pattern for a single page built from a
79
+ * Wix Data collection, set `pageId`.
80
+ * @returns The created pattern, with `source` reporting that the site's own pattern is now in
81
+ * effect.
82
+ */
83
+ (pageType: string, seoPattern: SeoPattern): Promise<NonNullablePaths<SeoPattern, `pageType` | `pattern.tags` | `pattern.tags.${number}.type` | `pattern.tags.${number}.children` | `pattern.tags.${number}.custom` | `pattern.tags.${number}.disabled` | `source` | `origin`, 5> & {
84
+ __applicationErrorsType?: CreateSeoPatternApplicationErrors;
85
+ }>;
86
+ }
87
+ declare function setSeoPattern$1(httpClient: HttpClient): SetSeoPatternSignature;
88
+ interface SetSeoPatternSignature {
89
+ /**
90
+ * Changes the pattern a site has for a page type.
91
+ *
92
+ * Setting `pattern` replaces the page type's tag templates in full, so retrieve the
93
+ * pattern first and send back the complete set you want it to have. Sending an empty
94
+ * pattern clears it, which returns the page type to its Wix default.
95
+ *
96
+ * This method changes a pattern that already exists rather than creating one, so a page
97
+ * type still on its Wix default fails with `PATTERN_NOT_FOUND`. Call Create SEO Pattern
98
+ * for it instead.
99
+ *
100
+ * A pattern has no revision, and the site's SEO settings in the dashboard write to the
101
+ * same pattern. The last write wins, so retrieve the pattern immediately before writing
102
+ * it.
103
+ * @param - Page type whose pattern to change. For example, `STATIC_PAGE`, `BLOG_POST`, or
104
+ * `STORES_PRODUCT`.
105
+ * @param - Pattern to set for the page type.
106
+ *
107
+ * `pattern` is the only writable field, and setting it replaces the page type's tag
108
+ * templates in full. Sending an empty pattern clears it, which returns the page type to
109
+ * its Wix default.
110
+ */
111
+ (pageType: string, seoPattern: SeoPattern, options?: NonNullablePaths<SetSeoPatternOptions, `fieldMask`, 2>): Promise<NonNullablePaths<SetSeoPatternResponse, `seoPattern.pageType` | `seoPattern.pattern.tags` | `seoPattern.pattern.tags.${number}.type` | `seoPattern.pattern.tags.${number}.children` | `seoPattern.pattern.tags.${number}.custom` | `seoPattern.pattern.tags.${number}.disabled` | `seoPattern.source` | `seoPattern.origin`, 6> & {
112
+ __applicationErrorsType?: SetSeoPatternApplicationErrors;
113
+ }>;
114
+ }
115
+ declare function resetSeoPatternToDefault$1(httpClient: HttpClient): ResetSeoPatternToDefaultSignature;
116
+ interface ResetSeoPatternToDefaultSignature {
117
+ /**
118
+ * Removes the pattern a site has for a page type, so the Wix default applies again.
119
+ *
120
+ * The response reports the page type after the reset, with an empty `pattern` and
121
+ * `source` of `PATTERN_SOURCE_DEFAULT`. The page type remains in the response of List
122
+ * SEO Patterns, with the same empty pattern.
123
+ *
124
+ * Fails with `PATTERN_NOT_FOUND` if the page type is already on its Wix default, so
125
+ * there's nothing to reset.
126
+ * @param - Page type whose pattern to reset. For example, `STATIC_PAGE`, `BLOG_POST`, or
127
+ * `STORES_PRODUCT`.
128
+ */
129
+ (pageType: string, options?: ResetSeoPatternToDefaultOptions): Promise<NonNullablePaths<ResetSeoPatternToDefaultResponse, `seoPattern.pageType` | `seoPattern.pattern.tags` | `seoPattern.pattern.tags.${number}.type` | `seoPattern.pattern.tags.${number}.children` | `seoPattern.pattern.tags.${number}.custom` | `seoPattern.pattern.tags.${number}.disabled` | `seoPattern.source` | `seoPattern.origin`, 6> & {
130
+ __applicationErrorsType?: ResetSeoPatternToDefaultApplicationErrors;
131
+ }>;
132
+ }
133
+
134
+ declare const getSeoPattern: MaybeContext<BuildRESTFunction<typeof getSeoPattern$1> & typeof getSeoPattern$1>;
135
+ declare const listSeoPatterns: MaybeContext<BuildRESTFunction<typeof listSeoPatterns$1> & typeof listSeoPatterns$1>;
136
+ declare const listSeoPatternVariables: MaybeContext<BuildRESTFunction<typeof listSeoPatternVariables$1> & typeof listSeoPatternVariables$1>;
137
+ declare const createSeoPattern: MaybeContext<BuildRESTFunction<typeof createSeoPattern$1> & typeof createSeoPattern$1>;
138
+ declare const setSeoPattern: MaybeContext<BuildRESTFunction<typeof setSeoPattern$1> & typeof setSeoPattern$1>;
139
+ declare const resetSeoPatternToDefault: MaybeContext<BuildRESTFunction<typeof resetSeoPatternToDefault$1> & typeof resetSeoPatternToDefault$1>;
140
+
141
+ export { CreateSeoPatternApplicationErrors, GetSeoPatternApplicationErrors, GetSeoPatternOptions, GetSeoPatternResponse, ListSeoPatternVariablesApplicationErrors, ListSeoPatternVariablesResponse, ListSeoPatternsResponse, ResetSeoPatternToDefaultApplicationErrors, ResetSeoPatternToDefaultOptions, ResetSeoPatternToDefaultResponse, SeoPattern, SetSeoPatternApplicationErrors, SetSeoPatternOptions, SetSeoPatternResponse, createSeoPattern, getSeoPattern, listSeoPatternVariables, listSeoPatterns, resetSeoPatternToDefault, setSeoPattern };
@@ -0,0 +1,455 @@
1
+ "use strict";
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 });
9
+ };
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
+ Origin: () => Origin,
24
+ PatternSource: () => PatternSource,
25
+ WebhookIdentityType: () => WebhookIdentityType,
26
+ createSeoPattern: () => createSeoPattern4,
27
+ getSeoPattern: () => getSeoPattern4,
28
+ listSeoPatternVariables: () => listSeoPatternVariables4,
29
+ listSeoPatterns: () => listSeoPatterns4,
30
+ resetSeoPatternToDefault: () => resetSeoPatternToDefault4,
31
+ setSeoPattern: () => setSeoPattern4
32
+ });
33
+ module.exports = __toCommonJS(index_exports);
34
+
35
+ // src/promote-seo-v1-seo-pattern-seo-patterns.universal.ts
36
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
37
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
38
+
39
+ // src/promote-seo-v1-seo-pattern-seo-patterns.http.ts
40
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
41
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
42
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
43
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
44
+ function resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl(opts) {
45
+ const domainToMappings = {
46
+ "www.wixapis.com": [
47
+ {
48
+ srcPath: "/seo-metatags-server",
49
+ destPath: ""
50
+ }
51
+ ],
52
+ "manage._base_domain_": [
53
+ {
54
+ srcPath: "/_api/seo-metatags-server",
55
+ destPath: ""
56
+ }
57
+ ]
58
+ };
59
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
60
+ }
61
+ var PACKAGE_NAME = "@wix/auto_sdk_seo_seo-patterns";
62
+ function getSeoPattern(payload) {
63
+ function __getSeoPattern({ host }) {
64
+ const metadata = {
65
+ entityFqdn: "wix.promote.seo.v1.seo_pattern",
66
+ method: "GET",
67
+ methodFqn: "wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.GetSeoPattern",
68
+ packageName: PACKAGE_NAME,
69
+ migrationOptions: {
70
+ optInTransformResponse: true
71
+ },
72
+ url: resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl({
73
+ protoPath: "/v1/seo-patterns/{pageType}",
74
+ data: payload,
75
+ host
76
+ }),
77
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
78
+ };
79
+ return metadata;
80
+ }
81
+ return __getSeoPattern;
82
+ }
83
+ function listSeoPatterns(payload) {
84
+ function __listSeoPatterns({ host }) {
85
+ const metadata = {
86
+ entityFqdn: "wix.promote.seo.v1.seo_pattern",
87
+ method: "GET",
88
+ methodFqn: "wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.ListSeoPatterns",
89
+ packageName: PACKAGE_NAME,
90
+ migrationOptions: {
91
+ optInTransformResponse: true
92
+ },
93
+ url: resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl({
94
+ protoPath: "/v1/seo-patterns",
95
+ data: payload,
96
+ host
97
+ }),
98
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
99
+ };
100
+ return metadata;
101
+ }
102
+ return __listSeoPatterns;
103
+ }
104
+ function listSeoPatternVariables(payload) {
105
+ function __listSeoPatternVariables({ host }) {
106
+ const metadata = {
107
+ entityFqdn: "wix.promote.seo.v1.seo_pattern",
108
+ method: "GET",
109
+ methodFqn: "wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.ListSeoPatternVariables",
110
+ packageName: PACKAGE_NAME,
111
+ migrationOptions: {
112
+ optInTransformResponse: true
113
+ },
114
+ url: resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl({
115
+ protoPath: "/v1/seo-patterns/{pageType}/variables",
116
+ data: payload,
117
+ host
118
+ }),
119
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
120
+ };
121
+ return metadata;
122
+ }
123
+ return __listSeoPatternVariables;
124
+ }
125
+ function createSeoPattern(payload) {
126
+ function __createSeoPattern({ host }) {
127
+ const metadata = {
128
+ entityFqdn: "wix.promote.seo.v1.seo_pattern",
129
+ method: "POST",
130
+ methodFqn: "wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.CreateSeoPattern",
131
+ packageName: PACKAGE_NAME,
132
+ migrationOptions: {
133
+ optInTransformResponse: true
134
+ },
135
+ url: resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl({
136
+ protoPath: "/v1/seo-patterns/{pageType}",
137
+ data: payload,
138
+ host
139
+ }),
140
+ data: payload
141
+ };
142
+ return metadata;
143
+ }
144
+ return __createSeoPattern;
145
+ }
146
+ function setSeoPattern(payload) {
147
+ function __setSeoPattern({ host }) {
148
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
149
+ {
150
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
151
+ paths: [{ path: "fieldMask" }]
152
+ }
153
+ ]);
154
+ const metadata = {
155
+ entityFqdn: "wix.promote.seo.v1.seo_pattern",
156
+ method: "PATCH",
157
+ methodFqn: "wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.SetSeoPattern",
158
+ packageName: PACKAGE_NAME,
159
+ migrationOptions: {
160
+ optInTransformResponse: true
161
+ },
162
+ url: resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl({
163
+ protoPath: "/v1/seo-patterns/{pageType}",
164
+ data: serializedData,
165
+ host
166
+ }),
167
+ data: serializedData
168
+ };
169
+ return metadata;
170
+ }
171
+ return __setSeoPattern;
172
+ }
173
+ function resetSeoPatternToDefault(payload) {
174
+ function __resetSeoPatternToDefault({ host }) {
175
+ const metadata = {
176
+ entityFqdn: "wix.promote.seo.v1.seo_pattern",
177
+ method: "POST",
178
+ methodFqn: "wix.promote.seo.metatags.v1.PageTypeSeoPatternsService.ResetSeoPatternToDefault",
179
+ packageName: PACKAGE_NAME,
180
+ migrationOptions: {
181
+ optInTransformResponse: true
182
+ },
183
+ url: resolveWixPromoteSeoMetatagsV1PageTypeSeoPatternsServiceUrl({
184
+ protoPath: "/v1/seo-patterns/{pageType}/reset-to-default",
185
+ data: payload,
186
+ host
187
+ }),
188
+ data: payload
189
+ };
190
+ return metadata;
191
+ }
192
+ return __resetSeoPatternToDefault;
193
+ }
194
+
195
+ // src/promote-seo-v1-seo-pattern-seo-patterns.universal.ts
196
+ var PatternSource = /* @__PURE__ */ ((PatternSource2) => {
197
+ PatternSource2["PATTERN_SOURCE_UNSPECIFIED"] = "PATTERN_SOURCE_UNSPECIFIED";
198
+ PatternSource2["PATTERN_SOURCE_USER"] = "PATTERN_SOURCE_USER";
199
+ PatternSource2["PATTERN_SOURCE_DEFAULT"] = "PATTERN_SOURCE_DEFAULT";
200
+ return PatternSource2;
201
+ })(PatternSource || {});
202
+ var Origin = /* @__PURE__ */ ((Origin2) => {
203
+ Origin2["ORIGIN_UNSPECIFIED"] = "ORIGIN_UNSPECIFIED";
204
+ Origin2["ORIGIN_USER"] = "ORIGIN_USER";
205
+ Origin2["ORIGIN_MIGRATION"] = "ORIGIN_MIGRATION";
206
+ Origin2["ORIGIN_AI"] = "ORIGIN_AI";
207
+ return Origin2;
208
+ })(Origin || {});
209
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
210
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
211
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
212
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
213
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
214
+ WebhookIdentityType2["APP"] = "APP";
215
+ return WebhookIdentityType2;
216
+ })(WebhookIdentityType || {});
217
+ async function getSeoPattern2(pageType, options) {
218
+ const { httpClient, sideEffects } = arguments[2];
219
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
220
+ pageType,
221
+ pageId: options?.pageId,
222
+ collectionName: options?.collectionName
223
+ });
224
+ const reqOpts = getSeoPattern(payload);
225
+ sideEffects?.onSiteCall?.();
226
+ try {
227
+ const result = await httpClient.request(reqOpts);
228
+ sideEffects?.onSuccess?.(result);
229
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
230
+ } catch (err) {
231
+ const transformedError = (0, import_transform_error.transformError)(
232
+ err,
233
+ {
234
+ spreadPathsToArguments: {},
235
+ explicitPathsToArguments: {
236
+ pageType: "$[0]",
237
+ pageId: "$[1].pageId",
238
+ collectionName: "$[1].collectionName"
239
+ },
240
+ singleArgumentUnchanged: false
241
+ },
242
+ ["pageType", "options"]
243
+ );
244
+ sideEffects?.onError?.(err);
245
+ throw transformedError;
246
+ }
247
+ }
248
+ async function listSeoPatterns2() {
249
+ const { httpClient, sideEffects } = arguments[0];
250
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
251
+ const reqOpts = listSeoPatterns(payload);
252
+ sideEffects?.onSiteCall?.();
253
+ try {
254
+ const result = await httpClient.request(reqOpts);
255
+ sideEffects?.onSuccess?.(result);
256
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
257
+ } catch (err) {
258
+ const transformedError = (0, import_transform_error.transformError)(
259
+ err,
260
+ {
261
+ spreadPathsToArguments: {},
262
+ explicitPathsToArguments: {},
263
+ singleArgumentUnchanged: false
264
+ },
265
+ []
266
+ );
267
+ sideEffects?.onError?.(err);
268
+ throw transformedError;
269
+ }
270
+ }
271
+ async function listSeoPatternVariables2(pageType) {
272
+ const { httpClient, sideEffects } = arguments[1];
273
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ pageType });
274
+ const reqOpts = listSeoPatternVariables(payload);
275
+ sideEffects?.onSiteCall?.();
276
+ try {
277
+ const result = await httpClient.request(reqOpts);
278
+ sideEffects?.onSuccess?.(result);
279
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
280
+ } catch (err) {
281
+ const transformedError = (0, import_transform_error.transformError)(
282
+ err,
283
+ {
284
+ spreadPathsToArguments: {},
285
+ explicitPathsToArguments: { pageType: "$[0]" },
286
+ singleArgumentUnchanged: false
287
+ },
288
+ ["pageType"]
289
+ );
290
+ sideEffects?.onError?.(err);
291
+ throw transformedError;
292
+ }
293
+ }
294
+ async function createSeoPattern2(pageType, seoPattern) {
295
+ const { httpClient, sideEffects } = arguments[2];
296
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
297
+ pageType,
298
+ seoPattern
299
+ });
300
+ const reqOpts = createSeoPattern(payload);
301
+ sideEffects?.onSiteCall?.();
302
+ try {
303
+ const result = await httpClient.request(reqOpts);
304
+ sideEffects?.onSuccess?.(result);
305
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.seoPattern;
306
+ } catch (err) {
307
+ const transformedError = (0, import_transform_error.transformError)(
308
+ err,
309
+ {
310
+ spreadPathsToArguments: {},
311
+ explicitPathsToArguments: { pageType: "$[0]", seoPattern: "$[1]" },
312
+ singleArgumentUnchanged: false
313
+ },
314
+ ["pageType", "seoPattern"]
315
+ );
316
+ sideEffects?.onError?.(err);
317
+ throw transformedError;
318
+ }
319
+ }
320
+ async function setSeoPattern2(pageType, seoPattern, options) {
321
+ const { httpClient, sideEffects } = arguments[3];
322
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
323
+ pageType,
324
+ seoPattern,
325
+ fieldMask: options?.fieldMask,
326
+ collectionName: options?.collectionName,
327
+ pageId: options?.pageId
328
+ });
329
+ const reqOpts = setSeoPattern(payload);
330
+ sideEffects?.onSiteCall?.();
331
+ try {
332
+ const result = await httpClient.request(reqOpts);
333
+ sideEffects?.onSuccess?.(result);
334
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
335
+ } catch (err) {
336
+ const transformedError = (0, import_transform_error.transformError)(
337
+ err,
338
+ {
339
+ spreadPathsToArguments: {},
340
+ explicitPathsToArguments: {
341
+ pageType: "$[0]",
342
+ seoPattern: "$[1]",
343
+ fieldMask: "$[2].fieldMask",
344
+ collectionName: "$[2].collectionName",
345
+ pageId: "$[2].pageId"
346
+ },
347
+ singleArgumentUnchanged: false
348
+ },
349
+ ["pageType", "seoPattern", "options"]
350
+ );
351
+ sideEffects?.onError?.(err);
352
+ throw transformedError;
353
+ }
354
+ }
355
+ async function resetSeoPatternToDefault2(pageType, options) {
356
+ const { httpClient, sideEffects } = arguments[2];
357
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
358
+ pageType,
359
+ collectionName: options?.collectionName,
360
+ pageId: options?.pageId
361
+ });
362
+ const reqOpts = resetSeoPatternToDefault(payload);
363
+ sideEffects?.onSiteCall?.();
364
+ try {
365
+ const result = await httpClient.request(reqOpts);
366
+ sideEffects?.onSuccess?.(result);
367
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
368
+ } catch (err) {
369
+ const transformedError = (0, import_transform_error.transformError)(
370
+ err,
371
+ {
372
+ spreadPathsToArguments: {},
373
+ explicitPathsToArguments: {
374
+ pageType: "$[0]",
375
+ collectionName: "$[1].collectionName",
376
+ pageId: "$[1].pageId"
377
+ },
378
+ singleArgumentUnchanged: false
379
+ },
380
+ ["pageType", "options"]
381
+ );
382
+ sideEffects?.onError?.(err);
383
+ throw transformedError;
384
+ }
385
+ }
386
+
387
+ // src/promote-seo-v1-seo-pattern-seo-patterns.public.ts
388
+ function getSeoPattern3(httpClient) {
389
+ return (pageType, options) => getSeoPattern2(
390
+ pageType,
391
+ options,
392
+ // @ts-ignore
393
+ { httpClient }
394
+ );
395
+ }
396
+ function listSeoPatterns3(httpClient) {
397
+ return () => listSeoPatterns2(
398
+ // @ts-ignore
399
+ { httpClient }
400
+ );
401
+ }
402
+ function listSeoPatternVariables3(httpClient) {
403
+ return (pageType) => listSeoPatternVariables2(
404
+ pageType,
405
+ // @ts-ignore
406
+ { httpClient }
407
+ );
408
+ }
409
+ function createSeoPattern3(httpClient) {
410
+ return (pageType, seoPattern) => createSeoPattern2(
411
+ pageType,
412
+ seoPattern,
413
+ // @ts-ignore
414
+ { httpClient }
415
+ );
416
+ }
417
+ function setSeoPattern3(httpClient) {
418
+ return (pageType, seoPattern, options) => setSeoPattern2(
419
+ pageType,
420
+ seoPattern,
421
+ options,
422
+ // @ts-ignore
423
+ { httpClient }
424
+ );
425
+ }
426
+ function resetSeoPatternToDefault3(httpClient) {
427
+ return (pageType, options) => resetSeoPatternToDefault2(
428
+ pageType,
429
+ options,
430
+ // @ts-ignore
431
+ { httpClient }
432
+ );
433
+ }
434
+
435
+ // src/promote-seo-v1-seo-pattern-seo-patterns.context.ts
436
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
437
+ var getSeoPattern4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSeoPattern3);
438
+ var listSeoPatterns4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSeoPatterns3);
439
+ var listSeoPatternVariables4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSeoPatternVariables3);
440
+ var createSeoPattern4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createSeoPattern3);
441
+ var setSeoPattern4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setSeoPattern3);
442
+ var resetSeoPatternToDefault4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(resetSeoPatternToDefault3);
443
+ // Annotate the CommonJS export names for ESM import in node:
444
+ 0 && (module.exports = {
445
+ Origin,
446
+ PatternSource,
447
+ WebhookIdentityType,
448
+ createSeoPattern,
449
+ getSeoPattern,
450
+ listSeoPatternVariables,
451
+ listSeoPatterns,
452
+ resetSeoPatternToDefault,
453
+ setSeoPattern
454
+ });
455
+ //# sourceMappingURL=index.js.map