@chevre/domain 24.1.0-alpha.11 → 24.1.0-alpha.12

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.
@@ -3,9 +3,10 @@ import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
4
  type IDocType = (Omit<factory.reservation.eventReservation.IReservation, 'id'>) & {
5
5
  _id: string;
6
- bookingAgent?: any;
7
6
  previousReservationStatus?: factory.reservationStatusType;
8
- priceCurrency?: factory.priceCurrency;
7
+ price?: never;
8
+ priceCurrency?: never;
9
+ issuedThrough?: never;
9
10
  };
10
11
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
11
12
  type ISchemaDefinition = SchemaDefinition<IDocType>;
@@ -22,18 +22,11 @@ const schemaDefinition = {
22
22
  required: true
23
23
  },
24
24
  additionalTicketText: String,
25
- bookingAgent: mongoose_1.SchemaTypes.Mixed,
26
25
  bookingTime: Date,
27
26
  broker: mongoose_1.SchemaTypes.Mixed,
28
- // cancelReservationUrl: String,
29
- // checkinUrl: String,
30
- // confirmReservationUrl: String,
31
27
  modifiedTime: Date,
32
- // modifyReservationUrl: String,
33
28
  numSeats: Number,
34
29
  previousReservationStatus: String,
35
- price: mongoose_1.SchemaTypes.Mixed,
36
- priceCurrency: String,
37
30
  programMembershipUsed: mongoose_1.SchemaTypes.Mixed,
38
31
  reservationFor: mongoose_1.SchemaTypes.Mixed,
