@chevre/domain 28.2.0-alpha.1 → 28.2.0-alpha.3
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/action/inform.d.ts +2 -1
- package/lib/chevre/repo/action/update.d.ts +2 -1
- package/lib/chevre/repo/action/use.d.ts +2 -1
- package/lib/chevre/repo/additionalProperty.d.ts +4 -2
- package/lib/chevre/repo/additionalProperty.js +6 -7
- package/lib/chevre/repo/adminAction.d.ts +3 -2
- package/lib/chevre/repo/adminAssetTransaction.d.ts +3 -2
- package/lib/chevre/repo/adminAsyncAction.d.ts +3 -2
- package/lib/chevre/repo/adminCheckMovieTicketAction.d.ts +2 -1
- package/lib/chevre/repo/adminEvent.d.ts +4 -2
- package/lib/chevre/repo/adminEventSeries.d.ts +4 -2
- package/lib/chevre/repo/adminPaymentServiceChannel.d.ts +2 -1
- package/lib/chevre/repo/adminPendingReservation.d.ts +4 -3
- package/lib/chevre/repo/adminScheduledTask.d.ts +3 -2
- package/lib/chevre/repo/adminTask.d.ts +5 -4
- package/lib/chevre/repo/aggregateOffer.d.ts +6 -5
- package/lib/chevre/repo/aggregateOffer.js +0 -1
- package/lib/chevre/repo/assetTransaction.d.ts +4 -2
- package/lib/chevre/repo/authorization.d.ts +5 -3
- package/lib/chevre/repo/categoryCode.d.ts +5 -4
- package/lib/chevre/repo/categoryCode.js +0 -1
- package/lib/chevre/repo/creativeWork.d.ts +5 -4
- package/lib/chevre/repo/creativeWork.js +8 -9
- package/lib/chevre/repo/customer.d.ts +3 -2
- package/lib/chevre/repo/customerType.d.ts +4 -3
- package/lib/chevre/repo/emailMessage.d.ts +2 -1
- package/lib/chevre/repo/event.d.ts +4 -2
- package/lib/chevre/repo/eventOffer.d.ts +2 -1
- package/lib/chevre/repo/eventSeries.d.ts +4 -2
- package/lib/chevre/repo/factory/action/createMongoConditions.d.ts +1 -1
- package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +3 -2
- package/lib/chevre/repo/identity.d.ts +3 -2
- package/lib/chevre/repo/identityProvider.d.ts +3 -2
- package/lib/chevre/repo/issuer.d.ts +3 -2
- package/lib/chevre/repo/issuer.js +6 -7
- package/lib/chevre/repo/member.d.ts +4 -3
- package/lib/chevre/repo/message.d.ts +4 -3
- package/lib/chevre/repo/mongoose/types.d.ts +2 -0
- package/lib/chevre/repo/mongoose/types.js +2 -0
- package/lib/chevre/repo/movieTicketType.d.ts +2 -1
- package/lib/chevre/repo/movieTicketType.js +0 -4
- package/lib/chevre/repo/note.d.ts +4 -2
- package/lib/chevre/repo/noteAboutOrder.d.ts +5 -3
- package/lib/chevre/repo/noteAboutOrder.js +1 -1
- package/lib/chevre/repo/offerCatalog.d.ts +3 -2
- package/lib/chevre/repo/offerCatalog.js +5 -6
- package/lib/chevre/repo/offerCatalogItem.d.ts +2 -1
- package/lib/chevre/repo/offerCatalogItem.js +9 -7
- package/lib/chevre/repo/order.d.ts +4 -3
- package/lib/chevre/repo/paymentService.d.ts +4 -3
- package/lib/chevre/repo/paymentServiceProvider.d.ts +4 -2
- package/lib/chevre/repo/place/movieTheater.d.ts +4 -3
- package/lib/chevre/repo/place/movieTheater.js +6 -7
- package/lib/chevre/repo/place/screeningRoom.d.ts +3 -2
- package/lib/chevre/repo/place/section.js +1 -1
- package/lib/chevre/repo/potentialAction.d.ts +3 -2
- package/lib/chevre/repo/product.d.ts +4 -3
- package/lib/chevre/repo/project.d.ts +4 -3
- package/lib/chevre/repo/role.d.ts +2 -1
- package/lib/chevre/repo/seller.d.ts +4 -3
- package/lib/chevre/repo/sellerReturnPolicy.d.ts +4 -2
- package/lib/chevre/repo/setting.d.ts +4 -3
- package/lib/chevre/repo/ticket.d.ts +4 -3
- package/lib/chevre/repo/transaction/placeOrder.d.ts +16 -2
- package/lib/chevre/repo/webSite.d.ts +5 -3
- package/lib/chevre/repo/webSite.js +1 -1
- package/lib/chevre/service/reserve/findByCode.d.ts +3 -1
- package/lib/chevre/service/reserve/findByCode.js +18 -14
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Connection,
|
|
1
|
+
import { Connection, QueryOptions } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/identityProvider';
|
|
4
5
|
export type ISavingIdentityProvider = Pick<factory.identityProvider.IIdentityProvider, 'identifier' | 'project' | 'typeOf'> & {
|
|
@@ -17,7 +18,7 @@ type IKeyOfProjection = keyof factory.identityProvider.IIdentityProvider;
|
|
|
17
18
|
export declare class IdentityProviderRepo {
|
|
18
19
|
private readonly identityProviderModel;
|
|
19
20
|
constructor(connection: Connection);
|
|
20
|
-
static CREATE_FILTER_QUERY(params: factory.identityProvider.ISearchConditions): FilterQuery<
|
|
21
|
+
static CREATE_FILTER_QUERY(params: factory.identityProvider.ISearchConditions): FilterQuery<IDocType>[];
|
|
21
22
|
save(params: {
|
|
22
23
|
id?: string;
|
|
23
24
|
attributes: ISavingIdentityProvider & IUnset;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/issuer';
|
|
4
5
|
type IIssuer = factory.issuer.IIssuer;
|
|
@@ -9,7 +10,7 @@ type ISearchConditions = factory.issuer.ISearchConditions;
|
|
|
9
10
|
export declare class IssuerRepo {
|
|
10
11
|
private readonly issuerModel;
|
|
11
12
|
constructor(connection: Connection);
|
|
12
|
-
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<
|
|
13
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<IDocType>[];
|
|
13
14
|
saveIssuer(params: IIssuer): Promise<{
|
|
14
15
|
id: string;
|
|
15
16
|
}>;
|
|
@@ -34,21 +34,20 @@ class IssuerRepo {
|
|
|
34
34
|
}
|
|
35
35
|
async saveIssuer(params) {
|
|
36
36
|
let savedId;
|
|
37
|
-
let doc;
|
|
38
37
|
if (params.id === '') {
|
|
39
38
|
const { id, ...creatingParams } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
40
|
-
|
|
41
|
-
savedId =
|
|
39
|
+
const createdDoc = await this.issuerModel.create(creatingParams);
|
|
40
|
+
savedId = createdDoc.id;
|
|
42
41
|
}
|
|
43
42
|
else {
|
|
44
43
|
const { id, identifier, project, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
45
|
-
doc = await this.issuerModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $set: updateFields }, { upsert: false, new: true, projection: { _id: 1 } })
|
|
44
|
+
const doc = await this.issuerModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $set: updateFields }, { upsert: false, new: true, projection: { _id: 1 } })
|
|
46
45
|
.exec();
|
|
46
|
+
if (doc === null) {
|
|
47
|
+
throw new factory_1.factory.errors.NotFound(this.issuerModel.modelName);
|
|
48
|
+
}
|
|
47
49
|
savedId = params.id;
|
|
48
50
|
}
|
|
49
|
-
if (doc === null) {
|
|
50
|
-
throw new factory_1.factory.errors.NotFound(this.issuerModel.modelName);
|
|
51
|
-
}
|
|
52
51
|
return { id: savedId };
|
|
53
52
|
}
|
|
54
53
|
async renameIssuerIdentifier(params) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
|
-
import { IGlobalMember } from './mongoose/schemas/member/global';
|
|
4
|
+
import { IGlobalMember, IDocType } from './mongoose/schemas/member/global';
|
|
4
5
|
type IKeyOfProjection = keyof factory.iam.IMember;
|
|
5
6
|
export type ICustomerMember = Pick<factory.iam.IMemberOfRole, 'hasRole' | 'id' | 'name' | 'memberOf'> & {
|
|
6
7
|
/**
|
|
@@ -16,7 +17,7 @@ export declare class MemberRepo {
|
|
|
16
17
|
private readonly globalMemberModel;
|
|
17
18
|
private readonly memberModel;
|
|
18
19
|
constructor(connection: Connection);
|
|
19
|
-
static CREATE_MONGO_CONDITIONS(params: factory.iam.ISearchConditions): FilterQuery<
|
|
20
|
+
static CREATE_MONGO_CONDITIONS(params: factory.iam.ISearchConditions): FilterQuery<IDocType>[];
|
|
20
21
|
/**
|
|
21
22
|
* プロジェクト指定で検索する
|
|
22
23
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
|
-
import { IEmailMessage } from './mongoose/schemas/message';
|
|
4
|
+
import { IEmailMessage, IDocType } from './mongoose/schemas/message';
|
|
4
5
|
type IFindByIdentifierResult = Pick<IEmailMessage, 'about' | 'identifier' | 'name' | 'sender' | 'text' | 'toRecipient' | 'typeOf'>;
|
|
5
6
|
interface ISearchConditions {
|
|
6
7
|
limit?: number;
|
|
@@ -39,7 +40,7 @@ type IKeyOfProjection = keyof IEmailMessage;
|
|
|
39
40
|
export declare class MessageRepo {
|
|
40
41
|
private readonly messageModel;
|
|
41
42
|
constructor(connection: Connection);
|
|
42
|
-
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<
|
|
43
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<IDocType>[];
|
|
43
44
|
/**
|
|
44
45
|
* 検索
|
|
45
46
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AnyExpression, Connection
|
|
1
|
+
import { AnyExpression, Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { IDocType } from './mongoose/schemas/movieTicketTypes';
|
|
3
4
|
import { factory } from '../factory';
|
|
4
5
|
type IUnset = {
|
|
@@ -178,7 +178,6 @@ class MovieTicketTypeRepo {
|
|
|
178
178
|
}
|
|
179
179
|
async saveMovieTicketType(params) {
|
|
180
180
|
let savedId;
|
|
181
|
-
// let doc: HydratedDocument<{ _id: Types.ObjectId }> | null;
|
|
182
181
|
if (typeof params.id !== 'string') {
|
|
183
182
|
const { id, $unset, ...creatingDoc } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
184
183
|
const createResult = await this.categoryCodeModel.create(creatingDoc);
|
|
@@ -201,9 +200,6 @@ class MovieTicketTypeRepo {
|
|
|
201
200
|
}
|
|
202
201
|
savedId = params.id;
|
|
203
202
|
}
|
|
204
|
-
// if (doc === null) {
|
|
205
|
-
// throw new factory.errors.NotFound(this.categoryCodeModel.modelName);
|
|
206
|
-
// }
|
|
207
203
|
return { id: savedId };
|
|
208
204
|
}
|
|
209
205
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { Connection,
|
|
1
|
+
import type { Connection, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
4
|
+
import { IDocType } from './mongoose/schemas/note';
|
|
3
5
|
type INoteDigitalDocument = factory.creativeWork.noteDigitalDocument.INoteDigitalDocument;
|
|
4
6
|
type IKeyOfProjection = keyof INoteDigitalDocument;
|
|
5
7
|
/**
|
|
@@ -8,7 +10,7 @@ type IKeyOfProjection = keyof INoteDigitalDocument;
|
|
|
8
10
|
export declare class NoteRepo {
|
|
9
11
|
private readonly noteModel;
|
|
10
12
|
constructor(connection: Connection);
|
|
11
|
-
static CREATE_MONGO_CONDITIONS(params: factory.creativeWork.noteDigitalDocument.ISearchConditions): FilterQuery<
|
|
13
|
+
static CREATE_MONGO_CONDITIONS(params: factory.creativeWork.noteDigitalDocument.ISearchConditions): FilterQuery<IDocType>[];
|
|
12
14
|
findNotes(params: factory.creativeWork.noteDigitalDocument.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<(INoteDigitalDocument & {
|
|
13
15
|
id: string;
|
|
14
16
|
})[]>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { Connection,
|
|
1
|
+
import type { Connection, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
4
|
+
import { IDocType } from './mongoose/schemas/note';
|
|
3
5
|
type INoteAboutOrder = factory.creativeWork.noteDigitalDocument.INoteAboutOrder;
|
|
4
6
|
type IKeyOfProjection = keyof INoteAboutOrder;
|
|
5
7
|
/**
|
|
@@ -8,7 +10,7 @@ type IKeyOfProjection = keyof INoteAboutOrder;
|
|
|
8
10
|
export declare class NoteAboutOrderRepo {
|
|
9
11
|
private readonly noteModel;
|
|
10
12
|
constructor(connection: Connection);
|
|
11
|
-
static CREATE_MONGO_CONDITIONS(params: factory.creativeWork.noteDigitalDocument.ISearchConditions): FilterQuery<
|
|
13
|
+
static CREATE_MONGO_CONDITIONS(params: factory.creativeWork.noteDigitalDocument.ISearchConditions): FilterQuery<IDocType>[];
|
|
12
14
|
/**
|
|
13
15
|
* 検索
|
|
14
16
|
*/
|
|
@@ -26,7 +28,7 @@ export declare class NoteAboutOrderRepo {
|
|
|
26
28
|
attributes: Pick<INoteAboutOrder, 'text' | 'editor'>;
|
|
27
29
|
}): Promise<void>;
|
|
28
30
|
unsetUnnecessaryFields(params: {
|
|
29
|
-
filter: FilterQuery<
|
|
31
|
+
filter: FilterQuery<IDocType>;
|
|
30
32
|
$unset: any;
|
|
31
33
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
32
34
|
}
|
|
@@ -174,7 +174,7 @@ class NoteAboutOrderRepo {
|
|
|
174
174
|
throw new factory_1.factory.errors.NotFound(this.noteModel.modelName);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
// public getCursor(conditions: FilterQuery<
|
|
177
|
+
// public getCursor(conditions: FilterQuery<IDocType>, projection: any) {
|
|
178
178
|
// return this.noteModel.find(
|
|
179
179
|
// {
|
|
180
180
|
// ...conditions,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection,
|
|
1
|
+
import type { Connection, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/offerCatalog';
|
|
4
5
|
export type IAggregatedOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered'> & {
|
|
@@ -184,7 +185,7 @@ export declare class OfferCatalogRepo {
|
|
|
184
185
|
__v: number;
|
|
185
186
|
}) | null>;
|
|
186
187
|
unsetUnnecessaryFields(params: {
|
|
187
|
-
filter: FilterQuery<
|
|
188
|
+
filter: FilterQuery<IDocType>;
|
|
188
189
|
$unset: any;
|
|
189
190
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
190
191
|
aggregateItemList(params: {
|
|
@@ -126,27 +126,26 @@ class OfferCatalogRepo {
|
|
|
126
126
|
}
|
|
127
127
|
async save(params) {
|
|
128
128
|
let savedId;
|
|
129
|
-
let doc;
|
|
130
129
|
if (typeof params.id !== 'string' || params.id === '') {
|
|
131
130
|
const { default: uniqid } = await import('uniqid');
|
|
132
131
|
const newId = uniqid();
|
|
133
132
|
const { id, $unset, ...creatingDoc } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
134
|
-
|
|
133
|
+
await this.offerCatalogModel.create({ ...creatingDoc, _id: newId });
|
|
135
134
|
savedId = newId;
|
|
136
135
|
}
|
|
137
136
|
else {
|
|
138
137
|
// 上書き禁止属性を除外
|
|
139
138
|
const { id, identifier, itemOffered, project, typeOf, $unset, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
140
|
-
doc = await this.offerCatalogModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
139
|
+
const doc = await this.offerCatalogModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
141
140
|
$set: updateFields,
|
|
142
141
|
...(params.$unset !== undefined) ? { $unset: params.$unset } : undefined
|
|
143
142
|
}, { upsert: false, new: true, projection: { _id: 1 } })
|
|
144
143
|
.exec();
|
|
144
|
+
if (doc === null) {
|
|
145
|
+
throw new factory_1.factory.errors.NotFound(this.offerCatalogModel.modelName);
|
|
146
|
+
}
|
|
145
147
|
savedId = id;
|
|
146
148
|
}
|
|
147
|
-
if (doc === null) {
|
|
148
|
-
throw new factory_1.factory.errors.NotFound(this.offerCatalogModel.modelName);
|
|
149
|
-
}
|
|
150
149
|
return { id: savedId };
|
|
151
150
|
}
|
|
152
151
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Connection,
|
|
1
|
+
import { Connection, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/offerCatalogItem';
|
|
4
5
|
type IOfferCatalogItem = Pick<factory.offerCatalog.IOfferCatalog, 'description' | 'identifier' | 'itemListElement' | 'itemOffered' | 'name' | 'project' | 'relatedOffer' | 'typeOf' | 'id'>;
|
|
@@ -101,23 +101,25 @@ class OfferCatalogItemRepo {
|
|
|
101
101
|
return andConditions;
|
|
102
102
|
}
|
|
103
103
|
async save(params) {
|
|
104
|
-
let
|
|
104
|
+
let savedId;
|
|
105
105
|
if (typeof params.id !== 'string' || params.id.length === 0) {
|
|
106
106
|
const { id, $unset, ...creatingDoc } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
107
|
-
|
|
107
|
+
const createdDoc = await this.offerCatalogItemModel.create(creatingDoc);
|
|
108
|
+
savedId = createdDoc.id;
|
|
108
109
|
}
|
|
109
110
|
else {
|
|
110
111
|
const { id, identifier, project, typeOf, $unset, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
111
|
-
doc = await this.offerCatalogItemModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
112
|
+
const doc = await this.offerCatalogItemModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
112
113
|
$set: updateFields,
|
|
113
114
|
...(params.$unset !== undefined) ? { $unset: params.$unset } : undefined
|
|
114
115
|
}, { upsert: false, new: true, projection: { _id: 1 } })
|
|
115
116
|
.exec();
|
|
117
|
+
if (doc === null) {
|
|
118
|
+
throw new factory_1.factory.errors.NotFound(this.offerCatalogItemModel.modelName);
|
|
119
|
+
}
|
|
120
|
+
savedId = params.id;
|
|
116
121
|
}
|
|
117
|
-
|
|
118
|
-
throw new factory_1.factory.errors.NotFound(this.offerCatalogItemModel.modelName);
|
|
119
|
-
}
|
|
120
|
-
return { id: doc.id };
|
|
122
|
+
return { id: savedId };
|
|
121
123
|
}
|
|
122
124
|
/**
|
|
123
125
|
* プロジェクトとコードから冪等保管
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/order';
|
|
4
5
|
type IOrderWithoutAcceptedOffers = factory.order.IOrder;
|
|
@@ -33,7 +34,7 @@ type ISearchConditions = Pick<factory.order.ISearchConditions, 'acceptedOffers'
|
|
|
33
34
|
export declare class OrderRepo {
|
|
34
35
|
private readonly orderModel;
|
|
35
36
|
constructor(connection: Connection);
|
|
36
|
-
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<
|
|
37
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<IDocType>[];
|
|
37
38
|
/**
|
|
38
39
|
* 注文ステータスを変更する
|
|
39
40
|
*/
|
|
@@ -150,7 +151,7 @@ export declare class OrderRepo {
|
|
|
150
151
|
__v: number;
|
|
151
152
|
}) | null>;
|
|
152
153
|
unsetUnnecessaryFields(params: {
|
|
153
|
-
filter: FilterQuery<
|
|
154
|
+
filter: FilterQuery<IDocType>;
|
|
154
155
|
$unset: any;
|
|
155
156
|
arrayFilters?: any[];
|
|
156
157
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
|
-
import { IModel } from './mongoose/schemas/paymentService';
|
|
4
|
+
import { IModel, IDocType } from './mongoose/schemas/paymentService';
|
|
4
5
|
type IUnsetKey = keyof Pick<factory.service.paymentService.IService, 'additionalProperty' | 'availableChannel' | 'serviceOutput' | 'serviceType'>;
|
|
5
6
|
type IKeyOfProjection4paymentService = keyof factory.service.paymentService.IService;
|
|
6
7
|
/**
|
|
@@ -14,7 +15,7 @@ export declare class PaymentServiceRepo {
|
|
|
14
15
|
private readonly paymentServiceModel;
|
|
15
16
|
private readonly paymentServiceChannelModel;
|
|
16
17
|
constructor(connection: Connection);
|
|
17
|
-
static CREATE_MONGO_CONDITIONS(params: ISearchConditions4paymentService): FilterQuery<
|
|
18
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions4paymentService): FilterQuery<IDocType>[];
|
|
18
19
|
/**
|
|
19
20
|
* 決済サービスを保管する
|
|
20
21
|
*/
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Connection
|
|
1
|
+
import { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
3
|
+
import { IDocType } from './mongoose/schemas/paymentService';
|
|
2
4
|
import { factory } from '../factory';
|
|
3
5
|
type IAvailablePaymentServiceType = factory.service.paymentService.PaymentServiceType.CreditCard | factory.service.paymentService.PaymentServiceType.MovieTicket;
|
|
4
6
|
export type IPublicPaymentServiceByProvider = Pick<factory.service.paymentService.IService, 'name' | 'description' | 'typeOf' | 'id' | 'productID' | 'serviceType' | 'serviceOutput' | 'additionalProperty'> & {
|
|
@@ -77,7 +79,7 @@ export declare class PaymentServiceProviderRepo {
|
|
|
77
79
|
};
|
|
78
80
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
79
81
|
unsetUnnecessaryFields(params: {
|
|
80
|
-
filter: FilterQuery<
|
|
82
|
+
filter: FilterQuery<IDocType>;
|
|
81
83
|
$unset: any;
|
|
82
84
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
83
85
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection,
|
|
1
|
+
import type { Connection, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from '../mongoose/types';
|
|
2
3
|
import { factory } from '../../factory';
|
|
3
4
|
import { IDocType } from '../mongoose/schemas/civicStructure';
|
|
4
5
|
export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount' | 'parentOrganization'>;
|
|
@@ -28,7 +29,7 @@ interface IUpsertOptions {
|
|
|
28
29
|
export declare class MovieTheaterRepo {
|
|
29
30
|
private readonly civicStructureModel;
|
|
30
31
|
constructor(connection: Connection);
|
|
31
|
-
static CREATE_MOVIE_THEATER_MONGO_CONDITIONS(params: factory.place.movieTheater.ISearchConditions): FilterQuery<
|
|
32
|
+
static CREATE_MOVIE_THEATER_MONGO_CONDITIONS(params: factory.place.movieTheater.ISearchConditions): FilterQuery<IDocType>[];
|
|
32
33
|
/**
|
|
33
34
|
* 施設を保管する
|
|
34
35
|
*/
|
|
@@ -94,7 +95,7 @@ export declare class MovieTheaterRepo {
|
|
|
94
95
|
id: string;
|
|
95
96
|
};
|
|
96
97
|
}): Promise<void>;
|
|
97
|
-
getCursor(conditions: FilterQuery<
|
|
98
|
+
getCursor(conditions: FilterQuery<IDocType>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/place/movieTheater").IPlace, "id"> & {
|
|
98
99
|
hasPOS?: factory.place.movieTheater.IPOS[];
|
|
99
100
|
hasEntranceGate?: factory.place.movieTheater.IEntranceGate[];
|
|
100
101
|
} & {
|
|
@@ -80,14 +80,13 @@ class MovieTheaterRepo {
|
|
|
80
80
|
*/
|
|
81
81
|
async saveMovieTheater(params) {
|
|
82
82
|
let savedId;
|
|
83
|
-
let doc;
|
|
84
83
|
if (params.id === '') {
|
|
85
84
|
const {
|
|
86
85
|
// 入場ゲートを保管しない(2026-01-11~)
|
|
87
86
|
id, hasEntranceGate, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
88
87
|
...creatingParams } = params; // omit id(2024-09-12~)
|
|
89
|
-
|
|
90
|
-
savedId =
|
|
88
|
+
const createdDoc = await this.civicStructureModel.create(creatingParams);
|
|
89
|
+
savedId = createdDoc.id;
|
|
91
90
|
}
|
|
92
91
|
else {
|
|
93
92
|
// 上書き禁止属性を除外(2022-08-24~)
|
|
@@ -95,13 +94,13 @@ class MovieTheaterRepo {
|
|
|
95
94
|
// 入場ゲートを保管しない(2026-01-11~)
|
|
96
95
|
id, branchCode, project, typeOf, hasEntranceGate, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
97
96
|
...updateFields } = params;
|
|
98
|
-
doc = await this.civicStructureModel.findOneAndUpdate({ _id: { $eq: params.id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
|
|
97
|
+
const doc = await this.civicStructureModel.findOneAndUpdate({ _id: { $eq: params.id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
|
|
99
98
|
.exec();
|
|
99
|
+
if (doc === null) {
|
|
100
|
+
throw new factory_1.factory.errors.NotFound(this.civicStructureModel.modelName);
|
|
101
|
+
}
|
|
100
102
|
savedId = params.id;
|
|
101
103
|
}
|
|
102
|
-
if (doc === null) {
|
|
103
|
-
throw new factory_1.factory.errors.NotFound(this.civicStructureModel.modelName);
|
|
104
|
-
}
|
|
105
104
|
return { id: savedId };
|
|
106
105
|
}
|
|
107
106
|
async saveMovieTheaterByBranchCode4coa(params) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection,
|
|
1
|
+
import type { Connection, PipelineStage, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from '../mongoose/types';
|
|
2
3
|
import { factory } from '../../factory';
|
|
3
4
|
import { IDocType } from '../mongoose/schemas/place';
|
|
4
5
|
export type IScreeningRoomFoundByBranchCode = Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'containsPlace' | 'seatCount' | 'parentOrganization'>;
|
|
@@ -145,7 +146,7 @@ export declare class ScreeningRoomRepo {
|
|
|
145
146
|
id: string;
|
|
146
147
|
};
|
|
147
148
|
}): Promise<void>;
|
|
148
|
-
getCursor(conditions: FilterQuery<
|
|
149
|
+
getCursor(conditions: FilterQuery<IDocType>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("../mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/place/screeningRoom").IPlace, "containsPlace"> & {
|
|
149
150
|
description?: any;
|
|
150
151
|
openingHoursSpecification?: any;
|
|
151
152
|
smokingAllowed?: boolean;
|
|
@@ -338,7 +338,7 @@ class SectionRepo {
|
|
|
338
338
|
// if (!Array.isArray(containsPlace)) {
|
|
339
339
|
// throw new factory.errors.ArgumentNull('containsPlace');
|
|
340
340
|
// }
|
|
341
|
-
// const doc = await this.placeModel.findOneAndUpdate
|
|
341
|
+
// const doc = await this.placeModel.findOneAndUpdate(
|
|
342
342
|
// {
|
|
343
343
|
// typeOf: { $eq: factory.placeType.ScreeningRoom },
|
|
344
344
|
// 'project.id': { $eq: project.id },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Connection,
|
|
1
|
+
import { Connection, QueryOptions } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/potentialAction';
|
|
4
5
|
export type ISavingPotentialAction = Pick<factory.potentialAction.IPotentialAction, 'target' | 'project' | 'typeOf' | 'identifier'> & {
|
|
@@ -14,7 +15,7 @@ type IKeyOfProjection = keyof factory.potentialAction.IPotentialAction;
|
|
|
14
15
|
export declare class PotentialActionRepo {
|
|
15
16
|
private readonly potentialActionModel;
|
|
16
17
|
constructor(connection: Connection);
|
|
17
|
-
static CREATE_FILTER_QUERY(params: factory.potentialAction.ISearchConditions): FilterQuery<
|
|
18
|
+
static CREATE_FILTER_QUERY(params: factory.potentialAction.ISearchConditions): FilterQuery<IDocType>[];
|
|
18
19
|
save(params: {
|
|
19
20
|
id?: string;
|
|
20
21
|
attributes: ISavingPotentialAction & IUnset;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Connection,
|
|
1
|
+
import { Connection, Types, mongo } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType, IDocTypeAsProduct } from './mongoose/schemas/product';
|
|
4
5
|
type IKeyOfProjection = keyof factory.product.IProduct | 'hasOfferCatalog.id';
|
|
@@ -13,7 +14,7 @@ type IUnsetKey = keyof Pick<factory.product.IProduct, 'additionalProperty' | 'av
|
|
|
13
14
|
export declare class ProductRepo {
|
|
14
15
|
private readonly productModel;
|
|
15
16
|
constructor(connection: Connection);
|
|
16
|
-
static CREATE_MONGO_CONDITIONS(params: ISearchConditions4product): FilterQuery<
|
|
17
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions4product): FilterQuery<IDocType>[];
|
|
17
18
|
/**
|
|
18
19
|
* プロダクトを検索する
|
|
19
20
|
*/
|
|
@@ -98,7 +99,7 @@ export declare class ProductRepo {
|
|
|
98
99
|
__v: number;
|
|
99
100
|
}) | null>;
|
|
100
101
|
unsetUnnecessaryFields(params: {
|
|
101
|
-
filter: FilterQuery<
|
|
102
|
+
filter: FilterQuery<IDocType>;
|
|
102
103
|
$unset: any;
|
|
103
104
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
104
105
|
migrateHasOfferCatalogItemListElement(params: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { IDocType } from './mongoose/schemas/project';
|
|
3
4
|
import { factory } from '../factory';
|
|
4
5
|
type IKeyOfProjection = keyof factory.project.IProject;
|
|
@@ -9,7 +10,7 @@ type IKeyOfProjection = keyof factory.project.IProject;
|
|
|
9
10
|
export declare class ProjectRepo {
|
|
10
11
|
private readonly projectModel;
|
|
11
12
|
constructor(connection: Connection);
|
|
12
|
-
static CREATE_MONGO_CONDITIONS(params: factory.project.ISearchConditions): FilterQuery<
|
|
13
|
+
static CREATE_MONGO_CONDITIONS(params: factory.project.ISearchConditions): FilterQuery<IDocType>[];
|
|
13
14
|
findById(params: {
|
|
14
15
|
id: string;
|
|
15
16
|
inclusion: IKeyOfProjection[];
|
|
@@ -43,7 +44,7 @@ export declare class ProjectRepo {
|
|
|
43
44
|
deleteById(params: {
|
|
44
45
|
id: string;
|
|
45
46
|
}): Promise<void>;
|
|
46
|
-
getCursor(conditions: FilterQuery<
|
|
47
|
+
getCursor(conditions: FilterQuery<IDocType>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<factory.project.IProject, "name" | "typeOf" | "logo" | "alternateName" | "hasMerchantReturnPolicy" | "settings" | "subscription"> & {
|
|
47
48
|
_id: string;
|
|
48
49
|
makesOffer?: factory.project.IMakesOffer[];
|
|
49
50
|
} & Required<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
4
|
import { IDocType } from './mongoose/schemas/role';
|
|
4
5
|
type IRole = IDocType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AnyExpression, Connection,
|
|
1
|
+
import { AnyExpression, Connection, QueryOptions, Types } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { IDocType } from './mongoose/schemas/seller';
|
|
3
4
|
import { factory } from '../factory';
|
|
4
5
|
export type ISellerWithId = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
|
|
@@ -32,7 +33,7 @@ type IKeyOfProjection = keyof ISellerWithId;
|
|
|
32
33
|
export declare class SellerRepo {
|
|
33
34
|
private readonly sellerModel;
|
|
34
35
|
constructor(connection: Connection);
|
|
35
|
-
static CREATE_MONGO_CONDITIONS(params: factory.seller.ISearchConditions & IMemberSearchConditions): FilterQuery<
|
|
36
|
+
static CREATE_MONGO_CONDITIONS(params: factory.seller.ISearchConditions & IMemberSearchConditions): FilterQuery<IDocType>[];
|
|
36
37
|
static CREATE_AGGREGATE_SELLERS_PROJECTION(inclusions: (Exclude<keyof ISellerByAggregate, 'id'>)[]): Record<string, AnyExpression>;
|
|
37
38
|
/**
|
|
38
39
|
* 販売者を保管する
|
|
@@ -75,7 +76,7 @@ export declare class SellerRepo {
|
|
|
75
76
|
id: string;
|
|
76
77
|
makesOffer: factory.seller.IMakesOffer;
|
|
77
78
|
}): Promise<void>;
|
|
78
|
-
getCursor(conditions: FilterQuery<
|
|
79
|
+
getCursor(conditions: FilterQuery<IDocType>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<factory.seller.ISeller, "name" | "typeOf" | "branchCode" | "additionalProperty" | "project" | "url" | "telephone" | "makesOffer" | "hasMerchantReturnPolicy"> & {
|
|
79
80
|
paymentAccepted?: factory.seller.IPaymentAccepted[];
|
|
80
81
|
} & {
|
|
81
82
|
_id: Types.ObjectId;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Connection
|
|
1
|
+
import { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
3
|
+
import { IDocType } from './mongoose/schemas/sellerReturnPolicy';
|
|
2
4
|
import { factory } from '../factory';
|
|
3
5
|
export type ISavingReturnPolicy = Pick<factory.sellerReturnPolicy.ISellerReturnPolicy, 'applicablePaymentMethod' | 'identifier' | 'itemCondition' | 'merchantReturnDays' | 'name' | 'project' | 'restockingFee' | 'typeOf'> & {
|
|
4
6
|
id?: never;
|
|
@@ -16,7 +18,7 @@ type IKeyOfProjection = keyof ISellerReturnPolicyWithId;
|
|
|
16
18
|
export declare class SellerReturnPolicyRepo {
|
|
17
19
|
private readonly sellerReturnPolicyModel;
|
|
18
20
|
constructor(connection: Connection);
|
|
19
|
-
static CREATE_FILTER_QUERY(params: factory.sellerReturnPolicy.ISearchConditions): FilterQuery<
|
|
21
|
+
static CREATE_FILTER_QUERY(params: factory.sellerReturnPolicy.ISearchConditions): FilterQuery<IDocType>[];
|
|
20
22
|
save(params: {
|
|
21
23
|
id?: string;
|
|
22
24
|
attributes: ISavingReturnPolicy & IUnset;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Connection
|
|
2
|
-
import {
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
3
|
+
import { IDocType, ISetting, IStorageSettings } from './mongoose/schemas/setting';
|
|
3
4
|
type IKeyOfProjection = Exclude<keyof ISetting, 'jwt' | 'project' | 'waiter' | 'integration'>;
|
|
4
5
|
type IGlobalSetting = Pick<ISetting, 'defaultSenderEmail' | 'orderNumber' | 'quota' | 'storage' | 'transactionNumber' | 'useInformResourceTypes' | 'useMongo4confirmationNumberFrom' | 'useMongo4orderNumberFrom' | 'useMongo4transactionNumberFrom' | 'useMongoAsStockHolder' | 'useMongoAsStockHolderProjects' | 'userPoolIdNew' | 'userPoolIdOld'>;
|
|
5
6
|
export { IGlobalSetting as ISetting };
|
|
@@ -25,7 +26,7 @@ export declare class SettingRepo {
|
|
|
25
26
|
value: number;
|
|
26
27
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
27
28
|
unsetUnnecessaryFields(params: {
|
|
28
|
-
filter: FilterQuery<
|
|
29
|
+
filter: FilterQuery<IDocType>;
|
|
29
30
|
$unset: any;
|
|
30
31
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
31
32
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
3
|
-
import { ITicket, ITicketIssuedBy } from './mongoose/schemas/ticket';
|
|
4
|
+
import { ITicket, ITicketIssuedBy, IDocType } from './mongoose/schemas/ticket';
|
|
4
5
|
export { ITicket };
|
|
5
6
|
type IIssueParams = Pick<ITicket, 'ticketToken'> & {
|
|
6
7
|
project: {
|
|
@@ -33,7 +34,7 @@ type IKeyOfProjection = keyof ITicket;
|
|
|
33
34
|
export declare class TicketRepo {
|
|
34
35
|
private readonly ticketModel;
|
|
35
36
|
constructor(connection: Connection);
|
|
36
|
-
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<
|
|
37
|
+
static CREATE_MONGO_CONDITIONS(params: ISearchConditions): FilterQuery<IDocType>[];
|
|
37
38
|
/**
|
|
38
39
|
* 承認コードからチケットを発行する
|
|
39
40
|
*/
|