@chevre/domain 25.0.0-alpha.21 → 25.0.0-alpha.23
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/lib/chevre/repo/message.d.ts +7 -3
- package/lib/chevre/repo/message.js +13 -59
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +7 -2
- package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -50
- package/lib/chevre/repo/setting/waiter.d.ts +17 -0
- package/lib/chevre/repo/setting/waiter.js +39 -0
- package/lib/chevre/repo/setting.d.ts +12 -11
- package/lib/chevre/repo/setting.js +6 -18
- package/lib/chevre/repository.d.ts +5 -0
- package/lib/chevre/repository.js +11 -0
- package/package.json +1 -1
|
@@ -46,9 +46,6 @@ export declare class MessageRepo {
|
|
|
46
46
|
projectFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<(IEmailMessage & {
|
|
47
47
|
id: string;
|
|
48
48
|
})[]>;
|
|
49
|
-
/**
|
|
50
|
-
* コードをキーにしてなければ作成する(複数対応)
|
|
51
|
-
*/
|
|
52
49
|
/**
|
|
53
50
|
* コードをキーにしてひとつ更新(なければ作成する)
|
|
54
51
|
*/
|
|
@@ -62,6 +59,13 @@ export declare class MessageRepo {
|
|
|
62
59
|
id: string;
|
|
63
60
|
};
|
|
64
61
|
}): Promise<IFindByIdentifierResult>;
|
|
62
|
+
/**
|
|
63
|
+
* 発行日時を基準に複数削除
|
|
64
|
+
* 2026-06-28~
|
|
65
|
+
*/
|
|
66
|
+
deleteDatePublishedPassedCertainPeriod(params: {
|
|
67
|
+
$lt: Date;
|
|
68
|
+
}): Promise<void>;
|
|
65
69
|
deleteByMainEntityOrderNumber(params: {
|
|
66
70
|
project: {
|
|
67
71
|
id: string;
|
|
@@ -80,65 +80,6 @@ class MessageRepo {
|
|
|
80
80
|
.lean() // 2024-09-19~
|
|
81
81
|
.exec();
|
|
82
82
|
}
|
|
83
|
-
// 重複エラーをハンドルするためにupsertOneByIdentifierへ移行(2025-05-11~)
|
|
84
|
-
/**
|
|
85
|
-
* コードをキーにしてなければ作成する(複数対応)
|
|
86
|
-
*/
|
|
87
|
-
// public async upsertByIdentifier(
|
|
88
|
-
// params: Pick<
|
|
89
|
-
// IEmailMessage,
|
|
90
|
-
// 'about' | 'identifier' | 'mainEntity' | 'name' | 'project' | 'sender' | 'text' | 'toRecipient' | 'provider'
|
|
91
|
-
// >[]
|
|
92
|
-
// ): Promise<BulkWriteResult | void> {
|
|
93
|
-
// const now = new Date();
|
|
94
|
-
// const bulkWriteOps: AnyBulkWriteOperation<IEmailMessage>[] = [];
|
|
95
|
-
// if (Array.isArray(params)) {
|
|
96
|
-
// params.forEach((creatingNoteParams) => {
|
|
97
|
-
// const { about, identifier, project, text, mainEntity, name, sender, toRecipient, provider } = creatingNoteParams;
|
|
98
|
-
// if (typeof identifier !== 'string' || identifier.length === 0) {
|
|
99
|
-
// throw new factory.errors.ArgumentNull('identifier');
|
|
100
|
-
// }
|
|
101
|
-
// if (typeof text !== 'string') {
|
|
102
|
-
// throw new factory.errors.ArgumentNull('text');
|
|
103
|
-
// }
|
|
104
|
-
// // リソースのユニークネスを保証するfilter
|
|
105
|
-
// const filter: RootFilterQuery<IEmailMessage> = {
|
|
106
|
-
// // typeOf: { $eq: factory.creativeWorkType.EmailMessage },
|
|
107
|
-
// 'project.id': { $eq: project.id },
|
|
108
|
-
// identifier: { $eq: identifier }
|
|
109
|
-
// };
|
|
110
|
-
// const setOnInsert: MatchKeysAndValues<IEmailMessage> = {
|
|
111
|
-
// identifier,
|
|
112
|
-
// project,
|
|
113
|
-
// datePublished: now,
|
|
114
|
-
// typeOf: factory.creativeWorkType.EmailMessage
|
|
115
|
-
// };
|
|
116
|
-
// // 変更可能な属性のみ上書き
|
|
117
|
-
// const setFields: MatchKeysAndValues<IEmailMessage> = {
|
|
118
|
-
// provider,
|
|
119
|
-
// mainEntity,
|
|
120
|
-
// about,
|
|
121
|
-
// sender,
|
|
122
|
-
// text,
|
|
123
|
-
// toRecipient,
|
|
124
|
-
// ...(typeof name === 'string') ? { name } : undefined
|
|
125
|
-
// };
|
|
126
|
-
// const updateFilter: UpdateFilter<IEmailMessage> = {
|
|
127
|
-
// $setOnInsert: setOnInsert,
|
|
128
|
-
// $set: setFields
|
|
129
|
-
// };
|
|
130
|
-
// const updateOne: UpdateOneModel<IEmailMessage> = {
|
|
131
|
-
// filter,
|
|
132
|
-
// update: updateFilter,
|
|
133
|
-
// upsert: true
|
|
134
|
-
// };
|
|
135
|
-
// bulkWriteOps.push({ updateOne });
|
|
136
|
-
// });
|
|
137
|
-
// }
|
|
138
|
-
// if (bulkWriteOps.length > 0) {
|
|
139
|
-
// return this.messageModel.bulkWrite(bulkWriteOps, { ordered: false });
|
|
140
|
-
// }
|
|
141
|
-
// }
|
|
142
83
|
/**
|
|
143
84
|
* コードをキーにしてひとつ更新(なければ作成する)
|
|
144
85
|
*/
|
|
@@ -219,6 +160,19 @@ class MessageRepo {
|
|
|
219
160
|
}
|
|
220
161
|
return doc;
|
|
221
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* 発行日時を基準に複数削除
|
|
165
|
+
* 2026-06-28~
|
|
166
|
+
*/
|
|
167
|
+
async deleteDatePublishedPassedCertainPeriod(params) {
|
|
168
|
+
const { $lt } = params;
|
|
169
|
+
if ($lt instanceof Date) {
|
|
170
|
+
await this.messageModel.deleteMany({
|
|
171
|
+
datePublished: { $lt }
|
|
172
|
+
})
|
|
173
|
+
.exec();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
222
176
|
async deleteByMainEntityOrderNumber(params) {
|
|
223
177
|
return this.messageModel.deleteMany({
|
|
224
178
|
'project.id': { $eq: params.project.id },
|
|
@@ -16,7 +16,7 @@ export type IEmailMessage = factory.creativeWork.message.email.ICreativeWork & {
|
|
|
16
16
|
typeOf: factory.organizationType.Corporation;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
type IDocType =
|
|
19
|
+
type IDocType = Pick<IEmailMessage, 'about' | 'identifier' | 'name' | 'project' | 'sender' | 'text' | 'toRecipient' | 'typeOf' | 'datePublished' | 'mainEntity' | 'provider'>;
|
|
20
20
|
type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
|
|
21
21
|
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
22
22
|
type ISchema = Schema<IDocType, IModel, Record<string, never>, Record<string, never>, IVirtuals, Record<string, never>, ISchemaDefinition, IDocType>;
|
|
@@ -37,7 +37,7 @@ interface IOnTransactionStatusChanged {
|
|
|
37
37
|
*/
|
|
38
38
|
informTransaction?: factory.project.IInformParams[];
|
|
39
39
|
}
|
|
40
|
-
interface IStorageSettings {
|
|
40
|
+
export interface IStorageSettings {
|
|
41
41
|
/**
|
|
42
42
|
* 取引保管期間(Confirmed)
|
|
43
43
|
* default:365
|
|
@@ -53,6 +53,11 @@ interface IStorageSettings {
|
|
|
53
53
|
assetTransactionInDays?: number;
|
|
54
54
|
taskInDays?: number;
|
|
55
55
|
eventInDays?: number;
|
|
56
|
+
/**
|
|
57
|
+
* メッセージ保管日数
|
|
58
|
+
* 2026-06-28~
|
|
59
|
+
*/
|
|
60
|
+
messageInDays?: number;
|
|
56
61
|
/**
|
|
57
62
|
* イベント終了日時からn日後まで座席をロックする
|
|
58
63
|
*/
|
|
@@ -80,7 +85,7 @@ interface ITriggerWebhookSettings {
|
|
|
80
85
|
retryCountMax?: number;
|
|
81
86
|
retryIntervalInMS?: number;
|
|
82
87
|
}
|
|
83
|
-
interface IWaiterSettings {
|
|
88
|
+
export interface IWaiterSettings {
|
|
84
89
|
disabled?: boolean;
|
|
85
90
|
passportUnavailable?: boolean;
|
|
86
91
|
passportIssuers: string[];
|
|
@@ -22,8 +22,6 @@ const schemaDefinition = {
|
|
|
22
22
|
startDate: Date,
|
|
23
23
|
endDate: Date,
|
|
24
24
|
tasksExportAction: mongoose_1.SchemaTypes.Mixed,
|
|
25
|
-
// tasksExportedAt: Date, // discontinue(2024-06-19~)
|
|
26
|
-
// tasksExportationStatus: String, // discontinue(2024-06-19~)
|
|
27
25
|
potentialActions: mongoose_1.SchemaTypes.Mixed,
|
|
28
26
|
instrument: mongoose_1.SchemaTypes.Mixed
|
|
29
27
|
};
|
|
@@ -81,24 +79,6 @@ const indexes = [
|
|
|
81
79
|
{ expires: 1, startDate: -1 },
|
|
82
80
|
{ name: 'searchByExpiresAndStartDate' }
|
|
83
81
|
],
|
|
84
|
-
[
|
|
85
|
-
{ 'result.order.confirmationNumber': 1, startDate: -1 },
|
|
86
|
-
{
|
|
87
|
-
name: 'searchByResultOrderConfirmationNumber',
|
|
88
|
-
partialFilterExpression: {
|
|
89
|
-
'result.order.confirmationNumber': { $exists: true }
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
[
|
|
94
|
-
{ 'result.order.orderNumber': 1, startDate: -1 },
|
|
95
|
-
{
|
|
96
|
-
name: 'searchByResultOrderNumberAndStartDate',
|
|
97
|
-
partialFilterExpression: {
|
|
98
|
-
'result.order.orderNumber': { $exists: true }
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
82
|
[
|
|
103
83
|
{ 'object.confirmationNumber': 1, startDate: -1 },
|
|
104
84
|
{
|
|
@@ -126,36 +106,6 @@ const indexes = [
|
|
|
126
106
|
}
|
|
127
107
|
}
|
|
128
108
|
],
|
|
129
|
-
[
|
|
130
|
-
// 結果の注文番号はユニークなはず
|
|
131
|
-
{
|
|
132
|
-
typeOf: 1,
|
|
133
|
-
'result.order.orderNumber': 1
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: 'searchPlaceOrderByOrderNumber',
|
|
137
|
-
unique: true,
|
|
138
|
-
partialFilterExpression: {
|
|
139
|
-
'result.order.orderNumber': { $exists: true }
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
[
|
|
144
|
-
// 注文取引のobject.orderNumberも発行されている場合ユニークなはず(2026-02-21~)
|
|
145
|
-
{
|
|
146
|
-
typeOf: 1,
|
|
147
|
-
'object.orderNumber': 1
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: 'uniquePlacingOrderNumber20260221',
|
|
151
|
-
unique: true,
|
|
152
|
-
partialFilterExpression: {
|
|
153
|
-
typeOf: factory_1.factory.transactionType.PlaceOrder,
|
|
154
|
-
'object.orderNumber': { $exists: true },
|
|
155
|
-
startDate: { $gte: new Date('2026-02-21T11:00:00Z') }
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
109
|
[
|
|
160
110
|
// 注文取引のobject.orderNumberも発行されている場合ユニークなはず(2026-02-21~)
|
|
161
111
|
{
|
|
@@ -261,6 +211,57 @@ const indexes = [
|
|
|
261
211
|
}
|
|
262
212
|
}
|
|
263
213
|
]
|
|
214
|
+
// result.order廃止につきインデックス廃止(2026-06-28~)
|
|
215
|
+
// [
|
|
216
|
+
// { 'result.order.confirmationNumber': 1, startDate: -1 },
|
|
217
|
+
// {
|
|
218
|
+
// name: 'searchByResultOrderConfirmationNumber',
|
|
219
|
+
// partialFilterExpression: {
|
|
220
|
+
// 'result.order.confirmationNumber': { $exists: true }
|
|
221
|
+
// }
|
|
222
|
+
// }
|
|
223
|
+
// ],
|
|
224
|
+
// [
|
|
225
|
+
// { 'result.order.orderNumber': 1, startDate: -1 },
|
|
226
|
+
// {
|
|
227
|
+
// name: 'searchByResultOrderNumberAndStartDate',
|
|
228
|
+
// partialFilterExpression: {
|
|
229
|
+
// 'result.order.orderNumber': { $exists: true }
|
|
230
|
+
// }
|
|
231
|
+
// }
|
|
232
|
+
// ],
|
|
233
|
+
// result.order廃止につきインデックス廃止(2026-06-28~)
|
|
234
|
+
// [
|
|
235
|
+
// // 結果の注文番号はユニークなはず
|
|
236
|
+
// {
|
|
237
|
+
// typeOf: 1,
|
|
238
|
+
// 'result.order.orderNumber': 1
|
|
239
|
+
// },
|
|
240
|
+
// {
|
|
241
|
+
// name: 'searchPlaceOrderByOrderNumber',
|
|
242
|
+
// unique: true,
|
|
243
|
+
// partialFilterExpression: {
|
|
244
|
+
// 'result.order.orderNumber': { $exists: true }
|
|
245
|
+
// }
|
|
246
|
+
// }
|
|
247
|
+
// ],
|
|
248
|
+
// uniquePlacingOrderNumberと重複しているので廃止(2026-06-28~)
|
|
249
|
+
// [
|
|
250
|
+
// // 注文取引のobject.orderNumberも発行されている場合ユニークなはず(2026-02-21~)
|
|
251
|
+
// {
|
|
252
|
+
// typeOf: 1,
|
|
253
|
+
// 'object.orderNumber': 1
|
|
254
|
+
// },
|
|
255
|
+
// {
|
|
256
|
+
// name: 'uniquePlacingOrderNumber20260221',
|
|
257
|
+
// unique: true,
|
|
258
|
+
// partialFilterExpression: {
|
|
259
|
+
// typeOf: factory.transactionType.PlaceOrder,
|
|
260
|
+
// 'object.orderNumber': { $exists: true },
|
|
261
|
+
// startDate: { $gte: new Date('2026-02-21T11:00:00Z') }
|
|
262
|
+
// }
|
|
263
|
+
// }
|
|
264
|
+
// ],
|
|
264
265
|
];
|
|
265
266
|
exports.indexes = indexes;
|
|
266
267
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import { IWaiterSettings } from '../mongoose/schemas/setting';
|
|
3
|
+
interface IDBOptions {
|
|
4
|
+
connection: Connection;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 流入制限設定リポジトリ
|
|
8
|
+
*/
|
|
9
|
+
export declare class WaiterSettingRepo {
|
|
10
|
+
private readonly settingModel;
|
|
11
|
+
private static cachedSettings;
|
|
12
|
+
private static cacheExpiry;
|
|
13
|
+
private static readonly CACHE_TTL_MS;
|
|
14
|
+
constructor(options: IDBOptions);
|
|
15
|
+
findWaiterSetting(): Promise<IWaiterSettings | undefined>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WaiterSettingRepo = void 0;
|
|
4
|
+
const setting_1 = require("../mongoose/schemas/setting");
|
|
5
|
+
/**
|
|
6
|
+
* 流入制限設定リポジトリ
|
|
7
|
+
*/
|
|
8
|
+
class WaiterSettingRepo {
|
|
9
|
+
settingModel;
|
|
10
|
+
// static にすることで、クラスが何回 new されてもメモリ上で1つだけ保持される
|
|
11
|
+
static cachedSettings;
|
|
12
|
+
static cacheExpiry = 0;
|
|
13
|
+
static CACHE_TTL_MS = 10 * 60 * 1000; // 10分
|
|
14
|
+
constructor(options) {
|
|
15
|
+
const { connection } = options;
|
|
16
|
+
this.settingModel = connection.model(setting_1.modelName, (0, setting_1.createSchema)());
|
|
17
|
+
}
|
|
18
|
+
async findWaiterSetting() {
|
|
19
|
+
const now = Date.now();
|
|
20
|
+
// キャッシュ参照
|
|
21
|
+
if (WaiterSettingRepo.cachedSettings !== undefined && now < WaiterSettingRepo.cacheExpiry) {
|
|
22
|
+
return WaiterSettingRepo.cachedSettings;
|
|
23
|
+
}
|
|
24
|
+
const settingDoc = await this.settingModel.findOne({ 'project.id': { $eq: '*' } }, {
|
|
25
|
+
_id: 0,
|
|
26
|
+
waiter: 1
|
|
27
|
+
})
|
|
28
|
+
.lean()
|
|
29
|
+
.exec();
|
|
30
|
+
// キャッシュを更新
|
|
31
|
+
if (settingDoc?.waiter !== undefined) {
|
|
32
|
+
console.log('document exist!', settingDoc);
|
|
33
|
+
WaiterSettingRepo.cachedSettings = settingDoc.waiter;
|
|
34
|
+
WaiterSettingRepo.cacheExpiry = now + WaiterSettingRepo.CACHE_TTL_MS;
|
|
35
|
+
}
|
|
36
|
+
return WaiterSettingRepo.cachedSettings;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.WaiterSettingRepo = WaiterSettingRepo;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
|
-
import { ISetting } from './mongoose/schemas/setting';
|
|
3
|
-
type IKeyOfProjection = keyof ISetting
|
|
4
|
-
|
|
2
|
+
import { ISetting, IStorageSettings } from './mongoose/schemas/setting';
|
|
3
|
+
type IKeyOfProjection = Exclude<keyof ISetting, 'jwt' | 'project' | 'waiter' | 'integration'>;
|
|
4
|
+
type IGlobalSetting = Pick<ISetting, 'defaultSenderEmail' | 'onEventChanged' | 'onOrderStatusChanged' | 'onReservationStatusChanged' | 'onResourceUpdated' | 'onTaskStatusChanged' | 'onTransactionStatusChanged' | 'orderNumber' | 'quota' | 'serviceOutputIdentifier' | 'storage' | 'transactionNumber' | 'triggerWebhook' | 'useInformResourceTypes' | 'useMongo4confirmationNumberFrom' | 'useMongo4orderNumberFrom' | 'useMongo4transactionNumberFrom' | 'useMongoAsStockHolder' | 'useMongoAsStockHolderProjects' | 'userPoolIdNew' | 'userPoolIdOld'>;
|
|
5
|
+
export { IGlobalSetting as ISetting };
|
|
5
6
|
/**
|
|
6
7
|
* 設定リポジトリ
|
|
7
8
|
*/
|
|
@@ -15,14 +16,14 @@ export declare class SettingRepo {
|
|
|
15
16
|
$eq?: string;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
|
-
}, inclusion: IKeyOfProjection[]): Promise<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
19
|
+
}, inclusion: IKeyOfProjection[]): Promise<IGlobalSetting | null>;
|
|
20
|
+
/**
|
|
21
|
+
* 初期設定追加専用
|
|
22
|
+
*/
|
|
23
|
+
addGlobalStorageSettings(params: {
|
|
24
|
+
key: keyof IStorageSettings;
|
|
25
|
+
value: number;
|
|
26
|
+
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
26
27
|
unsetUnnecessaryFields(params: {
|
|
27
28
|
filter: FilterQuery<ISetting>;
|
|
28
29
|
$unset: any;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SettingRepo = void 0;
|
|
4
|
-
// import { factory } from '../factory';
|
|
5
4
|
const setting_1 = require("./mongoose/schemas/setting");
|
|
6
5
|
/**
|
|
7
6
|
* 設定リポジトリ
|
|
@@ -36,24 +35,13 @@ class SettingRepo {
|
|
|
36
35
|
.lean()
|
|
37
36
|
.exec();
|
|
38
37
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
/**
|
|
39
|
+
* 初期設定追加専用
|
|
40
|
+
*/
|
|
41
|
+
async addGlobalStorageSettings(params) {
|
|
42
|
+
return this.settingModel.updateOne({ 'project.id': { $eq: '*' } }, {
|
|
42
43
|
$set: {
|
|
43
|
-
|
|
44
|
-
...(onReservationStatusChanged !== undefined) ? { onReservationStatusChanged } : undefined,
|
|
45
|
-
...(onTaskStatusChanged !== undefined) ? { onTaskStatusChanged } : undefined,
|
|
46
|
-
...(onResourceUpdated !== undefined) ? { onResourceUpdated } : undefined,
|
|
47
|
-
...(defaultSenderEmail !== undefined) ? { defaultSenderEmail } : undefined,
|
|
48
|
-
...(useInformResourceTypes !== undefined) ? { useInformResourceTypes } : undefined,
|
|
49
|
-
...(userPoolIdNew !== undefined) ? { userPoolIdNew } : undefined,
|
|
50
|
-
...(userPoolIdOld !== undefined) ? { userPoolIdOld } : undefined,
|
|
51
|
-
...(storage !== undefined) ? { storage } : undefined,
|
|
52
|
-
...(quota !== undefined) ? { quota } : undefined,
|
|
53
|
-
...(triggerWebhook !== undefined) ? { triggerWebhook } : undefined,
|
|
54
|
-
...(waiter !== undefined) ? { waiter } : undefined,
|
|
55
|
-
...(orderNumber !== undefined) ? { orderNumber } : undefined,
|
|
56
|
-
...(transactionNumber !== undefined) ? { transactionNumber } : undefined
|
|
44
|
+
[`storage.${params.key}`]: params.value
|
|
57
45
|
}
|
|
58
46
|
})
|
|
59
47
|
.exec();
|
|
@@ -81,6 +81,7 @@ import type { ServiceAvailableHourRepo } from './repo/service/availableHour';
|
|
|
81
81
|
import type { SettingRepo } from './repo/setting';
|
|
82
82
|
import type { IntegrationSettingRepo } from './repo/setting/integration';
|
|
83
83
|
import type { JWTSettingRepo } from './repo/setting/jwt';
|
|
84
|
+
import type { WaiterSettingRepo } from './repo/setting/waiter';
|
|
84
85
|
import type { StockHolderRepo } from './repo/stockHolder';
|
|
85
86
|
import type { TaskRepo } from './repo/task';
|
|
86
87
|
import type { TicketRepo } from './repo/ticket';
|
|
@@ -446,6 +447,10 @@ export declare namespace setting {
|
|
|
446
447
|
namespace JWT {
|
|
447
448
|
function createInstance(...params: ConstructorParameters<typeof JWTSettingRepo>): Promise<JWTSettingRepo>;
|
|
448
449
|
}
|
|
450
|
+
type Waiter = WaiterSettingRepo;
|
|
451
|
+
namespace Waiter {
|
|
452
|
+
function createInstance(...params: ConstructorParameters<typeof WaiterSettingRepo>): Promise<WaiterSettingRepo>;
|
|
453
|
+
}
|
|
449
454
|
}
|
|
450
455
|
export type StockHolder = StockHolderRepo;
|
|
451
456
|
export declare namespace StockHolder {
|
package/lib/chevre/repository.js
CHANGED
|
@@ -933,6 +933,17 @@ var setting;
|
|
|
933
933
|
}
|
|
934
934
|
JWT.createInstance = createInstance;
|
|
935
935
|
})(JWT = setting.JWT || (setting.JWT = {}));
|
|
936
|
+
let Waiter;
|
|
937
|
+
(function (Waiter) {
|
|
938
|
+
let repo;
|
|
939
|
+
async function createInstance(...params) {
|
|
940
|
+
if (repo === undefined) {
|
|
941
|
+
repo = (await import('./repo/setting/waiter.js')).WaiterSettingRepo;
|
|
942
|
+
}
|
|
943
|
+
return new repo(...params);
|
|
944
|
+
}
|
|
945
|
+
Waiter.createInstance = createInstance;
|
|
946
|
+
})(Waiter = setting.Waiter || (setting.Waiter = {}));
|
|
936
947
|
})(setting || (exports.setting = setting = {}));
|
|
937
948
|
var StockHolder;
|
|
938
949
|
(function (StockHolder) {
|
package/package.json
CHANGED