39
32
  reservationNumber: {
@@ -50,6 +43,9 @@ const schemaDefinition = {
50
43
  checkedIn: { type: Boolean, default: false },
51
44
  attended: { type: Boolean, default: false },
52
45
  additionalProperty: mongoose_1.SchemaTypes.Mixed,
46
+ // bookingAgent: SchemaTypes.Mixed,
47
+ price: mongoose_1.SchemaTypes.Mixed,
48
+ priceCurrency: String,
53
49
  issuedThrough: mongoose_1.SchemaTypes.Mixed
54
50
  };
55
51
  const schemaOptions = {
@@ -20,7 +20,7 @@ export type ICreatingReservation = Omit<factory.reservation.eventReservation.IRe
20
20
  /**
21
21
  * 廃止予定の予約属性
22
22
  */
23
- export type IDeprecatedField = 'price' | 'underName';
23
+ export type IDeprecatedField = 'price' | 'underName' | 'priceCurrency' | 'issuedThrough';
24
24
  export type IKeyOfProjection = Exclude<keyof factory.reservation.eventReservation.IReservation, IDeprecatedField> | 'reservedTicket.dateUsed' | 'reservationFor.id' | 'reservationFor.typeOf';
25
25
  export type IAttendedReservation = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'typeOf' | 'project' | 'modifiedTime'> & {
26
26
  reservationFor: Pick<factory.reservation.eventReservation.IReservationForMinimized, 'id' | 'typeOf'>;
@@ -35,6 +35,14 @@ export type IReservationAsFindResult = Omit<factory.reservation.eventReservation
35
35
  * 実データとしてはまだ存在しているが型から廃止(2026-03-26~)
36
36
  */
37
37
  underName?: never;
38
+ /**
39
+ * discontinue(2026-05-10~)
40
+ */
41
+ priceCurrency?: never;
42
+ /**
43
+ * discontinue(2026-05-10~)
44
+ */
45
+ issuedThrough?: never;
38
46
  };
39
47
  /**
40
48
  * 予約リポジトリ
@@ -142,18 +150,20 @@ export declare class ReservationRepo {
142
150
  }): Promise<string[]>;
143
151
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id"> & {
144
152
  _id: string;
145
- bookingAgent?: any;
146
153
  previousReservationStatus?: factory.reservationStatusType;
147
- priceCurrency?: factory.priceCurrency;
154
+ price?: never;
155
+ priceCurrency?: never;
156
+ issuedThrough?: never;
148
157
  } & Required<{
149
158
  _id: string;
150
159
  }> & {
151
160
  __v: number;
152
161
  }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id"> & {
153
162
  _id: string;
154
- bookingAgent?: any;
155
163
  previousReservationStatus?: factory.reservationStatusType;
156
- priceCurrency?: factory.priceCurrency;
164
+ price?: never;
165
+ priceCurrency?: never;
166
+ issuedThrough?: never;
157
167
  } & Required<{
158
168
  _id: string;
159
169
  }> & {
@@ -59,23 +59,9 @@ export declare class RoleRepo {
59
59
  } & {
60
60
  __v: number;
61
61
  }) | null>;
62
- addMember(params: Pick<IRole, 'member' | 'memberOf' | 'roleName'>): Promise<(import("mongoose").FlattenMaps<{
63
- typeOf: import("@chevre/factory/lib/chevre/role").RoleType;
64
- memberOf: {
65
- typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
66
- };
67
- member: {
68
- typeOf: import("@chevre/factory/lib/chevre/role/organizationRole").IMemberType;
69
- };
70
- roleName: import("@chevre/factory/lib/chevre/role/organizationRole").RoleName;
71
- permissions: string[];
72
- }> & {
73
- _id: import("mongoose").Types.ObjectId;
74
- } & {
75
- __v: number;
76
- }) | null>;
77
62
  create(params: Pick<IRole, 'member' | 'memberOf' | 'permissions' | 'roleName'>): Promise<{
78
63
  id: string;
79
64
  }>;
65
+ deleteByRoleName(params: Pick<IRole, 'roleName'>): Promise<import("mongodb").DeleteResult>;
80
66
  }
81
67
  export {};
@@ -139,20 +139,6 @@ class RoleRepo {
139
139
  .lean()
140
140
  .exec();
141
141
  }
142
- async addMember(params) {
143
- const { roleName, member, memberOf } = params;
144
- return this.roleModel.findOneAndUpdate({
145
- roleName: { $eq: roleName },
146
- 'member.typeOf': { $ne: member.typeOf }
147
- }, {
148
- $set: { member, memberOf }
149
- }, {
150
- new: true,
151
- projection: { _id: 1 }
152
- })
153
- .lean()
154
- .exec();
155
- }
156
142
  async create(params) {
157
143
  const { member, memberOf, permissions, roleName } = params;
158
144
  const creatingRole = {
@@ -167,5 +153,12 @@ class RoleRepo {
167
153
  const savedId = insertedId;
168
154
  return { id: savedId };
169
155
  }
156
+ async deleteByRoleName(params) {
157
+ const { roleName } = params;
158
+ return this.roleModel.deleteOne({
159
+ roleName: { $eq: roleName }
160
+ })
161
+ .exec();
162
+ }
170
163
  }
171
164
  exports.RoleRepo = RoleRepo;
@@ -18,7 +18,7 @@ export declare function validateStartParams(params: IStartParams): (repos: {
18
18
  assetTransaction: AssetTransactionRepo;
19
19
  }) => Promise<{
20
20
  reserveTransaction: import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction | undefined;
21
- reservations: (Pick<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id" | "typeOf" | "issuedThrough" | "reservationNumber"> & {
21
+ reservations: (Pick<import("@chevre/factory/lib/chevre/reservation/event").IReservation, "id" | "typeOf" | "reservationNumber"> & {
22
22
  reservationFor: Pick<factory.reservation.eventReservation.IReservationForMinimized, "id" | "typeOf">;
23
23
  })[] | undefined;
24
24
  }>;
@@ -43,7 +43,7 @@ function validateStartParams(params) {
43
43
  const reservation = await repos.reservation.findReservationById({
44
44
  id: params.object.reservation.id,
45
45
  inclusion: [
46
- 'issuedThrough', 'typeOf', 'reservationNumber', 'reservationFor.id', 'reservationFor.typeOf', 'provider', 'reservationStatus'
46
+ 'typeOf', 'reservationNumber', 'reservationFor.id', 'reservationFor.typeOf', 'provider', 'reservationStatus'
47
47
  ]
48
48
  });
49
49
  // 販売者検証(2023-08-01~)
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  "postversion": "git push origin --tags",
92
92
  "prepublishOnly": "npm run clean && npm run build"
93
93
  },
94
- "version": "24.1.0-alpha.11"
94
+ "version": "24.1.0-alpha.12"
95
95
  }