@growi/core 1.2.0 → 1.3.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.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./consts/accepted-upload-file-type.cjs"),c=require("./consts/growi-plugin.cjs"),l=require("./consts/ydoc-status.cjs"),u=require("./interfaces/color-scheme.cjs"),r=require("./interfaces/common.cjs"),g=require("./interfaces/external-account.cjs"),o=require("./interfaces/growi-theme-metadata.cjs"),t=require("./interfaces/lang.cjs"),i=require("./interfaces/locale.cjs"),e=require("./interfaces/page.cjs"),a=require("./interfaces/revision.cjs"),n=require("./interfaces/subscription.cjs"),p=require("./interfaces/user.cjs");exports.AcceptedUploadFileType=s.AcceptedUploadFileType;exports.GrowiPluginType=c.GrowiPluginType;exports.YDocStatus=l.YDocStatus;exports.ColorScheme=u.ColorScheme;exports.getIdForRef=r.getIdForRef;exports.getIdStringForRef=r.getIdStringForRef;exports.isPopulated=r.isPopulated;exports.isRef=r.isRef;exports.IExternalAuthProviderType=g.IExternalAuthProviderType;exports.GrowiThemeSchemeType=o.GrowiThemeSchemeType;exports.isGrowiThemeMetadata=o.isGrowiThemeMetadata;exports.AllLang=t.AllLang;exports.Lang=t.Lang;exports.AllLocale=i.AllLocale;exports.Locale=i.Locale;exports.GroupType=e.GroupType;exports.PageGrant=e.PageGrant;exports.PageStatus=e.PageStatus;exports.isIPageInfoForEntity=e.isIPageInfoForEntity;exports.isIPageInfoForListing=e.isIPageInfoForListing;exports.isIPageInfoForOperation=e.isIPageInfoForOperation;exports.Origin=a.Origin;exports.allOrigin=a.allOrigin;exports.AllSubscriptionStatusType=n.AllSubscriptionStatusType;exports.SubscriptionStatusType=n.SubscriptionStatusType;exports.USER_STATUS=p.USER_STATUS;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./consts/accepted-upload-file-type.cjs"),s=require("./consts/growi-plugin.cjs"),u=require("./consts/ydoc-status.cjs"),c=require("./interfaces/color-scheme.cjs"),i=require("./interfaces/common.cjs"),g=require("./interfaces/external-account.cjs"),r=require("./interfaces/growi-theme-metadata.cjs"),t=require("./interfaces/lang.cjs"),e=require("./interfaces/page.cjs"),o=require("./interfaces/revision.cjs"),n=require("./interfaces/subscription.cjs"),p=require("./interfaces/user.cjs");exports.AcceptedUploadFileType=a.AcceptedUploadFileType;exports.GrowiPluginType=s.GrowiPluginType;exports.YDocStatus=u.YDocStatus;exports.ColorScheme=c.ColorScheme;exports.getIdForRef=i.getIdForRef;exports.getIdStringForRef=i.getIdStringForRef;exports.isPopulated=i.isPopulated;exports.isRef=i.isRef;exports.IExternalAuthProviderType=g.IExternalAuthProviderType;exports.GrowiThemeSchemeType=r.GrowiThemeSchemeType;exports.isGrowiThemeMetadata=r.isGrowiThemeMetadata;exports.AllLang=t.AllLang;exports.Lang=t.Lang;exports.GroupType=e.GroupType;exports.PageGrant=e.PageGrant;exports.PageStatus=e.PageStatus;exports.isIPageInfo=e.isIPageInfo;exports.isIPageInfoForEntity=e.isIPageInfoForEntity;exports.isIPageInfoForListing=e.isIPageInfoForListing;exports.isIPageInfoForOperation=e.isIPageInfoForOperation;exports.Origin=o.Origin;exports.allOrigin=o.allOrigin;exports.AllSubscriptionStatusType=n.AllSubscriptionStatusType;exports.SubscriptionStatusType=n.SubscriptionStatusType;exports.USER_STATUS=p.USER_STATUS;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,42 +1,40 @@
1
1
  import { AcceptedUploadFileType as r } from "./consts/accepted-upload-file-type.js";
2
- import { GrowiPluginType as p } from "./consts/growi-plugin.js";
2
+ import { GrowiPluginType as i } from "./consts/growi-plugin.js";
3
3
  import { YDocStatus as a } from "./consts/ydoc-status.js";
