@nx-ddd/notion 19.0.0-preview.16 → 19.0.0-preview.18

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.
Files changed (44) hide show
  1. package/fesm2022/nx-ddd-notion.mjs +498 -0
  2. package/fesm2022/nx-ddd-notion.mjs.map +1 -0
  3. package/package.json +18 -12
  4. package/repository/repository.d.ts +4 -2
  5. package/README.md +0 -11
  6. package/_testing/entity.d.ts +0 -20
  7. package/_testing/entity.js +0 -44
  8. package/_testing/entity.js.map +0 -1
  9. package/_testing/index.d.ts +0 -1
  10. package/_testing/index.js +0 -5
  11. package/_testing/index.js.map +0 -1
  12. package/converter/converter.js +0 -37
  13. package/converter/converter.js.map +0 -1
  14. package/converter/index.js +0 -5
  15. package/converter/index.js.map +0 -1
  16. package/decorators/decorators.js +0 -58
  17. package/decorators/decorators.js.map +0 -1
  18. package/decorators/index.js +0 -5
  19. package/decorators/index.js.map +0 -1
  20. package/index.js +0 -10
  21. package/index.js.map +0 -1
  22. package/notion/index.d.ts +0 -1
  23. package/notion/index.js +0 -5
  24. package/notion/index.js.map +0 -1
  25. package/notion/notion.service.d.ts +0 -8
  26. package/notion/notion.service.impl.d.ts +0 -30
  27. package/notion/notion.service.impl.js +0 -142
  28. package/notion/notion.service.impl.js.map +0 -1
  29. package/notion/notion.service.js +0 -12
  30. package/notion/notion.service.js.map +0 -1
  31. package/query/index.js +0 -5
  32. package/query/index.js.map +0 -1
  33. package/query/query.js +0 -122
  34. package/query/query.js.map +0 -1
  35. package/query-builder/index.js +0 -5
  36. package/query-builder/index.js.map +0 -1
  37. package/query-builder/query-builder.js +0 -30
  38. package/query-builder/query-builder.js.map +0 -1
  39. package/repository/index.js +0 -5
  40. package/repository/index.js.map +0 -1
  41. package/repository/repository.js +0 -112
  42. package/repository/repository.js.map +0 -1
  43. package/utils.js +0 -184
  44. package/utils.js.map +0 -1
