Merged PR 2000: open tasks

Related work items: #5309
This commit is contained in:
Lorenz Hilpert
2025-11-06 10:01:41 +00:00
committed by Nino Righi
parent 1d4c900d3a
commit 89b3d9aa60
136 changed files with 5088 additions and 4798 deletions

View File

@@ -5,10 +5,11 @@ export * from './entity-cotnainer';
export * from './entity-status';
export * from './gender';
export * from './list-response-args';
export * from './order-type';
export * from './order-type-feature';
export * from './payer-type';
export * from './price-value';
export * from './price';
export * from './product';
export * from './response-args';
export * from './return-value';
export * from './vat-type';

View File

@@ -1,10 +1,11 @@
export const OrderType = {
InStore: 'Rücklage',
Pickup: 'Abholung',
Delivery: 'Versand',
DigitalShipping: 'DIG-Versand',
B2BShipping: 'B2B-Versand',
Download: 'Download',
} as const;
export type OrderType = (typeof OrderType)[keyof typeof OrderType];
export const OrderTypeFeature = {
InStore: 'Rücklage',
Pickup: 'Abholung',
Delivery: 'Versand',
DigitalShipping: 'DIG-Versand',
B2BShipping: 'B2B-Versand',
Download: 'Download',
} as const;
export type OrderTypeFeature =
(typeof OrderTypeFeature)[keyof typeof OrderTypeFeature];

View File

@@ -0,0 +1,5 @@
import { ProductDTO as CatProductDTO } from '@generated/swagger/cat-search-api';
import { ProductDTO as CheckoutProductDTO } from '@generated/swagger/checkout-api';
import { ProductDTO as OmsProductDTO } from '@generated/swagger/oms-api';
export type Product = CatProductDTO | CheckoutProductDTO | OmsProductDTO;

View File

@@ -1,12 +1,10 @@
import z from 'zod';
export const AddressSchema = z
.object({
street: z.string().describe('Street name').optional(),
streetNumber: z.string().describe('Street number').optional(),
zipCode: z.string().describe('Postal code').optional(),
city: z.string().describe('City name').optional(),
country: z.string().describe('Country').optional(),
additionalInfo: z.string().describe('Additional information').optional(),
})
.optional();
export const AddressSchema = z.object({
street: z.string().describe('Street name').optional(),
streetNumber: z.string().describe('Street number').optional(),
zipCode: z.string().describe('Postal code').optional(),
city: z.string().describe('City name').optional(),
country: z.string().describe('Country').optional(),
additionalInfo: z.string().describe('Additional information').optional(),
});

View File

@@ -7,11 +7,15 @@ import { OrganisationSchema } from './organisation.schema';
export const AddresseeWithReferenceSchema = EntityReferenceSchema.extend({
address: AddressSchema.describe('Address').optional(),
communicationDetails: CommunicationDetailsSchema.describe('Communication details').optional(),
communicationDetails: CommunicationDetailsSchema.describe(
'Communication details',
).optional(),
firstName: z.string().describe('First name').optional(),
lastName: z.string().describe('Last name').optional(),
gender: GenderSchema.describe('Gender').optional(),
locale: z.string().describe('Locale').optional(),
organisation: OrganisationSchema.describe('Organisation information').optional(),
organisation: OrganisationSchema.describe(
'Organisation information',
).optional(),
title: z.string().describe('Title').optional(),
});

View File

@@ -4,4 +4,6 @@ import { EntityStatus } from '../models';
/**
* EntityStatus is a bitwise enum with values: 0 | 1 | 2 | 4 | 8
*/
export const EntityStatusSchema = z.nativeEnum(EntityStatus).describe('Entity status');
export const EntityStatusSchema = z
.nativeEnum(EntityStatus)
.describe('Entity status');

View File

@@ -13,6 +13,7 @@ export * from './gender.schema';
export * from './key-value.schema';
export * from './label.schema';
export * from './notification-channel.schema';
export * from './order-type.schema';
export * from './organisation-names.schema';
export * from './organisation.schema';
export * from './payment-type.schema';

View File

@@ -0,0 +1,14 @@
import { z } from 'zod';
export const OrderType = {
NotSet: 0,
Branch: 1,
Mail: 2,
Download: 4,
BranchAndDownload: 5, // Branch | Download
MailAndDownload: 6, // Mail | Download
} as const;
export const OrderTypeSchema = z.nativeEnum(OrderType).describe('Order type');
export type OrderType = z.infer<typeof OrderTypeSchema>;