4
- import { ColorScheme as m } from "./interfaces/color-scheme.js";
5
- import { getIdForRef as n, getIdStringForRef as g, isPopulated as x, isRef as s } from "./interfaces/common.js";
6
- import { IExternalAuthProviderType as T } from "./interfaces/external-account.js";
7
- import { GrowiThemeSchemeType as c, isGrowiThemeMetadata as I } from "./interfaces/growi-theme-metadata.js";
8
- import { AllLang as P, Lang as d } from "./interfaces/lang.js";
9
- import { AllLocale as F, Locale as h } from "./interfaces/locale.js";
10
- import { GroupType as L, PageGrant as R, PageStatus as w, isIPageInfoForEntity as E, isIPageInfoForListing as O, isIPageInfoForOperation as U } from "./interfaces/page.js";
11
- import { Origin as v, allOrigin as C } from "./interfaces/revision.js";
12
- import { AllSubscriptionStatusType as M, SubscriptionStatusType as Y } from "./interfaces/subscription.js";
13
- import { USER_STATUS as j } from "./interfaces/user.js";
4
+ import { ColorScheme as n } from "./interfaces/color-scheme.js";
5
+ import { getIdForRef as g, getIdStringForRef as s, isPopulated as x, isRef as l } from "./interfaces/common.js";
6
+ import { IExternalAuthProviderType as I } from "./interfaces/external-account.js";
7
+ import { GrowiThemeSchemeType as u, isGrowiThemeMetadata as P } from "./interfaces/growi-theme-metadata.js";
8
+ import { AllLang as c, Lang as d } from "./interfaces/lang.js";
9
+ import { GroupType as h, PageGrant as A, PageStatus as G, isIPageInfo as R, isIPageInfoForEntity as w, isIPageInfoForListing as E, isIPageInfoForOperation as L } from "./interfaces/page.js";
10
+ import { Origin as U, allOrigin as b } from "./interfaces/revision.js";
11
+ import { AllSubscriptionStatusType as C, SubscriptionStatusType as D } from "./interfaces/subscription.js";
12
+ import { USER_STATUS as Y } from "./interfaces/user.js";
14
13
  export {
15
14
  r as AcceptedUploadFileType,
16
- P as AllLang,
17
- F as AllLocale,
18
- M as AllSubscriptionStatusType,
19
- m as ColorScheme,
20
- L as GroupType,
21
- p as GrowiPluginType,
22
- c as GrowiThemeSchemeType,
23
- T as IExternalAuthProviderType,
15
+ c as AllLang,
16
+ C as AllSubscriptionStatusType,
17
+ n as ColorScheme,
18
+ h as GroupType,
19
+ i as GrowiPluginType,
20
+ u as GrowiThemeSchemeType,
21
+ I as IExternalAuthProviderType,
24
22
  d as Lang,
25
- h as Locale,
26
- v as Origin,
27
- R as PageGrant,
28
- w as PageStatus,
29
- Y as SubscriptionStatusType,
30
- j as USER_STATUS,
23
+ U as Origin,
24
+ A as PageGrant,
25
+ G as PageStatus,
26
+ D as SubscriptionStatusType,
27
+ Y as USER_STATUS,
31
28
  a as YDocStatus,
32
- C as allOrigin,
33
- n as getIdForRef,
34
- g as getIdStringForRef,
35
- I as isGrowiThemeMetadata,
36
- E as isIPageInfoForEntity,
37
- O as isIPageInfoForListing,
38
- U as isIPageInfoForOperation,
29
+ b as allOrigin,
30
+ g as getIdForRef,
31
+ s as getIdStringForRef,
32
+ P as isGrowiThemeMetadata,
33
+ R as isIPageInfo,
34
+ w as isIPageInfoForEntity,
35
+ E as isIPageInfoForListing,
36
+ L as isIPageInfoForOperation,
39
37
  x as isPopulated,
40
- s as isRef
38
+ l as isRef
41
39
  };
42
40
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./color-scheme.cjs"),r=require("./common.cjs"),l=require("./external-account.cjs"),o=require("./growi-theme-metadata.cjs"),t=require("./lang.cjs"),i=require("./locale.cjs"),e=require("./page.cjs"),a=require("./revision.cjs"),n=require("./subscription.cjs"),u=require("./user.cjs");exports.ColorScheme=s.ColorScheme;exports.getIdForRef=r.getIdForRef;exports.getIdStringForRef=r.getIdStringForRef;exports.isPopulated=r.isPopulated;exports.isRef=r.isRef;exports.IExternalAuthProviderType=l.IExternalAuthProviderType;exports.GrowiThemeSchemeType=o.GrowiThemeSchemeType;exports.isGrowiThemeMetadata=o.isGrowiThemeMetadata;exports.AllLang=t.AllLang;exports.Lang=t.Lang;exports.AllLocale=i.AllLocale;exports.Locale=i.Locale;exports.GroupType=e.GroupType;exports.PageGrant=e.PageGrant;exports.PageStatus=e.PageStatus;exports.isIPageInfoForEntity=e.isIPageInfoForEntity;exports.isIPageInfoForListing=e.isIPageInfoForListing;exports.isIPageInfoForOperation=e.isIPageInfoForOperation;exports.Origin=a.Origin;exports.allOrigin=a.allOrigin;exports.AllSubscriptionStatusType=n.AllSubscriptionStatusType;exports.SubscriptionStatusType=n.SubscriptionStatusType;exports.USER_STATUS=u.USER_STATUS;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./color-scheme.cjs"),r=require("./common.cjs"),s=require("./external-account.cjs"),i=require("./growi-theme-metadata.cjs"),t=require("./lang.cjs"),e=require("./page.cjs"),o=require("./revision.cjs"),n=require("./subscription.cjs"),g=require("./user.cjs");exports.ColorScheme=a.ColorScheme;exports.getIdForRef=r.getIdForRef;exports.getIdStringForRef=r.getIdStringForRef;exports.isPopulated=r.isPopulated;exports.isRef=r.isRef;exports.IExternalAuthProviderType=s.IExternalAuthProviderType;exports.GrowiThemeSchemeType=i.GrowiThemeSchemeType;exports.isGrowiThemeMetadata=i.isGrowiThemeMetadata;exports.AllLang=t.AllLang;exports.Lang=t.Lang;exports.GroupType=e.GroupType;exports.PageGrant=e.PageGrant;exports.PageStatus=e.PageStatus;exports.isIPageInfo=e.isIPageInfo;exports.isIPageInfoForEntity=e.isIPageInfoForEntity;exports.isIPageInfoForListing=e.isIPageInfoForListing;exports.isIPageInfoForOperation=e.isIPageInfoForOperation;exports.Origin=o.Origin;exports.allOrigin=o.allOrigin;exports.AllSubscriptionStatusType=n.AllSubscriptionStatusType;exports.SubscriptionStatusType=n.SubscriptionStatusType;exports.USER_STATUS=g.USER_STATUS;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,35 +1,33 @@
1
1
  import { ColorScheme as r } from "./color-scheme.js";
2
2
  import { getIdForRef as i, getIdStringForRef as a, isPopulated as p, isRef as f } from "./common.js";