package/README.md DELETED
@@ -1,11 +0,0 @@
1
- # notion
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Running unit tests
6
-
7
- Run `nx test notion` to execute the unit tests via [Jest](https://jestjs.io).
8
-
9
- ## Running lint
10
-
11
- Run `nx lint notion` to execute the lint via [ESLint](https://eslint.org/).
@@ -1,20 +0,0 @@
1
- import { NotionConverter } from '../converter';
2
- export declare class Entity {
3
- title: string;
4
- status: string;
5
- firstSelectionIds: string[];
6
- discordFirstSelectionMessage: string;
7
- discordSecondSelectionMessage: string;
8
- discordChannelId: string;
9
- static from(obj: Partial<Entity>): Entity & {
10
- title?: string;
11
- status?: string;
12
- firstSelectionIds?: string[];
13
- discordFirstSelectionMessage?: string;
14
- discordSecondSelectionMessage?: string;
15
- discordChannelId?: string;
16
- };
17
- }
18
- export declare class EntityConverter extends NotionConverter<Entity> {
19
- protected Entity: typeof Entity;
20
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EntityConverter = exports.Entity = void 0;
4
- const tslib_1 = require("tslib");
5
- const converter_1 = require("../converter");
6
- const decorators_1 = require("../decorators");
7
- class Entity {
8
- static from(obj) {
9
- return Object.assign(new Entity(), Object.assign({}, obj));
10
- }
11
- }
12
- exports.Entity = Entity;
13
- tslib_1.__decorate([
14
- (0, decorators_1.Title)('タイトル'),
15
- tslib_1.__metadata("design:type", String)
16
- ], Entity.prototype, "title", void 0);
17
- tslib_1.__decorate([
18
- (0, decorators_1.Status)('ステータス'),
19
- tslib_1.__metadata("design:type", String)
20
- ], Entity.prototype, "status", void 0);
21
- tslib_1.__decorate([
22
- (0, decorators_1.Relation)('一次選考'),
23
- tslib_1.__metadata("design:type", Array)
24
- ], Entity.prototype, "firstSelectionIds", void 0);
25
- tslib_1.__decorate([
26
- (0, decorators_1.Formula)('一次選考開始文(Discord)'),
27
- tslib_1.__metadata("design:type", String)
28
- ], Entity.prototype, "discordFirstSelectionMessage", void 0);
29
- tslib_1.__decorate([
30
- (0, decorators_1.Formula)('二次選考開始文(Discord)'),
31
- tslib_1.__metadata("design:type", String)
32
- ], Entity.prototype, "discordSecondSelectionMessage", void 0);
33
- tslib_1.__decorate([
34
- (0, decorators_1.RichText)('discordChannelId'),
35
- tslib_1.__metadata("design:type", String)
36
- ], Entity.prototype, "discordChannelId", void 0);
37
- class EntityConverter extends converter_1.NotionConverter {
38
- constructor() {
39
- super(...arguments);
40
- this.Entity = Entity;
41
- }
42
- }
43
- exports.EntityConverter = EntityConverter;
44
- //# sourceMappingURL=entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/_testing/entity.ts"],"names":[],"mappings":";;;;AAAA,4CAA+C;AAC/C,8CAA2E;AAE3E,MAAa,MAAM;IAmBjB,MAAM,CAAC,IAAI,CAAC,GAAoB;QAC9B,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,EAAE,oBAAM,GAAG,EAAE,CAAC;IAC/C,CAAC;CACF;AAtBD,wBAsBC;AApBC;IADC,IAAA,kBAAK,EAAC,MAAM,CAAC;;qCACA;AAGd;IADC,IAAA,mBAAM,EAAC,OAAO,CAAC;;sCACD;AAGf;IADC,IAAA,qBAAQ,EAAC,MAAM,CAAC;;iDACW;AAG5B;IADC,IAAA,oBAAO,EAAC,kBAAkB,CAAC;;4DACS;AAGrC;IADC,IAAA,oBAAO,EAAC,kBAAkB,CAAC;;6DACU;AAGtC;IADC,IAAA,qBAAQ,EAAC,kBAAkB,CAAC;;gDACJ;AAO3B,MAAa,eAAgB,SAAQ,2BAAuB;IAA5D;;QACY,WAAM,GAAG,MAAM,CAAC;IAC5B,CAAC;CAAA;AAFD,0CAEC"}
@@ -1 +0,0 @@
1
- export * from './entity';
package/_testing/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./entity"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/_testing/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotionConverter = void 0;
4
- exports.createConverter = createConverter;
5
- const utils_1 = require("../utils");
6
- const decorators_1 = require("../decorators");
7
- const lodash_es_1 = require("lodash-es");
8
- class NotionConverter {
9
- fromNotion(page) {
10
- var _a;
11
- const annotations = (_a = this.Entity[decorators_1.NOTION_ANNOTATIONS]) !== null && _a !== void 0 ? _a : [];
12
- const obj = annotations.reduce((obj, annotation) => {
13
- const value = page['properties'][annotation.fieldName]
14
- ? utils_1.NotionUtils.fromNotionValue(page['properties'][annotation.fieldName], annotation)
15
- : undefined;
16
- return Object.assign(Object.assign({}, obj), { [annotation.propName]: value });
17
- }, { id: page.id });
18
- return this.Entity.from(obj);
19
- }
20
- toNotion(entity) {
21
- var _a;
22
- const annotations = (_a = this.Entity[decorators_1.NOTION_ANNOTATIONS]) !== null && _a !== void 0 ? _a : [];
23
- const data = annotations.reduce((obj, annotation) => (Object.assign(Object.assign({}, obj), { [annotation.fieldName]: utils_1.NotionUtils.toNotionValue(entity[annotation.propName], annotation) })), {});
24
- return (0, lodash_es_1.omitBy)(data, (value) => typeof value === 'undefined');
25
- }
26
- }
27
- exports.NotionConverter = NotionConverter;
28
- function createConverter(Entity) {
29
- class Converter extends NotionConverter {
30
- constructor() {
31
- super(...arguments);
32
- this.Entity = Entity;
33
- }
34
- }
35
- return new Converter();
36
- }
37
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/converter/converter.ts"],"names":[],"mappings":";;;AA4BA,0CAMC;AAjCD,oCAAuC;AACvC,8CAAqE;AACrE,yCAAmC;AAEnC,MAAsB,e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B;QAA1C;;YACY,WAAM,GAAG,MAAM,CAAC;QAC5B,CAAC;KAAA;IAED,OAAO,IAAI,SAAS,EAAE,CAAC;AACzB,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./converter"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/converter/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B"}
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Notion = exports.UniqueID = exports.Email = exports.PhoneNumber = exports.Select = exports.Date = exports.LastEditedTime = exports.CreatedTime = exports.Number = exports.Timestamp = exports.Rollup = exports.Formula = exports.Status = exports.Relation = exports.RichText = exports.Url = exports.Title = exports.NOTION_ANNOTATIONS = void 0;
4
- exports.NOTION_ANNOTATIONS = 'notion_annotations';
5
- function createDecorator(type, defaultOptions) {
6
- return (name, options) => {
7
- return (target, propName) => {
8
- var _a;
9
- var _b;
10
- const fieldName = name || propName;
11
- const ANNOTATION = { type, fieldName, propName, options: Object.assign(Object.assign({}, defaultOptions), options) };
12
- (_a = (_b = target.constructor)[exports.NOTION_ANNOTATIONS]) !== null && _a !== void 0 ? _a : (_b[exports.NOTION_ANNOTATIONS] = []);
13
- target.constructor[exports.NOTION_ANNOTATIONS].push(ANNOTATION);
14
- };
15
- };
16
- }
17
- exports.Title = createDecorator('title');
18
- exports.Url = createDecorator('url');
19
- exports.RichText = createDecorator('rich_text');
20
- exports.Relation = createDecorator('relation', { multi: false });
21
- exports.Status = createDecorator('status');
22
- exports.Formula = createDecorator('formula');
23
- exports.Rollup = createDecorator('rollup', { multi: false });
24
- exports.Timestamp = createDecorator('timestamp');
25
- exports.Number = createDecorator('number');
26
- exports.CreatedTime = createDecorator('created_time');
27
- exports.LastEditedTime = createDecorator('last_edited_time');
28
- exports.Date = createDecorator('date');
29
- exports.Select = createDecorator('select');
30
- exports.PhoneNumber = createDecorator('phone_number');
31
- exports.Email = createDecorator('email');
32
- exports.UniqueID = createDecorator('unique_id');
33
- // Not implemented below props!
34
- // export const Checkbox = createDecorator('checkbox');
35
- // export const CreatedBy = createDecorator('created_by');
36
- // export const Files = createDecorator('files');
37
- // export const LastEditedBy = createDecorator('last_edited_by');
38
- // export const MultiSelect = createDecorator('multi_select');
39
- // export const People = createDecorator('people');
40
- exports.Notion = {
41
- Title: exports.Title,
42
- Url: exports.Url,
43
- RichText: exports.RichText,
44
- Relation: exports.Relation,
45
- Status: exports.Status,
46
- Formula: exports.Formula,
47
- Rollup: exports.Rollup,
48
- Timestamp: exports.Timestamp,
49
- Number: exports.Number,
50
- CreatedTime: exports.CreatedTime,
51
- LastEditedTime: exports.LastEditedTime,
52
- Date: exports.Date,
53
- Select: exports.Select,
54
- PhoneNumber: exports.PhoneNumber,
55
- Email: exports.Email,
56
- UniqueID: exports.UniqueID,
57
- };
58
- //# sourceMappingURL=decorators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/decorators/decorators.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAavD,SAAS,eAAe,CAA+B,IAAqB,EAAE,cAAkB;IAC9F,OAAO,CAAC,IAAa,EAAE,OAAoB,EAAE,EAAE;QAC7C,OAAO,CAAC,MAAW,EAAE,QAAgB,EAAE,EAAE;;;YACvC,MAAM,SAAS,GAAG,IAAI,IAAI,QAAQ,CAAC;YACnC,MAAM,UAAU,GAAwB,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,kCAAM,cAAc,GAAK,OAAO,CAAC,EAAC,CAAC;YAC9G,YAAA,MAAM,CAAC,WAAW,EAAC,0BAAkB,wCAAlB,0BAAkB,IAA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IACpB,KAAK,EAAL,aAAK;IACL,GAAG,EAAH,WAAG;IACH,QAAQ,EAAR,gBAAQ;IACR,QAAQ,EAAR,gBAAQ;IACR,MAAM,EAAN,cAAM;IACN,OAAO,EAAP,eAAO;IACP,MAAM,EAAN,cAAM;IACN,SAAS,EAAT,iBAAS;IACT,MAAM,EAAN,cAAM;IACN,WAAW,EAAX,mBAAW;IACX,cAAc,EAAd,sBAAc;IACd,IAAI,EAAJ,YAAI;IACJ,MAAM,EAAN,cAAM;IACN,WAAW,EAAX,mBAAW;IACX,KAAK,EAAL,aAAK;IACL,QAAQ,EAAR,gBAAQ;CACT,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./decorators"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/decorators/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
package/index.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./converter"), exports);
5
- tslib_1.__exportStar(require("./decorators"), exports);
6
- tslib_1.__exportStar(require("./query"), exports);
7
- tslib_1.__exportStar(require("./query-builder"), exports);
8
- tslib_1.__exportStar(require("./repository"), exports);
9
- tslib_1.__exportStar(require("./utils"), exports);
10
- //# sourceMappingURL=index.js.map
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/@nx-ddd/notion/src/lib/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,uDAA6B;AAC7B,kDAAwB;AACxB,0DAAgC;AAChC,uDAA6B;AAC7B,kDAAwB"}
package/notion/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './notion.service';
package/notion/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./notion.service"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/notion/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
@@ -1,8 +0,0 @@
1
- import { InjectionToken } from "@angular/core";
2
- import type { NotionService } from "./notion.service.impl";
3
- export interface NotionConfig {
4
- token: string;
5
- }
6
- export declare const NOTION_SERVICE: InjectionToken<NotionService>;
7
- export declare const NOTION_CONFIG: InjectionToken<NotionConfig>;
8
- export declare function injectNotion(): NotionService;
@@ -1,30 +0,0 @@
1
- import { InjectionToken, Provider } from '@angular/core';
2
- import { LocalStorage } from "node-localstorage";
3
- export interface NotionConfig {
4
- token: string;
5
- }
6
- export declare const NOTION_CONFIG: InjectionToken<NotionConfig>;
7
- export declare function provideNotionService(useFactory: () => NotionConfig): Provider[];
8
- export declare class CacheAdapter {
9
- protected localStorage: LocalStorage;
10
- get<T>(keyOrObj: string | object): Promise<T | null>;
11
- set(keyOrObj: string | object, value: any): Promise<void>;
12
- remove(keyOrObj: string | object): Promise<void>;
13
- call<P extends (string | object), T>(props: P, callback: (props: P) => Promise<T>): Promise<T>;
14
- protected makeKey(keyOrObj: string | object): string;
15
- protected makeJson(valueOrObj: any): string;
16
- protected parseJson(value: string): any;
17
- }
18
- export declare class NotionService {
19
- private config;
20
- private notionClient;
21
- private cache;
22
- retrievePage(pageId: string): Promise<import("@notionhq/client/build/src/api-endpoints").GetPageResponse>;
23
- updatePage(pageId: string, properties: any): Promise<import("@notionhq/client/build/src/api-endpoints").UpdatePageResponse>;
24
- deletePage(pageId: string): Promise<void>;
25
- retrieveDatabase(databaseId: string): Promise<import("@notionhq/client/build/src/api-endpoints").GetDatabaseResponse>;
26
- updateDatabase(databaseId: string, properties: any): Promise<import("@notionhq/client/build/src/api-endpoints").UpdateDatabaseResponse>;
27
- retrieveBlock(blockId: string): Promise<import("@notionhq/client/build/src/api-endpoints").GetBlockResponse>;
28
- search(params: Parameters<typeof this.notionClient.search>[0]): Promise<import("@notionhq/client/build/src/api-endpoints").SearchResponse>;
29
- queryDatabase(databaseId: string, filter?: any): Promise<(import("@notionhq/client/build/src/api-endpoints").PageObjectResponse | import("@notionhq/client/build/src/api-endpoints").PartialPageObjectResponse | import("@notionhq/client/build/src/api-endpoints").PartialDatabaseObjectResponse | import("@notionhq/client/build/src/api-endpoints").DatabaseObjectResponse)[]>;
30
- }
@@ -1,142 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotionService = exports.CacheAdapter = exports.NOTION_CONFIG = void 0;
4
- exports.provideNotionService = provideNotionService;
5
- const tslib_1 = require("tslib");
6
- const core_1 = require("@angular/core");
7
- const client_1 = require("@notionhq/client");
8
- const notion_service_1 = require("./notion.service");
9
- const node_localstorage_1 = require("node-localstorage");
10
- const CryptoJS = tslib_1.__importStar(require("crypto-js"));
11
- exports.NOTION_CONFIG = new core_1.InjectionToken('NOTION_CONFIG');
12
- function provideNotionService(useFactory) {
13
- return [
14
- { provide: exports.NOTION_CONFIG, useFactory },
15
- { provide: notion_service_1.NOTION_SERVICE, useClass: NotionService },
16
- ];
17
- }
18
- let CacheAdapter = class CacheAdapter {
19
- constructor() {
20
- this.localStorage = global.localStorage || new node_localstorage_1.LocalStorage('node_modules/.cache/@nx-ddd/notion', 5 * 1024 * 1024 * 1024);
21
- }
22
- get(keyOrObj) {
23
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- const key = this.makeKey(keyOrObj);
25
- return this.parseJson(this.localStorage.getItem(key));
26
- });
27
- }
28
- set(keyOrObj, value) {
29
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
30
- const key = this.makeKey(keyOrObj);
31
- this.localStorage.setItem(key, this.makeJson(value));
32
- });
33
- }
34
- remove(keyOrObj) {
35
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
36
- const key = this.makeKey(keyOrObj);
37
- this.localStorage.removeItem(key);
38
- });
39
- }
40
- call(props, callback) {
41
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
42
- const key = this.makeKey(props);
43
- let value = yield this.get(key);
44
- if (value)
45
- return value;
46
- value = yield callback(props);
47
- yield this.set(key, value);
48
- return value;
49
- });
50
- }
51
- makeKey(keyOrObj) {
52
- const value = typeof keyOrObj === 'string' ? keyOrObj : JSON.stringify(keyOrObj);
53
- return CryptoJS.SHA256(value).toString();
54
- }
55
- makeJson(valueOrObj) {
56
- return JSON.stringify(valueOrObj);
57
- }
58
- parseJson(value) {
59
- return JSON.parse(value);
60
- }
61
- };
62
- exports.CacheAdapter = CacheAdapter;
63
- exports.CacheAdapter = CacheAdapter = tslib_1.__decorate([
64
- (0, core_1.Injectable)({ providedIn: 'root' })
65
- ], CacheAdapter);
66
- let NotionService = class NotionService {
67
- constructor() {
68
- this.config = (0, core_1.inject)(exports.NOTION_CONFIG);
69
- this.notionClient = new client_1.Client({ auth: this.config.token });
70
- this.cache = (0, core_1.inject)(CacheAdapter);
71
- }
72
- retrievePage(pageId) {
73
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
74
- return this.cache.call(pageId, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
75
- return this.notionClient.pages.retrieve({ page_id: pageId });
76
- }));
77
- });
78
- }
79
- updatePage(pageId, properties) {
80
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
81
- const response = yield this.notionClient.pages.update({
82
- page_id: pageId,
83
- properties,
84
- });
85
- return response;
86
- });
87
- }
88
- deletePage(pageId) {
89
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
90
- yield this.notionClient.pages.update({
91
- page_id: pageId,
92
- archived: true,
93
- });
94
- });
95
- }
96
- retrieveDatabase(databaseId) {
97
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
98
- // return this.cache.call(databaseId, async () => {
99
- return this.notionClient.databases.retrieve({ database_id: databaseId });
100
- // });
101
- });
102
- }
103
- updateDatabase(databaseId, properties) {
104
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
105
- console.debug('properties:', properties);
106
- const response = yield this.notionClient.databases.update({
107
- database_id: databaseId,
108
- properties,
109
- });
110
- yield this.cache.remove(databaseId);
111
- return response;
112
- });
113
- }
114
- retrieveBlock(blockId) {
115
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
116
- return this.cache.call(blockId, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
117
- return this.notionClient.blocks.retrieve({ block_id: blockId });
118
- }));
119
- });
120
- }
121
- search(params) {
122
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
123
- return this.cache.call(params, () => {
124
- return this.notionClient.search(params);
125
- });
126
- });
127
- }
128
- queryDatabase(databaseId, filter) {
129
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
130
- const response = yield this.notionClient.databases.query({
131
- database_id: databaseId,
132
- filter,
133
- });
134
- return response.results;
135
- });
136
- }
137
- };
138
- exports.NotionService = NotionService;
139
- exports.NotionService = NotionService = tslib_1.__decorate([
140
- (0, core_1.Injectable)({ providedIn: 'root' })
141
- ], NotionService);
142
- //# sourceMappingURL=notion.service.impl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notion.service.impl.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.impl.ts"],"names":[],"mappings":";;;AAYA,oDAKC;;AAjBD,wCAA6E;AAC7E,6CAA0C;AAC1C,qDAAkD;AAClD,yDAAiD;AACjD,4DAAsC;AAMzB,QAAA,aAAa,GAAG,IAAI,qBAAc,CAAe,eAAe,CAAC,CAAC;AAE/E,SAAgB,oBAAoB,CAAC,UAA8B;IACjE,OAAO;QACL,EAAE,OAAO,EAAE,qBAAa,EAAE,UAAU,EAAE;QACtC,EAAE,OAAO,EAAE,+BAAc,EAAE,QAAQ,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E,MAAY;;YAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC;gBACvD,WAAW,EAAE,UAAU;gBACvB,MAAM;aACP,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,OAAO,CAAC;QAC1B,CAAC;KAAA;CACF,CAAA;AA7DY,sCAAa;wBAAb,aAAa;IADzB,IAAA,iBAAU,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;GACtB,aAAa,CA6DzB"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NOTION_CONFIG = exports.NOTION_SERVICE = void 0;
4
- exports.injectNotion = injectNotion;
5
- const core_1 = require("@angular/core");
6
- exports.NOTION_SERVICE = new core_1.InjectionToken('NOTION_SERVICE');
7
- exports.NOTION_CONFIG = new core_1.InjectionToken('NOTION_CONFIG');
8
- function injectNotion() {
9
- var _a;
10
- return (_a = (0, core_1.inject)(exports.NOTION_SERVICE, { optional: true })) !== null && _a !== void 0 ? _a : null;
11
- }
12
- //# sourceMappingURL=notion.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notion.service.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.ts"],"names":[],"mappings":";;;AAUA,oCAEC;AAZD,wCAAuD;AAO1C,QAAA,cAAc,GAAG,IAAI,qBAAc,CAAgB,gBAAgB,CAAC,CAAC;AACrE,QAAA,aAAa,GAAG,IAAI,qBAAc,CAAe,eAAe,CAAC,CAAC;AAE/E,SAAgB,YAAY;;IAC1B,OAAO,MAAA,IAAA,aAAM,EAAC,sBAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,mCAAI,IAAI,CAAC;AAC5D,CAAC"}
package/query/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./query"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/query/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB"}
package/query/query.js DELETED
@@ -1,122 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Query = exports.NotionOr = exports.NotionAnd = exports.NotionSort = exports.NotionFilter = exports.NotionBaseQuery = exports.N = void 0;
4
- const decorators_1 = require("../decorators");
5
- class N {
6
- static RollupPropQuery(property, evaluation, value) {
7
- return { property, rollup: { every: { rich_text: { equals: value } } } };
8
- }
9
- static FormulaQuery(property, evaluation, value) {
10
- return { property, formula: {} };
11
- }
12
- static LastEditedTime(property, evaluation, value) {
13
- const query = evaluation === '>' ? 'after'
14
- : evaluation === '<' ? 'before'
15
- : evaluation === '==' ? 'equals'
16
- : evaluation === '<=' ? 'on_or_before'
17
- : evaluation === '>=' ? 'on_or_after'
18
- : evaluation === '!=' ? '' : '';
19
- return { timestamp: 'last_edited_time', last_edited_time: { [query]: value } };
20
- }
21
- static Timestamp(property, evaluation, value) {
22
- const query = evaluation === '>' ? 'after'
23
- : evaluation === '<' ? 'before'
24
- : evaluation === '==' ? 'equals'
25
- : evaluation === '<=' ? 'on_or_before'
26
- : evaluation === '>=' ? 'on_or_after'
27
- : evaluation === '!=' ? '' : '';
28
- return { property, timestamp: { [query]: value } };
29
- }
30
- static Status(property, evaluation, value) {
31
- const query = evaluation === '==' ? 'equals' : '';
32
- // TODO(nontangent): 'ステータス'を修正
33
- return { property: 'ステータス', status: { [query]: value } };
34
- }
35
- static Relation(property, evaluation, value) {
36
- const query = evaluation === 'in' ? 'contains' : '';
37
- return { property, relation: { [query]: value } };
38
- }
39
- }
40
- exports.N = N;
41
- class NotionBaseQuery {
42
- }
43
- exports.NotionBaseQuery = NotionBaseQuery;
44
- class NotionFilter extends NotionBaseQuery {
45
- constructor(propertyType, propertyName, evaluation, value) {
46
- super();
47
- this.propertyType = propertyType;
48
- this.propertyName = propertyName;
49
- this.evaluation = evaluation;
50
- this.value = value;
51
- this.type = 'filter';
52
- }
53
- build() {
54
- switch (this.propertyName) {
55
- case 'last_edited_time': return N.LastEditedTime(this.propertyName, this.evaluation, this.value);
56
- }
57
- switch (this.propertyType) {
58
- case 'rollup': return N.RollupPropQuery(this.propertyName, this.evaluation, this.value);
59
- case 'formula': return N.FormulaQuery(this.propertyName, this.evaluation, this.value);
60
- case 'status': return N.Status(this.propertyName, this.evaluation, this.value);
61
- case 'relation': return N.Relation(this.propertyName, this.evaluation, this.value);
62
- }
63
- }
64
- }
65
- exports.NotionFilter = NotionFilter;
66
- class NotionSort extends NotionBaseQuery {
67
- constructor(property, direction = 'asc') {
68
- super();
69
- this.property = property;
70
- this.direction = direction;
71
- this.type = 'sort';
72
- }
73
- build() {
74
- return {
75
- property: this.property,
76
- direction: this.direction === 'asc' ? 'ascending' : 'descending',
77
- };
78
- }
79
- }
80
- exports.NotionSort = NotionSort;
81
- class NotionAnd extends NotionBaseQuery {
82
- constructor(...filters) {
83
- super();
84
- this.type = 'and';
85
- this.arr = filters;
86
- }
87
- build() {
88
- return { and: this.arr.map(filter => filter.build()) };
89
- }
90
- }
91
- exports.NotionAnd = NotionAnd;
92
- class NotionOr extends NotionBaseQuery {
93
- constructor(...filters) {
94
- super();
95
- this.type = 'or';
96
- this.arr = filters;
97
- }
98
- build() {
99
- return { or: this.arr.map(filter => filter.build()) };
100
- }
101
- }
102
- exports.NotionOr = NotionOr;
103
- const Query = (Entity) => {
104
- const Filter = (_propName, evaluation, value) => {
105
- var _a;
106
- const annotation = Entity[decorators_1.NOTION_ANNOTATIONS].find(({ propName }) => propName === _propName);
107
- // if(!annotation) {
108
- // throw new Error(`NotionFilter: ${Entity} does not have ${_propName}.`);
109
- // }
110
- return new NotionFilter(annotation === null || annotation === void 0 ? void 0 : annotation.type, (_a = annotation === null || annotation === void 0 ? void 0 : annotation.fieldName) !== null && _a !== void 0 ? _a : _propName, evaluation, value);
111
- };
112
- const OrderBy = (_propName, direction) => {
113
- var _a;
114
- const annotation = Entity[decorators_1.NOTION_ANNOTATIONS].find(({ propName }) => propName === _propName);
115
- return new NotionSort((_a = annotation === null || annotation === void 0 ? void 0 : annotation.fieldName) !== null && _a !== void 0 ? _a : _propName, direction);
116
- };
117
- const And = (...args) => new NotionAnd(...args);
118
- const Or = (...args) => new NotionOr(...args);
119
- return { Filter, OrderBy, And, Or };
120
- };
121
- exports.Query = Query;
122
- //# sourceMappingURL=query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/query/query.ts"],"names":[],"mappings":";;;AAAA,8CAAqE;AAKrE,MAAa,CAAC;IACZ,MAAM,CAAC,eAAe,CAAC,QAAgB,EAAE,UAAsB,EAAE,KAAsB;QACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC;IAC3E,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,QAAgB,EAAE,UAAsB,EAAE,KAAsB;QAClF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,QAAgB,EAAE,UAAsB,EAAE,KAAsB;QACpF,MAAM,KAAK,GAAG,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO;YACxC,CAAC,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ;gBAC/B,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ;oBAChC,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,cAAc;wBACtC,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa;4BACrC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,CAAC,SAAiB,EAAE,UAAsB,EAAE,KAAsB,EAAgB,EAAE;;QACjG,MAAM,UAAU,GAAqB,MAAM,CAAC,+BAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAE7G,oBAAoB;QACpB,4EAA4E;QAC5E,IAAI;QAEJ,OAAO,IAAI,YAAY,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,mCAAI,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACnG,CAAC,CAAC;IACF,MAAM,OAAO,GAAG,CAAC,SAAiB,EAAE,SAAyB,EAAc,EAAE;;QAC3E,MAAM,UAAU,GAAqB,MAAM,CAAC,+BAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;QAC7G,OAAO,IAAI,UAAU,CAAC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,mCAAI,SAAS,EAAE,SAAS,CAAC,CAAC;IACvE,CAAC,CAAC;IAEF,MAAM,GAAG,GAAG,CAAC,GAAG,IAAoB,EAAa,EAAE,CAAC,IAAI,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3E,MAAM,EAAE,GAAG,CAAC,GAAG,IAAoB,EAAY,EAAE,CAAC,IAAI,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;IAExE,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAC,CAAC;AACpC,CAAC,CAAA;AAnBY,QAAA,KAAK,SAmBjB"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./query-builder"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/notion/src/lib/query-builder/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC"}