Cleanup
This commit is contained in:
parent
e427cd2eb3
commit
e43e04e48f
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
services:
|
||||
merchant-operator-web:
|
||||
spa-app:
|
||||
environment:
|
||||
- CLIENT_BASE_PATH=
|
||||
- CLIENT_API_URL=https://
|
||||
|
@ -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:-/}"
|
||||
|
@ -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"
|
||||
```
|
||||
|
@ -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`
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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<string, any>;
|
||||
readonly cookies?: Record<string, any>;
|
||||
readonly headers?: Record<string, any>;
|
||||
readonly query?: Record<string, any>;
|
||||
readonly formData?: Record<string, any>;
|
||||
readonly body?: any;
|
||||
readonly mediaType?: string;
|
||||
readonly responseHeader?: string;
|
||||
readonly errors?: Record<number, string>;
|
||||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
||||
readonly url: string;
|
||||
readonly path?: Record<string, any>;
|
||||
readonly cookies?: Record<string, any>;
|
||||
readonly headers?: Record<string, any>;
|
||||
readonly query?: Record<string, any>;
|
||||
readonly formData?: Record<string, any>;
|
||||
readonly body?: any;
|
||||
readonly mediaType?: string;
|
||||
readonly responseHeader?: string;
|
||||
readonly errors?: Record<number, string>;
|
||||
};
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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<T> implements Promise<T> {
|
||||
#isResolved: boolean;
|
||||
#isRejected: boolean;
|
||||
#isCancelled: boolean;
|
||||
readonly #cancelHandlers: (() => void)[];
|
||||
readonly #promise: Promise<T>;
|
||||
#resolve?: (value: T | PromiseLike<T>) => void;
|
||||
#reject?: (reason?: any) => void;
|
||||
#isResolved: boolean;
|
||||
#isRejected: boolean;
|
||||
#isCancelled: boolean;
|
||||
readonly #cancelHandlers: (() => void)[];
|
||||
readonly #promise: Promise<T>;
|
||||
#resolve?: (value: T | PromiseLike<T>) => void;
|
||||
#reject?: (reason?: any) => void;
|
||||
|
||||
constructor(
|
||||
executor: (
|
||||
resolve: (value: T | PromiseLike<T>) => void,
|
||||
reject: (reason?: any) => void,
|
||||
onCancel: OnCancel,
|
||||
) => void,
|
||||
) {
|
||||
this.#isResolved = false;
|
||||
this.#isRejected = false;
|
||||
this.#isCancelled = false;
|
||||
this.#cancelHandlers = [];
|
||||
this.#promise = new Promise<T>((resolve, reject) => {
|
||||
this.#resolve = resolve;
|
||||
this.#reject = reject;
|
||||
constructor(
|
||||
executor: (
|
||||
resolve: (value: T | PromiseLike<T>) => void,
|
||||
reject: (reason?: any) => void,
|
||||
onCancel: OnCancel
|
||||
) => void
|
||||
) {
|
||||
this.#isResolved = false;
|
||||
this.#isRejected = false;
|
||||
this.#isCancelled = false;
|
||||
this.#cancelHandlers = [];
|
||||
this.#promise = new Promise<T>((resolve, reject) => {
|
||||
this.#resolve = resolve;
|
||||
this.#reject = reject;
|
||||
|
||||
const onResolve = (value: T | PromiseLike<T>): void => {
|
||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
||||
return;
|
||||
}
|
||||
this.#isResolved = true;
|
||||
if (this.#resolve) this.#resolve(value);
|
||||
};
|
||||
const onResolve = (value: T | PromiseLike<T>): 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<TResult1 = T, TResult2 = never>(
|
||||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
||||
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
|
||||
): Promise<TResult1 | TResult2> {
|
||||
return this.#promise.then(onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
public catch<TResult = never>(
|
||||
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null,
|
||||
): Promise<T | TResult> {
|
||||
return this.#promise.catch(onRejected);
|
||||
}
|
||||
|
||||
public finally(onFinally?: (() => void) | null): Promise<T> {
|
||||
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<TResult1 = T, TResult2 = never>(
|
||||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
||||
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
|
||||
): Promise<TResult1 | TResult2> {
|
||||
return this.#promise.then(onFulfilled, onRejected);
|
||||
}
|
||||
|
||||
public catch<TResult = never>(
|
||||
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
|
||||
): Promise<T | TResult> {
|
||||
return this.#promise.catch(onRejected);
|
||||
}
|
||||
|
||||
public finally(onFinally?: (() => void) | null): Promise<T> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -2,31 +2,31 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ApiRequestOptions } from "./ApiRequestOptions";
|
||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||
|
||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
type Headers = Record<string, string>;
|
||||
|
||||
export type OpenAPIConfig = {
|
||||
BASE: string;
|
||||
VERSION: string;
|
||||
WITH_CREDENTIALS: boolean;
|
||||
CREDENTIALS: "include" | "omit" | "same-origin";
|
||||
TOKEN?: string | Resolver<string> | undefined;
|
||||
USERNAME?: string | Resolver<string> | undefined;
|
||||
PASSWORD?: string | Resolver<string> | undefined;
|
||||
HEADERS?: Headers | Resolver<Headers> | undefined;
|
||||
ENCODE_PATH?: ((path: string) => string) | undefined;
|
||||
BASE: string;
|
||||
VERSION: string;
|
||||
WITH_CREDENTIALS: boolean;
|
||||
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
||||
TOKEN?: string | Resolver<string> | undefined;
|
||||
USERNAME?: string | Resolver<string> | undefined;
|
||||
PASSWORD?: string | Resolver<string> | undefined;
|
||||
HEADERS?: Headers | Resolver<Headers> | 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,
|
||||
};
|
||||
|
@ -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"}`);
|
@ -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 = <T>(
|
||||
value: T | null | undefined,
|
||||
): value is Exclude<T, null | undefined> => {
|
||||
return value !== undefined && value !== null;
|
||||
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
||||
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, any>): 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<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||
|
||||
export const resolve = async <T>(
|
||||
options: ApiRequestOptions,
|
||||
resolver?: T | Resolver<T>,
|
||||
): Promise<T | undefined> => {
|
||||
if (typeof resolver === "function") {
|
||||
return (resolver as Resolver<T>)(options);
|
||||
}
|
||||
return resolver;
|
||||
export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
|
||||
if (typeof resolver === 'function') {
|
||||
return (resolver as Resolver<T>)(options);
|
||||
}
|
||||
return resolver;
|
||||
};
|
||||
|
||||
export const getHeaders = async (
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
formData?: FormData,
|
||||
): Promise<Record<string, string>> => {
|
||||
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<Record<string, string>> => {
|
||||
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<string, string>,
|
||||
);
|
||||
}), {} as Record<string, string>);
|
||||
|
||||
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 <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
url: string,
|
||||
body: any,
|
||||
formData: FormData | undefined,
|
||||
headers: Record<string, string>,
|
||||
onCancel: OnCancel,
|
||||
axiosClient: AxiosInstance,
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
url: string,
|
||||
body: any,
|
||||
formData: FormData | undefined,
|
||||
headers: Record<string, string>,
|
||||
onCancel: OnCancel,
|
||||
axiosClient: AxiosInstance
|
||||
): Promise<AxiosResponse<T>> => {
|
||||
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<T>;
|
||||
if (axiosError.response) {
|
||||
return axiosError.response;
|
||||
try {
|
||||
return await axiosClient.request(requestConfig);
|
||||
} catch (error) {
|
||||
const axiosError = error as AxiosError<T>;
|
||||
if (axiosError.response) {
|
||||
return axiosError.response;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const getResponseHeader = (
|
||||
response: AxiosResponse<any>,
|
||||
responseHeader?: string,
|
||||
): string | undefined => {
|
||||
if (responseHeader) {
|
||||
const content = response.headers[responseHeader];
|
||||
if (isString(content)) {
|
||||
return content;
|
||||
export const getResponseHeader = (response: AxiosResponse<any>, 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>): 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<number, string> = {
|
||||
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<number, string> = {
|
||||
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<T>
|
||||
* @throws ApiError
|
||||
*/
|
||||
export const request = <T>(
|
||||
config: OpenAPIConfig,
|
||||
options: ApiRequestOptions,
|
||||
axiosClient: AxiosInstance = axios,
|
||||
): CancelablePromise<T> => {
|
||||
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 = <T>(config: OpenAPIConfig, options: ApiRequestOptions, axiosClient: AxiosInstance = axios): CancelablePromise<T> => {
|
||||
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<T>(
|
||||
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<T>(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);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -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';
|
||||
|
@ -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<categoryDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<categoryDto>;
|
||||
};
|
||||
|
||||
|
@ -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<categoryRevisionDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<categoryRevisionDto>;
|
||||
};
|
||||
|
||||
|
@ -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<optionsRevisionDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<optionsRevisionDto>;
|
||||
};
|
||||
|
||||
|
@ -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<orderViewDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<orderViewDto>;
|
||||
};
|
||||
|
||||
|
@ -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<productRevisionDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<productRevisionDto>;
|
||||
};
|
||||
|
||||
|
@ -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<promotionViewDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<promotionViewDto>;
|
||||
};
|
||||
|
||||
|
@ -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<sellerDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<sellerDto>;
|
||||
};
|
||||
|
||||
|
@ -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<sellerRevisionDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<sellerRevisionDto>;
|
||||
};
|
||||
|
||||
|
@ -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<textRevisionDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<textRevisionDto>;
|
||||
};
|
||||
|
||||
|
@ -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<userDto>;
|
||||
serverTimeUtc?: string;
|
||||
results?: Array<userDto>;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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<string> | 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<string> | null;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<string, any> | null;
|
||||
/**
|
||||
* A list of image references.
|
||||
*/
|
||||
images?: Array<imageReferenceDto> | 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<string, any> | null;
|
||||
/**
|
||||
* A list of image references.
|
||||
*/
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
type?: string;
|
||||
});
|
||||
|
||||
|
@ -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;
|
||||
});
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<selectedProductDto> | 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<selectedProductDto> | 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;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
discountType: discountType;
|
||||
value: number;
|
||||
readonly type?: 'bundle_discount' | null;
|
||||
productIds: Array<string> | null;
|
||||
discountType: discountType;
|
||||
value: number;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
readonly type?: "bundle" | null;
|
||||
effect?: triggerEffect;
|
||||
productIds?: Array<string> | null;
|
||||
readonly type?: 'bundle' | null;
|
||||
};
|
||||
|
||||
|
@ -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<calculatedProductDto> | 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<calculatedProductDto> | 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<string> | null;
|
||||
/**
|
||||
* Gets or sets the list of unavailable products related to this checkout.
|
||||
*/
|
||||
unavailableProducts?: Array<productUnavailableDto> | 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<string, {
|
||||
/**
|
||||
* Currency code ISO 4217
|
||||
*/
|
||||
currency?: string;
|
||||
value?: number;
|
||||
}> | 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<string> | null;
|
||||
/**
|
||||
* Gets or sets the list of unavailable products related to this checkout.
|
||||
*/
|
||||
unavailableProducts?: Array<productUnavailableDto> | 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;
|
||||
};
|
||||
|
||||
|
@ -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<string> | 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<string, {
|
||||
/**
|
||||
* Currency code ISO 4217
|
||||
*/
|
||||
currency?: string;
|
||||
value?: number;
|
||||
}> | 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<string> | null;
|
||||
};
|
||||
|
||||
|
@ -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<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
sortOrder?: number;
|
||||
id?: string;
|
||||
revisionId?: string;
|
||||
promotionIds?: Array<string> | null;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
isAvailable?: boolean;
|
||||
isStopListed?: boolean;
|
||||
tags?: Array<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
sortOrder?: number;
|
||||
id?: string;
|
||||
revisionId?: string;
|
||||
promotionIds?: Array<string> | null;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
isAvailable?: boolean;
|
||||
isStopListed?: boolean;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
sellerId?: string;
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
id?: string;
|
||||
updatedByUserId?: string;
|
||||
utcUpdated?: string;
|
||||
promotionIds?: Array<string> | null;
|
||||
sellerId?: string;
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
id?: string;
|
||||
updatedByUserId?: string;
|
||||
utcUpdated?: string;
|
||||
};
|
||||
|
||||
|
@ -3,8 +3,9 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type categoryQueryRequestDto = {
|
||||
categoryIds?: Array<string> | null;
|
||||
sellerId?: string | null;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
categoryIds?: Array<string> | null;
|
||||
sellerId?: string | null;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
};
|
||||
|
||||
|
@ -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<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | 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<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | 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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -3,5 +3,6 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type categoryStopListDto = {
|
||||
categoryIds: Array<string>;
|
||||
categoryIds: Array<string>;
|
||||
};
|
||||
|
||||
|
@ -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<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
sortOrder?: number;
|
||||
revisionId?: string;
|
||||
categoryId?: string;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
tags?: Array<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
sortOrder?: number;
|
||||
revisionId?: string;
|
||||
categoryId?: string;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
sellerId?: string;
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
promotionIds?: Array<string> | null;
|
||||
sellerId?: string;
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
};
|
||||
|
||||
|
@ -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<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
sortOrder?: number;
|
||||
tags?: Array<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
sortOrder?: number;
|
||||
};
|
||||
|
||||
|
@ -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<optionDto> | null;
|
||||
additional?: Record<string, any> | 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<optionDto> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
};
|
||||
|
||||
|
@ -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<iTriggerDto> | null;
|
||||
sellerId?: string;
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
categoryIds?: Array<string> | null;
|
||||
sortOrder?: number;
|
||||
assets?: Array<assetCollectionDto> | null;
|
||||
isEnabled?: boolean;
|
||||
notAvailableReason?: string | null;
|
||||
tags?: Array<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
price?: {
|
||||
/**
|
||||
* Currency code ISO 4217
|
||||
*/
|
||||
currency?: string;
|
||||
value?: number;
|
||||
} | null;
|
||||
optionsIds?: Array<string> | null;
|
||||
categoryIds?: Array<string> | null;
|
||||
sortOrder?: number;
|
||||
assets?: Array<assetCollectionDto> | null;
|
||||
isEnabled?: boolean;
|
||||
notAvailableReason?: string | null;
|
||||
tags?: Array<tag> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
schedule?: scheduleDto;
|
||||
};
|
||||
|
||||
|
@ -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<baseTriggerDto> | null;
|
||||
offer: baseOfferDto;
|
||||
triggers?: Array<baseTriggerDto> | null;
|
||||
offer: baseOfferDto;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
/**
|
||||
* The availability triggers.
|
||||
*/
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
readonly type?: "restaurant" | null;
|
||||
name?: string | null;
|
||||
/**
|
||||
* Endpoint URL for the seller.
|
||||
*/
|
||||
endpoint?: string | null;
|
||||
/**
|
||||
* The promotion ids for this seller.
|
||||
*/
|
||||
promotionIds?: Array<string> | null;
|
||||
/**
|
||||
* The availability triggers.
|
||||
*/
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
readonly type?: 'restaurant' | null;
|
||||
};
|
||||
|
||||
|
@ -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<string, any> | null;
|
||||
/**
|
||||
* A list of image references.
|
||||
*/
|
||||
images?: Array<imageReferenceDto> | 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<string> | null;
|
||||
documentVersion?: number;
|
||||
schedule?: scheduleDto;
|
||||
address?: addressDto;
|
||||
contactInfo?: simpleContactDto;
|
||||
location?: gpsLocationDto;
|
||||
/**
|
||||
* A key value collection for storing additional information
|
||||
*/
|
||||
additional?: Record<string, any> | null;
|
||||
/**
|
||||
* A list of image references.
|
||||
*/
|
||||
images?: Array<imageReferenceDto> | 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<string> | null;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
/**
|
||||
* The availability triggers.
|
||||
*/
|
||||
availabilityTriggers?: Array<iTriggerDto> | 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<string> | null;
|
||||
/**
|
||||
* The availability triggers.
|
||||
*/
|
||||
availabilityTriggers?: Array<iTriggerDto> | null;
|
||||
});
|
||||
|
||||
|
@ -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<string, any> | null;
|
||||
/**
|
||||
* A list of image references.
|
||||
*/
|
||||
images?: Array<imageReferenceDto> | 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<string, any> | null;
|
||||
/**
|
||||
* A list of image references.
|
||||
*/
|
||||
images?: Array<imageReferenceDto> | null;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<string> | null;
|
||||
readonly type?: 'discount_product' | null;
|
||||
discountType: discountType;
|
||||
value: number;
|
||||
productIds: Array<string> | null;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type freeItemOfferDto = {
|
||||
readonly type?: "free_item" | null;
|
||||
productIds: Array<string> | null;
|
||||
quantity: number;
|
||||
readonly type?: 'free_item' | null;
|
||||
productIds: Array<string> | null;
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
});
|
||||
|
||||
|
@ -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<aspectType> | 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<aspectType> | null;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<string, any> | null;
|
||||
id?: string;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
price?: {
|
||||
/**
|
||||
* Currency code ISO 4217
|
||||
*/
|
||||
currency?: string;
|
||||
value?: number;
|
||||
} | null;
|
||||
isFixedPrice?: boolean;
|
||||
additional?: Record<string, any> | null;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<optionDto> | null;
|
||||
additional?: Record<string, any> | 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<optionDto> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
optionsId?: string;
|
||||
revisionId?: string;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
creatorId?: string;
|
||||
utcCreated?: string;
|
||||
isPublished?: boolean;
|
||||
utcPublished?: string | null;
|
||||
publishedByUserId?: string | null;
|
||||
};
|
||||
|
||||
|
@ -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<optionDto> | null;
|
||||
additional?: Record<string, any> | 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<optionDto> | null;
|
||||
additional?: Record<string, any> | null;
|
||||
optionsId?: string;
|
||||
revisionId?: string;
|
||||
title?: localizedTextDto;
|
||||
description?: localizedTextDto;
|
||||
};
|
||||
|
||||
|
@ -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<selectedProductDto> | 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<selectedProductDto> | 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;
|
||||
};
|
||||
|
||||
|
@ -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<selectedProductDto> | 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<selectedProductDto> | null;
|
||||
/**
|
||||
* Additional instructions or comments regarding the order.
|
||||
*/
|
||||
comments?: string | null;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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<commonOrderStatus> | null;
|
||||
/**
|
||||
* Array of order failure results to filter orders by any matching failure type.
|
||||
*/
|
||||
failureAny?: Array<commonOrderFailureResult> | 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<commonOrderStatus> | null;
|
||||
/**
|
||||
* Array of order failure results to filter orders by any matching failure type.
|
||||
*/
|
||||
failureAny?: Array<commonOrderFailureResult> | null;
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user