3
- import { IExternalAuthProviderType as m } from "./external-account.js";
4
- import { GrowiThemeSchemeType as l, isGrowiThemeMetadata as s } from "./growi-theme-metadata.js";
5
- import { AllLang as S, Lang as I } from "./lang.js";
6
- import { AllLocale as u, Locale as P } from "./locale.js";
7
- import { GroupType as y, PageGrant as d, PageStatus as h, isIPageInfoForEntity as A, isIPageInfoForListing as F, isIPageInfoForOperation as L } from "./page.js";
8
- import { Origin as R, allOrigin as E } from "./revision.js";
9
- import { AllSubscriptionStatusType as b, SubscriptionStatusType as w } from "./subscription.js";
10
- import { USER_STATUS as v } from "./user.js";
3
+ import { IExternalAuthProviderType as g } from "./external-account.js";
4
+ import { GrowiThemeSchemeType as s, isGrowiThemeMetadata as I } from "./growi-theme-metadata.js";
5
+ import { AllLang as x, Lang as l } from "./lang.js";
6
+ import { GroupType as u, PageGrant as P, PageStatus as y, isIPageInfo as d, isIPageInfoForEntity as h, isIPageInfoForListing as F, isIPageInfoForOperation as c } from "./page.js";
7
+ import { Origin as G, allOrigin as R } from "./revision.js";
8
+ import { AllSubscriptionStatusType as L, SubscriptionStatusType as O } from "./subscription.js";
9
+ import { USER_STATUS as w } from "./user.js";
11
10
  export {
12
- S as AllLang,
13
- u as AllLocale,
14
- b as AllSubscriptionStatusType,
11
+ x as AllLang,
12
+ L as AllSubscriptionStatusType,
15
13
  r as ColorScheme,
16
- y as GroupType,
17
- l as GrowiThemeSchemeType,
18
- m as IExternalAuthProviderType,
19
- I as Lang,
20
- P as Locale,
21
- R as Origin,
22
- d as PageGrant,
23
- h as PageStatus,
24
- w as SubscriptionStatusType,
25
- v as USER_STATUS,
26
- E as allOrigin,
14
+ u as GroupType,
15
+ s as GrowiThemeSchemeType,
16
+ g as IExternalAuthProviderType,
17
+ l as Lang,
18
+ G as Origin,
19
+ P as PageGrant,
20
+ y as PageStatus,
21
+ O as SubscriptionStatusType,
22
+ w as USER_STATUS,
23
+ R as allOrigin,
27
24
  i as getIdForRef,
28
25
  a as getIdStringForRef,
29
- s as isGrowiThemeMetadata,
30
- A as isIPageInfoForEntity,
26
+ I as isGrowiThemeMetadata,
27
+ d as isIPageInfo,
28
+ h as isIPageInfoForEntity,
31
29
  F as isIPageInfoForListing,
32
- L as isIPageInfoForOperation,
30
+ c as isIPageInfoForOperation,
33
31
  p as isPopulated,
34
32
  f as isRef
35
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={"en-US":"en-US","ja-JP":"ja-JP","zh-CN":"zh-CN","fr-FR":"fr-FR"},l=Object.values(e);exports.AllLocale=l;exports.Locale=e;
1
+ "use strict";
2
2
  //# sourceMappingURL=locale.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"locale.cjs","sources":["../../src/interfaces/locale.ts"],"sourcesContent":["export const Locale = {\n 'en-US': 'en-US',\n 'ja-JP': 'ja-JP',\n 'zh-CN': 'zh-CN',\n 'fr-FR': 'fr-FR',\n} as const;\nexport const AllLocale = Object.values(Locale);\nexport type Locale = typeof Locale[keyof typeof Locale];\n"],"names":["Locale","AllLocale"],"mappings":"gFAAO,MAAMA,EAAS,CACpB,QAAS,QACT,QAAS,QACT,QAAS,QACT,QAAS,OACX,EACaC,EAAY,OAAO,OAAOD,CAAM"}
1
+ {"version":3,"file":"locale.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,8 +1 @@
1
- export declare const Locale: {
2
- readonly 'en-US': "en-US";
3
- readonly 'ja-JP': "ja-JP";
4
- readonly 'zh-CN': "zh-CN";
5
- readonly 'fr-FR': "fr-FR";
6
- };
7
- export declare const AllLocale: ("en-US" | "ja-JP" | "zh-CN" | "fr-FR")[];
8
- export type Locale = typeof Locale[keyof typeof Locale];
1
+ export type Locale = 'en-US' | 'ja-JP' | 'zh-CN' | 'fr-FR';
@@ -1,11 +1,2 @@
1
- const e = {
2
- "en-US": "en-US",
3
- "ja-JP": "ja-JP",
4
- "zh-CN": "zh-CN",
5
- "fr-FR": "fr-FR"
6
- }, a = Object.values(e);
7
- export {
8
- a as AllLocale,
9
- e as Locale
10
- };
1
+
11
2
  //# sourceMappingURL=locale.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"locale.js","sources":["../../src/interfaces/locale.ts"],"sourcesContent":["export const Locale = {\n 'en-US': 'en-US',\n 'ja-JP': 'ja-JP',\n 'zh-CN': 'zh-CN',\n 'fr-FR': 'fr-FR',\n} as const;\nexport const AllLocale = Object.values(Locale);\nexport type Locale = typeof Locale[keyof typeof Locale];\n"],"names":["Locale","AllLocale"],"mappings":"AAAO,MAAMA,IAAS;AAAA,EACpB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,GACaC,IAAY,OAAO,OAAOD,CAAM;"}
1
+ {"version":3,"file":"locale.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i={userGroup:"UserGroup",externalUserGroup:"ExternalUserGroup"},s={GRANT_PUBLIC:1,GRANT_RESTRICTED:2,GRANT_SPECIFIED:3,GRANT_OWNER:4,GRANT_USER_GROUP:5},e={STATUS_PUBLISHED:"published",STATUS_DELETED:"deleted"},r=t=>t!=null&&t instanceof Object&&"isEmpty"in t&&t.isEmpty===!1,n=t=>t!=null&&r(t)&&("isBookmarked"in t||"isLiked"in t||"subscriptionStatus"in t),o=t=>t!=null&&r(t)&&"revisionShortBody"in t;exports.GroupType=i;exports.PageGrant=s;exports.PageStatus=e;exports.isIPageInfoForEntity=r;exports.isIPageInfoForListing=o;exports.isIPageInfoForOperation=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={userGroup:"UserGroup",externalUserGroup:"ExternalUserGroup"},i={GRANT_PUBLIC:1,GRANT_RESTRICTED:2,GRANT_SPECIFIED:3,GRANT_OWNER:4,GRANT_USER_GROUP:5},n={STATUS_PUBLISHED:"published",STATUS_DELETED:"deleted"},e=t=>t!=null&&t instanceof Object&&"isEmpty"in t,r=t=>e(t)&&t.isEmpty===!1,o=t=>r(t)&&("isBookmarked"in t||"isLiked"in t||"subscriptionStatus"in t),u=t=>r(t)&&"revisionShortBody"in t;exports.GroupType=s;exports.PageGrant=i;exports.PageStatus=n;exports.isIPageInfo=e;exports.isIPageInfoForEntity=r;exports.isIPageInfoForListing=u;exports.isIPageInfoForOperation=o;
2
2
  //# sourceMappingURL=page.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"page.cjs","sources":["../../src/interfaces/page.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IRevision, HasRevisionShortbody, IRevisionHasId } from './revision';\nimport type { SubscriptionStatusType } from './subscription';\nimport type { ITag } from './tag';\nimport type {\n IUser, IUserGroup, IUserGroupHasId, IUserHasId,\n} from './user';\n\nexport const GroupType = { userGroup: 'UserGroup', externalUserGroup: 'ExternalUserGroup' } as const;\nexport type GroupType = typeof GroupType[keyof typeof GroupType];\n\nexport type IGrantedGroup = {\n type: GroupType,\n item: Ref<IUserGroup>,\n}\n\nexport type IPage = {\n path: string,\n status: string,\n revision?: Ref<IRevision>,\n tags: Ref<ITag>[],\n creator?: Ref<IUser>,\n createdAt: Date,\n updatedAt: Date,\n seenUsers: Ref<IUser>[],\n parent: Ref<IPage> | null,\n descendantCount: number,\n isEmpty: boolean,\n grant: PageGrant,\n grantedUsers: Ref<IUser>[],\n grantedGroups: IGrantedGroup[],\n lastUpdateUser?: Ref<IUser>,\n liker: Ref<IUser>[],\n commentCount: number\n slackChannels: string,\n deleteUser: Ref<IUser>,\n deletedAt: Date,\n latestRevision?: Ref<IRevision>,\n latestRevisionBodyLength?: number,\n expandContentWidth?: boolean,\n wip?: boolean,\n ttlTimestamp?: Date\n}\n\nexport type IPagePopulatedToShowRevision = Omit<IPageHasId, 'lastUpdateUser'|'creator'|'deleteUser'|'grantedGroups'|'revision'|'author'> & {\n lastUpdateUser?: IUserHasId,\n creator?: IUserHasId,\n deleteUser: IUserHasId,\n grantedGroups: { type: GroupType, item: IUserGroupHasId }[],\n revision?: IRevisionHasId,\n author: IUserHasId,\n}\n\nexport const PageGrant = {\n GRANT_PUBLIC: 1,\n GRANT_RESTRICTED: 2,\n GRANT_SPECIFIED: 3, // DEPRECATED\n GRANT_OWNER: 4,\n GRANT_USER_GROUP: 5,\n} as const;\ntype UnionPageGrantKeys = keyof typeof PageGrant;\nexport type PageGrant = typeof PageGrant[UnionPageGrantKeys];\n\nexport const PageStatus = {\n STATUS_PUBLISHED: 'published',\n STATUS_DELETED: 'deleted',\n} as const;\nexport type PageStatus = typeof PageStatus[keyof typeof PageStatus];\n\nexport type IPageHasId = IPage & HasObjectId;\n\nexport type IPageInfo = {\n isV5Compatible: boolean,\n isEmpty: boolean,\n isMovable: boolean,\n isDeletable: boolean,\n isAbleToDeleteCompletely: boolean,\n isRevertible: boolean,\n}\n\nexport type IPageInfoForEntity = IPageInfo & {\n bookmarkCount: number,\n sumOfLikers: number,\n likerIds: string[],\n sumOfSeenUsers: number,\n seenUserIds: string[],\n contentAge: number,\n descendantCount: number,\n commentCount: number,\n}\n\nexport type IPageInfoForOperation = IPageInfoForEntity & {\n isBookmarked?: boolean,\n isLiked?: boolean,\n subscriptionStatus?: SubscriptionStatusType,\n}\n\nexport type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;\n\nexport type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {\n return pageInfo != null && pageInfo instanceof Object\n && ('isEmpty' in pageInfo)\n && pageInfo.isEmpty === false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForOperation = (pageInfo: any | undefined): pageInfo is IPageInfoForOperation => {\n return pageInfo != null\n && isIPageInfoForEntity(pageInfo)\n && ('isBookmarked' in pageInfo || 'isLiked' in pageInfo || 'subscriptionStatus' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForListing = (pageInfo: any | undefined): pageInfo is IPageInfoForListing => {\n return pageInfo != null\n && isIPageInfoForEntity(pageInfo)\n && 'revisionShortBody' in pageInfo;\n};\n\n// export type IPageInfoTypeResolver<T extends IPageInfo> =\n// T extends HasRevisionShortbody ? IPageInfoForListing :\n// T extends { isBookmarked?: boolean } | { isLiked?: boolean } | { subscriptionStatus?: SubscriptionStatusType } ? IPageInfoForOperation :\n// T extends { bookmarkCount: number } ? IPageInfoForEntity :\n// T extends { isEmpty: number } ? IPageInfo :\n// T;\n\n/**\n * Union Distribution\n * @param pageInfo\n * @returns\n */\n// export const resolvePageInfo = <T extends IPageInfo>(pageInfo: T | undefined): IPageInfoTypeResolver<T> => {\n// return <IPageInfoTypeResolver<T>>pageInfo;\n// };\n\nexport type IDataWithMeta<D = unknown, M = unknown> = {\n data: D,\n meta?: M,\n}\n\nexport type IPageWithMeta<M = IPageInfoAll> = IDataWithMeta<IPageHasId, M>;\n\nexport type IPageToDeleteWithMeta<T = IPageInfoForEntity | unknown> = IDataWithMeta<HasObjectId & (IPage | { path: string, revision: string | null}), T>;\nexport type IPageToRenameWithMeta<T = IPageInfoForEntity | unknown> = IPageToDeleteWithMeta<T>;\n"],"names":["GroupType","PageGrant","PageStatus","isIPageInfoForEntity","pageInfo","isIPageInfoForOperation","isIPageInfoForListing"],"mappings":"gFASO,MAAMA,EAAY,CAAE,UAAW,YAAa,kBAAmB,mBAAoB,EA6C7EC,EAAY,CACvB,aAAc,EACd,iBAAkB,EAClB,gBAAiB,EACjB,YAAa,EACb,iBAAkB,CACpB,EAIaC,EAAa,CACxB,iBAAkB,YAClB,eAAgB,SAClB,EAoCaC,EAAwBC,GAC5BA,GAAY,MAAQA,aAAoB,QACzC,YAAaA,GACdA,EAAS,UAAY,GAIfC,EAA2BD,GAC/BA,GAAY,MACdD,EAAqBC,CAAQ,IAC5B,iBAAkBA,GAAY,YAAaA,GAAY,uBAAwBA,GAI1EE,EAAyBF,GAC7BA,GAAY,MACdD,EAAqBC,CAAQ,GAC7B,sBAAuBA"}
1
+ {"version":3,"file":"page.cjs","sources":["../../src/interfaces/page.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IRevision, HasRevisionShortbody, IRevisionHasId } from './revision';\nimport type { SubscriptionStatusType } from './subscription';\nimport type { ITag } from './tag';\nimport type {\n IUser, IUserGroup, IUserGroupHasId, IUserHasId,\n} from './user';\n\nexport const GroupType = { userGroup: 'UserGroup', externalUserGroup: 'ExternalUserGroup' } as const;\nexport type GroupType = typeof GroupType[keyof typeof GroupType];\n\nexport type IGrantedGroup = {\n type: GroupType,\n item: Ref<IUserGroup>,\n}\n\nexport type IPage = {\n path: string,\n status: string,\n revision?: Ref<IRevision>,\n tags: Ref<ITag>[],\n creator?: Ref<IUser>,\n createdAt: Date,\n updatedAt: Date,\n seenUsers: Ref<IUser>[],\n parent: Ref<IPage> | null,\n descendantCount: number,\n isEmpty: boolean,\n grant: PageGrant,\n grantedUsers: Ref<IUser>[],\n grantedGroups: IGrantedGroup[],\n lastUpdateUser?: Ref<IUser>,\n liker: Ref<IUser>[],\n commentCount: number\n slackChannels: string,\n deleteUser: Ref<IUser>,\n deletedAt: Date,\n latestRevision?: Ref<IRevision>,\n latestRevisionBodyLength?: number,\n expandContentWidth?: boolean,\n wip?: boolean,\n ttlTimestamp?: Date\n}\n\nexport type IPagePopulatedToShowRevision = Omit<IPageHasId, 'lastUpdateUser'|'creator'|'deleteUser'|'grantedGroups'|'revision'|'author'> & {\n lastUpdateUser?: IUserHasId,\n creator?: IUserHasId,\n deleteUser: IUserHasId,\n grantedGroups: { type: GroupType, item: IUserGroupHasId }[],\n revision?: IRevisionHasId,\n author: IUserHasId,\n}\n\nexport const PageGrant = {\n GRANT_PUBLIC: 1,\n GRANT_RESTRICTED: 2,\n GRANT_SPECIFIED: 3, // DEPRECATED\n GRANT_OWNER: 4,\n GRANT_USER_GROUP: 5,\n} as const;\ntype UnionPageGrantKeys = keyof typeof PageGrant;\nexport type PageGrant = typeof PageGrant[UnionPageGrantKeys];\n\nexport const PageStatus = {\n STATUS_PUBLISHED: 'published',\n STATUS_DELETED: 'deleted',\n} as const;\nexport type PageStatus = typeof PageStatus[keyof typeof PageStatus];\n\nexport type IPageHasId = IPage & HasObjectId;\n\nexport type IPageInfo = {\n isV5Compatible: boolean,\n isEmpty: boolean,\n isMovable: boolean,\n isDeletable: boolean,\n isAbleToDeleteCompletely: boolean,\n isRevertible: boolean,\n}\n\nexport type IPageInfoForEntity = IPageInfo & {\n bookmarkCount: number,\n sumOfLikers: number,\n likerIds: string[],\n sumOfSeenUsers: number,\n seenUserIds: string[],\n contentAge: number,\n descendantCount: number,\n commentCount: number,\n}\n\nexport type IPageInfoForOperation = IPageInfoForEntity & {\n isBookmarked?: boolean,\n isLiked?: boolean,\n subscriptionStatus?: SubscriptionStatusType,\n}\n\nexport type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;\n\nexport type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfo = (pageInfo: any | undefined): pageInfo is IPageInfo => {\n return pageInfo != null && pageInfo instanceof Object\n && ('isEmpty' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {\n return isIPageInfo(pageInfo)\n && pageInfo.isEmpty === false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForOperation = (pageInfo: any | undefined): pageInfo is IPageInfoForOperation => {\n return isIPageInfoForEntity(pageInfo)\n && ('isBookmarked' in pageInfo || 'isLiked' in pageInfo || 'subscriptionStatus' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForListing = (pageInfo: any | undefined): pageInfo is IPageInfoForListing => {\n return isIPageInfoForEntity(pageInfo)\n && 'revisionShortBody' in pageInfo;\n};\n\n// export type IPageInfoTypeResolver<T extends IPageInfo> =\n// T extends HasRevisionShortbody ? IPageInfoForListing :\n// T extends { isBookmarked?: boolean } | { isLiked?: boolean } | { subscriptionStatus?: SubscriptionStatusType } ? IPageInfoForOperation :\n// T extends { bookmarkCount: number } ? IPageInfoForEntity :\n// T extends { isEmpty: number } ? IPageInfo :\n// T;\n\n/**\n * Union Distribution\n * @param pageInfo\n * @returns\n */\n// export const resolvePageInfo = <T extends IPageInfo>(pageInfo: T | undefined): IPageInfoTypeResolver<T> => {\n// return <IPageInfoTypeResolver<T>>pageInfo;\n// };\n\nexport type IDataWithMeta<D = unknown, M = unknown> = {\n data: D,\n meta?: M,\n}\n\nexport type IPageWithMeta<M = IPageInfoAll> = IDataWithMeta<IPageHasId, M>;\n\nexport type IPageToDeleteWithMeta<T = IPageInfoForEntity | unknown> = IDataWithMeta<HasObjectId & (IPage | { path: string, revision: string | null}), T>;\nexport type IPageToRenameWithMeta<T = IPageInfoForEntity | unknown> = IPageToDeleteWithMeta<T>;\n"],"names":["GroupType","PageGrant","PageStatus","isIPageInfo","pageInfo","isIPageInfoForEntity","isIPageInfoForOperation","isIPageInfoForListing"],"mappings":"gFASO,MAAMA,EAAY,CAAE,UAAW,YAAa,kBAAmB,mBAAoB,EA6C7EC,EAAY,CACvB,aAAc,EACd,iBAAkB,EAClB,gBAAiB,EACjB,YAAa,EACb,iBAAkB,CACpB,EAIaC,EAAa,CACxB,iBAAkB,YAClB,eAAgB,SAClB,EAoCaC,EAAeC,GACnBA,GAAY,MAAQA,aAAoB,QACzC,YAAaA,EAIRC,EAAwBD,GAC5BD,EAAYC,CAAQ,GACtBA,EAAS,UAAY,GAIfE,EAA2BF,GAC/BC,EAAqBD,CAAQ,IAC9B,iBAAkBA,GAAY,YAAaA,GAAY,uBAAwBA,GAI1EG,EAAyBH,GAC7BC,EAAqBD,CAAQ,GAC/B,sBAAuBA"}
@@ -92,6 +92,7 @@ export type IPageInfoForOperation = IPageInfoForEntity & {
92
92
  };
93
93
  export type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;
94
94
  export type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;
95
+ export declare const isIPageInfo: (pageInfo: any | undefined) => pageInfo is IPageInfo;
95
96
  export declare const isIPageInfoForEntity: (pageInfo: any | undefined) => pageInfo is IPageInfoForEntity;
96
97
  export declare const isIPageInfoForOperation: (pageInfo: any | undefined) => pageInfo is IPageInfoForOperation;
97
98
  export declare const isIPageInfoForListing: (pageInfo: any | undefined) => pageInfo is IPageInfoForListing;
@@ -1,20 +1,21 @@
1
- const s = { userGroup: "UserGroup", externalUserGroup: "ExternalUserGroup" }, i = {
1
+ const i = { userGroup: "UserGroup", externalUserGroup: "ExternalUserGroup" }, n = {
2
2
  GRANT_PUBLIC: 1,
3
3
  GRANT_RESTRICTED: 2,
4
4
  GRANT_SPECIFIED: 3,
5
5
  // DEPRECATED
6
6
  GRANT_OWNER: 4,
7
7
  GRANT_USER_GROUP: 5
8
- }, n = {
8
+ }, e = {
9
9
  STATUS_PUBLISHED: "published",
10
10
  STATUS_DELETED: "deleted"
11
- }, r = (t) => t != null && t instanceof Object && "isEmpty" in t && t.isEmpty === !1, e = (t) => t != null && r(t) && ("isBookmarked" in t || "isLiked" in t || "subscriptionStatus" in t), o = (t) => t != null && r(t) && "revisionShortBody" in t;
11
+ }, s = (t) => t != null && t instanceof Object && "isEmpty" in t, r = (t) => s(t) && t.isEmpty === !1, o = (t) => r(t) && ("isBookmarked" in t || "isLiked" in t || "subscriptionStatus" in t), u = (t) => r(t) && "revisionShortBody" in t;
12
12
  export {
13
- s as GroupType,
14
- i as PageGrant,
15
- n as PageStatus,
13
+ i as GroupType,
14
+ n as PageGrant,
15
+ e as PageStatus,
16
+ s as isIPageInfo,
16
17
  r as isIPageInfoForEntity,
17
- o as isIPageInfoForListing,
18
- e as isIPageInfoForOperation
18
+ u as isIPageInfoForListing,
19
+ o as isIPageInfoForOperation
19
20
  };
20
21
  //# sourceMappingURL=page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","sources":["../../src/interfaces/page.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IRevision, HasRevisionShortbody, IRevisionHasId } from './revision';\nimport type { SubscriptionStatusType } from './subscription';\nimport type { ITag } from './tag';\nimport type {\n IUser, IUserGroup, IUserGroupHasId, IUserHasId,\n} from './user';\n\nexport const GroupType = { userGroup: 'UserGroup', externalUserGroup: 'ExternalUserGroup' } as const;\nexport type GroupType = typeof GroupType[keyof typeof GroupType];\n\nexport type IGrantedGroup = {\n type: GroupType,\n item: Ref<IUserGroup>,\n}\n\nexport type IPage = {\n path: string,\n status: string,\n revision?: Ref<IRevision>,\n tags: Ref<ITag>[],\n creator?: Ref<IUser>,\n createdAt: Date,\n updatedAt: Date,\n seenUsers: Ref<IUser>[],\n parent: Ref<IPage> | null,\n descendantCount: number,\n isEmpty: boolean,\n grant: PageGrant,\n grantedUsers: Ref<IUser>[],\n grantedGroups: IGrantedGroup[],\n lastUpdateUser?: Ref<IUser>,\n liker: Ref<IUser>[],\n commentCount: number\n slackChannels: string,\n deleteUser: Ref<IUser>,\n deletedAt: Date,\n latestRevision?: Ref<IRevision>,\n latestRevisionBodyLength?: number,\n expandContentWidth?: boolean,\n wip?: boolean,\n ttlTimestamp?: Date\n}\n\nexport type IPagePopulatedToShowRevision = Omit<IPageHasId, 'lastUpdateUser'|'creator'|'deleteUser'|'grantedGroups'|'revision'|'author'> & {\n lastUpdateUser?: IUserHasId,\n creator?: IUserHasId,\n deleteUser: IUserHasId,\n grantedGroups: { type: GroupType, item: IUserGroupHasId }[],\n revision?: IRevisionHasId,\n author: IUserHasId,\n}\n\nexport const PageGrant = {\n GRANT_PUBLIC: 1,\n GRANT_RESTRICTED: 2,\n GRANT_SPECIFIED: 3, // DEPRECATED\n GRANT_OWNER: 4,\n GRANT_USER_GROUP: 5,\n} as const;\ntype UnionPageGrantKeys = keyof typeof PageGrant;\nexport type PageGrant = typeof PageGrant[UnionPageGrantKeys];\n\nexport const PageStatus = {\n STATUS_PUBLISHED: 'published',\n STATUS_DELETED: 'deleted',\n} as const;\nexport type PageStatus = typeof PageStatus[keyof typeof PageStatus];\n\nexport type IPageHasId = IPage & HasObjectId;\n\nexport type IPageInfo = {\n isV5Compatible: boolean,\n isEmpty: boolean,\n isMovable: boolean,\n isDeletable: boolean,\n isAbleToDeleteCompletely: boolean,\n isRevertible: boolean,\n}\n\nexport type IPageInfoForEntity = IPageInfo & {\n bookmarkCount: number,\n sumOfLikers: number,\n likerIds: string[],\n sumOfSeenUsers: number,\n seenUserIds: string[],\n contentAge: number,\n descendantCount: number,\n commentCount: number,\n}\n\nexport type IPageInfoForOperation = IPageInfoForEntity & {\n isBookmarked?: boolean,\n isLiked?: boolean,\n subscriptionStatus?: SubscriptionStatusType,\n}\n\nexport type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;\n\nexport type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {\n return pageInfo != null && pageInfo instanceof Object\n && ('isEmpty' in pageInfo)\n && pageInfo.isEmpty === false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForOperation = (pageInfo: any | undefined): pageInfo is IPageInfoForOperation => {\n return pageInfo != null\n && isIPageInfoForEntity(pageInfo)\n && ('isBookmarked' in pageInfo || 'isLiked' in pageInfo || 'subscriptionStatus' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForListing = (pageInfo: any | undefined): pageInfo is IPageInfoForListing => {\n return pageInfo != null\n && isIPageInfoForEntity(pageInfo)\n && 'revisionShortBody' in pageInfo;\n};\n\n// export type IPageInfoTypeResolver<T extends IPageInfo> =\n// T extends HasRevisionShortbody ? IPageInfoForListing :\n// T extends { isBookmarked?: boolean } | { isLiked?: boolean } | { subscriptionStatus?: SubscriptionStatusType } ? IPageInfoForOperation :\n// T extends { bookmarkCount: number } ? IPageInfoForEntity :\n// T extends { isEmpty: number } ? IPageInfo :\n// T;\n\n/**\n * Union Distribution\n * @param pageInfo\n * @returns\n */\n// export const resolvePageInfo = <T extends IPageInfo>(pageInfo: T | undefined): IPageInfoTypeResolver<T> => {\n// return <IPageInfoTypeResolver<T>>pageInfo;\n// };\n\nexport type IDataWithMeta<D = unknown, M = unknown> = {\n data: D,\n meta?: M,\n}\n\nexport type IPageWithMeta<M = IPageInfoAll> = IDataWithMeta<IPageHasId, M>;\n\nexport type IPageToDeleteWithMeta<T = IPageInfoForEntity | unknown> = IDataWithMeta<HasObjectId & (IPage | { path: string, revision: string | null}), T>;\nexport type IPageToRenameWithMeta<T = IPageInfoForEntity | unknown> = IPageToDeleteWithMeta<T>;\n"],"names":["GroupType","PageGrant","PageStatus","isIPageInfoForEntity","pageInfo","isIPageInfoForOperation","isIPageInfoForListing"],"mappings":"AASO,MAAMA,IAAY,EAAE,WAAW,aAAa,mBAAmB,oBAAoB,GA6C7EC,IAAY;AAAA,EACvB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA;AAAA,EACjB,aAAa;AAAA,EACb,kBAAkB;AACpB,GAIaC,IAAa;AAAA,EACxB,kBAAkB;AAAA,EAClB,gBAAgB;AAClB,GAoCaC,IAAuB,CAACC,MAC5BA,KAAY,QAAQA,aAAoB,UACzC,aAAaA,KACdA,EAAS,YAAY,IAIfC,IAA0B,CAACD,MAC/BA,KAAY,QACdD,EAAqBC,CAAQ,MAC5B,kBAAkBA,KAAY,aAAaA,KAAY,wBAAwBA,IAI1EE,IAAwB,CAACF,MAC7BA,KAAY,QACdD,EAAqBC,CAAQ,KAC7B,uBAAuBA;"}
1
+ {"version":3,"file":"page.js","sources":["../../src/interfaces/page.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IRevision, HasRevisionShortbody, IRevisionHasId } from './revision';\nimport type { SubscriptionStatusType } from './subscription';\nimport type { ITag } from './tag';\nimport type {\n IUser, IUserGroup, IUserGroupHasId, IUserHasId,\n} from './user';\n\nexport const GroupType = { userGroup: 'UserGroup', externalUserGroup: 'ExternalUserGroup' } as const;\nexport type GroupType = typeof GroupType[keyof typeof GroupType];\n\nexport type IGrantedGroup = {\n type: GroupType,\n item: Ref<IUserGroup>,\n}\n\nexport type IPage = {\n path: string,\n status: string,\n revision?: Ref<IRevision>,\n tags: Ref<ITag>[],\n creator?: Ref<IUser>,\n createdAt: Date,\n updatedAt: Date,\n seenUsers: Ref<IUser>[],\n parent: Ref<IPage> | null,\n descendantCount: number,\n isEmpty: boolean,\n grant: PageGrant,\n grantedUsers: Ref<IUser>[],\n grantedGroups: IGrantedGroup[],\n lastUpdateUser?: Ref<IUser>,\n liker: Ref<IUser>[],\n commentCount: number\n slackChannels: string,\n deleteUser: Ref<IUser>,\n deletedAt: Date,\n latestRevision?: Ref<IRevision>,\n latestRevisionBodyLength?: number,\n expandContentWidth?: boolean,\n wip?: boolean,\n ttlTimestamp?: Date\n}\n\nexport type IPagePopulatedToShowRevision = Omit<IPageHasId, 'lastUpdateUser'|'creator'|'deleteUser'|'grantedGroups'|'revision'|'author'> & {\n lastUpdateUser?: IUserHasId,\n creator?: IUserHasId,\n deleteUser: IUserHasId,\n grantedGroups: { type: GroupType, item: IUserGroupHasId }[],\n revision?: IRevisionHasId,\n author: IUserHasId,\n}\n\nexport const PageGrant = {\n GRANT_PUBLIC: 1,\n GRANT_RESTRICTED: 2,\n GRANT_SPECIFIED: 3, // DEPRECATED\n GRANT_OWNER: 4,\n GRANT_USER_GROUP: 5,\n} as const;\ntype UnionPageGrantKeys = keyof typeof PageGrant;\nexport type PageGrant = typeof PageGrant[UnionPageGrantKeys];\n\nexport const PageStatus = {\n STATUS_PUBLISHED: 'published',\n STATUS_DELETED: 'deleted',\n} as const;\nexport type PageStatus = typeof PageStatus[keyof typeof PageStatus];\n\nexport type IPageHasId = IPage & HasObjectId;\n\nexport type IPageInfo = {\n isV5Compatible: boolean,\n isEmpty: boolean,\n isMovable: boolean,\n isDeletable: boolean,\n isAbleToDeleteCompletely: boolean,\n isRevertible: boolean,\n}\n\nexport type IPageInfoForEntity = IPageInfo & {\n bookmarkCount: number,\n sumOfLikers: number,\n likerIds: string[],\n sumOfSeenUsers: number,\n seenUserIds: string[],\n contentAge: number,\n descendantCount: number,\n commentCount: number,\n}\n\nexport type IPageInfoForOperation = IPageInfoForEntity & {\n isBookmarked?: boolean,\n isLiked?: boolean,\n subscriptionStatus?: SubscriptionStatusType,\n}\n\nexport type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;\n\nexport type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfo = (pageInfo: any | undefined): pageInfo is IPageInfo => {\n return pageInfo != null && pageInfo instanceof Object\n && ('isEmpty' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForEntity = (pageInfo: any | undefined): pageInfo is IPageInfoForEntity => {\n return isIPageInfo(pageInfo)\n && pageInfo.isEmpty === false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForOperation = (pageInfo: any | undefined): pageInfo is IPageInfoForOperation => {\n return isIPageInfoForEntity(pageInfo)\n && ('isBookmarked' in pageInfo || 'isLiked' in pageInfo || 'subscriptionStatus' in pageInfo);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isIPageInfoForListing = (pageInfo: any | undefined): pageInfo is IPageInfoForListing => {\n return isIPageInfoForEntity(pageInfo)\n && 'revisionShortBody' in pageInfo;\n};\n\n// export type IPageInfoTypeResolver<T extends IPageInfo> =\n// T extends HasRevisionShortbody ? IPageInfoForListing :\n// T extends { isBookmarked?: boolean } | { isLiked?: boolean } | { subscriptionStatus?: SubscriptionStatusType } ? IPageInfoForOperation :\n// T extends { bookmarkCount: number } ? IPageInfoForEntity :\n// T extends { isEmpty: number } ? IPageInfo :\n// T;\n\n/**\n * Union Distribution\n * @param pageInfo\n * @returns\n */\n// export const resolvePageInfo = <T extends IPageInfo>(pageInfo: T | undefined): IPageInfoTypeResolver<T> => {\n// return <IPageInfoTypeResolver<T>>pageInfo;\n// };\n\nexport type IDataWithMeta<D = unknown, M = unknown> = {\n data: D,\n meta?: M,\n}\n\nexport type IPageWithMeta<M = IPageInfoAll> = IDataWithMeta<IPageHasId, M>;\n\nexport type IPageToDeleteWithMeta<T = IPageInfoForEntity | unknown> = IDataWithMeta<HasObjectId & (IPage | { path: string, revision: string | null}), T>;\nexport type IPageToRenameWithMeta<T = IPageInfoForEntity | unknown> = IPageToDeleteWithMeta<T>;\n"],"names":["GroupType","PageGrant","PageStatus","isIPageInfo","pageInfo","isIPageInfoForEntity","isIPageInfoForOperation","isIPageInfoForListing"],"mappings":"AASO,MAAMA,IAAY,EAAE,WAAW,aAAa,mBAAmB,oBAAoB,GA6C7EC,IAAY;AAAA,EACvB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA;AAAA,EACjB,aAAa;AAAA,EACb,kBAAkB;AACpB,GAIaC,IAAa;AAAA,EACxB,kBAAkB;AAAA,EAClB,gBAAgB;AAClB,GAoCaC,IAAc,CAACC,MACnBA,KAAY,QAAQA,aAAoB,UACzC,aAAaA,GAIRC,IAAuB,CAACD,MAC5BD,EAAYC,CAAQ,KACtBA,EAAS,YAAY,IAIfE,IAA0B,CAACF,MAC/BC,EAAqBD,CAAQ,MAC9B,kBAAkBA,KAAY,aAAaA,KAAY,wBAAwBA,IAI1EG,IAAwB,CAACH,MAC7BC,EAAqBD,CAAQ,KAC/B,uBAAuBA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@growi/core",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "GROWI Core Libraries",
5
5
  "license": "MIT",
6
6
  "keywords": [