@chevre/domain 23.0.0-alpha.7 → 23.0.0-alpha.8

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.
@@ -17,7 +17,6 @@ async function main() {
17
17
  > = {
18
18
  about: {
19
19
  id: '656038908b1cd5ce629f5992',
20
- identifier: 'xxx',
21
20
  typeOf: chevre.factory.product.ProductType.EventService
22
21
  },
23
22
  creator: { id: 'xxx', typeOf: chevre.factory.personType.Person },
@@ -1,7 +1,6 @@
1
1
  import type { BulkWriteResult, DeleteResult } from 'mongodb';
2
2
  import type { Connection, FilterQuery } from 'mongoose';
3
3
  import * as factory from '../factory';
4
- import { IDocType } from './mongoose/schemas/note';
5
4
  type INoteDigitalDocument = factory.creativeWork.noteDigitalDocument.INoteDigitalDocument;
6
5
  type IKeyOfProjection = keyof INoteDigitalDocument;
7
6
  /**
@@ -48,16 +47,5 @@ export declare class NoteRepo {
48
47
  filter: any;
49
48
  $unset: any;
50
49
  }): Promise<import("mongoose").UpdateWriteOpResult>;
51
- getCursor(conditions: FilterQuery<factory.creativeWork.noteDigitalDocument.INoteDigitalDocument>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, IDocType> & Pick<import("@chevre/factory/lib/creativeWork/noteDigitalDocument").INoteDigitalDocument, "identifier" | "project" | "typeOf" | "text" | "version" | "dateCreated" | "dateModified" | "creator" | "editor" | "hasDigitalDocumentPermission"> & {
52
- about: factory.creativeWork.noteDigitalDocument.IAbout;
53
- provider: factory.creativeWork.noteDigitalDocument.IProviderAsProject | factory.creativeWork.noteDigitalDocument.IProviderAsSeller;
54
- } & {
55
- _id: import("mongoose").Types.ObjectId;
56
- }, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, IDocType> & Pick<import("@chevre/factory/lib/creativeWork/noteDigitalDocument").INoteDigitalDocument, "identifier" | "project" | "typeOf" | "text" | "version" | "dateCreated" | "dateModified" | "creator" | "editor" | "hasDigitalDocumentPermission"> & {
57
- about: factory.creativeWork.noteDigitalDocument.IAbout;
58
- provider: factory.creativeWork.noteDigitalDocument.IProviderAsProject | factory.creativeWork.noteDigitalDocument.IProviderAsSeller;
59
- } & {
60
- _id: import("mongoose").Types.ObjectId;
61
- }>>;
62
50
  }
63
51
  export {};
@@ -35,7 +35,7 @@ class NoteRepo {
35
35
  this.noteModel = connection.model(note_1.modelName, (0, note_1.createSchema)());
36
36
  }
37
37
  static CREATE_MONGO_CONDITIONS(params) {
38
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
38
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
39
39
  const andConditions = [];
40
40
  const idIn = (_a = params.id) === null || _a === void 0 ? void 0 : _a.$in;
41
41
  if (Array.isArray(idIn)) {
@@ -57,31 +57,27 @@ class NoteRepo {
57
57
  if (Array.isArray(aboutIdIn)) {
58
58
  andConditions.push({ 'about.id': { $in: aboutIdIn } });
59
59
  }
60
- const aboutIdentifierIn = (_l = (_k = params.about) === null || _k === void 0 ? void 0 : _k.identifier) === null || _l === void 0 ? void 0 : _l.$in;
61
- if (Array.isArray(aboutIdentifierIn)) {
62
- andConditions.push({ 'about.identifier': { $in: aboutIdentifierIn } });
63
- }
64
- const aboutOrderNumberEq = (_o = (_m = params.about) === null || _m === void 0 ? void 0 : _m.orderNumber) === null || _o === void 0 ? void 0 : _o.$eq;
60
+ const aboutOrderNumberEq = (_l = (_k = params.about) === null || _k === void 0 ? void 0 : _k.orderNumber) === null || _l === void 0 ? void 0 : _l.$eq;
65
61
  if (typeof aboutOrderNumberEq === 'string') {
66
62
  andConditions.push({ 'about.orderNumber': { $exists: true, $eq: aboutOrderNumberEq } });
67
63
  }
68
- const aboutOrderNumberIn = (_q = (_p = params.about) === null || _p === void 0 ? void 0 : _p.orderNumber) === null || _q === void 0 ? void 0 : _q.$in;
64
+ const aboutOrderNumberIn = (_o = (_m = params.about) === null || _m === void 0 ? void 0 : _m.orderNumber) === null || _o === void 0 ? void 0 : _o.$in;
69
65
  if (Array.isArray(aboutOrderNumberIn)) {
70
66
  andConditions.push({ 'about.orderNumber': { $exists: true, $in: aboutOrderNumberIn } });
71
67
  }
72
- const aboutTypeOfEq = (_s = (_r = params.about) === null || _r === void 0 ? void 0 : _r.typeOf) === null || _s === void 0 ? void 0 : _s.$eq;
68
+ const aboutTypeOfEq = (_q = (_p = params.about) === null || _p === void 0 ? void 0 : _p.typeOf) === null || _q === void 0 ? void 0 : _q.$eq;
73
69
  if (typeof aboutTypeOfEq === 'string') {
74
70
  andConditions.push({ 'about.typeOf': { $eq: aboutTypeOfEq } });
75
71
  }
76
- const identifierEq = (_t = params.identifier) === null || _t === void 0 ? void 0 : _t.$eq;
72
+ const identifierEq = (_r = params.identifier) === null || _r === void 0 ? void 0 : _r.$eq;
77
73
  if (typeof identifierEq === 'string') {
78
74
  andConditions.push({ identifier: { $eq: identifierEq } });
79
75
  }
80
- const identifierIn = (_u = params.identifier) === null || _u === void 0 ? void 0 : _u.$in;
76
+ const identifierIn = (_s = params.identifier) === null || _s === void 0 ? void 0 : _s.$in;
81
77
  if (Array.isArray(identifierIn)) {
82
78
  andConditions.push({ identifier: { $in: identifierIn } });
83
79
  }
84
- const audienceTypeEq = (_x = (_w = (_v = params.hasDigitalDocumentPermission) === null || _v === void 0 ? void 0 : _v.grantee) === null || _w === void 0 ? void 0 : _w.audienceType) === null || _x === void 0 ? void 0 : _x.$eq;
80
+ const audienceTypeEq = (_v = (_u = (_t = params.hasDigitalDocumentPermission) === null || _t === void 0 ? void 0 : _t.grantee) === null || _u === void 0 ? void 0 : _u.audienceType) === null || _v === void 0 ? void 0 : _v.$eq;
85
81
  if (typeof audienceTypeEq === 'string') {
86
82
  andConditions.push({ 'hasDigitalDocumentPermission.grantee.audienceType': { $exists: true, $eq: audienceTypeEq } });
87
83
  }
@@ -132,10 +128,6 @@ class NoteRepo {
132
128
  if (typeof about.id !== 'string' || about.id === '') {
133
129
  throw new factory.errors.ArgumentNull('about.id');
134
130
  }
135
- // about.identifier必須化(2025-10-14~)
136
- if (typeof about.identifier !== 'string' || about.identifier === '') {
137
- throw new factory.errors.ArgumentNull('about.identifier');
138
- }
139
131
  if (typeof identifier !== 'string' || identifier === '') {
140
132
  throw new factory.errors.ArgumentNull('identifier');
141
133
  }
@@ -254,10 +246,5 @@ class NoteRepo {
254
246
  .exec();
255
247
  });
256
248
  }
257
- getCursor(conditions, projection) {
258
- return this.noteModel.find(conditions, projection)
259
- .sort({ dateCreated: factory.sortType.Ascending })
260
- .cursor();
261
- }
262
249
  }
263
250
  exports.NoteRepo = NoteRepo;
@@ -26,5 +26,16 @@ export declare class NoteAboutOrderRepo {
26
26
  id: string;
27
27
  attributes: Pick<INoteAboutOrder, 'text' | 'editor'>;
28
28
  }): Promise<void>;
29
+ getCursor(conditions: FilterQuery<factory.creativeWork.noteDigitalDocument.INoteAboutOrder>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("./mongoose/schemas/note").IDocType> & Pick<import("@chevre/factory/lib/creativeWork/noteDigitalDocument").INoteDigitalDocument, "identifier" | "project" | "typeOf" | "text" | "version" | "dateCreated" | "dateModified" | "creator" | "editor" | "hasDigitalDocumentPermission"> & {
30
+ about: factory.creativeWork.noteDigitalDocument.IAbout;
31
+ provider: factory.creativeWork.noteDigitalDocument.IProviderAsProject | factory.creativeWork.noteDigitalDocument.IProviderAsSeller;
32
+ } & {
33
+ _id: import("mongoose").Types.ObjectId;
34
+ }, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("./mongoose/schemas/note").IDocType> & Pick<import("@chevre/factory/lib/creativeWork/noteDigitalDocument").INoteDigitalDocument, "identifier" | "project" | "typeOf" | "text" | "version" | "dateCreated" | "dateModified" | "creator" | "editor" | "hasDigitalDocumentPermission"> & {
35
+ about: factory.creativeWork.noteDigitalDocument.IAbout;
36
+ provider: factory.creativeWork.noteDigitalDocument.IProviderAsProject | factory.creativeWork.noteDigitalDocument.IProviderAsSeller;
37
+ } & {
38
+ _id: import("mongoose").Types.ObjectId;
39
+ }>>;
29
40
  }
30
41
  export {};
@@ -175,5 +175,10 @@ class NoteAboutOrderRepo {
175
175
  }
176
176
  });
177
177
  }
178
+ getCursor(conditions, projection) {
179
+ return this.noteModel.find(Object.assign(Object.assign({}, conditions), { 'about.typeOf': { $eq: factory.order.OrderType.Order } }), projection)
180
+ .sort({ dateCreated: factory.sortType.Ascending })
181
+ .cursor();
182
+ }
178
183
  }
179
184
  exports.NoteAboutOrderRepo = NoteAboutOrderRepo;
package/package.json CHANGED
@@ -11,8 +11,8 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "5.1.0-alpha.2",
15
- "@cinerino/sdk": "12.5.0-alpha.8",
14
+ "@chevre/factory": "5.1.0-alpha.3",
15
+ "@cinerino/sdk": "12.5.0-alpha.9",
16
16
  "@motionpicture/coa-service": "9.6.0",
17
17
  "@motionpicture/gmo-service": "5.4.0-alpha.1",
18
18
  "@sendgrid/client": "8.1.4",
@@ -115,5 +115,5 @@
115
115
  "postversion": "git push origin --tags",
116
116
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
117
117
  },
118
- "version": "23.0.0-alpha.7"
118
+ "version": "23.0.0-alpha.8"
119
119
  }