@wix/auto_sdk_seo_redirects 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 +159 -0
  2. package/build/cjs/index.js +524 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +787 -0
  5. package/build/cjs/index.typings.js +443 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +573 -0
  8. package/build/cjs/meta.js +394 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +140 -0
  11. package/build/cjs/schemas.js +322 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +159 -0
  14. package/build/es/index.mjs +492 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +787 -0
  17. package/build/es/index.typings.mjs +412 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +573 -0
  20. package/build/es/meta.mjs +360 -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 +140 -0
  24. package/build/es/schemas.mjs +274 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +159 -0
  27. package/build/internal/cjs/index.js +524 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +807 -0
  30. package/build/internal/cjs/index.typings.js +443 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +635 -0
  33. package/build/internal/cjs/meta.js +394 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +140 -0
  36. package/build/internal/cjs/schemas.js +322 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +159 -0
  39. package/build/internal/es/index.mjs +492 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +807 -0
  42. package/build/internal/es/index.typings.mjs +412 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +635 -0
  45. package/build/internal/es/meta.mjs +360 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +140 -0
  48. package/build/internal/es/schemas.mjs +274 -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 @@
1
+ {"version":3,"sources":["../../index.ts","../../src/promote-seo-v1-redirect-redirects.public.ts","../../src/promote-seo-v1-redirect-redirects.universal.ts","../../src/promote-seo-v1-redirect-redirects.http.ts","../../src/promote-seo-v1-redirect-redirects.context.ts"],"sourcesContent":["export * from './src/promote-seo-v1-redirect-redirects.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateRedirectsOptionsForRequest,\n BulkCreateRedirectsResponse,\n BulkDeleteRedirectsResponse,\n CreateRedirectApplicationErrors,\n CreateRedirectOptionsForRequest,\n DeleteRedirectApplicationErrors,\n GetRedirectApplicationErrors,\n ListRedirectsResponse,\n Redirect,\n RedirectCreatedEnvelope,\n bulkCreateRedirects as universalBulkCreateRedirects,\n bulkDeleteRedirects as universalBulkDeleteRedirects,\n createRedirect as universalCreateRedirect,\n deleteRedirect as universalDeleteRedirect,\n getRedirect as universalGetRedirect,\n listRedirects as universalListRedirects,\n} from './promote-seo-v1-redirect-redirects.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function bulkDeleteRedirects(\n httpClient: HttpClient\n): BulkDeleteRedirectsSignature {\n return (redirectIds: string[]) =>\n universalBulkDeleteRedirects(\n redirectIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteRedirectsSignature {\n /**\n * Deletes redirects in bulk, by id.\n *\n * An id that matches no redirect on the site fails only its own item - the batch proceeds and every\n * other id is still sent. See BulkDeleteRedirectsResponse for what `success` does and does not\n * promise: the Redirector's BulkRemove reports no per-item outcome, so a successful item means\n * resolved-and-sent rather than confirmed-deleted.\n *\n * Language-scoped redirects are a known gap. The Redirector filters its stored-row delete to\n * redirects without a language, so a language-scoped redirect loses its route but keeps its stored\n * row. DeleteRedirect behaves identically - this is upstream behaviour rather than something this\n * endpoint introduces.\n *\n * Example, with one unknown id:\n *\n * POST /v1/bulk/redirects/delete\n * { \"redirectIds\": [\"<a>\", \"<b>\", \"<unknown>\"] }\n *\n * 200 {\n * \"results\": [\n * { \"itemMetadata\": { \"id\": \"<a>\", \"originalIndex\": 0, \"success\": true } },\n * { \"itemMetadata\": { \"id\": \"<b>\", \"originalIndex\": 1, \"success\": true } },\n * { \"itemMetadata\": { \"id\": \"<unknown>\", \"originalIndex\": 2, \"success\": false,\n * \"error\": { \"code\": \"REDIRECT_NOT_FOUND\",\n * \"description\": \"Redirect <unknown> was not found\" } } }\n * ],\n * \"bulkActionMetadata\": { \"totalSuccesses\": 2, \"totalFailures\": 1, \"undetailedFailures\": 0 }\n * }\n *\n * Permission naming and domain events follow the rest of this service: `wix-seo.*` is what the\n * Redirector itself checks, and no CUD event is emitted because this service owns no storage, so\n * emitting one only here would leave consumers reading the absence of an event as the absence of a\n * change.\n * @param - Unique identifiers of the redirects to delete\n * @returns The response for deleting redirects in bulk.\n *\n * One result per requested id, in request order - `item_metadata.original_index` is the index in\n * `redirect_ids`. Per-item semantics:\n *\n * - `success` true means the redirect was found and sent to the Redirector for deletion. It is not a\n * confirmation that the redirect is gone: the Redirector's BulkRemove returns no per-item outcome,\n * so there is nothing to confirm it against.\n * - `success` false with `error.code` REDIRECT_NOT_FOUND means no redirect on this site carries that\n * id. The call still succeeds and every other id is still sent to the Redirector, under the same\n * `success` meaning as above.\n *\n * `item` is never populated - there is no created entity to return.\n */\n (redirectIds: string[]): Promise<\n NonNullablePaths<\n BulkDeleteRedirectsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.from`\n | `results.${number}.item.to`\n | `results.${number}.item.options.groupRedirect`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function listRedirects(httpClient: HttpClient): ListRedirectsSignature {\n return () =>\n universalListRedirects(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListRedirectsSignature {\n /**\n * Lists the site's redirects.\n *\n * Unpaged - see ListRedirectsResponse. Permission naming follows the rest of this service:\n * `wix-seo.*` is what the Redirector itself checks.\n * @returns The response for listing the site's redirects.\n *\n * Unpaged, so there is no paging_metadata: the Redirector's Get returns every redirect for the\n * site in a single response and offers no paging or filtering of its own. Paging here would mean\n * reading the whole set and then slicing it, which costs the same and buys the caller nothing.\n * Revisit if the Redirector ever gains real paging.\n *\n * Unbounded for the same reason, mirroring the Redirector's own GetResponse.redirects, which\n * declares no maxSize. The 500 in the Redirector's protos bounds its bulk *write* requests\n * (Upsert, Remove, Validate); it is not a ceiling on how many redirects a site can hold.\n */\n (): Promise<\n NonNullablePaths<\n ListRedirectsResponse,\n | `redirects`\n | `redirects.${number}.from`\n | `redirects.${number}.to`\n | `redirects.${number}.options.groupRedirect`,\n 5\n >\n >;\n}\n\nexport function getRedirect(httpClient: HttpClient): GetRedirectSignature {\n return (redirectId: string) =>\n universalGetRedirect(\n redirectId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRedirectSignature {\n /**\n * Retrieves a single redirect by id.\n *\n * Permission naming follows the rest of this service: `wix-seo.*` is what the Redirector itself\n * checks.\n * @param - Unique identifier of the redirect to retrieve\n * @returns The retrieved redirect\n */\n (redirectId: string): Promise<\n NonNullablePaths<Redirect, `from` | `to` | `options.groupRedirect`, 3> & {\n __applicationErrorsType?: GetRedirectApplicationErrors;\n }\n >;\n}\n\nexport function bulkCreateRedirects(\n httpClient: HttpClient\n): BulkCreateRedirectsSignature {\n return (\n redirects: Redirect[],\n options?: BulkCreateRedirectsOptionsForRequest\n ) =>\n universalBulkCreateRedirects(\n redirects,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateRedirectsSignature {\n /**\n * Creates redirects in bulk. Replaces AddRedirects and AddGroupRedirects.\n *\n * Permission naming and domain events follow the rest of this service: `wix-seo.*` is what the\n * Redirector itself checks, and no CUD event is emitted because this service owns no storage -\n * the redirects live in the Redirector. Neither is changed here, since a service-wide convention\n * should not be broken by a single endpoint.\n * @param - The redirects to create\n * @returns The response for creating redirects in bulk\n */\n (\n redirects: Redirect[],\n options?: BulkCreateRedirectsOptionsForRequest\n ): Promise<\n NonNullablePaths<\n BulkCreateRedirectsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.from`\n | `results.${number}.item.to`\n | `results.${number}.item.options.groupRedirect`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function createRedirect(\n httpClient: HttpClient\n): CreateRedirectSignature {\n return (redirect: Redirect, options?: CreateRedirectOptionsForRequest) =>\n universalCreateRedirect(\n redirect,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateRedirectSignature {\n /**\n * Create a redirect with loop solving\n * @param - The redirect to create\n * @returns The created redirect\n */\n (redirect: Redirect, options?: CreateRedirectOptionsForRequest): Promise<\n NonNullablePaths<Redirect, `from` | `to` | `options.groupRedirect`, 3> & {\n __applicationErrorsType?: CreateRedirectApplicationErrors;\n }\n >;\n}\n\nexport function deleteRedirect(\n httpClient: HttpClient\n): DeleteRedirectSignature {\n return (redirectId: string) =>\n universalDeleteRedirect(\n redirectId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteRedirectSignature {\n /**\n * Deletes a single redirect by id.\n *\n * The Redirector's Remove takes the whole redirect rather than an id, because it locates the route\n * by `id` when one is present and by matching on `from_path`, exact/group matching and `regex`\n * when it is not. The redirect is therefore read back through the Redirector's own get-by-id first\n * and handed over as-is, so the caller only has to know the id; see DeleteRedirectService.\n *\n * Permission naming follows the rest of this service: `wix-seo.*` is what the Redirector itself\n * checks.\n *\n * No domain event is emitted - neither a CUD event nor the `wix.api.emits` the DELETE annotation\n * asks for - because the redirects live in the Redirector, which owns the storage and does not\n * emit through us. Emitting only here would publish a stream that is silently incomplete: every\n * other write path (AddRedirects, BulkCreateRedirects, RemoveGeneralRedirect,\n * CleanupLanguageRedirects) and every caller reaching the Redirector directly would stay silent,\n * so a consumer would take the absence of an event as the absence of a change. Publishing redirect\n * events is therefore a service-wide follow-up, not a per-endpoint one; BulkCreateRedirects above\n * carries the same suppression for the same reason.\n *\n * CUSTOM_ACTION is not an alternative escape from the rule: with a top-level id field on the\n * request, flynt requires this method to be annotated `method: DELETE`\n * (`crud-add-delete-annotation`).\n * @param - Unique identifier of the redirect to delete\n * @returns The response for deleting a single redirect\n */\n (redirectId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteRedirectApplicationErrors;\n }\n >;\n}\n\nexport const onRedirectCreated = /*#__PURE__*/ EventDefinition(\n 'wix.promote.seo.v1.redirect_created',\n true,\n (event: RedirectCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<RedirectCreatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n AddGroupRedirectsOptions,\n AddGroupRedirectsRequest,\n AddGroupRedirectsResponse,\n AddRedirectsOptions,\n AddRedirectsRequest,\n AddRedirectsResponse,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateRedirectsOptions,\n BulkCreateRedirectsOptionsForRequest,\n BulkCreateRedirectsRequest,\n BulkCreateRedirectsResponse,\n BulkDeleteRedirectsRequest,\n BulkDeleteRedirectsResponse,\n BulkRedirectResult,\n CleanupLanguageRedirectsRequest,\n CleanupLanguageRedirectsResponse,\n CreateRedirectOptions,\n CreateRedirectOptionsForRequest,\n CreateRedirectRequest,\n CreateRedirectResponse,\n DeleteRedirectRequest,\n DeleteRedirectResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetHttpStatusRequest,\n GetHttpStatusResponse,\n GetRedirectRequest,\n GetRedirectResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n ListRedirectsRequest,\n ListRedirectsResponse,\n MessageEnvelope,\n Redirect,\n RedirectCreatedEnvelope,\n RedirectOptions,\n RemoveGeneralRedirectRequest,\n RemoveGeneralRedirectResponse,\n RemoveGeneralRedirectsOptions,\n RestoreInfo,\n Source,\n WebhookIdentityType,\n} from './promote-seo-v1-redirect-redirects.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPromoteSeoV1Redirect from './promote-seo-v1-redirect-redirects.http.js';\n\n/**\n * Represent redirect entity\n *\n * This service is a proxy in front of the Redirector\n * (com.wixpress.redirector.api.v1.RedirectsApi), which owns the storage. Two platform entity\n * fields are therefore deliberately absent, and the matching rules are disabled below:\n *\n * - `revision`: the Redirector has no revision column and no optimistic concurrency. Writes are\n * last-write-wins. Synthesising a revision we cannot enforce would be worse than omitting it.\n * - `updated_date`: the Redirector tracks creation only (its `date_created`), so there is no\n * source for a modification timestamp.\n *\n * `id` is present but client-assignable (a StringValue, not a server-assigned `string`), because\n * the Redirector's Upsert accepts a caller-supplied id and CreateRedirect/AddRedirects/\n * AddGroupRedirects have always passed one through. Changing it would break both the wire and\n * existing callers.\n *\n * `Source`'s zero value carries no enum_maturity because the enum is defined in the Redirector's\n * proto (com/wixpress/redirector/api/v1/redirects.proto), not here. Redirects are not user-taggable.\n */\nexport interface Redirect {\n /**\n * The path that is intercepted from. Accepts only an encoded string.\n *\n * Capped at 950 to match the Redirector's own `from_path`, which is where this ends up. Without\n * the cap an over-long path is accepted here and only rejected downstream, after this service has\n * already begun writing.\n *\n * No `minLength`: the service rejects an empty path itself, and adding one here would move that\n * rejection into the gateway and change the error payload of the deprecated Add* endpoints.\n * @maxLength 950\n */\n from?: string;\n /**\n * The path that is going to be resolved to. Either a path on the site or a full URL, encoded.\n *\n * Capped at 4096 to match the Redirector's own `target`.\n * @maxLength 4096\n */\n to?: string;\n /** additional options for the redirect */\n options?: RedirectOptions;\n /**\n * Redirect source.\n *\n * Held internal: the enum is defined in the Redirector's own proto\n * (com/wixpress/redirector/api/v1/redirects.proto), so its values describe how *Wix* created the\n * route - REDIRECTOR (a user in the SEO tab), REDIRECTOR_NON_USER_FACING (an offline process),\n * PAGE_SLUG_RENAME (the editor renaming a page). That vocabulary means nothing to a third-party\n * caller, it leaks our internal write paths, the field is settable so a public caller could forge a\n * provenance it did not have, and we cannot version an enum another team owns.\n *\n * Internal callers keep it: advanced-seo-client writes PAGE_SLUG_RENAME when the editor\n * auto-creates a redirect, and the redirects BM component reads it to separate auto redirects from\n * user ones. A public caller's redirect therefore lands as REDIRECTOR, the default applied in\n * redirect-entity.ts, and is indistinguishable in the BM table from one a user typed. Surfacing\n * app-created redirects would need a new public-safe provenance field, not this one.\n *\n * Permanent - there is no feature waiting to ship behind this marker.\n * @internal\n */\n source?: SourceWithLiterals;\n /**\n * When provided, defines a language specific redirect. Otherwise, defines a general redirect.\n * @minLength 2\n * @maxLength 5\n */\n language?: string | null;\n /**\n * Unique identifier for the redirect\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date the redirect was created. Sourced from the Redirector's `date_created`.\n * @readonly\n */\n _createdDate?: Date | null;\n}\n\n/** options and configurations specific for the redirect */\nexport interface RedirectOptions {\n /** set to true for group redirects */\n groupRedirect?: boolean;\n}\n\nexport enum Source {\n /** Unknown. */\n UNKNOWN_SOURCE = 'UNKNOWN_SOURCE',\n /** A route is created by user in SEO tab. */\n REDIRECTOR = 'REDIRECTOR',\n /** A route is created via offline process (e.g., blogs migration). */\n REDIRECTOR_NON_USER_FACING = 'REDIRECTOR_NON_USER_FACING',\n /** A route is created on page slug rename. */\n PAGE_SLUG_RENAME = 'PAGE_SLUG_RENAME',\n}\n\n/** @enumType */\nexport type SourceWithLiterals =\n | Source\n | 'UNKNOWN_SOURCE'\n | 'REDIRECTOR'\n | 'REDIRECTOR_NON_USER_FACING'\n | 'PAGE_SLUG_RENAME';\n\n/** The request for adding bulk redirects */\nexport interface AddRedirectsRequest {\n /**\n * Capped at the Redirector's own bulk limit of 500, which is what this ends up calling. The\n * service chunks larger batches, but an unbounded request array is a memory risk with no caller\n * asking for it - and BulkCreateRedirects, which replaces this endpoint, already declares 500.\n *\n * No `minSize`: the service already rejects an empty array with its own message, and adding one\n * here would add a second field violation to this deprecated endpoint's error payload.\n * @maxSize 500\n */\n redirects?: Redirect[];\n /** Extra options for adding bulk redirects */\n options?: AddRedirectsOptions;\n}\n\n/** Add bulk extra options and configurations */\nexport interface AddRedirectsOptions {\n /** Should be true if the domain will be included to the redirect */\n requireDomain?: boolean;\n}\n\n/** The response for adding bulk redirects */\nexport interface AddRedirectsResponse {\n /**\n * Capped at the Redirector's own bulk limit of 500, which is what this ends up calling. The\n * service chunks larger batches, but an unbounded request array is a memory risk with no caller\n * asking for it - and BulkCreateRedirects, which replaces this endpoint, already declares 500.\n *\n * No `minSize`: the service already rejects an empty array with its own message, and adding one\n * here would add a second field violation to this deprecated endpoint's error payload.\n * @maxSize 500\n */\n redirects?: Redirect[];\n}\n\n/** The request for adding group redirects */\nexport interface AddGroupRedirectsRequest {\n /**\n * Capped at the Redirector's own bulk limit of 500, which is what this ends up calling. The\n * service chunks larger batches, but an unbounded request array is a memory risk with no caller\n * asking for it - and BulkCreateRedirects, which replaces this endpoint, already declares 500.\n *\n * No `minSize`: the service already rejects an empty array with its own message, and adding one\n * here would add a second field violation to this deprecated endpoint's error payload.\n * @maxSize 500\n */\n redirects?: Redirect[];\n /** Extra options for adding group redirects */\n options?: AddGroupRedirectsOptions;\n}\n\n/** Add group extra options and configurations */\nexport interface AddGroupRedirectsOptions {\n /** Should be true if the domain will be included to the redirect */\n requireDomain?: boolean;\n}\n\n/** The response for adding group redirects */\nexport interface AddGroupRedirectsResponse {\n /**\n * Capped at the Redirector's own bulk limit of 500, which is what this ends up calling. The\n * service chunks larger batches, but an unbounded request array is a memory risk with no caller\n * asking for it - and BulkCreateRedirects, which replaces this endpoint, already declares 500.\n *\n * No `minSize`: the service already rejects an empty array with its own message, and adding one\n * here would add a second field violation to this deprecated endpoint's error payload.\n * @maxSize 500\n */\n redirects?: Redirect[];\n}\n\n/**\n * The request for deleting redirects in bulk.\n *\n * Redirects are addressed by id, but the Redirector matches redirects by path rather than by id, so\n * the service resolves each id to the stored redirect before deleting it. A caller therefore sends\n * ids and never has to reconstruct an entity.\n *\n * The 1-500 bound is the Redirector's own `maxRedirectsPerRequest`, not a number chosen here.\n */\nexport interface BulkDeleteRedirectsRequest {\n /**\n * Unique identifiers of the redirects to delete\n * @minSize 1\n * @maxSize 500\n * @format GUID\n */\n redirectIds: string[];\n}\n\n/**\n * The response for deleting redirects in bulk.\n *\n * One result per requested id, in request order - `item_metadata.original_index` is the index in\n * `redirect_ids`. Per-item semantics:\n *\n * - `success` true means the redirect was found and sent to the Redirector for deletion. It is not a\n * confirmation that the redirect is gone: the Redirector's BulkRemove returns no per-item outcome,\n * so there is nothing to confirm it against.\n * - `success` false with `error.code` REDIRECT_NOT_FOUND means no redirect on this site carries that\n * id. The call still succeeds and every other id is still sent to the Redirector, under the same\n * `success` meaning as above.\n *\n * `item` is never populated - there is no created entity to return.\n */\nexport interface BulkDeleteRedirectsResponse {\n /**\n * Per-item outcome, in request order\n * @maxSize 500\n */\n results?: BulkRedirectResult[];\n /** Totals for the bulk action: successes, failures and undetailed failures */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\n/** The result of creating a single redirect within a bulk request */\nexport interface BulkRedirectResult {\n /** Index, id and success/error details for this item */\n itemMetadata?: ItemMetadata;\n /** The created redirect. Only populated when return_full_entity is true */\n item?: Redirect;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @maxLength 100\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\n/** The request for listing the site's redirects */\nexport interface ListRedirectsRequest {}\n\n/**\n * The response for listing the site's redirects.\n *\n * Unpaged, so there is no paging_metadata: the Redirector's Get returns every redirect for the\n * site in a single response and offers no paging or filtering of its own. Paging here would mean\n * reading the whole set and then slicing it, which costs the same and buys the caller nothing.\n * Revisit if the Redirector ever gains real paging.\n *\n * Unbounded for the same reason, mirroring the Redirector's own GetResponse.redirects, which\n * declares no maxSize. The 500 in the Redirector's protos bounds its bulk *write* requests\n * (Upsert, Remove, Validate); it is not a ceiling on how many redirects a site can hold.\n */\nexport interface ListRedirectsResponse {\n /** The site's redirects */\n redirects?: Redirect[];\n}\n\n/** The request for retrieving a single redirect by id */\nexport interface GetRedirectRequest {\n /**\n * Unique identifier of the redirect to retrieve\n * @format GUID\n */\n redirectId: string;\n}\n\n/** The response for retrieving a single redirect */\nexport interface GetRedirectResponse {\n /** The retrieved redirect */\n redirect?: Redirect;\n}\n\n/**\n * The request for creating redirects in bulk.\n *\n * Unlike the deprecated AddRedirects and AddGroupRedirects, the exact-versus-group choice is taken\n * per redirect from `options.groupRedirect` rather than being fixed by the endpoint.\n */\nexport interface BulkCreateRedirectsRequest {\n /**\n * The redirects to create\n * @minSize 1\n * @maxSize 500\n */\n redirects: Redirect[];\n /** Set to true to return the created redirects, not just their metadata */\n returnFullEntity?: boolean;\n /** Extra options for creating redirects in bulk */\n options?: BulkCreateRedirectsOptions;\n}\n\n/** Bulk create options and configurations */\nexport interface BulkCreateRedirectsOptions {\n /** set to true to replace a conflicting redirect's from-url instead of failing that item */\n forceReplace?: boolean;\n}\n\n/** The response for creating redirects in bulk */\nexport interface BulkCreateRedirectsResponse {\n /**\n * Per-item outcome, in request order\n * @maxSize 500\n */\n results?: BulkRedirectResult[];\n /** Totals for the bulk action: successes, failures and undetailed failures */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\n/** The request for creating a redirect */\nexport interface CreateRedirectRequest {\n /** The redirect to create */\n redirect: Redirect;\n /** Extra options for creating a redirect */\n options?: CreateRedirectOptions;\n}\n\n/** Create redirect options and configurations */\nexport interface CreateRedirectOptions {\n /** set to true when need to replace a conflicting redirect's from-url (if it exists) */\n forceReplace?: boolean;\n}\n\n/** The response for creating a redirect */\nexport interface CreateRedirectResponse {\n /** The created redirect */\n redirect?: Redirect;\n}\n\n/** The request for deleting a single redirect by id */\nexport interface DeleteRedirectRequest {\n /**\n * Unique identifier of the redirect to delete\n * @format GUID\n */\n redirectId: string;\n}\n\n/** The response for deleting a single redirect */\nexport interface DeleteRedirectResponse {}\n\n/** The request for removing a general (all languages) redirect */\nexport interface RemoveGeneralRedirectRequest {\n /** general redirect to be removed. its language property should be empty */\n redirect?: Redirect;\n /**\n * language for which this general redirect should be removed\n * @minLength 2\n * @maxLength 5\n */\n applicableLanguage?: string | null;\n /** Extra options for removing general redirect */\n options?: RemoveGeneralRedirectsOptions;\n}\n\n/** remove general (all languages) redirect options and configurations */\nexport interface RemoveGeneralRedirectsOptions {\n /** Should be true if the domain will be included to the redirect */\n requireDomain?: boolean;\n}\n\n/** The response for removing a general (all languages) redirect */\nexport interface RemoveGeneralRedirectResponse {\n /** added redirects */\n redirects?: Redirect[];\n}\n\n/** The request for getting http status */\nexport interface GetHttpStatusRequest {\n /**\n * url\n * @maxLength 1000\n */\n url?: string | null;\n}\n\n/** The response for getting http status */\nexport interface GetHttpStatusResponse {\n /** http status code */\n status?: number | null;\n /**\n * http status text\n * @maxLength 100\n */\n statusText?: string | null;\n}\n\n/** Request to delete all redirects scoped to a specific language code. */\nexport interface CleanupLanguageRedirectsRequest {\n /**\n * Language code of redirects to remove (e.g. \"fr\", \"en-US\").\n * @minLength 2\n * @maxLength 5\n */\n languageCode?: string;\n}\n\n/**\n * Response with counts describing the cleanup outcome.\n * found_count vs removed_count lets callers detect partial failures\n * (a future per-batch failure-handling change may diverge the two).\n */\nexport interface CleanupLanguageRedirectsResponse {\n /** Number of redirects found for the given language before cleanup. */\n foundCount?: number;\n /** Number of redirects successfully removed for the given language. */\n removedCount?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GetRedirectApplicationErrors = {\n code?: 'REDIRECT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type CreateRedirectApplicationErrors = {\n code?: 'FROM_URL_EXISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DeleteRedirectApplicationErrors = {\n code?: 'REDIRECT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface RedirectCreatedEnvelope {\n entity: Redirect;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.promote.seo.v1.redirect_created\n * @serviceIdentifier com.wixpress.promote.seo.redirects.api.RedirectsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onRedirectCreated(\n handler: (event: RedirectCreatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Deletes redirects in bulk, by id.\n *\n * An id that matches no redirect on the site fails only its own item - the batch proceeds and every\n * other id is still sent. See BulkDeleteRedirectsResponse for what `success` does and does not\n * promise: the Redirector's BulkRemove reports no per-item outcome, so a successful item means\n * resolved-and-sent rather than confirmed-deleted.\n *\n * Language-scoped redirects are a known gap. The Redirector filters its stored-row delete to\n * redirects without a language, so a language-scoped redirect loses its route but keeps its stored\n * row. DeleteRedirect behaves identically - this is upstream behaviour rather than something this\n * endpoint introduces.\n *\n * Example, with one unknown id:\n *\n * POST /v1/bulk/redirects/delete\n * { \"redirectIds\": [\"<a>\", \"<b>\", \"<unknown>\"] }\n *\n * 200 {\n * \"results\": [\n * { \"itemMetadata\": { \"id\": \"<a>\", \"originalIndex\": 0, \"success\": true } },\n * { \"itemMetadata\": { \"id\": \"<b>\", \"originalIndex\": 1, \"success\": true } },\n * { \"itemMetadata\": { \"id\": \"<unknown>\", \"originalIndex\": 2, \"success\": false,\n * \"error\": { \"code\": \"REDIRECT_NOT_FOUND\",\n * \"description\": \"Redirect <unknown> was not found\" } } }\n * ],\n * \"bulkActionMetadata\": { \"totalSuccesses\": 2, \"totalFailures\": 1, \"undetailedFailures\": 0 }\n * }\n *\n * Permission naming and domain events follow the rest of this service: `wix-seo.*` is what the\n * Redirector itself checks, and no CUD event is emitted because this service owns no storage, so\n * emitting one only here would leave consumers reading the absence of an event as the absence of a\n * change.\n * @param redirectIds - Unique identifiers of the redirects to delete\n * @public\n * @documentationMaturity preview\n * @requiredField redirectIds\n * @permissionId wix-seo.edit\n * @applicableIdentity APP\n * @returns The response for deleting redirects in bulk.\n *\n * One result per requested id, in request order - `item_metadata.original_index` is the index in\n * `redirect_ids`. Per-item semantics:\n *\n * - `success` true means the redirect was found and sent to the Redirector for deletion. It is not a\n * confirmation that the redirect is gone: the Redirector's BulkRemove returns no per-item outcome,\n * so there is nothing to confirm it against.\n * - `success` false with `error.code` REDIRECT_NOT_FOUND means no redirect on this site carries that\n * id. The call still succeeds and every other id is still sent to the Redirector, under the same\n * `success` meaning as above.\n *\n * `item` is never populated - there is no created entity to return.\n * @fqn com.wixpress.promote.seo.redirects.api.RedirectsService.BulkDeleteRedirects\n */\nexport async function bulkDeleteRedirects(\n redirectIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteRedirectsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.from`\n | `results.${number}.item.to`\n | `results.${number}.item.options.groupRedirect`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n redirectIds: redirectIds,\n });\n\n const reqOpts =\n ambassadorWixPromoteSeoV1Redirect.bulkDeleteRedirects(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { redirectIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['redirectIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists the site's redirects.\n *\n * Unpaged - see ListRedirectsResponse. Permission naming follows the rest of this service:\n * `wix-seo.*` is what the Redirector itself checks.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.read\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns The response for listing the site's redirects.\n *\n * Unpaged, so there is no paging_metadata: the Redirector's Get returns every redirect for the\n * site in a single response and offers no paging or filtering of its own. Paging here would mean\n * reading the whole set and then slicing it, which costs the same and buys the caller nothing.\n * Revisit if the Redirector ever gains real paging.\n *\n * Unbounded for the same reason, mirroring the Redirector's own GetResponse.redirects, which\n * declares no maxSize. The 500 in the Redirector's protos bounds its bulk *write* requests\n * (Upsert, Remove, Validate); it is not a ceiling on how many redirects a site can hold.\n * @fqn com.wixpress.promote.seo.redirects.api.RedirectsService.ListRedirects\n */\nexport async function listRedirects(): Promise<\n NonNullablePaths<\n ListRedirectsResponse,\n | `redirects`\n | `redirects.${number}.from`\n | `redirects.${number}.to`\n | `redirects.${number}.options.groupRedirect`,\n 5\n >\n> {\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 = ambassadorWixPromoteSeoV1Redirect.listRedirects(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\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\n/**\n * Retrieves a single redirect by id.\n *\n * Permission naming follows the rest of this service: `wix-seo.*` is what the Redirector itself\n * checks.\n * @param redirectId - Unique identifier of the redirect to retrieve\n * @public\n * @documentationMaturity preview\n * @requiredField redirectId\n * @permissionId wix-seo.read\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns The retrieved redirect\n * @fqn com.wixpress.promote.seo.redirects.api.RedirectsService.GetRedirect\n */\nexport async function getRedirect(redirectId: string): Promise<\n NonNullablePaths<Redirect, `from` | `to` | `options.groupRedirect`, 3> & {\n __applicationErrorsType?: GetRedirectApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n redirectId: redirectId,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV1Redirect.getRedirect(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.redirect!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { redirectId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['redirectId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates redirects in bulk. Replaces AddRedirects and AddGroupRedirects.\n *\n * Permission naming and domain events follow the rest of this service: `wix-seo.*` is what the\n * Redirector itself checks, and no CUD event is emitted because this service owns no storage -\n * the redirects live in the Redirector. Neither is changed here, since a service-wide convention\n * should not be broken by a single endpoint.\n * @param redirects - The redirects to create\n * @public\n * @documentationMaturity preview\n * @requiredField redirects\n * @permissionId wix-seo.edit\n * @applicableIdentity APP\n * @returns The response for creating redirects in bulk\n * @fqn com.wixpress.promote.seo.redirects.api.RedirectsService.BulkCreateRedirects\n */\nexport async function bulkCreateRedirects(\n redirects: Redirect[],\n options?: BulkCreateRedirectsOptionsForRequest\n): Promise<\n NonNullablePaths<\n BulkCreateRedirectsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.from`\n | `results.${number}.item.to`\n | `results.${number}.item.options.groupRedirect`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n redirects: redirects,\n returnFullEntity: options?.returnFullEntity,\n options: options?.options,\n });\n\n const reqOpts =\n ambassadorWixPromoteSeoV1Redirect.bulkCreateRedirects(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n redirects: '$[0]',\n returnFullEntity: '$[1].returnFullEntity',\n options: '$[1].options',\n },\n singleArgumentUnchanged: false,\n },\n ['redirects', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateRedirectsOptionsForRequest {\n /** Set to true to return the created redirects, not just their metadata */\n returnFullEntity?: boolean;\n /** Extra options for creating redirects in bulk */\n options?: BulkCreateRedirectsOptions;\n}\n\n/**\n * Create a redirect with loop solving\n * @param redirect - The redirect to create\n * @public\n * @documentationMaturity preview\n * @requiredField redirect\n * @permissionId wix-seo.edit\n * @applicableIdentity APP\n * @returns The created redirect\n * @fqn com.wixpress.promote.seo.redirects.api.RedirectsService.CreateRedirect\n */\nexport async function createRedirect(\n redirect: Redirect,\n options?: CreateRedirectOptionsForRequest\n): Promise<\n NonNullablePaths<Redirect, `from` | `to` | `options.groupRedirect`, 3> & {\n __applicationErrorsType?: CreateRedirectApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n redirect: redirect,\n options: options?.options,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV1Redirect.createRedirect(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.redirect!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { redirect: '$[0]', options: '$[1].options' },\n singleArgumentUnchanged: false,\n },\n ['redirect', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateRedirectOptionsForRequest {\n /** Extra options for creating a redirect */\n options?: CreateRedirectOptions;\n}\n\n/**\n * Deletes a single redirect by id.\n *\n * The Redirector's Remove takes the whole redirect rather than an id, because it locates the route\n * by `id` when one is present and by matching on `from_path`, exact/group matching and `regex`\n * when it is not. The redirect is therefore read back through the Redirector's own get-by-id first\n * and handed over as-is, so the caller only has to know the id; see DeleteRedirectService.\n *\n * Permission naming follows the rest of this service: `wix-seo.*` is what the Redirector itself\n * checks.\n *\n * No domain event is emitted - neither a CUD event nor the `wix.api.emits` the DELETE annotation\n * asks for - because the redirects live in the Redirector, which owns the storage and does not\n * emit through us. Emitting only here would publish a stream that is silently incomplete: every\n * other write path (AddRedirects, BulkCreateRedirects, RemoveGeneralRedirect,\n * CleanupLanguageRedirects) and every caller reaching the Redirector directly would stay silent,\n * so a consumer would take the absence of an event as the absence of a change. Publishing redirect\n * events is therefore a service-wide follow-up, not a per-endpoint one; BulkCreateRedirects above\n * carries the same suppression for the same reason.\n *\n * CUSTOM_ACTION is not an alternative escape from the rule: with a top-level id field on the\n * request, flynt requires this method to be annotated `method: DELETE`\n * (`crud-add-delete-annotation`).\n * @param redirectId - Unique identifier of the redirect to delete\n * @public\n * @documentationMaturity preview\n * @requiredField redirectId\n * @permissionId wix-seo.edit\n * @applicableIdentity APP\n * @returns The response for deleting a single redirect\n * @fqn com.wixpress.promote.seo.redirects.api.RedirectsService.DeleteRedirect\n */\nexport async function deleteRedirect(redirectId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteRedirectApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n redirectId: redirectId,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV1Redirect.deleteRedirect(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { redirectId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['redirectId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_serverless/seo-redirects-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/seo-redirects-service',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_serverless/seo-redirects-service',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_serverless/seo-redirects-service',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_serverless/seo-redirects-service',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/seo-redirects-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/seo-redirects-service',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_redirects';\n\n/**\n * Deletes redirects in bulk, by id.\n *\n * An id that matches no redirect on the site fails only its own item - the batch proceeds and every\n * other id is still sent. See BulkDeleteRedirectsResponse for what `success` does and does not\n * promise: the Redirector's BulkRemove reports no per-item outcome, so a successful item means\n * resolved-and-sent rather than confirmed-deleted.\n *\n * Language-scoped redirects are a known gap. The Redirector filters its stored-row delete to\n * redirects without a language, so a language-scoped redirect loses its route but keeps its stored\n * row. DeleteRedirect behaves identically - this is upstream behaviour rather than something this\n * endpoint introduces.\n *\n * Example, with one unknown id:\n *\n * POST /v1/bulk/redirects/delete\n * { \"redirectIds\": [\"<a>\", \"<b>\", \"<unknown>\"] }\n *\n * 200 {\n * \"results\": [\n * { \"itemMetadata\": { \"id\": \"<a>\", \"originalIndex\": 0, \"success\": true } },\n * { \"itemMetadata\": { \"id\": \"<b>\", \"originalIndex\": 1, \"success\": true } },\n * { \"itemMetadata\": { \"id\": \"<unknown>\", \"originalIndex\": 2, \"success\": false,\n * \"error\": { \"code\": \"REDIRECT_NOT_FOUND\",\n * \"description\": \"Redirect <unknown> was not found\" } } }\n * ],\n * \"bulkActionMetadata\": { \"totalSuccesses\": 2, \"totalFailures\": 1, \"undetailedFailures\": 0 }\n * }\n *\n * Permission naming and domain events follow the rest of this service: `wix-seo.*` is what the\n * Redirector itself checks, and no CUD event is emitted because this service owns no storage, so\n * emitting one only here would leave consumers reading the absence of an event as the absence of a\n * change.\n */\nexport function bulkDeleteRedirects(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteRedirects({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.redirect',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.seo.redirects.api.RedirectsService.BulkDeleteRedirects',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl({\n protoPath: '/v1/bulk/redirects/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.item.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteRedirects;\n}\n\n/**\n * Lists the site's redirects.\n *\n * Unpaged - see ListRedirectsResponse. Permission naming follows the rest of this service:\n * `wix-seo.*` is what the Redirector itself checks.\n */\nexport function listRedirects(payload: object): RequestOptionsFactory<any> {\n function __listRedirects({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.redirect',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.redirects.api.RedirectsService.ListRedirects',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl({\n protoPath: '/v1/redirects',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'redirects.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listRedirects;\n}\n\n/**\n * Retrieves a single redirect by id.\n *\n * Permission naming follows the rest of this service: `wix-seo.*` is what the Redirector itself\n * checks.\n */\nexport function getRedirect(payload: object): RequestOptionsFactory<any> {\n function __getRedirect({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.redirect',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.redirects.api.RedirectsService.GetRedirect',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl({\n protoPath: '/v1/redirects/{redirectId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'redirect.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getRedirect;\n}\n\n/**\n * Creates redirects in bulk. Replaces AddRedirects and AddGroupRedirects.\n *\n * Permission naming and domain events follow the rest of this service: `wix-seo.*` is what the\n * Redirector itself checks, and no CUD event is emitted because this service owns no storage -\n * the redirects live in the Redirector. Neither is changed here, since a service-wide convention\n * should not be broken by a single endpoint.\n */\nexport function bulkCreateRedirects(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateRedirects({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'redirects.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.redirect',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.seo.redirects.api.RedirectsService.BulkCreateRedirects',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl({\n protoPath: '/v1/bulk/redirects/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.item.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateRedirects;\n}\n\n/** Create a redirect with loop solving */\nexport function createRedirect(payload: object): RequestOptionsFactory<any> {\n function __createRedirect({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'redirect.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.redirect',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.seo.redirects.api.RedirectsService.CreateRedirect',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl({\n protoPath: '/v1/create-redirect',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'redirect.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createRedirect;\n}\n\n/**\n * Deletes a single redirect by id.\n *\n * The Redirector's Remove takes the whole redirect rather than an id, because it locates the route\n * by `id` when one is present and by matching on `from_path`, exact/group matching and `regex`\n * when it is not. The redirect is therefore read back through the Redirector's own get-by-id first\n * and handed over as-is, so the caller only has to know the id; see DeleteRedirectService.\n *\n * Permission naming follows the rest of this service: `wix-seo.*` is what the Redirector itself\n * checks.\n *\n * No domain event is emitted - neither a CUD event nor the `wix.api.emits` the DELETE annotation\n * asks for - because the redirects live in the Redirector, which owns the storage and does not\n * emit through us. Emitting only here would publish a stream that is silently incomplete: every\n * other write path (AddRedirects, BulkCreateRedirects, RemoveGeneralRedirect,\n * CleanupLanguageRedirects) and every caller reaching the Redirector directly would stay silent,\n * so a consumer would take the absence of an event as the absence of a change. Publishing redirect\n * events is therefore a service-wide follow-up, not a per-endpoint one; BulkCreateRedirects above\n * carries the same suppression for the same reason.\n *\n * CUSTOM_ACTION is not an alternative escape from the rule: with a top-level id field on the\n * request, flynt requires this method to be annotated `method: DELETE`\n * (`crud-add-delete-annotation`).\n */\nexport function deleteRedirect(payload: object): RequestOptionsFactory<any> {\n function __deleteRedirect({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v1.redirect',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.promote.seo.redirects.api.RedirectsService.DeleteRedirect',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRedirectsApiRedirectsServiceUrl({\n protoPath: '/v1/redirects/{redirectId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteRedirect;\n}\n","import {\n bulkDeleteRedirects as publicBulkDeleteRedirects,\n listRedirects as publicListRedirects,\n getRedirect as publicGetRedirect,\n bulkCreateRedirects as publicBulkCreateRedirects,\n createRedirect as publicCreateRedirect,\n deleteRedirect as publicDeleteRedirect,\n} from './promote-seo-v1-redirect-redirects.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onRedirectCreated as publicOnRedirectCreated } from './promote-seo-v1-redirect-redirects.public.js';\n\nexport const bulkDeleteRedirects: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteRedirects> &\n typeof publicBulkDeleteRedirects\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteRedirects);\nexport const listRedirects: MaybeContext<\n BuildRESTFunction<typeof publicListRedirects> & typeof publicListRedirects\n> = /*#__PURE__*/ createRESTModule(publicListRedirects);\nexport const getRedirect: MaybeContext<\n BuildRESTFunction<typeof publicGetRedirect> & typeof publicGetRedirect\n> = /*#__PURE__*/ createRESTModule(publicGetRedirect);\nexport const bulkCreateRedirects: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateRedirects> &\n typeof publicBulkCreateRedirects\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateRedirects);\nexport const createRedirect: MaybeContext<\n BuildRESTFunction<typeof publicCreateRedirect> & typeof publicCreateRedirect\n> = /*#__PURE__*/ createRESTModule(publicCreateRedirect);\nexport const deleteRedirect: MaybeContext<\n BuildRESTFunction<typeof publicDeleteRedirect> & typeof publicDeleteRedirect\n> = /*#__PURE__*/ createRESTModule(publicDeleteRedirect);\n/** */\nexport const onRedirectCreated: BuildEventDefinition<\n typeof publicOnRedirectCreated\n> &\n typeof publicOnRedirectCreated = /*#__PURE__*/ createEventModule(\n publicOnRedirectCreated\n);\n\nexport {\n Source,\n WebhookIdentityType,\n} from './promote-seo-v1-redirect-redirects.universal.js';\nexport {\n Redirect,\n RedirectOptions,\n AddRedirectsRequest,\n AddRedirectsOptions,\n AddRedirectsResponse,\n AddGroupRedirectsRequest,\n AddGroupRedirectsOptions,\n AddGroupRedirectsResponse,\n BulkDeleteRedirectsRequest,\n BulkDeleteRedirectsResponse,\n BulkRedirectResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n ListRedirectsRequest,\n ListRedirectsResponse,\n GetRedirectRequest,\n GetRedirectResponse,\n BulkCreateRedirectsRequest,\n BulkCreateRedirectsOptions,\n BulkCreateRedirectsResponse,\n CreateRedirectRequest,\n CreateRedirectOptions,\n CreateRedirectResponse,\n DeleteRedirectRequest,\n DeleteRedirectResponse,\n RemoveGeneralRedirectRequest,\n RemoveGeneralRedirectsOptions,\n RemoveGeneralRedirectResponse,\n GetHttpStatusRequest,\n GetHttpStatusResponse,\n CleanupLanguageRedirectsRequest,\n CleanupLanguageRedirectsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n RedirectCreatedEnvelope,\n BulkCreateRedirectsOptionsForRequest,\n CreateRedirectOptionsForRequest,\n} from './promote-seo-v1-redirect-redirects.universal.js';\nexport {\n SourceWithLiterals,\n WebhookIdentityTypeWithLiterals,\n GetRedirectApplicationErrors,\n CreateRedirectApplicationErrors,\n DeleteRedirectApplicationErrors,\n} from './promote-seo-v1-redirect-redirects.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,2BAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAA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E,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,aAAY,YAA8C;AACxE,SAAO,CAAC,eACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAkBO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CACL,WACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmCO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,UAAoB,YAC1BA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAeO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,eACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoCO,IAAM,oBAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;;;AGnS3B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAEhD,IAAMC,qBAGoC;AAAA,EAC/C;AACF;","names":["bulkCreateRedirects","bulkDeleteRedirects","createRedirect","deleteRedirect","getRedirect","listRedirects","onRedirectCreated","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","Source","WebhookIdentityType","bulkDeleteRedirects","sdkTransformError","listRedirects","getRedirect","bulkCreateRedirects","createRedirect","deleteRedirect","bulkDeleteRedirects","listRedirects","getRedirect","bulkCreateRedirects","createRedirect","deleteRedirect","import_rest_modules","bulkDeleteRedirects","listRedirects","getRedirect","bulkCreateRedirects","createRedirect","deleteRedirect","onRedirectCreated"]}