@wix/auto_sdk_seo_redirects 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_seo_redirects",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -21,23 +21,16 @@
21
21
  "import": "./build/es/meta.mjs",
22
22
  "require": "./build/cjs/meta.js",
23
23
  "types": "./build/es/meta.d.mts"
24
- },
25
- "./schemas": {
26
- "import": "./build/es/schemas.mjs",
27
- "require": "./build/cjs/schemas.js",
28
- "types": "./build/es/schemas.d.mts"
29
24
  }
30
25
  },
31
26
  "files": [
32
27
  "build",
33
28
  "meta",
34
- "service-plugins",
35
- "schemas"
29
+ "service-plugins"
36
30
  ],
37
31
  "dependencies": {
38
32
  "@wix/sdk-runtime": "^1.0.24",
39
- "@wix/sdk-types": "^1.17.11",
40
- "zod": "^4.3.6"
33
+ "@wix/sdk-types": "^1.17.11"
41
34
  },
42
35
  "devDependencies": {
43
36
  "tsup": "^8.4.0",
@@ -57,5 +50,5 @@
57
50
  "fqdn": "wix.promote.seo.v1.redirect"
58
51
  }
59
52
  },
60
- "falconPackageHash": "947c075a1aa416176aebeeca5a6c163982142284a8d0ef0c3affa9be"
53
+ "falconPackageHash": "e5652be3cc01d0464b741cda6497aff3d1893571dc55fec8a480c1cf"
61
54
  }
