@nx-ddd/notion 19.34.0 → 19.36.0

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.
@@ -131,6 +131,7 @@ function fromNotionFormula(notionFormula) {
131
131
  case 'string': return notionFormula.formula.string;
132
132
  case 'number': return notionFormula.formula.number;
133
133
  case 'date': return fromNotionDate(notionFormula.formula);
134
+ default: return null;
134
135
  }
135
136
  }
136
137
  function fromNotionRollup(notionRollup) {
@@ -529,7 +530,7 @@ class NotionRepository extends Repository {
529
530
  }
530
531
  async list({ batchSize = 100, } = {}) {
531
532
  const items = [];
532
- let nextCursor;
533
+ let nextCursor = undefined;
533
534
  let pageCount = 0;
534
535
  console.log(`[NotionRepository] Starting pagination with batch size: ${batchSize}`);
535
536
  // eslint-disable-next-line no-constant-condition
@@ -538,7 +539,7 @@ class NotionRepository extends Repository {
538
539
  const res = await this.query(undefined, undefined, nextCursor, batchSize);
539
540
  console.log(`[NotionRepository] Page ${pageCount}: Retrieved ${res.results.length} items, hasMore: ${res.hasMore}, nextCursor: ${res.nextCursor ? 'present' : 'null'}`);
540
541
  items.push(...res.results);
541
- nextCursor = res.nextCursor;
542
+ nextCursor = res.nextCursor ?? undefined;
542
543
  if (!res.hasMore) {
543
544
  console.log(`[NotionRepository] Pagination complete. Total items: ${items.length} from ${pageCount} pages`);
544
545
  break;
@@ -1 +1 @@
1
- {"version":3,"file":"nx-ddd-notion.mjs","sources":["../../../../../packages/@nx-ddd/notion/src/lib/types.ts","../../../../../packages/@nx-ddd/notion/src/lib/to-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/from-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/utils.ts","../../../../../packages/@nx-ddd/notion/src/lib/decorators/decorators.ts","../../../../../packages/@nx-ddd/notion/src/lib/converter/converter.ts","../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.ts","../../../../../packages/@nx-ddd/notion/src/lib/query/query.ts","../../../../../packages/@nx-ddd/notion/src/lib/query-builder/query-builder.ts","../../../../../packages/@nx-ddd/notion/src/lib/repository/repository.ts","../../../../../packages/@nx-ddd/notion/src/lib/nx-ddd-notion.ts"],"sourcesContent":["/**\n * Notion API type definitions\n */\n\ntype NotionText = {\n type: 'text',\n text: { content: string },\n plain_text: string,\n}\n\ntype NotionArray = {\n type: 'array',\n array: (NotionRichText[] | NotionNumber[]),\n function: 'show_original'\n}\n\nexport type NotionTitle = {type: 'title', title: {text: {content: string}}[]};\nexport type NotionUrl = {id: string, type: 'url', url: string | null};\nexport type NotionRichText = {\n id: string,\n type: 'rich_text',\n rich_text: NotionText[]\n};\nexport type NotionNumber = {id: string, type: 'number', number: number};\nexport type NotionRelation = {id: string, type: 'relation', relation: {id: string}[], has_more: boolean};\nexport type NotionStatus = {id: string, type: 'status', status: {id: string, name: string, color: string}};\nexport type NotionFormula = {\n id: string,\n type: 'formula',\n formula: {\n type: 'string',\n string: string\n } | {\n type: 'number',\n number: number\n } | {\n type: 'date',\n date: {\n start: string,\n end: string,\n time_zone: null,\n }\n }\n};\nexport type NotionRollup = {id: string, type: 'rollup', rollup: NotionArray | NotionNumber};\n\nexport type NotionCreatedTime = {id: string, type: 'created_time', created_time: string};\nexport type NotionLastEditedTime = {id: string, type: 'last_edited_time', last_edited_time: string};\nexport type NotionDate = {id: string, type: 'date', date: any };\nexport type NotionSelect = {id: string, type: 'select', select: {id: string, name: string, color: string}};\n\nexport type NotionPhoneNumber = {id: string, type: 'phone_number', phone_number: string};\nexport type NotionEmail = {id: string, type: 'email', email: string};\nexport type NotionID = {id: string, type: 'unique_id', unique_id: {prefix: string | null, number: number}};\n\nexport type NotionValue = NotionTitle | NotionUrl | NotionRichText | NotionNumber\n | NotionRelation | NotionStatus | NotionFormula | NotionRollup\n | NotionCreatedTime | NotionLastEditedTime | NotionDate | NotionSelect\n | NotionPhoneNumber | NotionEmail | NotionID;\n","import dayjs from \"dayjs\";\nimport { NotionAnnotation } from \"./decorators\";\n\n/**\n * Converts a value to its Notion API representation based on annotation type\n */\nexport function toNotionValue(value: any, annotation: NotionAnnotation) {\n switch(annotation.type) {\n case 'title': return toNotionTitle(value);\n case 'status': return toNotionStatus(value);\n case 'relation':\n if ((annotation.options as any).multi) {\n return toNotionRelationMulti(value);\n } else {\n return toNotionRelation(value);\n }\n case 'formula': return toNotionFormula(value);\n case 'rich_text': return toNotionRichText(value);\n case 'rollup': return toNotionRollup(value);\n case 'url': return toNotionUrl(value);\n case 'date': return toNotionDate(value);\n case 'select': return toNotionSelect(value);\n case 'number': return toNotionNumber(value);\n case 'phone_number': return toNotionPhoneNumber(value);\n case 'email': return toNotionEmail(value);\n }\n}\n\nexport function toNotionTitle(value: string) {\n return value ? {type: 'title', title: [{text: {content: value}}]} : undefined;\n}\n\nexport function toNotionStatus(value: string) {\n return value ? {type: 'status', status: {name: value}} : undefined;\n}\n\nexport function toNotionRelationMulti(ids: string[]) {\n return Array.isArray(ids) ? {type: 'relation', relation: (ids).map(id => ({id}))} : undefined;\n}\n\nexport function toNotionRelation(value: string) {\n return value ? toNotionRelationMulti([value]) : undefined;\n}\n\nexport function toNotionRichText(text?: string) {\n return text ? {type: 'rich_text', rich_text: [{text: {content: text}}]} : undefined;\n}\n\nexport function toNotionFormula(value: string): void {\n return;\n}\n\nexport function toNotionRollup(value: string): void {\n return;\n}\n\nexport function toNotionUrl(value: string) {\n return value ? {type: 'url', url: value} : undefined;\n}\n\nexport function toNotionDate(value: Date) {\n return value ? {type: 'date', date: {start: dayjs(value).format() }} : undefined;\n}\n\nexport function toNotionSelect(value: string) {\n return value ? {type: 'select', select: {name: value}} : undefined;\n}\n\nexport function toNotionPhoneNumber(value: string) {\n return value ? {type: 'phone_number', phone_number: value} : undefined;\n}\n\nexport function toNotionNumber(value: number) {\n return value ? {type: 'number', number: value} : undefined;\n}\n\nexport function toNotionEmail(value: string) {\n return value ? {type: 'email', email: value} : undefined;\n}\n","import dayjs from \"dayjs\";\nimport { NotionAnnotation } from \"./decorators\";\nimport {\n NotionValue, NotionTitle, NotionUrl, NotionRichText, NotionRelation,\n NotionStatus, NotionFormula, NotionRollup, NotionCreatedTime,\n NotionLastEditedTime, NotionDate, NotionNumber, NotionSelect,\n NotionPhoneNumber, NotionEmail, NotionID\n} from \"./types\";\n\n/**\n * Converts a Notion API value to its JavaScript representation\n */\nexport function fromNotionValue(value: NotionValue, annotation: NotionAnnotation) {\n switch(value.type) {\n case 'title': return fromNotionTitle(value);\n case 'formula': return fromNotionFormula(value);\n case 'relation':\n if ((annotation.options as any).multi) {\n return fromNotionRelationMulti(value);\n } else {\n return fromNotionRelation(value);\n }\n case 'rich_text': return fromNotionRichText(value);\n case 'status': return fromNotionStatus(value);\n case 'url': return fromNotionUrl(value);\n case 'rollup':\n if ((annotation.options as any).multi) {\n return fromNotionRollupMulti(value);\n } else {\n return fromNotionRollup(value);\n }\n case 'created_time': return fromNotionCreatedTime(value);\n case 'last_edited_time': return fromNotionLastEditedTime(value);\n case 'date': return fromNotionDate(value);\n case 'number': return fromNotionNumber(value);\n case 'select': return fromNotionSelect(value);\n case 'phone_number': return fromNotionPhoneNumber(value);\n case 'email': return fromNotionEmail(value);\n case 'unique_id': return fromNotionUniqueID(value);\n }\n}\n\nexport function fromNotionTitle(notionTitle: NotionTitle): string {\n return notionTitle?.title?.[0]?.text?.content ?? '';\n}\n\nexport function fromNotionUrl(notionUrl: NotionUrl): string | null {\n return notionUrl.url;\n}\n\nexport function fromNotionRichText(notionRichText: NotionRichText): string | null {\n return notionRichText.rich_text.map(({plain_text}) => plain_text).join('') || null;\n}\n\nexport function fromNotionRelation(notionRelation: NotionRelation): string | null {\n return fromNotionRelationMulti(notionRelation)?.[0] ?? null;\n}\n\nexport function fromNotionRelationMulti(notionRelation: NotionRelation): string[] {\n return notionRelation.relation.map(r => r.id);\n}\n\nexport function fromNotionStatus(notionStatus: NotionStatus): string | null {\n return notionStatus.status?.name ?? null;\n}\n\nexport function fromNotionFormula(notionFormula: NotionFormula): string | number | Date {\n switch(notionFormula.formula?.type) {\n case 'string': return notionFormula.formula.string;\n case 'number': return notionFormula.formula.number;\n case 'date': return fromNotionDate(notionFormula.formula as any);\n }\n}\n\nexport function fromNotionRollup(notionRollup: NotionRollup): string | number {\n if (notionRollup.rollup.type === 'number') {\n return fromNotionNumber(notionRollup.rollup);\n }\n return fromNotionRollupMulti(notionRollup)?.[0] ?? null;\n}\n\nexport function fromNotionRollupMulti(notionRollup: NotionRollup): string[] | number[] {\n if (notionRollup.rollup.type === 'number') {\n return [];\n }\n return (notionRollup.rollup.array ?? []).map(notionValue => {\n if (notionValue.type === 'rich_text') {\n return (notionValue.rich_text ?? []).map(text => text.plain_text).join();\n } else if (notionValue.type === 'number') {\n return notionValue.number ?? null;\n }\n return [];\n });\n}\n\nexport function fromNotionCreatedTime(notionCreatedTime: NotionCreatedTime): dayjs.Dayjs {\n return dayjs(notionCreatedTime.created_time);\n}\n\nexport function fromNotionLastEditedTime(notionLastEditedTime: NotionLastEditedTime): dayjs.Dayjs {\n return dayjs(notionLastEditedTime.last_edited_time);\n}\n\nexport function fromNotionDate(notionDate: NotionDate): Date | null {\n return notionDate.date?.start ? dayjs(notionDate.date?.start).toDate() : null;\n}\n\nexport function fromNotionNumber(notionNumber: NotionNumber) {\n return notionNumber.number ?? null;\n}\n\nexport function fromNotionSelect(notionSelect: NotionSelect) {\n return notionSelect.select?.name ?? null;\n}\n\nexport function fromNotionPhoneNumber(notionPhoneNumber: NotionPhoneNumber) {\n return notionPhoneNumber.phone_number ?? null;\n}\n\nexport function fromNotionEmail(notionEmail: NotionEmail) {\n return notionEmail.email ?? null;\n}\n\nexport function fromNotionUniqueID(value: NotionID) {\n return value.unique_id.number;\n}\n","// Re-export types for backward compatibility\nexport * from './types';\n\n// Import functions for NotionUtils class\nimport * as toNotion from './to-notion';\nimport * as fromNotion from './from-notion';\n\n// Re-export individual functions\nexport * from './to-notion';\nexport * from './from-notion';\n\n/**\n * NotionUtils class for backward compatibility\n * @deprecated Use individual functions from './to-notion' and './from-notion' instead\n */\nexport class NotionUtils {\n // toNotion methods\n static toNotionValue = toNotion.toNotionValue;\n static toNotionTitle = toNotion.toNotionTitle;\n static toNotionStatus = toNotion.toNotionStatus;\n static toNotionRelationMulti = toNotion.toNotionRelationMulti;\n static toNotionRelation = toNotion.toNotionRelation;\n static toNotionRichText = toNotion.toNotionRichText;\n static toNotionFormula = toNotion.toNotionFormula;\n static toNotionRollup = toNotion.toNotionRollup;\n static toNotionUrl = toNotion.toNotionUrl;\n static toNotionDate = toNotion.toNotionDate;\n static toNotionSelect = toNotion.toNotionSelect;\n static toNotionPhoneNumber = toNotion.toNotionPhoneNumber;\n static toNotionNumber = toNotion.toNotionNumber;\n static toNotionEmail = toNotion.toNotionEmail;\n\n // fromNotion methods\n static fromNotionValue = fromNotion.fromNotionValue;\n static fromNotionTitle = fromNotion.fromNotionTitle;\n static fromNotionUrl = fromNotion.fromNotionUrl;\n static fromNotionRichText = fromNotion.fromNotionRichText;\n static fromNotionRelation = fromNotion.fromNotionRelation;\n static fromNotionRelationMulti = fromNotion.fromNotionRelationMulti;\n static fromNotionStatus = fromNotion.fromNotionStatus;\n static fromNotionFormula = fromNotion.fromNotionFormula;\n static fromNotionRollup = fromNotion.fromNotionRollup;\n static fromNotionRollupMulti = fromNotion.fromNotionRollupMulti;\n static fromNotionCreatedTime = fromNotion.fromNotionCreatedTime;\n static fromNotionLastEditedTime = fromNotion.fromNotionLastEditedTime;\n static fromNotionDate = fromNotion.fromNotionDate;\n static fromNotionNumber = fromNotion.fromNotionNumber;\n static fromNotionSelect = fromNotion.fromNotionSelect;\n static fromNotionPhoneNumber = fromNotion.fromNotionPhoneNumber;\n static fromNotionEmail = fromNotion.fromNotionEmail;\n static fromNotionUniqueID = fromNotion.fromNotionUniqueID;\n}\n","export const NOTION_ANNOTATIONS = 'notion_annotations';\nexport const NOTION_DATABASE_ANNOTATION = 'notion_database_annotation';\nexport type NotionFieldType = 'title' | 'url' | 'rich_text' \n | 'relation' | 'status' | 'formula' | 'rollup' | 'timestamp'\n | 'number' | 'created_time' | 'last_edited_time' | 'date' | 'select'\n | 'phone_number' | 'email' | 'checkbox' | 'created_by' | 'files'\n | 'last_edited_by' | 'multi_select' | 'people' | 'unique_id';\nexport interface NotionAnnotation<T extends object = undefined> {\n type: NotionFieldType;\n fieldName: string;\n propName: string;\n options?: T;\n}\n\nfunction createDecorator<T extends object = undefined>(type: NotionFieldType, defaultOptions?: T) {\n return (name?: string, options?: Partial<T>) => {\n return (target: any, propName: string) => {\n const fieldName = name || propName;\n const ANNOTATION: NotionAnnotation<T> = {type, fieldName, propName, options: {...defaultOptions, ...options}};\n target.constructor[NOTION_ANNOTATIONS] ??= [];\n target.constructor[NOTION_ANNOTATIONS].push(ANNOTATION);\n };\n };\n}\n\nexport const Title = createDecorator('title');\nexport const Url = createDecorator('url');\nexport const RichText = createDecorator('rich_text');\nexport const Relation = createDecorator<{multi: boolean}>('relation', {multi: false});\nexport const Status = createDecorator('status');\nexport const Formula = createDecorator('formula');\nexport const Rollup = createDecorator<{multi: boolean}>('rollup', {multi: false});\nexport const Timestamp = createDecorator('timestamp');\nexport const Number = createDecorator('number');\nexport const CreatedTime = createDecorator('created_time');\nexport const LastEditedTime = createDecorator('last_edited_time');\nexport const Date = createDecorator('date');\nexport const Select = createDecorator('select');\nexport const PhoneNumber = createDecorator('phone_number');\nexport const Email = createDecorator('email');\nexport const UniqueID = createDecorator('unique_id');\n// Not implemented below props!\n// export const Checkbox = createDecorator('checkbox');\n// export const CreatedBy = createDecorator('created_by');\n// export const Files = createDecorator('files');\n// export const LastEditedBy = createDecorator('last_edited_by');\n// export const MultiSelect = createDecorator('multi_select');\n// export const People = createDecorator('people');\n\n/**\n * Class decorator to specify Notion database ID\n * @param databaseId - The Notion database ID\n */\nfunction Database(databaseId: string) {\n return (target: any) => {\n target[NOTION_DATABASE_ANNOTATION] = databaseId;\n };\n}\n\n/**\n * Get database ID from class decorator\n * @param target - Entity class with @Notion.Database decorator\n * @returns Database ID or undefined if not decorated\n */\nexport function getDatabaseId(target: any): string | undefined {\n return target[NOTION_DATABASE_ANNOTATION];\n}\n\nexport const Notion = {\n Database,\n Title,\n Url,\n RichText,\n Relation,\n Status,\n Formula,\n Rollup,\n Timestamp,\n Number,\n CreatedTime,\n LastEditedTime,\n Date,\n Select,\n PhoneNumber,\n Email,\n UniqueID,\n};\n","import { PageObjectResponse, PartialPageObjectResponse, PartialDatabaseObjectResponse, DatabaseObjectResponse } from \"@notionhq/client/build/src/api-endpoints\";\nimport { NotionUtils } from \"../utils\";\nimport { NotionAnnotation, NOTION_ANNOTATIONS } from \"../decorators\";\nimport { omitBy } from \"lodash-es\";\nimport { Type } from \"@nx-ddd/common/domain\";\n\nexport class NotionHelper {\n static fromNotion<E>(\n page: PageObjectResponse | PartialPageObjectResponse | PartialDatabaseObjectResponse | DatabaseObjectResponse,\n Entity: Type<E>\n ): E {\n const annotations: NotionAnnotation[] = Entity[NOTION_ANNOTATIONS] ?? [];\n const obj = annotations.reduce((obj, annotation) => {\n const value = page['properties'][annotation.fieldName] \n ? NotionUtils.fromNotionValue(page['properties'][annotation.fieldName], annotation)\n : undefined;\n return {...obj, [annotation.propName]: value};\n }, {id: page.id});\n return (Entity as any).from(obj);\n }\n\n static toNotion<E>(entity: Partial<E>, Entity: Type<E>): object {\n const annotations: NotionAnnotation[] = Entity[NOTION_ANNOTATIONS] ?? [];\n const data = annotations.reduce((obj, annotation) => ({\n ...obj,\n [annotation.fieldName]: NotionUtils.toNotionValue(entity[annotation.propName], annotation),\n }), {});\n return omitBy(data, (value) => typeof value === 'undefined');\n }\n}\n\nexport abstract class NotionConverter<E> {\n protected abstract Entity;\n\n fromNotion(page: PageObjectResponse | PartialPageObjectResponse | PartialDatabaseObjectResponse | DatabaseObjectResponse): E {\n return NotionHelper.fromNotion<E>(page, this.Entity);\n }\n\n toNotion(entity: Partial<E>): object {\n return NotionHelper.toNotion<E>(entity, this.Entity);\n }\n}\n\nexport function createConverter<E = any>(Entity: any): NotionConverter<E> {\n class Converter extends NotionConverter<E> {\n protected Entity = Entity;\n }\n\n return new Converter();\n}\n","import { inject, InjectionToken } from \"@angular/core\";\nimport type { NotionService } from \"./notion.service.impl\";\n\nexport interface NotionConfig {\n token: string;\n}\n\nexport const NOTION_SERVICE = new InjectionToken<NotionService>('NOTION_SERVICE');\nexport const NOTION_CONFIG = new InjectionToken<NotionConfig>('NOTION_CONFIG');\n\nexport function injectNotion(): NotionService {\n return inject(NOTION_SERVICE, { optional: true }) ?? null;\n}\n","import { NotionAnnotation, NOTION_ANNOTATIONS } from \"../decorators\";\nimport { Entity } from \"@nx-ddd/common/domain\";\n\ntype Evaluation = '==' | '>' | '>=' | '<' | '<=' | '!=' | 'in';\n\nexport class N {\n static RollupPropQuery(property: string, evaluation: Evaluation, value: string | number) {\n return { property, rollup: { every: { rich_text: { equals: value } } } };\n }\n\n static FormulaQuery(property: string, evaluation: Evaluation, value: string | number) {\n return { property, formula: {}};\n }\n\n static LastEditedTime(property: string, evaluation: Evaluation, value: string | number) {\n const query = evaluation === '>' ? 'after' \n : evaluation === '<' ? 'before'\n : evaluation === '==' ? 'equals'\n : evaluation === '<=' ? 'on_or_before'\n : evaluation === '>=' ? 'on_or_after'\n : evaluation === '!=' ? '' : '';\n return { timestamp: 'last_edited_time', last_edited_time: {[query]: value} };\n }\n\n static Timestamp(property: string, evaluation: Evaluation, value: string) {\n const query = evaluation === '>' ? 'after' \n : evaluation === '<' ? 'before'\n : evaluation === '==' ? 'equals'\n : evaluation === '<=' ? 'on_or_before'\n : evaluation === '>=' ? 'on_or_after'\n : evaluation === '!=' ? '' : '';\n return { property, timestamp: {[query]: value} };\n }\n\n static Status(property: string, evaluation: Evaluation, value: string) {\n const query = evaluation === '==' ? 'equals' : '';\n // TODO(nontangent): 'ステータス'を修正\n return { property: 'ステータス', status: {[query]: value} };\n }\n \n static Relation(property: string, evaluation: Evaluation, value: string) {\n const query = evaluation === 'in' ? 'contains': '';\n return { property, relation: {[query]: value} };\n }\n}\n\nexport abstract class NotionBaseQuery {\n type: 'and' | 'or' | 'filter' | 'sort';\n abstract build();\n}\n\nexport class NotionFilter extends NotionBaseQuery {\n readonly type = 'filter' as const;\n\n constructor(\n public propertyType: any,\n public propertyName: string,\n public evaluation: Evaluation,\n public value: string | number,\n ) { super(); }\n\n build() {\n switch(this.propertyName) {\n case 'last_edited_time': return N.LastEditedTime(this.propertyName, this.evaluation, this.value);\n }\n\n switch(this.propertyType) {\n case 'rollup': return N.RollupPropQuery(this.propertyName, this.evaluation, this.value);\n case 'formula': return N.FormulaQuery(this.propertyName, this.evaluation, this.value);\n case 'status': return N.Status(this.propertyName, this.evaluation, this.value as string);\n case 'relation': return N.Relation(this.propertyName, this.evaluation, this.value as string);\n }\n }\n}\n\nexport class NotionSort extends NotionBaseQuery {\n readonly type = 'sort' as const;\n constructor(\n public property: string,\n public direction: 'asc' | 'desc' = 'asc',\n ) { super(); }\n\n build() {\n return {\n property: this.property,\n direction: this.direction === 'asc' ? 'ascending' : 'descending',\n };\n }\n}\n\nexport class NotionAnd extends NotionBaseQuery {\n readonly type = 'and' as const;\n arr: NotionFilter[];\n\n constructor(...filters: NotionFilter[]) {\n super();\n this.arr = filters;\n }\n\n build() {\n return {and: this.arr.map(filter => filter.build())};\n }\n}\n\nexport class NotionOr extends NotionBaseQuery {\n readonly type = 'or' as const;\n arr: NotionFilter[];\n\n constructor(...filters: NotionFilter[]) {\n super();\n this.arr = filters;\n }\n\n build() {\n return {or: this.arr.map(filter => filter.build())};\n }\n}\n\nexport const Query = <E = any>(Entity: E) => {\n const Filter = (_propName: string, evaluation: Evaluation, value: string | number): NotionFilter => {\n const annotation: NotionAnnotation = Entity[NOTION_ANNOTATIONS].find(({propName}) => propName === _propName);\n\n // if(!annotation) {\n // throw new Error(`NotionFilter: ${Entity} does not have ${_propName}.`);\n // }\n\n return new NotionFilter(annotation?.type, annotation?.fieldName ?? _propName, evaluation, value);\n };\n const OrderBy = (_propName: string, direction: 'asc' | 'desc'): NotionSort => {\n const annotation: NotionAnnotation = Entity[NOTION_ANNOTATIONS].find(({propName}) => propName === _propName);\n return new NotionSort(annotation?.fieldName ?? _propName, direction);\n };\n \n const And = (...args: NotionFilter[]): NotionAnd => new NotionAnd(...args);\n const Or = (...args: NotionFilter[]): NotionOr => new NotionOr(...args);\n\n return {Filter, OrderBy, And, Or};\n}\n","import { NotionBaseQuery } from \"../query\";\n\nexport class NotionQueryBuilder {\n constructor() { }\n\n build(filterQuery?: NotionBaseQuery, sortQuery?: NotionBaseQuery) {\n return {\n ...(filterQuery ? this.buildFilterQuery(filterQuery) : {}),\n ...(sortQuery ? this.buildSortQuery(sortQuery) : {}),\n }\n }\n\n protected buildSortQuery(query: NotionBaseQuery) {\n if (query.type === 'sort') {\n return { sorts: [query.build()]};\n } else {\n return {};\n }\n }\n\n protected buildFilterQuery(query: NotionBaseQuery) {\n if (query.type === 'filter') {\n return { filter: { and: [query.build()] } };\n } else if (['and', 'or'].includes(query.type)) {\n return { filter: query.build() };\n } else {\n return {};\n }\n }\n}\n","import { Client } from '@notionhq/client';\nimport { Entity } from '@nx-ddd/common/domain';\nimport { Repository } from '@nx-ddd/common/domain';\nimport { inject, Injectable, InjectionToken } from '@angular/core';\nimport { NotionConverter } from '../converter';\nimport { NotionBaseQuery } from '../query';\nimport { NotionQueryBuilder } from '../query-builder';\nimport { Observable } from 'rxjs';\n\nexport const NOTION_ACCESS_TOKEN = new InjectionToken<string>('[@nx-ddd/notion] Notion Access Token');\nexport const NOTION_DATABASE_ID = new InjectionToken('[@nx-ddd/notion] Notion Database Id');\n\nexport function provideNotionConfig(config: {accessToken: string}) {\n return { provide: NOTION_ACCESS_TOKEN, useValue: config.accessToken };\n}\n\n@Injectable()\nexport abstract class NotionRepository<E extends Entity> extends Repository<E> {\n protected abstract databaseId: string;\n protected abstract converter: NotionConverter<E>;\n\n protected token: string = inject(NOTION_ACCESS_TOKEN);\n protected client = new Client({auth: this.token});\n protected queryBuilder = new NotionQueryBuilder();\n protected get parent(): {type: 'database_id', database_id: string} {\n return { type: 'database_id', database_id: this.databaseId };\n }\n\n async query(\n filterQuery?: NotionBaseQuery, \n sortQuery?: NotionBaseQuery,\n startCursor?: string,\n pageSize?: number,\n ) {\n try {\n const obj = this.queryBuilder.build(filterQuery, sortQuery);\n const res = await this.client.databases.query({\n database_id: this.databaseId,\n ...obj,\n start_cursor: startCursor,\n page_size: pageSize,\n });\n return {\n results: res.results.map(result => this.converter.fromNotion(result)),\n nextCursor: res.next_cursor,\n hasMore: res.has_more,\n }\n } catch (error) {\n throw error;\n }\n }\n\n async queryV2(args?: any) {\n try {\n const res = await this.client.databases.query({\n database_id: this.databaseId,\n ...(args ?? {}),\n });\n return {\n results: res.results.map(result => this.converter.fromNotion(result)),\n nextCursor: res.next_cursor,\n hasMore: res.has_more,\n }\n } catch (error) {\n throw error;\n }\n }\n\n async list({\n batchSize = 100,\n }: {\n batchSize?: number,\n } = {}): Promise<E[]> {\n const items: E[] = [];\n let nextCursor: string;\n let pageCount = 0;\n \n console.log(`[NotionRepository] Starting pagination with batch size: ${batchSize}`);\n\n // eslint-disable-next-line no-constant-condition\n while(true) {\n pageCount++;\n const res = await this.query(undefined, undefined, nextCursor, batchSize);\n console.log(`[NotionRepository] Page ${pageCount}: Retrieved ${res.results.length} items, hasMore: ${res.hasMore}, nextCursor: ${res.nextCursor ? 'present' : 'null'}`);\n \n items.push(...res.results);\n nextCursor = res.nextCursor;\n \n if (!res.hasMore) {\n console.log(`[NotionRepository] Pagination complete. Total items: ${items.length} from ${pageCount} pages`);\n break;\n }\n }\n \n return items;\n }\n\n listChanges(): Observable<E[]> {\n throw new Error('NotionRepository.listChanges() is not implemented');\n }\n\n async get({id}: {id: string}): Promise<E> {\n const data = await this.client.pages.retrieve({page_id: id});\n return this.converter.fromNotion(data);\n }\n\n async create(entity: Omit<E, 'id' | 'createdAt' | 'updatedAt'> & Partial<Pick<E, 'id'>>): Promise<E> {\n try {\n const res = await this.client.pages.create({\n parent: this.parent,\n properties: {...this.converter.toNotion(entity as E)},\n }); \n return this.converter.fromNotion(res);\n } catch (error) {\n throw error;\n }\n }\n\n async createMany(data: Omit<E, 'id' | 'createdAt' | 'updatedAt'>[]): Promise<E[]> {\n throw new Error('NotionRepository.createMany() is not implemented');\n }\n\n async update(entity: Partial<E>) {\n const data = {\n page_id: (entity as any).id,\n properties: {...this.converter.toNotion(entity)},\n };\n await this.client.pages.update(data);\n }\n\n async save(data: Partial<E>): Promise<boolean | [E, boolean]> {\n throw new Error('NotionRepository.save() is not implemented');\n }\n\n async saveMany(entities: E[]): Promise<void> {\n throw new Error('NotionRepository.saveMany() is not implemented');\n }\n\n async updateMany(data: Partial<E>[]) {\n throw new Error('NotionRepository.updateMany() is not implemented');\n }\n\n async delete({id}: {id: string}) {\n throw new Error('NotionRepository.delete() is not implemented');\n }\n\n async deleteMany(params: { id: string; }[]): Promise<number> {\n throw new Error('NotionRepository.deleteMany() is not implemented');\n }\n\n async deleteAll(): Promise<void> {\n throw new Error('NotionRepository.deleteAll() is not implemented');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["toNotion.toNotionValue","toNotion.toNotionTitle","toNotion.toNotionStatus","toNotion.toNotionRelationMulti","toNotion.toNotionRelation","toNotion.toNotionRichText","toNotion.toNotionFormula","toNotion.toNotionRollup","toNotion.toNotionUrl","toNotion.toNotionDate","toNotion.toNotionSelect","toNotion.toNotionPhoneNumber","toNotion.toNotionNumber","toNotion.toNotionEmail","fromNotion.fromNotionValue","fromNotion.fromNotionTitle","fromNotion.fromNotionUrl","fromNotion.fromNotionRichText","fromNotion.fromNotionRelation","fromNotion.fromNotionRelationMulti","fromNotion.fromNotionStatus","fromNotion.fromNotionFormula","fromNotion.fromNotionRollup","fromNotion.fromNotionRollupMulti","fromNotion.fromNotionCreatedTime","fromNotion.fromNotionLastEditedTime","fromNotion.fromNotionDate","fromNotion.fromNotionNumber","fromNotion.fromNotionSelect","fromNotion.fromNotionPh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ts","../../../../../packages/@nx-ddd/notion/src/lib/from-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/utils.ts","../../../../../packages/@nx-ddd/notion/src/lib/decorators/decorators.ts","../../../../../packages/@nx-ddd/notion/src/lib/converter/converter.ts","../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.ts","../../../../../packages/@nx-ddd/notion/src/lib/query/query.ts","../../../../../packages/@nx-ddd/notion/src/lib/query-builder/query-builder.ts","../../../../../packages/@nx-ddd/notion/src/lib/repository/repository.ts","../../../../../packages/@nx-ddd/notion/src/lib/nx-ddd-notion.ts"],"sourcesContent":["/**\n * Notion API type definitions\n */\n\ntype NotionText = {\n type: 'text',\n text: { content: string },\n plain_text: string,\n}\n\ntype NotionArray = {\n type: 'array',\n array: (NotionRichText[] | NotionNumber[]),\n function: 'show_original'\n}\n\nexport type NotionTitle = {type: 'title', title: {text: {content: string}}[]};\nexport type NotionUrl = {id: string, type: 'url', url: string | null};\nexport type NotionRichText = {\n id: string,\n type: 'rich_text',\n rich_text: NotionText[]\n};\nexport type NotionNumber = {id: string, type: 'number', number: number};\nexport type NotionRelation = {id: string, type: 'relation', relation: {id: string}[], has_more: boolean};\nexport type NotionStatus = {id: string, type: 'status', status: {id: string, name: string, color: string}};\nexport type NotionFormula = {\n id: string,\n type: 'formula',\n formula: {\n type: 'string',\n string: string\n } | {\n type: 'number',\n number: number\n } | {\n type: 'date',\n date: {\n start: string,\n end: string,\n time_zone: null,\n }\n }\n};\nexport type NotionRollup = {id: string, type: 'rollup', rollup: NotionArray | NotionNumber};\n\nexport type NotionCreatedTime = {id: string, type: 'created_time', created_time: string};\nexport type NotionLastEditedTime = {id: string, type: 'last_edited_time', last_edited_time: string};\nexport type NotionDate = {id: string, type: 'date', date: any };\nexport type NotionSelect = {id: string, type: 'select', select: {id: string, name: string, color: string}};\n\nexport type NotionPhoneNumber = {id: string, type: 'phone_number', phone_number: string};\nexport type NotionEmail = {id: string, type: 'email', email: string};\nexport type NotionID = {id: string, type: 'unique_id', unique_id: {prefix: string | null, number: number}};\n\nexport type NotionValue = NotionTitle | NotionUrl | NotionRichText | NotionNumber\n | NotionRelation | NotionStatus | NotionFormula | NotionRollup\n | NotionCreatedTime | NotionLastEditedTime | NotionDate | NotionSelect\n | NotionPhoneNumber | NotionEmail | NotionID;\n","import dayjs from \"dayjs\";\nimport { NotionAnnotation } from \"./decorators\";\n\n/**\n * Converts a value to its Notion API representation based on annotation type\n */\nexport function toNotionValue(value: any, annotation: NotionAnnotation) {\n switch(annotation.type) {\n case 'title': return toNotionTitle(value);\n case 'status': return toNotionStatus(value);\n case 'relation':\n if ((annotation.options as any).multi) {\n return toNotionRelationMulti(value);\n } else {\n return toNotionRelation(value);\n }\n case 'formula': return toNotionFormula(value);\n case 'rich_text': return toNotionRichText(value);\n case 'rollup': return toNotionRollup(value);\n case 'url': return toNotionUrl(value);\n case 'date': return toNotionDate(value);\n case 'select': return toNotionSelect(value);\n case 'number': return toNotionNumber(value);\n case 'phone_number': return toNotionPhoneNumber(value);\n case 'email': return toNotionEmail(value);\n }\n}\n\nexport function toNotionTitle(value: string) {\n return value ? {type: 'title', title: [{text: {content: value}}]} : undefined;\n}\n\nexport function toNotionStatus(value: string) {\n return value ? {type: 'status', status: {name: value}} : undefined;\n}\n\nexport function toNotionRelationMulti(ids: string[]) {\n return Array.isArray(ids) ? {type: 'relation', relation: (ids).map(id => ({id}))} : undefined;\n}\n\nexport function toNotionRelation(value: string) {\n return value ? toNotionRelationMulti([value]) : undefined;\n}\n\nexport function toNotionRichText(text?: string) {\n return text ? {type: 'rich_text', rich_text: [{text: {content: text}}]} : undefined;\n}\n\nexport function toNotionFormula(value: string): void {\n return;\n}\n\nexport function toNotionRollup(value: string): void {\n return;\n}\n\nexport function toNotionUrl(value: string) {\n return value ? {type: 'url', url: value} : undefined;\n}\n\nexport function toNotionDate(value: Date) {\n return value ? {type: 'date', date: {start: dayjs(value).format() }} : undefined;\n}\n\nexport function toNotionSelect(value: string) {\n return value ? {type: 'select', select: {name: value}} : undefined;\n}\n\nexport function toNotionPhoneNumber(value: string) {\n return value ? {type: 'phone_number', phone_number: value} : undefined;\n}\n\nexport function toNotionNumber(value: number) {\n return value ? {type: 'number', number: value} : undefined;\n}\n\nexport function toNotionEmail(value: string) {\n return value ? {type: 'email', email: value} : undefined;\n}\n","import dayjs from \"dayjs\";\nimport { NotionAnnotation } from \"./decorators\";\nimport {\n NotionValue, NotionTitle, NotionUrl, NotionRichText, NotionRelation,\n NotionStatus, NotionFormula, NotionRollup, NotionCreatedTime,\n NotionLastEditedTime, NotionDate, NotionNumber, NotionSelect,\n NotionPhoneNumber, NotionEmail, NotionID\n} from \"./types\";\n\n/**\n * Converts a Notion API value to its JavaScript representation\n */\nexport function fromNotionValue(value: NotionValue, annotation: NotionAnnotation) {\n switch(value.type) {\n case 'title': return fromNotionTitle(value);\n case 'formula': return fromNotionFormula(value);\n case 'relation':\n if ((annotation.options as any).multi) {\n return fromNotionRelationMulti(value);\n } else {\n return fromNotionRelation(value);\n }\n case 'rich_text': return fromNotionRichText(value);\n case 'status': return fromNotionStatus(value);\n case 'url': return fromNotionUrl(value);\n case 'rollup':\n if ((annotation.options as any).multi) {\n return fromNotionRollupMulti(value);\n } else {\n return fromNotionRollup(value);\n }\n case 'created_time': return fromNotionCreatedTime(value);\n case 'last_edited_time': return fromNotionLastEditedTime(value);\n case 'date': return fromNotionDate(value);\n case 'number': return fromNotionNumber(value);\n case 'select': return fromNotionSelect(value);\n case 'phone_number': return fromNotionPhoneNumber(value);\n case 'email': return fromNotionEmail(value);\n case 'unique_id': return fromNotionUniqueID(value);\n }\n}\n\nexport function fromNotionTitle(notionTitle: NotionTitle): string {\n return notionTitle?.title?.[0]?.text?.content ?? '';\n}\n\nexport function fromNotionUrl(notionUrl: NotionUrl): string | null {\n return notionUrl.url;\n}\n\nexport function fromNotionRichText(notionRichText: NotionRichText): string | null {\n return notionRichText.rich_text.map(({plain_text}) => plain_text).join('') || null;\n}\n\nexport function fromNotionRelation(notionRelation: NotionRelation): string | null {\n return fromNotionRelationMulti(notionRelation)?.[0] ?? null;\n}\n\nexport function fromNotionRelationMulti(notionRelation: NotionRelation): string[] {\n return notionRelation.relation.map(r => r.id);\n}\n\nexport function fromNotionStatus(notionStatus: NotionStatus): string | null {\n return notionStatus.status?.name ?? null;\n}\n\nexport function fromNotionFormula(notionFormula: NotionFormula): string | number | Date | null {\n switch(notionFormula.formula?.type) {\n case 'string': return notionFormula.formula.string;\n case 'number': return notionFormula.formula.number;\n case 'date': return fromNotionDate(notionFormula.formula as any);\n default: return null;\n }\n}\n\nexport function fromNotionRollup(notionRollup: NotionRollup): string | number {\n if (notionRollup.rollup.type === 'number') {\n return fromNotionNumber(notionRollup.rollup);\n }\n return fromNotionRollupMulti(notionRollup)?.[0] ?? null;\n}\n\nexport function fromNotionRollupMulti(notionRollup: NotionRollup): string[] | number[] {\n if (notionRollup.rollup.type === 'number') {\n return [];\n }\n return (notionRollup.rollup.array ?? []).map(notionValue => {\n if (notionValue.type === 'rich_text') {\n return (notionValue.rich_text ?? []).map(text => text.plain_text).join();\n } else if (notionValue.type === 'number') {\n return notionValue.number ?? null;\n }\n return [];\n }) as unknown as string[] | number[];\n}\n\nexport function fromNotionCreatedTime(notionCreatedTime: NotionCreatedTime): dayjs.Dayjs {\n return dayjs(notionCreatedTime.created_time);\n}\n\nexport function fromNotionLastEditedTime(notionLastEditedTime: NotionLastEditedTime): dayjs.Dayjs {\n return dayjs(notionLastEditedTime.last_edited_time);\n}\n\nexport function fromNotionDate(notionDate: NotionDate): Date | null {\n return notionDate.date?.start ? dayjs(notionDate.date?.start).toDate() : null;\n}\n\nexport function fromNotionNumber(notionNumber: NotionNumber) {\n return notionNumber.number ?? null;\n}\n\nexport function fromNotionSelect(notionSelect: NotionSelect) {\n return notionSelect.select?.name ?? null;\n}\n\nexport function fromNotionPhoneNumber(notionPhoneNumber: NotionPhoneNumber) {\n return notionPhoneNumber.phone_number ?? null;\n}\n\nexport function fromNotionEmail(notionEmail: NotionEmail) {\n return notionEmail.email ?? null;\n}\n\nexport function fromNotionUniqueID(value: NotionID) {\n return value.unique_id.number;\n}\n","// Re-export types for backward compatibility\nexport * from './types';\n\n// Import functions for NotionUtils class\nimport * as toNotion from './to-notion';\nimport * as fromNotion from './from-notion';\n\n// Re-export individual functions\nexport * from './to-notion';\nexport * from './from-notion';\n\n/**\n * NotionUtils class for backward compatibility\n * @deprecated Use individual functions from './to-notion' and './from-notion' instead\n */\nexport class NotionUtils {\n // toNotion methods\n static toNotionValue = toNotion.toNotionValue;\n static toNotionTitle = toNotion.toNotionTitle;\n static toNotionStatus = toNotion.toNotionStatus;\n static toNotionRelationMulti = toNotion.toNotionRelationMulti;\n static toNotionRelation = toNotion.toNotionRelation;\n static toNotionRichText = toNotion.toNotionRichText;\n static toNotionFormula = toNotion.toNotionFormula;\n static toNotionRollup = toNotion.toNotionRollup;\n static toNotionUrl = toNotion.toNotionUrl;\n static toNotionDate = toNotion.toNotionDate;\n static toNotionSelect = toNotion.toNotionSelect;\n static toNotionPhoneNumber = toNotion.toNotionPhoneNumber;\n static toNotionNumber = toNotion.toNotionNumber;\n static toNotionEmail = toNotion.toNotionEmail;\n\n // fromNotion methods\n static fromNotionValue = fromNotion.fromNotionValue;\n static fromNotionTitle = fromNotion.fromNotionTitle;\n static fromNotionUrl = fromNotion.fromNotionUrl;\n static fromNotionRichText = fromNotion.fromNotionRichText;\n static fromNotionRelation = fromNotion.fromNotionRelation;\n static fromNotionRelationMulti = fromNotion.fromNotionRelationMulti;\n static fromNotionStatus = fromNotion.fromNotionStatus;\n static fromNotionFormula = fromNotion.fromNotionFormula;\n static fromNotionRollup = fromNotion.fromNotionRollup;\n static fromNotionRollupMulti = fromNotion.fromNotionRollupMulti;\n static fromNotionCreatedTime = fromNotion.fromNotionCreatedTime;\n static fromNotionLastEditedTime = fromNotion.fromNotionLastEditedTime;\n static fromNotionDate = fromNotion.fromNotionDate;\n static fromNotionNumber = fromNotion.fromNotionNumber;\n static fromNotionSelect = fromNotion.fromNotionSelect;\n static fromNotionPhoneNumber = fromNotion.fromNotionPhoneNumber;\n static fromNotionEmail = fromNotion.fromNotionEmail;\n static fromNotionUniqueID = fromNotion.fromNotionUniqueID;\n}\n","export const NOTION_ANNOTATIONS = 'notion_annotations';\nexport const NOTION_DATABASE_ANNOTATION = 'notion_database_annotation';\nexport type NotionFieldType = 'title' | 'url' | 'rich_text' \n | 'relation' | 'status' | 'formula' | 'rollup' | 'timestamp'\n | 'number' | 'created_time' | 'last_edited_time' | 'date' | 'select'\n | 'phone_number' | 'email' | 'checkbox' | 'created_by' | 'files'\n | 'last_edited_by' | 'multi_select' | 'people' | 'unique_id';\nexport interface NotionAnnotation<T extends object = Record<string, never>> {\n type: NotionFieldType;\n fieldName: string;\n propName: string;\n options?: T;\n}\n\nfunction createDecorator<T extends object = Record<string, never>>(type: NotionFieldType, defaultOptions?: T) {\n return (name?: string, options?: Partial<T>) => {\n return (target: any, propName: string) => {\n const fieldName = name || propName;\n const ANNOTATION: NotionAnnotation<T> = {type, fieldName, propName, options: {...defaultOptions, ...options} as T};\n target.constructor[NOTION_ANNOTATIONS] ??= [];\n target.constructor[NOTION_ANNOTATIONS].push(ANNOTATION);\n };\n };\n}\n\nexport const Title = createDecorator('title');\nexport const Url = createDecorator('url');\nexport const RichText = createDecorator('rich_text');\nexport const Relation = createDecorator<{multi: boolean}>('relation', {multi: false});\nexport const Status = createDecorator('status');\nexport const Formula = createDecorator('formula');\nexport const Rollup = createDecorator<{multi: boolean}>('rollup', {multi: false});\nexport const Timestamp = createDecorator('timestamp');\nexport const Number = createDecorator('number');\nexport const CreatedTime = createDecorator('created_time');\nexport const LastEditedTime = createDecorator('last_edited_time');\nexport const Date = createDecorator('date');\nexport const Select = createDecorator('select');\nexport const PhoneNumber = createDecorator('phone_number');\nexport const Email = createDecorator('email');\nexport const UniqueID = createDecorator('unique_id');\n// Not implemented below props!\n// export const Checkbox = createDecorator('checkbox');\n// export const CreatedBy = createDecorator('created_by');\n// export const Files = createDecorator('files');\n// export const LastEditedBy = createDecorator('last_edited_by');\n// export const MultiSelect = createDecorator('multi_select');\n// export const People = createDecorator('people');\n\n/**\n * Class decorator to specify Notion database ID\n * @param databaseId - The Notion database ID\n */\nfunction Database(databaseId: string) {\n return (target: any) => {\n target[NOTION_DATABASE_ANNOTATION] = databaseId;\n };\n}\n\n/**\n * Get database ID from class decorator\n * @param target - Entity class with @Notion.Database decorator\n * @returns Database ID or undefined if not decorated\n */\nexport function getDatabaseId(target: any): string | undefined {\n return target[NOTION_DATABASE_ANNOTATION];\n}\n\nexport const Notion = {\n Database,\n Title,\n Url,\n RichText,\n Relation,\n Status,\n Formula,\n Rollup,\n Timestamp,\n Number,\n CreatedTime,\n LastEditedTime,\n Date,\n Select,\n PhoneNumber,\n Email,\n UniqueID,\n};\n","import { PageObjectResponse, PartialPageObjectResponse, PartialDatabaseObjectResponse, DatabaseObjectResponse } from \"@notionhq/client/build/src/api-endpoints\";\nimport { NotionUtils } from \"../utils\";\nimport { NotionAnnotation, NOTION_ANNOTATIONS } from \"../decorators\";\nimport { omitBy } from \"lodash-es\";\nimport { Type } from \"@nx-ddd/common/domain\";\n\nexport class NotionHelper {\n static fromNotion<E>(\n page: PageObjectResponse | PartialPageObjectResponse | PartialDatabaseObjectResponse | DatabaseObjectResponse,\n Entity: Type<E>\n ): E {\n const annotations: NotionAnnotation[] = (Entity as any)[NOTION_ANNOTATIONS] ?? [];\n const obj = annotations.reduce((obj, annotation) => {\n const value = (page as any)['properties'][annotation.fieldName]\n ? NotionUtils.fromNotionValue((page as any)['properties'][annotation.fieldName], annotation)\n : undefined;\n return {...obj, [annotation.propName]: value};\n }, {id: page.id});\n return (Entity as any).from(obj);\n }\n\n static toNotion<E>(entity: Partial<E>, Entity: Type<E>): object {\n const annotations: NotionAnnotation[] = (Entity as any)[NOTION_ANNOTATIONS] ?? [];\n const data = annotations.reduce((obj, annotation) => ({\n ...obj,\n [annotation.fieldName]: NotionUtils.toNotionValue((entity as Record<string, any>)[annotation.propName], annotation),\n }), {});\n return omitBy(data, (value) => typeof value === 'undefined');\n }\n}\n\nexport abstract class NotionConverter<E> {\n protected abstract Entity: Type<E>;\n\n fromNotion(page: PageObjectResponse | PartialPageObjectResponse | PartialDatabaseObjectResponse | DatabaseObjectResponse): E {\n return NotionHelper.fromNotion<E>(page, this.Entity);\n }\n\n toNotion(entity: Partial<E>): object {\n return NotionHelper.toNotion<E>(entity, this.Entity);\n }\n}\n\nexport function createConverter<E = any>(Entity: any): NotionConverter<E> {\n class Converter extends NotionConverter<E> {\n protected Entity = Entity;\n }\n\n return new Converter();\n}\n","import { inject, InjectionToken } from \"@angular/core\";\nimport type { NotionService } from \"./notion.service.impl\";\n\nexport interface NotionConfig {\n token: string;\n}\n\nexport const NOTION_SERVICE = new InjectionToken<NotionService>('NOTION_SERVICE');\nexport const NOTION_CONFIG = new InjectionToken<NotionConfig>('NOTION_CONFIG');\n\nexport function injectNotion(): NotionService | null {\n return inject(NOTION_SERVICE, { optional: true }) ?? null;\n}\n","import { NotionAnnotation, NOTION_ANNOTATIONS } from \"../decorators\";\nimport { Entity } from \"@nx-ddd/common/domain\";\n\ntype Evaluation = '==' | '>' | '>=' | '<' | '<=' | '!=' | 'in';\n\nexport class N {\n static RollupPropQuery(property: string, evaluation: Evaluation, value: string | number) {\n return { property, rollup: { every: { rich_text: { equals: value } } } };\n }\n\n static FormulaQuery(property: string, evaluation: Evaluation, value: string | number) {\n return { property, formula: {}};\n }\n\n static LastEditedTime(property: string, evaluation: Evaluation, value: string | number) {\n const query = evaluation === '>' ? 'after' \n : evaluation === '<' ? 'before'\n : evaluation === '==' ? 'equals'\n : evaluation === '<=' ? 'on_or_before'\n : evaluation === '>=' ? 'on_or_after'\n : evaluation === '!=' ? '' : '';\n return { timestamp: 'last_edited_time', last_edited_time: {[query]: value} };\n }\n\n static Timestamp(property: string, evaluation: Evaluation, value: string) {\n const query = evaluation === '>' ? 'after' \n : evaluation === '<' ? 'before'\n : evaluation === '==' ? 'equals'\n : evaluation === '<=' ? 'on_or_before'\n : evaluation === '>=' ? 'on_or_after'\n : evaluation === '!=' ? '' : '';\n return { property, timestamp: {[query]: value} };\n }\n\n static Status(property: string, evaluation: Evaluation, value: string) {\n const query = evaluation === '==' ? 'equals' : '';\n // TODO(nontangent): 'ステータス'を修正\n return { property: 'ステータス', status: {[query]: value} };\n }\n \n static Relation(property: string, evaluation: Evaluation, value: string) {\n const query = evaluation === 'in' ? 'contains': '';\n return { property, relation: {[query]: value} };\n }\n}\n\nexport abstract class NotionBaseQuery {\n type!: 'and' | 'or' | 'filter' | 'sort';\n abstract build(): unknown;\n}\n\nexport class NotionFilter extends NotionBaseQuery {\n readonly type = 'filter' as const;\n\n constructor(\n public propertyType: any,\n public propertyName: string,\n public evaluation: Evaluation,\n public value: string | number,\n ) { super(); }\n\n build() {\n switch(this.propertyName) {\n case 'last_edited_time': return N.LastEditedTime(this.propertyName, this.evaluation, this.value);\n }\n\n switch(this.propertyType) {\n case 'rollup': return N.RollupPropQuery(this.propertyName, this.evaluation, this.value);\n case 'formula': return N.FormulaQuery(this.propertyName, this.evaluation, this.value);\n case 'status': return N.Status(this.propertyName, this.evaluation, this.value as string);\n case 'relation': return N.Relation(this.propertyName, this.evaluation, this.value as string);\n }\n }\n}\n\nexport class NotionSort extends NotionBaseQuery {\n readonly type = 'sort' as const;\n constructor(\n public property: string,\n public direction: 'asc' | 'desc' = 'asc',\n ) { super(); }\n\n build() {\n return {\n property: this.property,\n direction: this.direction === 'asc' ? 'ascending' : 'descending',\n };\n }\n}\n\nexport class NotionAnd extends NotionBaseQuery {\n readonly type = 'and' as const;\n arr: NotionFilter[];\n\n constructor(...filters: NotionFilter[]) {\n super();\n this.arr = filters;\n }\n\n build() {\n return {and: this.arr.map(filter => filter.build())};\n }\n}\n\nexport class NotionOr extends NotionBaseQuery {\n readonly type = 'or' as const;\n arr: NotionFilter[];\n\n constructor(...filters: NotionFilter[]) {\n super();\n this.arr = filters;\n }\n\n build() {\n return {or: this.arr.map(filter => filter.build())};\n }\n}\n\nexport const Query = <E = any>(Entity: E) => {\n const Filter = (_propName: string, evaluation: Evaluation, value: string | number): NotionFilter => {\n const annotation: NotionAnnotation = (Entity as Record<string, any>)[NOTION_ANNOTATIONS].find(({propName}: {propName: string}) => propName === _propName);\n\n // if(!annotation) {\n // throw new Error(`NotionFilter: ${Entity} does not have ${_propName}.`);\n // }\n\n return new NotionFilter(annotation?.type, annotation?.fieldName ?? _propName, evaluation, value);\n };\n const OrderBy = (_propName: string, direction: 'asc' | 'desc'): NotionSort => {\n const annotation: NotionAnnotation = (Entity as Record<string, any>)[NOTION_ANNOTATIONS].find(({propName}: {propName: string}) => propName === _propName);\n return new NotionSort(annotation?.fieldName ?? _propName, direction);\n };\n \n const And = (...args: NotionFilter[]): NotionAnd => new NotionAnd(...args);\n const Or = (...args: NotionFilter[]): NotionOr => new NotionOr(...args);\n\n return {Filter, OrderBy, And, Or};\n}\n","import { NotionBaseQuery } from \"../query\";\n\nexport class NotionQueryBuilder {\n constructor() { }\n\n build(filterQuery?: NotionBaseQuery, sortQuery?: NotionBaseQuery) {\n return {\n ...(filterQuery ? this.buildFilterQuery(filterQuery) : {}),\n ...(sortQuery ? this.buildSortQuery(sortQuery) : {}),\n }\n }\n\n protected buildSortQuery(query: NotionBaseQuery) {\n if (query.type === 'sort') {\n return { sorts: [query.build()]};\n } else {\n return {};\n }\n }\n\n protected buildFilterQuery(query: NotionBaseQuery) {\n if (query.type === 'filter') {\n return { filter: { and: [query.build()] } };\n } else if (['and', 'or'].includes(query.type)) {\n return { filter: query.build() };\n } else {\n return {};\n }\n }\n}\n","import { Client } from '@notionhq/client';\nimport { Entity } from '@nx-ddd/common/domain';\nimport { Repository } from '@nx-ddd/common/domain';\nimport { inject, Injectable, InjectionToken } from '@angular/core';\nimport { NotionConverter } from '../converter';\nimport { NotionBaseQuery } from '../query';\nimport { NotionQueryBuilder } from '../query-builder';\nimport { Observable } from 'rxjs';\n\nexport const NOTION_ACCESS_TOKEN = new InjectionToken<string>('[@nx-ddd/notion] Notion Access Token');\nexport const NOTION_DATABASE_ID = new InjectionToken('[@nx-ddd/notion] Notion Database Id');\n\nexport function provideNotionConfig(config: {accessToken: string}) {\n return { provide: NOTION_ACCESS_TOKEN, useValue: config.accessToken };\n}\n\n@Injectable()\nexport abstract class NotionRepository<E extends Entity & {id: string}> extends Repository<E> {\n protected abstract databaseId: string;\n protected abstract converter: NotionConverter<E>;\n\n protected token: string = inject(NOTION_ACCESS_TOKEN);\n protected client = new Client({auth: this.token});\n protected queryBuilder = new NotionQueryBuilder();\n protected get parent(): {type: 'database_id', database_id: string} {\n return { type: 'database_id', database_id: this.databaseId };\n }\n\n async query(\n filterQuery?: NotionBaseQuery, \n sortQuery?: NotionBaseQuery,\n startCursor?: string,\n pageSize?: number,\n ) {\n try {\n const obj = this.queryBuilder.build(filterQuery, sortQuery);\n const res = await this.client.databases.query({\n database_id: this.databaseId,\n ...obj as any,\n start_cursor: startCursor,\n page_size: pageSize,\n });\n return {\n results: res.results.map(result => this.converter.fromNotion(result)),\n nextCursor: res.next_cursor,\n hasMore: res.has_more,\n }\n } catch (error) {\n throw error;\n }\n }\n\n async queryV2(args?: any) {\n try {\n const res = await this.client.databases.query({\n database_id: this.databaseId,\n ...(args ?? {}),\n });\n return {\n results: res.results.map(result => this.converter.fromNotion(result)),\n nextCursor: res.next_cursor,\n hasMore: res.has_more,\n }\n } catch (error) {\n throw error;\n }\n }\n\n async list({\n batchSize = 100,\n }: {\n batchSize?: number,\n } = {}): Promise<E[]> {\n const items: E[] = [];\n let nextCursor: string | undefined = undefined;\n let pageCount = 0;\n\n console.log(`[NotionRepository] Starting pagination with batch size: ${batchSize}`);\n\n // eslint-disable-next-line no-constant-condition\n while(true) {\n pageCount++;\n const res = await this.query(undefined, undefined, nextCursor, batchSize);\n console.log(`[NotionRepository] Page ${pageCount}: Retrieved ${res.results.length} items, hasMore: ${res.hasMore}, nextCursor: ${res.nextCursor ? 'present' : 'null'}`);\n\n items.push(...res.results);\n nextCursor = res.nextCursor ?? undefined;\n \n if (!res.hasMore) {\n console.log(`[NotionRepository] Pagination complete. Total items: ${items.length} from ${pageCount} pages`);\n break;\n }\n }\n \n return items;\n }\n\n listChanges(): Observable<E[]> {\n throw new Error('NotionRepository.listChanges() is not implemented');\n }\n\n async get({id}: {id: string}): Promise<E> {\n const data = await this.client.pages.retrieve({page_id: id});\n return this.converter.fromNotion(data);\n }\n\n async create(entity: Omit<E, 'id' | 'createdAt' | 'updatedAt'> & Partial<Pick<E, 'id'>>): Promise<E> {\n try {\n const res = await this.client.pages.create({\n parent: this.parent,\n properties: {...this.converter.toNotion(entity as E)},\n }); \n return this.converter.fromNotion(res);\n } catch (error) {\n throw error;\n }\n }\n\n async createMany(data: Omit<E, 'id' | 'createdAt' | 'updatedAt'>[]): Promise<E[]> {\n throw new Error('NotionRepository.createMany() is not implemented');\n }\n\n async update(entity: Partial<E>) {\n const data = {\n page_id: (entity as any).id,\n properties: {...this.converter.toNotion(entity)},\n };\n await this.client.pages.update(data);\n }\n\n async save(data: Partial<E>): Promise<boolean | [E, boolean]> {\n throw new Error('NotionRepository.save() is not implemented');\n }\n\n async saveMany(entities: E[]): Promise<void> {\n throw new Error('NotionRepository.saveMany() is not implemented');\n }\n\n async updateMany(data: Partial<E>[]) {\n throw new Error('NotionRepository.updateMany() is not implemented');\n }\n\n async delete({id}: {id: string}) {\n throw new Error('NotionRepository.delete() is not implemented');\n }\n\n async deleteMany(params: { id: string; }[]): Promise<number> {\n throw new Error('NotionRepository.deleteMany() is not implemented');\n }\n\n async deleteAll(): Promise<void> {\n throw new Error('NotionRepository.deleteAll() is not implemented');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["toNotion.toNotionValue","toNotion.toNotionTitle","toNotion.toNotionStatus","toNotion.toNotionRelationMulti","toNotion.toNotionRelation","toNotion.toNotionRichText","toNotion.toNotionFormula","toNotion.toNotionRollup","toNotion.toNotionUrl","toNotion.toNotionDate","toNotion.toNotionSelect","toNotion.toNotionPhoneNumber","toNotion.toNotionNumber","toNotion.toNotionEmail","fromNotion.fromNotionValue","fromNotion.fromNotionTitle","fromNotion.fromNotionUrl","fromNotion.fromNotionRichText","fromNotion.fromNotionRelation","fromNotion.fromNotionRelationMulti","fromNotion.fromNotionStatus","fromNotion.fromNotionFormula","fromNotion.fromNotionRollup","fromNotion.fromNotionRollupMulti","fromNotion.fromNotionCreatedTime","fromNotion.fromNotionLastEditedTime","fromNotion.fromNotionDate","fromNotion.fromNotionNumber","fromNotion.fromNotionSelect","fromNotion.fromNotionPhoneNumber","fromNotion.fromNotionEmail","fromNotion.fromNotionUniqueID"],"mappings":";;;;;;;AAAA;;AAEG;;ACCH;;AAEG;AACG,SAAU,aAAa,CAAC,KAAU,EAAE,UAA4B,EAAA;AACpE,IAAA,QAAO,UAAU,CAAC,IAAI;QACpB,KAAK,OAAO,EAAE,OAAO,aAAa,CAAC,KAAK,CAAC;QACzC,KAAK,QAAQ,EAAE,OAAO,cAAc,CAAC,KAAK,CAAC;AAC3C,QAAA,KAAK,UAAU;AACb,YAAA,IAAK,UAAU,CAAC,OAAe,CAAC,KAAK,EAAE;AACrC,gBAAA,OAAO,qBAAqB,CAAC,KAAK,CAAC;YACrC;iBAAO;AACL,gBAAA,OAAO,gBAAgB,CAAC,KAAK,CAAC;YAChC;QACF,KAAK,SAAS,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC;QAC7C,KAAK,WAAW,EAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAChD,KAAK,QAAQ,EAAE,OAAO,cAAc,CAAC,KAAK,CAAC;QAC3C,KAAK,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAC;QACrC,KAAK,MAAM,EAAE,OAAO,YAAY,CAAC,KAAK,CAAC;QACvC,KAAK,QAAQ,EAAE,OAAO,cAAc,CAAC,KAAK,CAAC;QAC3C,KAAK,QAAQ,E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yB,EAAA;AACxC,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC;IACrE;AAEA,IAAA,MAAM,SAAS,GAAA;AACb,QAAA,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC;IACpE;uGAvIoB,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAhB,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBADrC;;;AChBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@nx-ddd/notion",
3
- "version": "19.34.0",
3
+ "version": "19.36.0",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@notionhq/client": "^2.2.2",
7
- "@nx-ddd/common": "19.34.0",
7
+ "@nx-ddd/common": "19.36.0",
8
8
  "dayjs": "1.11.13",
9
9
  "lodash-es": "^4.17.15",
10
10
  "@angular/core": "19.1.4",
@@ -12,7 +12,7 @@ declare class NotionHelper {
12
12
  static toNotion<E>(entity: Partial<E>, Entity: Type<E>): object;
13
13
  }
14
14
  declare abstract class NotionConverter<E> {
15
- protected abstract Entity: any;
15
+ protected abstract Entity: Type<E>;
16
16
  fromNotion(page: PageObjectResponse | PartialPageObjectResponse | PartialDatabaseObjectResponse | DatabaseObjectResponse): E;
17
17
  toNotion(entity: Partial<E>): object;
18
18
  }
@@ -21,32 +21,32 @@ declare function createConverter<E = any>(Entity: any): NotionConverter<E>;
21
21
  declare const NOTION_ANNOTATIONS = "notion_annotations";
22
22
  declare const NOTION_DATABASE_ANNOTATION = "notion_database_annotation";
23
23
  type NotionFieldType = 'title' | 'url' | 'rich_text' | 'relation' | 'status' | 'formula' | 'rollup' | 'timestamp' | 'number' | 'created_time' | 'last_edited_time' | 'date' | 'select' | 'phone_number' | 'email' | 'checkbox' | 'created_by' | 'files' | 'last_edited_by' | 'multi_select' | 'people' | 'unique_id';
24
- interface NotionAnnotation<T extends object = undefined> {
24
+ interface NotionAnnotation<T extends object = Record<string, never>> {
25
25
  type: NotionFieldType;
26
26
  fieldName: string;
27
27
  propName: string;
28
28
  options?: T;
29
29
  }
30
- declare const Title: (name?: string, options?: undefined) => (target: any, propName: string) => void;
31
- declare const Url: (name?: string, options?: undefined) => (target: any, propName: string) => void;
32
- declare const RichText: (name?: string, options?: undefined) => (target: any, propName: string) => void;
30
+ declare const Title: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
31
+ declare const Url: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
32
+ declare const RichText: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
33
33
  declare const Relation: (name?: string, options?: Partial<{
34
34
  multi: boolean;
35
- }>) => (target: any, propName: string) => void;
36
- declare const Status: (name?: string, options?: undefined) => (target: any, propName: string) => void;
37
- declare const Formula: (name?: string, options?: undefined) => (target: any, propName: string) => void;
35
+ }> | undefined) => (target: any, propName: string) => void;
36
+ declare const Status: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
37
+ declare const Formula: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
38
38
  declare const Rollup: (name?: string, options?: Partial<{
39
39
  multi: boolean;
40
- }>) => (target: any, propName: string) => void;
41
- declare const Timestamp: (name?: string, options?: undefined) => (target: any, propName: string) => void;
42
- declare const Number: (name?: string, options?: undefined) => (target: any, propName: string) => void;
43
- declare const CreatedTime: (name?: string, options?: undefined) => (target: any, propName: string) => void;
44
- declare const LastEditedTime: (name?: string, options?: undefined) => (target: any, propName: string) => void;
45
- declare const Date$1: (name?: string, options?: undefined) => (target: any, propName: string) => void;
46
- declare const Select: (name?: string, options?: undefined) => (target: any, propName: string) => void;
47
- declare const PhoneNumber: (name?: string, options?: undefined) => (target: any, propName: string) => void;
48
- declare const Email: (name?: string, options?: undefined) => (target: any, propName: string) => void;
49
- declare const UniqueID: (name?: string, options?: undefined) => (target: any, propName: string) => void;
40
+ }> | undefined) => (target: any, propName: string) => void;
41
+ declare const Timestamp: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
42
+ declare const Number: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
43
+ declare const CreatedTime: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
44
+ declare const LastEditedTime: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
45
+ declare const Date$1: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
46
+ declare const Select: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
47
+ declare const PhoneNumber: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
48
+ declare const Email: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
49
+ declare const UniqueID: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
50
50
  /**
51
51
  * Class decorator to specify Notion database ID
52
52
  * @param databaseId - The Notion database ID
@@ -60,26 +60,26 @@ declare function Database(databaseId: string): (target: any) => void;
60
60
  declare function getDatabaseId(target: any): string | undefined;
61
61
  declare const Notion: {
62
62
  Database: typeof Database;
63
- Title: (name?: string, options?: undefined) => (target: any, propName: string) => void;
64
- Url: (name?: string, options?: undefined) => (target: any, propName: string) => void;
65
- RichText: (name?: string, options?: undefined) => (target: any, propName: string) => void;
63
+ Title: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
64
+ Url: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
65
+ RichText: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
66
66
  Relation: (name?: string, options?: Partial<{
67
67
  multi: boolean;
68
- }>) => (target: any, propName: string) => void;
69
- Status: (name?: string, options?: undefined) => (target: any, propName: string) => void;
70
- Formula: (name?: string, options?: undefined) => (target: any, propName: string) => void;
68
+ }> | undefined) => (target: any, propName: string) => void;
69
+ Status: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
70
+ Formula: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
71
71
  Rollup: (name?: string, options?: Partial<{
72
72
  multi: boolean;
73
- }>) => (target: any, propName: string) => void;
74
- Timestamp: (name?: string, options?: undefined) => (target: any, propName: string) => void;
75
- Number: (name?: string, options?: undefined) => (target: any, propName: string) => void;
76
- CreatedTime: (name?: string, options?: undefined) => (target: any, propName: string) => void;
77
- LastEditedTime: (name?: string, options?: undefined) => (target: any, propName: string) => void;
78
- Date: (name?: string, options?: undefined) => (target: any, propName: string) => void;
79
- Select: (name?: string, options?: undefined) => (target: any, propName: string) => void;
80
- PhoneNumber: (name?: string, options?: undefined) => (target: any, propName: string) => void;
81
- Email: (name?: string, options?: undefined) => (target: any, propName: string) => void;
82
- UniqueID: (name?: string, options?: undefined) => (target: any, propName: string) => void;
73
+ }> | undefined) => (target: any, propName: string) => void;
74
+ Timestamp: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
75
+ Number: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
76
+ CreatedTime: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
77
+ LastEditedTime: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
78
+ Date: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
79
+ Select: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
80
+ PhoneNumber: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
81
+ Email: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
82
+ UniqueID: (name?: string, options?: Partial<Record<string, never>> | undefined) => (target: any, propName: string) => void;
83
83
  };
84
84
 
85
85
  declare class NotionService {
@@ -103,7 +103,7 @@ interface NotionConfig {
103
103
  }
104
104
  declare const NOTION_SERVICE: InjectionToken<NotionService>;
105
105
  declare const NOTION_CONFIG: InjectionToken<NotionConfig>;
106
- declare function injectNotion(): NotionService;
106
+ declare function injectNotion(): NotionService | null;
107
107
 
108
108
  type Evaluation = '==' | '>' | '>=' | '<' | '<=' | '!=' | 'in';
109
109
  declare class N {
@@ -148,7 +148,7 @@ declare class N {
148
148
  }
149
149
  declare abstract class NotionBaseQuery {
150
150
  type: 'and' | 'or' | 'filter' | 'sort';
151
- abstract build(): any;
151
+ abstract build(): unknown;
152
152
  }
153
153
  declare class NotionFilter extends NotionBaseQuery {
154
154
  propertyType: any;
@@ -184,7 +184,7 @@ declare class NotionFilter extends NotionBaseQuery {
184
184
  relation: {
185
185
  [x: string]: string;
186
186
  };
187
- };
187
+ } | undefined;
188
188
  }
189
189
  declare class NotionSort extends NotionBaseQuery {
190
190
  property: string;
@@ -228,7 +228,7 @@ declare class NotionAnd extends NotionBaseQuery {
228
228
  relation: {
229
229
  [x: string]: string;
230
230
  };
231
- })[];
231
+ } | undefined)[];
232
232
  };
233
233
  }
234
234
  declare class NotionOr extends NotionBaseQuery {
@@ -263,7 +263,7 @@ declare class NotionOr extends NotionBaseQuery {
263
263
  relation: {
264
264
  [x: string]: string;
265
265
  };
266
- })[];
266
+ } | undefined)[];
267
267
  };
268
268
  }
269
269
  declare const Query: <E = any>(Entity: E) => {
@@ -276,25 +276,25 @@ declare const Query: <E = any>(Entity: E) => {
276
276
  declare class NotionQueryBuilder {
277
277
  constructor();
278
278
  build(filterQuery?: NotionBaseQuery, sortQuery?: NotionBaseQuery): {
279
- sorts: any[];
280
- filter: any;
279
+ sorts: unknown[];
280
+ filter: unknown;
281
281
  } | {
282
282
  sorts?: undefined;
283
- filter: any;
283
+ filter: unknown;
284
284
  } | {
285
- sorts: any[];
285
+ sorts: unknown[];
286
286
  filter?: undefined;
287
287
  } | {
288
288
  sorts?: undefined;
289
289
  filter?: undefined;
290
290
  };
291
291
  protected buildSortQuery(query: NotionBaseQuery): {
292
- sorts: any[];
292
+ sorts: unknown[];
293
293
  } | {
294
294
  sorts?: undefined;
295
295
  };
296
296
  protected buildFilterQuery(query: NotionBaseQuery): {
297
- filter: any;
297
+ filter: unknown;
298
298
  } | {
299
299
  filter?: undefined;
300
300
  };
@@ -308,7 +308,9 @@ declare function provideNotionConfig(config: {
308
308
  provide: InjectionToken<string>;
309
309
  useValue: string;
310
310
  };
311
- declare abstract class NotionRepository<E extends Entity> extends Repository<E> {
311
+ declare abstract class NotionRepository<E extends Entity & {
312
+ id: string;
313
+ }> extends Repository<E> {
312
314
  protected abstract databaseId: string;
313
315
  protected abstract converter: NotionConverter<E>;
314
316
  protected token: string;
@@ -320,12 +322,12 @@ declare abstract class NotionRepository<E extends Entity> extends Repository<E>
320
322
  };
321
323
  query(filterQuery?: NotionBaseQuery, sortQuery?: NotionBaseQuery, startCursor?: string, pageSize?: number): Promise<{
322
324
  results: E[];
323
- nextCursor: string;
325
+ nextCursor: string | null;
324
326
  hasMore: boolean;
325
327
  }>;
326
328
  queryV2(args?: any): Promise<{
327
329
  results: E[];
328
- nextCursor: string;
330
+ nextCursor: string | null;
329
331
  hasMore: boolean;
330
332
  }>;
331
333
  list({ batchSize, }?: {
@@ -531,25 +533,25 @@ declare function toNotionTitle(value: string): {
531
533
  content: string;
532
534
  };
533
535
  }[];
534
- };
536
+ } | undefined;
535
537
  declare function toNotionStatus(value: string): {
536
538
  type: string;
537
539
  status: {
538
540
  name: string;
539
541
  };
540
- };
542
+ } | undefined;
541
543
  declare function toNotionRelationMulti(ids: string[]): {
542
544
  type: string;
543
545
  relation: {
544
546
  id: string;
545
547
  }[];
546
- };
548
+ } | undefined;
547
549
  declare function toNotionRelation(value: string): {
548
550
  type: string;
549
551
  relation: {
550
552
  id: string;
551
553
  }[];
552
- };
554
+ } | undefined;
553
555
  declare function toNotionRichText(text?: string): {
554
556
  type: string;
555
557
  rich_text: {
@@ -557,49 +559,49 @@ declare function toNotionRichText(text?: string): {
557
559
  content: string;
558
560
  };
559
561
  }[];
560
- };
562
+ } | undefined;
561
563
  declare function toNotionFormula(value: string): void;
562
564
  declare function toNotionRollup(value: string): void;
563
565
  declare function toNotionUrl(value: string): {
564
566
  type: string;
565
567
  url: string;
566
- };
568
+ } | undefined;
567
569
  declare function toNotionDate(value: Date): {
568
570
  type: string;
569
571
  date: {
570
572
  start: string;
571
573
  };
572
- };
574
+ } | undefined;
573
575
  declare function toNotionSelect(value: string): {
574
576
  type: string;
575
577
  select: {
576
578
  name: string;
577
579
  };
578
- };
580
+ } | undefined;
579
581
  declare function toNotionPhoneNumber(value: string): {
580
582
  type: string;
581
583
  phone_number: string;
582
- };
584
+ } | undefined;
583
585
  declare function toNotionNumber(value: number): {
584
586
  type: string;
585
587
  number: number;
586
- };
588
+ } | undefined;
587
589
  declare function toNotionEmail(value: string): {
588
590
  type: string;
589
591
  email: string;
590
- };
592
+ } | undefined;
591
593
 
592
594
  /**
593
595
  * Converts a Notion API value to its JavaScript representation
594
596
  */
595
- declare function fromNotionValue(value: NotionValue, annotation: NotionAnnotation): string | number | string[] | Date | dayjs.Dayjs | number[];
597
+ declare function fromNotionValue(value: NotionValue, annotation: NotionAnnotation): string | number | string[] | Date | dayjs.Dayjs | number[] | null;
596
598
  declare function fromNotionTitle(notionTitle: NotionTitle): string;
597
599
  declare function fromNotionUrl(notionUrl: NotionUrl): string | null;
598
600
  declare function fromNotionRichText(notionRichText: NotionRichText): string | null;
599
601
  declare function fromNotionRelation(notionRelation: NotionRelation): string | null;
600
602
  declare function fromNotionRelationMulti(notionRelation: NotionRelation): string[];
601
603
  declare function fromNotionStatus(notionStatus: NotionStatus): string | null;
602
- declare function fromNotionFormula(notionFormula: NotionFormula): string | number | Date;
604
+ declare function fromNotionFormula(notionFormula: NotionFormula): string | number | Date | null;
603
605
  declare function fromNotionRollup(notionRollup: NotionRollup): string | number;
604
606
  declare function fromNotionRollupMulti(notionRollup: NotionRollup): string[] | number[];
605
607
  declare function fromNotionCreatedTime(notionCreatedTime: NotionCreatedTime): dayjs.Dayjs;
@@ -1 +1 @@
1
- {"version":3,"file":"nx-ddd-notion.d.ts","sources":["../../../../../packages/@nx-ddd/notion/src/lib/converter/converter.ts","../../../../../packages/@nx-ddd/notion/src/lib/decorators/decorators.ts","../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.impl.ts","../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.ts","../../../../../packages/@nx-ddd/notion/src/lib/query/query.ts","../../../../../packages/@nx-ddd/notion/src/lib/query-builder/query-builder.ts","../../../../../packages/@nx-ddd/notion/src/lib/repository/repository.ts","../../../../../packages/@nx-ddd/notion/src/lib/types.ts","../../../../../packages/@nx-ddd/notion/src/lib/to-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/from-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/utils.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;AAMA;;AAeE;AAQD;AAED;AACE;;;AASD;AAED;;AC3CA;AACA;AACM;;;;;;AAUL;AAaD;AACA;AACA;AACA;;AAZY;AAaZ;AACA;AACA;;AAfY;AAgBZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;AAGG;AACH;AAMA;;;;AAIG;AACH;AAIA;;AArDiB;AAAA;AAAA;;;;AAAA;AAAA;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+CjB;;;;;AAYQ;;;AAqBA;;AAgBA;;;;AAaP;;;;ACvHA;AAED;AACA;AAEA;;ACPA;AAEA;AACE;;;;;;;;;;AAIA;;;;AAIA;;;;;;AAUA;;;;;;AAUA;;;;;;AAMA;;;;;;AAID;AAED;;AAEE;AACD;AAED;AAIW;AACA;AACA;;AALT;AAGS;;;;;;;;;;;;;;;;;;;;;;;;;;;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/@nx-ddd/notion/src/lib/converter/converter.ts","../../../../../packages/@nx-ddd/notion/src/lib/decorators/decorators.ts","../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.impl.ts","../../../../../packages/@nx-ddd/notion/src/lib/notion/notion.service.ts","../../../../../packages/@nx-ddd/notion/src/lib/query/query.ts","../../../../../packages/@nx-ddd/notion/src/lib/query-builder/query-builder.ts","../../../../../packages/@nx-ddd/notion/src/lib/repository/repository.ts","../../../../../packages/@nx-ddd/notion/src/lib/types.ts","../../../../../packages/@nx-ddd/notion/src/lib/to-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/from-notion.ts","../../../../../packages/@nx-ddd/notion/src/lib/utils.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;AAMA;;AAeE;AAQD;AAED;;;;AAUC;AAED;;AC3CA;AACA;AACM;AAKA;;;;;AAKL;AAaD;AACA;AACA;AACA;;AAZY;AAaZ;AACA;AACA;;AAfY;AAgBZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;AAGG;AACH;AAMA;;;;AAIG;AACH;AAIA;;AArDiB;AAAA;AAAA;;;;AAAA;AAAA;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiDjB;;;;;AAYQ;;;AAqBA;;AAgBA;;;;AAaP;;;;ACzHA;AAED;AACA;AAEA;;ACPA;AAEA;AACE;;;;;;;;;;AAIA;;;;AAIA;;;;;;AAUA;;;;;;AAUA;;;;;;AAMA;;;;;;AAID;AAED;;;AAGC;AAED;AAIW;AACA;AACA;;AALT;AAGS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBV;AAED;AAGW;;AAFT;AAES;;;;;AAUV;AAED;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWD;AAED;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWD;AAED;AAC6B;AASC;;;;;AC9H9B;;;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