From e43e04e48f1696397d21bd7a65dba00f22aa8206 Mon Sep 17 00:00:00 2001 From: hitchhiker Date: Sat, 19 Apr 2025 19:31:46 +0200 Subject: [PATCH] Cleanup --- README.md | 6 +- docker-compose.override.yml.template | 2 +- docker-compose.yml | 18 +- docs/client-env-vars.md | 16 +- docs/deployment.md | 6 +- docs/local-development.md | 4 +- docs/utils.md | 6 +- memory-bank/README.md | 27 +- memory-bank/projectbrief.md | 35 -- package-lock.json | 4 +- package.json | 8 +- src/lib/api/merchant/core/ApiError.ts | 36 +- .../api/merchant/core/ApiRequestOptions.ts | 29 +- src/lib/api/merchant/core/ApiResult.ts | 10 +- .../api/merchant/core/CancelablePromise.ts | 213 ++++---- src/lib/api/merchant/core/OpenAPI.ts | 38 +- src/lib/api/merchant/core/initialize.ts | 38 -- src/lib/api/merchant/core/request.ts | 508 ++++++++---------- src/lib/api/merchant/index.ts | 336 ++++++------ .../models/QueryResultDto_CategoryDto_.ts | 7 +- .../QueryResultDto_CategoryRevisionDto_.ts | 7 +- .../QueryResultDto_OptionsRevisionDto_.ts | 7 +- .../models/QueryResultDto_OrderViewDto_.ts | 7 +- .../QueryResultDto_ProductRevisionDto_.ts | 7 +- .../QueryResultDto_PromotionViewDto_.ts | 7 +- .../models/QueryResultDto_SellerDto_.ts | 7 +- .../QueryResultDto_SellerRevisionDto_.ts | 7 +- .../models/QueryResultDto_TextRevisionDto_.ts | 7 +- .../models/QueryResultDto_UserDto_.ts | 7 +- src/lib/api/merchant/models/addressDto.ts | 77 +-- src/lib/api/merchant/models/addressType.ts | 40 +- src/lib/api/merchant/models/aspectType.ts | 32 +- .../api/merchant/models/assetCollectionDto.ts | 17 +- .../api/merchant/models/authDocumentDto.ts | 41 +- .../merchant/models/authHeaderResponseDto.ts | 33 +- .../models/authenticationResultDto.ts | 9 +- .../models/baseCreateSellerRevisionDto.ts | 56 +- src/lib/api/merchant/models/baseOfferDto.ts | 23 +- src/lib/api/merchant/models/baseTriggerDto.ts | 7 +- src/lib/api/merchant/models/basketDto.ts | 67 +-- .../merchant/models/bundleDiscountOfferDto.ts | 11 +- .../api/merchant/models/bundleTriggerDto.ts | 9 +- .../merchant/models/calculatedCheckoutDto.ts | 196 ++++--- .../merchant/models/calculatedProductDto.ts | 96 ++-- .../merchant/models/categoryCompositeDto.ts | 33 +- src/lib/api/merchant/models/categoryDto.ts | 15 +- .../models/categoryQueryRequestDto.ts | 9 +- .../merchant/models/categoryRevisionDto.ts | 37 +- .../models/categoryRevisionQueryRequestDto.ts | 17 +- .../merchant/models/categoryStopListDto.ts | 3 +- .../api/merchant/models/categoryViewDto.ts | 27 +- .../api/merchant/models/checkoutOptionsDto.ts | 37 +- .../models/commonOrderFailureResult.ts | 80 +-- .../api/merchant/models/commonOrderStatus.ts | 96 ++-- .../api/merchant/models/couponTriggerDto.ts | 9 +- src/lib/api/merchant/models/courierInfoDto.ts | 7 +- .../api/merchant/models/createCategoryDto.ts | 9 +- .../models/createCategoryRevisionDto.ts | 17 +- .../models/createOptionsRevisionDto.ts | 29 +- .../api/merchant/models/createProductDto.ts | 7 +- .../models/createProductRevisionDto.ts | 43 +- .../api/merchant/models/createPromotionDto.ts | 9 +- .../merchant/models/createRestaurantDto.ts | 31 +- .../models/createRestaurantRevisionDto.ts | 67 +-- .../api/merchant/models/createSellerDto.ts | 52 +- .../models/createSellerRevisionDto.ts | 43 +- .../merchant/models/createTextRevisionDto.ts | 9 +- .../models/customerGroupTriggerDto.ts | 9 +- .../models/customerHistoryTriggerDto.ts | 9 +- .../models/customerLoyaltyTriggerDto.ts | 9 +- .../api/merchant/models/deliveryAddressDto.ts | 19 +- .../merchant/models/deliveryFailureResult.ts | 64 +-- .../merchant/models/deliveryLocationDto.ts | 33 +- .../merchant/models/deliveryOrderStatus.ts | 48 +- .../api/merchant/models/deliveryStateDto.ts | 59 +- .../models/digitalEngagementTriggerDto.ts | 9 +- .../models/discountProductOfferDto.ts | 11 +- .../merchant/models/discountTotalOfferDto.ts | 9 +- src/lib/api/merchant/models/discountType.ts | 24 +- .../api/merchant/models/dispatchMethodType.ts | 24 +- .../merchant/models/freeDeliveryOfferDto.ts | 5 +- .../api/merchant/models/freeItemOfferDto.ts | 7 +- src/lib/api/merchant/models/gpsLocationDto.ts | 21 +- .../api/merchant/models/holidayTriggerDto.ts | 9 +- .../models/humanVerificationRequestDto.ts | 21 +- .../models/humanVerificationStatusDto.ts | 21 +- src/lib/api/merchant/models/iTriggerDto.ts | 48 +- .../api/merchant/models/imageReferenceDto.ts | 35 +- .../api/merchant/models/localizedTextDto.ts | 9 +- .../models/managerOverrideTriggerDto.ts | 17 +- .../merchant/models/oidcConnectResponseDto.ts | 19 +- src/lib/api/merchant/models/optionDto.ts | 27 +- .../api/merchant/models/optionsQueryDto.ts | 39 +- .../api/merchant/models/optionsRevisionDto.ts | 49 +- src/lib/api/merchant/models/optionsViewDto.ts | 39 +- src/lib/api/merchant/models/orderCreateDto.ts | 61 +-- src/lib/api/merchant/models/orderDto.ts | 37 +- .../merchant/models/orderFailureRequestDto.ts | 21 +- .../api/merchant/models/orderNextStatusDto.ts | 21 +- .../merchant/models/orderQueryRequestDto.ts | 125 ++--- .../models/orderStateChangeRequestDto.ts | 25 +- src/lib/api/merchant/models/orderStateDto.ts | 59 +- .../api/merchant/models/orderTriggerDto.ts | 72 +-- src/lib/api/merchant/models/orderViewDto.ts | 93 ++-- src/lib/api/merchant/models/paymentType.ts | 24 +- .../merchant/models/phoneVerificationState.ts | 24 +- .../merchant/models/preparationStateDto.ts | 33 +- .../api/merchant/models/priceEstimationDto.ts | 49 +- .../models/priceEstimationRequestDto.ts | 19 +- .../merchant/models/productCompositeDto.ts | 61 +-- src/lib/api/merchant/models/productDto.ts | 15 +- .../merchant/models/productQueryRequestDto.ts | 9 +- .../api/merchant/models/productRevisionDto.ts | 65 +-- .../models/productRevisionQueryRequestDto.ts | 19 +- .../api/merchant/models/productStopListDto.ts | 3 +- .../merchant/models/productUnavailableDto.ts | 13 +- .../models/productUnavailableReason.ts | 48 +- .../models/promotionQueryRequestDto.ts | 17 +- .../api/merchant/models/promotionViewDto.ts | 23 +- .../api/merchant/models/purchaseTriggerDto.ts | 13 +- src/lib/api/merchant/models/restaurantDto.ts | 63 +-- .../merchant/models/restaurantRevisionDto.ts | 131 ++--- .../api/merchant/models/rolePermissionsDto.ts | 17 +- src/lib/api/merchant/models/scheduleDto.ts | 39 +- .../merchant/models/scheduleExceptionDto.ts | 21 +- .../api/merchant/models/selectedOptionDto.ts | 29 +- .../api/merchant/models/selectedProductDto.ts | 49 +- .../api/merchant/models/sellerCompositeDto.ts | 111 ++-- src/lib/api/merchant/models/sellerDto.ts | 69 +-- .../models/sellerOperationalStateDto.ts | 57 +- .../sellerOperationalStateTriggerDto.ts | 23 +- .../models/sellerPublicAggregateFullDto.ts | 33 +- .../merchant/models/sellerQueryRequestDto.ts | 17 +- .../api/merchant/models/sellerRevisionDto.ts | 99 ++-- .../models/sellerRevisionQueryRequestDto.ts | 81 +-- src/lib/api/merchant/models/sellerViewDto.ts | 85 +-- .../merchant/models/sessionIpResponseDto.ts | 9 +- src/lib/api/merchant/models/sessionStatus.ts | 40 +- .../api/merchant/models/sessionStatusDto.ts | 29 +- .../merchant/models/signedAuthDocumentDto.ts | 13 +- .../api/merchant/models/simpleContactDto.ts | 11 +- .../models/startSessionResponseDto.ts | 17 +- .../api/merchant/models/stopListTriggerDto.ts | 11 +- .../api/merchant/models/systemSecurityDto.ts | 27 +- .../merchant/models/textQueryRequestDto.ts | 23 +- .../api/merchant/models/textRevisionDto.ts | 23 +- src/lib/api/merchant/models/timeRangeDto.ts | 17 +- src/lib/api/merchant/models/timeTriggerDto.ts | 23 +- src/lib/api/merchant/models/triggerEffect.ts | 32 +- .../models/updatePermissionsRequest.ts | 25 +- src/lib/api/merchant/models/userDto.ts | 89 +-- .../api/merchant/models/userQueryRequest.ts | 49 +- .../api/merchant/models/verifiedValueDto.ts | 25 +- src/lib/api/merchant/models/versionCheck.ts | 24 +- src/lib/api/merchant/services/AiService.ts | 50 +- .../services/AuthenticationService.ts | 252 ++++----- .../services/CategoriesCanonicalService.ts | 364 ++++++------- .../services/CategoriesRevisionsService.ts | 284 +++++----- .../services/CategoriesViewsService.ts | 138 ++--- .../merchant/services/DeliveriesService.ts | 152 +++--- .../api/merchant/services/ImagesService.ts | 176 +++--- src/lib/api/merchant/services/OidcService.ts | 72 +-- .../merchant/services/OrdersBasketService.ts | 50 +- .../api/merchant/services/OrdersService.ts | 412 +++++++------- .../ProductOptionsRevisionsService.ts | 326 +++++------ .../services/ProductsCanonicalService.ts | 364 ++++++------- .../services/ProductsRevisionsService.ts | 282 +++++----- .../merchant/services/ProductsViewsService.ts | 138 ++--- .../merchant/services/PromotionsService.ts | 234 ++++---- .../api/merchant/services/SecurityService.ts | 82 +-- .../services/SellersCanonicalService.ts | 374 ++++++------- .../services/SellersRevisionsService.ts | 286 +++++----- .../merchant/services/SellersViewsService.ts | 362 ++++++------- .../services/ServerSideEventsService.ts | 194 +++---- .../api/merchant/services/SystemService.ts | 54 +- src/lib/api/merchant/services/TestsService.ts | 86 +-- .../TranslatableTextRevisionsService.ts | 278 +++++----- src/lib/api/merchant/services/UserService.ts | 166 +++--- .../merchant/services/VerificationsService.ts | 144 ++--- src/lib/api/merchant/services/WebService.ts | 90 ++-- src/shared/ui/Layout/Sidebar.tsx | 2 +- 181 files changed, 5604 insertions(+), 5671 deletions(-) delete mode 100644 memory-bank/projectbrief.md delete mode 100644 src/lib/api/merchant/core/initialize.ts diff --git a/README.md b/README.md index 0388efe..5599234 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -# Web - -App is a browser-only React SPA that lets local businesses create, edit, and audit their own merchant records on Local—a community-commerce network running on the peer-to-peer FogBox stack. Its mission is to decentralize ownership of commercial data and return technological control to merchants and their customers. Data is written locally first, then synchronised through FogBox nodes—no central server—ensuring autonomy and resilience. Open, well-documented APIs let any citizen-developer extend, fork, or integrate the codebase without gatekeepers. - ## Architecture This project follows a Flux-style architecture using Effector for state management. The architecture is organized around domains, with each domain containing its model (events, stores, effects), view-model (React hooks), and UI components. @@ -13,7 +9,7 @@ For more details, see the [Architecture Documentation](./docs/architecture.md). The project follows a domain-driven structure for better maintainability and scalability: ``` -merchant-operator-web/ +spa-app/ ├── src/ │ ├── app/ # Application entry point and configuration │ │ ├── root.tsx # Root component diff --git a/docker-compose.override.yml.template b/docker-compose.override.yml.template index a3e1efb..67cb782 100644 --- a/docker-compose.override.yml.template +++ b/docker-compose.override.yml.template @@ -1,5 +1,5 @@ services: - merchant-operator-web: + spa-app: environment: - CLIENT_BASE_PATH= - CLIENT_API_URL=https:// diff --git a/docker-compose.yml b/docker-compose.yml index de399a7..33ecece 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ services: - merchant-operator-web: + spa-app: build: context: . - container_name: ${APP_CONTAINER_NAME:-merchant-operator-web} + container_name: ${APP_CONTAINER_NAME:-spa-app} environment: - CLIENT_BASE_PATH=${CLIENT_BASE_PATH:-/} - CLIENT_API_URL=${CLIENT_API_URL:-} @@ -10,10 +10,10 @@ services: - CLIENT_DEBUG=${CLIENT_DEBUG:-false} labels: - "traefik.enable=true" - - "traefik.http.routers.${APP_NAME:-merchant-operator-web}.rule=Host(`${APP_DOMAIN:-localhost}`) && PathPrefix(`${BASE_PATH:-/}`)" - - "traefik.http.routers.${APP_NAME:-merchant-operator-web}.entrypoints=${TRAEFIK_ENTRYPOINT:-websecure}" - - "traefik.http.routers.${APP_NAME:-merchant-operator-web}.tls=${ENABLE_TLS:-false}" - - "traefik.http.routers.${APP_NAME:-merchant-operator-web}.tls.certresolver=${CERT_RESOLVER:-letsencrypt}" - - "traefik.http.services.${APP_NAME:-merchant-operator-web}.loadbalancer.server.port=369" - - "traefik.http.routers.${APP_NAME:-merchant-operator-web}.middlewares=${APP_NAME:-merchant-operator-web}-strip" - - "traefik.http.middlewares.${APP_NAME:-merchant-operator-web}-strip.stripprefix.prefixes=${BASE_PATH:-/}" + - "traefik.http.routers.${APP_NAME:-spa-app}.rule=Host(`${APP_DOMAIN:-localhost}`) && PathPrefix(`${BASE_PATH:-/}`)" + - "traefik.http.routers.${APP_NAME:-spa-app}.entrypoints=${TRAEFIK_ENTRYPOINT:-websecure}" + - "traefik.http.routers.${APP_NAME:-spa-app}.tls=${ENABLE_TLS:-false}" + - "traefik.http.routers.${APP_NAME:-spa-app}.tls.certresolver=${CERT_RESOLVER:-letsencrypt}" + - "traefik.http.services.${APP_NAME:-spa-app}.loadbalancer.server.port=369" + - "traefik.http.routers.${APP_NAME:-spa-app}.middlewares=${APP_NAME:-spa-app}-strip" + - "traefik.http.middlewares.${APP_NAME:-spa-app}-strip.stripprefix.prefixes=${BASE_PATH:-/}" diff --git a/docs/client-env-vars.md b/docs/client-env-vars.md index 938032c..85cb285 100644 --- a/docs/client-env-vars.md +++ b/docs/client-env-vars.md @@ -40,10 +40,10 @@ For Docker deployments, environment variables are configured **at runtime** thro ```yaml services: - merchant-operator-app: + spa-app-app: environment: - CLIENT_API_URL=https://api.example.com - - CLIENT_BASE_PATH=/merchant-app + - CLIENT_BASE_PATH=/app - CLIENT_APP_NAME=App - CLIENT_DEBUG=false ``` @@ -54,10 +54,10 @@ Create a `docker-compose.override.yml` file from the template and set your envir ```yaml services: - merchant-operator-app: + spa-app-app: environment: - CLIENT_API_URL=https://api.example.com - - CLIENT_BASE_PATH=/merchant-app + - CLIENT_BASE_PATH=/app - CLIENT_APP_NAME=App - CLIENT_DEBUG=false ``` @@ -69,7 +69,7 @@ Create a `.env` file in the same directory as your `docker-compose.yml`: ```dotenv # .env CLIENT_API_URL=https://api.example.com -CLIENT_BASE_PATH=/merchant-app +CLIENT_BASE_PATH=/app CLIENT_APP_NAME=App CLIENT_DEBUG=false # ... other variables @@ -78,7 +78,7 @@ CLIENT_DEBUG=false #### Using Docker run command ```bash -docker run -e CLIENT_BASE_PATH=/merchant-app -e CLIENT_API_URL=https://api.example.com -e CLIENT_APP_NAME="App" -e CLIENT_DEBUG=false your-image-name +docker run -e CLIENT_BASE_PATH=/app -e CLIENT_API_URL=https://api.example.com -e CLIENT_APP_NAME="App" -e CLIENT_DEBUG=false your-image-name ``` ## How Runtime Environment Variables Work @@ -113,8 +113,8 @@ Utility functions are available to access common values: import { getBasePath, getAssetPath } from '../shared/lib/config'; // Get the base path -const basePath = getBasePath(); // "/merchant-app" +const basePath = getBasePath(); // "/app" // Get a path with the base path prepended -const logoPath = getAssetPath('/images/logo.png'); // "/merchant-app/images/logo.png" +const logoPath = getAssetPath('/images/logo.png'); // "/app/images/logo.png" ``` diff --git a/docs/deployment.md b/docs/deployment.md index b3d23ed..bb9cb3c 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -46,7 +46,7 @@ For production, build the image and then deploy with environment variables: ```bash # Build the image -docker build -t merchant-operator-app . +docker build -t spa-app-app . # Deploy with environment variables docker-compose up -d @@ -56,7 +56,7 @@ Environment variables are passed at runtime through docker-compose.yml or docker ```yaml services: - merchant-operator-app: + spa-app-app: environment: - CLIENT_BASE_PATH=/app - CLIENT_API_URL=https://api.example.com @@ -95,4 +95,4 @@ function MyComponent() { - If assets are not loading, check that you're using the `getAssetPath()` function for all asset URLs. - If routing is not working, ensure that your router is configured to use the base path. -- Check Nginx logs for any errors: `docker-compose logs Merchant-operator-app` +- Check Nginx logs for any errors: `docker-compose logs spa-app-app` diff --git a/docs/local-development.md b/docs/local-development.md index d920b1e..d638709 100644 --- a/docs/local-development.md +++ b/docs/local-development.md @@ -58,7 +58,7 @@ npm run dev #### Custom Path Development -To run the development server with a predefined custom path (`/Merchant-app`): +To run the development server with a predefined custom path (`/app`): ```bash npm run dev:path @@ -84,7 +84,7 @@ npm run build ### Custom Path Build -To build with a predefined custom path (`/Merchant-app`): +To build with a predefined custom path (`/app`): ```bash npm run build:path diff --git a/docs/utils.md b/docs/utils.md index 67e8b51..de72349 100644 --- a/docs/utils.md +++ b/docs/utils.md @@ -12,7 +12,7 @@ Returns the base path from the application configuration. import { getBasePath } from '../utils/config'; // Example usage -const basePath = getBasePath(); // Returns the base path, e.g., '/Merchant-app' +const basePath = getBasePath(); // Returns the base path, e.g., '/app' ``` ### getAssetPath(path) @@ -24,11 +24,11 @@ import { getAssetPath } from '../utils/config'; // Example usage const logoPath = getAssetPath('/images/logo.png'); -// If base path is '/Merchant-app', returns '/Merchant-app/images/logo.png' +// If base path is '/app', returns '/app/images/logo.png' // Works with paths with or without leading slash const cssPath = getAssetPath('styles/main.css'); -// Returns '/Merchant-app/styles/main.css' +// Returns '/app/styles/main.css' ``` ## When to Use These Functions diff --git a/memory-bank/README.md b/memory-bank/README.md index 3fe6112..14be5f6 100644 --- a/memory-bank/README.md +++ b/memory-bank/README.md @@ -15,14 +15,6 @@ I am an expert software engineer with a unique characteristic: my memory resets - **Naming**: Use $ prefix for stores, Fx suffix for effects - **Exports**: Use named exports only, avoid default exports -### Project Summary -- **Name**: Web Application -- **Type**: Client-side only React application for Merchant management -- **Core Features**: Menu management, order tracking, Merchant operations -- **Tech Stack**: React, TypeScript, Tailwind CSS, Effector, Vite -- **Deployment**: Static site deployment -- **Current Status**: In development - ### Important Workflow Preferences - **Git Commits**: NEVER commit without asking the user first - **Completion Reminders**: Remind/ask the user when big sections have been done and tested @@ -30,9 +22,8 @@ I am an expert software engineer with a unique characteristic: my memory resets - **Development Server**: NEVER run the server unless specifically asked, as user often runs it in the background ### Key Files Summary -1. **projectbrief.md**: Merchant management app with menu editing, order tracking, and Merchant operations -2. **systemPatterns.md**: Client-side SPA with React, Effector for state management, component-based architecture -3. **techContext.md**: React, TypeScript, Tailwind CSS, Effector, Vite, Jest, ESLint, Prettier, Husky +1. **systemPatterns.md**: Client-side SPA with React, Effector for state management, component-based architecture +2. **techContext.md**: React, TypeScript, Tailwind CSS, Effector, Vite, Jest, ESLint, Prettier, Husky ### Documentation Sources - **AI Agent Documentation** (`/docs`): Concise, up-to-date docs designed for AI agents @@ -41,26 +32,16 @@ I am an expert software engineer with a unique characteristic: my memory resets The Memory Bank consists of core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy: -flowchart TD - PB[projectbrief.md] --> SP[systemPatterns.md] - PB --> TC[techContext.md] - ### Core Files (Required) -1. `projectbrief.md` - - Foundation document that shapes all other files - - Created at project start if it doesn't exist - - Defines core requirements and goals - - Source of truth for project scope - -2. `systemPatterns.md` +1. `systemPatterns.md` - System architecture - Key technical decisions - Design patterns in use - Component relationships - Critical implementation paths -3. `techContext.md` +2. `techContext.md` - Technologies used - Development setup - Technical constraints diff --git a/memory-bank/projectbrief.md b/memory-bank/projectbrief.md deleted file mode 100644 index 0603522..0000000 --- a/memory-bank/projectbrief.md +++ /dev/null @@ -1,35 +0,0 @@ -# Project Brief: Web Application - -## Project Overview -A client-side React application for Merchant owners to manage menus, track orders, and handle operations. - -App is a browser-only React SPA that lets local businesses create, edit, and audit their own merchant records on Local—a community-commerce network running on the peer-to-peer FogBox stack. Its mission is to decentralize ownership of commercial data and return technological control to merchants and their customers. Data is written locally first, then synchronised through FogBox nodes—no central server—ensuring autonomy and resilience. Open, well-documented APIs let any citizen-developer extend, fork, or integrate the codebase without gatekeepers. - -## Core Features - -### Menu Management -- Create and edit menu items (name, price, description, image) -- Configure options (size, dough type) and additions/toppings -- Set availability times - -### Order Management -- View active orders -- Track order status -- Process fulfillment - -### Merchant Operations -- Dashboard with key metrics -- Seller management -- Security controls - -## UI Design -- Dark-themed interface -- Sidebar navigation -- Responsive layout -- Intuitive forms - -## Technical Approach -- React with TypeScript -- Effector for state management -- Tailwind CSS for styling -- Component-based architecture diff --git a/package-lock.json b/package-lock.json index 9998385..7e412ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "merchant-operator", + "name": "spa-app", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "merchant-operator", + "name": "spa-app", "version": "0.1.0", "dependencies": { "@g1/sse-client": "^0.2.0", diff --git a/package.json b/package.json index 02d9b2f..6ce282f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "merchant-operator", + "name": "spa-app", "version": "0.1.0", "private": true, "type": "module", @@ -48,12 +48,12 @@ }, "scripts": { "dev": "vite", - "dev:path": "CLIENT_BASE_PATH=/Merchant-app vite", + "dev:path": "CLIENT_BASE_PATH=/app vite", "dev:custom": "node vite.server.js", "build": "tsc && vite build", - "build:path": "tsc && CLIENT_BASE_PATH=/Merchant-app vite build", + "build:path": "tsc && CLIENT_BASE_PATH=/app vite build", "preview": "vite preview", - "preview:path": "CLIENT_BASE_PATH=/Merchant-app vite preview", + "preview:path": "CLIENT_BASE_PATH=/app vite preview", "prepare": "husky", "api:generate": "g1-api-generator https://localhost:7205/openapi/schema.json src/lib/api/merchant --skip-tls-verify", "typecheck": "tsc --noEmit", diff --git a/src/lib/api/merchant/core/ApiError.ts b/src/lib/api/merchant/core/ApiError.ts index 3335e5a..ec7b16a 100644 --- a/src/lib/api/merchant/core/ApiError.ts +++ b/src/lib/api/merchant/core/ApiError.ts @@ -2,28 +2,24 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + public readonly request: ApiRequestOptions; - constructor( - request: ApiRequestOptions, - response: ApiResult, - message: string, - ) { - super(message); + constructor(request: ApiRequestOptions, response: ApiResult, message: string) { + super(message); - this.name = "ApiError"; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/src/lib/api/merchant/core/ApiRequestOptions.ts b/src/lib/api/merchant/core/ApiRequestOptions.ts index 13f2bdf..93143c3 100644 --- a/src/lib/api/merchant/core/ApiRequestOptions.ts +++ b/src/lib/api/merchant/core/ApiRequestOptions.ts @@ -3,22 +3,15 @@ /* tslint:disable */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: - | "GET" - | "PUT" - | "POST" - | "DELETE" - | "OPTIONS" - | "HEAD" - | "PATCH"; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/src/lib/api/merchant/core/ApiResult.ts b/src/lib/api/merchant/core/ApiResult.ts index 24c93fc..ee1126e 100644 --- a/src/lib/api/merchant/core/ApiResult.ts +++ b/src/lib/api/merchant/core/ApiResult.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; }; diff --git a/src/lib/api/merchant/core/CancelablePromise.ts b/src/lib/api/merchant/core/CancelablePromise.ts index 442c2be..d70de92 100644 --- a/src/lib/api/merchant/core/CancelablePromise.ts +++ b/src/lib/api/merchant/core/CancelablePromise.ts @@ -3,128 +3,129 @@ /* tslint:disable */ /* eslint-disable */ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = "CancelError"; - } - public get isCancelled(): boolean { - return true; - } + constructor(message: string) { + super(message); + this.name = 'CancelError'; + } + + public get isCancelled(): boolean { + return true; + } } export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - #isResolved: boolean; - #isRejected: boolean; - #isCancelled: boolean; - readonly #cancelHandlers: (() => void)[]; - readonly #promise: Promise; - #resolve?: (value: T | PromiseLike) => void; - #reject?: (reason?: any) => void; + #isResolved: boolean; + #isRejected: boolean; + #isCancelled: boolean; + readonly #cancelHandlers: (() => void)[]; + readonly #promise: Promise; + #resolve?: (value: T | PromiseLike) => void; + #reject?: (reason?: any) => void; - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, - onCancel: OnCancel, - ) => void, - ) { - this.#isResolved = false; - this.#isRejected = false; - this.#isCancelled = false; - this.#cancelHandlers = []; - this.#promise = new Promise((resolve, reject) => { - this.#resolve = resolve; - this.#reject = reject; + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: any) => void, + onCancel: OnCancel + ) => void + ) { + this.#isResolved = false; + this.#isRejected = false; + this.#isCancelled = false; + this.#cancelHandlers = []; + this.#promise = new Promise((resolve, reject) => { + this.#resolve = resolve; + this.#reject = reject; - const onResolve = (value: T | PromiseLike): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isResolved = true; - if (this.#resolve) this.#resolve(value); - }; + const onResolve = (value: T | PromiseLike): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isResolved = true; + if (this.#resolve) this.#resolve(value); + }; - const onReject = (reason?: any): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isRejected = true; - if (this.#reject) this.#reject(reason); - }; + const onReject = (reason?: any): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isRejected = true; + if (this.#reject) this.#reject(reason); + }; - const onCancel = (cancelHandler: () => void): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#cancelHandlers.push(cancelHandler); - }; + const onCancel = (cancelHandler: () => void): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#cancelHandlers.push(cancelHandler); + }; - Object.defineProperty(onCancel, "isResolved", { - get: (): boolean => this.#isResolved, - }); + Object.defineProperty(onCancel, 'isResolved', { + get: (): boolean => this.#isResolved, + }); - Object.defineProperty(onCancel, "isRejected", { - get: (): boolean => this.#isRejected, - }); + Object.defineProperty(onCancel, 'isRejected', { + get: (): boolean => this.#isRejected, + }); - Object.defineProperty(onCancel, "isCancelled", { - get: (): boolean => this.#isCancelled, - }); + Object.defineProperty(onCancel, 'isCancelled', { + get: (): boolean => this.#isCancelled, + }); - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null, - ): Promise { - return this.#promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null, - ): Promise { - return this.#promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.#promise.finally(onFinally); - } - - public cancel(): void { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; + return executor(onResolve, onReject, onCancel as OnCancel); + }); } - this.#isCancelled = true; - if (this.#cancelHandlers.length) { - try { - for (const cancelHandler of this.#cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn("Cancellation threw an error", error); - return; - } - } - this.#cancelHandlers.length = 0; - if (this.#reject) this.#reject(new CancelError("Request aborted")); - } - public get isCancelled(): boolean { - return this.#isCancelled; - } + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } + + public then( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: any) => TResult2 | PromiseLike) | null + ): Promise { + return this.#promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: any) => TResult | PromiseLike) | null + ): Promise { + return this.#promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + return this.#promise.finally(onFinally); + } + + public cancel(): void { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isCancelled = true; + if (this.#cancelHandlers.length) { + try { + for (const cancelHandler of this.#cancelHandlers) { + cancelHandler(); + } + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } + } + this.#cancelHandlers.length = 0; + if (this.#reject) this.#reject(new CancelError('Request aborted')); + } + + public get isCancelled(): boolean { + return this.#isCancelled; + } } diff --git a/src/lib/api/merchant/core/OpenAPI.ts b/src/lib/api/merchant/core/OpenAPI.ts index dcacd77..11736c8 100644 --- a/src/lib/api/merchant/core/OpenAPI.ts +++ b/src/lib/api/merchant/core/OpenAPI.ts @@ -2,31 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { ApiRequestOptions } from './ApiRequestOptions'; type Resolver = (options: ApiRequestOptions) => Promise; type Headers = Record; export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: "include" | "omit" | "same-origin"; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - HEADERS?: Headers | Resolver | undefined; - ENCODE_PATH?: ((path: string) => string) | undefined; + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + HEADERS?: Headers | Resolver | undefined; + ENCODE_PATH?: ((path: string) => string) | undefined; }; export const OpenAPI: OpenAPIConfig = { - BASE: "", - VERSION: "0.0.0", - WITH_CREDENTIALS: false, - CREDENTIALS: "include", - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, + BASE: '', + VERSION: '0.0.0', + WITH_CREDENTIALS: false, + CREDENTIALS: 'include', + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, + ENCODE_PATH: undefined, }; diff --git a/src/lib/api/merchant/core/initialize.ts b/src/lib/api/merchant/core/initialize.ts deleted file mode 100644 index c002738..0000000 --- a/src/lib/api/merchant/core/initialize.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Initialize OpenAPI configuration -import { OpenAPI } from "./OpenAPI"; -import { getApiUrlSingleton } from "@shared/lib/api-url"; - -// Add a global debug function for consistent logging -const debug = (message: string) => { - console.log(`[OPENAPI-INIT] ${message}`); -}; - -/** - * Initialize the OpenAPI configuration with the API URL - */ -export const initializeOpenAPI = () => { - try { - debug("Initializing OpenAPI configuration"); - - // Get the API URL using our utility function - const apiUrl = getApiUrlSingleton(); - - // Set the OpenAPI base URL - OpenAPI.BASE = apiUrl; - debug(`OpenAPI initialized with BASE URL: ${OpenAPI.BASE}`); - - return true; - } catch (error) { - console.error("FATAL ERROR: Failed to initialize OpenAPI:", error); - return false; - } -}; - -// Add a debug statement to confirm the script is being executed -debug("initialize.ts script is being executed"); - -// Call initialization function -const initialized = initializeOpenAPI(); - -// Log initialization status -debug(`OpenAPI initialization ${initialized ? "successful" : "failed"}`); diff --git a/src/lib/api/merchant/core/request.ts b/src/lib/api/merchant/core/request.ts index 7f2dd66..1dc6fef 100644 --- a/src/lib/api/merchant/core/request.ts +++ b/src/lib/api/merchant/core/request.ts @@ -2,315 +2,285 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import axios from "axios"; -import type { - AxiosError, - AxiosRequestConfig, - AxiosResponse, - AxiosInstance, -} from "axios"; -import FormData from "form-data"; +import axios from 'axios'; +import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios'; +import FormData from 'form-data'; -import { ApiError } from "./ApiError"; -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; -import { CancelablePromise } from "./CancelablePromise"; -import type { OnCancel } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; +import { ApiError } from './ApiError'; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; +import { CancelablePromise } from './CancelablePromise'; +import type { OnCancel } from './CancelablePromise'; +import type { OpenAPIConfig } from './OpenAPI'; -export const isDefined = ( - value: T | null | undefined, -): value is Exclude => { - return value !== undefined && value !== null; +export const isDefined = (value: T | null | undefined): value is Exclude => { + return value !== undefined && value !== null; }; export const isString = (value: any): value is string => { - return typeof value === "string"; + return typeof value === 'string'; }; export const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== ""; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return ( - typeof value === "object" && - typeof value.type === "string" && - typeof value.stream === "function" && - typeof value.arrayBuffer === "function" && - typeof value.constructor === "function" && - typeof value.constructor.name === "string" && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]) - ); + return ( + typeof value === 'object' && + typeof value.type === 'string' && + typeof value.stream === 'function' && + typeof value.arrayBuffer === 'function' && + typeof value.constructor === 'function' && + typeof value.constructor.name === 'string' && + /^(Blob|File)$/.test(value.constructor.name) && + /^(Blob|File)$/.test(value[Symbol.toStringTag]) + ); }; export const isFormData = (value: any): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const isSuccess = (status: number): boolean => { - return status >= 200 && status < 300; + return status >= 200 && status < 300; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString("base64"); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: any) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: any) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach((v) => { - process(key, v); - }); - } else if (typeof value === "object") { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v); - }); - } else { - append(key, value); - } + const process = (key: string, value: any) => { + if (isDefined(value)) { + if (Array.isArray(value)) { + value.forEach(v => { + process(key, v); + }); + } else if (typeof value === 'object') { + Object.entries(value).forEach(([k, v]) => { + process(`${key}[${k}]`, v); + }); + } else { + append(key, value); + } + } + }; + + Object.entries(params).forEach(([key, value]) => { + process(key, value); + }); + + if (qs.length > 0) { + return `?${qs.join('&')}`; } - }; - Object.entries(params).forEach(([key, value]) => { - process(key, value); - }); - - if (qs.length > 0) { - return `?${qs.join("&")}`; - } - - return ""; + return ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; + const encoder = config.ENCODE_PATH || encodeURI; - const path = options.url - .replace("{api-version}", config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); - const url = `${config.BASE}${path}`; - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; + const url = `${config.BASE}${path}`; + if (options.query) { + return `${url}${getQueryString(options.query)}`; + } + return url; }; -export const getFormData = ( - options: ApiRequestOptions, -): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = (options: ApiRequestOptions): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); - const process = (key: string, value: any) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + const process = (key: string, value: any) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - Object.entries(options.formData) - .filter(([_, value]) => isDefined(value)) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((v) => process(key, v)); - } else { - process(key, value); - } - }); + Object.entries(options.formData) + .filter(([_, value]) => isDefined(value)) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach(v => process(key, v)); + } else { + process(key, value); + } + }); - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async ( - options: ApiRequestOptions, - resolver?: T | Resolver, -): Promise => { - if (typeof resolver === "function") { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - formData?: FormData, -): Promise> => { - const [token, username, password, additionalHeaders] = await Promise.all([ - resolve(options, config.TOKEN), - resolve(options, config.USERNAME), - resolve(options, config.PASSWORD), - resolve(options, config.HEADERS), - ]); +export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise> => { + const [token, username, password, additionalHeaders] = await Promise.all([ + resolve(options, config.TOKEN), + resolve(options, config.USERNAME), + resolve(options, config.PASSWORD), + resolve(options, config.HEADERS), + ]); - const formHeaders = - (typeof formData?.getHeaders === "function" && formData?.getHeaders()) || - {}; + const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {} - const headers = Object.entries({ - Accept: "application/json", - ...additionalHeaders, - ...options.headers, - ...formHeaders, - }) + const headers = Object.entries({ + Accept: 'application/json', + ...additionalHeaders, + ...options.headers, + ...formHeaders, + }) .filter(([_, value]) => isDefined(value)) - .reduce( - (headers, [key, value]) => ({ + .reduce((headers, [key, value]) => ({ ...headers, [key]: String(value), - }), - {} as Record, - ); + }), {} as Record); - if (isStringWithValue(token)) { - headers["Authorization"] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers["Authorization"] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers["Content-Type"] = options.mediaType; - } else if (isBlob(options.body)) { - headers["Content-Type"] = options.body.type || "application/octet-stream"; - } else if (isString(options.body)) { - headers["Content-Type"] = "text/plain"; - } else if (!isFormData(options.body)) { - headers["Content-Type"] = "application/json"; + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; } - } - return headers; + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; + } + } + + return headers; }; export const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body) { - return options.body; - } - return undefined; + if (options.body) { + return options.body; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Record, - onCancel: OnCancel, - axiosClient: AxiosInstance, + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Record, + onCancel: OnCancel, + axiosClient: AxiosInstance ): Promise> => { - const source = axios.CancelToken.source(); + const source = axios.CancelToken.source(); - const requestConfig: AxiosRequestConfig = { - url, - headers, - data: body ?? formData, - method: options.method, - withCredentials: config.WITH_CREDENTIALS, - withXSRFToken: - config.CREDENTIALS === "include" ? config.WITH_CREDENTIALS : false, - cancelToken: source.token, - }; + const requestConfig: AxiosRequestConfig = { + url, + headers, + data: body ?? formData, + method: options.method, + withCredentials: config.WITH_CREDENTIALS, + withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false, + cancelToken: source.token, + }; - onCancel(() => source.cancel("The user aborted a request.")); + onCancel(() => source.cancel('The user aborted a request.')); - try { - return await axiosClient.request(requestConfig); - } catch (error) { - const axiosError = error as AxiosError; - if (axiosError.response) { - return axiosError.response; + try { + return await axiosClient.request(requestConfig); + } catch (error) { + const axiosError = error as AxiosError; + if (axiosError.response) { + return axiosError.response; + } + throw error; } - throw error; - } }; -export const getResponseHeader = ( - response: AxiosResponse, - responseHeader?: string, -): string | undefined => { - if (responseHeader) { - const content = response.headers[responseHeader]; - if (isString(content)) { - return content; +export const getResponseHeader = (response: AxiosResponse, responseHeader?: string): string | undefined => { + if (responseHeader) { + const content = response.headers[responseHeader]; + if (isString(content)) { + return content; + } } - } - return undefined; + return undefined; }; export const getResponseBody = (response: AxiosResponse): any => { - if (response.status !== 204) { - return response.data; - } - return undefined; + if (response.status !== 204) { + return response.data; + } + return undefined; }; -export const catchErrorCodes = ( - options: ApiRequestOptions, - result: ApiResult, -): void => { - const errors: Record = { - 400: "Bad Request", - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", - 500: "Internal Server Error", - 502: "Bad Gateway", - 503: "Service Unavailable", - ...options.errors, - }; +export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { + const errors: Record = { + 400: 'Bad Request', + 401: 'Unauthorized', + 403: 'Forbidden', + 404: 'Not Found', + 500: 'Internal Server Error', + 502: 'Bad Gateway', + 503: 'Service Unavailable', + ...options.errors, + } - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } + const error = errors[result.status]; + if (error) { + throw new ApiError(options, result, error); + } - if (!result.ok) { - const errorStatus = result.status ?? "unknown"; - const errorStatusText = result.statusText ?? "unknown"; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); + if (!result.ok) { + const errorStatus = result.status ?? 'unknown'; + const errorStatusText = result.statusText ?? 'unknown'; + const errorBody = (() => { + try { + return JSON.stringify(result.body, null, 2); + } catch (e) { + return undefined; + } + })(); - throw new ApiError( - options, - result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, - ); - } + throw new ApiError(options, result, + `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` + ); + } }; /** @@ -321,49 +291,33 @@ export const catchErrorCodes = ( * @returns CancelablePromise * @throws ApiError */ -export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions, - axiosClient: AxiosInstance = axios, -): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options, formData); +export const request = (config: OpenAPIConfig, options: ApiRequestOptions, axiosClient: AxiosInstance = axios): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options, formData); - if (!onCancel.isCancelled) { - const response = await sendRequest( - config, - options, - url, - body, - formData, - headers, - onCancel, - axiosClient, - ); - const responseBody = getResponseBody(response); - const responseHeader = getResponseHeader( - response, - options.responseHeader, - ); + if (!onCancel.isCancelled) { + const response = await sendRequest(config, options, url, body, formData, headers, onCancel, axiosClient); + const responseBody = getResponseBody(response); + const responseHeader = getResponseHeader(response, options.responseHeader); - const result: ApiResult = { - url, - ok: isSuccess(response.status), - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; + const result: ApiResult = { + url, + ok: isSuccess(response.status), + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; - catchErrorCodes(options, result); + catchErrorCodes(options, result); - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/src/lib/api/merchant/index.ts b/src/lib/api/merchant/index.ts index a9fc832..c10e936 100644 --- a/src/lib/api/merchant/index.ts +++ b/src/lib/api/merchant/index.ts @@ -2,173 +2,173 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export { ApiError } from "./core/ApiError"; -export { CancelablePromise, CancelError } from "./core/CancelablePromise"; -export { OpenAPI } from "./core/OpenAPI"; -export type { OpenAPIConfig } from "./core/OpenAPI"; +export { ApiError } from './core/ApiError'; +export { CancelablePromise, CancelError } from './core/CancelablePromise'; +export { OpenAPI } from './core/OpenAPI'; +export type { OpenAPIConfig } from './core/OpenAPI'; -export type { _void } from "./models/_void"; -export type { addressDto } from "./models/addressDto"; -export { addressType } from "./models/addressType"; -export { aspectType } from "./models/aspectType"; -export type { assetCollectionDto } from "./models/assetCollectionDto"; -export type { authDocumentDto } from "./models/authDocumentDto"; -export type { authenticationResultDto } from "./models/authenticationResultDto"; -export type { authHeaderResponseDto } from "./models/authHeaderResponseDto"; -export type { baseCreateSellerRevisionDto } from "./models/baseCreateSellerRevisionDto"; -export type { baseOfferDto } from "./models/baseOfferDto"; -export type { baseTriggerDto } from "./models/baseTriggerDto"; -export type { basketDto } from "./models/basketDto"; -export type { bundleDiscountOfferDto } from "./models/bundleDiscountOfferDto"; -export type { bundleTriggerDto } from "./models/bundleTriggerDto"; -export type { calculatedCheckoutDto } from "./models/calculatedCheckoutDto"; -export type { calculatedProductDto } from "./models/calculatedProductDto"; -export type { categoryCompositeDto } from "./models/categoryCompositeDto"; -export type { categoryDto } from "./models/categoryDto"; -export type { categoryQueryRequestDto } from "./models/categoryQueryRequestDto"; -export type { categoryRevisionDto } from "./models/categoryRevisionDto"; -export type { categoryRevisionQueryRequestDto } from "./models/categoryRevisionQueryRequestDto"; -export type { categoryStopListDto } from "./models/categoryStopListDto"; -export type { categoryViewDto } from "./models/categoryViewDto"; -export type { checkoutOptionsDto } from "./models/checkoutOptionsDto"; -export { commonOrderFailureResult } from "./models/commonOrderFailureResult"; -export { commonOrderStatus } from "./models/commonOrderStatus"; -export type { couponTriggerDto } from "./models/couponTriggerDto"; -export type { courierInfoDto } from "./models/courierInfoDto"; -export type { createCategoryDto } from "./models/createCategoryDto"; -export type { createCategoryRevisionDto } from "./models/createCategoryRevisionDto"; -export type { createOptionsRevisionDto } from "./models/createOptionsRevisionDto"; -export type { createProductDto } from "./models/createProductDto"; -export type { createProductRevisionDto } from "./models/createProductRevisionDto"; -export type { createPromotionDto } from "./models/createPromotionDto"; -export type { createRestaurantDto } from "./models/createRestaurantDto"; -export type { createRestaurantRevisionDto } from "./models/createRestaurantRevisionDto"; -export type { createSellerDto } from "./models/createSellerDto"; -export type { createSellerRevisionDto } from "./models/createSellerRevisionDto"; -export type { createTextRevisionDto } from "./models/createTextRevisionDto"; -export type { customerGroupTriggerDto } from "./models/customerGroupTriggerDto"; -export type { customerHistoryTriggerDto } from "./models/customerHistoryTriggerDto"; -export type { customerLoyaltyTriggerDto } from "./models/customerLoyaltyTriggerDto"; -export type { deliveryAddressDto } from "./models/deliveryAddressDto"; -export { deliveryFailureResult } from "./models/deliveryFailureResult"; -export type { deliveryLocationDto } from "./models/deliveryLocationDto"; -export { deliveryOrderStatus } from "./models/deliveryOrderStatus"; -export type { deliveryStateDto } from "./models/deliveryStateDto"; -export type { digitalEngagementTriggerDto } from "./models/digitalEngagementTriggerDto"; -export type { discountProductOfferDto } from "./models/discountProductOfferDto"; -export type { discountTotalOfferDto } from "./models/discountTotalOfferDto"; -export { discountType } from "./models/discountType"; -export { dispatchMethodType } from "./models/dispatchMethodType"; -export type { freeDeliveryOfferDto } from "./models/freeDeliveryOfferDto"; -export type { freeItemOfferDto } from "./models/freeItemOfferDto"; -export type { gpsLocationDto } from "./models/gpsLocationDto"; -export type { holidayTriggerDto } from "./models/holidayTriggerDto"; -export type { humanVerificationRequestDto } from "./models/humanVerificationRequestDto"; -export type { humanVerificationStatusDto } from "./models/humanVerificationStatusDto"; -export type { imageReferenceDto } from "./models/imageReferenceDto"; -export type { iTriggerDto } from "./models/iTriggerDto"; -export type { localizedTextDto } from "./models/localizedTextDto"; -export type { managerOverrideTriggerDto } from "./models/managerOverrideTriggerDto"; -export type { oidcConnectResponseDto } from "./models/oidcConnectResponseDto"; -export type { optionDto } from "./models/optionDto"; -export type { optionsQueryDto } from "./models/optionsQueryDto"; -export type { optionsRevisionDto } from "./models/optionsRevisionDto"; -export type { optionsViewDto } from "./models/optionsViewDto"; -export type { orderCreateDto } from "./models/orderCreateDto"; -export type { orderDto } from "./models/orderDto"; -export type { orderFailureRequestDto } from "./models/orderFailureRequestDto"; -export type { orderNextStatusDto } from "./models/orderNextStatusDto"; -export type { orderQueryRequestDto } from "./models/orderQueryRequestDto"; -export type { orderStateChangeRequestDto } from "./models/orderStateChangeRequestDto"; -export type { orderStateDto } from "./models/orderStateDto"; -export { orderTriggerDto } from "./models/orderTriggerDto"; -export type { orderViewDto } from "./models/orderViewDto"; -export { paymentType } from "./models/paymentType"; -export { phoneVerificationState } from "./models/phoneVerificationState"; -export type { preparationStateDto } from "./models/preparationStateDto"; -export type { priceEstimationDto } from "./models/priceEstimationDto"; -export type { priceEstimationRequestDto } from "./models/priceEstimationRequestDto"; -export type { problemDetails } from "./models/problemDetails"; -export type { productCompositeDto } from "./models/productCompositeDto"; -export type { productDto } from "./models/productDto"; -export type { productQueryRequestDto } from "./models/productQueryRequestDto"; -export type { productRevisionDto } from "./models/productRevisionDto"; -export type { productRevisionQueryRequestDto } from "./models/productRevisionQueryRequestDto"; -export type { productStopListDto } from "./models/productStopListDto"; -export type { productUnavailableDto } from "./models/productUnavailableDto"; -export { productUnavailableReason } from "./models/productUnavailableReason"; -export type { promotionQueryRequestDto } from "./models/promotionQueryRequestDto"; -export type { promotionViewDto } from "./models/promotionViewDto"; -export type { purchaseTriggerDto } from "./models/purchaseTriggerDto"; -export type { QueryResultDto_CategoryDto_ } from "./models/QueryResultDto_CategoryDto_"; -export type { QueryResultDto_CategoryRevisionDto_ } from "./models/QueryResultDto_CategoryRevisionDto_"; -export type { QueryResultDto_OptionsRevisionDto_ } from "./models/QueryResultDto_OptionsRevisionDto_"; -export type { QueryResultDto_OrderViewDto_ } from "./models/QueryResultDto_OrderViewDto_"; -export type { QueryResultDto_ProductRevisionDto_ } from "./models/QueryResultDto_ProductRevisionDto_"; -export type { QueryResultDto_PromotionViewDto_ } from "./models/QueryResultDto_PromotionViewDto_"; -export type { QueryResultDto_SellerDto_ } from "./models/QueryResultDto_SellerDto_"; -export type { QueryResultDto_SellerRevisionDto_ } from "./models/QueryResultDto_SellerRevisionDto_"; -export type { QueryResultDto_TextRevisionDto_ } from "./models/QueryResultDto_TextRevisionDto_"; -export type { QueryResultDto_UserDto_ } from "./models/QueryResultDto_UserDto_"; -export type { restaurantDto } from "./models/restaurantDto"; -export type { restaurantRevisionDto } from "./models/restaurantRevisionDto"; -export type { rolePermissionsDto } from "./models/rolePermissionsDto"; -export type { scheduleDto } from "./models/scheduleDto"; -export type { scheduleExceptionDto } from "./models/scheduleExceptionDto"; -export type { selectedOptionDto } from "./models/selectedOptionDto"; -export type { selectedProductDto } from "./models/selectedProductDto"; -export type { sellerCompositeDto } from "./models/sellerCompositeDto"; -export type { sellerDto } from "./models/sellerDto"; -export type { sellerOperationalStateDto } from "./models/sellerOperationalStateDto"; -export type { sellerOperationalStateTriggerDto } from "./models/sellerOperationalStateTriggerDto"; -export type { sellerPublicAggregateFullDto } from "./models/sellerPublicAggregateFullDto"; -export type { sellerQueryRequestDto } from "./models/sellerQueryRequestDto"; -export type { sellerRevisionDto } from "./models/sellerRevisionDto"; -export type { sellerRevisionQueryRequestDto } from "./models/sellerRevisionQueryRequestDto"; -export type { sellerViewDto } from "./models/sellerViewDto"; -export type { sessionIpResponseDto } from "./models/sessionIpResponseDto"; -export { sessionStatus } from "./models/sessionStatus"; -export type { sessionStatusDto } from "./models/sessionStatusDto"; -export type { signedAuthDocumentDto } from "./models/signedAuthDocumentDto"; -export type { simpleContactDto } from "./models/simpleContactDto"; -export type { startSessionResponseDto } from "./models/startSessionResponseDto"; -export type { stopListTriggerDto } from "./models/stopListTriggerDto"; -export type { systemSecurityDto } from "./models/systemSecurityDto"; -export type { tag } from "./models/tag"; -export type { textQueryRequestDto } from "./models/textQueryRequestDto"; -export type { textRevisionDto } from "./models/textRevisionDto"; -export type { timeRangeDto } from "./models/timeRangeDto"; -export type { timeTriggerDto } from "./models/timeTriggerDto"; -export { triggerEffect } from "./models/triggerEffect"; -export type { updatePermissionsRequest } from "./models/updatePermissionsRequest"; -export type { userDto } from "./models/userDto"; -export type { userQueryRequest } from "./models/userQueryRequest"; -export type { verifiedValueDto } from "./models/verifiedValueDto"; -export { versionCheck } from "./models/versionCheck"; +export type { _void } from './models/_void'; +export type { addressDto } from './models/addressDto'; +export { addressType } from './models/addressType'; +export { aspectType } from './models/aspectType'; +export type { assetCollectionDto } from './models/assetCollectionDto'; +export type { authDocumentDto } from './models/authDocumentDto'; +export type { authenticationResultDto } from './models/authenticationResultDto'; +export type { authHeaderResponseDto } from './models/authHeaderResponseDto'; +export type { baseCreateSellerRevisionDto } from './models/baseCreateSellerRevisionDto'; +export type { baseOfferDto } from './models/baseOfferDto'; +export type { baseTriggerDto } from './models/baseTriggerDto'; +export type { basketDto } from './models/basketDto'; +export type { bundleDiscountOfferDto } from './models/bundleDiscountOfferDto'; +export type { bundleTriggerDto } from './models/bundleTriggerDto'; +export type { calculatedCheckoutDto } from './models/calculatedCheckoutDto'; +export type { calculatedProductDto } from './models/calculatedProductDto'; +export type { categoryCompositeDto } from './models/categoryCompositeDto'; +export type { categoryDto } from './models/categoryDto'; +export type { categoryQueryRequestDto } from './models/categoryQueryRequestDto'; +export type { categoryRevisionDto } from './models/categoryRevisionDto'; +export type { categoryRevisionQueryRequestDto } from './models/categoryRevisionQueryRequestDto'; +export type { categoryStopListDto } from './models/categoryStopListDto'; +export type { categoryViewDto } from './models/categoryViewDto'; +export type { checkoutOptionsDto } from './models/checkoutOptionsDto'; +export { commonOrderFailureResult } from './models/commonOrderFailureResult'; +export { commonOrderStatus } from './models/commonOrderStatus'; +export type { couponTriggerDto } from './models/couponTriggerDto'; +export type { courierInfoDto } from './models/courierInfoDto'; +export type { createCategoryDto } from './models/createCategoryDto'; +export type { createCategoryRevisionDto } from './models/createCategoryRevisionDto'; +export type { createOptionsRevisionDto } from './models/createOptionsRevisionDto'; +export type { createProductDto } from './models/createProductDto'; +export type { createProductRevisionDto } from './models/createProductRevisionDto'; +export type { createPromotionDto } from './models/createPromotionDto'; +export type { createRestaurantDto } from './models/createRestaurantDto'; +export type { createRestaurantRevisionDto } from './models/createRestaurantRevisionDto'; +export type { createSellerDto } from './models/createSellerDto'; +export type { createSellerRevisionDto } from './models/createSellerRevisionDto'; +export type { createTextRevisionDto } from './models/createTextRevisionDto'; +export type { customerGroupTriggerDto } from './models/customerGroupTriggerDto'; +export type { customerHistoryTriggerDto } from './models/customerHistoryTriggerDto'; +export type { customerLoyaltyTriggerDto } from './models/customerLoyaltyTriggerDto'; +export type { deliveryAddressDto } from './models/deliveryAddressDto'; +export { deliveryFailureResult } from './models/deliveryFailureResult'; +export type { deliveryLocationDto } from './models/deliveryLocationDto'; +export { deliveryOrderStatus } from './models/deliveryOrderStatus'; +export type { deliveryStateDto } from './models/deliveryStateDto'; +export type { digitalEngagementTriggerDto } from './models/digitalEngagementTriggerDto'; +export type { discountProductOfferDto } from './models/discountProductOfferDto'; +export type { discountTotalOfferDto } from './models/discountTotalOfferDto'; +export { discountType } from './models/discountType'; +export { dispatchMethodType } from './models/dispatchMethodType'; +export type { freeDeliveryOfferDto } from './models/freeDeliveryOfferDto'; +export type { freeItemOfferDto } from './models/freeItemOfferDto'; +export type { gpsLocationDto } from './models/gpsLocationDto'; +export type { holidayTriggerDto } from './models/holidayTriggerDto'; +export type { humanVerificationRequestDto } from './models/humanVerificationRequestDto'; +export type { humanVerificationStatusDto } from './models/humanVerificationStatusDto'; +export type { imageReferenceDto } from './models/imageReferenceDto'; +export type { iTriggerDto } from './models/iTriggerDto'; +export type { localizedTextDto } from './models/localizedTextDto'; +export type { managerOverrideTriggerDto } from './models/managerOverrideTriggerDto'; +export type { oidcConnectResponseDto } from './models/oidcConnectResponseDto'; +export type { optionDto } from './models/optionDto'; +export type { optionsQueryDto } from './models/optionsQueryDto'; +export type { optionsRevisionDto } from './models/optionsRevisionDto'; +export type { optionsViewDto } from './models/optionsViewDto'; +export type { orderCreateDto } from './models/orderCreateDto'; +export type { orderDto } from './models/orderDto'; +export type { orderFailureRequestDto } from './models/orderFailureRequestDto'; +export type { orderNextStatusDto } from './models/orderNextStatusDto'; +export type { orderQueryRequestDto } from './models/orderQueryRequestDto'; +export type { orderStateChangeRequestDto } from './models/orderStateChangeRequestDto'; +export type { orderStateDto } from './models/orderStateDto'; +export { orderTriggerDto } from './models/orderTriggerDto'; +export type { orderViewDto } from './models/orderViewDto'; +export { paymentType } from './models/paymentType'; +export { phoneVerificationState } from './models/phoneVerificationState'; +export type { preparationStateDto } from './models/preparationStateDto'; +export type { priceEstimationDto } from './models/priceEstimationDto'; +export type { priceEstimationRequestDto } from './models/priceEstimationRequestDto'; +export type { problemDetails } from './models/problemDetails'; +export type { productCompositeDto } from './models/productCompositeDto'; +export type { productDto } from './models/productDto'; +export type { productQueryRequestDto } from './models/productQueryRequestDto'; +export type { productRevisionDto } from './models/productRevisionDto'; +export type { productRevisionQueryRequestDto } from './models/productRevisionQueryRequestDto'; +export type { productStopListDto } from './models/productStopListDto'; +export type { productUnavailableDto } from './models/productUnavailableDto'; +export { productUnavailableReason } from './models/productUnavailableReason'; +export type { promotionQueryRequestDto } from './models/promotionQueryRequestDto'; +export type { promotionViewDto } from './models/promotionViewDto'; +export type { purchaseTriggerDto } from './models/purchaseTriggerDto'; +export type { QueryResultDto_CategoryDto_ } from './models/QueryResultDto_CategoryDto_'; +export type { QueryResultDto_CategoryRevisionDto_ } from './models/QueryResultDto_CategoryRevisionDto_'; +export type { QueryResultDto_OptionsRevisionDto_ } from './models/QueryResultDto_OptionsRevisionDto_'; +export type { QueryResultDto_OrderViewDto_ } from './models/QueryResultDto_OrderViewDto_'; +export type { QueryResultDto_ProductRevisionDto_ } from './models/QueryResultDto_ProductRevisionDto_'; +export type { QueryResultDto_PromotionViewDto_ } from './models/QueryResultDto_PromotionViewDto_'; +export type { QueryResultDto_SellerDto_ } from './models/QueryResultDto_SellerDto_'; +export type { QueryResultDto_SellerRevisionDto_ } from './models/QueryResultDto_SellerRevisionDto_'; +export type { QueryResultDto_TextRevisionDto_ } from './models/QueryResultDto_TextRevisionDto_'; +export type { QueryResultDto_UserDto_ } from './models/QueryResultDto_UserDto_'; +export type { restaurantDto } from './models/restaurantDto'; +export type { restaurantRevisionDto } from './models/restaurantRevisionDto'; +export type { rolePermissionsDto } from './models/rolePermissionsDto'; +export type { scheduleDto } from './models/scheduleDto'; +export type { scheduleExceptionDto } from './models/scheduleExceptionDto'; +export type { selectedOptionDto } from './models/selectedOptionDto'; +export type { selectedProductDto } from './models/selectedProductDto'; +export type { sellerCompositeDto } from './models/sellerCompositeDto'; +export type { sellerDto } from './models/sellerDto'; +export type { sellerOperationalStateDto } from './models/sellerOperationalStateDto'; +export type { sellerOperationalStateTriggerDto } from './models/sellerOperationalStateTriggerDto'; +export type { sellerPublicAggregateFullDto } from './models/sellerPublicAggregateFullDto'; +export type { sellerQueryRequestDto } from './models/sellerQueryRequestDto'; +export type { sellerRevisionDto } from './models/sellerRevisionDto'; +export type { sellerRevisionQueryRequestDto } from './models/sellerRevisionQueryRequestDto'; +export type { sellerViewDto } from './models/sellerViewDto'; +export type { sessionIpResponseDto } from './models/sessionIpResponseDto'; +export { sessionStatus } from './models/sessionStatus'; +export type { sessionStatusDto } from './models/sessionStatusDto'; +export type { signedAuthDocumentDto } from './models/signedAuthDocumentDto'; +export type { simpleContactDto } from './models/simpleContactDto'; +export type { startSessionResponseDto } from './models/startSessionResponseDto'; +export type { stopListTriggerDto } from './models/stopListTriggerDto'; +export type { systemSecurityDto } from './models/systemSecurityDto'; +export type { tag } from './models/tag'; +export type { textQueryRequestDto } from './models/textQueryRequestDto'; +export type { textRevisionDto } from './models/textRevisionDto'; +export type { timeRangeDto } from './models/timeRangeDto'; +export type { timeTriggerDto } from './models/timeTriggerDto'; +export { triggerEffect } from './models/triggerEffect'; +export type { updatePermissionsRequest } from './models/updatePermissionsRequest'; +export type { userDto } from './models/userDto'; +export type { userQueryRequest } from './models/userQueryRequest'; +export type { verifiedValueDto } from './models/verifiedValueDto'; +export { versionCheck } from './models/versionCheck'; -export { AiService } from "./services/AiService"; -export { AuthenticationService } from "./services/AuthenticationService"; -export { CategoriesCanonicalService } from "./services/CategoriesCanonicalService"; -export { CategoriesRevisionsService } from "./services/CategoriesRevisionsService"; -export { CategoriesViewsService } from "./services/CategoriesViewsService"; -export { DeliveriesService } from "./services/DeliveriesService"; -export { ImagesService } from "./services/ImagesService"; -export { OidcService } from "./services/OidcService"; -export { OrdersService } from "./services/OrdersService"; -export { OrdersBasketService } from "./services/OrdersBasketService"; -export { ProductOptionsRevisionsService } from "./services/ProductOptionsRevisionsService"; -export { ProductsCanonicalService } from "./services/ProductsCanonicalService"; -export { ProductsRevisionsService } from "./services/ProductsRevisionsService"; -export { ProductsViewsService } from "./services/ProductsViewsService"; -export { PromotionsService } from "./services/PromotionsService"; -export { SecurityService } from "./services/SecurityService"; -export { SellersCanonicalService } from "./services/SellersCanonicalService"; -export { SellersRevisionsService } from "./services/SellersRevisionsService"; -export { SellersViewsService } from "./services/SellersViewsService"; -export { ServerSideEventsService } from "./services/ServerSideEventsService"; -export { SystemService } from "./services/SystemService"; -export { TestsService } from "./services/TestsService"; -export { TranslatableTextRevisionsService } from "./services/TranslatableTextRevisionsService"; -export { UserService } from "./services/UserService"; -export { VerificationsService } from "./services/VerificationsService"; -export { WebService } from "./services/WebService"; +export { AiService } from './services/AiService'; +export { AuthenticationService } from './services/AuthenticationService'; +export { CategoriesCanonicalService } from './services/CategoriesCanonicalService'; +export { CategoriesRevisionsService } from './services/CategoriesRevisionsService'; +export { CategoriesViewsService } from './services/CategoriesViewsService'; +export { DeliveriesService } from './services/DeliveriesService'; +export { ImagesService } from './services/ImagesService'; +export { OidcService } from './services/OidcService'; +export { OrdersService } from './services/OrdersService'; +export { OrdersBasketService } from './services/OrdersBasketService'; +export { ProductOptionsRevisionsService } from './services/ProductOptionsRevisionsService'; +export { ProductsCanonicalService } from './services/ProductsCanonicalService'; +export { ProductsRevisionsService } from './services/ProductsRevisionsService'; +export { ProductsViewsService } from './services/ProductsViewsService'; +export { PromotionsService } from './services/PromotionsService'; +export { SecurityService } from './services/SecurityService'; +export { SellersCanonicalService } from './services/SellersCanonicalService'; +export { SellersRevisionsService } from './services/SellersRevisionsService'; +export { SellersViewsService } from './services/SellersViewsService'; +export { ServerSideEventsService } from './services/ServerSideEventsService'; +export { SystemService } from './services/SystemService'; +export { TestsService } from './services/TestsService'; +export { TranslatableTextRevisionsService } from './services/TranslatableTextRevisionsService'; +export { UserService } from './services/UserService'; +export { VerificationsService } from './services/VerificationsService'; +export { WebService } from './services/WebService'; diff --git a/src/lib/api/merchant/models/QueryResultDto_CategoryDto_.ts b/src/lib/api/merchant/models/QueryResultDto_CategoryDto_.ts index 6c67d26..a3834a4 100644 --- a/src/lib/api/merchant/models/QueryResultDto_CategoryDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_CategoryDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { categoryDto } from "./categoryDto"; +import type { categoryDto } from './categoryDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_CategoryDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_CategoryRevisionDto_.ts b/src/lib/api/merchant/models/QueryResultDto_CategoryRevisionDto_.ts index 6153bc6..d3cfd5c 100644 --- a/src/lib/api/merchant/models/QueryResultDto_CategoryRevisionDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_CategoryRevisionDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { categoryRevisionDto } from "./categoryRevisionDto"; +import type { categoryRevisionDto } from './categoryRevisionDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_CategoryRevisionDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_OptionsRevisionDto_.ts b/src/lib/api/merchant/models/QueryResultDto_OptionsRevisionDto_.ts index d273ad8..2be84fc 100644 --- a/src/lib/api/merchant/models/QueryResultDto_OptionsRevisionDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_OptionsRevisionDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { optionsRevisionDto } from "./optionsRevisionDto"; +import type { optionsRevisionDto } from './optionsRevisionDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_OptionsRevisionDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_OrderViewDto_.ts b/src/lib/api/merchant/models/QueryResultDto_OrderViewDto_.ts index 2b67bff..e8e96c8 100644 --- a/src/lib/api/merchant/models/QueryResultDto_OrderViewDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_OrderViewDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { orderViewDto } from "./orderViewDto"; +import type { orderViewDto } from './orderViewDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_OrderViewDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_ProductRevisionDto_.ts b/src/lib/api/merchant/models/QueryResultDto_ProductRevisionDto_.ts index e1c83ec..b878f4b 100644 --- a/src/lib/api/merchant/models/QueryResultDto_ProductRevisionDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_ProductRevisionDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { productRevisionDto } from "./productRevisionDto"; +import type { productRevisionDto } from './productRevisionDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_ProductRevisionDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_PromotionViewDto_.ts b/src/lib/api/merchant/models/QueryResultDto_PromotionViewDto_.ts index c5ce7c8..9a930be 100644 --- a/src/lib/api/merchant/models/QueryResultDto_PromotionViewDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_PromotionViewDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { promotionViewDto } from "./promotionViewDto"; +import type { promotionViewDto } from './promotionViewDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_PromotionViewDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_SellerDto_.ts b/src/lib/api/merchant/models/QueryResultDto_SellerDto_.ts index 76836fa..78bfbeb 100644 --- a/src/lib/api/merchant/models/QueryResultDto_SellerDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_SellerDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { sellerDto } from "./sellerDto"; +import type { sellerDto } from './sellerDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_SellerDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_SellerRevisionDto_.ts b/src/lib/api/merchant/models/QueryResultDto_SellerRevisionDto_.ts index 5fd7c19..468fd73 100644 --- a/src/lib/api/merchant/models/QueryResultDto_SellerRevisionDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_SellerRevisionDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { sellerRevisionDto } from "./sellerRevisionDto"; +import type { sellerRevisionDto } from './sellerRevisionDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_SellerRevisionDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_TextRevisionDto_.ts b/src/lib/api/merchant/models/QueryResultDto_TextRevisionDto_.ts index 3c27b2c..1cd5ca5 100644 --- a/src/lib/api/merchant/models/QueryResultDto_TextRevisionDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_TextRevisionDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { textRevisionDto } from "./textRevisionDto"; +import type { textRevisionDto } from './textRevisionDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_TextRevisionDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/QueryResultDto_UserDto_.ts b/src/lib/api/merchant/models/QueryResultDto_UserDto_.ts index ab046e5..8035198 100644 --- a/src/lib/api/merchant/models/QueryResultDto_UserDto_.ts +++ b/src/lib/api/merchant/models/QueryResultDto_UserDto_.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { userDto } from "./userDto"; +import type { userDto } from './userDto'; /** * The UTC server time is included in the response to allow the client to know (by the server's clock) when the query was performed. * It is important to populate this field with the server's time at the beginning of the query execution. */ export type QueryResultDto_UserDto_ = { - serverTimeUtc?: string; - results?: Array; + serverTimeUtc?: string; + results?: Array; }; + diff --git a/src/lib/api/merchant/models/addressDto.ts b/src/lib/api/merchant/models/addressDto.ts index 6562bfa..1796912 100644 --- a/src/lib/api/merchant/models/addressDto.ts +++ b/src/lib/api/merchant/models/addressDto.ts @@ -2,43 +2,44 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressType } from "./addressType"; +import type { addressType } from './addressType'; export type addressDto = { - /** - * Primary address line; required and defaults to an empty string. - */ - line1?: string | null; - /** - * Optional second address line for additional info. - */ - line2?: string | null; - /** - * Optional third address line. - */ - line3?: string | null; - /** - * Optional floor information (e.g., "3", "roof", "ground floor"). - */ - floor?: string | null; - /** - * Optional flat or apartment number. - */ - flat?: string | null; - /** - * Optional building identifier (name or number). - */ - building?: string | null; - /** - * Optional comments for extra address details. - */ - comment?: string | null; - /** - * Optional postal code. - */ - postCode?: string | null; - /** - * Optional region (e.g., state or province). - */ - region?: string | null; - type?: addressType; + /** + * Primary address line; required and defaults to an empty string. + */ + line1?: string | null; + /** + * Optional second address line for additional info. + */ + line2?: string | null; + /** + * Optional third address line. + */ + line3?: string | null; + /** + * Optional floor information (e.g., "3", "roof", "ground floor"). + */ + floor?: string | null; + /** + * Optional flat or apartment number. + */ + flat?: string | null; + /** + * Optional building identifier (name or number). + */ + building?: string | null; + /** + * Optional comments for extra address details. + */ + comment?: string | null; + /** + * Optional postal code. + */ + postCode?: string | null; + /** + * Optional region (e.g., state or province). + */ + region?: string | null; + type?: addressType; }; + diff --git a/src/lib/api/merchant/models/addressType.ts b/src/lib/api/merchant/models/addressType.ts index 94789a8..5118161 100644 --- a/src/lib/api/merchant/models/addressType.ts +++ b/src/lib/api/merchant/models/addressType.ts @@ -13,24 +13,24 @@ * */ export enum addressType { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 1) - */ - House = 1, - /** - * (value: 2) - */ - Apartment = 2, - /** - * (value: 3) - */ - Office = 3, - /** - * (value: 4) - */ - Other = 4, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 1) + */ + House = 1, + /** + * (value: 2) + */ + Apartment = 2, + /** + * (value: 3) + */ + Office = 3, + /** + * (value: 4) + */ + Other = 4, } diff --git a/src/lib/api/merchant/models/aspectType.ts b/src/lib/api/merchant/models/aspectType.ts index a7c620f..119b1b2 100644 --- a/src/lib/api/merchant/models/aspectType.ts +++ b/src/lib/api/merchant/models/aspectType.ts @@ -12,20 +12,20 @@ * */ export enum aspectType { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 10) - */ - Landscape = 10, - /** - * (value: 20) - */ - Square = 20, - /** - * (value: 30) - */ - Portrait = 30, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 10) + */ + Landscape = 10, + /** + * (value: 20) + */ + Square = 20, + /** + * (value: 30) + */ + Portrait = 30, } diff --git a/src/lib/api/merchant/models/assetCollectionDto.ts b/src/lib/api/merchant/models/assetCollectionDto.ts index 81b5644..20bbe5d 100644 --- a/src/lib/api/merchant/models/assetCollectionDto.ts +++ b/src/lib/api/merchant/models/assetCollectionDto.ts @@ -7,12 +7,13 @@ * The assets are referenced by hash digests, which are unique identifiers for the asset. */ export type assetCollectionDto = { - /** - * This is the kind of media being referenced. - */ - kind?: string | null; - /** - * A list of base58-encoded SHA-256 digests for the media assets. - */ - digests?: Array | null; + /** + * This is the kind of media being referenced. + */ + kind?: string | null; + /** + * A list of base58-encoded SHA-256 digests for the media assets. + */ + digests?: Array | null; }; + diff --git a/src/lib/api/merchant/models/authDocumentDto.ts b/src/lib/api/merchant/models/authDocumentDto.ts index 4c6cdb9..a603f2c 100644 --- a/src/lib/api/merchant/models/authDocumentDto.ts +++ b/src/lib/api/merchant/models/authDocumentDto.ts @@ -7,24 +7,25 @@ * It is signed to prove the identity and includes session and timing details. */ export type authDocumentDto = { - /** - * Gets or sets the unique session identifier. - */ - sessionId: string | null; - /** - * Gets or sets the client IP address fetched from the hub. - */ - clientIp: string | null; - /** - * Gets or sets the timestamp when the auth document is issued. - */ - issuedAt?: string; - /** - * Gets or sets the timestamp when the auth document expires. - */ - expiresAt?: string; - /** - * Gets or sets the mobile app's Ed25519 public key. - */ - publicKey: string; + /** + * Gets or sets the unique session identifier. + */ + sessionId: string | null; + /** + * Gets or sets the client IP address fetched from the hub. + */ + clientIp: string | null; + /** + * Gets or sets the timestamp when the auth document is issued. + */ + issuedAt?: string; + /** + * Gets or sets the timestamp when the auth document expires. + */ + expiresAt?: string; + /** + * Gets or sets the mobile app's Ed25519 public key. + */ + publicKey: string; }; + diff --git a/src/lib/api/merchant/models/authHeaderResponseDto.ts b/src/lib/api/merchant/models/authHeaderResponseDto.ts index 97d2d2a..96b8868 100644 --- a/src/lib/api/merchant/models/authHeaderResponseDto.ts +++ b/src/lib/api/merchant/models/authHeaderResponseDto.ts @@ -6,20 +6,21 @@ * Response DTO for retrieving the authentication header for a session. */ export type authHeaderResponseDto = { - /** - * Gets or sets the unique session identifier. - */ - sessionId: string | null; - /** - * Gets or sets the X-Signed-Auth header value. - */ - headerValue: string | null; - /** - * Gets or sets the public key used for authentication. - */ - publicKey: string | null; - /** - * The UTC expiry date of the signed authorization header. - */ - utcExpires: string; + /** + * Gets or sets the unique session identifier. + */ + sessionId: string | null; + /** + * Gets or sets the X-Signed-Auth header value. + */ + headerValue: string | null; + /** + * Gets or sets the public key used for authentication. + */ + publicKey: string | null; + /** + * The UTC expiry date of the signed authorization header. + */ + utcExpires: string; }; + diff --git a/src/lib/api/merchant/models/authenticationResultDto.ts b/src/lib/api/merchant/models/authenticationResultDto.ts index 8b48ec5..feb41a0 100644 --- a/src/lib/api/merchant/models/authenticationResultDto.ts +++ b/src/lib/api/merchant/models/authenticationResultDto.ts @@ -6,8 +6,9 @@ * DTO for the authentication result. */ export type authenticationResultDto = { - /** - * Gets or sets the session ID that was authenticated. - */ - sessionId: string | null; + /** + * Gets or sets the session ID that was authenticated. + */ + sessionId: string | null; }; + diff --git a/src/lib/api/merchant/models/baseCreateSellerRevisionDto.ts b/src/lib/api/merchant/models/baseCreateSellerRevisionDto.ts index 3b854c7..4e82c1d 100644 --- a/src/lib/api/merchant/models/baseCreateSellerRevisionDto.ts +++ b/src/lib/api/merchant/models/baseCreateSellerRevisionDto.ts @@ -2,36 +2,34 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { createRestaurantRevisionDto } from "./createRestaurantRevisionDto"; -import type { createSellerRevisionDto } from "./createSellerRevisionDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { createRestaurantRevisionDto } from './createRestaurantRevisionDto'; +import type { createSellerRevisionDto } from './createSellerRevisionDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; /** * Base class for seller data transfer objects, encapsulating common seller properties. * Restaurants, farms, shops and other merchants inherit this class. */ -export type baseCreateSellerRevisionDto = - | createRestaurantRevisionDto - | createSellerRevisionDto - | { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; - type?: string; - }; +export type baseCreateSellerRevisionDto = (createRestaurantRevisionDto | createSellerRevisionDto | { + /** + * Version number of the document. + */ + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; + type?: string; +}); + diff --git a/src/lib/api/merchant/models/baseOfferDto.ts b/src/lib/api/merchant/models/baseOfferDto.ts index 5136a61..69ec625 100644 --- a/src/lib/api/merchant/models/baseOfferDto.ts +++ b/src/lib/api/merchant/models/baseOfferDto.ts @@ -2,17 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { bundleDiscountOfferDto } from "./bundleDiscountOfferDto"; -import type { discountProductOfferDto } from "./discountProductOfferDto"; -import type { discountTotalOfferDto } from "./discountTotalOfferDto"; -import type { freeDeliveryOfferDto } from "./freeDeliveryOfferDto"; -import type { freeItemOfferDto } from "./freeItemOfferDto"; -export type baseOfferDto = - | discountTotalOfferDto - | discountProductOfferDto - | freeDeliveryOfferDto - | freeItemOfferDto - | bundleDiscountOfferDto - | { - readonly type?: string | null; - }; +import type { bundleDiscountOfferDto } from './bundleDiscountOfferDto'; +import type { discountProductOfferDto } from './discountProductOfferDto'; +import type { discountTotalOfferDto } from './discountTotalOfferDto'; +import type { freeDeliveryOfferDto } from './freeDeliveryOfferDto'; +import type { freeItemOfferDto } from './freeItemOfferDto'; +export type baseOfferDto = (discountTotalOfferDto | discountProductOfferDto | freeDeliveryOfferDto | freeItemOfferDto | bundleDiscountOfferDto | { + readonly type?: string | null; +}); + diff --git a/src/lib/api/merchant/models/baseTriggerDto.ts b/src/lib/api/merchant/models/baseTriggerDto.ts index f50aa56..c612d9a 100644 --- a/src/lib/api/merchant/models/baseTriggerDto.ts +++ b/src/lib/api/merchant/models/baseTriggerDto.ts @@ -2,8 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type baseTriggerDto = { - readonly type?: string | null; - effect?: triggerEffect; + readonly type?: string | null; + effect?: triggerEffect; }; + diff --git a/src/lib/api/merchant/models/basketDto.ts b/src/lib/api/merchant/models/basketDto.ts index 801e0aa..a9150a2 100644 --- a/src/lib/api/merchant/models/basketDto.ts +++ b/src/lib/api/merchant/models/basketDto.ts @@ -2,43 +2,44 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { dispatchMethodType } from "./dispatchMethodType"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { selectedProductDto } from "./selectedProductDto"; +import type { dispatchMethodType } from './dispatchMethodType'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { selectedProductDto } from './selectedProductDto'; /** * Represents a customer's basket containing selected products for checkout processing. */ export type basketDto = { - /** - * Gets the unique identifier for this basket. - */ - id?: string; - /** - * Gets the unique identifier of the seller. - */ - sellerId: string; - /** - * When the order is scheduled for delivery or pickup, this property indicates the scheduled time. - */ - scheduledFor?: string; - /** - * Gets the collection of selected products in this basket. - */ - items?: Array | null; - gpsLocation: gpsLocationDto; - /** - * Gets or sets whether community change is enabled for this basket. - */ - isCommunityChangeEnabled?: boolean; - dispatchType?: dispatchMethodType; - /** - * Optional: The customer has selected a delivery price that was on offer. - */ - selectedDeliveryPrice?: { /** - * Currency code ISO 4217 + * Gets the unique identifier for this basket. */ - currency?: string; - value?: number; - } | null; + id?: string; + /** + * Gets the unique identifier of the seller. + */ + sellerId: string; + /** + * When the order is scheduled for delivery or pickup, this property indicates the scheduled time. + */ + scheduledFor?: string; + /** + * Gets the collection of selected products in this basket. + */ + items?: Array | null; + gpsLocation: gpsLocationDto; + /** + * Gets or sets whether community change is enabled for this basket. + */ + isCommunityChangeEnabled?: boolean; + dispatchType?: dispatchMethodType; + /** + * Optional: The customer has selected a delivery price that was on offer. + */ + selectedDeliveryPrice?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; }; + diff --git a/src/lib/api/merchant/models/bundleDiscountOfferDto.ts b/src/lib/api/merchant/models/bundleDiscountOfferDto.ts index e1c7516..f96ed7b 100644 --- a/src/lib/api/merchant/models/bundleDiscountOfferDto.ts +++ b/src/lib/api/merchant/models/bundleDiscountOfferDto.ts @@ -2,10 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { discountType } from "./discountType"; +import type { discountType } from './discountType'; export type bundleDiscountOfferDto = { - readonly type?: "bundle_discount" | null; - productIds: Array | null; - discountType: discountType; - value: number; + readonly type?: 'bundle_discount' | null; + productIds: Array | null; + discountType: discountType; + value: number; }; + diff --git a/src/lib/api/merchant/models/bundleTriggerDto.ts b/src/lib/api/merchant/models/bundleTriggerDto.ts index 0893944..71b1363 100644 --- a/src/lib/api/merchant/models/bundleTriggerDto.ts +++ b/src/lib/api/merchant/models/bundleTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type bundleTriggerDto = { - effect?: triggerEffect; - productIds?: Array | null; - readonly type?: "bundle" | null; + effect?: triggerEffect; + productIds?: Array | null; + readonly type?: 'bundle' | null; }; + diff --git a/src/lib/api/merchant/models/calculatedCheckoutDto.ts b/src/lib/api/merchant/models/calculatedCheckoutDto.ts index 1a6ba1b..52b990f 100644 --- a/src/lib/api/merchant/models/calculatedCheckoutDto.ts +++ b/src/lib/api/merchant/models/calculatedCheckoutDto.ts @@ -2,121 +2,119 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { calculatedProductDto } from "./calculatedProductDto"; -import type { productUnavailableDto } from "./productUnavailableDto"; +import type { calculatedProductDto } from './calculatedProductDto'; +import type { productUnavailableDto } from './productUnavailableDto'; /** * Represents a calculated checkout with comprehensive pricing information for all items, including taxes, discounts, and delivery fees. */ export type calculatedCheckoutDto = { - /** - * Must be set if the basket is to be considered valid. - */ - isValid?: boolean; - /** - * Gets or sets the collection of calculated products in this checkout. - */ - items?: Array | null; - /** - * Gets or sets the subtotal of all items before applying discounts. - */ - itemSubTotal?: { /** - * Currency code ISO 4217 + * Must be set if the basket is to be considered valid. */ - currency?: string; - value?: number; - } | null; - /** - * Gets or sets the subtotal of all items with any discounts applied. - */ - itemDiscountedSubTotal?: { + isValid?: boolean; /** - * Currency code ISO 4217 + * Gets or sets the collection of calculated products in this checkout. */ - currency?: string; - value?: number; - } | null; - /** - * Gets or sets the tax amount applied to this checkout, if any. - */ - tax?: { + items?: Array | null; /** - * Currency code ISO 4217 + * Gets or sets the subtotal of all items before applying discounts. */ - currency?: string; - value?: number; - } | null; - /** - * Gets or sets the community contribution amount, if any. - */ - communityChange?: { + itemSubTotal?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; /** - * Currency code ISO 4217 + * Gets or sets the subtotal of all items with any discounts applied. */ - currency?: string; - value?: number; - } | null; - /** - * The user selected to enable community change. - */ - communityChangeIncluded?: boolean; - /** - * Returns the value of any discount applied at the order level. - */ - discount?: { + itemDiscountedSubTotal?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; /** - * Currency code ISO 4217 + * Gets or sets the tax amount applied to this checkout, if any. */ - currency?: string; - value?: number; - } | null; - /** - * Returns the delivery fee, if any. - */ - delivery?: { + tax?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; /** - * Currency code ISO 4217 + * Gets or sets the community contribution amount, if any. */ - currency?: string; - value?: number; - } | null; - /** - * Gets or sets additional charges or fees associated with this checkout. - */ - extras?: Record< - string, - { - /** - * Currency code ISO 4217 - */ - currency?: string; - value?: number; - } - > | null; - /** - * Gets or sets the final total price of this checkout after all calculations. - */ - final?: { + communityChange?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; /** - * Currency code ISO 4217 + * The user selected to enable community change. */ - currency?: string; - value?: number; - } | null; - /** - * Gets the collection of all active promotion IDs applied to this checkout. - */ - readonly activePromotionIds?: Array | null; - /** - * Gets or sets the list of unavailable products related to this checkout. - */ - unavailableProducts?: Array | null; - /** - * When doing cash payments, this is the first hint for the amount of cash the customer has prepared for the order. - */ - cashChangeHint1?: number | null; - /** - * When doing cash payments, this is the second hint for the amount of cash the customer has prepared for the order. - */ - cashChangeHint2?: number | null; + communityChangeIncluded?: boolean; + /** + * Returns the value of any discount applied at the order level. + */ + discount?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Returns the delivery fee, if any. + */ + delivery?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Gets or sets additional charges or fees associated with this checkout. + */ + extras?: Record | null; + /** + * Gets or sets the final total price of this checkout after all calculations. + */ + final?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Gets the collection of all active promotion IDs applied to this checkout. + */ + readonly activePromotionIds?: Array | null; + /** + * Gets or sets the list of unavailable products related to this checkout. + */ + unavailableProducts?: Array | null; + /** + * When doing cash payments, this is the first hint for the amount of cash the customer has prepared for the order. + */ + cashChangeHint1?: number | null; + /** + * When doing cash payments, this is the second hint for the amount of cash the customer has prepared for the order. + */ + cashChangeHint2?: number | null; }; + diff --git a/src/lib/api/merchant/models/calculatedProductDto.ts b/src/lib/api/merchant/models/calculatedProductDto.ts index 12ca20d..a275d83 100644 --- a/src/lib/api/merchant/models/calculatedProductDto.ts +++ b/src/lib/api/merchant/models/calculatedProductDto.ts @@ -6,59 +6,57 @@ * Represents a calculated product with pricing information, including subtotal, discounts, and final price. */ export type calculatedProductDto = { - /** - * Represents the unique 'line' identifier of the item in the checkout. - */ - id: string; - /** - * Gets the unique identifier of the product. - */ - productId: string; - /** - * This value will be null if the Final amount is not a discount. - */ - subTotal: { /** - * Currency code ISO 4217 + * Represents the unique 'line' identifier of the item in the checkout. */ - currency?: string; - value?: number; - } | null; - /** - * This value will be null if the Final amount is not a discount. - */ - discountedTotal?: { + id: string; /** - * Currency code ISO 4217 + * Gets the unique identifier of the product. */ - currency?: string; - value?: number; - } | null; - /** - * Gets or sets additional charges or fees associated with this product. - */ - extras?: Record< - string, - { - /** - * Currency code ISO 4217 - */ - currency?: string; - value?: number; - } - > | null; - /** - * Gets or sets the final price of this product after all calculations. - */ - final?: { + productId: string; /** - * Currency code ISO 4217 + * This value will be null if the Final amount is not a discount. */ - currency?: string; - value?: number; - } | null; - /** - * Gets or sets the collection of active promotion IDs applied to this product. - */ - activePromotionIds?: Array | null; + subTotal: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * This value will be null if the Final amount is not a discount. + */ + discountedTotal?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Gets or sets additional charges or fees associated with this product. + */ + extras?: Record | null; + /** + * Gets or sets the final price of this product after all calculations. + */ + final?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Gets or sets the collection of active promotion IDs applied to this product. + */ + activePromotionIds?: Array | null; }; + diff --git a/src/lib/api/merchant/models/categoryCompositeDto.ts b/src/lib/api/merchant/models/categoryCompositeDto.ts index 727d503..0d216b9 100644 --- a/src/lib/api/merchant/models/categoryCompositeDto.ts +++ b/src/lib/api/merchant/models/categoryCompositeDto.ts @@ -2,21 +2,22 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type categoryCompositeDto = { - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; - sortOrder?: number; - id?: string; - revisionId?: string; - promotionIds?: Array | null; - title?: localizedTextDto; - description?: localizedTextDto; - isAvailable?: boolean; - isStopListed?: boolean; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; + sortOrder?: number; + id?: string; + revisionId?: string; + promotionIds?: Array | null; + title?: localizedTextDto; + description?: localizedTextDto; + isAvailable?: boolean; + isStopListed?: boolean; }; + diff --git a/src/lib/api/merchant/models/categoryDto.ts b/src/lib/api/merchant/models/categoryDto.ts index 6d18ccf..d71dd2f 100644 --- a/src/lib/api/merchant/models/categoryDto.ts +++ b/src/lib/api/merchant/models/categoryDto.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; export type categoryDto = { - promotionIds?: Array | null; - sellerId?: string; - availabilityTriggers?: Array | null; - id?: string; - updatedByUserId?: string; - utcUpdated?: string; + promotionIds?: Array | null; + sellerId?: string; + availabilityTriggers?: Array | null; + id?: string; + updatedByUserId?: string; + utcUpdated?: string; }; + diff --git a/src/lib/api/merchant/models/categoryQueryRequestDto.ts b/src/lib/api/merchant/models/categoryQueryRequestDto.ts index 1970f2d..a42c3e7 100644 --- a/src/lib/api/merchant/models/categoryQueryRequestDto.ts +++ b/src/lib/api/merchant/models/categoryQueryRequestDto.ts @@ -3,8 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type categoryQueryRequestDto = { - categoryIds?: Array | null; - sellerId?: string | null; - offset?: number; - limit?: number; + categoryIds?: Array | null; + sellerId?: string | null; + offset?: number; + limit?: number; }; + diff --git a/src/lib/api/merchant/models/categoryRevisionDto.ts b/src/lib/api/merchant/models/categoryRevisionDto.ts index b2d4a9e..204b75c 100644 --- a/src/lib/api/merchant/models/categoryRevisionDto.ts +++ b/src/lib/api/merchant/models/categoryRevisionDto.ts @@ -2,23 +2,24 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type categoryRevisionDto = { - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; - sortOrder?: number; - revisionId?: string; - categoryId?: string; - creatorId?: string; - utcCreated?: string; - title?: localizedTextDto; - description?: localizedTextDto; - isPublished?: boolean; - utcPublished?: string | null; - publishedByUserId?: string | null; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; + sortOrder?: number; + revisionId?: string; + categoryId?: string; + creatorId?: string; + utcCreated?: string; + title?: localizedTextDto; + description?: localizedTextDto; + isPublished?: boolean; + utcPublished?: string | null; + publishedByUserId?: string | null; }; + diff --git a/src/lib/api/merchant/models/categoryRevisionQueryRequestDto.ts b/src/lib/api/merchant/models/categoryRevisionQueryRequestDto.ts index 4c7b9c7..73fef35 100644 --- a/src/lib/api/merchant/models/categoryRevisionQueryRequestDto.ts +++ b/src/lib/api/merchant/models/categoryRevisionQueryRequestDto.ts @@ -3,12 +3,13 @@ /* tslint:disable */ /* eslint-disable */ export type categoryRevisionQueryRequestDto = { - categoryId?: string | null; - offset?: number; - limit?: number; - utcCreatedFrom?: string | null; - utcCreatedTo?: string | null; - isPublished?: boolean | null; - publishedByUserId?: string | null; - utcCreated?: string | null; + categoryId?: string | null; + offset?: number; + limit?: number; + utcCreatedFrom?: string | null; + utcCreatedTo?: string | null; + isPublished?: boolean | null; + publishedByUserId?: string | null; + utcCreated?: string | null; }; + diff --git a/src/lib/api/merchant/models/categoryStopListDto.ts b/src/lib/api/merchant/models/categoryStopListDto.ts index f702848..956efe6 100644 --- a/src/lib/api/merchant/models/categoryStopListDto.ts +++ b/src/lib/api/merchant/models/categoryStopListDto.ts @@ -3,5 +3,6 @@ /* tslint:disable */ /* eslint-disable */ export type categoryStopListDto = { - categoryIds: Array; + categoryIds: Array; }; + diff --git a/src/lib/api/merchant/models/categoryViewDto.ts b/src/lib/api/merchant/models/categoryViewDto.ts index 3c3f265..0dce8b8 100644 --- a/src/lib/api/merchant/models/categoryViewDto.ts +++ b/src/lib/api/merchant/models/categoryViewDto.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type categoryViewDto = { - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; - sortOrder?: number; - revisionId?: string; - categoryId?: string; - title?: localizedTextDto; - description?: localizedTextDto; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; + sortOrder?: number; + revisionId?: string; + categoryId?: string; + title?: localizedTextDto; + description?: localizedTextDto; }; + diff --git a/src/lib/api/merchant/models/checkoutOptionsDto.ts b/src/lib/api/merchant/models/checkoutOptionsDto.ts index 5105149..539b7df 100644 --- a/src/lib/api/merchant/models/checkoutOptionsDto.ts +++ b/src/lib/api/merchant/models/checkoutOptionsDto.ts @@ -2,26 +2,27 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { deliveryLocationDto } from "./deliveryLocationDto"; -import type { dispatchMethodType } from "./dispatchMethodType"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { deliveryLocationDto } from './deliveryLocationDto'; +import type { dispatchMethodType } from './dispatchMethodType'; +import type { simpleContactDto } from './simpleContactDto'; /** * Data transfer object for restaurant checkout options */ export type checkoutOptionsDto = { - dispatchType?: dispatchMethodType; - /** - * Gets or sets the scheduled date and time for the order. - */ - scheduledFor?: string | null; - contact?: simpleContactDto; - /** - * Gets or sets the cash amount prepared for the order. - */ - cashAmount?: number | null; - deliveryLocation?: deliveryLocationDto; - /** - * Gets or sets whether community change is enabled for this basket. - */ - isCommunityChangeEnabled?: boolean; + dispatchType?: dispatchMethodType; + /** + * Gets or sets the scheduled date and time for the order. + */ + scheduledFor?: string | null; + contact?: simpleContactDto; + /** + * Gets or sets the cash amount prepared for the order. + */ + cashAmount?: number | null; + deliveryLocation?: deliveryLocationDto; + /** + * Gets or sets whether community change is enabled for this basket. + */ + isCommunityChangeEnabled?: boolean; }; + diff --git a/src/lib/api/merchant/models/commonOrderFailureResult.ts b/src/lib/api/merchant/models/commonOrderFailureResult.ts index e4d56ee..feecfe6 100644 --- a/src/lib/api/merchant/models/commonOrderFailureResult.ts +++ b/src/lib/api/merchant/models/commonOrderFailureResult.ts @@ -18,44 +18,44 @@ * */ export enum commonOrderFailureResult { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 10) - */ - Cancelled = 10, - /** - * (value: 20) - */ - SystemError = 20, - /** - * (value: 30) - */ - CreationError = 30, - /** - * (value: 40) - */ - PaymentIssue = 40, - /** - * (value: 50) - */ - DeliveryIssue = 50, - /** - * (value: 60) - */ - LossOrDamage = 60, - /** - * (value: 70) - */ - Accident = 70, - /** - * (value: 80) - */ - StockIssue = 80, - /** - * (value: 1000) - */ - Other = 1000, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 10) + */ + Cancelled = 10, + /** + * (value: 20) + */ + SystemError = 20, + /** + * (value: 30) + */ + CreationError = 30, + /** + * (value: 40) + */ + PaymentIssue = 40, + /** + * (value: 50) + */ + DeliveryIssue = 50, + /** + * (value: 60) + */ + LossOrDamage = 60, + /** + * (value: 70) + */ + Accident = 70, + /** + * (value: 80) + */ + StockIssue = 80, + /** + * (value: 1000) + */ + Other = 1000, } diff --git a/src/lib/api/merchant/models/commonOrderStatus.ts b/src/lib/api/merchant/models/commonOrderStatus.ts index 48b41bb..ff0cb92 100644 --- a/src/lib/api/merchant/models/commonOrderStatus.ts +++ b/src/lib/api/merchant/models/commonOrderStatus.ts @@ -22,52 +22,52 @@ * */ export enum commonOrderStatus { - /** - * (value: 0) The order is in an unknown state, usually awaiting confirmation from other services. - */ - None = 0, - /** - * (value: 5) The order is being validated/saved/created - */ - Creating = 5, - /** - * (value: 10) The order has been confirmed by all services. - */ - Created = 10, - /** - * (value: 15) The order is awaiting payment. - */ - PendingPayment = 15, - /** - * (value: 20) The order has been successfully placed by the customer. - */ - Placed = 20, - /** - * (value: 22) The business has seen the order. This state might be skipped. - */ - Seen = 22, - /** - * (value: 25) The business has approved the order. This state might be skipped for unscheduled orders. - */ - Accepted = 25, - /** - * (value: 30) The order is being prepared. - */ - Preparing = 30, - /** - * (value: 35) The order is ready for collection by the consumer or courier depending on the obtaining type. - */ - ReadyForCollection = 35, - /** - * (value: 40) The order is being delivered. - */ - InDelivery = 40, - /** - * (value: 45) The order is completed but the system finalizes all states - */ - Ending = 45, - /** - * (value: 1111) The order has ended, either successfully or unsuccessfully. - */ - Ended = 1111, + /** + * (value: 0) The order is in an unknown state, usually awaiting confirmation from other services. + */ + None = 0, + /** + * (value: 5) The order is being validated/saved/created + */ + Creating = 5, + /** + * (value: 10) The order has been confirmed by all services. + */ + Created = 10, + /** + * (value: 15) The order is awaiting payment. + */ + PendingPayment = 15, + /** + * (value: 20) The order has been successfully placed by the customer. + */ + Placed = 20, + /** + * (value: 22) The business has seen the order. This state might be skipped. + */ + Seen = 22, + /** + * (value: 25) The business has approved the order. This state might be skipped for unscheduled orders. + */ + Accepted = 25, + /** + * (value: 30) The order is being prepared. + */ + Preparing = 30, + /** + * (value: 35) The order is ready for collection by the consumer or courier depending on the obtaining type. + */ + ReadyForCollection = 35, + /** + * (value: 40) The order is being delivered. + */ + InDelivery = 40, + /** + * (value: 45) The order is completed but the system finalizes all states + */ + Ending = 45, + /** + * (value: 1111) The order has ended, either successfully or unsuccessfully. + */ + Ended = 1111, } diff --git a/src/lib/api/merchant/models/couponTriggerDto.ts b/src/lib/api/merchant/models/couponTriggerDto.ts index 5d65c60..824e64b 100644 --- a/src/lib/api/merchant/models/couponTriggerDto.ts +++ b/src/lib/api/merchant/models/couponTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type couponTriggerDto = { - effect?: triggerEffect; - readonly type?: "coupon" | null; - code: string | null; + effect?: triggerEffect; + readonly type?: 'coupon' | null; + code: string | null; }; + diff --git a/src/lib/api/merchant/models/courierInfoDto.ts b/src/lib/api/merchant/models/courierInfoDto.ts index 1a01f73..36c0983 100644 --- a/src/lib/api/merchant/models/courierInfoDto.ts +++ b/src/lib/api/merchant/models/courierInfoDto.ts @@ -6,7 +6,8 @@ * Data transfer object containing courier information */ export type courierInfoDto = { - courierId?: string | null; - name?: string | null; - phoneNumber?: string | null; + courierId?: string | null; + name?: string | null; + phoneNumber?: string | null; }; + diff --git a/src/lib/api/merchant/models/createCategoryDto.ts b/src/lib/api/merchant/models/createCategoryDto.ts index d3c447a..9a4a5e4 100644 --- a/src/lib/api/merchant/models/createCategoryDto.ts +++ b/src/lib/api/merchant/models/createCategoryDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; export type createCategoryDto = { - promotionIds?: Array | null; - sellerId?: string; - availabilityTriggers?: Array | null; + promotionIds?: Array | null; + sellerId?: string; + availabilityTriggers?: Array | null; }; + diff --git a/src/lib/api/merchant/models/createCategoryRevisionDto.ts b/src/lib/api/merchant/models/createCategoryRevisionDto.ts index d2b951e..6e4ffe9 100644 --- a/src/lib/api/merchant/models/createCategoryRevisionDto.ts +++ b/src/lib/api/merchant/models/createCategoryRevisionDto.ts @@ -2,13 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type createCategoryRevisionDto = { - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; - sortOrder?: number; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; + sortOrder?: number; }; + diff --git a/src/lib/api/merchant/models/createOptionsRevisionDto.ts b/src/lib/api/merchant/models/createOptionsRevisionDto.ts index dae9568..b753b6e 100644 --- a/src/lib/api/merchant/models/createOptionsRevisionDto.ts +++ b/src/lib/api/merchant/models/createOptionsRevisionDto.ts @@ -2,19 +2,20 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { optionDto } from "./optionDto"; +import type { optionDto } from './optionDto'; export type createOptionsRevisionDto = { - friendlyName?: string | null; - minRequired?: number; - maxLimit?: number; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableFrom?: string | null; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableTo?: string | null; - options?: Array | null; - additional?: Record | null; + friendlyName?: string | null; + minRequired?: number; + maxLimit?: number; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableFrom?: string | null; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableTo?: string | null; + options?: Array | null; + additional?: Record | null; }; + diff --git a/src/lib/api/merchant/models/createProductDto.ts b/src/lib/api/merchant/models/createProductDto.ts index 5dc79a2..44f2cad 100644 --- a/src/lib/api/merchant/models/createProductDto.ts +++ b/src/lib/api/merchant/models/createProductDto.ts @@ -2,8 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; export type createProductDto = { - sellerId?: string; - availabilityTriggers?: Array | null; + sellerId?: string; + availabilityTriggers?: Array | null; }; + diff --git a/src/lib/api/merchant/models/createProductRevisionDto.ts b/src/lib/api/merchant/models/createProductRevisionDto.ts index 8ce9964..f7d999f 100644 --- a/src/lib/api/merchant/models/createProductRevisionDto.ts +++ b/src/lib/api/merchant/models/createProductRevisionDto.ts @@ -2,26 +2,27 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { assetCollectionDto } from "./assetCollectionDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { assetCollectionDto } from './assetCollectionDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type createProductRevisionDto = { - price?: { - /** - * Currency code ISO 4217 - */ - currency?: string; - value?: number; - } | null; - optionsIds?: Array | null; - categoryIds?: Array | null; - sortOrder?: number; - assets?: Array | null; - isEnabled?: boolean; - notAvailableReason?: string | null; - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; + price?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + optionsIds?: Array | null; + categoryIds?: Array | null; + sortOrder?: number; + assets?: Array | null; + isEnabled?: boolean; + notAvailableReason?: string | null; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; }; + diff --git a/src/lib/api/merchant/models/createPromotionDto.ts b/src/lib/api/merchant/models/createPromotionDto.ts index fa718fb..19deae0 100644 --- a/src/lib/api/merchant/models/createPromotionDto.ts +++ b/src/lib/api/merchant/models/createPromotionDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { baseOfferDto } from "./baseOfferDto"; -import type { baseTriggerDto } from "./baseTriggerDto"; +import type { baseOfferDto } from './baseOfferDto'; +import type { baseTriggerDto } from './baseTriggerDto'; export type createPromotionDto = { - triggers?: Array | null; - offer: baseOfferDto; + triggers?: Array | null; + offer: baseOfferDto; }; + diff --git a/src/lib/api/merchant/models/createRestaurantDto.ts b/src/lib/api/merchant/models/createRestaurantDto.ts index b632f7f..8d1706d 100644 --- a/src/lib/api/merchant/models/createRestaurantDto.ts +++ b/src/lib/api/merchant/models/createRestaurantDto.ts @@ -2,23 +2,24 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; /** * Create a new restaurant. */ export type createRestaurantDto = { - name?: string | null; - /** - * Endpoint URL for the seller. - */ - endpoint?: string | null; - /** - * The promotion ids for this seller. - */ - promotionIds?: Array | null; - /** - * The availability triggers. - */ - availabilityTriggers?: Array | null; - readonly type?: "restaurant" | null; + name?: string | null; + /** + * Endpoint URL for the seller. + */ + endpoint?: string | null; + /** + * The promotion ids for this seller. + */ + promotionIds?: Array | null; + /** + * The availability triggers. + */ + availabilityTriggers?: Array | null; + readonly type?: 'restaurant' | null; }; + diff --git a/src/lib/api/merchant/models/createRestaurantRevisionDto.ts b/src/lib/api/merchant/models/createRestaurantRevisionDto.ts index b2a1857..ec1c3a9 100644 --- a/src/lib/api/merchant/models/createRestaurantRevisionDto.ts +++ b/src/lib/api/merchant/models/createRestaurantRevisionDto.ts @@ -2,43 +2,44 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; /** * Represents a restaurant with seller details and associated tags. */ export type createRestaurantRevisionDto = { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; - /** - * Optional minimum order amount required by the restaurant. - */ - minimumOrder?: { /** - * Currency code ISO 4217 + * Version number of the document. */ - currency?: string; - value?: number; - } | null; - /** - * Tags associated with the restaurant. - */ - tags?: Array | null; + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; + /** + * Optional minimum order amount required by the restaurant. + */ + minimumOrder?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Tags associated with the restaurant. + */ + tags?: Array | null; }; + diff --git a/src/lib/api/merchant/models/createSellerDto.ts b/src/lib/api/merchant/models/createSellerDto.ts index 38b077f..47dc64b 100644 --- a/src/lib/api/merchant/models/createSellerDto.ts +++ b/src/lib/api/merchant/models/createSellerDto.ts @@ -2,35 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createRestaurantDto } from "./createRestaurantDto"; -import type { iTriggerDto } from "./iTriggerDto"; -import type { restaurantDto } from "./restaurantDto"; -import type { sellerDto } from "./sellerDto"; +import type { createRestaurantDto } from './createRestaurantDto'; +import type { iTriggerDto } from './iTriggerDto'; +import type { restaurantDto } from './restaurantDto'; +import type { sellerDto } from './sellerDto'; /** * Base class for seller data transfer objects, encapsulating common seller properties. * Restaurants, farms, shops and other merchants inherit this class. */ -export type createSellerDto = - | createRestaurantDto - | any - | sellerDto - | restaurantDto - | { - /** - * The document type 'restaurant' or 'shop'. - */ - type?: string | null; - name?: string | null; - /** - * Endpoint URL for the seller. - */ - endpoint?: string | null; - /** - * The promotion ids for this seller. - */ - promotionIds?: Array | null; - /** - * The availability triggers. - */ - availabilityTriggers?: Array | null; - }; +export type createSellerDto = (createRestaurantDto | any | sellerDto | restaurantDto | { + /** + * The document type 'restaurant' or 'shop'. + */ + type?: string | null; + name?: string | null; + /** + * Endpoint URL for the seller. + */ + endpoint?: string | null; + /** + * The promotion ids for this seller. + */ + promotionIds?: Array | null; + /** + * The availability triggers. + */ + availabilityTriggers?: Array | null; +}); + diff --git a/src/lib/api/merchant/models/createSellerRevisionDto.ts b/src/lib/api/merchant/models/createSellerRevisionDto.ts index e1a984a..863861a 100644 --- a/src/lib/api/merchant/models/createSellerRevisionDto.ts +++ b/src/lib/api/merchant/models/createSellerRevisionDto.ts @@ -2,26 +2,27 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; export type createSellerRevisionDto = { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; + /** + * Version number of the document. + */ + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; }; + diff --git a/src/lib/api/merchant/models/createTextRevisionDto.ts b/src/lib/api/merchant/models/createTextRevisionDto.ts index bd0b7b5..8b835d0 100644 --- a/src/lib/api/merchant/models/createTextRevisionDto.ts +++ b/src/lib/api/merchant/models/createTextRevisionDto.ts @@ -3,8 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type createTextRevisionDto = { - documentId?: string; - key?: string | null; - lang?: string | null; - value?: string | null; + documentId?: string; + key?: string | null; + lang?: string | null; + value?: string | null; }; + diff --git a/src/lib/api/merchant/models/customerGroupTriggerDto.ts b/src/lib/api/merchant/models/customerGroupTriggerDto.ts index a52bda2..46127eb 100644 --- a/src/lib/api/merchant/models/customerGroupTriggerDto.ts +++ b/src/lib/api/merchant/models/customerGroupTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type customerGroupTriggerDto = { - effect?: triggerEffect; - readonly type?: "customer_group" | null; - customerValue: string | null; + effect?: triggerEffect; + readonly type?: 'customer_group' | null; + customerValue: string | null; }; + diff --git a/src/lib/api/merchant/models/customerHistoryTriggerDto.ts b/src/lib/api/merchant/models/customerHistoryTriggerDto.ts index 32a4c20..5f725b9 100644 --- a/src/lib/api/merchant/models/customerHistoryTriggerDto.ts +++ b/src/lib/api/merchant/models/customerHistoryTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type customerHistoryTriggerDto = { - effect?: triggerEffect; - readonly type?: "customer_history" | null; - customerValue: string | null; + effect?: triggerEffect; + readonly type?: 'customer_history' | null; + customerValue: string | null; }; + diff --git a/src/lib/api/merchant/models/customerLoyaltyTriggerDto.ts b/src/lib/api/merchant/models/customerLoyaltyTriggerDto.ts index 3365a95..cdee1e2 100644 --- a/src/lib/api/merchant/models/customerLoyaltyTriggerDto.ts +++ b/src/lib/api/merchant/models/customerLoyaltyTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type customerLoyaltyTriggerDto = { - effect?: triggerEffect; - readonly type?: "customer_loyalty" | null; - customerValue: string | null; + effect?: triggerEffect; + readonly type?: 'customer_loyalty' | null; + customerValue: string | null; }; + diff --git a/src/lib/api/merchant/models/deliveryAddressDto.ts b/src/lib/api/merchant/models/deliveryAddressDto.ts index ea917c0..8f9baff 100644 --- a/src/lib/api/merchant/models/deliveryAddressDto.ts +++ b/src/lib/api/merchant/models/deliveryAddressDto.ts @@ -6,13 +6,14 @@ * Data transfer object for delivery address information */ export type deliveryAddressDto = { - line1?: string | null; - line2?: string | null; - line3?: string | null; - building?: string | null; - floor?: string | null; - flat?: string | null; - postCode?: string | null; - comment?: string | null; - additionalInfo?: string | null; + line1?: string | null; + line2?: string | null; + line3?: string | null; + building?: string | null; + floor?: string | null; + flat?: string | null; + postCode?: string | null; + comment?: string | null; + additionalInfo?: string | null; }; + diff --git a/src/lib/api/merchant/models/deliveryFailureResult.ts b/src/lib/api/merchant/models/deliveryFailureResult.ts index 633379e..78fa1d3 100644 --- a/src/lib/api/merchant/models/deliveryFailureResult.ts +++ b/src/lib/api/merchant/models/deliveryFailureResult.ts @@ -16,36 +16,36 @@ * */ export enum deliveryFailureResult { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 1) - */ - Cancelled = 1, - /** - * (value: 2) - */ - Exception = 2, - /** - * (value: 3) - */ - RouteIssue = 3, - /** - * (value: 4) - */ - WaypointFail = 4, - /** - * (value: 5) - */ - PricingIssue = 5, - /** - * (value: 6) - */ - NoCourier = 6, - /** - * (value: 7) - */ - Other = 7, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 1) + */ + Cancelled = 1, + /** + * (value: 2) + */ + Exception = 2, + /** + * (value: 3) + */ + RouteIssue = 3, + /** + * (value: 4) + */ + WaypointFail = 4, + /** + * (value: 5) + */ + PricingIssue = 5, + /** + * (value: 6) + */ + NoCourier = 6, + /** + * (value: 7) + */ + Other = 7, } diff --git a/src/lib/api/merchant/models/deliveryLocationDto.ts b/src/lib/api/merchant/models/deliveryLocationDto.ts index 9e9d25a..6688249 100644 --- a/src/lib/api/merchant/models/deliveryLocationDto.ts +++ b/src/lib/api/merchant/models/deliveryLocationDto.ts @@ -2,24 +2,25 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { deliveryAddressDto } from "./deliveryAddressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; +import type { deliveryAddressDto } from './deliveryAddressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; /** * Data transfer object for delivery location information */ export type deliveryLocationDto = { - /** - * Gets or sets the unique identifier for this delivery location. - */ - id?: string; - address?: deliveryAddressDto; - gpsLocation?: gpsLocationDto; - /** - * Gets or sets whether this delivery location is enabled. - */ - isEnabled?: boolean; - /** - * Gets or sets additional delivery instructions. - */ - instructions?: string | null; + /** + * Gets or sets the unique identifier for this delivery location. + */ + id?: string; + address?: deliveryAddressDto; + gpsLocation?: gpsLocationDto; + /** + * Gets or sets whether this delivery location is enabled. + */ + isEnabled?: boolean; + /** + * Gets or sets additional delivery instructions. + */ + instructions?: string | null; }; + diff --git a/src/lib/api/merchant/models/deliveryOrderStatus.ts b/src/lib/api/merchant/models/deliveryOrderStatus.ts index 2f88204..ced2c9d 100644 --- a/src/lib/api/merchant/models/deliveryOrderStatus.ts +++ b/src/lib/api/merchant/models/deliveryOrderStatus.ts @@ -14,28 +14,28 @@ * */ export enum deliveryOrderStatus { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 1) - */ - Initializing = 1, - /** - * (value: 2) - */ - NeedsCourier = 2, - /** - * (value: 3) - */ - Ready = 3, - /** - * (value: 4) - */ - InProgress = 4, - /** - * (value: 5) - */ - Ended = 5, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 1) + */ + Initializing = 1, + /** + * (value: 2) + */ + NeedsCourier = 2, + /** + * (value: 3) + */ + Ready = 3, + /** + * (value: 4) + */ + InProgress = 4, + /** + * (value: 5) + */ + Ended = 5, } diff --git a/src/lib/api/merchant/models/deliveryStateDto.ts b/src/lib/api/merchant/models/deliveryStateDto.ts index 6c11b07..61594f2 100644 --- a/src/lib/api/merchant/models/deliveryStateDto.ts +++ b/src/lib/api/merchant/models/deliveryStateDto.ts @@ -2,39 +2,40 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { courierInfoDto } from "./courierInfoDto"; -import type { deliveryFailureResult } from "./deliveryFailureResult"; -import type { deliveryOrderStatus } from "./deliveryOrderStatus"; +import type { courierInfoDto } from './courierInfoDto'; +import type { deliveryFailureResult } from './deliveryFailureResult'; +import type { deliveryOrderStatus } from './deliveryOrderStatus'; /** * Data transfer object for delivery information */ export type deliveryStateDto = { - deliveryOrderStatus?: deliveryOrderStatus; - deliveryFailureResult?: deliveryFailureResult; - /** - * The scheduled start time - */ - utcScheduled?: string | null; - /** - * The actual start time - */ - utcStarted?: string | null; - /** - * The actual end time - */ - utcEndedActual?: string | null; - /** - * The estimated time of completion in seconds - */ - etcSeconds?: number; - salePrice?: { + deliveryOrderStatus?: deliveryOrderStatus; + deliveryFailureResult?: deliveryFailureResult; /** - * Currency code ISO 4217 + * The scheduled start time */ - currency?: string; - value?: number; - } | null; - courierInfo?: courierInfoDto; - dispatchRequired?: boolean | null; - dspOrderId?: string | null; + utcScheduled?: string | null; + /** + * The actual start time + */ + utcStarted?: string | null; + /** + * The actual end time + */ + utcEndedActual?: string | null; + /** + * The estimated time of completion in seconds + */ + etcSeconds?: number; + salePrice?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + courierInfo?: courierInfoDto; + dispatchRequired?: boolean | null; + dspOrderId?: string | null; }; + diff --git a/src/lib/api/merchant/models/digitalEngagementTriggerDto.ts b/src/lib/api/merchant/models/digitalEngagementTriggerDto.ts index 9907758..dbed507 100644 --- a/src/lib/api/merchant/models/digitalEngagementTriggerDto.ts +++ b/src/lib/api/merchant/models/digitalEngagementTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type digitalEngagementTriggerDto = { - effect?: triggerEffect; - readonly type?: "digital_engagement" | null; - action: string | null; + effect?: triggerEffect; + readonly type?: 'digital_engagement' | null; + action: string | null; }; + diff --git a/src/lib/api/merchant/models/discountProductOfferDto.ts b/src/lib/api/merchant/models/discountProductOfferDto.ts index 082c81f..4e9703c 100644 --- a/src/lib/api/merchant/models/discountProductOfferDto.ts +++ b/src/lib/api/merchant/models/discountProductOfferDto.ts @@ -2,10 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { discountType } from "./discountType"; +import type { discountType } from './discountType'; export type discountProductOfferDto = { - readonly type?: "discount_product" | null; - discountType: discountType; - value: number; - productIds: Array | null; + readonly type?: 'discount_product' | null; + discountType: discountType; + value: number; + productIds: Array | null; }; + diff --git a/src/lib/api/merchant/models/discountTotalOfferDto.ts b/src/lib/api/merchant/models/discountTotalOfferDto.ts index 3610ac8..fb3d356 100644 --- a/src/lib/api/merchant/models/discountTotalOfferDto.ts +++ b/src/lib/api/merchant/models/discountTotalOfferDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { discountType } from "./discountType"; +import type { discountType } from './discountType'; export type discountTotalOfferDto = { - readonly type?: "discount_total" | null; - discountType: discountType; - value: number; + readonly type?: 'discount_total' | null; + discountType: discountType; + value: number; }; + diff --git a/src/lib/api/merchant/models/discountType.ts b/src/lib/api/merchant/models/discountType.ts index 18ddab3..471b92d 100644 --- a/src/lib/api/merchant/models/discountType.ts +++ b/src/lib/api/merchant/models/discountType.ts @@ -11,16 +11,16 @@ * */ export enum discountType { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 1) A fixed amount discount (e.g., $10 off). - */ - Fixed = 1, - /** - * (value: 2) A percentage-based discount (e.g., 20% off). - */ - Percentage = 2, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 1) A fixed amount discount (e.g., $10 off). + */ + Fixed = 1, + /** + * (value: 2) A percentage-based discount (e.g., 20% off). + */ + Percentage = 2, } diff --git a/src/lib/api/merchant/models/dispatchMethodType.ts b/src/lib/api/merchant/models/dispatchMethodType.ts index 81c5749..53bbcd9 100644 --- a/src/lib/api/merchant/models/dispatchMethodType.ts +++ b/src/lib/api/merchant/models/dispatchMethodType.ts @@ -11,16 +11,16 @@ * */ export enum dispatchMethodType { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 10) - */ - Pickup = 10, - /** - * (value: 20) - */ - Delivery = 20, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 10) + */ + Pickup = 10, + /** + * (value: 20) + */ + Delivery = 20, } diff --git a/src/lib/api/merchant/models/freeDeliveryOfferDto.ts b/src/lib/api/merchant/models/freeDeliveryOfferDto.ts index e03d8b5..139c6ec 100644 --- a/src/lib/api/merchant/models/freeDeliveryOfferDto.ts +++ b/src/lib/api/merchant/models/freeDeliveryOfferDto.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type freeDeliveryOfferDto = { - readonly type?: "free_delivery" | null; - minPurchaseAmount?: number | null; + readonly type?: 'free_delivery' | null; + minPurchaseAmount?: number | null; }; + diff --git a/src/lib/api/merchant/models/freeItemOfferDto.ts b/src/lib/api/merchant/models/freeItemOfferDto.ts index 387dadf..8666ba9 100644 --- a/src/lib/api/merchant/models/freeItemOfferDto.ts +++ b/src/lib/api/merchant/models/freeItemOfferDto.ts @@ -3,7 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type freeItemOfferDto = { - readonly type?: "free_item" | null; - productIds: Array | null; - quantity: number; + readonly type?: 'free_item' | null; + productIds: Array | null; + quantity: number; }; + diff --git a/src/lib/api/merchant/models/gpsLocationDto.ts b/src/lib/api/merchant/models/gpsLocationDto.ts index 1a393a2..ad738bf 100644 --- a/src/lib/api/merchant/models/gpsLocationDto.ts +++ b/src/lib/api/merchant/models/gpsLocationDto.ts @@ -6,14 +6,15 @@ * Represents a GPS location with latitude and longitude coordinates. */ export type gpsLocationDto = { - /** - * Latitude is a geographic coordinate that measures how far north or south a location is from the equator, - * expressed in degrees from -90 (South Pole) to 90 (North Pole). - */ - latitude?: number; - /** - * Longitude is a geographic coordinate that measures how far east or west a location is from the Prime Meridian, - * expressed in degrees from -180 (West) to 180 (East). - */ - longitude?: number; + /** + * Latitude is a geographic coordinate that measures how far north or south a location is from the equator, + * expressed in degrees from -90 (South Pole) to 90 (North Pole). + */ + latitude?: number; + /** + * Longitude is a geographic coordinate that measures how far east or west a location is from the Prime Meridian, + * expressed in degrees from -180 (West) to 180 (East). + */ + longitude?: number; }; + diff --git a/src/lib/api/merchant/models/holidayTriggerDto.ts b/src/lib/api/merchant/models/holidayTriggerDto.ts index 678e16f..2175759 100644 --- a/src/lib/api/merchant/models/holidayTriggerDto.ts +++ b/src/lib/api/merchant/models/holidayTriggerDto.ts @@ -2,9 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type holidayTriggerDto = { - effect?: triggerEffect; - readonly type?: "holiday" | null; - holiday: string | null; + effect?: triggerEffect; + readonly type?: 'holiday' | null; + holiday: string | null; }; + diff --git a/src/lib/api/merchant/models/humanVerificationRequestDto.ts b/src/lib/api/merchant/models/humanVerificationRequestDto.ts index da39178..9fa7d7a 100644 --- a/src/lib/api/merchant/models/humanVerificationRequestDto.ts +++ b/src/lib/api/merchant/models/humanVerificationRequestDto.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { phoneVerificationState } from "./phoneVerificationState"; +import type { phoneVerificationState } from './phoneVerificationState'; /** * DTO for Human verification of public key by phone number. */ export type humanVerificationRequestDto = { - /** - * The Public key being verified. - */ - publicKey?: string; - /** - * The phone number that was used to verify the public key. - */ - phoneNumber?: string | null; - state?: phoneVerificationState; + /** + * The Public key being verified. + */ + publicKey?: string; + /** + * The phone number that was used to verify the public key. + */ + phoneNumber?: string | null; + state?: phoneVerificationState; }; + diff --git a/src/lib/api/merchant/models/humanVerificationStatusDto.ts b/src/lib/api/merchant/models/humanVerificationStatusDto.ts index 5215e78..f70b2d7 100644 --- a/src/lib/api/merchant/models/humanVerificationStatusDto.ts +++ b/src/lib/api/merchant/models/humanVerificationStatusDto.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { phoneVerificationState } from "./phoneVerificationState"; +import type { phoneVerificationState } from './phoneVerificationState'; /** * The status of a Human verification process. */ export type humanVerificationStatusDto = { - /** - * The Public key that was verified. - */ - publicKey?: string; - /** - * The phone number used to verify the public key. - */ - phoneNumber?: string | null; - state?: phoneVerificationState; + /** + * The Public key that was verified. + */ + publicKey?: string; + /** + * The phone number used to verify the public key. + */ + phoneNumber?: string | null; + state?: phoneVerificationState; }; + diff --git a/src/lib/api/merchant/models/iTriggerDto.ts b/src/lib/api/merchant/models/iTriggerDto.ts index 6ab69c1..4651b47 100644 --- a/src/lib/api/merchant/models/iTriggerDto.ts +++ b/src/lib/api/merchant/models/iTriggerDto.ts @@ -2,33 +2,21 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { bundleTriggerDto } from "./bundleTriggerDto"; -import type { couponTriggerDto } from "./couponTriggerDto"; -import type { customerGroupTriggerDto } from "./customerGroupTriggerDto"; -import type { customerHistoryTriggerDto } from "./customerHistoryTriggerDto"; -import type { customerLoyaltyTriggerDto } from "./customerLoyaltyTriggerDto"; -import type { digitalEngagementTriggerDto } from "./digitalEngagementTriggerDto"; -import type { holidayTriggerDto } from "./holidayTriggerDto"; -import type { managerOverrideTriggerDto } from "./managerOverrideTriggerDto"; -import type { purchaseTriggerDto } from "./purchaseTriggerDto"; -import type { sellerOperationalStateTriggerDto } from "./sellerOperationalStateTriggerDto"; -import type { stopListTriggerDto } from "./stopListTriggerDto"; -import type { timeTriggerDto } from "./timeTriggerDto"; -import type { triggerEffect } from "./triggerEffect"; -export type iTriggerDto = - | timeTriggerDto - | purchaseTriggerDto - | managerOverrideTriggerDto - | holidayTriggerDto - | digitalEngagementTriggerDto - | customerLoyaltyTriggerDto - | customerHistoryTriggerDto - | customerGroupTriggerDto - | couponTriggerDto - | bundleTriggerDto - | sellerOperationalStateTriggerDto - | stopListTriggerDto - | { - effect?: triggerEffect; - type?: string; - }; +import type { bundleTriggerDto } from './bundleTriggerDto'; +import type { couponTriggerDto } from './couponTriggerDto'; +import type { customerGroupTriggerDto } from './customerGroupTriggerDto'; +import type { customerHistoryTriggerDto } from './customerHistoryTriggerDto'; +import type { customerLoyaltyTriggerDto } from './customerLoyaltyTriggerDto'; +import type { digitalEngagementTriggerDto } from './digitalEngagementTriggerDto'; +import type { holidayTriggerDto } from './holidayTriggerDto'; +import type { managerOverrideTriggerDto } from './managerOverrideTriggerDto'; +import type { purchaseTriggerDto } from './purchaseTriggerDto'; +import type { sellerOperationalStateTriggerDto } from './sellerOperationalStateTriggerDto'; +import type { stopListTriggerDto } from './stopListTriggerDto'; +import type { timeTriggerDto } from './timeTriggerDto'; +import type { triggerEffect } from './triggerEffect'; +export type iTriggerDto = (timeTriggerDto | purchaseTriggerDto | managerOverrideTriggerDto | holidayTriggerDto | digitalEngagementTriggerDto | customerLoyaltyTriggerDto | customerHistoryTriggerDto | customerGroupTriggerDto | couponTriggerDto | bundleTriggerDto | sellerOperationalStateTriggerDto | stopListTriggerDto | { + effect?: triggerEffect; + type?: string; +}); + diff --git a/src/lib/api/merchant/models/imageReferenceDto.ts b/src/lib/api/merchant/models/imageReferenceDto.ts index 42d110f..7e1e189 100644 --- a/src/lib/api/merchant/models/imageReferenceDto.ts +++ b/src/lib/api/merchant/models/imageReferenceDto.ts @@ -2,22 +2,23 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { aspectType } from "./aspectType"; +import type { aspectType } from './aspectType'; export type imageReferenceDto = { - /** - * The key refers to the particular image in a set of images. - * eg: 'primary' might refer to the main image of a product. - * 'alt' might refer to an alternate image. - */ - key: string | null; - /** - * A base58-encoded SHA-256 digest for the asset. - * This is the digest (or hash) of the original image - */ - digest: string | null; - /** - * A list of 'aspects' available for this digest. - * In the future this may include more than just 'ratios'. - */ - aspects: Array | null; + /** + * The key refers to the particular image in a set of images. + * eg: 'primary' might refer to the main image of a product. + * 'alt' might refer to an alternate image. + */ + key: string | null; + /** + * A base58-encoded SHA-256 digest for the asset. + * This is the digest (or hash) of the original image + */ + digest: string | null; + /** + * A list of 'aspects' available for this digest. + * In the future this may include more than just 'ratios'. + */ + aspects: Array | null; }; + diff --git a/src/lib/api/merchant/models/localizedTextDto.ts b/src/lib/api/merchant/models/localizedTextDto.ts index 86ff1df..fa7ef87 100644 --- a/src/lib/api/merchant/models/localizedTextDto.ts +++ b/src/lib/api/merchant/models/localizedTextDto.ts @@ -3,8 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type localizedTextDto = { - type?: number; - value?: string | null; - lang?: string | null; - revisionId?: string | null; + type?: number; + value?: string | null; + lang?: string | null; + revisionId?: string | null; }; + diff --git a/src/lib/api/merchant/models/managerOverrideTriggerDto.ts b/src/lib/api/merchant/models/managerOverrideTriggerDto.ts index 9b666b6..e517588 100644 --- a/src/lib/api/merchant/models/managerOverrideTriggerDto.ts +++ b/src/lib/api/merchant/models/managerOverrideTriggerDto.ts @@ -2,13 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type managerOverrideTriggerDto = { - effect?: triggerEffect; - readonly type?: "manager_override" | null; - key?: string | null; - clearWhen?: string | null; - utcCreated?: string; - isAvailable: boolean; - managerUserId?: string; + effect?: triggerEffect; + readonly type?: 'manager_override' | null; + key?: string | null; + clearWhen?: string | null; + utcCreated?: string; + isAvailable: boolean; + managerUserId?: string; }; + diff --git a/src/lib/api/merchant/models/oidcConnectResponseDto.ts b/src/lib/api/merchant/models/oidcConnectResponseDto.ts index d23e58c..d580428 100644 --- a/src/lib/api/merchant/models/oidcConnectResponseDto.ts +++ b/src/lib/api/merchant/models/oidcConnectResponseDto.ts @@ -6,13 +6,14 @@ * Data transfer object representing connection information for an OIDC client. */ export type oidcConnectResponseDto = { - /** - * Client identifier used for the OIDC connection. - */ - clientId?: string | null; - /** - * Authority URL of the OIDC provider. - * This is the URL that the client will connect to for authentication. - */ - authorityUrl?: string | null; + /** + * Client identifier used for the OIDC connection. + */ + clientId?: string | null; + /** + * Authority URL of the OIDC provider. + * This is the URL that the client will connect to for authentication. + */ + authorityUrl?: string | null; }; + diff --git a/src/lib/api/merchant/models/optionDto.ts b/src/lib/api/merchant/models/optionDto.ts index eda142a..c3c50fd 100644 --- a/src/lib/api/merchant/models/optionDto.ts +++ b/src/lib/api/merchant/models/optionDto.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { localizedTextDto } from "./localizedTextDto"; +import type { localizedTextDto } from './localizedTextDto'; export type optionDto = { - id?: string; - title?: localizedTextDto; - description?: localizedTextDto; - price?: { - /** - * Currency code ISO 4217 - */ - currency?: string; - value?: number; - } | null; - isFixedPrice?: boolean; - additional?: Record | null; + id?: string; + title?: localizedTextDto; + description?: localizedTextDto; + price?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + isFixedPrice?: boolean; + additional?: Record | null; }; + diff --git a/src/lib/api/merchant/models/optionsQueryDto.ts b/src/lib/api/merchant/models/optionsQueryDto.ts index af3ccc4..9782f3c 100644 --- a/src/lib/api/merchant/models/optionsQueryDto.ts +++ b/src/lib/api/merchant/models/optionsQueryDto.ts @@ -3,23 +3,24 @@ /* tslint:disable */ /* eslint-disable */ export type optionsQueryDto = { - optionsId?: string | null; - friendlyName?: string | null; - minRequired?: number | null; - maxLimit?: number | null; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableFrom?: string | null; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableTo?: string | null; - offset?: number; - limit?: number; - utcCreatedFrom?: string | null; - utcCreatedTo?: string | null; - isPublished?: boolean | null; - publishedByUserId?: string | null; - utcCreated?: string | null; + optionsId?: string | null; + friendlyName?: string | null; + minRequired?: number | null; + maxLimit?: number | null; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableFrom?: string | null; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableTo?: string | null; + offset?: number; + limit?: number; + utcCreatedFrom?: string | null; + utcCreatedTo?: string | null; + isPublished?: boolean | null; + publishedByUserId?: string | null; + utcCreated?: string | null; }; + diff --git a/src/lib/api/merchant/models/optionsRevisionDto.ts b/src/lib/api/merchant/models/optionsRevisionDto.ts index e36a087..ad085ce 100644 --- a/src/lib/api/merchant/models/optionsRevisionDto.ts +++ b/src/lib/api/merchant/models/optionsRevisionDto.ts @@ -2,29 +2,30 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { localizedTextDto } from "./localizedTextDto"; -import type { optionDto } from "./optionDto"; +import type { localizedTextDto } from './localizedTextDto'; +import type { optionDto } from './optionDto'; export type optionsRevisionDto = { - friendlyName?: string | null; - minRequired?: number; - maxLimit?: number; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableFrom?: string | null; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableTo?: string | null; - options?: Array | null; - additional?: Record | null; - optionsId?: string; - revisionId?: string; - title?: localizedTextDto; - description?: localizedTextDto; - creatorId?: string; - utcCreated?: string; - isPublished?: boolean; - utcPublished?: string | null; - publishedByUserId?: string | null; + friendlyName?: string | null; + minRequired?: number; + maxLimit?: number; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableFrom?: string | null; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableTo?: string | null; + options?: Array | null; + additional?: Record | null; + optionsId?: string; + revisionId?: string; + title?: localizedTextDto; + description?: localizedTextDto; + creatorId?: string; + utcCreated?: string; + isPublished?: boolean; + utcPublished?: string | null; + publishedByUserId?: string | null; }; + diff --git a/src/lib/api/merchant/models/optionsViewDto.ts b/src/lib/api/merchant/models/optionsViewDto.ts index adcd86f..a1a0bb3 100644 --- a/src/lib/api/merchant/models/optionsViewDto.ts +++ b/src/lib/api/merchant/models/optionsViewDto.ts @@ -2,24 +2,25 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { localizedTextDto } from "./localizedTextDto"; -import type { optionDto } from "./optionDto"; +import type { localizedTextDto } from './localizedTextDto'; +import type { optionDto } from './optionDto'; export type optionsViewDto = { - friendlyName?: string | null; - minRequired?: number; - maxLimit?: number; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableFrom?: string | null; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - availableTo?: string | null; - options?: Array | null; - additional?: Record | null; - optionsId?: string; - revisionId?: string; - title?: localizedTextDto; - description?: localizedTextDto; + friendlyName?: string | null; + minRequired?: number; + maxLimit?: number; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableFrom?: string | null; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + availableTo?: string | null; + options?: Array | null; + additional?: Record | null; + optionsId?: string; + revisionId?: string; + title?: localizedTextDto; + description?: localizedTextDto; }; + diff --git a/src/lib/api/merchant/models/orderCreateDto.ts b/src/lib/api/merchant/models/orderCreateDto.ts index 58c01a2..0e651eb 100644 --- a/src/lib/api/merchant/models/orderCreateDto.ts +++ b/src/lib/api/merchant/models/orderCreateDto.ts @@ -2,39 +2,40 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { checkoutOptionsDto } from "./checkoutOptionsDto"; -import type { paymentType } from "./paymentType"; -import type { selectedProductDto } from "./selectedProductDto"; +import type { checkoutOptionsDto } from './checkoutOptionsDto'; +import type { paymentType } from './paymentType'; +import type { selectedProductDto } from './selectedProductDto'; export type orderCreateDto = { - sellerId?: string; - /** - * The consumer's public key. - */ - consumerKey?: string; - paymentType?: paymentType; - options?: checkoutOptionsDto; - /** - * The items in this order. - */ - items?: Array | null; - /** - * Additional instructions or comments regarding the order. - */ - comments?: string | null; - dispatchRequired?: boolean; - agreedPrice?: { + sellerId?: string; /** - * Currency code ISO 4217 + * The consumer's public key. */ - currency?: string; - value?: number; - } | null; - agreedDeliveryPrice?: { + consumerKey?: string; + paymentType?: paymentType; + options?: checkoutOptionsDto; /** - * Currency code ISO 4217 + * The items in this order. */ - currency?: string; - value?: number; - } | null; - deliveryEstSeconds?: number; + items?: Array | null; + /** + * Additional instructions or comments regarding the order. + */ + comments?: string | null; + dispatchRequired?: boolean; + agreedPrice?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + agreedDeliveryPrice?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + deliveryEstSeconds?: number; }; + diff --git a/src/lib/api/merchant/models/orderDto.ts b/src/lib/api/merchant/models/orderDto.ts index 689b7ba..711745a 100644 --- a/src/lib/api/merchant/models/orderDto.ts +++ b/src/lib/api/merchant/models/orderDto.ts @@ -2,26 +2,27 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { checkoutOptionsDto } from "./checkoutOptionsDto"; -import type { paymentType } from "./paymentType"; -import type { selectedProductDto } from "./selectedProductDto"; +import type { checkoutOptionsDto } from './checkoutOptionsDto'; +import type { paymentType } from './paymentType'; +import type { selectedProductDto } from './selectedProductDto'; /** * Data transfer object for common order information. */ export type orderDto = { - sellerId?: string; - /** - * The consumer's public key. - */ - consumerKey?: string; - paymentType?: paymentType; - options?: checkoutOptionsDto; - /** - * The items in this order. - */ - items?: Array | null; - /** - * Additional instructions or comments regarding the order. - */ - comments?: string | null; + sellerId?: string; + /** + * The consumer's public key. + */ + consumerKey?: string; + paymentType?: paymentType; + options?: checkoutOptionsDto; + /** + * The items in this order. + */ + items?: Array | null; + /** + * Additional instructions or comments regarding the order. + */ + comments?: string | null; }; + diff --git a/src/lib/api/merchant/models/orderFailureRequestDto.ts b/src/lib/api/merchant/models/orderFailureRequestDto.ts index 78671a9..318f6bb 100644 --- a/src/lib/api/merchant/models/orderFailureRequestDto.ts +++ b/src/lib/api/merchant/models/orderFailureRequestDto.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { commonOrderFailureResult } from "./commonOrderFailureResult"; +import type { commonOrderFailureResult } from './commonOrderFailureResult'; /** * Request DTO for cancelling/rejecting an order with a specific failure reason. */ export type orderFailureRequestDto = { - /** - * Unique identifier of the order to be cancelled. - */ - orderId?: string; - failureResult?: commonOrderFailureResult; - /** - * Optional additional reason or notes about the cancellation. - */ - reason?: string | null; + /** + * Unique identifier of the order to be cancelled. + */ + orderId?: string; + failureResult?: commonOrderFailureResult; + /** + * Optional additional reason or notes about the cancellation. + */ + reason?: string | null; }; + diff --git a/src/lib/api/merchant/models/orderNextStatusDto.ts b/src/lib/api/merchant/models/orderNextStatusDto.ts index 85a7150..f917f22 100644 --- a/src/lib/api/merchant/models/orderNextStatusDto.ts +++ b/src/lib/api/merchant/models/orderNextStatusDto.ts @@ -2,15 +2,16 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { commonOrderStatus } from "./commonOrderStatus"; +import type { commonOrderStatus } from './commonOrderStatus'; export type orderNextStatusDto = { - orderStatus?: commonOrderStatus; - /** - * The expected completion date and time of the order. - */ - expectedCompleted?: string | null; - /** - * Indicates whether the order requires dispatching via the engine. - */ - dispatchRequired?: boolean | null; + orderStatus?: commonOrderStatus; + /** + * The expected completion date and time of the order. + */ + expectedCompleted?: string | null; + /** + * Indicates whether the order requires dispatching via the engine. + */ + dispatchRequired?: boolean | null; }; + diff --git a/src/lib/api/merchant/models/orderQueryRequestDto.ts b/src/lib/api/merchant/models/orderQueryRequestDto.ts index 55345f6..fd8c5cf 100644 --- a/src/lib/api/merchant/models/orderQueryRequestDto.ts +++ b/src/lib/api/merchant/models/orderQueryRequestDto.ts @@ -2,70 +2,71 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { commonOrderFailureResult } from "./commonOrderFailureResult"; -import type { commonOrderStatus } from "./commonOrderStatus"; +import type { commonOrderFailureResult } from './commonOrderFailureResult'; +import type { commonOrderStatus } from './commonOrderStatus'; /** * Data transfer object for querying orders using various filters. */ export type orderQueryRequestDto = { - /** - * Text search filter for orders. - */ - textSearch?: string | null; - /** - * Order code filter. - */ - orderCode?: string | null; - /** - * Filter by the seller's public key. - */ - sellerKey?: string | null; - /** - * Filter by the consumer's public key. - */ - consumerKey?: string | null; - /** - * Pagination offset; defaults to 0. - */ - offset?: number; - /** - * Limit for number of orders to return; defaults to 20. - */ - limit?: number; - /** - * UTC date filter for orders created on or after this date. - */ - utcCreatedFrom?: string | null; - /** - * UTC date filter for orders created on or before this date. - */ - utcCreatedTo?: string | null; - /** - * UTC date filter for orders updated on or after this date. - */ - utcUpdatedFrom?: string | null; - /** - * UTC date filter for orders updated on or before this date. - */ - utcUpdatedTo?: string | null; - /** - * Filter to include active orders in the results. - */ - activeOrders?: boolean | null; - /** - * Filter to include completed orders in the results. - */ - completedOrders?: boolean | null; - /** - * Filter to include cancelled orders in the results. - */ - cancelledOrders?: boolean | null; - /** - * Results will match to any of the provided order statuses. - */ - statusAny?: Array | null; - /** - * Array of order failure results to filter orders by any matching failure type. - */ - failureAny?: Array | null; + /** + * Text search filter for orders. + */ + textSearch?: string | null; + /** + * Order code filter. + */ + orderCode?: string | null; + /** + * Filter by the seller's public key. + */ + sellerKey?: string | null; + /** + * Filter by the consumer's public key. + */ + consumerKey?: string | null; + /** + * Pagination offset; defaults to 0. + */ + offset?: number; + /** + * Limit for number of orders to return; defaults to 20. + */ + limit?: number; + /** + * UTC date filter for orders created on or after this date. + */ + utcCreatedFrom?: string | null; + /** + * UTC date filter for orders created on or before this date. + */ + utcCreatedTo?: string | null; + /** + * UTC date filter for orders updated on or after this date. + */ + utcUpdatedFrom?: string | null; + /** + * UTC date filter for orders updated on or before this date. + */ + utcUpdatedTo?: string | null; + /** + * Filter to include active orders in the results. + */ + activeOrders?: boolean | null; + /** + * Filter to include completed orders in the results. + */ + completedOrders?: boolean | null; + /** + * Filter to include cancelled orders in the results. + */ + cancelledOrders?: boolean | null; + /** + * Results will match to any of the provided order statuses. + */ + statusAny?: Array | null; + /** + * Array of order failure results to filter orders by any matching failure type. + */ + failureAny?: Array | null; }; + diff --git a/src/lib/api/merchant/models/orderStateChangeRequestDto.ts b/src/lib/api/merchant/models/orderStateChangeRequestDto.ts index 2203322..c7b7e2d 100644 --- a/src/lib/api/merchant/models/orderStateChangeRequestDto.ts +++ b/src/lib/api/merchant/models/orderStateChangeRequestDto.ts @@ -2,20 +2,21 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { commonOrderFailureResult } from "./commonOrderFailureResult"; -import type { orderTriggerDto } from "./orderTriggerDto"; +import type { commonOrderFailureResult } from './commonOrderFailureResult'; +import type { orderTriggerDto } from './orderTriggerDto'; /** * Request DTO for changing the state of an order. */ export type orderStateChangeRequestDto = { - /** - * Unique identifier of the order. - */ - orderId?: string; - orderTrigger?: orderTriggerDto; - failureResult?: commonOrderFailureResult; - /** - * Optional expected ready time for the order. - */ - expectedReady?: string | null; + /** + * Unique identifier of the order. + */ + orderId?: string; + orderTrigger?: orderTriggerDto; + failureResult?: commonOrderFailureResult; + /** + * Optional expected ready time for the order. + */ + expectedReady?: string | null; }; + diff --git a/src/lib/api/merchant/models/orderStateDto.ts b/src/lib/api/merchant/models/orderStateDto.ts index ab2408a..b6ae65f 100644 --- a/src/lib/api/merchant/models/orderStateDto.ts +++ b/src/lib/api/merchant/models/orderStateDto.ts @@ -2,37 +2,38 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { commonOrderFailureResult } from "./commonOrderFailureResult"; -import type { commonOrderStatus } from "./commonOrderStatus"; -import type { deliveryStateDto } from "./deliveryStateDto"; -import type { preparationStateDto } from "./preparationStateDto"; +import type { commonOrderFailureResult } from './commonOrderFailureResult'; +import type { commonOrderStatus } from './commonOrderStatus'; +import type { deliveryStateDto } from './deliveryStateDto'; +import type { preparationStateDto } from './preparationStateDto'; /** * Represents the current state of an order. */ export type orderStateDto = { - orderStatus?: commonOrderStatus; - /** - * A key value store of timestamps indicating when each status was reached. - * The key is the integer value of the 'CommonOrderStatus'. - */ - orderStatusTimes?: Record | null; - failureResult?: commonOrderFailureResult; - /** - * The scheduled start time - */ - utcScheduled?: string | null; - /** - * The actual start time - */ - utcStarted?: string | null; - /** - * The actual end time - */ - utcEndedActual?: string | null; - preparationState?: preparationStateDto; - deliveryState?: deliveryStateDto; - /** - * Optional: Readable explanation as to the failure result. - */ - failureExplain?: string | null; + orderStatus?: commonOrderStatus; + /** + * A key value store of timestamps indicating when each status was reached. + * The key is the integer value of the 'CommonOrderStatus'. + */ + orderStatusTimes?: Record | null; + failureResult?: commonOrderFailureResult; + /** + * The scheduled start time + */ + utcScheduled?: string | null; + /** + * The actual start time + */ + utcStarted?: string | null; + /** + * The actual end time + */ + utcEndedActual?: string | null; + preparationState?: preparationStateDto; + deliveryState?: deliveryStateDto; + /** + * Optional: Readable explanation as to the failure result. + */ + failureExplain?: string | null; }; + diff --git a/src/lib/api/merchant/models/orderTriggerDto.ts b/src/lib/api/merchant/models/orderTriggerDto.ts index 737c6ed..5678991 100644 --- a/src/lib/api/merchant/models/orderTriggerDto.ts +++ b/src/lib/api/merchant/models/orderTriggerDto.ts @@ -19,40 +19,40 @@ * */ export enum orderTriggerDto { - /** - * (value: 0) - */ - ConfirmCreation = 0, - /** - * (value: 1) - */ - PaymentReceived = 1, - /** - * (value: 2) - */ - PlaceOrder = 2, - /** - * (value: 3) - */ - AcceptOrder = 3, - /** - * (value: 4) - */ - PrepareOrder = 4, - /** - * (value: 5) - */ - Prepared = 5, - /** - * (value: 6) - */ - OrderCollected = 6, - /** - * (value: 7) - */ - CompleteOrder = 7, - /** - * (value: 8) - */ - Cancel = 8, + /** + * (value: 0) + */ + ConfirmCreation = 0, + /** + * (value: 1) + */ + PaymentReceived = 1, + /** + * (value: 2) + */ + PlaceOrder = 2, + /** + * (value: 3) + */ + AcceptOrder = 3, + /** + * (value: 4) + */ + PrepareOrder = 4, + /** + * (value: 5) + */ + Prepared = 5, + /** + * (value: 6) + */ + OrderCollected = 6, + /** + * (value: 7) + */ + CompleteOrder = 7, + /** + * (value: 8) + */ + Cancel = 8, } diff --git a/src/lib/api/merchant/models/orderViewDto.ts b/src/lib/api/merchant/models/orderViewDto.ts index 6190d81..dde678c 100644 --- a/src/lib/api/merchant/models/orderViewDto.ts +++ b/src/lib/api/merchant/models/orderViewDto.ts @@ -2,55 +2,56 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { calculatedCheckoutDto } from "./calculatedCheckoutDto"; -import type { checkoutOptionsDto } from "./checkoutOptionsDto"; -import type { orderStateDto } from "./orderStateDto"; -import type { paymentType } from "./paymentType"; -import type { selectedProductDto } from "./selectedProductDto"; +import type { calculatedCheckoutDto } from './calculatedCheckoutDto'; +import type { checkoutOptionsDto } from './checkoutOptionsDto'; +import type { orderStateDto } from './orderStateDto'; +import type { paymentType } from './paymentType'; +import type { selectedProductDto } from './selectedProductDto'; /** * Represents an order with checkout options, calculated totals, items, products, and product options. * Inherits from CreateOrderDto to include standard order properties. */ export type orderViewDto = { - sellerId?: string; - /** - * The consumer's public key. - */ - consumerKey?: string; - paymentType?: paymentType; - options?: checkoutOptionsDto; - /** - * The items in this order. - */ - items?: Array | null; - /** - * Additional instructions or comments regarding the order. - */ - comments?: string | null; - /** - * Unique identifier for the order. - */ - id?: string; - orderState: orderStateDto; - /** - * A unique code (identifier) that is publicly visible and can be used to reference the order. - */ - orderCode?: string | null; - /** - * Timestamp (UTC) when the order was created. - */ - utcCreated?: string; - /** - * Timestamp (UTC) when the order was last updated. - */ - utcUpdated?: string; - /** - * Indicates whether the order is active. - */ - isActive?: boolean; - /** - * Indicates whether the order has failed. - */ - isFailed?: boolean; - prices?: calculatedCheckoutDto; + sellerId?: string; + /** + * The consumer's public key. + */ + consumerKey?: string; + paymentType?: paymentType; + options?: checkoutOptionsDto; + /** + * The items in this order. + */ + items?: Array | null; + /** + * Additional instructions or comments regarding the order. + */ + comments?: string | null; + /** + * Unique identifier for the order. + */ + id?: string; + orderState: orderStateDto; + /** + * A unique code (identifier) that is publicly visible and can be used to reference the order. + */ + orderCode?: string | null; + /** + * Timestamp (UTC) when the order was created. + */ + utcCreated?: string; + /** + * Timestamp (UTC) when the order was last updated. + */ + utcUpdated?: string; + /** + * Indicates whether the order is active. + */ + isActive?: boolean; + /** + * Indicates whether the order has failed. + */ + isFailed?: boolean; + prices?: calculatedCheckoutDto; }; + diff --git a/src/lib/api/merchant/models/paymentType.ts b/src/lib/api/merchant/models/paymentType.ts index 2a9e0b4..8f8f5f3 100644 --- a/src/lib/api/merchant/models/paymentType.ts +++ b/src/lib/api/merchant/models/paymentType.ts @@ -11,16 +11,16 @@ * */ export enum paymentType { - /** - * (value: 0) - */ - None = 0, - /** - * (value: 10) - */ - Postpaid = 10, - /** - * (value: 20) - */ - Prepaid = 20, + /** + * (value: 0) + */ + None = 0, + /** + * (value: 10) + */ + Postpaid = 10, + /** + * (value: 20) + */ + Prepaid = 20, } diff --git a/src/lib/api/merchant/models/phoneVerificationState.ts b/src/lib/api/merchant/models/phoneVerificationState.ts index d639a91..2cae7c6 100644 --- a/src/lib/api/merchant/models/phoneVerificationState.ts +++ b/src/lib/api/merchant/models/phoneVerificationState.ts @@ -11,16 +11,16 @@ * */ export enum phoneVerificationState { - /** - * (value: 0) - */ - Verified = 0, - /** - * (value: 1) - */ - Blocked = 1, - /** - * (value: 2) - */ - NotVerified = 2, + /** + * (value: 0) + */ + Verified = 0, + /** + * (value: 1) + */ + Blocked = 1, + /** + * (value: 2) + */ + NotVerified = 2, } diff --git a/src/lib/api/merchant/models/preparationStateDto.ts b/src/lib/api/merchant/models/preparationStateDto.ts index e94af6e..ce3e23f 100644 --- a/src/lib/api/merchant/models/preparationStateDto.ts +++ b/src/lib/api/merchant/models/preparationStateDto.ts @@ -6,20 +6,21 @@ * Data transfer object for order preparation information */ export type preparationStateDto = { - /** - * The scheduled start time - */ - utcScheduled?: string | null; - /** - * The actual start time - */ - utcStarted?: string | null; - /** - * The actual end time - */ - utcEndedActual?: string | null; - /** - * The estimated time of completion in seconds - */ - etcSeconds?: number; + /** + * The scheduled start time + */ + utcScheduled?: string | null; + /** + * The actual start time + */ + utcStarted?: string | null; + /** + * The actual end time + */ + utcEndedActual?: string | null; + /** + * The estimated time of completion in seconds + */ + etcSeconds?: number; }; + diff --git a/src/lib/api/merchant/models/priceEstimationDto.ts b/src/lib/api/merchant/models/priceEstimationDto.ts index 0dca411..bdb6792 100644 --- a/src/lib/api/merchant/models/priceEstimationDto.ts +++ b/src/lib/api/merchant/models/priceEstimationDto.ts @@ -6,32 +6,33 @@ * Data transfer object containing price estimate information. */ export type priceEstimationDto = { - /** - * Estimated price for the delivery. - */ - price?: { /** - * Currency code ISO 4217 + * Estimated price for the delivery. */ - currency?: string; - value?: number; - } | null; - /** - * Original price before any adjustments or discounts. - */ - originalPrice?: { + price?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; /** - * Currency code ISO 4217 + * Original price before any adjustments or discounts. */ - currency?: string; - value?: number; - } | null; - /** - * Total distance of the delivery route in meters. - */ - distanceMetres?: number; - /** - * The estimated amount of time in seconds the delivery could take. - */ - secondsEstimated?: number; + originalPrice?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Total distance of the delivery route in meters. + */ + distanceMetres?: number; + /** + * The estimated amount of time in seconds the delivery could take. + */ + secondsEstimated?: number; }; + diff --git a/src/lib/api/merchant/models/priceEstimationRequestDto.ts b/src/lib/api/merchant/models/priceEstimationRequestDto.ts index 546cb30..2c145b3 100644 --- a/src/lib/api/merchant/models/priceEstimationRequestDto.ts +++ b/src/lib/api/merchant/models/priceEstimationRequestDto.ts @@ -2,17 +2,18 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { gpsLocationDto } from "./gpsLocationDto"; +import type { gpsLocationDto } from './gpsLocationDto'; /** * Request DTO for estimating delivery prices */ export type priceEstimationRequestDto = { - /** - * UTC timestamp when the delivery is scheduled for. - */ - utcScheduledFor?: string; - /** - * List of GPS locations defining the delivery route. - */ - locations?: Array | null; + /** + * UTC timestamp when the delivery is scheduled for. + */ + utcScheduledFor?: string; + /** + * List of GPS locations defining the delivery route. + */ + locations?: Array | null; }; + diff --git a/src/lib/api/merchant/models/productCompositeDto.ts b/src/lib/api/merchant/models/productCompositeDto.ts index 9253f58..3d91998 100644 --- a/src/lib/api/merchant/models/productCompositeDto.ts +++ b/src/lib/api/merchant/models/productCompositeDto.ts @@ -2,35 +2,36 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { assetCollectionDto } from "./assetCollectionDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { assetCollectionDto } from './assetCollectionDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type productCompositeDto = { - price?: { - /** - * Currency code ISO 4217 - */ - currency?: string; - value?: number; - } | null; - optionsIds?: Array | null; - categoryIds?: Array | null; - sortOrder?: number; - assets?: Array | null; - isEnabled?: boolean; - notAvailableReason?: string | null; - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; - id?: string; - revisionId?: string; - promotionIds?: Array | null; - title?: localizedTextDto; - description?: localizedTextDto; - isVisible?: boolean; - isAvailable?: boolean; - isStopListed?: boolean; + price?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + optionsIds?: Array | null; + categoryIds?: Array | null; + sortOrder?: number; + assets?: Array | null; + isEnabled?: boolean; + notAvailableReason?: string | null; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; + id?: string; + revisionId?: string; + promotionIds?: Array | null; + title?: localizedTextDto; + description?: localizedTextDto; + isVisible?: boolean; + isAvailable?: boolean; + isStopListed?: boolean; }; + diff --git a/src/lib/api/merchant/models/productDto.ts b/src/lib/api/merchant/models/productDto.ts index adebc06..ce257d3 100644 --- a/src/lib/api/merchant/models/productDto.ts +++ b/src/lib/api/merchant/models/productDto.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; export type productDto = { - availabilityTriggers?: Array | null; - id?: string; - sellerId?: string; - updatedByUserId?: string; - utcUpdated?: string; - promotionIds?: Array | null; + availabilityTriggers?: Array | null; + id?: string; + sellerId?: string; + updatedByUserId?: string; + utcUpdated?: string; + promotionIds?: Array | null; }; + diff --git a/src/lib/api/merchant/models/productQueryRequestDto.ts b/src/lib/api/merchant/models/productQueryRequestDto.ts index 0fcbc29..4f36b2f 100644 --- a/src/lib/api/merchant/models/productQueryRequestDto.ts +++ b/src/lib/api/merchant/models/productQueryRequestDto.ts @@ -3,8 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type productQueryRequestDto = { - offset?: number; - limit?: number; - sellerId?: string | null; - productIds?: Array | null; + offset?: number; + limit?: number; + sellerId?: string | null; + productIds?: Array | null; }; + diff --git a/src/lib/api/merchant/models/productRevisionDto.ts b/src/lib/api/merchant/models/productRevisionDto.ts index 6a96e9b..934d857 100644 --- a/src/lib/api/merchant/models/productRevisionDto.ts +++ b/src/lib/api/merchant/models/productRevisionDto.ts @@ -2,37 +2,38 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { assetCollectionDto } from "./assetCollectionDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { tag } from "./tag"; +import type { assetCollectionDto } from './assetCollectionDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { tag } from './tag'; export type productRevisionDto = { - price?: { - /** - * Currency code ISO 4217 - */ - currency?: string; - value?: number; - } | null; - optionsIds?: Array | null; - categoryIds?: Array | null; - sortOrder?: number; - assets?: Array | null; - isEnabled?: boolean; - notAvailableReason?: string | null; - tags?: Array | null; - additional?: Record | null; - images?: Array | null; - schedule?: scheduleDto; - revisionId?: string; - productId?: string; - sellerId?: string; - title?: localizedTextDto; - description?: localizedTextDto; - creatorId?: string; - utcCreated?: string; - isPublished?: boolean; - utcPublished?: string | null; - publishedByUserId?: string | null; + price?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + optionsIds?: Array | null; + categoryIds?: Array | null; + sortOrder?: number; + assets?: Array | null; + isEnabled?: boolean; + notAvailableReason?: string | null; + tags?: Array | null; + additional?: Record | null; + images?: Array | null; + schedule?: scheduleDto; + revisionId?: string; + productId?: string; + sellerId?: string; + title?: localizedTextDto; + description?: localizedTextDto; + creatorId?: string; + utcCreated?: string; + isPublished?: boolean; + utcPublished?: string | null; + publishedByUserId?: string | null; }; + diff --git a/src/lib/api/merchant/models/productRevisionQueryRequestDto.ts b/src/lib/api/merchant/models/productRevisionQueryRequestDto.ts index 9a18906..d71eeb6 100644 --- a/src/lib/api/merchant/models/productRevisionQueryRequestDto.ts +++ b/src/lib/api/merchant/models/productRevisionQueryRequestDto.ts @@ -3,13 +3,14 @@ /* tslint:disable */ /* eslint-disable */ export type productRevisionQueryRequestDto = { - productId?: string | null; - offset?: number; - limit?: number; - utcCreatedFrom?: string | null; - utcCreatedTo?: string | null; - isPublished?: boolean | null; - publishedByUserId?: string | null; - utcCreated?: string | null; - categoryIds?: Array | null; + productId?: string | null; + offset?: number; + limit?: number; + utcCreatedFrom?: string | null; + utcCreatedTo?: string | null; + isPublished?: boolean | null; + publishedByUserId?: string | null; + utcCreated?: string | null; + categoryIds?: Array | null; }; + diff --git a/src/lib/api/merchant/models/productStopListDto.ts b/src/lib/api/merchant/models/productStopListDto.ts index ed3089c..bdca9b6 100644 --- a/src/lib/api/merchant/models/productStopListDto.ts +++ b/src/lib/api/merchant/models/productStopListDto.ts @@ -3,5 +3,6 @@ /* tslint:disable */ /* eslint-disable */ export type productStopListDto = { - productIds: Array; + productIds: Array; }; + diff --git a/src/lib/api/merchant/models/productUnavailableDto.ts b/src/lib/api/merchant/models/productUnavailableDto.ts index cf8b0fc..d049864 100644 --- a/src/lib/api/merchant/models/productUnavailableDto.ts +++ b/src/lib/api/merchant/models/productUnavailableDto.ts @@ -2,14 +2,15 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { productUnavailableReason } from "./productUnavailableReason"; +import type { productUnavailableReason } from './productUnavailableReason'; /** * Represents a product that is unavailable during checkout, including the reason. */ export type productUnavailableDto = { - /** - * Gets or sets the unique identifier of the unavailable product. - */ - productId?: string; - reason?: productUnavailableReason; + /** + * Gets or sets the unique identifier of the unavailable product. + */ + productId?: string; + reason?: productUnavailableReason; }; + diff --git a/src/lib/api/merchant/models/productUnavailableReason.ts b/src/lib/api/merchant/models/productUnavailableReason.ts index 7d4fdb5..1240e3a 100644 --- a/src/lib/api/merchant/models/productUnavailableReason.ts +++ b/src/lib/api/merchant/models/productUnavailableReason.ts @@ -14,28 +14,28 @@ * */ export enum productUnavailableReason { - /** - * (value: 0) Unknown reason. - */ - None = 0, - /** - * (value: 10) The product is not available for the selected delivery time. - */ - NotFound = 10, - /** - * (value: 20) Unavailable product. - */ - NotAvailable = 20, - /** - * (value: 30) Currently out of stock or unavailable. - */ - NotInStock = 30, - /** - * (value: 40) The product is not available at the time of ordering. - */ - NotInAvailabilityTime = 40, - /** - * (value: 50) Some of the product's options are not available. - */ - OptionsUnavailable = 50, + /** + * (value: 0) Unknown reason. + */ + None = 0, + /** + * (value: 10) The product is not available for the selected delivery time. + */ + NotFound = 10, + /** + * (value: 20) Unavailable product. + */ + NotAvailable = 20, + /** + * (value: 30) Currently out of stock or unavailable. + */ + NotInStock = 30, + /** + * (value: 40) The product is not available at the time of ordering. + */ + NotInAvailabilityTime = 40, + /** + * (value: 50) Some of the product's options are not available. + */ + OptionsUnavailable = 50, } diff --git a/src/lib/api/merchant/models/promotionQueryRequestDto.ts b/src/lib/api/merchant/models/promotionQueryRequestDto.ts index d0de997..f5f6170 100644 --- a/src/lib/api/merchant/models/promotionQueryRequestDto.ts +++ b/src/lib/api/merchant/models/promotionQueryRequestDto.ts @@ -3,12 +3,13 @@ /* tslint:disable */ /* eslint-disable */ export type promotionQueryRequestDto = { - offset?: number; - limit?: number; - ids?: Array | null; - updatedByUserId?: string | null; - utcCreatedFrom?: string | null; - utcCreatedTo?: string | null; - utcUpdatedFrom?: string | null; - utcUpdatedTo?: string | null; + offset?: number; + limit?: number; + ids?: Array | null; + updatedByUserId?: string | null; + utcCreatedFrom?: string | null; + utcCreatedTo?: string | null; + utcUpdatedFrom?: string | null; + utcUpdatedTo?: string | null; }; + diff --git a/src/lib/api/merchant/models/promotionViewDto.ts b/src/lib/api/merchant/models/promotionViewDto.ts index f92947c..7163e52 100644 --- a/src/lib/api/merchant/models/promotionViewDto.ts +++ b/src/lib/api/merchant/models/promotionViewDto.ts @@ -2,16 +2,17 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { baseOfferDto } from "./baseOfferDto"; -import type { baseTriggerDto } from "./baseTriggerDto"; -import type { localizedTextDto } from "./localizedTextDto"; +import type { baseOfferDto } from './baseOfferDto'; +import type { baseTriggerDto } from './baseTriggerDto'; +import type { localizedTextDto } from './localizedTextDto'; export type promotionViewDto = { - triggers?: Array | null; - offer: baseOfferDto; - id?: string; - title?: localizedTextDto; - description?: localizedTextDto; - updatedByUserId?: string; - utcCreated?: string; - utcUpdated?: string; + triggers?: Array | null; + offer: baseOfferDto; + id?: string; + title?: localizedTextDto; + description?: localizedTextDto; + updatedByUserId?: string; + utcCreated?: string; + utcUpdated?: string; }; + diff --git a/src/lib/api/merchant/models/purchaseTriggerDto.ts b/src/lib/api/merchant/models/purchaseTriggerDto.ts index 0f5e9e7..ef13bd0 100644 --- a/src/lib/api/merchant/models/purchaseTriggerDto.ts +++ b/src/lib/api/merchant/models/purchaseTriggerDto.ts @@ -2,11 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type purchaseTriggerDto = { - effect?: triggerEffect; - readonly type?: "purchase" | null; - minPurchase?: number | null; - minQuantity?: number | null; - minGroupSize?: number | null; + effect?: triggerEffect; + readonly type?: 'purchase' | null; + minPurchase?: number | null; + minQuantity?: number | null; + minGroupSize?: number | null; }; + diff --git a/src/lib/api/merchant/models/restaurantDto.ts b/src/lib/api/merchant/models/restaurantDto.ts index 8d1a956..92c98b8 100644 --- a/src/lib/api/merchant/models/restaurantDto.ts +++ b/src/lib/api/merchant/models/restaurantDto.ts @@ -2,36 +2,37 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; export type restaurantDto = { - name?: string | null; - /** - * Endpoint URL for the seller. - */ - endpoint?: string | null; - /** - * The promotion ids for this seller. - */ - promotionIds?: Array | null; - /** - * The availability triggers. - */ - availabilityTriggers?: Array | null; - /** - * Identifier for the seller. - */ - id?: string; - /** - * Base58 ED25519 public key for this seller. - */ - publicKey?: string; - /** - * Gets or sets the ID of the user who last updated the item. - */ - updatedByUserId?: string; - /** - * Gets or sets the UTC date and time when last updated. - */ - utcUpdated?: string; - readonly type?: "restaurant-view" | null; + name?: string | null; + /** + * Endpoint URL for the seller. + */ + endpoint?: string | null; + /** + * The promotion ids for this seller. + */ + promotionIds?: Array | null; + /** + * The availability triggers. + */ + availabilityTriggers?: Array | null; + /** + * Identifier for the seller. + */ + id?: string; + /** + * Base58 ED25519 public key for this seller. + */ + publicKey?: string; + /** + * Gets or sets the ID of the user who last updated the item. + */ + updatedByUserId?: string; + /** + * Gets or sets the UTC date and time when last updated. + */ + utcUpdated?: string; + readonly type?: 'restaurant-view' | null; }; + diff --git a/src/lib/api/merchant/models/restaurantRevisionDto.ts b/src/lib/api/merchant/models/restaurantRevisionDto.ts index 6724d81..081d813 100644 --- a/src/lib/api/merchant/models/restaurantRevisionDto.ts +++ b/src/lib/api/merchant/models/restaurantRevisionDto.ts @@ -2,75 +2,76 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; /** * Represents a restaurant with seller details and associated tags. */ export type restaurantRevisionDto = { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; - /** - * Optional minimum order amount required by the restaurant. - */ - minimumOrder?: { /** - * Currency code ISO 4217 + * Version number of the document. */ - currency?: string; - value?: number; - } | null; - /** - * Tags associated with the restaurant. - */ - tags?: Array | null; - /** - * Unique identifier of the restaurant (local to this system). - */ - revisionId?: string; - /** - * The document id for this revision. - */ - sellerId?: string; - title?: localizedTextDto; - description?: localizedTextDto; - tagLine?: localizedTextDto; - /** - * The user who created this revision. - */ - creatorId?: string; - /** - * UTC timestamp when the seller was created. - */ - utcCreated?: string; - /** - * Flag indicating whether the seller is published and visible to the public. - */ - isPublished?: boolean; - /** - * UTC timestamp when the seller was published. - */ - utcPublished?: string | null; - /** - * Unique identifier of the user who published the seller. - */ - publisherId?: string | null; + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; + /** + * Optional minimum order amount required by the restaurant. + */ + minimumOrder?: { + /** + * Currency code ISO 4217 + */ + currency?: string; + value?: number; + } | null; + /** + * Tags associated with the restaurant. + */ + tags?: Array | null; + /** + * Unique identifier of the restaurant (local to this system). + */ + revisionId?: string; + /** + * The document id for this revision. + */ + sellerId?: string; + title?: localizedTextDto; + description?: localizedTextDto; + tagLine?: localizedTextDto; + /** + * The user who created this revision. + */ + creatorId?: string; + /** + * UTC timestamp when the seller was created. + */ + utcCreated?: string; + /** + * Flag indicating whether the seller is published and visible to the public. + */ + isPublished?: boolean; + /** + * UTC timestamp when the seller was published. + */ + utcPublished?: string | null; + /** + * Unique identifier of the user who published the seller. + */ + publisherId?: string | null; }; + diff --git a/src/lib/api/merchant/models/rolePermissionsDto.ts b/src/lib/api/merchant/models/rolePermissionsDto.ts index 9f58783..233af88 100644 --- a/src/lib/api/merchant/models/rolePermissionsDto.ts +++ b/src/lib/api/merchant/models/rolePermissionsDto.ts @@ -6,12 +6,13 @@ * Represents an association between a role and its permissions. */ export type rolePermissionsDto = { - /** - * Role name. - */ - role?: string; - /** - * Collection of permissions linked to the role. - */ - permissions?: Array | null; + /** + * Role name. + */ + role?: string; + /** + * Collection of permissions linked to the role. + */ + permissions?: Array | null; }; + diff --git a/src/lib/api/merchant/models/scheduleDto.ts b/src/lib/api/merchant/models/scheduleDto.ts index 068102e..3e0ccb6 100644 --- a/src/lib/api/merchant/models/scheduleDto.ts +++ b/src/lib/api/merchant/models/scheduleDto.ts @@ -2,27 +2,28 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { scheduleExceptionDto } from "./scheduleExceptionDto"; -import type { timeRangeDto } from "./timeRangeDto"; +import type { scheduleExceptionDto } from './scheduleExceptionDto'; +import type { timeRangeDto } from './timeRangeDto'; /** * Data transfer object for Schedule. */ export type scheduleDto = { - /** - * Gets or sets the regular hours for each day of the week. - * Keys are integers representing days of the week (0 = Sunday, 1 = Monday, etc.). - */ - regularHours?: { - Sunday?: Array; - Monday?: Array; - Tuesday?: Array; - Wednesday?: Array; - Thursday?: Array; - Friday?: Array; - Saturday?: Array; - } | null; - /** - * Gets or sets the list of schedule exceptions. - */ - exceptions?: Array | null; + /** + * Gets or sets the regular hours for each day of the week. + * Keys are integers representing days of the week (0 = Sunday, 1 = Monday, etc.). + */ + regularHours?: { + Sunday?: Array; + Monday?: Array; + Tuesday?: Array; + Wednesday?: Array; + Thursday?: Array; + Friday?: Array; + Saturday?: Array; + } | null; + /** + * Gets or sets the list of schedule exceptions. + */ + exceptions?: Array | null; }; + diff --git a/src/lib/api/merchant/models/scheduleExceptionDto.ts b/src/lib/api/merchant/models/scheduleExceptionDto.ts index 99c9cbb..28e0e26 100644 --- a/src/lib/api/merchant/models/scheduleExceptionDto.ts +++ b/src/lib/api/merchant/models/scheduleExceptionDto.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { timeRangeDto } from "./timeRangeDto"; +import type { timeRangeDto } from './timeRangeDto'; /** * Data transfer object for ScheduleException. */ export type scheduleExceptionDto = { - /** - * Gets or sets the date of the exception (format: yyyy-MM-dd). - */ - date?: string; - /** - * Gets or sets the override time ranges for this date. - * Empty array means the location is closed on this date. - */ - overrideHours?: Array | null; + /** + * Gets or sets the date of the exception (format: yyyy-MM-dd). + */ + date?: string; + /** + * Gets or sets the override time ranges for this date. + * Empty array means the location is closed on this date. + */ + overrideHours?: Array | null; }; + diff --git a/src/lib/api/merchant/models/selectedOptionDto.ts b/src/lib/api/merchant/models/selectedOptionDto.ts index 84ef782..9f4ea5a 100644 --- a/src/lib/api/merchant/models/selectedOptionDto.ts +++ b/src/lib/api/merchant/models/selectedOptionDto.ts @@ -2,22 +2,23 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { localizedTextDto } from "./localizedTextDto"; +import type { localizedTextDto } from './localizedTextDto'; /** * Represents the details of a selected option for a product, such as toppings, sauces, or other customizations. */ export type selectedOptionDto = { - /** - * Gets the unique identifier for the selected option. - */ - id?: string; - /** - * Gets the unique identifier for the set this option belongs to. - */ - setId?: string; - /** - * Gets the quantity of this option. - */ - quantity: number; - title?: localizedTextDto; + /** + * Gets the unique identifier for the selected option. + */ + id?: string; + /** + * Gets the unique identifier for the set this option belongs to. + */ + setId?: string; + /** + * Gets the quantity of this option. + */ + quantity: number; + title?: localizedTextDto; }; + diff --git a/src/lib/api/merchant/models/selectedProductDto.ts b/src/lib/api/merchant/models/selectedProductDto.ts index 67b5fe3..3ba9caa 100644 --- a/src/lib/api/merchant/models/selectedProductDto.ts +++ b/src/lib/api/merchant/models/selectedProductDto.ts @@ -2,32 +2,33 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { localizedTextDto } from "./localizedTextDto"; -import type { selectedOptionDto } from "./selectedOptionDto"; +import type { localizedTextDto } from './localizedTextDto'; +import type { selectedOptionDto } from './selectedOptionDto'; /** * Represents a selected product in a checkout, such as a menu item with its selected options and quantity. */ export type selectedProductDto = { - /** - * Gets the unique identifier for this selected product. - */ - id?: string; - /** - * Gets the unique identifier of the product. - */ - productId: string; - /** - * Gets the quantity of this product. Decimal is used to represent fractional quantities. - */ - quantity: number; - /** - * Gets the collection of selected options for this product. - */ - options: Array | null; - title?: localizedTextDto; - /** - * Additional instructions or comments regarding the product. - */ - comments?: string | null; - readonly documentId?: string; + /** + * Gets the unique identifier for this selected product. + */ + id?: string; + /** + * Gets the unique identifier of the product. + */ + productId: string; + /** + * Gets the quantity of this product. Decimal is used to represent fractional quantities. + */ + quantity: number; + /** + * Gets the collection of selected options for this product. + */ + options: Array | null; + title?: localizedTextDto; + /** + * Additional instructions or comments regarding the product. + */ + comments?: string | null; + readonly documentId?: string; }; + diff --git a/src/lib/api/merchant/models/sellerCompositeDto.ts b/src/lib/api/merchant/models/sellerCompositeDto.ts index 6a3f5d6..a0ef2f2 100644 --- a/src/lib/api/merchant/models/sellerCompositeDto.ts +++ b/src/lib/api/merchant/models/sellerCompositeDto.ts @@ -2,60 +2,61 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; export type sellerCompositeDto = { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; - /** - * Identifier for the seller. - */ - id?: string; - /** - * Current published revision id. - */ - revisionId?: string | null; - /** - * Base58 ED25519 public key for this seller. - */ - publicKey?: string; - /** - * The endpoint URL for the seller. - * This is the origin API endpoint for the seller. - */ - endpoint?: string | null; - title?: localizedTextDto; - description?: localizedTextDto; - tagLine?: localizedTextDto; - /** - * Is the seller visible? - */ - isVisible?: boolean; - /** - * Indicates if the seller is currently available - */ - isAvailable?: boolean; - /** - * A list of promotion identifiers. - */ - promotionIds?: Array | null; - readonly documentId?: string; + /** + * Version number of the document. + */ + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; + /** + * Identifier for the seller. + */ + id?: string; + /** + * Current published revision id. + */ + revisionId?: string | null; + /** + * Base58 ED25519 public key for this seller. + */ + publicKey?: string; + /** + * The endpoint URL for the seller. + * This is the origin API endpoint for the seller. + */ + endpoint?: string | null; + title?: localizedTextDto; + description?: localizedTextDto; + tagLine?: localizedTextDto; + /** + * Is the seller visible? + */ + isVisible?: boolean; + /** + * Indicates if the seller is currently available + */ + isAvailable?: boolean; + /** + * A list of promotion identifiers. + */ + promotionIds?: Array | null; + readonly documentId?: string; }; + diff --git a/src/lib/api/merchant/models/sellerDto.ts b/src/lib/api/merchant/models/sellerDto.ts index 4e81c5b..6631de5 100644 --- a/src/lib/api/merchant/models/sellerDto.ts +++ b/src/lib/api/merchant/models/sellerDto.ts @@ -2,39 +2,40 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { iTriggerDto } from "./iTriggerDto"; +import type { iTriggerDto } from './iTriggerDto'; export type sellerDto = { - /** - * The document type 'restaurant' or 'shop'. - */ - type?: "seller-view" | null; - name?: string | null; - /** - * Endpoint URL for the seller. - */ - endpoint?: string | null; - /** - * The promotion ids for this seller. - */ - promotionIds?: Array | null; - /** - * The availability triggers. - */ - availabilityTriggers?: Array | null; - /** - * Identifier for the seller. - */ - id?: string; - /** - * Base58 ED25519 public key for this seller. - */ - publicKey?: string; - /** - * Gets or sets the ID of the user who last updated the item. - */ - updatedByUserId?: string; - /** - * Gets or sets the UTC date and time when last updated. - */ - utcUpdated?: string; + /** + * The document type 'restaurant' or 'shop'. + */ + type?: 'seller-view' | null; + name?: string | null; + /** + * Endpoint URL for the seller. + */ + endpoint?: string | null; + /** + * The promotion ids for this seller. + */ + promotionIds?: Array | null; + /** + * The availability triggers. + */ + availabilityTriggers?: Array | null; + /** + * Identifier for the seller. + */ + id?: string; + /** + * Base58 ED25519 public key for this seller. + */ + publicKey?: string; + /** + * Gets or sets the ID of the user who last updated the item. + */ + updatedByUserId?: string; + /** + * Gets or sets the UTC date and time when last updated. + */ + utcUpdated?: string; }; + diff --git a/src/lib/api/merchant/models/sellerOperationalStateDto.ts b/src/lib/api/merchant/models/sellerOperationalStateDto.ts index f66a6b1..a59d589 100644 --- a/src/lib/api/merchant/models/sellerOperationalStateDto.ts +++ b/src/lib/api/merchant/models/sellerOperationalStateDto.ts @@ -7,32 +7,33 @@ * This might include closing or opening, or restricting the types of orders that can be placed. */ export type sellerOperationalStateDto = { - /** - * Not Implemented: Only allow VIP orders to be placed for this seller (staff / special customers). - */ - allowVipOrders?: boolean; - /** - * Not Implemented: Allow orders to be placed for this seller. - */ - allowOrders?: boolean; - /** - * The seller is currently open for business. - */ - isOpen?: boolean; - /** - * Not Implemented: An optional reason for the change in operational state. - */ - reasonForChange?: string | null; - /** - * Not Implemented: If set, the current changes will be reverted when the next shift starts. - */ - resetOnNextShift?: boolean; - /** - * Not Implemented: If set, the current changes will be reverted when the first shift of the next working day starts. - */ - resetOnNextWorkingDay?: boolean; - /** - * Not Implemented: If set, the current changes will be reverted at the specified date and time. - */ - effectiveUntil?: string | null; + /** + * Not Implemented: Only allow VIP orders to be placed for this seller (staff / special customers). + */ + allowVipOrders?: boolean; + /** + * Not Implemented: Allow orders to be placed for this seller. + */ + allowOrders?: boolean; + /** + * The seller is currently open for business. + */ + isOpen?: boolean; + /** + * Not Implemented: An optional reason for the change in operational state. + */ + reasonForChange?: string | null; + /** + * Not Implemented: If set, the current changes will be reverted when the next shift starts. + */ + resetOnNextShift?: boolean; + /** + * Not Implemented: If set, the current changes will be reverted when the first shift of the next working day starts. + */ + resetOnNextWorkingDay?: boolean; + /** + * Not Implemented: If set, the current changes will be reverted at the specified date and time. + */ + effectiveUntil?: string | null; }; + diff --git a/src/lib/api/merchant/models/sellerOperationalStateTriggerDto.ts b/src/lib/api/merchant/models/sellerOperationalStateTriggerDto.ts index 5e50b98..e9c0d43 100644 --- a/src/lib/api/merchant/models/sellerOperationalStateTriggerDto.ts +++ b/src/lib/api/merchant/models/sellerOperationalStateTriggerDto.ts @@ -2,16 +2,17 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type sellerOperationalStateTriggerDto = { - effect?: triggerEffect; - readonly type?: "seller_operational_state" | null; - allowOrders: boolean; - allowVipOrders: boolean; - reasonForChange?: string | null; - resetOnNextShift?: boolean; - resetOnNextWorkingDay?: boolean; - effectiveUntil?: string | null; - utcCreated?: string; - managerUserId?: string; + effect?: triggerEffect; + readonly type?: 'seller_operational_state' | null; + allowOrders: boolean; + allowVipOrders: boolean; + reasonForChange?: string | null; + resetOnNextShift?: boolean; + resetOnNextWorkingDay?: boolean; + effectiveUntil?: string | null; + utcCreated?: string; + managerUserId?: string; }; + diff --git a/src/lib/api/merchant/models/sellerPublicAggregateFullDto.ts b/src/lib/api/merchant/models/sellerPublicAggregateFullDto.ts index bc93453..09d79e9 100644 --- a/src/lib/api/merchant/models/sellerPublicAggregateFullDto.ts +++ b/src/lib/api/merchant/models/sellerPublicAggregateFullDto.ts @@ -2,21 +2,22 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { categoryCompositeDto } from "./categoryCompositeDto"; -import type { optionsRevisionDto } from "./optionsRevisionDto"; -import type { productCompositeDto } from "./productCompositeDto"; -import type { sellerCompositeDto } from "./sellerCompositeDto"; +import type { categoryCompositeDto } from './categoryCompositeDto'; +import type { optionsRevisionDto } from './optionsRevisionDto'; +import type { productCompositeDto } from './productCompositeDto'; +import type { sellerCompositeDto } from './sellerCompositeDto'; export type sellerPublicAggregateFullDto = { - /** - * The document type 'restaurant' or 'shop'. - */ - type?: string | null; - /** - * Identifier for the seller. - */ - id?: string; - seller: sellerCompositeDto; - products: Array | null; - options: Array | null; - categories: Array | null; + /** + * The document type 'restaurant' or 'shop'. + */ + type?: string | null; + /** + * Identifier for the seller. + */ + id?: string; + seller: sellerCompositeDto; + products: Array | null; + options: Array | null; + categories: Array | null; }; + diff --git a/src/lib/api/merchant/models/sellerQueryRequestDto.ts b/src/lib/api/merchant/models/sellerQueryRequestDto.ts index b2eb509..7d5ed92 100644 --- a/src/lib/api/merchant/models/sellerQueryRequestDto.ts +++ b/src/lib/api/merchant/models/sellerQueryRequestDto.ts @@ -6,12 +6,13 @@ * Request DTO for querying canonical sellers with various filter criteria. */ export type sellerQueryRequestDto = { - /** - * Number of records to skip for pagination. - */ - offset?: number; - /** - * Maximum number of sellers to return in a single query. - */ - limit?: number; + /** + * Number of records to skip for pagination. + */ + offset?: number; + /** + * Maximum number of sellers to return in a single query. + */ + limit?: number; }; + diff --git a/src/lib/api/merchant/models/sellerRevisionDto.ts b/src/lib/api/merchant/models/sellerRevisionDto.ts index 81cd245..e1e0568 100644 --- a/src/lib/api/merchant/models/sellerRevisionDto.ts +++ b/src/lib/api/merchant/models/sellerRevisionDto.ts @@ -2,58 +2,59 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; /** * Base class for seller data transfer objects, encapsulating common seller properties. * Restaurants, farms, shops and other merchants inherit this class. */ export type sellerRevisionDto = { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; - /** - * Unique identifier of this revision. - */ - revisionId?: string; - /** - * The id of the document this is a revision of. - */ - sellerId?: string; - /** - * The user who created this revision. - */ - creatorId?: string; - /** - * UTC timestamp when the seller was created. - */ - utcCreated?: string; - /** - * Flag indicating whether the seller is published and visible to the public. - */ - isPublished?: boolean; - /** - * UTC timestamp when the seller was published. - */ - utcPublished?: string | null; - /** - * Unique identifier of the user who published the seller. - */ - publisherId?: string | null; + /** + * Version number of the document. + */ + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; + /** + * Unique identifier of this revision. + */ + revisionId?: string; + /** + * The id of the document this is a revision of. + */ + sellerId?: string; + /** + * The user who created this revision. + */ + creatorId?: string; + /** + * UTC timestamp when the seller was created. + */ + utcCreated?: string; + /** + * Flag indicating whether the seller is published and visible to the public. + */ + isPublished?: boolean; + /** + * UTC timestamp when the seller was published. + */ + utcPublished?: string | null; + /** + * Unique identifier of the user who published the seller. + */ + publisherId?: string | null; }; + diff --git a/src/lib/api/merchant/models/sellerRevisionQueryRequestDto.ts b/src/lib/api/merchant/models/sellerRevisionQueryRequestDto.ts index 743adf3..4c64429 100644 --- a/src/lib/api/merchant/models/sellerRevisionQueryRequestDto.ts +++ b/src/lib/api/merchant/models/sellerRevisionQueryRequestDto.ts @@ -6,44 +6,45 @@ * Request DTO for querying sellers with various filter criteria. */ export type sellerRevisionQueryRequestDto = { - /** - * Primary filter - unique identifier of the seller document to query. - */ - documentId?: string | null; - /** - * Free text search filter that matches against seller's searchable fields. - */ - textSearch?: string | null; - /** - * Filter by the seller's Base58 public key identifier. - */ - sellerKey?: string | null; - /** - * Number of records to skip for pagination. - */ - offset?: number; - /** - * Maximum number of records to return in a single query. - */ - limit?: number; - /** - * Filter sellers created on or after this UTC datetime. - */ - utcCreatedFrom?: string | null; - /** - * Filter sellers created on or before this UTC datetime. - */ - utcCreatedTo?: string | null; - /** - * Filter by publication status. If null, returns both published and unpublished sellers. - */ - isPublished?: boolean | null; - /** - * Filter sellers by the ID of the user who published them. - */ - publishedByUserId?: string | null; - /** - * Filter sellers by exact creation datetime in UTC. - */ - utcCreated?: string | null; + /** + * Primary filter - unique identifier of the seller document to query. + */ + documentId?: string | null; + /** + * Free text search filter that matches against seller's searchable fields. + */ + textSearch?: string | null; + /** + * Filter by the seller's Base58 public key identifier. + */ + sellerKey?: string | null; + /** + * Number of records to skip for pagination. + */ + offset?: number; + /** + * Maximum number of records to return in a single query. + */ + limit?: number; + /** + * Filter sellers created on or after this UTC datetime. + */ + utcCreatedFrom?: string | null; + /** + * Filter sellers created on or before this UTC datetime. + */ + utcCreatedTo?: string | null; + /** + * Filter by publication status. If null, returns both published and unpublished sellers. + */ + isPublished?: boolean | null; + /** + * Filter sellers by the ID of the user who published them. + */ + publishedByUserId?: string | null; + /** + * Filter sellers by exact creation datetime in UTC. + */ + utcCreated?: string | null; }; + diff --git a/src/lib/api/merchant/models/sellerViewDto.ts b/src/lib/api/merchant/models/sellerViewDto.ts index df84a53..baa4791 100644 --- a/src/lib/api/merchant/models/sellerViewDto.ts +++ b/src/lib/api/merchant/models/sellerViewDto.ts @@ -2,47 +2,48 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { addressDto } from "./addressDto"; -import type { gpsLocationDto } from "./gpsLocationDto"; -import type { imageReferenceDto } from "./imageReferenceDto"; -import type { iTriggerDto } from "./iTriggerDto"; -import type { localizedTextDto } from "./localizedTextDto"; -import type { scheduleDto } from "./scheduleDto"; -import type { simpleContactDto } from "./simpleContactDto"; +import type { addressDto } from './addressDto'; +import type { gpsLocationDto } from './gpsLocationDto'; +import type { imageReferenceDto } from './imageReferenceDto'; +import type { iTriggerDto } from './iTriggerDto'; +import type { localizedTextDto } from './localizedTextDto'; +import type { scheduleDto } from './scheduleDto'; +import type { simpleContactDto } from './simpleContactDto'; export type sellerViewDto = { - /** - * Version number of the document. - */ - documentVersion?: number; - schedule?: scheduleDto; - address?: addressDto; - contactInfo?: simpleContactDto; - location?: gpsLocationDto; - /** - * A key value collection for storing additional information - */ - additional?: Record | null; - /** - * A list of image references. - */ - images?: Array | null; - /** - * Unique identifier of this revision. - */ - revisionId?: string; - /** - * The id of the document this is a revision of. - */ - sellerId?: string; - /** - * UTC timestamp when the seller was created. - */ - utcCreated?: string; - title?: localizedTextDto; - description?: localizedTextDto; - tagLine?: localizedTextDto; - /** - * The promotion ids for this seller. - */ - availabilityTriggers?: Array | null; + /** + * Version number of the document. + */ + documentVersion?: number; + schedule?: scheduleDto; + address?: addressDto; + contactInfo?: simpleContactDto; + location?: gpsLocationDto; + /** + * A key value collection for storing additional information + */ + additional?: Record | null; + /** + * A list of image references. + */ + images?: Array | null; + /** + * Unique identifier of this revision. + */ + revisionId?: string; + /** + * The id of the document this is a revision of. + */ + sellerId?: string; + /** + * UTC timestamp when the seller was created. + */ + utcCreated?: string; + title?: localizedTextDto; + description?: localizedTextDto; + tagLine?: localizedTextDto; + /** + * The promotion ids for this seller. + */ + availabilityTriggers?: Array | null; }; + diff --git a/src/lib/api/merchant/models/sessionIpResponseDto.ts b/src/lib/api/merchant/models/sessionIpResponseDto.ts index cffd0a4..070d969 100644 --- a/src/lib/api/merchant/models/sessionIpResponseDto.ts +++ b/src/lib/api/merchant/models/sessionIpResponseDto.ts @@ -6,8 +6,9 @@ * Response DTO for fetching the client's IP. */ export type sessionIpResponseDto = { - /** - * Gets or sets the web client's IP address. - */ - clientIp: string | null; + /** + * Gets or sets the web client's IP address. + */ + clientIp: string | null; }; + diff --git a/src/lib/api/merchant/models/sessionStatus.ts b/src/lib/api/merchant/models/sessionStatus.ts index 2a75a4d..86d2723 100644 --- a/src/lib/api/merchant/models/sessionStatus.ts +++ b/src/lib/api/merchant/models/sessionStatus.ts @@ -15,24 +15,24 @@ * */ export enum sessionStatus { - /** - * (value: "Pending") The session is pending authentication. - */ - Pending = "Pending", - /** - * (value: "Authenticated") The session has been authenticated. - */ - Authenticated = "Authenticated", - /** - * (value: "Used") The session has been used. - */ - Used = "Used", - /** - * (value: "Expired") The session has expired. - */ - Expired = "Expired", - /** - * (value: "Invalidated") The session has been invalidated. - */ - Invalidated = "Invalidated", + /** + * (value: "Pending") The session is pending authentication. + */ + Pending = 'Pending', + /** + * (value: "Authenticated") The session has been authenticated. + */ + Authenticated = 'Authenticated', + /** + * (value: "Used") The session has been used. + */ + Used = 'Used', + /** + * (value: "Expired") The session has expired. + */ + Expired = 'Expired', + /** + * (value: "Invalidated") The session has been invalidated. + */ + Invalidated = 'Invalidated', } diff --git a/src/lib/api/merchant/models/sessionStatusDto.ts b/src/lib/api/merchant/models/sessionStatusDto.ts index cbafc1c..a4c2dbc 100644 --- a/src/lib/api/merchant/models/sessionStatusDto.ts +++ b/src/lib/api/merchant/models/sessionStatusDto.ts @@ -2,22 +2,23 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { sessionStatus } from "./sessionStatus"; +import type { sessionStatus } from './sessionStatus'; /** * DTO for the session status. */ export type sessionStatusDto = { - /** - * Gets or sets the unique session identifier. - */ - sessionId: string | null; - status: sessionStatus; - /** - * Gets or sets the timestamp when the session was created. - */ - createdAt?: string; - /** - * Gets or sets the timestamp when the session expires. - */ - expiresAt?: string; + /** + * Gets or sets the unique session identifier. + */ + sessionId: string | null; + status: sessionStatus; + /** + * Gets or sets the timestamp when the session was created. + */ + createdAt?: string; + /** + * Gets or sets the timestamp when the session expires. + */ + expiresAt?: string; }; + diff --git a/src/lib/api/merchant/models/signedAuthDocumentDto.ts b/src/lib/api/merchant/models/signedAuthDocumentDto.ts index 230fed9..e76f632 100644 --- a/src/lib/api/merchant/models/signedAuthDocumentDto.ts +++ b/src/lib/api/merchant/models/signedAuthDocumentDto.ts @@ -2,15 +2,16 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { authDocumentDto } from "./authDocumentDto"; +import type { authDocumentDto } from './authDocumentDto'; /** * DTO for the authentication submission from the mobile app. * It bundles the auth document with its corresponding signature. */ export type signedAuthDocumentDto = { - document: authDocumentDto; - /** - * Gets or sets the base64 encoded signature of the auth document. - */ - signature: string | null; + document: authDocumentDto; + /** + * Gets or sets the base64 encoded signature of the auth document. + */ + signature: string | null; }; + diff --git a/src/lib/api/merchant/models/simpleContactDto.ts b/src/lib/api/merchant/models/simpleContactDto.ts index bf70bf0..bc3ab90 100644 --- a/src/lib/api/merchant/models/simpleContactDto.ts +++ b/src/lib/api/merchant/models/simpleContactDto.ts @@ -3,9 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type simpleContactDto = { - name?: string | null; - phone?: string | null; - email?: string | null; - notes?: string | null; - extra?: Record | null; + name?: string | null; + phone?: string | null; + email?: string | null; + notes?: string | null; + extra?: Record | null; }; + diff --git a/src/lib/api/merchant/models/startSessionResponseDto.ts b/src/lib/api/merchant/models/startSessionResponseDto.ts index 5370ab9..82729db 100644 --- a/src/lib/api/merchant/models/startSessionResponseDto.ts +++ b/src/lib/api/merchant/models/startSessionResponseDto.ts @@ -7,12 +7,13 @@ * Contains the one-time session ID and the client's IP address. */ export type startSessionResponseDto = { - /** - * Gets or sets the unique, unpredictable session identifier. - */ - sessionId: string | null; - /** - * Gets or sets the web client's IP address. - */ - clientIp: string | null; + /** + * Gets or sets the unique, unpredictable session identifier. + */ + sessionId: string | null; + /** + * Gets or sets the web client's IP address. + */ + clientIp: string | null; }; + diff --git a/src/lib/api/merchant/models/stopListTriggerDto.ts b/src/lib/api/merchant/models/stopListTriggerDto.ts index a4b5ef1..e300724 100644 --- a/src/lib/api/merchant/models/stopListTriggerDto.ts +++ b/src/lib/api/merchant/models/stopListTriggerDto.ts @@ -2,10 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type stopListTriggerDto = { - effect?: triggerEffect; - readonly type?: "stop_list" | null; - utcCreated?: string; - managerUserId?: string; + effect?: triggerEffect; + readonly type?: 'stop_list' | null; + utcCreated?: string; + managerUserId?: string; }; + diff --git a/src/lib/api/merchant/models/systemSecurityDto.ts b/src/lib/api/merchant/models/systemSecurityDto.ts index 95df2be..5a78a80 100644 --- a/src/lib/api/merchant/models/systemSecurityDto.ts +++ b/src/lib/api/merchant/models/systemSecurityDto.ts @@ -2,22 +2,23 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { rolePermissionsDto } from "./rolePermissionsDto"; +import type { rolePermissionsDto } from './rolePermissionsDto'; /** * Represents the system security configuration, including the mappings between roles and permissions * currently in use, as well as the complete set of available permissions and roles defined in the system. */ export type systemSecurityDto = { - /** - * The role-permission mappings that are currently active. - */ - inUse?: Array | null; - /** - * All available permissions in the system. - */ - permissions?: Array | null; - /** - * The currently defined roles in the system. - */ - roles?: Array | null; + /** + * The role-permission mappings that are currently active. + */ + inUse?: Array | null; + /** + * All available permissions in the system. + */ + permissions?: Array | null; + /** + * The currently defined roles in the system. + */ + roles?: Array | null; }; + diff --git a/src/lib/api/merchant/models/textQueryRequestDto.ts b/src/lib/api/merchant/models/textQueryRequestDto.ts index d10af65..391ef9a 100644 --- a/src/lib/api/merchant/models/textQueryRequestDto.ts +++ b/src/lib/api/merchant/models/textQueryRequestDto.ts @@ -3,15 +3,16 @@ /* tslint:disable */ /* eslint-disable */ export type textQueryRequestDto = { - documentId?: string | null; - key?: string | null; - containsText?: string | null; - lang?: string | null; - offset?: number; - limit?: number; - utcCreatedFrom?: string | null; - utcCreatedTo?: string | null; - isPublished?: boolean | null; - publishedByUserId?: string | null; - utcCreated?: string | null; + documentId?: string | null; + key?: string | null; + containsText?: string | null; + lang?: string | null; + offset?: number; + limit?: number; + utcCreatedFrom?: string | null; + utcCreatedTo?: string | null; + isPublished?: boolean | null; + publishedByUserId?: string | null; + utcCreated?: string | null; }; + diff --git a/src/lib/api/merchant/models/textRevisionDto.ts b/src/lib/api/merchant/models/textRevisionDto.ts index a0d6eaf..cd281a5 100644 --- a/src/lib/api/merchant/models/textRevisionDto.ts +++ b/src/lib/api/merchant/models/textRevisionDto.ts @@ -3,15 +3,16 @@ /* tslint:disable */ /* eslint-disable */ export type textRevisionDto = { - documentId?: string; - key?: string | null; - lang?: string | null; - value?: string | null; - revisionId?: string; - creatorId?: string; - utcCreated?: string; - isPublished?: boolean; - utcPublished?: string | null; - publisherId?: string | null; - additional?: Record | null; + documentId?: string; + key?: string | null; + lang?: string | null; + value?: string | null; + revisionId?: string; + creatorId?: string; + utcCreated?: string; + isPublished?: boolean; + utcPublished?: string | null; + publisherId?: string | null; + additional?: Record | null; }; + diff --git a/src/lib/api/merchant/models/timeRangeDto.ts b/src/lib/api/merchant/models/timeRangeDto.ts index 01daa3f..134dc5a 100644 --- a/src/lib/api/merchant/models/timeRangeDto.ts +++ b/src/lib/api/merchant/models/timeRangeDto.ts @@ -6,12 +6,13 @@ * Data transfer object for TimeRange. */ export type timeRangeDto = { - /** - * Gets or sets the start time. - */ - start?: string; - /** - * Gets or sets the end time. - */ - end?: string; + /** + * Gets or sets the start time. + */ + start?: string; + /** + * Gets or sets the end time. + */ + end?: string; }; + diff --git a/src/lib/api/merchant/models/timeTriggerDto.ts b/src/lib/api/merchant/models/timeTriggerDto.ts index f5e0f77..788bf81 100644 --- a/src/lib/api/merchant/models/timeTriggerDto.ts +++ b/src/lib/api/merchant/models/timeTriggerDto.ts @@ -2,16 +2,17 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { triggerEffect } from "./triggerEffect"; +import type { triggerEffect } from './triggerEffect'; export type timeTriggerDto = { - effect?: triggerEffect; - readonly type?: "time" | null; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - startTime: string; - /** - * A time value in 24-hour format (HH:mm:ss.FFFFFFF). - */ - endTime: string; + effect?: triggerEffect; + readonly type?: 'time' | null; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + startTime: string; + /** + * A time value in 24-hour format (HH:mm:ss.FFFFFFF). + */ + endTime: string; }; + diff --git a/src/lib/api/merchant/models/triggerEffect.ts b/src/lib/api/merchant/models/triggerEffect.ts index 3bc1176..92561a0 100644 --- a/src/lib/api/merchant/models/triggerEffect.ts +++ b/src/lib/api/merchant/models/triggerEffect.ts @@ -12,20 +12,20 @@ * */ export enum triggerEffect { - /** - * (value: 0) No effect. The trigger does not influence the document in any way. - */ - None = 0, - /** - * (value: 1) The trigger affects availability of the document. - */ - SetUnavailable = 1, - /** - * (value: 2) The trigger affects visibility of the document. - */ - SetInvisible = 2, - /** - * (value: 4) The trigger can stop the document. - */ - SetStopped = 4, + /** + * (value: 0) No effect. The trigger does not influence the document in any way. + */ + None = 0, + /** + * (value: 1) The trigger affects availability of the document. + */ + SetUnavailable = 1, + /** + * (value: 2) The trigger affects visibility of the document. + */ + SetInvisible = 2, + /** + * (value: 4) The trigger can stop the document. + */ + SetStopped = 4, } diff --git a/src/lib/api/merchant/models/updatePermissionsRequest.ts b/src/lib/api/merchant/models/updatePermissionsRequest.ts index fc57a3f..85ceedb 100644 --- a/src/lib/api/merchant/models/updatePermissionsRequest.ts +++ b/src/lib/api/merchant/models/updatePermissionsRequest.ts @@ -6,16 +6,17 @@ * Represents a request to update permissions by either adding or removing a specific permission for a given role. */ export type updatePermissionsRequest = { - /** - * Gets or sets the role for which the permission update is requested. - */ - role?: string; - /** - * Gets or sets the permission that is to be added or removed. - */ - permission?: string; - /** - * Gets or sets a value indicating whether the permission is to be added (true) or removed (false). - */ - isAdd?: boolean; + /** + * Gets or sets the role for which the permission update is requested. + */ + role?: string; + /** + * Gets or sets the permission that is to be added or removed. + */ + permission?: string; + /** + * Gets or sets a value indicating whether the permission is to be added (true) or removed (false). + */ + isAdd?: boolean; }; + diff --git a/src/lib/api/merchant/models/userDto.ts b/src/lib/api/merchant/models/userDto.ts index abc7c56..0ca834c 100644 --- a/src/lib/api/merchant/models/userDto.ts +++ b/src/lib/api/merchant/models/userDto.ts @@ -2,52 +2,53 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { verifiedValueDto } from "./verifiedValueDto"; +import type { verifiedValueDto } from './verifiedValueDto'; /** * Represents a user data transfer object (DTO) containing user details and associated metadata. */ export type userDto = { - /** - * Gets or sets the unique identifier for the user. - */ - id?: string; - /** - * Gets or sets the remote identifier for the user, typically used for external references. - */ - remoteId?: string | null; - /** - * Gets or sets the user's name. - */ - name?: string | null; - /** - * Gets or sets the URL of the user's avatar image. - */ - avatarUrl?: string | null; - /** - * Gets or sets the public key associated with the user, if applicable. - */ - publicKey?: string | null; - email?: verifiedValueDto; - phoneNumber?: verifiedValueDto; - /** - * Gets or sets the set of roles assigned to the user. - * Roles are generally set by the authority server. - */ - roles?: Array | null; - /** - * Gets or sets a value indicating whether the user has been verified. - */ - isVerified?: boolean; - /** - * Gets or sets the Url of the authority that manages the user, if applicable. - */ - authorityUrl?: string | null; - /** - * Gets or sets the UTC date and time when the user information was last updated. - */ - utcUpdated?: string; - /** - * Gets or sets a dictionary for storing additional key-value pairs related to the user. - */ - extraKeys?: Record | null; + /** + * Gets or sets the unique identifier for the user. + */ + id?: string; + /** + * Gets or sets the remote identifier for the user, typically used for external references. + */ + remoteId?: string | null; + /** + * Gets or sets the user's name. + */ + name?: string | null; + /** + * Gets or sets the URL of the user's avatar image. + */ + avatarUrl?: string | null; + /** + * Gets or sets the public key associated with the user, if applicable. + */ + publicKey?: string | null; + email?: verifiedValueDto; + phoneNumber?: verifiedValueDto; + /** + * Gets or sets the set of roles assigned to the user. + * Roles are generally set by the authority server. + */ + roles?: Array | null; + /** + * Gets or sets a value indicating whether the user has been verified. + */ + isVerified?: boolean; + /** + * Gets or sets the Url of the authority that manages the user, if applicable. + */ + authorityUrl?: string | null; + /** + * Gets or sets the UTC date and time when the user information was last updated. + */ + utcUpdated?: string; + /** + * Gets or sets a dictionary for storing additional key-value pairs related to the user. + */ + extraKeys?: Record | null; }; + diff --git a/src/lib/api/merchant/models/userQueryRequest.ts b/src/lib/api/merchant/models/userQueryRequest.ts index d87182c..b55494b 100644 --- a/src/lib/api/merchant/models/userQueryRequest.ts +++ b/src/lib/api/merchant/models/userQueryRequest.ts @@ -3,28 +3,29 @@ /* tslint:disable */ /* eslint-disable */ export type userQueryRequest = { - /** - * Search for users where any searchable property contains this text. - */ - searchText?: string | null; - /** - * Search for users where the name contains this text. - */ - nameContains?: string | null; - /** - * Comma separated list of roles. The user must have all of these roles. - */ - hasAnyRole?: string | null; - /** - * Comma separated list of roles. The user must have any of these roles. - */ - hasAllRole?: string | null; - /** - * If not specified, defaults to 0. - */ - offset?: number; - /** - * If not specified, defaults to 20. - */ - limit?: number; + /** + * Search for users where any searchable property contains this text. + */ + searchText?: string | null; + /** + * Search for users where the name contains this text. + */ + nameContains?: string | null; + /** + * Comma separated list of roles. The user must have all of these roles. + */ + hasAnyRole?: string | null; + /** + * Comma separated list of roles. The user must have any of these roles. + */ + hasAllRole?: string | null; + /** + * If not specified, defaults to 0. + */ + offset?: number; + /** + * If not specified, defaults to 20. + */ + limit?: number; }; + diff --git a/src/lib/api/merchant/models/verifiedValueDto.ts b/src/lib/api/merchant/models/verifiedValueDto.ts index 633d1b1..6bbbac3 100644 --- a/src/lib/api/merchant/models/verifiedValueDto.ts +++ b/src/lib/api/merchant/models/verifiedValueDto.ts @@ -6,16 +6,17 @@ * Represents a value that has been verified by a trusted source. */ export type verifiedValueDto = { - /** - * The value being trusted, such as a phone number or email address. - */ - value?: string | null; - /** - * When this document was last updated. - */ - utcUpdated?: string; - /** - * The verification status of this value. - */ - isVerified?: boolean; + /** + * The value being trusted, such as a phone number or email address. + */ + value?: string | null; + /** + * When this document was last updated. + */ + utcUpdated?: string; + /** + * The verification status of this value. + */ + isVerified?: boolean; }; + diff --git a/src/lib/api/merchant/models/versionCheck.ts b/src/lib/api/merchant/models/versionCheck.ts index 06aaa2f..8ac014f 100644 --- a/src/lib/api/merchant/models/versionCheck.ts +++ b/src/lib/api/merchant/models/versionCheck.ts @@ -11,16 +11,16 @@ * */ export enum versionCheck { - /** - * (value: 0) - */ - Ok = 0, - /** - * (value: 100) - */ - Old = 100, - /** - * (value: 200) - */ - Incompatible = 200, + /** + * (value: 0) + */ + Ok = 0, + /** + * (value: 100) + */ + Old = 100, + /** + * (value: 200) + */ + Incompatible = 200, } diff --git a/src/lib/api/merchant/services/AiService.ts b/src/lib/api/merchant/services/AiService.ts index a8d0dcb..19cf399 100644 --- a/src/lib/api/merchant/services/AiService.ts +++ b/src/lib/api/merchant/services/AiService.ts @@ -2,30 +2,30 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class AiService { - /** - * Serves MCP JSON‑RPC requests for the MCP SSE server - * @returns any OK - * @throws ApiError - */ - public static postMcpMessage(): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/mcp/message", - }); - } - /** - * Serves SSE connections for the MCP SSE server - * @returns any OK - * @throws ApiError - */ - public static getMcpSse(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/mcp/sse", - }); - } + /** + * Serves MCP JSON‑RPC requests for the MCP SSE server + * @returns any OK + * @throws ApiError + */ + public static postMcpMessage(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/mcp/message', + }); + } + /** + * Serves SSE connections for the MCP SSE server + * @returns any OK + * @throws ApiError + */ + public static getMcpSse(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/mcp/sse', + }); + } } diff --git a/src/lib/api/merchant/services/AuthenticationService.ts b/src/lib/api/merchant/services/AuthenticationService.ts index dd1e135..44f2a83 100644 --- a/src/lib/api/merchant/services/AuthenticationService.ts +++ b/src/lib/api/merchant/services/AuthenticationService.ts @@ -2,131 +2,131 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { authenticationResultDto } from "../models/authenticationResultDto"; -import type { authHeaderResponseDto } from "../models/authHeaderResponseDto"; -import type { sessionIpResponseDto } from "../models/sessionIpResponseDto"; -import type { sessionStatusDto } from "../models/sessionStatusDto"; -import type { signedAuthDocumentDto } from "../models/signedAuthDocumentDto"; -import type { startSessionResponseDto } from "../models/startSessionResponseDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { authenticationResultDto } from '../models/authenticationResultDto'; +import type { authHeaderResponseDto } from '../models/authHeaderResponseDto'; +import type { sessionIpResponseDto } from '../models/sessionIpResponseDto'; +import type { sessionStatusDto } from '../models/sessionStatusDto'; +import type { signedAuthDocumentDto } from '../models/signedAuthDocumentDto'; +import type { startSessionResponseDto } from '../models/startSessionResponseDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class AuthenticationService { - /** - * Create a new QR authentication session. - * This endpoint creates a new authentication session for QR-based authentication. - * It generates a unique session ID and records the client's IP address. - * The web client uses this information to generate a QR code that can be scanned by a mobile app. - * @returns startSessionResponseDto OK - * @throws ApiError - */ - public static postApiAuthQrSession(): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/auth/qr/session", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Get the client IP address for a session. - * This endpoint is used by the mobile app after scanning a QR code. - * It retrieves the client IP address associated with the session ID. - * The mobile app uses this IP address when creating the authentication document. - * @returns sessionIpResponseDto OK - * @throws ApiError - */ - public static getApiAuthQrSessionIp({ - sessionId, - }: { - sessionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/auth/qr/session/{sessionId}/ip", - path: { - sessionId: sessionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the status of a QR authentication session. - * This endpoint allows the web client to poll for the status of an authentication session. - * It returns the current state of the session (pending, authenticated, expired, or invalidated). - * The web client uses this to detect when the mobile app completes authentication. - * @returns sessionStatusDto OK - * @throws ApiError - */ - public static getApiAuthQrSessionStatus({ - sessionId, - }: { - sessionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/auth/qr/session/{sessionId}/status", - path: { - sessionId: sessionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the authentication header for a QR authentication session. - * This endpoint allows the web client to poll for the authentication header of a session. - * It returns the X-Signed-Auth header value that can be used to authenticate requests. - * The web client uses this to make authenticated requests after the mobile app completes authentication. - * @returns authHeaderResponseDto OK - * @throws ApiError - */ - public static getApiAuthQrSessionHeader({ - sessionId, - }: { - sessionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/auth/qr/session/{sessionId}/header", - path: { - sessionId: sessionId, - }, - errors: { - 400: `Bad Request`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }); - } - /** - * Authenticate with a signed authentication document. - * This endpoint accepts a signed authentication document from the mobile app. - * It verifies the signature, checks that the client IP matches, and validates the document's validity period. - * Upon successful verification, it marks the session as authenticated and returns a success result. - * @returns authenticationResultDto OK - * @throws ApiError - */ - public static postApiAuthQrAuthenticate({ - requestBody, - }: { - requestBody?: signedAuthDocumentDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/auth/qr/authenticate", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Create a new QR authentication session. + * This endpoint creates a new authentication session for QR-based authentication. + * It generates a unique session ID and records the client's IP address. + * The web client uses this information to generate a QR code that can be scanned by a mobile app. + * @returns startSessionResponseDto OK + * @throws ApiError + */ + public static postApiAuthQrSession(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/auth/qr/session', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Get the client IP address for a session. + * This endpoint is used by the mobile app after scanning a QR code. + * It retrieves the client IP address associated with the session ID. + * The mobile app uses this IP address when creating the authentication document. + * @returns sessionIpResponseDto OK + * @throws ApiError + */ + public static getApiAuthQrSessionIp({ + sessionId, + }: { + sessionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/auth/qr/session/{sessionId}/ip', + path: { + 'sessionId': sessionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the status of a QR authentication session. + * This endpoint allows the web client to poll for the status of an authentication session. + * It returns the current state of the session (pending, authenticated, expired, or invalidated). + * The web client uses this to detect when the mobile app completes authentication. + * @returns sessionStatusDto OK + * @throws ApiError + */ + public static getApiAuthQrSessionStatus({ + sessionId, + }: { + sessionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/auth/qr/session/{sessionId}/status', + path: { + 'sessionId': sessionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the authentication header for a QR authentication session. + * This endpoint allows the web client to poll for the authentication header of a session. + * It returns the X-Signed-Auth header value that can be used to authenticate requests. + * The web client uses this to make authenticated requests after the mobile app completes authentication. + * @returns authHeaderResponseDto OK + * @throws ApiError + */ + public static getApiAuthQrSessionHeader({ + sessionId, + }: { + sessionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/auth/qr/session/{sessionId}/header', + path: { + 'sessionId': sessionId, + }, + errors: { + 400: `Bad Request`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * Authenticate with a signed authentication document. + * This endpoint accepts a signed authentication document from the mobile app. + * It verifies the signature, checks that the client IP matches, and validates the document's validity period. + * Upon successful verification, it marks the session as authenticated and returns a success result. + * @returns authenticationResultDto OK + * @throws ApiError + */ + public static postApiAuthQrAuthenticate({ + requestBody, + }: { + requestBody?: signedAuthDocumentDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/auth/qr/authenticate', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/CategoriesCanonicalService.ts b/src/lib/api/merchant/services/CategoriesCanonicalService.ts index 0f9f590..5cff1d3 100644 --- a/src/lib/api/merchant/services/CategoriesCanonicalService.ts +++ b/src/lib/api/merchant/services/CategoriesCanonicalService.ts @@ -2,187 +2,187 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { categoryDto } from "../models/categoryDto"; -import type { categoryQueryRequestDto } from "../models/categoryQueryRequestDto"; -import type { categoryStopListDto } from "../models/categoryStopListDto"; -import type { createCategoryDto } from "../models/createCategoryDto"; -import type { QueryResultDto_CategoryDto_ } from "../models/QueryResultDto_CategoryDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { categoryDto } from '../models/categoryDto'; +import type { categoryQueryRequestDto } from '../models/categoryQueryRequestDto'; +import type { categoryStopListDto } from '../models/categoryStopListDto'; +import type { createCategoryDto } from '../models/createCategoryDto'; +import type { QueryResultDto_CategoryDto_ } from '../models/QueryResultDto_CategoryDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class CategoriesCanonicalService { - /** - * Create a canonical category entry. - * @returns categoryDto OK - * @throws ApiError - */ - public static postApiCategoryCanonical({ - requestBody, - }: { - requestBody: createCategoryDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/canonical", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Retrieve a canonical category entry. - * @returns categoryDto OK - * @throws ApiError - */ - public static getApiCategoryCanonical({ - categoryId, - }: { - categoryId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/category/canonical/{categoryId}", - path: { - categoryId: categoryId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Update a canonical category entry. - * @returns any OK - * @throws ApiError - */ - public static putApiCategoryCanonical({ - categoryId, - requestBody, - }: { - categoryId: string; - requestBody: createCategoryDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/category/canonical/{categoryId}", - path: { - categoryId: categoryId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Delete a canonical category entry. - * @returns any OK - * @throws ApiError - */ - public static deleteApiCategoryCanonical({ - categoryId, - }: { - categoryId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/category/canonical/{categoryId}", - path: { - categoryId: categoryId, - }, - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Query canonical category data filtered by options. - * @returns QueryResultDto_CategoryDto_ OK - * @throws ApiError - */ - public static postApiCategoryCanonicalQuery({ - requestBody, - }: { - requestBody: categoryQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/canonical/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Adds multiple categories to the 'stop list'. - * Items on the 'stop list' are not available for purchase. - * @returns any OK - * @throws ApiError - */ - public static postApiCategoryCanonicalStopList({ - requestBody, - }: { - requestBody: categoryStopListDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/canonical/stop-list", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Removes multiple categories from the 'stop list'. - * @returns any OK - * @throws ApiError - */ - public static deleteApiCategoryCanonicalStopList({ - requestBody, - }: { - requestBody: categoryStopListDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/category/canonical/stop-list", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Gets the list of stopped category ids for a specific seller. - * @returns string OK - * @throws ApiError - */ - public static getApiCategoryCanonicalStopList({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise> { - return __request(OpenAPI, { - method: "GET", - url: "/api/category/canonical/stop-list/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Create a canonical category entry. + * @returns categoryDto OK + * @throws ApiError + */ + public static postApiCategoryCanonical({ + requestBody, + }: { + requestBody: createCategoryDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/canonical', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Retrieve a canonical category entry. + * @returns categoryDto OK + * @throws ApiError + */ + public static getApiCategoryCanonical({ + categoryId, + }: { + categoryId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/category/canonical/{categoryId}', + path: { + 'categoryId': categoryId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Update a canonical category entry. + * @returns any OK + * @throws ApiError + */ + public static putApiCategoryCanonical({ + categoryId, + requestBody, + }: { + categoryId: string, + requestBody: createCategoryDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/category/canonical/{categoryId}', + path: { + 'categoryId': categoryId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Delete a canonical category entry. + * @returns any OK + * @throws ApiError + */ + public static deleteApiCategoryCanonical({ + categoryId, + }: { + categoryId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/category/canonical/{categoryId}', + path: { + 'categoryId': categoryId, + }, + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Query canonical category data filtered by options. + * @returns QueryResultDto_CategoryDto_ OK + * @throws ApiError + */ + public static postApiCategoryCanonicalQuery({ + requestBody, + }: { + requestBody: categoryQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/canonical/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Adds multiple categories to the 'stop list'. + * Items on the 'stop list' are not available for purchase. + * @returns any OK + * @throws ApiError + */ + public static postApiCategoryCanonicalStopList({ + requestBody, + }: { + requestBody: categoryStopListDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/canonical/stop-list', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Removes multiple categories from the 'stop list'. + * @returns any OK + * @throws ApiError + */ + public static deleteApiCategoryCanonicalStopList({ + requestBody, + }: { + requestBody: categoryStopListDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/category/canonical/stop-list', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Gets the list of stopped category ids for a specific seller. + * @returns string OK + * @throws ApiError + */ + public static getApiCategoryCanonicalStopList({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/category/canonical/stop-list/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/CategoriesRevisionsService.ts b/src/lib/api/merchant/services/CategoriesRevisionsService.ts index e38d396..fffe193 100644 --- a/src/lib/api/merchant/services/CategoriesRevisionsService.ts +++ b/src/lib/api/merchant/services/CategoriesRevisionsService.ts @@ -2,147 +2,147 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { categoryRevisionDto } from "../models/categoryRevisionDto"; -import type { categoryRevisionQueryRequestDto } from "../models/categoryRevisionQueryRequestDto"; -import type { categoryViewDto } from "../models/categoryViewDto"; -import type { createCategoryRevisionDto } from "../models/createCategoryRevisionDto"; -import type { QueryResultDto_CategoryRevisionDto_ } from "../models/QueryResultDto_CategoryRevisionDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { categoryRevisionDto } from '../models/categoryRevisionDto'; +import type { categoryRevisionQueryRequestDto } from '../models/categoryRevisionQueryRequestDto'; +import type { categoryViewDto } from '../models/categoryViewDto'; +import type { createCategoryRevisionDto } from '../models/createCategoryRevisionDto'; +import type { QueryResultDto_CategoryRevisionDto_ } from '../models/QueryResultDto_CategoryRevisionDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class CategoriesRevisionsService { - /** - * Creates a revision of a category document. - * @returns categoryRevisionDto OK - * @throws ApiError - */ - public static postApiCategoryRevision({ - categoryId, - requestBody, - }: { - categoryId: string; - requestBody: createCategoryRevisionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/revision/{categoryId}", - path: { - categoryId: categoryId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the currently published category - * @returns categoryViewDto OK - * @throws ApiError - */ - public static getApiCategoryRevisionPublished({ - categoryId, - }: { - categoryId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/category/revision/published/{categoryId}", - path: { - categoryId: categoryId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get a specific revision - * @returns categoryRevisionDto OK - * @throws ApiError - */ - public static getApiCategoryRevision({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/category/revision/{revisionId}", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Query revisions filtered by options. - * @returns QueryResultDto_CategoryRevisionDto_ OK - * @throws ApiError - */ - public static postApiCategoryRevisionQuery({ - requestBody, - }: { - requestBody: categoryRevisionQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/revision/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Publish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiCategoryRevisionPublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/category/revision/{revisionId}/publish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Unpublish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiCategoryRevisionUnpublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/category/revision/{revisionId}/unpublish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Creates a revision of a category document. + * @returns categoryRevisionDto OK + * @throws ApiError + */ + public static postApiCategoryRevision({ + categoryId, + requestBody, + }: { + categoryId: string, + requestBody: createCategoryRevisionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/revision/{categoryId}', + path: { + 'categoryId': categoryId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the currently published category + * @returns categoryViewDto OK + * @throws ApiError + */ + public static getApiCategoryRevisionPublished({ + categoryId, + }: { + categoryId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/category/revision/published/{categoryId}', + path: { + 'categoryId': categoryId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get a specific revision + * @returns categoryRevisionDto OK + * @throws ApiError + */ + public static getApiCategoryRevision({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/category/revision/{revisionId}', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Query revisions filtered by options. + * @returns QueryResultDto_CategoryRevisionDto_ OK + * @throws ApiError + */ + public static postApiCategoryRevisionQuery({ + requestBody, + }: { + requestBody: categoryRevisionQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/revision/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Publish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiCategoryRevisionPublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/category/revision/{revisionId}/publish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Unpublish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiCategoryRevisionUnpublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/category/revision/{revisionId}/unpublish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/CategoriesViewsService.ts b/src/lib/api/merchant/services/CategoriesViewsService.ts index 19cfcae..99696a0 100644 --- a/src/lib/api/merchant/services/CategoriesViewsService.ts +++ b/src/lib/api/merchant/services/CategoriesViewsService.ts @@ -2,74 +2,74 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { categoryCompositeDto } from "../models/categoryCompositeDto"; -import type { categoryQueryRequestDto } from "../models/categoryQueryRequestDto"; -import type { categoryRevisionQueryRequestDto } from "../models/categoryRevisionQueryRequestDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { categoryCompositeDto } from '../models/categoryCompositeDto'; +import type { categoryQueryRequestDto } from '../models/categoryQueryRequestDto'; +import type { categoryRevisionQueryRequestDto } from '../models/categoryRevisionQueryRequestDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class CategoriesViewsService { - /** - * Get the published category composite view - * This view combines the canonical, revision and text models into a single view model. - * @returns categoryCompositeDto OK - * @throws ApiError - */ - public static getApiCategoryComposite({ - categoryId, - }: { - categoryId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/category/composite/{categoryId}", - path: { - categoryId: categoryId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * @returns categoryCompositeDto OK - * @throws ApiError - */ - public static postApiCategoryCompositeQueryByCanonical({ - requestBody, - }: { - requestBody: categoryQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/composite/query/by-canonical", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * @returns categoryCompositeDto OK - * @throws ApiError - */ - public static postApiCategoryCompositeQueryByRevision({ - requestBody, - }: { - requestBody: categoryRevisionQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/category/composite/query/by-revision", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Get the published category composite view + * This view combines the canonical, revision and text models into a single view model. + * @returns categoryCompositeDto OK + * @throws ApiError + */ + public static getApiCategoryComposite({ + categoryId, + }: { + categoryId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/category/composite/{categoryId}', + path: { + 'categoryId': categoryId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * @returns categoryCompositeDto OK + * @throws ApiError + */ + public static postApiCategoryCompositeQueryByCanonical({ + requestBody, + }: { + requestBody: categoryQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/composite/query/by-canonical', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * @returns categoryCompositeDto OK + * @throws ApiError + */ + public static postApiCategoryCompositeQueryByRevision({ + requestBody, + }: { + requestBody: categoryRevisionQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/category/composite/query/by-revision', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/DeliveriesService.ts b/src/lib/api/merchant/services/DeliveriesService.ts index c758a08..3acf212 100644 --- a/src/lib/api/merchant/services/DeliveriesService.ts +++ b/src/lib/api/merchant/services/DeliveriesService.ts @@ -2,81 +2,81 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { priceEstimationDto } from "../models/priceEstimationDto"; -import type { priceEstimationRequestDto } from "../models/priceEstimationRequestDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { priceEstimationDto } from '../models/priceEstimationDto'; +import type { priceEstimationRequestDto } from '../models/priceEstimationRequestDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class DeliveriesService { - /** - * Create a guest delivery link. - * This endpoint will create a guest delivery link for supplied order on the DSP-o application. - * The link is usually converted to a QR code and scanned in by the prospective driver. - * The 'link-code' contained in the url allows that driver to accept an order as a 'guest courier' - * @returns string OK - * @throws ApiError - */ - public static getApiDeliveryCourierGuestLink({ - orderId, - }: { - orderId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/delivery/courier-guest/link/{orderId}", - path: { - orderId: orderId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get price estimations for delivery. - * This endpoint returns price estimations for a delivery based on the provided locations and scheduled time. - * It requires at least two locations (pickup and delivery) to calculate the price. - * @returns priceEstimationDto OK - * @throws ApiError - */ - public static postApiDeliveryPriceEstimation({ - requestBody, - }: { - requestBody: priceEstimationRequestDto; - }): CancelablePromise> { - return __request(OpenAPI, { - method: "POST", - url: "/api/delivery/price-estimation", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Get driver link for an order. - * This endpoint returns a driver link for the specified order. The link can be used by a driver to accept the order. - * @returns string OK - * @throws ApiError - */ - public static getApiDeliveryDriverLink({ - orderId, - }: { - orderId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/delivery/driver-link/{orderId}", - path: { - orderId: orderId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create a guest delivery link. + * This endpoint will create a guest delivery link for supplied order on the DSP-o application. + * The link is usually converted to a QR code and scanned in by the prospective driver. + * The 'link-code' contained in the url allows that driver to accept an order as a 'guest courier' + * @returns string OK + * @throws ApiError + */ + public static getApiDeliveryCourierGuestLink({ + orderId, + }: { + orderId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/delivery/courier-guest/link/{orderId}', + path: { + 'orderId': orderId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get price estimations for delivery. + * This endpoint returns price estimations for a delivery based on the provided locations and scheduled time. + * It requires at least two locations (pickup and delivery) to calculate the price. + * @returns priceEstimationDto OK + * @throws ApiError + */ + public static postApiDeliveryPriceEstimation({ + requestBody, + }: { + requestBody: priceEstimationRequestDto, + }): CancelablePromise> { + return __request(OpenAPI, { + method: 'POST', + url: '/api/delivery/price-estimation', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Get driver link for an order. + * This endpoint returns a driver link for the specified order. The link can be used by a driver to accept the order. + * @returns string OK + * @throws ApiError + */ + public static getApiDeliveryDriverLink({ + orderId, + }: { + orderId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/delivery/driver-link/{orderId}', + path: { + 'orderId': orderId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/ImagesService.ts b/src/lib/api/merchant/services/ImagesService.ts index b5758a8..ebba146 100644 --- a/src/lib/api/merchant/services/ImagesService.ts +++ b/src/lib/api/merchant/services/ImagesService.ts @@ -3,99 +3,99 @@ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ImagesService { - /** - * Uploads an asset to storage. - * This endpoint expects multipart/form-data with two keyed items: - * 'json' = The JSON parameters of type 'ImageParametersDto' - * 'image' = The image - * @returns any OK - * @throws ApiError - */ - public static postApiImageUpload({ - formData, - }: { - formData: any; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/image/upload", - formData: formData, - mediaType: "multipart/form-data", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Download an image by its digest - * When supplied a valid base58 encoded digest, this endpoint will return the image associated with that id as a file download. - * The response will be a file download with the correct content type. - * The file name will be the digest with the correct extension. - * @returns string OK - * @throws ApiError - */ - public static getImg({ - digest, - }: { /** - * This is a base58 encoded digest, a unique identifier for the image. + * Uploads an asset to storage. + * This endpoint expects multipart/form-data with two keyed items: + * 'json' = The JSON parameters of type 'ImageParametersDto' + * 'image' = The image + * @returns any OK + * @throws ApiError */ - digest: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/img/{digest}", - path: { - digest: digest, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Download a resized image by digest - * When supplied a valid base58 encoded digest, this endpoint will return the image associated with that id as a file download. - * The response will be a file download with the correct content type. - * The file name will be the digest with the correct extension. - * @returns string OK - * @throws ApiError - */ - public static getImg1({ - digest, - aspect, - size, - }: { + public static postApiImageUpload({ + formData, + }: { + formData: any, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/image/upload', + formData: formData, + mediaType: 'multipart/form-data', + errors: { + 400: `Bad Request`, + }, + }); + } /** - * This is a base58 encoded digest, a unique identifier for the image. + * Download an image by its digest + * When supplied a valid base58 encoded digest, this endpoint will return the image associated with that id as a file download. + * The response will be a file download with the correct content type. + * The file name will be the digest with the correct extension. + * @returns string OK + * @throws ApiError */ - digest: string; + public static getImg({ + digest, + }: { + /** + * This is a base58 encoded digest, a unique identifier for the image. + */ + digest: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/img/{digest}', + path: { + 'digest': digest, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } /** - * This must be set: [landscape, square, portrait] + * Download a resized image by digest + * When supplied a valid base58 encoded digest, this endpoint will return the image associated with that id as a file download. + * The response will be a file download with the correct content type. + * The file name will be the digest with the correct extension. + * @returns string OK + * @throws ApiError */ - aspect: string; - /** - * This must be set: [XS, S, M, HD, FHD, QHD, UHD] - */ - size: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/img/{digest}/{aspect}/{size}", - path: { - digest: digest, - aspect: aspect, - size: size, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + public static getImg1({ + digest, + aspect, + size, + }: { + /** + * This is a base58 encoded digest, a unique identifier for the image. + */ + digest: string, + /** + * This must be set: [landscape, square, portrait] + */ + aspect: string, + /** + * This must be set: [XS, S, M, HD, FHD, QHD, UHD] + */ + size: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/img/{digest}/{aspect}/{size}', + path: { + 'digest': digest, + 'aspect': aspect, + 'size': size, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/OidcService.ts b/src/lib/api/merchant/services/OidcService.ts index c7409af..3c1d99e 100644 --- a/src/lib/api/merchant/services/OidcService.ts +++ b/src/lib/api/merchant/services/OidcService.ts @@ -2,43 +2,43 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { oidcConnectResponseDto } from "../models/oidcConnectResponseDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { oidcConnectResponseDto } from '../models/oidcConnectResponseDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class OidcService { - /** - * Returns OIDC information - * Returns OIDC information for the standard OIDC application client, this information is used to enable clients to connect to the correct OIDC endpoint. - * @returns oidcConnectResponseDto OK - * @throws ApiError - */ - public static getOidcJson(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/oidc.json", - }); - } - /** - * Returns OIDC information by application type - * Returns OIDC information for the given application client type, this information is used to enable clients to connect to the correct OIDC endpoint. - * @returns oidcConnectResponseDto OK - * @throws ApiError - */ - public static getOidcJson1({ - appType, - }: { /** - * Application type (eg: "native" would be native mobile apps). + * Returns OIDC information + * Returns OIDC information for the standard OIDC application client, this information is used to enable clients to connect to the correct OIDC endpoint. + * @returns oidcConnectResponseDto OK + * @throws ApiError */ - appType: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/oidc-{appType}.json", - path: { - appType: appType, - }, - }); - } + public static getOidcJson(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/oidc.json', + }); + } + /** + * Returns OIDC information by application type + * Returns OIDC information for the given application client type, this information is used to enable clients to connect to the correct OIDC endpoint. + * @returns oidcConnectResponseDto OK + * @throws ApiError + */ + public static getOidcJson1({ + appType, + }: { + /** + * Application type (eg: "native" would be native mobile apps). + */ + appType: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/oidc-{appType}.json', + path: { + 'appType': appType, + }, + }); + } } diff --git a/src/lib/api/merchant/services/OrdersBasketService.ts b/src/lib/api/merchant/services/OrdersBasketService.ts index 5870e4f..df2b4c0 100644 --- a/src/lib/api/merchant/services/OrdersBasketService.ts +++ b/src/lib/api/merchant/services/OrdersBasketService.ts @@ -2,30 +2,30 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { basketDto } from "../models/basketDto"; -import type { calculatedCheckoutDto } from "../models/calculatedCheckoutDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { basketDto } from '../models/basketDto'; +import type { calculatedCheckoutDto } from '../models/calculatedCheckoutDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class OrdersBasketService { - /** - * @returns calculatedCheckoutDto OK - * @throws ApiError - */ - public static postApiOrderBasketCalculate({ - requestBody, - }: { - requestBody: basketDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/order/basket/calculate", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * @returns calculatedCheckoutDto OK + * @throws ApiError + */ + public static postApiOrderBasketCalculate({ + requestBody, + }: { + requestBody: basketDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/order/basket/calculate', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/OrdersService.ts b/src/lib/api/merchant/services/OrdersService.ts index 13327c2..13da581 100644 --- a/src/lib/api/merchant/services/OrdersService.ts +++ b/src/lib/api/merchant/services/OrdersService.ts @@ -2,227 +2,227 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { orderCreateDto } from "../models/orderCreateDto"; -import type { orderDto } from "../models/orderDto"; -import type { orderFailureRequestDto } from "../models/orderFailureRequestDto"; -import type { orderNextStatusDto } from "../models/orderNextStatusDto"; -import type { orderQueryRequestDto } from "../models/orderQueryRequestDto"; -import type { orderStateChangeRequestDto } from "../models/orderStateChangeRequestDto"; -import type { orderStateDto } from "../models/orderStateDto"; -import type { orderViewDto } from "../models/orderViewDto"; -import type { QueryResultDto_OrderViewDto_ } from "../models/QueryResultDto_OrderViewDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { orderCreateDto } from '../models/orderCreateDto'; +import type { orderDto } from '../models/orderDto'; +import type { orderFailureRequestDto } from '../models/orderFailureRequestDto'; +import type { orderNextStatusDto } from '../models/orderNextStatusDto'; +import type { orderQueryRequestDto } from '../models/orderQueryRequestDto'; +import type { orderStateChangeRequestDto } from '../models/orderStateChangeRequestDto'; +import type { orderStateDto } from '../models/orderStateDto'; +import type { orderViewDto } from '../models/orderViewDto'; +import type { QueryResultDto_OrderViewDto_ } from '../models/QueryResultDto_OrderViewDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class OrdersService { - /** - * Retrieves a single order by its ID. - * @returns orderViewDto OK - * @throws ApiError - */ - public static getApiOrder({ - orderId, - }: { /** - * The order id + * Retrieves a single order by its ID. + * @returns orderViewDto OK + * @throws ApiError */ - orderId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/order/{orderId}", - path: { - orderId: orderId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Query the system's orders. - * @returns QueryResultDto_OrderViewDto_ OK - * @throws ApiError - */ - public static postApiOrderQuery({ - requestBody, - }: { + public static getApiOrder({ + orderId, + }: { + /** + * The order id + */ + orderId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/order/{orderId}', + path: { + 'orderId': orderId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } /** - * A dto containing the optional filters + * Query the system's orders. + * @returns QueryResultDto_OrderViewDto_ OK + * @throws ApiError */ - requestBody: orderQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/order/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * @deprecated - * Change order state, and update estimated ready time. - * @returns orderStateDto OK - * @throws ApiError - */ - public static putApiOrderState({ - requestBody, - }: { + public static postApiOrderQuery({ + requestBody, + }: { + /** + * A dto containing the optional filters + */ + requestBody: orderQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/order/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } /** - * The requested change document + * @deprecated + * Change order state, and update estimated ready time. + * @returns orderStateDto OK + * @throws ApiError */ - requestBody: orderStateChangeRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/order/state", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Get the current state of an order. - * @returns orderStateDto OK - * @throws ApiError - */ - public static getApiOrderState({ - orderId, - }: { + public static putApiOrderState({ + requestBody, + }: { + /** + * The requested change document + */ + requestBody: orderStateChangeRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/order/state', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } /** - * The order id + * Get the current state of an order. + * @returns orderStateDto OK + * @throws ApiError */ - orderId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/order/state/{orderId}", - path: { - orderId: orderId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Return UmlDotGraph for current implementation of order state machine. - * @returns string OK - * @throws ApiError - */ - public static getApiOrderStateMachine(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/order/state-machine", - }); - } - /** - * Gets the next state of an order. - * @returns orderStateDto OK - * @throws ApiError - */ - public static postApiOrderNextState({ - orderId, - requestBody, - }: { + public static getApiOrderState({ + orderId, + }: { + /** + * The order id + */ + orderId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/order/state/{orderId}', + path: { + 'orderId': orderId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } /** - * The specified order id + * Return UmlDotGraph for current implementation of order state machine. + * @returns string OK + * @throws ApiError */ - orderId: string; + public static getApiOrderStateMachine(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/order/state-machine', + }); + } /** - * The current state of the order + * Gets the next state of an order. + * @returns orderStateDto OK + * @throws ApiError */ - requestBody: orderNextStatusDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/order/{orderId}/next-state", - path: { - orderId: orderId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Cancel the specified order. - * @returns void - * @throws ApiError - */ - public static postApiOrderCancel({ - orderId, - }: { + public static postApiOrderNextState({ + orderId, + requestBody, + }: { + /** + * The specified order id + */ + orderId: string, + /** + * The current state of the order + */ + requestBody: orderNextStatusDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/order/{orderId}/next-state', + path: { + 'orderId': orderId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } /** - * The specified order id + * Cancel the specified order. + * @returns void + * @throws ApiError */ - orderId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/order/{orderId}/cancel", - path: { - orderId: orderId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Create an order. - * @returns orderDto OK - * @throws ApiError - */ - public static postApiOrder({ - requestBody, - }: { - requestBody: orderCreateDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/order", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Cancel/reject an order with a specific failure reason. - * @returns orderStateDto OK - * @throws ApiError - */ - public static postApiOrderCancellation({ - requestBody, - }: { + public static postApiOrderCancel({ + orderId, + }: { + /** + * The specified order id + */ + orderId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/order/{orderId}/cancel', + path: { + 'orderId': orderId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } /** - * The order failure request containing orderId and failure reason + * Create an order. + * @returns orderDto OK + * @throws ApiError */ - requestBody: orderFailureRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/order/cancellation", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + public static postApiOrder({ + requestBody, + }: { + requestBody: orderCreateDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/order', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Cancel/reject an order with a specific failure reason. + * @returns orderStateDto OK + * @throws ApiError + */ + public static postApiOrderCancellation({ + requestBody, + }: { + /** + * The order failure request containing orderId and failure reason + */ + requestBody: orderFailureRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/order/cancellation', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/ProductOptionsRevisionsService.ts b/src/lib/api/merchant/services/ProductOptionsRevisionsService.ts index 08e09a6..b11d109 100644 --- a/src/lib/api/merchant/services/ProductOptionsRevisionsService.ts +++ b/src/lib/api/merchant/services/ProductOptionsRevisionsService.ts @@ -2,168 +2,168 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createOptionsRevisionDto } from "../models/createOptionsRevisionDto"; -import type { optionsQueryDto } from "../models/optionsQueryDto"; -import type { optionsRevisionDto } from "../models/optionsRevisionDto"; -import type { optionsViewDto } from "../models/optionsViewDto"; -import type { QueryResultDto_OptionsRevisionDto_ } from "../models/QueryResultDto_OptionsRevisionDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { createOptionsRevisionDto } from '../models/createOptionsRevisionDto'; +import type { optionsQueryDto } from '../models/optionsQueryDto'; +import type { optionsRevisionDto } from '../models/optionsRevisionDto'; +import type { optionsViewDto } from '../models/optionsViewDto'; +import type { QueryResultDto_OptionsRevisionDto_ } from '../models/QueryResultDto_OptionsRevisionDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ProductOptionsRevisionsService { - /** - * Creates a revision of a product option set document. - * @returns optionsRevisionDto OK - * @throws ApiError - */ - public static postApiProductOptionsRevision({ - optionsId, - requestBody, - }: { - optionsId: string; - requestBody: createOptionsRevisionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/options/revision/{optionsId}", - path: { - optionsId: optionsId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Creates a new product option set document. - * @returns optionsRevisionDto OK - * @throws ApiError - */ - public static postApiProductOptionsRevision1({ - requestBody, - }: { - requestBody: createOptionsRevisionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/options/revision", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the currently published product option set - * @returns optionsViewDto OK - * @throws ApiError - */ - public static getApiProductOptionsRevisionPublished({ - optionsId, - }: { - optionsId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/options/revision/published/{optionsId}", - path: { - optionsId: optionsId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get a specific revision - * @returns optionsRevisionDto OK - * @throws ApiError - */ - public static getApiProductOptionsRevision({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/options/revision/{revisionId}", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Query filtered by options. - * @returns QueryResultDto_OptionsRevisionDto_ OK - * @throws ApiError - */ - public static postApiProductOptionsRevisionQuery({ - requestBody, - }: { - requestBody: optionsQueryDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/options/revision/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Publish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiProductOptionsRevisionPublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/product/options/revision/{revisionId}/publish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Unpublish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiProductOptionsRevisionUnpublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/product/options/revision/{revisionId}/unpublish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Creates a revision of a product option set document. + * @returns optionsRevisionDto OK + * @throws ApiError + */ + public static postApiProductOptionsRevision({ + optionsId, + requestBody, + }: { + optionsId: string, + requestBody: createOptionsRevisionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/options/revision/{optionsId}', + path: { + 'optionsId': optionsId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Creates a new product option set document. + * @returns optionsRevisionDto OK + * @throws ApiError + */ + public static postApiProductOptionsRevision1({ + requestBody, + }: { + requestBody: createOptionsRevisionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/options/revision', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the currently published product option set + * @returns optionsViewDto OK + * @throws ApiError + */ + public static getApiProductOptionsRevisionPublished({ + optionsId, + }: { + optionsId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/options/revision/published/{optionsId}', + path: { + 'optionsId': optionsId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get a specific revision + * @returns optionsRevisionDto OK + * @throws ApiError + */ + public static getApiProductOptionsRevision({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/options/revision/{revisionId}', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Query filtered by options. + * @returns QueryResultDto_OptionsRevisionDto_ OK + * @throws ApiError + */ + public static postApiProductOptionsRevisionQuery({ + requestBody, + }: { + requestBody: optionsQueryDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/options/revision/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Publish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiProductOptionsRevisionPublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/product/options/revision/{revisionId}/publish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Unpublish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiProductOptionsRevisionUnpublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/product/options/revision/{revisionId}/unpublish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/ProductsCanonicalService.ts b/src/lib/api/merchant/services/ProductsCanonicalService.ts index 1d30a42..1b7e3c0 100644 --- a/src/lib/api/merchant/services/ProductsCanonicalService.ts +++ b/src/lib/api/merchant/services/ProductsCanonicalService.ts @@ -2,187 +2,187 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createProductDto } from "../models/createProductDto"; -import type { productDto } from "../models/productDto"; -import type { productQueryRequestDto } from "../models/productQueryRequestDto"; -import type { productStopListDto } from "../models/productStopListDto"; -import type { QueryResultDto_ProductRevisionDto_ } from "../models/QueryResultDto_ProductRevisionDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { createProductDto } from '../models/createProductDto'; +import type { productDto } from '../models/productDto'; +import type { productQueryRequestDto } from '../models/productQueryRequestDto'; +import type { productStopListDto } from '../models/productStopListDto'; +import type { QueryResultDto_ProductRevisionDto_ } from '../models/QueryResultDto_ProductRevisionDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ProductsCanonicalService { - /** - * Query canonical product data filtered by options. - * @returns QueryResultDto_ProductRevisionDto_ OK - * @throws ApiError - */ - public static postApiProductCanonicalQuery({ - requestBody, - }: { - requestBody: productQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/canonical/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Create a canonical product entry. - * @returns productDto OK - * @throws ApiError - */ - public static postApiProductCanonical({ - requestBody, - }: { - requestBody: createProductDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/canonical", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Retrieve a canonical product entry. - * @returns productDto OK - * @throws ApiError - */ - public static getApiProductCanonical({ - productId, - }: { - productId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/canonical/{productId}", - path: { - productId: productId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Update a canonical product entry. - * @returns any OK - * @throws ApiError - */ - public static putApiProductCanonical({ - productId, - requestBody, - }: { - productId: string; - requestBody: createProductDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/product/canonical/{productId}", - path: { - productId: productId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Delete a canonical product entry. - * @returns any OK - * @throws ApiError - */ - public static deleteApiProductCanonical({ - productId, - }: { - productId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/product/canonical/{productId}", - path: { - productId: productId, - }, - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Adds multiple products to the 'stop list'. - * Items on the 'stop list' are not available for purchase. - * @returns any OK - * @throws ApiError - */ - public static postApiProductCanonicalStopList({ - requestBody, - }: { - requestBody: productStopListDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/canonical/stop-list", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Removes multiple products from the 'stop list'. - * @returns any OK - * @throws ApiError - */ - public static deleteApiProductCanonicalStopList({ - requestBody, - }: { - requestBody: productStopListDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/product/canonical/stop-list", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Gets the list of stopped product ids for a specific seller. - * @returns string OK - * @throws ApiError - */ - public static getApiProductCanonicalStopList({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise> { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/canonical/stop-list/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Query canonical product data filtered by options. + * @returns QueryResultDto_ProductRevisionDto_ OK + * @throws ApiError + */ + public static postApiProductCanonicalQuery({ + requestBody, + }: { + requestBody: productQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/canonical/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Create a canonical product entry. + * @returns productDto OK + * @throws ApiError + */ + public static postApiProductCanonical({ + requestBody, + }: { + requestBody: createProductDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/canonical', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Retrieve a canonical product entry. + * @returns productDto OK + * @throws ApiError + */ + public static getApiProductCanonical({ + productId, + }: { + productId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/canonical/{productId}', + path: { + 'productId': productId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Update a canonical product entry. + * @returns any OK + * @throws ApiError + */ + public static putApiProductCanonical({ + productId, + requestBody, + }: { + productId: string, + requestBody: createProductDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/product/canonical/{productId}', + path: { + 'productId': productId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Delete a canonical product entry. + * @returns any OK + * @throws ApiError + */ + public static deleteApiProductCanonical({ + productId, + }: { + productId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/product/canonical/{productId}', + path: { + 'productId': productId, + }, + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Adds multiple products to the 'stop list'. + * Items on the 'stop list' are not available for purchase. + * @returns any OK + * @throws ApiError + */ + public static postApiProductCanonicalStopList({ + requestBody, + }: { + requestBody: productStopListDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/canonical/stop-list', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Removes multiple products from the 'stop list'. + * @returns any OK + * @throws ApiError + */ + public static deleteApiProductCanonicalStopList({ + requestBody, + }: { + requestBody: productStopListDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/product/canonical/stop-list', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Gets the list of stopped product ids for a specific seller. + * @returns string OK + * @throws ApiError + */ + public static getApiProductCanonicalStopList({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/canonical/stop-list/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/ProductsRevisionsService.ts b/src/lib/api/merchant/services/ProductsRevisionsService.ts index f8fad24..ded3c40 100644 --- a/src/lib/api/merchant/services/ProductsRevisionsService.ts +++ b/src/lib/api/merchant/services/ProductsRevisionsService.ts @@ -2,146 +2,146 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createProductRevisionDto } from "../models/createProductRevisionDto"; -import type { productRevisionDto } from "../models/productRevisionDto"; -import type { productRevisionQueryRequestDto } from "../models/productRevisionQueryRequestDto"; -import type { QueryResultDto_ProductRevisionDto_ } from "../models/QueryResultDto_ProductRevisionDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { createProductRevisionDto } from '../models/createProductRevisionDto'; +import type { productRevisionDto } from '../models/productRevisionDto'; +import type { productRevisionQueryRequestDto } from '../models/productRevisionQueryRequestDto'; +import type { QueryResultDto_ProductRevisionDto_ } from '../models/QueryResultDto_ProductRevisionDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ProductsRevisionsService { - /** - * Creates a revision of a product document. - * @returns productRevisionDto OK - * @throws ApiError - */ - public static postApiProductRevision({ - productId, - requestBody, - }: { - productId: string; - requestBody: createProductRevisionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/revision/{productId}", - path: { - productId: productId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the currently published product - * @returns productRevisionDto OK - * @throws ApiError - */ - public static getApiProductRevisionPublished({ - productId, - }: { - productId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/revision/published/{productId}", - path: { - productId: productId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get a specific revision - * @returns productRevisionDto OK - * @throws ApiError - */ - public static getApiProductRevision({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/revision/{revisionId}", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Query revisions filtered by options. - * @returns QueryResultDto_ProductRevisionDto_ OK - * @throws ApiError - */ - public static postApiProductRevisionQuery({ - requestBody, - }: { - requestBody: productRevisionQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/revision/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Publish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiProductRevisionPublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/product/revision/{revisionId}/publish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Unpublish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiProductRevisionUnpublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/product/revision/{revisionId}/unpublish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Creates a revision of a product document. + * @returns productRevisionDto OK + * @throws ApiError + */ + public static postApiProductRevision({ + productId, + requestBody, + }: { + productId: string, + requestBody: createProductRevisionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/revision/{productId}', + path: { + 'productId': productId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the currently published product + * @returns productRevisionDto OK + * @throws ApiError + */ + public static getApiProductRevisionPublished({ + productId, + }: { + productId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/revision/published/{productId}', + path: { + 'productId': productId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get a specific revision + * @returns productRevisionDto OK + * @throws ApiError + */ + public static getApiProductRevision({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/revision/{revisionId}', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Query revisions filtered by options. + * @returns QueryResultDto_ProductRevisionDto_ OK + * @throws ApiError + */ + public static postApiProductRevisionQuery({ + requestBody, + }: { + requestBody: productRevisionQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/revision/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Publish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiProductRevisionPublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/product/revision/{revisionId}/publish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Unpublish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiProductRevisionUnpublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/product/revision/{revisionId}/unpublish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/ProductsViewsService.ts b/src/lib/api/merchant/services/ProductsViewsService.ts index 3121941..88153f0 100644 --- a/src/lib/api/merchant/services/ProductsViewsService.ts +++ b/src/lib/api/merchant/services/ProductsViewsService.ts @@ -2,74 +2,74 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { productCompositeDto } from "../models/productCompositeDto"; -import type { productQueryRequestDto } from "../models/productQueryRequestDto"; -import type { productRevisionQueryRequestDto } from "../models/productRevisionQueryRequestDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { productCompositeDto } from '../models/productCompositeDto'; +import type { productQueryRequestDto } from '../models/productQueryRequestDto'; +import type { productRevisionQueryRequestDto } from '../models/productRevisionQueryRequestDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ProductsViewsService { - /** - * Get the published product composite view - * This view combines the canonical, revision and text models into a single view model. - * @returns productCompositeDto OK - * @throws ApiError - */ - public static getApiProductComposite({ - productId, - }: { - productId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/product/composite/{productId}", - path: { - productId: productId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * @returns productCompositeDto OK - * @throws ApiError - */ - public static postApiProductCompositeQueryByCanonical({ - requestBody, - }: { - requestBody: productQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/composite/query/by-canonical", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * @returns productCompositeDto OK - * @throws ApiError - */ - public static postApiProductCompositeQueryByRevision({ - requestBody, - }: { - requestBody: productRevisionQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/product/composite/query/by-revision", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Get the published product composite view + * This view combines the canonical, revision and text models into a single view model. + * @returns productCompositeDto OK + * @throws ApiError + */ + public static getApiProductComposite({ + productId, + }: { + productId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/product/composite/{productId}', + path: { + 'productId': productId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * @returns productCompositeDto OK + * @throws ApiError + */ + public static postApiProductCompositeQueryByCanonical({ + requestBody, + }: { + requestBody: productQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/composite/query/by-canonical', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * @returns productCompositeDto OK + * @throws ApiError + */ + public static postApiProductCompositeQueryByRevision({ + requestBody, + }: { + requestBody: productRevisionQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/product/composite/query/by-revision', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/PromotionsService.ts b/src/lib/api/merchant/services/PromotionsService.ts index c3af9d8..2439550 100644 --- a/src/lib/api/merchant/services/PromotionsService.ts +++ b/src/lib/api/merchant/services/PromotionsService.ts @@ -2,124 +2,124 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createPromotionDto } from "../models/createPromotionDto"; -import type { promotionQueryRequestDto } from "../models/promotionQueryRequestDto"; -import type { promotionViewDto } from "../models/promotionViewDto"; -import type { QueryResultDto_PromotionViewDto_ } from "../models/QueryResultDto_PromotionViewDto_"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { createPromotionDto } from '../models/createPromotionDto'; +import type { promotionQueryRequestDto } from '../models/promotionQueryRequestDto'; +import type { promotionViewDto } from '../models/promotionViewDto'; +import type { QueryResultDto_PromotionViewDto_ } from '../models/QueryResultDto_PromotionViewDto_'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class PromotionsService { - /** - * Create a promotion. - * @returns promotionViewDto OK - * @throws ApiError - */ - public static postApiPromotion({ - requestBody, - }: { - requestBody: createPromotionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/promotion", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Retrieve a promotion. - * @returns promotionViewDto OK - * @throws ApiError - */ - public static postApiPromotion1({ - promotionId, - }: { - promotionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/promotion/{promotionId}", - path: { - promotionId: promotionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Update a promotion. - * @returns any OK - * @throws ApiError - */ - public static putApiPromotion({ - promotionId, - requestBody, - }: { - promotionId: string; - requestBody: createPromotionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/promotion/{promotionId}", - path: { - promotionId: promotionId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Delete a promotion. - * @returns any OK - * @throws ApiError - */ - public static deleteApiPromotion({ - promotionId, - }: { - promotionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/promotion/{promotionId}", - path: { - promotionId: promotionId, - }, - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Handles promotion query requests by filtering based on provided criteria. - * @returns QueryResultDto_PromotionViewDto_ OK - * @throws ApiError - */ - public static postApiPromotionsQuery({ - requestBody, - }: { /** - * The query parameters for filtering promotions. + * Create a promotion. + * @returns promotionViewDto OK + * @throws ApiError */ - requestBody: promotionQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/promotions/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } + public static postApiPromotion({ + requestBody, + }: { + requestBody: createPromotionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/promotion', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Retrieve a promotion. + * @returns promotionViewDto OK + * @throws ApiError + */ + public static postApiPromotion1({ + promotionId, + }: { + promotionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/promotion/{promotionId}', + path: { + 'promotionId': promotionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Update a promotion. + * @returns any OK + * @throws ApiError + */ + public static putApiPromotion({ + promotionId, + requestBody, + }: { + promotionId: string, + requestBody: createPromotionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/promotion/{promotionId}', + path: { + 'promotionId': promotionId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Delete a promotion. + * @returns any OK + * @throws ApiError + */ + public static deleteApiPromotion({ + promotionId, + }: { + promotionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/promotion/{promotionId}', + path: { + 'promotionId': promotionId, + }, + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Handles promotion query requests by filtering based on provided criteria. + * @returns QueryResultDto_PromotionViewDto_ OK + * @throws ApiError + */ + public static postApiPromotionsQuery({ + requestBody, + }: { + /** + * The query parameters for filtering promotions. + */ + requestBody: promotionQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/promotions/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/SecurityService.ts b/src/lib/api/merchant/services/SecurityService.ts index f335ce6..e917f93 100644 --- a/src/lib/api/merchant/services/SecurityService.ts +++ b/src/lib/api/merchant/services/SecurityService.ts @@ -2,46 +2,46 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { systemSecurityDto } from "../models/systemSecurityDto"; -import type { updatePermissionsRequest } from "../models/updatePermissionsRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { systemSecurityDto } from '../models/systemSecurityDto'; +import type { updatePermissionsRequest } from '../models/updatePermissionsRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SecurityService { - /** - * Updates the system's permissions for a given role. - * Permissions changes are stored as a form of 'audit' so that changes to the default permissions can be made safely. - * For instance, if a site owner has removed a permission for a role, and the default permissions in the system are changed by developers, the site owner's changes will not be lost. - * @returns any OK - * @throws ApiError - */ - public static putApiSecurityPermissions({ - requestBody, - }: { - requestBody: updatePermissionsRequest; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/security/permissions", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Lists the system's permissions and roles. - * @returns systemSecurityDto OK - * @throws ApiError - */ - public static getApiSecuritySystem(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/security/system", - errors: { - 400: `Bad Request`, - }, - }); - } + /** + * Updates the system's permissions for a given role. + * Permissions changes are stored as a form of 'audit' so that changes to the default permissions can be made safely. + * For instance, if a site owner has removed a permission for a role, and the default permissions in the system are changed by developers, the site owner's changes will not be lost. + * @returns any OK + * @throws ApiError + */ + public static putApiSecurityPermissions({ + requestBody, + }: { + requestBody: updatePermissionsRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/security/permissions', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Lists the system's permissions and roles. + * @returns systemSecurityDto OK + * @throws ApiError + */ + public static getApiSecuritySystem(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/security/system', + errors: { + 400: `Bad Request`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/SellersCanonicalService.ts b/src/lib/api/merchant/services/SellersCanonicalService.ts index dc31839..8a24c09 100644 --- a/src/lib/api/merchant/services/SellersCanonicalService.ts +++ b/src/lib/api/merchant/services/SellersCanonicalService.ts @@ -2,192 +2,192 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createSellerDto } from "../models/createSellerDto"; -import type { QueryResultDto_SellerDto_ } from "../models/QueryResultDto_SellerDto_"; -import type { sellerDto } from "../models/sellerDto"; -import type { sellerOperationalStateDto } from "../models/sellerOperationalStateDto"; -import type { sellerQueryRequestDto } from "../models/sellerQueryRequestDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { createSellerDto } from '../models/createSellerDto'; +import type { QueryResultDto_SellerDto_ } from '../models/QueryResultDto_SellerDto_'; +import type { sellerDto } from '../models/sellerDto'; +import type { sellerOperationalStateDto } from '../models/sellerOperationalStateDto'; +import type { sellerQueryRequestDto } from '../models/sellerQueryRequestDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SellersCanonicalService { - /** - * Create a canonical seller entry. - * @returns sellerDto OK - * @throws ApiError - */ - public static postApiSellerCanonical({ - requestBody, - }: { - requestBody: createSellerDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/seller/canonical", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Get the currently published document by publicKey - * @returns sellerDto OK - * @throws ApiError - */ - public static getApiSellerCanonical({ - publicKey, - }: { - publicKey: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/canonical/{sellerKey}", - query: { - publicKey: publicKey, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Retrieve a canonical seller entry. - * @returns sellerDto OK - * @throws ApiError - */ - public static getApiSellerCanonical1({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/canonical/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Update a canonical seller entry. - * @returns any OK - * @throws ApiError - */ - public static putApiSellerCanonical({ - sellerId, - requestBody, - }: { - sellerId: string; - requestBody: createSellerDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/seller/canonical/{sellerId}", - path: { - sellerId: sellerId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Delete a canonical seller entry. - * @returns any OK - * @throws ApiError - */ - public static deleteApiSellerCanonical({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "DELETE", - url: "/api/seller/canonical/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Query canonical seller data filtered by options. - * @returns QueryResultDto_SellerDto_ OK - * @throws ApiError - */ - public static postApiSellerCanonicalQuery({ - requestBody, - }: { - requestBody: sellerQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/seller/canonical/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Updates the open/closed state of a seller. - * @returns sellerOperationalStateDto OK - * @throws ApiError - */ - public static putApiSellerCanonicalOpenState({ - sellerId, - requestBody, - }: { - sellerId: string; - requestBody: sellerOperationalStateDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/seller/canonical/open-state/{sellerId}", - path: { - sellerId: sellerId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Gets the open/closed state of a seller. - * @returns sellerOperationalStateDto OK - * @throws ApiError - */ - public static getApiSellerCanonicalOpenState({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/canonical/open-state/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Create a canonical seller entry. + * @returns sellerDto OK + * @throws ApiError + */ + public static postApiSellerCanonical({ + requestBody, + }: { + requestBody: createSellerDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/seller/canonical', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Get the currently published document by publicKey + * @returns sellerDto OK + * @throws ApiError + */ + public static getApiSellerCanonical({ + publicKey, + }: { + publicKey: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/canonical/{sellerKey}', + query: { + 'publicKey': publicKey, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Retrieve a canonical seller entry. + * @returns sellerDto OK + * @throws ApiError + */ + public static getApiSellerCanonical1({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/canonical/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Update a canonical seller entry. + * @returns any OK + * @throws ApiError + */ + public static putApiSellerCanonical({ + sellerId, + requestBody, + }: { + sellerId: string, + requestBody: createSellerDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/seller/canonical/{sellerId}', + path: { + 'sellerId': sellerId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Delete a canonical seller entry. + * @returns any OK + * @throws ApiError + */ + public static deleteApiSellerCanonical({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/seller/canonical/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Query canonical seller data filtered by options. + * @returns QueryResultDto_SellerDto_ OK + * @throws ApiError + */ + public static postApiSellerCanonicalQuery({ + requestBody, + }: { + requestBody: sellerQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/seller/canonical/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Updates the open/closed state of a seller. + * @returns sellerOperationalStateDto OK + * @throws ApiError + */ + public static putApiSellerCanonicalOpenState({ + sellerId, + requestBody, + }: { + sellerId: string, + requestBody: sellerOperationalStateDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/seller/canonical/open-state/{sellerId}', + path: { + 'sellerId': sellerId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Gets the open/closed state of a seller. + * @returns sellerOperationalStateDto OK + * @throws ApiError + */ + public static getApiSellerCanonicalOpenState({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/canonical/open-state/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/SellersRevisionsService.ts b/src/lib/api/merchant/services/SellersRevisionsService.ts index 47177a9..1acc234 100644 --- a/src/lib/api/merchant/services/SellersRevisionsService.ts +++ b/src/lib/api/merchant/services/SellersRevisionsService.ts @@ -2,148 +2,148 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { baseCreateSellerRevisionDto } from "../models/baseCreateSellerRevisionDto"; -import type { QueryResultDto_SellerRevisionDto_ } from "../models/QueryResultDto_SellerRevisionDto_"; -import type { restaurantRevisionDto } from "../models/restaurantRevisionDto"; -import type { sellerRevisionDto } from "../models/sellerRevisionDto"; -import type { sellerRevisionQueryRequestDto } from "../models/sellerRevisionQueryRequestDto"; -import type { sellerViewDto } from "../models/sellerViewDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { baseCreateSellerRevisionDto } from '../models/baseCreateSellerRevisionDto'; +import type { QueryResultDto_SellerRevisionDto_ } from '../models/QueryResultDto_SellerRevisionDto_'; +import type { restaurantRevisionDto } from '../models/restaurantRevisionDto'; +import type { sellerRevisionDto } from '../models/sellerRevisionDto'; +import type { sellerRevisionQueryRequestDto } from '../models/sellerRevisionQueryRequestDto'; +import type { sellerViewDto } from '../models/sellerViewDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SellersRevisionsService { - /** - * Creates a revision of a seller document. - * @returns restaurantRevisionDto OK - * @throws ApiError - */ - public static postApiSellerRevision({ - sellerId, - requestBody, - }: { - sellerId: string; - requestBody: baseCreateSellerRevisionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/seller/revision/{sellerId}", - path: { - sellerId: sellerId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the currently published seller - * @returns sellerViewDto OK - * @throws ApiError - */ - public static getApiSellerRevisionPublished({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/revision/published/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get a specific revision by revisionId - * @returns sellerRevisionDto OK - * @throws ApiError - */ - public static getApiSellerRevision({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/revision/{revisionId}", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Query revisions filtered by options. - * @returns QueryResultDto_SellerRevisionDto_ OK - * @throws ApiError - */ - public static postApiSellerRevisionQuery({ - requestBody, - }: { - requestBody: sellerRevisionQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/seller/revision/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Publish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiSellerRevisionPublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/seller/revision/{revisionId}/publish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Unpublish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiSellerRevisionUnpublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/seller/revision/{revisionId}/unpublish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Creates a revision of a seller document. + * @returns restaurantRevisionDto OK + * @throws ApiError + */ + public static postApiSellerRevision({ + sellerId, + requestBody, + }: { + sellerId: string, + requestBody: baseCreateSellerRevisionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/seller/revision/{sellerId}', + path: { + 'sellerId': sellerId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the currently published seller + * @returns sellerViewDto OK + * @throws ApiError + */ + public static getApiSellerRevisionPublished({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/revision/published/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get a specific revision by revisionId + * @returns sellerRevisionDto OK + * @throws ApiError + */ + public static getApiSellerRevision({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/revision/{revisionId}', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Query revisions filtered by options. + * @returns QueryResultDto_SellerRevisionDto_ OK + * @throws ApiError + */ + public static postApiSellerRevisionQuery({ + requestBody, + }: { + requestBody: sellerRevisionQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/seller/revision/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Publish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiSellerRevisionPublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/seller/revision/{revisionId}/publish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Unpublish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiSellerRevisionUnpublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/seller/revision/{revisionId}/unpublish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/SellersViewsService.ts b/src/lib/api/merchant/services/SellersViewsService.ts index 35267a6..10a2fad 100644 --- a/src/lib/api/merchant/services/SellersViewsService.ts +++ b/src/lib/api/merchant/services/SellersViewsService.ts @@ -2,186 +2,186 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { sellerCompositeDto } from "../models/sellerCompositeDto"; -import type { sellerPublicAggregateFullDto } from "../models/sellerPublicAggregateFullDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { sellerCompositeDto } from '../models/sellerCompositeDto'; +import type { sellerPublicAggregateFullDto } from '../models/sellerPublicAggregateFullDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SellersViewsService { - /** - * Get the default published seller composite view - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerCompositeDto OK - * @throws ApiError - */ - public static getApiSellerComposite(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/composite", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller composite view - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerCompositeDto OK - * @throws ApiError - */ - public static getApiSellerComposite1({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/composite/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller composite view by PublicKey - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerCompositeDto OK - * @throws ApiError - */ - public static getApiSellerComposite2({ - publicKey, - }: { - publicKey: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/composite/{sellerKey}", - query: { - publicKey: publicKey, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller aggregate full view - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerPublicAggregateFullDto OK - * @throws ApiError - */ - public static getApiSellerAggregateFull(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/aggregate/full", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller aggregate full view - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerPublicAggregateFullDto OK - * @throws ApiError - */ - public static getApiSellerAggregateFull1({ - sellerId, - }: { - sellerId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/aggregate/full/{sellerId}", - path: { - sellerId: sellerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller aggregate full view at scheduled time. - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerPublicAggregateFullDto OK - * @throws ApiError - */ - public static getApiSellerAggregateFull2({ - sellerId, - utcUnixSeconds, - }: { - sellerId: string; - utcUnixSeconds: number; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/aggregate/full/{sellerId}/{utcUnixSeconds}", - path: { - sellerId: sellerId, - utcUnixSeconds: utcUnixSeconds, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller aggregate full view by PublicKey. - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerPublicAggregateFullDto OK - * @throws ApiError - */ - public static getApiSellerAggregateFull3({ - publicKey, - }: { - publicKey: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/aggregate/full/{publicKey}", - path: { - publicKey: publicKey, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the published seller aggregate full view by PublicKey at scheduled time. - * This view combines the canonical, revision and text models into a single view model. - * @returns sellerPublicAggregateFullDto OK - * @throws ApiError - */ - public static getApiSellerAggregateFull4({ - publicKey, - utcUnixSeconds, - }: { - publicKey: string; - utcUnixSeconds: number; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/seller/aggregate/full/{publicKey}/{utcUnixSeconds}", - path: { - publicKey: publicKey, - utcUnixSeconds: utcUnixSeconds, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Get the default published seller composite view + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerCompositeDto OK + * @throws ApiError + */ + public static getApiSellerComposite(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/composite', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller composite view + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerCompositeDto OK + * @throws ApiError + */ + public static getApiSellerComposite1({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/composite/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller composite view by PublicKey + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerCompositeDto OK + * @throws ApiError + */ + public static getApiSellerComposite2({ + publicKey, + }: { + publicKey: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/composite/{sellerKey}', + query: { + 'publicKey': publicKey, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller aggregate full view + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerPublicAggregateFullDto OK + * @throws ApiError + */ + public static getApiSellerAggregateFull(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/aggregate/full', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller aggregate full view + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerPublicAggregateFullDto OK + * @throws ApiError + */ + public static getApiSellerAggregateFull1({ + sellerId, + }: { + sellerId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/aggregate/full/{sellerId}', + path: { + 'sellerId': sellerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller aggregate full view at scheduled time. + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerPublicAggregateFullDto OK + * @throws ApiError + */ + public static getApiSellerAggregateFull2({ + sellerId, + utcUnixSeconds, + }: { + sellerId: string, + utcUnixSeconds: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/aggregate/full/{sellerId}/{utcUnixSeconds}', + path: { + 'sellerId': sellerId, + 'utcUnixSeconds': utcUnixSeconds, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller aggregate full view by PublicKey. + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerPublicAggregateFullDto OK + * @throws ApiError + */ + public static getApiSellerAggregateFull3({ + publicKey, + }: { + publicKey: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/aggregate/full/{publicKey}', + path: { + 'publicKey': publicKey, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the published seller aggregate full view by PublicKey at scheduled time. + * This view combines the canonical, revision and text models into a single view model. + * @returns sellerPublicAggregateFullDto OK + * @throws ApiError + */ + public static getApiSellerAggregateFull4({ + publicKey, + utcUnixSeconds, + }: { + publicKey: string, + utcUnixSeconds: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/seller/aggregate/full/{publicKey}/{utcUnixSeconds}', + path: { + 'publicKey': publicKey, + 'utcUnixSeconds': utcUnixSeconds, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/ServerSideEventsService.ts b/src/lib/api/merchant/services/ServerSideEventsService.ts index 3e00390..94a4756 100644 --- a/src/lib/api/merchant/services/ServerSideEventsService.ts +++ b/src/lib/api/merchant/services/ServerSideEventsService.ts @@ -2,106 +2,106 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class ServerSideEventsService { - /** - * Returns a specific order's event stream. - * Requires any form of public key authentication. - * @returns any OK - * @throws ApiError - */ - public static getEventsOrders({ - orderId, - }: { - orderId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/events/orders/{orderId}", - path: { - orderId: orderId, - }, - errors: { - 400: `Bad Request`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }); - } - /** - * Returns an order event stream - * Requires any form of public key authentication. - * @returns any OK - * @throws ApiError - */ - public static getEventsOrders1(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/events/orders", - errors: { - 400: `Bad Request`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }); - } - /** - * Opens a private event stream - * This endpoint will open a private event stream for the authenticated user. - * All events that the user has permission to see will be sent to this stream. - * @returns any OK - * @throws ApiError - */ - public static getEventsStream({ - options, - }: { /** - * Options allow for different subscription types + * Returns a specific order's event stream. + * Requires any form of public key authentication. + * @returns any OK + * @throws ApiError */ - options?: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/events/stream", - query: { - options: options, - }, - errors: { - 401: `Unauthorized`, - }, - }); - } - /** - * Opens a private event stream for a user - * Only users with the Admin role can open streams for other users. - * @returns any OK - * @throws ApiError - */ - public static getEventsStream1({ - userId, - options, - }: { - userId: string; + public static getEventsOrders({ + orderId, + }: { + orderId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/events/orders/{orderId}', + path: { + 'orderId': orderId, + }, + errors: { + 400: `Bad Request`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } /** - * Options allow for different subscription types + * Returns an order event stream + * Requires any form of public key authentication. + * @returns any OK + * @throws ApiError */ - options?: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/events/stream/{userId}", - path: { - userId: userId, - }, - query: { - options: options, - }, - errors: { - 401: `Unauthorized`, - 403: `Forbidden`, - }, - }); - } + public static getEventsOrders1(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/events/orders', + errors: { + 400: `Bad Request`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * Opens a private event stream + * This endpoint will open a private event stream for the authenticated user. + * All events that the user has permission to see will be sent to this stream. + * @returns any OK + * @throws ApiError + */ + public static getEventsStream({ + options, + }: { + /** + * Options allow for different subscription types + */ + options?: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/events/stream', + query: { + 'options': options, + }, + errors: { + 401: `Unauthorized`, + }, + }); + } + /** + * Opens a private event stream for a user + * Only users with the Admin role can open streams for other users. + * @returns any OK + * @throws ApiError + */ + public static getEventsStream1({ + userId, + options, + }: { + userId: string, + /** + * Options allow for different subscription types + */ + options?: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/events/stream/{userId}', + path: { + 'userId': userId, + }, + query: { + 'options': options, + }, + errors: { + 401: `Unauthorized`, + 403: `Forbidden`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/SystemService.ts b/src/lib/api/merchant/services/SystemService.ts index a0c48e5..5bf6634 100644 --- a/src/lib/api/merchant/services/SystemService.ts +++ b/src/lib/api/merchant/services/SystemService.ts @@ -2,32 +2,32 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { versionCheck } from "../models/versionCheck"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { versionCheck } from '../models/versionCheck'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class SystemService { - /** - * @returns string OK - * @throws ApiError - */ - public static getApiSystemVersion(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/system/version", - }); - } - /** - * @returns versionCheck OK - * @throws ApiError - */ - public static getApiSystemVersionCheck(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/system/version/check", - errors: { - 400: `Bad Request`, - }, - }); - } + /** + * @returns string OK + * @throws ApiError + */ + public static getApiSystemVersion(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/system/version', + }); + } + /** + * @returns versionCheck OK + * @throws ApiError + */ + public static getApiSystemVersionCheck(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/system/version/check', + errors: { + 400: `Bad Request`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/TestsService.ts b/src/lib/api/merchant/services/TestsService.ts index 5c0e62f..45c4c4e 100644 --- a/src/lib/api/merchant/services/TestsService.ts +++ b/src/lib/api/merchant/services/TestsService.ts @@ -2,50 +2,50 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { userDto } from "../models/userDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { userDto } from '../models/userDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class TestsService { - /** - * Returns an api access token for the given key name. - * @returns string OK - * @throws ApiError - */ - public static postApiTestApiKey({ - keyName, - }: { /** - * The name of the key + * Returns an api access token for the given key name. + * @returns string OK + * @throws ApiError */ - keyName: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/test/apiKey/{keyName}", - path: { - keyName: keyName, - }, - errors: { - 400: `Bad Request`, - 500: `Internal Server Error`, - }, - }); - } - /** - * Test the connection to the DSP. - * This endpoint will test connectivity to the DSP by fetching the API user as seen by the remote system. - * @returns userDto OK - * @throws ApiError - */ - public static postApiTestDspTest(): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/test/dspTest", - errors: { - 400: `Bad Request`, - 500: `Internal Server Error`, - }, - }); - } + public static postApiTestApiKey({ + keyName, + }: { + /** + * The name of the key + */ + keyName: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/test/apiKey/{keyName}', + path: { + 'keyName': keyName, + }, + errors: { + 400: `Bad Request`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Test the connection to the DSP. + * This endpoint will test connectivity to the DSP by fetching the API user as seen by the remote system. + * @returns userDto OK + * @throws ApiError + */ + public static postApiTestDspTest(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/test/dspTest', + errors: { + 400: `Bad Request`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/TranslatableTextRevisionsService.ts b/src/lib/api/merchant/services/TranslatableTextRevisionsService.ts index 1b96090..ce65b83 100644 --- a/src/lib/api/merchant/services/TranslatableTextRevisionsService.ts +++ b/src/lib/api/merchant/services/TranslatableTextRevisionsService.ts @@ -2,144 +2,144 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { createTextRevisionDto } from "../models/createTextRevisionDto"; -import type { QueryResultDto_TextRevisionDto_ } from "../models/QueryResultDto_TextRevisionDto_"; -import type { textQueryRequestDto } from "../models/textQueryRequestDto"; -import type { textRevisionDto } from "../models/textRevisionDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { createTextRevisionDto } from '../models/createTextRevisionDto'; +import type { QueryResultDto_TextRevisionDto_ } from '../models/QueryResultDto_TextRevisionDto_'; +import type { textQueryRequestDto } from '../models/textQueryRequestDto'; +import type { textRevisionDto } from '../models/textRevisionDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class TranslatableTextRevisionsService { - /** - * Creates a revision of a text document. - * @returns textRevisionDto OK - * @throws ApiError - */ - public static postApiTextRevision({ - requestBody, - }: { - requestBody: createTextRevisionDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/text/revision", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get the currently published document - * @returns textRevisionDto OK - * @throws ApiError - */ - public static getApiTextRevisionPublished({ - documentId, - key, - }: { - documentId: string; - key: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/text/revision/published/{documentId}/{key}", - path: { - documentId: documentId, - key: key, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get a specific revision - * @returns textRevisionDto OK - * @throws ApiError - */ - public static getApiTextRevision({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/text/revision/{revisionId}", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Query texts filtered by options. - * @returns QueryResultDto_TextRevisionDto_ OK - * @throws ApiError - */ - public static postApiTextRevisionQuery({ - requestBody, - }: { - requestBody: textQueryRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/text/revision/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Publish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiTextRevisionPublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/text/revision/{revisionId}/publish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Unpublish the specified revision - * @returns any OK - * @throws ApiError - */ - public static putApiTextRevisionUnpublish({ - revisionId, - }: { - revisionId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "PUT", - url: "/api/text/revision/{revisionId}/unpublish", - path: { - revisionId: revisionId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + /** + * Creates a revision of a text document. + * @returns textRevisionDto OK + * @throws ApiError + */ + public static postApiTextRevision({ + requestBody, + }: { + requestBody: createTextRevisionDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/text/revision', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get the currently published document + * @returns textRevisionDto OK + * @throws ApiError + */ + public static getApiTextRevisionPublished({ + documentId, + key, + }: { + documentId: string, + key: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/text/revision/published/{documentId}/{key}', + path: { + 'documentId': documentId, + 'key': key, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get a specific revision + * @returns textRevisionDto OK + * @throws ApiError + */ + public static getApiTextRevision({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/text/revision/{revisionId}', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Query texts filtered by options. + * @returns QueryResultDto_TextRevisionDto_ OK + * @throws ApiError + */ + public static postApiTextRevisionQuery({ + requestBody, + }: { + requestBody: textQueryRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/text/revision/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } + /** + * Publish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiTextRevisionPublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/text/revision/{revisionId}/publish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Unpublish the specified revision + * @returns any OK + * @throws ApiError + */ + public static putApiTextRevisionUnpublish({ + revisionId, + }: { + revisionId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/text/revision/{revisionId}/unpublish', + path: { + 'revisionId': revisionId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/UserService.ts b/src/lib/api/merchant/services/UserService.ts index c75c84d..f40872a 100644 --- a/src/lib/api/merchant/services/UserService.ts +++ b/src/lib/api/merchant/services/UserService.ts @@ -2,89 +2,87 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { QueryResultDto_UserDto_ } from "../models/QueryResultDto_UserDto_"; -import type { rolePermissionsDto } from "../models/rolePermissionsDto"; -import type { userDto } from "../models/userDto"; -import type { userQueryRequest } from "../models/userQueryRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { QueryResultDto_UserDto_ } from '../models/QueryResultDto_UserDto_'; +import type { rolePermissionsDto } from '../models/rolePermissionsDto'; +import type { userDto } from '../models/userDto'; +import type { userQueryRequest } from '../models/userQueryRequest'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class UserService { - /** - * Get the currently authenticated user - * @returns userDto OK - * @throws ApiError - */ - public static getApiUser(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/user", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Get a user by their ID - * You may only retrieve information about yourself or users you have permission to view. Admins can view all users. - * @returns userDto OK - * @throws ApiError - */ - public static getApiUser1({ - userId, - }: { - userId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/user/{userId}", - path: { - userId: userId, - }, - errors: { - 400: `Bad Request`, - 403: `Forbidden`, - 404: `Not Found`, - }, - }); - } - /** - * Get user's current permissions - * This endpoint will return a list of roles and their associated permissions for the currently authenticated user. - * @returns rolePermissionsDto OK - * @throws ApiError - */ - public static getApiUserPermissions(): CancelablePromise< - Array - > { - return __request(OpenAPI, { - method: "GET", - url: "/api/user/permissions", - errors: { - 404: `Not Found`, - }, - }); - } - /** - * Query users - * This endpoint will return a list of users based on the query parameters provided. - * @returns QueryResultDto_UserDto_ OK - * @throws ApiError - */ - public static postApiUserQuery({ - requestBody, - }: { - requestBody: userQueryRequest; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/user/query", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } + /** + * Get the currently authenticated user + * @returns userDto OK + * @throws ApiError + */ + public static getApiUser(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/user', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Get a user by their ID + * You may only retrieve information about yourself or users you have permission to view. Admins can view all users. + * @returns userDto OK + * @throws ApiError + */ + public static getApiUser1({ + userId, + }: { + userId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/user/{userId}', + path: { + 'userId': userId, + }, + errors: { + 400: `Bad Request`, + 403: `Forbidden`, + 404: `Not Found`, + }, + }); + } + /** + * Get user's current permissions + * This endpoint will return a list of roles and their associated permissions for the currently authenticated user. + * @returns rolePermissionsDto OK + * @throws ApiError + */ + public static getApiUserPermissions(): CancelablePromise> { + return __request(OpenAPI, { + method: 'GET', + url: '/api/user/permissions', + errors: { + 404: `Not Found`, + }, + }); + } + /** + * Query users + * This endpoint will return a list of users based on the query parameters provided. + * @returns QueryResultDto_UserDto_ OK + * @throws ApiError + */ + public static postApiUserQuery({ + requestBody, + }: { + requestBody: userQueryRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/user/query', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/VerificationsService.ts b/src/lib/api/merchant/services/VerificationsService.ts index b771204..f157f18 100644 --- a/src/lib/api/merchant/services/VerificationsService.ts +++ b/src/lib/api/merchant/services/VerificationsService.ts @@ -2,81 +2,81 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { humanVerificationRequestDto } from "../models/humanVerificationRequestDto"; -import type { humanVerificationStatusDto } from "../models/humanVerificationStatusDto"; -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { humanVerificationRequestDto } from '../models/humanVerificationRequestDto'; +import type { humanVerificationStatusDto } from '../models/humanVerificationStatusDto'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class VerificationsService { - /** - * Verify a public key using a phone number. - * @returns humanVerificationStatusDto OK - * @throws ApiError - */ - public static postApiVerificationsVerify({ - requestBody, - }: { /** - * The request document + * Verify a public key using a phone number. + * @returns humanVerificationStatusDto OK + * @throws ApiError */ - requestBody: humanVerificationRequestDto; - }): CancelablePromise { - return __request(OpenAPI, { - method: "POST", - url: "/api/verifications/verify", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - }, - }); - } - /** - * Returns the verification status for a given public key. - * @returns humanVerificationStatusDto OK - * @throws ApiError - */ - public static getApiVerificationsVerifyKey({ - publicKey, - }: { + public static postApiVerificationsVerify({ + requestBody, + }: { + /** + * The request document + */ + requestBody: humanVerificationRequestDto, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/verifications/verify', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + }, + }); + } /** - * The user's public key + * Returns the verification status for a given public key. + * @returns humanVerificationStatusDto OK + * @throws ApiError */ - publicKey: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/verifications/verify/key/{publicKey}", - path: { - publicKey: publicKey, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * @deprecated - * No longer used. Use M:G1.Merchant.Hub.Web.Controllers.Api.Verifications.VerifyHumanEndpoint.HandlerPublicKey(G1.Common.Components.PublicKey,G1.Merchant.Hub.Interfaces.IConsumerVerificationService,System.Threading.CancellationToken) instead. - * @returns humanVerificationStatusDto OK - * @throws ApiError - */ - public static getApiVerificationsVerifyPhone({ - phoneNumber, - }: { - phoneNumber: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/api/verifications/verify/phone/{phoneNumber}", - path: { - phoneNumber: phoneNumber, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } + public static getApiVerificationsVerifyKey({ + publicKey, + }: { + /** + * The user's public key + */ + publicKey: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/verifications/verify/key/{publicKey}', + path: { + 'publicKey': publicKey, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * @deprecated + * No longer used. Use M:G1.Merchant.Hub.Web.Controllers.Api.Verifications.VerifyHumanEndpoint.HandlerPublicKey(G1.Common.Components.PublicKey,G1.Merchant.Hub.Interfaces.IConsumerVerificationService,System.Threading.CancellationToken) instead. + * @returns humanVerificationStatusDto OK + * @throws ApiError + */ + public static getApiVerificationsVerifyPhone({ + phoneNumber, + }: { + phoneNumber: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/verifications/verify/phone/{phoneNumber}', + path: { + 'phoneNumber': phoneNumber, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } } diff --git a/src/lib/api/merchant/services/WebService.ts b/src/lib/api/merchant/services/WebService.ts index 6c54f24..410af6d 100644 --- a/src/lib/api/merchant/services/WebService.ts +++ b/src/lib/api/merchant/services/WebService.ts @@ -2,52 +2,52 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import { OpenAPI } from "../core/OpenAPI"; -import { request as __request } from "../core/request"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; export class WebService { - /** - * @deprecated - * Download an asset by contentId - * When supplied a valid base58 encoded contentId, this endpoint will return the asset associated with that id as a file download. - * The response will be a file download with the correct content type. - * The file name will be the contentId with the correct extension. - * @returns string OK - * @throws ApiError - */ - public static getAssets({ - contentId, - }: { /** - * This is a base58 encoded digest, a unique identifier for the content. + * @deprecated + * Download an asset by contentId + * When supplied a valid base58 encoded contentId, this endpoint will return the asset associated with that id as a file download. + * The response will be a file download with the correct content type. + * The file name will be the contentId with the correct extension. + * @returns string OK + * @throws ApiError */ - contentId: string; - }): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/assets/{contentId}", - path: { - contentId: contentId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - }, - }); - } - /** - * Redirects a mobile user to the appropriate app store. - * On iOS, an immediate attempt is made using a deep link. If that fails, the user can click the manual links. - * @returns any OK - * @throws ApiError - */ - public static getAppLink(): CancelablePromise { - return __request(OpenAPI, { - method: "GET", - url: "/app-link", - errors: { - 302: `Found`, - }, - }); - } + public static getAssets({ + contentId, + }: { + /** + * This is a base58 encoded digest, a unique identifier for the content. + */ + contentId: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/assets/{contentId}', + path: { + 'contentId': contentId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + }, + }); + } + /** + * Redirects a mobile user to the appropriate app store. + * On iOS, an immediate attempt is made using a deep link. If that fails, the user can click the manual links. + * @returns any OK + * @throws ApiError + */ + public static getAppLink(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/app-link', + errors: { + 302: `Found`, + }, + }); + } } diff --git a/src/shared/ui/Layout/Sidebar.tsx b/src/shared/ui/Layout/Sidebar.tsx index f9ee0b0..23f51e1 100644 --- a/src/shared/ui/Layout/Sidebar.tsx +++ b/src/shared/ui/Layout/Sidebar.tsx @@ -35,7 +35,7 @@ export const Sidebar: React.FC = () => { return (