@@ -1,140 +0,0 @@
1
- import * as z from 'zod';
2
-
3
- declare const BulkDeleteRedirectsRequest: z.ZodObject<{
4
- redirectIds: z.ZodArray<z.ZodString>;
5
- }, z.core.$strip>;
6
- declare const BulkDeleteRedirectsResponse: z.ZodObject<{
7
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
8
- itemMetadata: z.ZodOptional<z.ZodObject<{
9
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
- originalIndex: z.ZodOptional<z.ZodNumber>;
11
- success: z.ZodOptional<z.ZodBoolean>;
12
- error: z.ZodOptional<z.ZodObject<{
13
- code: z.ZodOptional<z.ZodString>;
14
- description: z.ZodOptional<z.ZodString>;
15
- data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
16
- }, z.core.$strip>>;
17
- }, z.core.$strip>>;
18
- item: z.ZodOptional<z.ZodObject<{
19
- from: z.ZodOptional<z.ZodString>;
20
- to: z.ZodOptional<z.ZodString>;
21
- options: z.ZodOptional<z.ZodObject<{
22
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
23
- }, z.core.$strip>>;
24
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
25
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
26
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
27
- }, z.core.$strip>>;
28
- }, z.core.$strip>>>;
29
- bulkActionMetadata: z.ZodOptional<z.ZodObject<{
30
- totalSuccesses: z.ZodOptional<z.ZodNumber>;
31
- totalFailures: z.ZodOptional<z.ZodNumber>;
32
- undetailedFailures: z.ZodOptional<z.ZodNumber>;
33
- }, z.core.$strip>>;
34
- }, z.core.$strip>;
35
- declare const ListRedirectsRequest: z.ZodObject<{}, z.core.$strip>;
36
- declare const ListRedirectsResponse: z.ZodObject<{
37
- redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
38
- from: z.ZodOptional<z.ZodString>;
39
- to: z.ZodOptional<z.ZodString>;
40
- options: z.ZodOptional<z.ZodObject<{
41
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
42
- }, z.core.$strip>>;
43
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
44
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
45
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
46
- }, z.core.$strip>>>;
47
- }, z.core.$strip>;
48
- declare const GetRedirectRequest: z.ZodObject<{
49
- redirectId: z.ZodString;
50
- }, z.core.$strip>;
51
- declare const GetRedirectResponse: z.ZodObject<{
52
- from: z.ZodOptional<z.ZodString>;
53
- to: z.ZodOptional<z.ZodString>;
54
- options: z.ZodOptional<z.ZodObject<{
55
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
56
- }, z.core.$strip>>;
57
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
58
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
59
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
60
- }, z.core.$strip>;
61
- declare const BulkCreateRedirectsRequest: z.ZodObject<{
62
- redirects: z.ZodArray<z.ZodObject<{
63
- from: z.ZodOptional<z.ZodString>;
64
- to: z.ZodOptional<z.ZodString>;
65
- options: z.ZodOptional<z.ZodObject<{
66
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
67
- }, z.core.$strip>>;
68
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
69
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
70
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
71
- }, z.core.$strip>>;
72
- options: z.ZodOptional<z.ZodObject<{
73
- returnFullEntity: z.ZodOptional<z.ZodBoolean>;
74
- options: z.ZodOptional<z.ZodObject<{
75
- forceReplace: z.ZodOptional<z.ZodBoolean>;
76
- }, z.core.$strip>>;
77
- }, z.core.$strip>>;
78
- }, z.core.$strip>;
79
- declare const BulkCreateRedirectsResponse: z.ZodObject<{
80
- results: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
- itemMetadata: z.ZodOptional<z.ZodObject<{
82
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
83
- originalIndex: z.ZodOptional<z.ZodNumber>;
84
- success: z.ZodOptional<z.ZodBoolean>;
85
- error: z.ZodOptional<z.ZodObject<{
86
- code: z.ZodOptional<z.ZodString>;
87
- description: z.ZodOptional<z.ZodString>;
88
- data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
89
- }, z.core.$strip>>;
90
- }, z.core.$strip>>;
91
- item: z.ZodOptional<z.ZodObject<{
92
- from: z.ZodOptional<z.ZodString>;
93
- to: z.ZodOptional<z.ZodString>;
94
- options: z.ZodOptional<z.ZodObject<{
95
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
96
- }, z.core.$strip>>;
97
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
98
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
99
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
100
- }, z.core.$strip>>;
101
- }, z.core.$strip>>>;
102
- bulkActionMetadata: z.ZodOptional<z.ZodObject<{
103
- totalSuccesses: z.ZodOptional<z.ZodNumber>;
104
- totalFailures: z.ZodOptional<z.ZodNumber>;
105
- undetailedFailures: z.ZodOptional<z.ZodNumber>;
106
- }, z.core.$strip>>;
107
- }, z.core.$strip>;
108
- declare const CreateRedirectRequest: z.ZodObject<{
109
- redirect: z.ZodObject<{
110
- from: z.ZodOptional<z.ZodString>;
111
- to: z.ZodOptional<z.ZodString>;
112
- options: z.ZodOptional<z.ZodObject<{
113
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
114
- }, z.core.$strip>>;
115
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
116
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
117
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
118
- }, z.core.$strip>;
119
- options: z.ZodOptional<z.ZodObject<{
120
- options: z.ZodOptional<z.ZodObject<{
121
- forceReplace: z.ZodOptional<z.ZodBoolean>;
122
- }, z.core.$strip>>;
123
- }, z.core.$strip>>;
124
- }, z.core.$strip>;
125
- declare const CreateRedirectResponse: z.ZodObject<{
126
- from: z.ZodOptional<z.ZodString>;
127
- to: z.ZodOptional<z.ZodString>;
128
- options: z.ZodOptional<z.ZodObject<{
129
- groupRedirect: z.ZodOptional<z.ZodBoolean>;
130
- }, z.core.$strip>>;
131
- language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
132
- _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
133
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
134
- }, z.core.$strip>;
135
- declare const DeleteRedirectRequest: z.ZodObject<{
136
- redirectId: z.ZodString;
137
- }, z.core.$strip>;
138
- declare const DeleteRedirectResponse: z.ZodObject<{}, z.core.$strip>;
139
-
140
- export { BulkCreateRedirectsRequest, BulkCreateRedirectsResponse, BulkDeleteRedirectsRequest, BulkDeleteRedirectsResponse, CreateRedirectRequest, CreateRedirectResponse, DeleteRedirectRequest, DeleteRedirectResponse, GetRedirectRequest, GetRedirectResponse, ListRedirectsRequest, ListRedirectsResponse };
@@ -1,356 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // schemas.ts
31
- var schemas_exports = {};
32
- __export(schemas_exports, {
33
- BulkCreateRedirectsRequest: () => BulkCreateRedirectsRequest,
34
- BulkCreateRedirectsResponse: () => BulkCreateRedirectsResponse,
35
- BulkDeleteRedirectsRequest: () => BulkDeleteRedirectsRequest,
36
- BulkDeleteRedirectsResponse: () => BulkDeleteRedirectsResponse,
37
- CreateRedirectRequest: () => CreateRedirectRequest,
38
- CreateRedirectResponse: () => CreateRedirectResponse,
39
- DeleteRedirectRequest: () => DeleteRedirectRequest,
40
- DeleteRedirectResponse: () => DeleteRedirectResponse,
41
- GetRedirectRequest: () => GetRedirectRequest,
42
- GetRedirectResponse: () => GetRedirectResponse,
43
- ListRedirectsRequest: () => ListRedirectsRequest,
44
- ListRedirectsResponse: () => ListRedirectsResponse
45
- });
46
- module.exports = __toCommonJS(schemas_exports);
47
-
48
- // src/promote-seo-v1-redirect-redirects.schemas.ts
49
- var z = __toESM(require("zod"));
50
- var BulkDeleteRedirectsRequest = /* @__PURE__ */ z.object({
51
- redirectIds: z.array(z.string()).min(1).max(500)
52
- });
53
- var BulkDeleteRedirectsResponse = /* @__PURE__ */ z.object({
54
- results: z.array(
55
- z.object({
56
- itemMetadata: z.object({
57
- _id: z.string().describe(
58
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
59
- ).max(100).optional().nullable(),
60
- originalIndex: z.number().int().describe(
61
- "Index of the item within the request array. Allows for correlation between request and response items."
62
- ).optional(),
63
- success: z.boolean().describe(
64
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
65
- ).optional(),
66
- error: z.object({
67
- code: z.string().describe("Error code.").optional(),
68
- description: z.string().describe("Description of the error.").optional(),
69
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
70
- }).describe("Details about the error in case of failure.").optional()
71
- }).describe(
72
- "Whether this redirect succeeded, its position in the request as `originalIndex`, and the error\nif it failed.\n\nA redirect that already exists on the site is reported as a success with no `id`, and nothing is\nwritten for it."
73
- ).optional(),
74
- item: z.object({
75
- from: z.string().describe(
76
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
77
- ).max(950).optional(),
78
- to: z.string().describe(
79
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
80
- ).max(4096).optional(),
81
- options: z.object({
82
- groupRedirect: z.boolean().describe(
83
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
84
- ).optional()
85
- }).describe(
86
- "How the redirect matches the paths a visitor requests."
87
- ).optional(),
88
- language: z.string().describe(
89
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
90
- ).min(2).max(5).optional().nullable(),
91
- _id: z.string().describe(
92
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
93
- ).regex(
94
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
95
- "Must be a valid GUID"
96
- ).optional().nullable(),
97
- _createdDate: z.date().describe(
98
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
99
- ).optional().nullable()
100
- }).describe(
101
- "Created redirect.\n\nReturned only when `returnFullEntity` is `true` in the request. Never returned by Bulk Delete\nRedirects."
102
- ).optional()
103
- })
104
- ).max(500).optional(),
105
- bulkActionMetadata: z.object({
106
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
107
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
108
- undetailedFailures: z.number().int().describe(
109
- "Number of failures without details because detailed failure threshold was exceeded."
110
- ).optional()
111
- }).describe("Number of redirects deleted and number that failed.").optional()
112
- });
113
- var ListRedirectsRequest = /* @__PURE__ */ z.object({});
114
- var ListRedirectsResponse = /* @__PURE__ */ z.object({
115
- redirects: z.array(
116
- z.object({
117
- from: z.string().describe(
118
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
119
- ).max(950).optional(),
120
- to: z.string().describe(
121
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
122
- ).max(4096).optional(),
123
- options: z.object({
124
- groupRedirect: z.boolean().describe(
125
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
126
- ).optional()
127
- }).describe("How the redirect matches the paths a visitor requests.").optional(),
128
- language: z.string().describe(
129
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
130
- ).min(2).max(5).optional().nullable(),
131
- _id: z.string().describe(
132
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
133
- ).regex(
134
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
135
- "Must be a valid GUID"
136
- ).optional().nullable(),
137
- _createdDate: z.date().describe(
138
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
139
- ).optional().nullable()
140
- })
141
- ).optional()
142
- });
143
- var GetRedirectRequest = /* @__PURE__ */ z.object({
144
- redirectId: z.string().describe("ID of the redirect to retrieve.").regex(
145
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
146
- "Must be a valid GUID"
147
- )
148
- });
149
- var GetRedirectResponse = /* @__PURE__ */ z.object({
150
- from: z.string().describe(
151
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
152
- ).max(950).optional(),
153
- to: z.string().describe(
154
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
155
- ).max(4096).optional(),
156
- options: z.object({
157
- groupRedirect: z.boolean().describe(
158
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
159
- ).optional()
160
- }).describe("How the redirect matches the paths a visitor requests.").optional(),
161
- language: z.string().describe(
162
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
163
- ).min(2).max(5).optional().nullable(),
164
- _id: z.string().describe(
165
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
166
- ).regex(
167
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
168
- "Must be a valid GUID"
169
- ).optional().nullable(),
170
- _createdDate: z.date().describe(
171
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
172
- ).optional().nullable()
173
- });
174
- var BulkCreateRedirectsRequest = /* @__PURE__ */ z.object({
175
- redirects: z.array(
176
- z.object({
177
- from: z.string().describe(
178
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
179
- ).max(950).optional(),
180
- to: z.string().describe(
181
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
182
- ).max(4096).optional(),
183
- options: z.object({
184
- groupRedirect: z.boolean().describe(
185
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
186
- ).optional()
187
- }).describe("How the redirect matches the paths a visitor requests.").optional(),
188
- language: z.string().describe(
189
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
190
- ).min(2).max(5).optional().nullable(),
191
- _id: z.string().describe(
192
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
193
- ).regex(
194
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
195
- "Must be a valid GUID"
196
- ).optional().nullable(),
197
- _createdDate: z.date().describe(
198
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
199
- ).optional().nullable()
200
- })
201
- ).min(1).max(100),
202
- options: z.object({
203
- returnFullEntity: z.boolean().describe(
204
- "Whether to return the created redirects in `results[].item`, and not only their metadata.\n\nDefault: `false`"
205
- ).optional(),
206
- options: z.object({
207
- forceReplace: z.boolean().describe(
208
- "Whether to delete a redirect on the site that already starts from the same `from` path and\ncreate the new one in its place. When `false`, a redirect whose `from` path is taken fails with\n`FROM_URL_EXISTS` while the rest of the request goes ahead.\n\nApplies only to redirects already on the site. A redirect that clashes with an earlier redirect\nin the same request always fails. The replaced redirect is deleted for good, so retrieve it\nfirst if you might need to restore it.\n\nDefault: `false`"
209
- ).optional()
210
- }).describe("Extra options for creating the redirects.").optional()
211
- }).optional()
212
- });
213
- var BulkCreateRedirectsResponse = /* @__PURE__ */ z.object({
214
- results: z.array(
215
- z.object({
216
- itemMetadata: z.object({
217
- _id: z.string().describe(
218
- "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
219
- ).max(100).optional().nullable(),
220
- originalIndex: z.number().int().describe(
221
- "Index of the item within the request array. Allows for correlation between request and response items."
222
- ).optional(),
223
- success: z.boolean().describe(
224
- "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
225
- ).optional(),
226
- error: z.object({
227
- code: z.string().describe("Error code.").optional(),
228
- description: z.string().describe("Description of the error.").optional(),
229
- data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
230
- }).describe("Details about the error in case of failure.").optional()
231
- }).describe(
232
- "Whether this redirect succeeded, its position in the request as `originalIndex`, and the error\nif it failed.\n\nA redirect that already exists on the site is reported as a success with no `id`, and nothing is\nwritten for it."
233
- ).optional(),
234
- item: z.object({
235
- from: z.string().describe(
236
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
237
- ).max(950).optional(),
238
- to: z.string().describe(
239
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
240
- ).max(4096).optional(),
241
- options: z.object({
242
- groupRedirect: z.boolean().describe(
243
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
244
- ).optional()
245
- }).describe(
246
- "How the redirect matches the paths a visitor requests."
247
- ).optional(),
248
- language: z.string().describe(
249
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
250
- ).min(2).max(5).optional().nullable(),
251
- _id: z.string().describe(
252
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
253
- ).regex(
254
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
255
- "Must be a valid GUID"
256
- ).optional().nullable(),
257
- _createdDate: z.date().describe(
258
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
259
- ).optional().nullable()
260
- }).describe(
261
- "Created redirect.\n\nReturned only when `returnFullEntity` is `true` in the request. Never returned by Bulk Delete\nRedirects."
262
- ).optional()
263
- })
264
- ).max(100).optional(),
265
- bulkActionMetadata: z.object({
266
- totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
267
- totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
268
- undetailedFailures: z.number().int().describe(
269
- "Number of failures without details because detailed failure threshold was exceeded."
270
- ).optional()
271
- }).describe(
272
- "Number of redirects created and number that failed.\n\n`undetailedFailures` counts redirects whose outcome is unknown. They may or may not have been\ncreated, and they carry no error, so call [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to check them."
273
- ).optional()
274
- });
275
- var CreateRedirectRequest = /* @__PURE__ */ z.object({
276
- redirect: z.object({
277
- from: z.string().describe(
278
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
279
- ).max(950).optional(),
280
- to: z.string().describe(
281
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
282
- ).max(4096).optional(),
283
- options: z.object({
284
- groupRedirect: z.boolean().describe(
285
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
286
- ).optional()
287
- }).describe("How the redirect matches the paths a visitor requests.").optional(),
288
- language: z.string().describe(
289
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
290
- ).min(2).max(5).optional().nullable(),
291
- _id: z.string().describe(
292
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
293
- ).regex(
294
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
295
- "Must be a valid GUID"
296
- ).optional().nullable(),
297
- _createdDate: z.date().describe(
298
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
299
- ).optional().nullable()
300
- }).describe("Redirect to create."),
301
- options: z.object({
302
- options: z.object({
303
- forceReplace: z.boolean().describe(
304
- "Whether to delete the redirect that already starts from the same `from` path and create the new\none in its place. When `false`, a taken `from` path fails the call with `FROM_URL_EXISTS`.\n\nThe replaced redirect is deleted for good, so retrieve it first if you might need to restore it.\n\nDefault: `false`"
305
- ).optional()
306
- }).describe("Extra options for creating the redirect.").optional()
307
- }).optional()
308
- });
309
- var CreateRedirectResponse = /* @__PURE__ */ z.object({
310
- from: z.string().describe(
311
- "Path on the site that the redirect starts from, URL-encoded. For example, `/old-page`.\n\nCan't be the site root. A path that differs from another redirect's `from` path only by a\ntrailing slash counts as the same path.\n\nFor a redirect scoped to a `language`, specify the path with or without the language prefix:\nthe prefix is stripped, so a `fr` redirect from `/fr/about` is stored and returned as `/about`."
312
- ).max(950).optional(),
313
- to: z.string().describe(
314
- "Where the redirect sends the visitor, URL-encoded. Either a path on the site, such as\n`/new-page`, or a full URL, such as `https://example.com/page`."
315
- ).max(4096).optional(),
316
- options: z.object({
317
- groupRedirect: z.boolean().describe(
318
- "Whether the redirect matches every path under its `from` path, carrying the rest of the URL\nover to the target. For example, a group redirect from `/forum/questions/` to `/forum/faqs/`\nsends `/forum/questions/my-post` to `/forum/faqs/my-post`. When `false`, only the exact `from`\npath matches.\n\nA group redirect and an exact redirect that share a `from` path are two different redirects.\n\nDefault: `false`"
319
- ).optional()
320
- }).describe("How the redirect matches the paths a visitor requests.").optional(),
321
- language: z.string().describe(
322
- "Language version of a multilingual site that the redirect applies to, as a 2-letter language\ncode or a language tag. For example, `fr` or `en-US`.\n\nWhen omitted, the redirect applies to every language on the site. A redirect scoped to a\nlanguage conflicts only with redirects in the same language and with redirects that apply to\nevery language.\n\nDeleting a redirect scoped to a language stops it taking effect, but it can still appear in\n[List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects)."
323
- ).min(2).max(5).optional().nullable(),
324
- _id: z.string().describe(
325
- "Redirect ID.\n\nYou can specify your own ID when creating a redirect. When omitted, an ID is generated."
326
- ).regex(
327
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
328
- "Must be a valid GUID"
329
- ).optional().nullable(),
330
- _createdDate: z.date().describe(
331
- "Date and time the redirect was created.\n\nNot returned by [Create Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/create-redirect). Call [Get Redirect](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/get-redirect) or [List Redirects](https://dev.wix.com/docs/api-reference/business-management/seo/redirects/redirect-v1/list-redirects) to retrieve it."
332
- ).optional().nullable()
333
- });
334
- var DeleteRedirectRequest = /* @__PURE__ */ z.object({
335
- redirectId: z.string().describe("ID of the redirect to delete.").regex(
336
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
337
- "Must be a valid GUID"
338
- )
339
- });
340
- var DeleteRedirectResponse = /* @__PURE__ */ z.object({});
341
- // Annotate the CommonJS export names for ESM import in node:
342
- 0 && (module.exports = {
343
- BulkCreateRedirectsRequest,
344
- BulkCreateRedirectsResponse,
345
- BulkDeleteRedirectsRequest,
346
- BulkDeleteRedirectsResponse,
347
- CreateRedirectRequest,
348
- CreateRedirectResponse,
349
- DeleteRedirectRequest,
350
- DeleteRedirectResponse,
351
- GetRedirectRequest,
352
- GetRedirectResponse,
353
- ListRedirectsRequest,
354
- ListRedirectsResponse
355
- });
356
- //# sourceMappingURL=schemas.js.map