@axova/shared 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/lib/db.d.ts +34406 -1
- package/dist/lib/db.js +21 -1
- package/dist/middleware/storeOwnership.js +22 -3
- package/dist/middleware/storeValidationMiddleware.js +16 -39
- package/dist/schemas/admin/admin-schema.d.ts +2 -2
- package/dist/schemas/ai-moderation/ai-moderation-schema.d.ts +6 -6
- package/dist/schemas/common/common-schemas.d.ts +71 -71
- package/dist/schemas/compliance/compliance-schema.d.ts +20 -20
- package/dist/schemas/compliance/kyc-schema.d.ts +8 -8
- package/dist/schemas/customer/customer-schema.d.ts +18 -18
- package/dist/schemas/index.d.ts +28 -0
- package/dist/schemas/index.js +134 -3
- package/dist/schemas/inventory/inventory-tables.d.ts +188 -188
- package/dist/schemas/inventory/lot-tables.d.ts +102 -102
- package/dist/schemas/order/cart-schema.d.ts +2865 -0
- package/dist/schemas/order/cart-schema.js +396 -0
- package/dist/schemas/order/order-schema.d.ts +19 -19
- package/dist/schemas/order/order-schema.js +8 -2
- package/dist/schemas/product/discount-schema.d.ts +3 -3
- package/dist/schemas/product/product-schema.d.ts +3 -3
- package/dist/schemas/store/store-audit-schema.d.ts +20 -20
- package/dist/schemas/store/store-schema.d.ts +182 -2
- package/dist/schemas/store/store-schema.js +19 -0
- package/dist/schemas/store/storefront-config-schema.d.ts +434 -823
- package/dist/schemas/store/storefront-config-schema.js +35 -62
- package/dist/utils/subdomain.d.ts +1 -1
- package/dist/utils/subdomain.js +10 -15
- package/package.json +1 -1
- package/src/configs/index.ts +654 -654
- package/src/index.ts +26 -23
- package/src/interfaces/customer-events.ts +106 -106
- package/src/interfaces/inventory-events.ts +545 -545
- package/src/interfaces/inventory-types.ts +1004 -1004
- package/src/interfaces/order-events.ts +381 -381
- package/src/lib/auditLogger.ts +1117 -1117
- package/src/lib/authOrganization.ts +153 -153
- package/src/lib/db.ts +84 -64
- package/src/middleware/serviceAuth.ts +328 -328
- package/src/middleware/storeOwnership.ts +199 -181
- package/src/middleware/storeValidationMiddleware.ts +17 -50
- package/src/middleware/userAuth.ts +248 -248
- package/src/schemas/admin/admin-schema.ts +208 -208
- package/src/schemas/ai-moderation/ai-moderation-schema.ts +180 -180
- package/src/schemas/common/common-schemas.ts +108 -108
- package/src/schemas/compliance/compliance-schema.ts +927 -0
- package/src/schemas/compliance/kyc-schema.ts +649 -0
- package/src/schemas/customer/customer-schema.ts +576 -0
- package/src/schemas/index.ts +202 -3
- package/src/schemas/inventory/inventory-tables.ts +1927 -0
- package/src/schemas/inventory/lot-tables.ts +799 -0
- package/src/schemas/order/cart-schema.ts +652 -0
- package/src/schemas/order/order-schema.ts +1406 -0
- package/src/schemas/product/discount-relations.ts +44 -0
- package/src/schemas/product/discount-schema.ts +464 -0
- package/src/schemas/product/product-relations.ts +187 -0
- package/src/schemas/product/product-schema.ts +955 -0
- package/src/schemas/store/ethiopian_business_api.md.resolved +212 -0
- package/src/schemas/store/store-audit-schema.ts +1257 -0
- package/src/schemas/store/store-schema.ts +682 -0
- package/src/schemas/store/store-settings-schema.ts +231 -0
- package/src/schemas/store/storefront-config-schema.ts +382 -0
- package/src/schemas/types.ts +67 -67
- package/src/types/events.ts +646 -646
- package/src/utils/errorHandler.ts +44 -44
- package/src/utils/subdomain.ts +19 -23
- package/tsconfig.json +21 -21
package/dist/lib/db.js
CHANGED
|
@@ -37,6 +37,15 @@ exports.pool = exports.db = void 0;
|
|
|
37
37
|
const dotenv = __importStar(require("dotenv"));
|
|
38
38
|
const node_postgres_1 = require("drizzle-orm/node-postgres");
|
|
39
39
|
const pg_1 = require("pg");
|
|
40
|
+
const storeSchema = __importStar(require("../schemas/store/store-schema"));
|
|
41
|
+
const storeAuditSchema = __importStar(require("../schemas/store/store-audit-schema"));
|
|
42
|
+
const storeSettingsSchema = __importStar(require("../schemas/store/store-settings-schema"));
|
|
43
|
+
const storefrontConfigSchema = __importStar(require("../schemas/store/storefront-config-schema"));
|
|
44
|
+
const orderSchema = __importStar(require("../schemas/order/order-schema"));
|
|
45
|
+
const cartSchema = __importStar(require("../schemas/order/cart-schema"));
|
|
46
|
+
const productSchema = __importStar(require("../schemas/product/product-schema"));
|
|
47
|
+
const inventorySchema = __importStar(require("../schemas/inventory/inventory-tables"));
|
|
48
|
+
const customerSchema = __importStar(require("../schemas/customer/customer-schema"));
|
|
40
49
|
// Load environment variables from .env file
|
|
41
50
|
dotenv.config();
|
|
42
51
|
// Configure PostgreSQL connection
|
|
@@ -82,7 +91,18 @@ pool.on("connect", () => {
|
|
|
82
91
|
console.log("✅ Database pool connection established");
|
|
83
92
|
}
|
|
84
93
|
});
|
|
85
|
-
// Create a Drizzle ORM instance
|
|
94
|
+
// Create a Drizzle ORM instance with all schemas registered
|
|
86
95
|
exports.db = (0, node_postgres_1.drizzle)(pool, {
|
|
96
|
+
schema: {
|
|
97
|
+
...storeSchema,
|
|
98
|
+
...storeAuditSchema,
|
|
99
|
+
...storeSettingsSchema,
|
|
100
|
+
...storefrontConfigSchema,
|
|
101
|
+
...orderSchema,
|
|
102
|
+
...cartSchema,
|
|
103
|
+
...productSchema,
|
|
104
|
+
...inventorySchema,
|
|
105
|
+
...customerSchema,
|
|
106
|
+
},
|
|
87
107
|
logger: process.env.NODE_ENV === "development",
|
|
88
108
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requireStoreOwner = requireStoreOwner;
|
|
4
|
+
const drizzle_orm_1 = require("drizzle-orm");
|
|
5
|
+
const db_1 = require("../lib/db");
|
|
6
|
+
const store_schema_1 = require("../schemas/store/store-schema");
|
|
4
7
|
const serviceAuth_1 = require("./serviceAuth");
|
|
5
8
|
/**
|
|
6
9
|
* Factory that returns a middleware ensuring the current user owns the target store.
|
|
@@ -114,10 +117,26 @@ async function fetchStoreById(storeId) {
|
|
|
114
117
|
return store;
|
|
115
118
|
}
|
|
116
119
|
}
|
|
117
|
-
catch
|
|
118
|
-
|
|
120
|
+
catch {
|
|
121
|
+
// ignore network error and try DB fallback when possible
|
|
122
|
+
}
|
|
123
|
+
// DB fallback (primarily for in-process store-service)
|
|
124
|
+
try {
|
|
125
|
+
const result = await db_1.db
|
|
126
|
+
.select({
|
|
127
|
+
id: store_schema_1.stores.id,
|
|
128
|
+
storeName: store_schema_1.stores.storeName,
|
|
129
|
+
isActive: store_schema_1.stores.isActive,
|
|
130
|
+
userId: store_schema_1.stores.userId,
|
|
131
|
+
})
|
|
132
|
+
.from(store_schema_1.stores)
|
|
133
|
+
.where((0, drizzle_orm_1.eq)(store_schema_1.stores.id, storeId))
|
|
134
|
+
.limit(1);
|
|
135
|
+
return result[0] || null;
|
|
136
|
+
}
|
|
137
|
+
catch {
|
|
138
|
+
return null;
|
|
119
139
|
}
|
|
120
|
-
return null;
|
|
121
140
|
}
|
|
122
141
|
async function attachStoreInfoIfPossible(request, storeId) {
|
|
123
142
|
try {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requireAnyStore = exports.requireOwnedStore = exports.requireValidStore = exports.clearAllStoreCache = exports.clearStoreCache = exports.validateStoreMiddleware = void 0;
|
|
4
|
-
const
|
|
4
|
+
const drizzle_orm_1 = require("drizzle-orm");
|
|
5
|
+
const db_1 = require("../lib/db");
|
|
6
|
+
const store_schema_1 = require("../schemas/store/store-schema");
|
|
5
7
|
// Store cache to reduce database calls
|
|
6
8
|
const storeCache = new Map();
|
|
7
9
|
const CACHE_TTL = 5 * 60 * 1000; // 5 minutes
|
|
@@ -81,9 +83,18 @@ const validateStoreMiddleware = (options = {}) => {
|
|
|
81
83
|
return; // Successfully validated using cache
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
// Validate store exists and get details from
|
|
85
|
-
const
|
|
86
|
-
|
|
86
|
+
// Validate store exists and get details from database
|
|
87
|
+
const store = await db_1.db
|
|
88
|
+
.select({
|
|
89
|
+
id: store_schema_1.stores.id,
|
|
90
|
+
storeName: store_schema_1.stores.storeName,
|
|
91
|
+
isActive: store_schema_1.stores.isActive,
|
|
92
|
+
userId: store_schema_1.stores.userId,
|
|
93
|
+
})
|
|
94
|
+
.from(store_schema_1.stores)
|
|
95
|
+
.where((0, drizzle_orm_1.eq)(store_schema_1.stores.id, storeId))
|
|
96
|
+
.limit(1);
|
|
97
|
+
if (store.length === 0) {
|
|
87
98
|
// Cache negative result
|
|
88
99
|
storeCache.set(storeId, { isValid: false, timestamp: Date.now() });
|
|
89
100
|
return reply.status(404).send({
|
|
@@ -92,7 +103,7 @@ const validateStoreMiddleware = (options = {}) => {
|
|
|
92
103
|
code: "STORE_NOT_FOUND",
|
|
93
104
|
});
|
|
94
105
|
}
|
|
95
|
-
const storeData =
|
|
106
|
+
const storeData = store[0];
|
|
96
107
|
// Check if store is active when required
|
|
97
108
|
if (requireActive && !storeData.isActive) {
|
|
98
109
|
return reply.status(403).send({
|
|
@@ -167,37 +178,3 @@ exports.requireOwnedStore = (0, exports.validateStoreMiddleware)({
|
|
|
167
178
|
exports.requireAnyStore = (0, exports.validateStoreMiddleware)({
|
|
168
179
|
requireActive: false,
|
|
169
180
|
});
|
|
170
|
-
// Helper function to fetch store from store service
|
|
171
|
-
async function fetchStoreById(storeId) {
|
|
172
|
-
const baseUrl = process.env.STORE_SERVICE_URL || "http://localhost:3001";
|
|
173
|
-
const url = `${baseUrl}/internal/stores/${encodeURIComponent(storeId)}`;
|
|
174
|
-
let token;
|
|
175
|
-
try {
|
|
176
|
-
const cfg = (0, serviceAuth_1.getServiceAuthConfigFromEnv)();
|
|
177
|
-
token = (0, serviceAuth_1.createServiceAuthenticator)(cfg).generateServiceToken(process.env.SERVICE_NAME || "shared-middleware", ["store:read"]);
|
|
178
|
-
}
|
|
179
|
-
catch {
|
|
180
|
-
// Development fallback tokens accepted by store service
|
|
181
|
-
const isDev = process.env.NODE_ENV !== "production";
|
|
182
|
-
if (isDev)
|
|
183
|
-
token = "dev-access";
|
|
184
|
-
}
|
|
185
|
-
const headers = {
|
|
186
|
-
"Content-Type": "application/json",
|
|
187
|
-
};
|
|
188
|
-
if (token)
|
|
189
|
-
headers["x-service-token"] = token;
|
|
190
|
-
try {
|
|
191
|
-
const res = await fetch(url, { method: "GET", headers });
|
|
192
|
-
if (res.ok) {
|
|
193
|
-
const data = (await res.json());
|
|
194
|
-
const store = data?.store || data?.data?.store || null;
|
|
195
|
-
if (store)
|
|
196
|
-
return store;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
catch (error) {
|
|
200
|
-
console.error('Failed to fetch store from store service:', error);
|
|
201
|
-
}
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
@@ -583,7 +583,7 @@ export declare const reviewQueues: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
583
583
|
tableName: "review_queues";
|
|
584
584
|
dataType: "string";
|
|
585
585
|
columnType: "PgVarchar";
|
|
586
|
-
data: "PENDING" | "
|
|
586
|
+
data: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "CANCELLED" | "ASSIGNED" | "ESCALATED";
|
|
587
587
|
driverParam: string;
|
|
588
588
|
notNull: true;
|
|
589
589
|
hasDefault: true;
|
|
@@ -596,7 +596,7 @@ export declare const reviewQueues: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
596
596
|
generated: undefined;
|
|
597
597
|
}, {}, {
|
|
598
598
|
length: 20;
|
|
599
|
-
$type: "PENDING" | "
|
|
599
|
+
$type: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "CANCELLED" | "ASSIGNED" | "ESCALATED";
|
|
600
600
|
}>;
|
|
601
601
|
assignedTo: import("drizzle-orm/pg-core").PgColumn<{
|
|
602
602
|
name: "assigned_to";
|
|
@@ -95,7 +95,7 @@ export declare const contentScans: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
95
95
|
tableName: "content_scans";
|
|
96
96
|
dataType: "string";
|
|
97
97
|
columnType: "PgVarchar";
|
|
98
|
-
data: "
|
|
98
|
+
data: "MANUAL" | "AUTOMATED" | "SCHEDULED" | "TRIGGERED";
|
|
99
99
|
driverParam: string;
|
|
100
100
|
notNull: false;
|
|
101
101
|
hasDefault: true;
|
|
@@ -108,14 +108,14 @@ export declare const contentScans: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
108
108
|
generated: undefined;
|
|
109
109
|
}, {}, {
|
|
110
110
|
length: 30;
|
|
111
|
-
$type: "
|
|
111
|
+
$type: "MANUAL" | "AUTOMATED" | "SCHEDULED" | "TRIGGERED";
|
|
112
112
|
}>;
|
|
113
113
|
provider: import("drizzle-orm/pg-core").PgColumn<{
|
|
114
114
|
name: "provider";
|
|
115
115
|
tableName: "content_scans";
|
|
116
116
|
dataType: "string";
|
|
117
117
|
columnType: "PgVarchar";
|
|
118
|
-
data: "
|
|
118
|
+
data: "INTERNAL" | "OPENAI" | "GOOGLE_PERSPECTIVE" | "AZURE_CONTENT_SAFETY";
|
|
119
119
|
driverParam: string;
|
|
120
120
|
notNull: false;
|
|
121
121
|
hasDefault: true;
|
|
@@ -128,7 +128,7 @@ export declare const contentScans: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
128
128
|
generated: undefined;
|
|
129
129
|
}, {}, {
|
|
130
130
|
length: 30;
|
|
131
|
-
$type: "
|
|
131
|
+
$type: "INTERNAL" | "OPENAI" | "GOOGLE_PERSPECTIVE" | "AZURE_CONTENT_SAFETY";
|
|
132
132
|
}>;
|
|
133
133
|
originalContent: import("drizzle-orm/pg-core").PgColumn<{
|
|
134
134
|
name: "original_content";
|
|
@@ -359,7 +359,7 @@ export declare const contentScans: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
359
359
|
tableName: "content_scans";
|
|
360
360
|
dataType: "string";
|
|
361
361
|
columnType: "PgVarchar";
|
|
362
|
-
data: "NONE" | "
|
|
362
|
+
data: "NONE" | "QUARANTINED" | "FLAGGED" | "BLOCKED" | "REPORTED";
|
|
363
363
|
driverParam: string;
|
|
364
364
|
notNull: false;
|
|
365
365
|
hasDefault: false;
|
|
@@ -372,7 +372,7 @@ export declare const contentScans: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
372
372
|
generated: undefined;
|
|
373
373
|
}, {}, {
|
|
374
374
|
length: 30;
|
|
375
|
-
$type: "NONE" | "
|
|
375
|
+
$type: "NONE" | "QUARANTINED" | "FLAGGED" | "BLOCKED" | "REPORTED";
|
|
376
376
|
}>;
|
|
377
377
|
processingTime: import("drizzle-orm/pg-core").PgColumn<{
|
|
378
378
|
name: "processing_time";
|
|
@@ -11,42 +11,42 @@ export declare const GeoLocationSchema: z.ZodObject<{
|
|
|
11
11
|
postalCode: z.ZodString;
|
|
12
12
|
country: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
|
|
14
|
+
country: string;
|
|
15
15
|
city: string;
|
|
16
|
-
state: string;
|
|
17
16
|
postalCode: string;
|
|
18
|
-
|
|
17
|
+
line1: string;
|
|
18
|
+
state: string;
|
|
19
19
|
line2?: string | undefined;
|
|
20
20
|
}, {
|
|
21
|
-
|
|
21
|
+
country: string;
|
|
22
22
|
city: string;
|
|
23
|
-
state: string;
|
|
24
23
|
postalCode: string;
|
|
25
|
-
|
|
24
|
+
line1: string;
|
|
25
|
+
state: string;
|
|
26
26
|
line2?: string | undefined;
|
|
27
27
|
}>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
lat: number;
|
|
30
|
+
lng: number;
|
|
29
31
|
address: {
|
|
30
|
-
|
|
32
|
+
country: string;
|
|
31
33
|
city: string;
|
|
32
|
-
state: string;
|
|
33
34
|
postalCode: string;
|
|
34
|
-
|
|
35
|
+
line1: string;
|
|
36
|
+
state: string;
|
|
35
37
|
line2?: string | undefined;
|
|
36
38
|
};
|
|
39
|
+
}, {
|
|
37
40
|
lat: number;
|
|
38
41
|
lng: number;
|
|
39
|
-
}, {
|
|
40
42
|
address: {
|
|
41
|
-
|
|
43
|
+
country: string;
|
|
42
44
|
city: string;
|
|
43
|
-
state: string;
|
|
44
45
|
postalCode: string;
|
|
45
|
-
|
|
46
|
+
line1: string;
|
|
47
|
+
state: string;
|
|
46
48
|
line2?: string | undefined;
|
|
47
49
|
};
|
|
48
|
-
lat: number;
|
|
49
|
-
lng: number;
|
|
50
50
|
}>;
|
|
51
51
|
export declare const AuditTrailSchema: z.ZodObject<{
|
|
52
52
|
action: z.ZodString;
|
|
@@ -104,23 +104,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
104
104
|
close: z.ZodOptional<z.ZodString>;
|
|
105
105
|
}, "strip", z.ZodTypeAny, {
|
|
106
106
|
closed: true;
|
|
107
|
-
close?: string | undefined;
|
|
108
107
|
open?: string | undefined;
|
|
108
|
+
close?: string | undefined;
|
|
109
109
|
}, {
|
|
110
110
|
closed: true;
|
|
111
|
-
close?: string | undefined;
|
|
112
111
|
open?: string | undefined;
|
|
112
|
+
close?: string | undefined;
|
|
113
113
|
}>, z.ZodObject<{
|
|
114
114
|
open: z.ZodString;
|
|
115
115
|
close: z.ZodString;
|
|
116
116
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
117
117
|
}, "strip", z.ZodTypeAny, {
|
|
118
|
-
close: string;
|
|
119
118
|
open: string;
|
|
119
|
+
close: string;
|
|
120
120
|
closed?: false | undefined;
|
|
121
121
|
}, {
|
|
122
|
-
close: string;
|
|
123
122
|
open: string;
|
|
123
|
+
close: string;
|
|
124
124
|
closed?: false | undefined;
|
|
125
125
|
}>]>>;
|
|
126
126
|
tuesday: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -129,23 +129,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
129
129
|
close: z.ZodOptional<z.ZodString>;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
closed: true;
|
|
132
|
-
close?: string | undefined;
|
|
133
132
|
open?: string | undefined;
|
|
133
|
+
close?: string | undefined;
|
|
134
134
|
}, {
|
|
135
135
|
closed: true;
|
|
136
|
-
close?: string | undefined;
|
|
137
136
|
open?: string | undefined;
|
|
137
|
+
close?: string | undefined;
|
|
138
138
|
}>, z.ZodObject<{
|
|
139
139
|
open: z.ZodString;
|
|
140
140
|
close: z.ZodString;
|
|
141
141
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
142
142
|
}, "strip", z.ZodTypeAny, {
|
|
143
|
-
close: string;
|
|
144
143
|
open: string;
|
|
144
|
+
close: string;
|
|
145
145
|
closed?: false | undefined;
|
|
146
146
|
}, {
|
|
147
|
-
close: string;
|
|
148
147
|
open: string;
|
|
148
|
+
close: string;
|
|
149
149
|
closed?: false | undefined;
|
|
150
150
|
}>]>>;
|
|
151
151
|
wednesday: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -154,23 +154,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
154
154
|
close: z.ZodOptional<z.ZodString>;
|
|
155
155
|
}, "strip", z.ZodTypeAny, {
|
|
156
156
|
closed: true;
|
|
157
|
-
close?: string | undefined;
|
|
158
157
|
open?: string | undefined;
|
|
158
|
+
close?: string | undefined;
|
|
159
159
|
}, {
|
|
160
160
|
closed: true;
|
|
161
|
-
close?: string | undefined;
|
|
162
161
|
open?: string | undefined;
|
|
162
|
+
close?: string | undefined;
|
|
163
163
|
}>, z.ZodObject<{
|
|
164
164
|
open: z.ZodString;
|
|
165
165
|
close: z.ZodString;
|
|
166
166
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
167
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
close: string;
|
|
169
168
|
open: string;
|
|
169
|
+
close: string;
|
|
170
170
|
closed?: false | undefined;
|
|
171
171
|
}, {
|
|
172
|
-
close: string;
|
|
173
172
|
open: string;
|
|
173
|
+
close: string;
|
|
174
174
|
closed?: false | undefined;
|
|
175
175
|
}>]>>;
|
|
176
176
|
thursday: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -179,23 +179,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
179
179
|
close: z.ZodOptional<z.ZodString>;
|
|
180
180
|
}, "strip", z.ZodTypeAny, {
|
|
181
181
|
closed: true;
|
|
182
|
-
close?: string | undefined;
|
|
183
182
|
open?: string | undefined;
|
|
183
|
+
close?: string | undefined;
|
|
184
184
|
}, {
|
|
185
185
|
closed: true;
|
|
186
|
-
close?: string | undefined;
|
|
187
186
|
open?: string | undefined;
|
|
187
|
+
close?: string | undefined;
|
|
188
188
|
}>, z.ZodObject<{
|
|
189
189
|
open: z.ZodString;
|
|
190
190
|
close: z.ZodString;
|
|
191
191
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
192
192
|
}, "strip", z.ZodTypeAny, {
|
|
193
|
-
close: string;
|
|
194
193
|
open: string;
|
|
194
|
+
close: string;
|
|
195
195
|
closed?: false | undefined;
|
|
196
196
|
}, {
|
|
197
|
-
close: string;
|
|
198
197
|
open: string;
|
|
198
|
+
close: string;
|
|
199
199
|
closed?: false | undefined;
|
|
200
200
|
}>]>>;
|
|
201
201
|
friday: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -204,23 +204,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
204
204
|
close: z.ZodOptional<z.ZodString>;
|
|
205
205
|
}, "strip", z.ZodTypeAny, {
|
|
206
206
|
closed: true;
|
|
207
|
-
close?: string | undefined;
|
|
208
207
|
open?: string | undefined;
|
|
208
|
+
close?: string | undefined;
|
|
209
209
|
}, {
|
|
210
210
|
closed: true;
|
|
211
|
-
close?: string | undefined;
|
|
212
211
|
open?: string | undefined;
|
|
212
|
+
close?: string | undefined;
|
|
213
213
|
}>, z.ZodObject<{
|
|
214
214
|
open: z.ZodString;
|
|
215
215
|
close: z.ZodString;
|
|
216
216
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
217
217
|
}, "strip", z.ZodTypeAny, {
|
|
218
|
-
close: string;
|
|
219
218
|
open: string;
|
|
219
|
+
close: string;
|
|
220
220
|
closed?: false | undefined;
|
|
221
221
|
}, {
|
|
222
|
-
close: string;
|
|
223
222
|
open: string;
|
|
223
|
+
close: string;
|
|
224
224
|
closed?: false | undefined;
|
|
225
225
|
}>]>>;
|
|
226
226
|
saturday: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -229,23 +229,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
229
229
|
close: z.ZodOptional<z.ZodString>;
|
|
230
230
|
}, "strip", z.ZodTypeAny, {
|
|
231
231
|
closed: true;
|
|
232
|
-
close?: string | undefined;
|
|
233
232
|
open?: string | undefined;
|
|
233
|
+
close?: string | undefined;
|
|
234
234
|
}, {
|
|
235
235
|
closed: true;
|
|
236
|
-
close?: string | undefined;
|
|
237
236
|
open?: string | undefined;
|
|
237
|
+
close?: string | undefined;
|
|
238
238
|
}>, z.ZodObject<{
|
|
239
239
|
open: z.ZodString;
|
|
240
240
|
close: z.ZodString;
|
|
241
241
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
242
242
|
}, "strip", z.ZodTypeAny, {
|
|
243
|
-
close: string;
|
|
244
243
|
open: string;
|
|
244
|
+
close: string;
|
|
245
245
|
closed?: false | undefined;
|
|
246
246
|
}, {
|
|
247
|
-
close: string;
|
|
248
247
|
open: string;
|
|
248
|
+
close: string;
|
|
249
249
|
closed?: false | undefined;
|
|
250
250
|
}>]>>;
|
|
251
251
|
sunday: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -254,23 +254,23 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
254
254
|
close: z.ZodOptional<z.ZodString>;
|
|
255
255
|
}, "strip", z.ZodTypeAny, {
|
|
256
256
|
closed: true;
|
|
257
|
-
close?: string | undefined;
|
|
258
257
|
open?: string | undefined;
|
|
258
|
+
close?: string | undefined;
|
|
259
259
|
}, {
|
|
260
260
|
closed: true;
|
|
261
|
-
close?: string | undefined;
|
|
262
261
|
open?: string | undefined;
|
|
262
|
+
close?: string | undefined;
|
|
263
263
|
}>, z.ZodObject<{
|
|
264
264
|
open: z.ZodString;
|
|
265
265
|
close: z.ZodString;
|
|
266
266
|
closed: z.ZodOptional<z.ZodLiteral<false>>;
|
|
267
267
|
}, "strip", z.ZodTypeAny, {
|
|
268
|
-
close: string;
|
|
269
268
|
open: string;
|
|
269
|
+
close: string;
|
|
270
270
|
closed?: false | undefined;
|
|
271
271
|
}, {
|
|
272
|
-
close: string;
|
|
273
272
|
open: string;
|
|
273
|
+
close: string;
|
|
274
274
|
closed?: false | undefined;
|
|
275
275
|
}>]>>;
|
|
276
276
|
holidays: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -290,65 +290,65 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
290
290
|
timezone: string;
|
|
291
291
|
monday?: {
|
|
292
292
|
closed: true;
|
|
293
|
-
close?: string | undefined;
|
|
294
293
|
open?: string | undefined;
|
|
294
|
+
close?: string | undefined;
|
|
295
295
|
} | {
|
|
296
|
-
close: string;
|
|
297
296
|
open: string;
|
|
297
|
+
close: string;
|
|
298
298
|
closed?: false | undefined;
|
|
299
299
|
} | undefined;
|
|
300
300
|
tuesday?: {
|
|
301
301
|
closed: true;
|
|
302
|
-
close?: string | undefined;
|
|
303
302
|
open?: string | undefined;
|
|
303
|
+
close?: string | undefined;
|
|
304
304
|
} | {
|
|
305
|
-
close: string;
|
|
306
305
|
open: string;
|
|
306
|
+
close: string;
|
|
307
307
|
closed?: false | undefined;
|
|
308
308
|
} | undefined;
|
|
309
309
|
wednesday?: {
|
|
310
310
|
closed: true;
|
|
311
|
-
close?: string | undefined;
|
|
312
311
|
open?: string | undefined;
|
|
312
|
+
close?: string | undefined;
|
|
313
313
|
} | {
|
|
314
|
-
close: string;
|
|
315
314
|
open: string;
|
|
315
|
+
close: string;
|
|
316
316
|
closed?: false | undefined;
|
|
317
317
|
} | undefined;
|
|
318
318
|
thursday?: {
|
|
319
319
|
closed: true;
|
|
320
|
-
close?: string | undefined;
|
|
321
320
|
open?: string | undefined;
|
|
321
|
+
close?: string | undefined;
|
|
322
322
|
} | {
|
|
323
|
-
close: string;
|
|
324
323
|
open: string;
|
|
324
|
+
close: string;
|
|
325
325
|
closed?: false | undefined;
|
|
326
326
|
} | undefined;
|
|
327
327
|
friday?: {
|
|
328
328
|
closed: true;
|
|
329
|
-
close?: string | undefined;
|
|
330
329
|
open?: string | undefined;
|
|
330
|
+
close?: string | undefined;
|
|
331
331
|
} | {
|
|
332
|
-
close: string;
|
|
333
332
|
open: string;
|
|
333
|
+
close: string;
|
|
334
334
|
closed?: false | undefined;
|
|
335
335
|
} | undefined;
|
|
336
336
|
saturday?: {
|
|
337
337
|
closed: true;
|
|
338
|
-
close?: string | undefined;
|
|
339
338
|
open?: string | undefined;
|
|
339
|
+
close?: string | undefined;
|
|
340
340
|
} | {
|
|
341
|
-
close: string;
|
|
342
341
|
open: string;
|
|
342
|
+
close: string;
|
|
343
343
|
closed?: false | undefined;
|
|
344
344
|
} | undefined;
|
|
345
345
|
sunday?: {
|
|
346
346
|
closed: true;
|
|
347
|
-
close?: string | undefined;
|
|
348
347
|
open?: string | undefined;
|
|
348
|
+
close?: string | undefined;
|
|
349
349
|
} | {
|
|
350
|
-
close: string;
|
|
351
350
|
open: string;
|
|
351
|
+
close: string;
|
|
352
352
|
closed?: false | undefined;
|
|
353
353
|
} | undefined;
|
|
354
354
|
holidays?: {
|
|
@@ -360,65 +360,65 @@ export declare const BusinessHoursSchema: z.ZodObject<{
|
|
|
360
360
|
timezone: string;
|
|
361
361
|
monday?: {
|
|
362
362
|
closed: true;
|
|
363
|
-
close?: string | undefined;
|
|
364
363
|
open?: string | undefined;
|
|
364
|
+
close?: string | undefined;
|
|
365
365
|
} | {
|
|
366
|
-
close: string;
|
|
367
366
|
open: string;
|
|
367
|
+
close: string;
|
|
368
368
|
closed?: false | undefined;
|
|
369
369
|
} | undefined;
|
|
370
370
|
tuesday?: {
|
|
371
371
|
closed: true;
|
|
372
|
-
close?: string | undefined;
|
|
373
372
|
open?: string | undefined;
|
|
373
|
+
close?: string | undefined;
|
|
374
374
|
} | {
|
|
375
|
-
close: string;
|
|
376
375
|
open: string;
|
|
376
|
+
close: string;
|
|
377
377
|
closed?: false | undefined;
|
|
378
378
|
} | undefined;
|
|
379
379
|
wednesday?: {
|
|
380
380
|
closed: true;
|
|
381
|
-
close?: string | undefined;
|
|
382
381
|
open?: string | undefined;
|
|
382
|
+
close?: string | undefined;
|
|
383
383
|
} | {
|
|
384
|
-
close: string;
|
|
385
384
|
open: string;
|
|
385
|
+
close: string;
|
|
386
386
|
closed?: false | undefined;
|
|
387
387
|
} | undefined;
|
|
388
388
|
thursday?: {
|
|
389
389
|
closed: true;
|
|
390
|
-
close?: string | undefined;
|
|
391
390
|
open?: string | undefined;
|
|
391
|
+
close?: string | undefined;
|
|
392
392
|
} | {
|
|
393
|
-
close: string;
|
|
394
393
|
open: string;
|
|
394
|
+
close: string;
|
|
395
395
|
closed?: false | undefined;
|
|
396
396
|
} | undefined;
|
|
397
397
|
friday?: {
|
|
398
398
|
closed: true;
|
|
399
|
-
close?: string | undefined;
|
|
400
399
|
open?: string | undefined;
|
|
400
|
+
close?: string | undefined;
|
|
401
401
|
} | {
|
|
402
|
-
close: string;
|
|
403
402
|
open: string;
|
|
403
|
+
close: string;
|
|
404
404
|
closed?: false | undefined;
|
|
405
405
|
} | undefined;
|
|
406
406
|
saturday?: {
|
|
407
407
|
closed: true;
|
|
408
|
-
close?: string | undefined;
|
|
409
408
|
open?: string | undefined;
|
|
409
|
+
close?: string | undefined;
|
|
410
410
|
} | {
|
|
411
|
-
close: string;
|
|
412
411
|
open: string;
|
|
412
|
+
close: string;
|
|
413
413
|
closed?: false | undefined;
|
|
414
414
|
} | undefined;
|
|
415
415
|
sunday?: {
|
|
416
416
|
closed: true;
|
|
417
|
-
close?: string | undefined;
|
|
418
417
|
open?: string | undefined;
|
|
418
|
+
close?: string | undefined;
|
|
419
419
|
} | {
|
|
420
|
-
close: string;
|
|
421
420
|
open: string;
|
|
421
|
+
close: string;
|
|
422
422
|
closed?: false | undefined;
|
|
423
423
|
} | undefined;
|
|
424
424
|
holidays?: {
|