@floristcloud/api-lib 1.2.225 → 1.2.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commands/integration/moysklad/index.js +0 -4
- package/build/commands/order/get-order-list.query.js +70 -4
- package/build/constant/error.js +7 -30
- package/build/constant/index.js +0 -1
- package/build/constant/settings.constant.js +6 -1
- package/build/constant/validation-i18n-key.js +1 -0
- package/build/constant/validation-i18n-message.js +1 -0
- package/build/enum/external-entity-type.enum.js +0 -1
- package/build/enum/index.js +2 -2
- package/build/enum/notification-type.enum.js +0 -3
- package/build/enum/webshop-menu-item-color.enum.js +12 -0
- package/build/enum/webshop-menu-item-target.enum.js +9 -0
- package/build/schemas/client/register-client-webshop-request.schema.js +4 -5
- package/build/schemas/index.js +5 -0
- package/build/schemas/integration/moysklad/enable-moysklad-request.schema.js +0 -2
- package/build/schemas/integration/moysklad/index.js +0 -9
- package/build/schemas/integration/moysklad/moysklad-status.schema.js +0 -1
- package/build/schemas/order/index.js +0 -4
- package/build/schemas/order/order-extended.schema.js +0 -4
- package/build/schemas/pre-order/get-pre-order-list-request.schema.js +0 -2
- package/build/schemas/pre-order/pre-order.schema.js +0 -4
- package/build/schemas/settings/settings.schema.js +6 -1
- package/build/schemas/settings/webshop-featured-menu-item-badge-translations.schema.js +8 -0
- package/build/schemas/settings/webshop-featured-menu-item-name-translations.schema.js +9 -0
- package/build/schemas/settings/webshop-featured-menu-item-target.schema.js +16 -0
- package/build/schemas/settings/webshop-featured-menu-item.schema.js +36 -0
- package/build/schemas/settings/webshop-featured-menu-items.schema.js +23 -0
- package/commands/integration/moysklad/index.ts +0 -5
- package/commands/order/get-order-list.query.ts +76 -3
- package/constant/error.ts +7 -30
- package/constant/index.ts +0 -1
- package/constant/settings.constant.ts +7 -0
- package/constant/validation-i18n-key.ts +1 -0
- package/constant/validation-i18n-message.ts +1 -0
- package/enum/external-entity-type.enum.ts +0 -1
- package/enum/index.ts +2 -3
- package/enum/notification-type.enum.ts +0 -3
- package/enum/webshop-menu-item-color.enum.ts +8 -0
- package/enum/webshop-menu-item-target.enum.ts +5 -0
- package/package.json +1 -1
- package/schemas/client/register-client-webshop-request.schema.ts +4 -10
- package/schemas/index.ts +5 -0
- package/schemas/integration/moysklad/enable-moysklad-request.schema.ts +0 -2
- package/schemas/integration/moysklad/index.ts +0 -10
- package/schemas/integration/moysklad/moysklad-status.schema.ts +0 -1
- package/schemas/order/index.ts +0 -8
- package/schemas/order/order-extended.schema.ts +0 -4
- package/schemas/pre-order/get-pre-order-list-request.schema.ts +0 -2
- package/schemas/pre-order/pre-order.schema.ts +0 -4
- package/schemas/settings/settings.schema.ts +6 -0
- package/schemas/settings/webshop-featured-menu-item-badge-translations.schema.ts +9 -0
- package/schemas/settings/webshop-featured-menu-item-name-translations.schema.ts +10 -0
- package/schemas/settings/webshop-featured-menu-item-target.schema.ts +14 -0
- package/schemas/settings/webshop-featured-menu-item.schema.ts +34 -0
- package/schemas/settings/webshop-featured-menu-items.schema.ts +21 -0
- package/build/commands/integration/moysklad/get-moysklad-money-account-links.query.js +0 -8
- package/build/commands/integration/moysklad/get-moysklad-payment-sync-check.query.js +0 -10
- package/build/commands/integration/moysklad/list-moysklad-money-targets.query.js +0 -8
- package/build/commands/integration/moysklad/save-moysklad-money-account-link.command.js +0 -10
- package/build/constant/client-registration.constant.js +0 -11
- package/build/enum/money-account-integration-link-kind.enum.js +0 -9
- package/build/enum/order-source.enum.js +0 -9
- package/build/enum/payment-invoice-file-deletion-status.enum.js +0 -9
- package/build/schemas/integration/moysklad/moysklad-money-account-link.schema.js +0 -11
- package/build/schemas/integration/moysklad/moysklad-money-account-links-response.schema.js +0 -6
- package/build/schemas/integration/moysklad/moysklad-money-target-ref.schema.js +0 -17
- package/build/schemas/integration/moysklad/moysklad-money-target.schema.js +0 -14
- package/build/schemas/integration/moysklad/moysklad-money-targets-response.schema.js +0 -6
- package/build/schemas/integration/moysklad/moysklad-payment-sync-check-request.schema.js +0 -8
- package/build/schemas/integration/moysklad/moysklad-payment-sync-check-response.schema.js +0 -6
- package/build/schemas/integration/moysklad/moysklad-payment-sync-check.schema.js +0 -10
- package/build/schemas/integration/moysklad/save-moysklad-money-account-link-request.schema.js +0 -10
- package/build/schemas/order/get-order-list-request.schema.js +0 -67
- package/build/schemas/order/get-order-list-response-data.schema.js +0 -6
- package/build/schemas/order/get-order-list-response.schema.js +0 -6
- package/build/schemas/order/order-creator.schema.js +0 -5
- package/commands/integration/moysklad/get-moysklad-money-account-links.query.ts +0 -7
- package/commands/integration/moysklad/get-moysklad-payment-sync-check.query.ts +0 -10
- package/commands/integration/moysklad/list-moysklad-money-targets.query.ts +0 -7
- package/commands/integration/moysklad/save-moysklad-money-account-link.command.ts +0 -10
- package/constant/client-registration.constant.ts +0 -8
- package/enum/money-account-integration-link-kind.enum.ts +0 -5
- package/enum/order-source.enum.ts +0 -8
- package/enum/payment-invoice-file-deletion-status.enum.ts +0 -5
- package/schemas/integration/moysklad/moysklad-money-account-link.schema.ts +0 -9
- package/schemas/integration/moysklad/moysklad-money-account-links-response.schema.ts +0 -4
- package/schemas/integration/moysklad/moysklad-money-target-ref.schema.ts +0 -15
- package/schemas/integration/moysklad/moysklad-money-target.schema.ts +0 -12
- package/schemas/integration/moysklad/moysklad-money-targets-response.schema.ts +0 -4
- package/schemas/integration/moysklad/moysklad-payment-sync-check-request.schema.ts +0 -6
- package/schemas/integration/moysklad/moysklad-payment-sync-check-response.schema.ts +0 -4
- package/schemas/integration/moysklad/moysklad-payment-sync-check.schema.ts +0 -8
- package/schemas/integration/moysklad/save-moysklad-money-account-link-request.schema.ts +0 -8
- package/schemas/order/get-order-list-request.schema.ts +0 -71
- package/schemas/order/get-order-list-response-data.schema.ts +0 -3
- package/schemas/order/get-order-list-response.schema.ts +0 -3
- package/schemas/order/order-creator.schema.ts +0 -2
package/constant/error.ts
CHANGED
|
@@ -68,11 +68,6 @@ export const ERRORS = {
|
|
|
68
68
|
MONEY_ACCOUNT_FETCH_FAILED: { code: 'M006', message: 'Error when retrieving a list of money accounts', httpCode: 500 },
|
|
69
69
|
MONEY_ACCOUNT_HAS_TRANSACTIONS: { code: 'M007', message: 'Money account has transactions', httpCode: 400 },
|
|
70
70
|
MONEY_ACCOUNT_ACCESS_DENIED: { code: 'M008', message: 'Money account access denied', httpCode: 500 },
|
|
71
|
-
MONEY_ACCOUNT_INTEGRATION_LINK_FAILED: {
|
|
72
|
-
code: 'M009',
|
|
73
|
-
message: 'Failed to read or save money account integration link',
|
|
74
|
-
httpCode: 500,
|
|
75
|
-
},
|
|
76
71
|
|
|
77
72
|
//NOTIFICATION
|
|
78
73
|
NOTIFICATION_NOT_CREATED: { code: 'N001', message: 'Failed to create Notification', httpCode: 500 },
|
|
@@ -142,6 +137,13 @@ export const ERRORS = {
|
|
|
142
137
|
message: 'At least one of pickup or delivery must stay enabled',
|
|
143
138
|
httpCode: 400,
|
|
144
139
|
},
|
|
140
|
+
// Пункт меню витрины ведёт на категорию или коллекцию, которой у компании нет (чужая, удалена,
|
|
141
|
+
// каталог постоянных заказов).
|
|
142
|
+
SETTINGS_FEATURED_MENU_ITEM_TARGET_NOT_FOUND: {
|
|
143
|
+
code: 'S009',
|
|
144
|
+
message: 'Webshop featured menu item target does not belong to the company',
|
|
145
|
+
httpCode: 400,
|
|
146
|
+
},
|
|
145
147
|
|
|
146
148
|
FORBIDDEN_API: { code: 'A011', message: 'Access denied', httpCode: 403 },
|
|
147
149
|
RESOURCE_ACCESS_DENIED: { code: 'A022', message: 'Resource does not belong to your company', httpCode: 400 },
|
|
@@ -1896,11 +1898,6 @@ export const ERRORS = {
|
|
|
1896
1898
|
message: 'Latest sync job for this entity is not DEAD; cannot retry',
|
|
1897
1899
|
httpCode: 409,
|
|
1898
1900
|
},
|
|
1899
|
-
OUTBOUND_SYNC_ENTITY_LOCK_LOST: {
|
|
1900
|
-
code: 'OS006',
|
|
1901
|
-
message: 'Outbound sync job lost its entity lock before writing to the external system; will retry shortly',
|
|
1902
|
-
httpCode: 409,
|
|
1903
|
-
},
|
|
1904
1901
|
MOYSKLAD_STOCK_SYNC_CAP_EXCEEDED: {
|
|
1905
1902
|
code: 'MS015',
|
|
1906
1903
|
message: 'MoySklad stock-sync concurrency cap exceeded; will retry shortly',
|
|
@@ -1941,26 +1938,6 @@ export const ERRORS = {
|
|
|
1941
1938
|
message: 'The demand is waiting for the order to be pushed to MoySklad; will retry shortly',
|
|
1942
1939
|
httpCode: 409,
|
|
1943
1940
|
},
|
|
1944
|
-
MOYSKLAD_PAYMENT_CLIENT_NOT_LINKED: {
|
|
1945
|
-
code: 'MS024',
|
|
1946
|
-
message: 'Payment client has no MoySklad link; import clients first',
|
|
1947
|
-
httpCode: 400,
|
|
1948
|
-
},
|
|
1949
|
-
MOYSKLAD_PAYMENT_WAITING_ORDER_PUSH: {
|
|
1950
|
-
code: 'MS025',
|
|
1951
|
-
message: 'The payment is waiting for its order to be created in MoySklad; will retry shortly',
|
|
1952
|
-
httpCode: 409,
|
|
1953
|
-
},
|
|
1954
|
-
MOYSKLAD_MONEY_TARGET_NOT_FOUND: {
|
|
1955
|
-
code: 'MS026',
|
|
1956
|
-
message: 'The MoySklad cash desk or bank account was not found in the connected account',
|
|
1957
|
-
httpCode: 400,
|
|
1958
|
-
},
|
|
1959
|
-
MOYSKLAD_PAYMENT_CREATE_LOCK_BUSY: {
|
|
1960
|
-
code: 'MS027',
|
|
1961
|
-
message: 'Another payment is being created in MoySklad for this account; will retry shortly',
|
|
1962
|
-
httpCode: 409,
|
|
1963
|
-
},
|
|
1964
1941
|
|
|
1965
1942
|
// 1C COMMERCEML INTEGRATION
|
|
1966
1943
|
ONE_C_NOT_CONNECTED: { code: 'OC001', message: '1C integration is not connected for this company', httpCode: 404 },
|
package/constant/index.ts
CHANGED
|
@@ -8,7 +8,6 @@ export * from './report.constant';
|
|
|
8
8
|
export * from './oksm';
|
|
9
9
|
export * from './okei';
|
|
10
10
|
export * from './contact-phone.constant';
|
|
11
|
-
export * from './client-registration.constant';
|
|
12
11
|
export * from './settings.constant';
|
|
13
12
|
export * from './consignment-product-enrichment.constant';
|
|
14
13
|
export * from './attribute-normalization.constant';
|
|
@@ -7,3 +7,10 @@ export const DELIVERY_TIME_SLOTS_MAX_LENGTH = 24;
|
|
|
7
7
|
|
|
8
8
|
// Время суток в слотах доставки — `HH:mm` по часам компании (её `timeZone`), 00:00–23:59.
|
|
9
9
|
export const TIME_OF_DAY_PATTERN = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
10
|
+
|
|
11
|
+
// Выделенных пунктов меню витрины — не больше пяти: блок стоит над каталогом и не должен его вытеснять.
|
|
12
|
+
export const WEBSHOP_FEATURED_MENU_ITEMS_MAX_LENGTH = 5;
|
|
13
|
+
|
|
14
|
+
// Подпись пункта и бейдж рисуются в одну строку сайдбара.
|
|
15
|
+
export const WEBSHOP_FEATURED_MENU_ITEM_NAME_MAX_LENGTH = 60;
|
|
16
|
+
export const WEBSHOP_FEATURED_MENU_ITEM_BADGE_MAX_LENGTH = 20;
|
|
@@ -41,6 +41,7 @@ export const ValidationI18nKey = {
|
|
|
41
41
|
timeOfDayFormat: 'validation.timeOfDayFormat',
|
|
42
42
|
deliveryTimeSlotRange: 'validation.deliveryTimeSlotRange',
|
|
43
43
|
deliveryTimeSlotDuplicate: 'validation.deliveryTimeSlotDuplicate',
|
|
44
|
+
featuredMenuItemDuplicate: 'validation.featuredMenuItemDuplicate',
|
|
44
45
|
} as const;
|
|
45
46
|
|
|
46
47
|
export type ValidationI18nKeyType = (typeof ValidationI18nKey)[keyof typeof ValidationI18nKey];
|
|
@@ -45,6 +45,7 @@ export const VALIDATION_I18N_MESSAGE: Record<ValidationI18nKeyType, string> = {
|
|
|
45
45
|
[ValidationI18nKey.timeOfDayFormat]: 'Time must be in HH:mm format',
|
|
46
46
|
[ValidationI18nKey.deliveryTimeSlotRange]: 'Delivery time slot must end after it starts',
|
|
47
47
|
[ValidationI18nKey.deliveryTimeSlotDuplicate]: 'The same delivery time slot is listed twice',
|
|
48
|
+
[ValidationI18nKey.featuredMenuItemDuplicate]: 'The same webshop menu item is listed twice',
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
/**
|
package/enum/index.ts
CHANGED
|
@@ -57,7 +57,6 @@ export * from './image-type.enum';
|
|
|
57
57
|
export * from './import-error-code.enum';
|
|
58
58
|
export * from './integration-check-status.enum';
|
|
59
59
|
export * from './integration-provider.enum';
|
|
60
|
-
export * from './money-account-integration-link-kind.enum';
|
|
61
60
|
export * from './integration-status.enum';
|
|
62
61
|
export * from './inventory-movement-type.enum';
|
|
63
62
|
export * from './invoice-product-field.enum';
|
|
@@ -158,6 +157,8 @@ export * from './user-type.enum';
|
|
|
158
157
|
export * from './userRole.enum';
|
|
159
158
|
export * from './userStatus.enum';
|
|
160
159
|
export * from './webshop-main-display-mode.enum';
|
|
160
|
+
export * from './webshop-menu-item-color.enum';
|
|
161
|
+
export * from './webshop-menu-item-target.enum';
|
|
161
162
|
export * from './webshop-mode.enum';
|
|
162
163
|
export * from './write-off-breakdown-group-by.enum';
|
|
163
164
|
export * from './write-off-report-date-basis.enum';
|
|
@@ -203,5 +204,3 @@ export * from './product-resolution-image-reason.enum';
|
|
|
203
204
|
export * from './product-resolution-matched-attribute.enum';
|
|
204
205
|
export * from './product-resolution-decision-action.enum';
|
|
205
206
|
export * from './product-resolution-write-mode.enum';
|
|
206
|
-
|
|
207
|
-
export * from './order-source.enum';
|
|
@@ -22,7 +22,4 @@ export enum NotificationTypeEnum {
|
|
|
22
22
|
PRE_ORDER_CREATED = 'PRE_ORDER_CREATED',
|
|
23
23
|
// Клиенту: рассылка сценария PRE_ORDER_COLLECTION_OPENED — открыт сбор предзаказов.
|
|
24
24
|
PRE_ORDER_COLLECTION_OPENED = 'PRE_ORDER_COLLECTION_OPENED',
|
|
25
|
-
// Админам: на витрине подана заявка с телефоном или email клиента, у которого нет учётной записи.
|
|
26
|
-
// Заявитель получает нейтральный ответ; привязывать заявку к клиенту автоматически нельзя — это захват аккаунта.
|
|
27
|
-
CLIENT_REGISTRATION_CONFLICT = 'CLIENT_REGISTRATION_CONFLICT',
|
|
28
25
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Палитра выделенного пункта меню витрины. Цвета фиксированные, а не hex: контраст с текстом
|
|
2
|
+
// подбирает витрина, произвольный цвет дал бы нечитаемый пункт.
|
|
3
|
+
export enum WebshopMenuItemColorEnum {
|
|
4
|
+
ACCENT = 'ACCENT',
|
|
5
|
+
RED = 'RED',
|
|
6
|
+
GREEN = 'GREEN',
|
|
7
|
+
GOLD = 'GOLD',
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
import { PasswordSchema } from '../auth/password.schema';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ClientTypeEnum } from '../../enum/client-type.enum';
|
|
4
|
-
import {
|
|
5
|
-
CLIENT_REGISTRATION_CONTACT_NAME_MAX_LENGTH,
|
|
6
|
-
CLIENT_REGISTRATION_EMAIL_MAX_LENGTH,
|
|
7
|
-
CLIENT_REGISTRATION_NAME_MAX_LENGTH,
|
|
8
|
-
CLIENT_REGISTRATION_PHONE_MAX_LENGTH,
|
|
9
|
-
} from '../../constant/client-registration.constant';
|
|
10
4
|
|
|
11
5
|
export const RegisterClientWebshopRequestSchema = z.object({
|
|
12
|
-
name: z.string()
|
|
6
|
+
name: z.string(),
|
|
13
7
|
password: PasswordSchema,
|
|
14
|
-
contactName: z.string().
|
|
15
|
-
phone: z.string()
|
|
16
|
-
email: z.email().
|
|
8
|
+
contactName: z.string().nullable(),
|
|
9
|
+
phone: z.string(),
|
|
10
|
+
email: z.email().toLowerCase(),
|
|
17
11
|
type: z.nativeEnum(ClientTypeEnum),
|
|
18
12
|
});
|
package/schemas/index.ts
CHANGED
|
@@ -114,6 +114,11 @@ export * from './settings/delivery-pricing-tiers.schema';
|
|
|
114
114
|
export * from './settings/delivery-time-slot.schema';
|
|
115
115
|
export * from './settings/delivery-time-slots.schema';
|
|
116
116
|
export * from './settings/time-of-day.schema';
|
|
117
|
+
export * from './settings/webshop-featured-menu-item.schema';
|
|
118
|
+
export * from './settings/webshop-featured-menu-item-badge-translations.schema';
|
|
119
|
+
export * from './settings/webshop-featured-menu-item-name-translations.schema';
|
|
120
|
+
export * from './settings/webshop-featured-menu-item-target.schema';
|
|
121
|
+
export * from './settings/webshop-featured-menu-items.schema';
|
|
117
122
|
export * from './settings/group-delivery-pricing-rule.schema';
|
|
118
123
|
export * from './settings/settings-private-response.schema';
|
|
119
124
|
export * from './settings/settings-private.schema';
|
|
@@ -19,6 +19,4 @@ export const EnableMoyskladRequestSchema = z.object({
|
|
|
19
19
|
// Posted demand (отгрузка) in MS. No default on purpose: a client that does not send them keeps the saved values.
|
|
20
20
|
isDemandEnabled: z.boolean().optional(),
|
|
21
21
|
demandOrderStatus: z.enum(MOYSKLAD_DEMAND_ORDER_STATUS_LIST).optional(),
|
|
22
|
-
// Выгрузка оплат клиентов в МС. Без default по той же причине, что у отгрузок.
|
|
23
|
-
isPaymentSyncEnabled: z.boolean().optional(),
|
|
24
22
|
});
|
|
@@ -32,13 +32,3 @@ export * from './seller-sync-status.schema';
|
|
|
32
32
|
export * from './seller-sync-status-response.schema';
|
|
33
33
|
|
|
34
34
|
export * from './seller-sync-request.schema';
|
|
35
|
-
|
|
36
|
-
export * from './moysklad-money-target-ref.schema';
|
|
37
|
-
export * from './moysklad-money-target.schema';
|
|
38
|
-
export * from './moysklad-money-targets-response.schema';
|
|
39
|
-
export * from './moysklad-money-account-link.schema';
|
|
40
|
-
export * from './moysklad-money-account-links-response.schema';
|
|
41
|
-
export * from './save-moysklad-money-account-link-request.schema';
|
|
42
|
-
export * from './moysklad-payment-sync-check-request.schema';
|
|
43
|
-
export * from './moysklad-payment-sync-check.schema';
|
|
44
|
-
export * from './moysklad-payment-sync-check-response.schema';
|
package/schemas/order/index.ts
CHANGED
|
@@ -29,11 +29,3 @@ export * from './order-vat-transition-execute-result.schema';
|
|
|
29
29
|
export * from './order-vat-transition-execute-response.schema';
|
|
30
30
|
|
|
31
31
|
export * from './order-vat-source-confirmation.schema';
|
|
32
|
-
|
|
33
|
-
export * from './get-order-list-request.schema';
|
|
34
|
-
|
|
35
|
-
export * from './get-order-list-response.schema';
|
|
36
|
-
|
|
37
|
-
export * from './get-order-list-response-data.schema';
|
|
38
|
-
|
|
39
|
-
export * from './order-creator.schema';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { OrderCreatorSchema } from './order-creator.schema';
|
|
2
|
-
import { OrderSourceEnum } from '../../enum/order-source.enum';
|
|
3
1
|
import { z } from 'zod';
|
|
4
2
|
import { ClientSchema } from '../client/client-base.schema';
|
|
5
3
|
import { BranchSchema } from '../branch/branch.schema';
|
|
@@ -8,8 +6,6 @@ import { DeliveryRouteSchema } from '../delivery-route/delivery-route.schema';
|
|
|
8
6
|
import { OrderSchema } from './order-base.schema';
|
|
9
7
|
|
|
10
8
|
export const OrderExtendedSchema = OrderSchema.extend({
|
|
11
|
-
source: z.nativeEnum(OrderSourceEnum).nullable(),
|
|
12
|
-
creator: OrderCreatorSchema.nullable(),
|
|
13
9
|
client: ClientSchema,
|
|
14
10
|
branch: BranchSchema.nullable(),
|
|
15
11
|
delivery: OrderDeliverySchema.nullable(),
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { OrderSourceEnum } from '../../enum/order-source.enum';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import { optionalQueryBooleanSchema } from '../../helpers/optional-query-boolean.helper';
|
|
4
3
|
import { PreOrderStatusEnum } from '../../enum';
|
|
5
4
|
|
|
6
5
|
export const GetPreOrderListRequestSchema = z.object({
|
|
7
|
-
source: z.nativeEnum(OrderSourceEnum).optional(),
|
|
8
6
|
page: z.string().transform(val => Number(val) || 1),
|
|
9
7
|
excludeClosed: optionalQueryBooleanSchema,
|
|
10
8
|
count: z.coerce.number().optional().default(10),
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { OrderCreatorSchema } from '../order/order-creator.schema';
|
|
2
|
-
import { OrderSourceEnum } from '../../enum/order-source.enum';
|
|
3
1
|
import { PreOrderConversionCurrentOrderSchema } from './pre-order-conversion-current-order.schema';
|
|
4
2
|
import { PreOrderConversionChangeSchema } from './pre-order-conversion-change.schema';
|
|
5
3
|
import { PreOrderConversionSummarySchema } from './pre-order-conversion-summary.schema';
|
|
@@ -25,8 +23,6 @@ export const PreOrderSchema = z.object({
|
|
|
25
23
|
});
|
|
26
24
|
|
|
27
25
|
export const PreOrderExtendedSchema = PreOrderSchema.extend({
|
|
28
|
-
source: z.nativeEnum(OrderSourceEnum).nullable(),
|
|
29
|
-
creator: OrderCreatorSchema.nullable(),
|
|
30
26
|
client: ClientSchema,
|
|
31
27
|
branch: BranchSchema.nullable(),
|
|
32
28
|
preOrderCollection: PreOrderCollectionSchema.nullable(),
|
|
@@ -24,6 +24,8 @@ import { DeliveryPricingInTransitModeEnum } from '../../enum/delivery-pricing-in
|
|
|
24
24
|
import { DeliveryPricingRulesSchema } from './delivery-pricing-rules.schema';
|
|
25
25
|
import { DeliveryPricingTierSchema } from './delivery-pricing-tier.schema';
|
|
26
26
|
import { DeliveryTimeSlotsSchema } from './delivery-time-slots.schema';
|
|
27
|
+
import { WebshopFeaturedMenuItemTargetSchema } from './webshop-featured-menu-item-target.schema';
|
|
28
|
+
import { WebshopFeaturedMenuItemsSchema } from './webshop-featured-menu-items.schema';
|
|
27
29
|
|
|
28
30
|
// Preserve existing direct imports and contracts package exports.
|
|
29
31
|
export { DeliveryPricingRuleSchema } from './delivery-pricing-rule.schema';
|
|
@@ -159,12 +161,15 @@ export const SettingsSchema = z.object({
|
|
|
159
161
|
isDeliveryEnabled: z.boolean(),
|
|
160
162
|
deliveryTimeSlots: DeliveryTimeSlotsSchema.nullable(),
|
|
161
163
|
employeeClientScopeEnabled: z.boolean(),
|
|
164
|
+
webshopFeaturedMenuItems: WebshopFeaturedMenuItemsSchema.nullable(),
|
|
162
165
|
telegramStaffBotName: z.string().nullable().optional(),
|
|
163
166
|
});
|
|
164
167
|
|
|
165
168
|
export const SettingsForAdminSchema = SettingsSchema.extend({
|
|
166
169
|
deliveryPricingRules: DeliveryPricingRulesSchema.nullable(),
|
|
167
170
|
deliveryPricingInTransitMode: z.nativeEnum(DeliveryPricingInTransitModeEnum),
|
|
171
|
+
// Цели выделенных пунктов меню витрины: имя и доступность, по одной на пункт.
|
|
172
|
+
webshopFeaturedMenuItemTargets: z.array(WebshopFeaturedMenuItemTargetSchema),
|
|
168
173
|
// post terminal settings
|
|
169
174
|
vatTag: z.string().nullable(),
|
|
170
175
|
taxMode: z.string().nullable(),
|
|
@@ -324,6 +329,7 @@ export const UpdateSettingsRequestSchema = z.object({
|
|
|
324
329
|
isDeliveryEnabled: z.boolean().optional(),
|
|
325
330
|
deliveryTimeSlots: DeliveryTimeSlotsSchema.nullable().optional(),
|
|
326
331
|
employeeClientScopeEnabled: z.coerce.boolean().optional(),
|
|
332
|
+
webshopFeaturedMenuItems: WebshopFeaturedMenuItemsSchema.nullable().optional(),
|
|
327
333
|
// post terminal settings
|
|
328
334
|
vatTag: z.string().nullable().optional(),
|
|
329
335
|
taxMode: z.string().nullable().optional(),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WEBSHOP_FEATURED_MENU_ITEM_BADGE_MAX_LENGTH } from '../../constant/settings.constant';
|
|
3
|
+
import { LanguageEnum } from '../../enum/language.enum';
|
|
4
|
+
|
|
5
|
+
// Переводы бейджа пункта меню витрины — с тем же потолком длины, что и сам бейдж.
|
|
6
|
+
export const WebshopFeaturedMenuItemBadgeTranslationsSchema = z.partialRecord(
|
|
7
|
+
z.enum(LanguageEnum),
|
|
8
|
+
z.string().trim().max(WEBSHOP_FEATURED_MENU_ITEM_BADGE_MAX_LENGTH),
|
|
9
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WEBSHOP_FEATURED_MENU_ITEM_NAME_MAX_LENGTH } from '../../constant/settings.constant';
|
|
3
|
+
import { LanguageEnum } from '../../enum/language.enum';
|
|
4
|
+
|
|
5
|
+
// Переводы подписи пункта меню витрины — с тем же потолком длины, что и сама подпись: общий
|
|
6
|
+
// `LocalizedNameSchema` допускает 255 символов, а пункт рисуется в одну строку сайдбара.
|
|
7
|
+
export const WebshopFeaturedMenuItemNameTranslationsSchema = z.partialRecord(
|
|
8
|
+
z.enum(LanguageEnum),
|
|
9
|
+
z.string().trim().max(WEBSHOP_FEATURED_MENU_ITEM_NAME_MAX_LENGTH),
|
|
10
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WebshopMenuItemTargetEnum } from '../../enum/webshop-menu-item-target.enum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Цель выделенного пункта глазами панели: имя для автокомплита и признак, увидит ли её витрина.
|
|
6
|
+
* `name: null` — цели больше нет (удалена). `isAvailable: false` — категория в архиве или удалена,
|
|
7
|
+
* коллекция закрыта, удалена или её срок приёма заказов истёк.
|
|
8
|
+
*/
|
|
9
|
+
export const WebshopFeaturedMenuItemTargetSchema = z.object({
|
|
10
|
+
targetType: z.nativeEnum(WebshopMenuItemTargetEnum),
|
|
11
|
+
targetUUID: z.string().uuid(),
|
|
12
|
+
name: z.string().nullable(),
|
|
13
|
+
isAvailable: z.boolean(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WEBSHOP_FEATURED_MENU_ITEM_BADGE_MAX_LENGTH, WEBSHOP_FEATURED_MENU_ITEM_NAME_MAX_LENGTH } from '../../constant/settings.constant';
|
|
3
|
+
import { ValidationI18nKey } from '../../constant/validation-i18n-key';
|
|
4
|
+
import { WebshopMenuItemColorEnum } from '../../enum/webshop-menu-item-color.enum';
|
|
5
|
+
import { WebshopMenuItemTargetEnum } from '../../enum/webshop-menu-item-target.enum';
|
|
6
|
+
import { WebshopFeaturedMenuItemBadgeTranslationsSchema } from './webshop-featured-menu-item-badge-translations.schema';
|
|
7
|
+
import { WebshopFeaturedMenuItemNameTranslationsSchema } from './webshop-featured-menu-item-name-translations.schema';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Выделенный пункт меню витрины: ссылка на категорию или коллекцию предзаказа над каталогом.
|
|
11
|
+
*
|
|
12
|
+
* `uuid` генерирует панель — это ключ строки для перетаскивания, сервер его не назначает.
|
|
13
|
+
* Пустое `name` — витрина подписывает пункт именем цели. Показывать ли пункт конкретному клиенту,
|
|
14
|
+
* решает витрина: пункт виден, только если его цель есть в списках категорий и коллекций, которые
|
|
15
|
+
* она загружает для этого клиента. Окно `activeFrom`–`activeTo` — моменты времени ISO 8601.
|
|
16
|
+
*/
|
|
17
|
+
export const WebshopFeaturedMenuItemSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
uuid: z.string().uuid(),
|
|
20
|
+
targetType: z.nativeEnum(WebshopMenuItemTargetEnum),
|
|
21
|
+
targetUUID: z.string().uuid(),
|
|
22
|
+
name: z.string().trim().max(WEBSHOP_FEATURED_MENU_ITEM_NAME_MAX_LENGTH).nullable().optional(),
|
|
23
|
+
nameTranslations: WebshopFeaturedMenuItemNameTranslationsSchema.nullable().optional(),
|
|
24
|
+
badge: z.string().trim().max(WEBSHOP_FEATURED_MENU_ITEM_BADGE_MAX_LENGTH).nullable().optional(),
|
|
25
|
+
badgeTranslations: WebshopFeaturedMenuItemBadgeTranslationsSchema.nullable().optional(),
|
|
26
|
+
color: z.nativeEnum(WebshopMenuItemColorEnum),
|
|
27
|
+
isActive: z.boolean(),
|
|
28
|
+
activeFrom: z.string().datetime({ offset: true }).nullable().optional(),
|
|
29
|
+
activeTo: z.string().datetime({ offset: true }).nullable().optional(),
|
|
30
|
+
})
|
|
31
|
+
.refine(({ activeFrom, activeTo }) => !activeFrom || !activeTo || Date.parse(activeFrom) < Date.parse(activeTo), {
|
|
32
|
+
path: ['activeTo'],
|
|
33
|
+
message: ValidationI18nKey.dateRange,
|
|
34
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { WEBSHOP_FEATURED_MENU_ITEMS_MAX_LENGTH } from '../../constant/settings.constant';
|
|
3
|
+
import { ValidationI18nKey } from '../../constant/validation-i18n-key';
|
|
4
|
+
import { WebshopFeaturedMenuItemSchema } from './webshop-featured-menu-item.schema';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Выделенные пункты меню витрины в порядке показа. `null` в настройках — блока нет.
|
|
8
|
+
* Повтор `uuid` отклоняем: по нему панель различает строки при перетаскивании.
|
|
9
|
+
*/
|
|
10
|
+
export const WebshopFeaturedMenuItemsSchema = z
|
|
11
|
+
.array(WebshopFeaturedMenuItemSchema)
|
|
12
|
+
.max(WEBSHOP_FEATURED_MENU_ITEMS_MAX_LENGTH)
|
|
13
|
+
.superRefine((items, ctx) => {
|
|
14
|
+
const seen = new Set<string>();
|
|
15
|
+
items.forEach((item, index) => {
|
|
16
|
+
if (seen.has(item.uuid)) {
|
|
17
|
+
ctx.addIssue({ code: 'custom', path: [index, 'uuid'], message: ValidationI18nKey.featuredMenuItemDuplicate });
|
|
18
|
+
}
|
|
19
|
+
seen.add(item.uuid);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetMoyskladMoneyAccountLinksContractQuery = void 0;
|
|
4
|
-
const moysklad_money_account_links_response_schema_1 = require("../../../schemas/integration/moysklad/moysklad-money-account-links-response.schema");
|
|
5
|
-
var GetMoyskladMoneyAccountLinksContractQuery;
|
|
6
|
-
(function (GetMoyskladMoneyAccountLinksContractQuery) {
|
|
7
|
-
GetMoyskladMoneyAccountLinksContractQuery.ResponseSchema = moysklad_money_account_links_response_schema_1.MoyskladMoneyAccountLinksResponseSchema;
|
|
8
|
-
})(GetMoyskladMoneyAccountLinksContractQuery || (exports.GetMoyskladMoneyAccountLinksContractQuery = GetMoyskladMoneyAccountLinksContractQuery = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetMoyskladPaymentSyncCheckContractQuery = void 0;
|
|
4
|
-
const moysklad_payment_sync_check_request_schema_1 = require("../../../schemas/integration/moysklad/moysklad-payment-sync-check-request.schema");
|
|
5
|
-
const moysklad_payment_sync_check_response_schema_1 = require("../../../schemas/integration/moysklad/moysklad-payment-sync-check-response.schema");
|
|
6
|
-
var GetMoyskladPaymentSyncCheckContractQuery;
|
|
7
|
-
(function (GetMoyskladPaymentSyncCheckContractQuery) {
|
|
8
|
-
GetMoyskladPaymentSyncCheckContractQuery.RequestSchema = moysklad_payment_sync_check_request_schema_1.MoyskladPaymentSyncCheckRequestSchema;
|
|
9
|
-
GetMoyskladPaymentSyncCheckContractQuery.ResponseSchema = moysklad_payment_sync_check_response_schema_1.MoyskladPaymentSyncCheckResponseSchema;
|
|
10
|
-
})(GetMoyskladPaymentSyncCheckContractQuery || (exports.GetMoyskladPaymentSyncCheckContractQuery = GetMoyskladPaymentSyncCheckContractQuery = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListMoyskladMoneyTargetsContractQuery = void 0;
|
|
4
|
-
const moysklad_money_targets_response_schema_1 = require("../../../schemas/integration/moysklad/moysklad-money-targets-response.schema");
|
|
5
|
-
var ListMoyskladMoneyTargetsContractQuery;
|
|
6
|
-
(function (ListMoyskladMoneyTargetsContractQuery) {
|
|
7
|
-
ListMoyskladMoneyTargetsContractQuery.ResponseSchema = moysklad_money_targets_response_schema_1.MoyskladMoneyTargetsResponseSchema;
|
|
8
|
-
})(ListMoyskladMoneyTargetsContractQuery || (exports.ListMoyskladMoneyTargetsContractQuery = ListMoyskladMoneyTargetsContractQuery = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SaveMoyskladMoneyAccountLinkContractCommand = void 0;
|
|
4
|
-
const moysklad_money_account_links_response_schema_1 = require("../../../schemas/integration/moysklad/moysklad-money-account-links-response.schema");
|
|
5
|
-
const save_moysklad_money_account_link_request_schema_1 = require("../../../schemas/integration/moysklad/save-moysklad-money-account-link-request.schema");
|
|
6
|
-
var SaveMoyskladMoneyAccountLinkContractCommand;
|
|
7
|
-
(function (SaveMoyskladMoneyAccountLinkContractCommand) {
|
|
8
|
-
SaveMoyskladMoneyAccountLinkContractCommand.RequestSchema = save_moysklad_money_account_link_request_schema_1.SaveMoyskladMoneyAccountLinkRequestSchema;
|
|
9
|
-
SaveMoyskladMoneyAccountLinkContractCommand.ResponseSchema = moysklad_money_account_links_response_schema_1.MoyskladMoneyAccountLinksResponseSchema;
|
|
10
|
-
})(SaveMoyskladMoneyAccountLinkContractCommand || (exports.SaveMoyskladMoneyAccountLinkContractCommand = SaveMoyskladMoneyAccountLinkContractCommand = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CLIENT_REGISTRATION_EMAIL_MAX_LENGTH = exports.CLIENT_REGISTRATION_PHONE_MAX_LENGTH = exports.CLIENT_REGISTRATION_CONTACT_NAME_MAX_LENGTH = exports.CLIENT_REGISTRATION_NAME_MAX_LENGTH = void 0;
|
|
4
|
-
// Потолки полей публичной заявки на регистрацию с витрины. Тело запроса до 1 МиБ, а данные заявки уходят
|
|
5
|
-
// в письма админам и в payload уведомлений — без границы туда попадает мегабайт текста.
|
|
6
|
-
exports.CLIENT_REGISTRATION_NAME_MAX_LENGTH = 255;
|
|
7
|
-
exports.CLIENT_REGISTRATION_CONTACT_NAME_MAX_LENGTH = 255;
|
|
8
|
-
// Номер с кодом страны и разделителями укладывается с запасом.
|
|
9
|
-
exports.CLIENT_REGISTRATION_PHONE_MAX_LENGTH = 32;
|
|
10
|
-
// Предел длины адреса по RFC 5321.
|
|
11
|
-
exports.CLIENT_REGISTRATION_EMAIL_MAX_LENGTH = 254;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoneyAccountIntegrationLinkKindEnum = void 0;
|
|
4
|
-
// Куда во внешней системе ложатся деньги счёта FC. Для МойСклада: касса юрлица или его расчётный счёт.
|
|
5
|
-
var MoneyAccountIntegrationLinkKindEnum;
|
|
6
|
-
(function (MoneyAccountIntegrationLinkKindEnum) {
|
|
7
|
-
MoneyAccountIntegrationLinkKindEnum["CASH"] = "CASH";
|
|
8
|
-
MoneyAccountIntegrationLinkKindEnum["BANK"] = "BANK";
|
|
9
|
-
})(MoneyAccountIntegrationLinkKindEnum || (exports.MoneyAccountIntegrationLinkKindEnum = MoneyAccountIntegrationLinkKindEnum = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentInvoiceFileDeletionStatusEnum = void 0;
|
|
4
|
-
var PaymentInvoiceFileDeletionStatusEnum;
|
|
5
|
-
(function (PaymentInvoiceFileDeletionStatusEnum) {
|
|
6
|
-
PaymentInvoiceFileDeletionStatusEnum["READY_FOR_DELETE"] = "READY_FOR_DELETE";
|
|
7
|
-
PaymentInvoiceFileDeletionStatusEnum["DELETED"] = "DELETED";
|
|
8
|
-
PaymentInvoiceFileDeletionStatusEnum["DELETE_FAILED"] = "DELETE_FAILED";
|
|
9
|
-
})(PaymentInvoiceFileDeletionStatusEnum || (exports.PaymentInvoiceFileDeletionStatusEnum = PaymentInvoiceFileDeletionStatusEnum = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladMoneyAccountLinkSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const money_account_integration_link_kind_enum_1 = require("../../../enum/money-account-integration-link-kind.enum");
|
|
6
|
-
exports.MoyskladMoneyAccountLinkSchema = zod_1.z.object({
|
|
7
|
-
moneyAccountUUID: zod_1.z.uuid(),
|
|
8
|
-
kind: zod_1.z.nativeEnum(money_account_integration_link_kind_enum_1.MoneyAccountIntegrationLinkKindEnum),
|
|
9
|
-
organizationId: zod_1.z.string(),
|
|
10
|
-
externalAccountId: zod_1.z.string().nullable(),
|
|
11
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladMoneyAccountLinksResponseSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const moysklad_money_account_link_schema_1 = require("./moysklad-money-account-link.schema");
|
|
6
|
-
exports.MoyskladMoneyAccountLinksResponseSchema = zod_1.z.object({ data: zod_1.z.array(moysklad_money_account_link_schema_1.MoyskladMoneyAccountLinkSchema) });
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladMoneyTargetRefSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const money_account_integration_link_kind_enum_1 = require("../../../enum/money-account-integration-link-kind.enum");
|
|
6
|
-
// Место денег в МойСкладе: касса юрлица (CASH, своего id у неё нет) или его расчётный счёт (BANK, externalAccountId). Идентификаторы МойСклада —
|
|
7
|
-
// 8-4-4-4-12, но не RFC 9562, поэтому z.guid(), а не z.uuid().
|
|
8
|
-
exports.MoyskladMoneyTargetRefSchema = zod_1.z
|
|
9
|
-
.object({
|
|
10
|
-
kind: zod_1.z.nativeEnum(money_account_integration_link_kind_enum_1.MoneyAccountIntegrationLinkKindEnum),
|
|
11
|
-
organizationId: zod_1.z.guid(),
|
|
12
|
-
externalAccountId: zod_1.z.guid().nullable(),
|
|
13
|
-
})
|
|
14
|
-
.refine(target => (target.kind === money_account_integration_link_kind_enum_1.MoneyAccountIntegrationLinkKindEnum.BANK) === (target.externalAccountId !== null), {
|
|
15
|
-
message: 'externalAccountId is required for BANK and must be null for CASH',
|
|
16
|
-
path: ['externalAccountId'],
|
|
17
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladMoneyTargetSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const money_account_integration_link_kind_enum_1 = require("../../../enum/money-account-integration-link-kind.enum");
|
|
6
|
-
// Вариант для выпадающего списка: касса или расчётный счёт юрлица МойСклада с подписями.
|
|
7
|
-
exports.MoyskladMoneyTargetSchema = zod_1.z.object({
|
|
8
|
-
kind: zod_1.z.nativeEnum(money_account_integration_link_kind_enum_1.MoneyAccountIntegrationLinkKindEnum),
|
|
9
|
-
organizationId: zod_1.z.string(),
|
|
10
|
-
organizationName: zod_1.z.string(),
|
|
11
|
-
externalAccountId: zod_1.z.string().nullable(),
|
|
12
|
-
accountNumber: zod_1.z.string().nullable(),
|
|
13
|
-
bankName: zod_1.z.string().nullable(),
|
|
14
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladMoneyTargetsResponseSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const moysklad_money_target_schema_1 = require("./moysklad-money-target.schema");
|
|
6
|
-
exports.MoyskladMoneyTargetsResponseSchema = zod_1.z.object({ data: zod_1.z.array(moysklad_money_target_schema_1.MoyskladMoneyTargetSchema) });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladPaymentSyncCheckRequestSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.MoyskladPaymentSyncCheckRequestSchema = zod_1.z.object({
|
|
6
|
-
moneyAccountUUID: zod_1.z.uuid(),
|
|
7
|
-
orderUUID: zod_1.z.uuid().optional(),
|
|
8
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladPaymentSyncCheckResponseSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const moysklad_payment_sync_check_schema_1 = require("./moysklad-payment-sync-check.schema");
|
|
6
|
-
exports.MoyskladPaymentSyncCheckResponseSchema = zod_1.z.object({ data: moysklad_payment_sync_check_schema_1.MoyskladPaymentSyncCheckSchema });
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MoyskladPaymentSyncCheckSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// isSynced — оплата клиента на этот счёт уйдёт в МойСклад. isOrganizationMismatch — юрлицо счёта в МС не совпадает
|
|
6
|
-
// с юрлицом заказа: документ оплаты создастся на юрлицо счёта, но со ссылкой на заказ другого юрлица.
|
|
7
|
-
exports.MoyskladPaymentSyncCheckSchema = zod_1.z.object({
|
|
8
|
-
isSynced: zod_1.z.boolean(),
|
|
9
|
-
isOrganizationMismatch: zod_1.z.boolean(),
|
|
10
|
-
});
|
package/build/schemas/integration/moysklad/save-moysklad-money-account-link-request.schema.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SaveMoyskladMoneyAccountLinkRequestSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const moysklad_money_target_ref_schema_1 = require("./moysklad-money-target-ref.schema");
|
|
6
|
-
// target = null снимает связь: оплаты со счёта перестают уходить в МойСклад.
|
|
7
|
-
exports.SaveMoyskladMoneyAccountLinkRequestSchema = zod_1.z.object({
|
|
8
|
-
moneyAccountUUID: zod_1.z.uuid(),
|
|
9
|
-
target: moysklad_money_target_ref_schema_1.MoyskladMoneyTargetRefSchema.nullable(),
|
|
10
|
-
});
|