@growi/core 1.0.0-next.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.
Files changed (207) hide show
  1. package/dist/consts/accepted-upload-file-type.cjs +2 -0
  2. package/dist/consts/accepted-upload-file-type.cjs.map +1 -0
  3. package/dist/consts/accepted-upload-file-type.d.ts +6 -0
  4. package/dist/consts/accepted-upload-file-type.js +9 -0
  5. package/dist/consts/accepted-upload-file-type.js.map +1 -0
  6. package/dist/consts/growi-plugin.cjs +2 -0
  7. package/dist/consts/growi-plugin.cjs.map +1 -0
  8. package/dist/consts/growi-plugin.d.ts +7 -0
  9. package/dist/consts/growi-plugin.js +10 -0
  10. package/dist/consts/growi-plugin.js.map +1 -0
  11. package/dist/consts/index.cjs +2 -0
  12. package/dist/consts/index.cjs.map +1 -0
  13. package/dist/consts/index.d.ts +2 -0
  14. package/dist/consts/index.js +7 -0
  15. package/dist/consts/index.js.map +1 -0
  16. package/dist/index.cjs +2 -0
  17. package/dist/index.cjs.map +1 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +36 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/interfaces/attachment.cjs +2 -0
  22. package/dist/interfaces/attachment.cjs.map +1 -0
  23. package/dist/interfaces/attachment.d.ts +19 -0
  24. package/dist/interfaces/attachment.js +2 -0
  25. package/dist/interfaces/attachment.js.map +1 -0
  26. package/dist/interfaces/color-scheme.cjs +2 -0
  27. package/dist/interfaces/color-scheme.cjs.map +1 -0
  28. package/dist/interfaces/color-scheme.d.ts +5 -0
  29. package/dist/interfaces/color-scheme.js +8 -0
  30. package/dist/interfaces/color-scheme.js.map +1 -0
  31. package/dist/interfaces/common.cjs +2 -0
  32. package/dist/interfaces/common.cjs.map +1 -0
  33. package/dist/interfaces/common.d.ts +6 -0
  34. package/dist/interfaces/common.js +6 -0
  35. package/dist/interfaces/common.js.map +1 -0
  36. package/dist/interfaces/external-account.cjs +2 -0
  37. package/dist/interfaces/external-account.cjs.map +1 -0
  38. package/dist/interfaces/external-account.d.ts +19 -0
  39. package/dist/interfaces/external-account.js +12 -0
  40. package/dist/interfaces/external-account.js.map +1 -0
  41. package/dist/interfaces/growi-facade.cjs +2 -0
  42. package/dist/interfaces/growi-facade.cjs.map +1 -0
  43. package/dist/interfaces/growi-facade.d.ts +11 -0
  44. package/dist/interfaces/growi-facade.js +2 -0
  45. package/dist/interfaces/growi-facade.js.map +1 -0
  46. package/dist/interfaces/growi-theme-metadata.cjs +2 -0
  47. package/dist/interfaces/growi-theme-metadata.cjs.map +1 -0
  48. package/dist/interfaces/growi-theme-metadata.d.ts +19 -0
  49. package/dist/interfaces/growi-theme-metadata.js +9 -0
  50. package/dist/interfaces/growi-theme-metadata.js.map +1 -0
  51. package/dist/interfaces/has-object-id.cjs +2 -0
  52. package/dist/interfaces/has-object-id.cjs.map +1 -0
  53. package/dist/interfaces/has-object-id.d.ts +3 -0
  54. package/dist/interfaces/has-object-id.js +2 -0
  55. package/dist/interfaces/has-object-id.js.map +1 -0
  56. package/dist/interfaces/index.cjs +2 -0
  57. package/dist/interfaces/index.cjs.map +1 -0
  58. package/dist/interfaces/index.d.ts +16 -0
  59. package/dist/interfaces/index.js +32 -0
  60. package/dist/interfaces/index.js.map +1 -0
  61. package/dist/interfaces/lang.cjs +2 -0
  62. package/dist/interfaces/lang.cjs.map +1 -0
  63. package/dist/interfaces/lang.d.ts +8 -0
  64. package/dist/interfaces/lang.js +11 -0
  65. package/dist/interfaces/lang.js.map +1 -0
  66. package/dist/interfaces/page.cjs +2 -0
  67. package/dist/interfaces/page.cjs.map +1 -0
  68. package/dist/interfaces/page.d.ts +113 -0
  69. package/dist/interfaces/page.js +20 -0
  70. package/dist/interfaces/page.js.map +1 -0
  71. package/dist/interfaces/revision.cjs +2 -0
  72. package/dist/interfaces/revision.cjs.map +1 -0
  73. package/dist/interfaces/revision.d.ts +36 -0
  74. package/dist/interfaces/revision.js +9 -0
  75. package/dist/interfaces/revision.js.map +1 -0
  76. package/dist/interfaces/subscription.cjs +2 -0
  77. package/dist/interfaces/subscription.cjs.map +1 -0
  78. package/dist/interfaces/subscription.d.ts +19 -0
  79. package/dist/interfaces/subscription.js +9 -0
  80. package/dist/interfaces/subscription.js.map +1 -0
  81. package/dist/interfaces/tag.cjs +2 -0
  82. package/dist/interfaces/tag.cjs.map +1 -0
  83. package/dist/interfaces/tag.d.ts +4 -0
  84. package/dist/interfaces/tag.js +2 -0
  85. package/dist/interfaces/tag.js.map +1 -0
  86. package/dist/interfaces/user.cjs +2 -0
  87. package/dist/interfaces/user.cjs.map +1 -0
  88. package/dist/interfaces/user.d.ts +57 -0
  89. package/dist/interfaces/user.js +11 -0
  90. package/dist/interfaces/user.js.map +1 -0
  91. package/dist/interfaces/vite.cjs +2 -0
  92. package/dist/interfaces/vite.cjs.map +1 -0
  93. package/dist/interfaces/vite.d.ts +9 -0
  94. package/dist/interfaces/vite.js +2 -0
  95. package/dist/interfaces/vite.js.map +1 -0
  96. package/dist/interfaces/websocket.cjs +2 -0
  97. package/dist/interfaces/websocket.cjs.map +1 -0
  98. package/dist/interfaces/websocket.d.ts +5 -0
  99. package/dist/interfaces/websocket.js +9 -0
  100. package/dist/interfaces/websocket.js.map +1 -0
  101. package/dist/models/devided-page-path.cjs +2 -0
  102. package/dist/models/devided-page-path.cjs.map +1 -0
  103. package/dist/models/devided-page-path.d.ts +7 -0
  104. package/dist/models/devided-page-path.js +29 -0
  105. package/dist/models/devided-page-path.js.map +1 -0
  106. package/dist/models/index.cjs +2 -0
  107. package/dist/models/index.cjs.map +1 -0
  108. package/dist/models/index.d.ts +2 -0
  109. package/dist/models/index.js +7 -0
  110. package/dist/models/index.js.map +1 -0
  111. package/dist/models/vo/error-apiv3.cjs +2 -0
  112. package/dist/models/vo/error-apiv3.cjs.map +1 -0
  113. package/dist/models/vo/error-apiv3.d.ts +5 -0
  114. package/dist/models/vo/error-apiv3.js +9 -0
  115. package/dist/models/vo/error-apiv3.js.map +1 -0
  116. package/dist/remark-plugins/index.cjs +2 -0
  117. package/dist/remark-plugins/index.cjs.map +1 -0
  118. package/dist/remark-plugins/index.d.ts +2 -0
  119. package/dist/remark-plugins/index.js +5 -0
  120. package/dist/remark-plugins/index.js.map +1 -0
  121. package/dist/remark-plugins/interfaces/option-parser.cjs +2 -0
  122. package/dist/remark-plugins/interfaces/option-parser.cjs.map +1 -0
  123. package/dist/remark-plugins/interfaces/option-parser.d.ts +4 -0
  124. package/dist/remark-plugins/interfaces/option-parser.js +2 -0
  125. package/dist/remark-plugins/interfaces/option-parser.js.map +1 -0
  126. package/dist/remark-plugins/util/option-parser.cjs +2 -0
  127. package/dist/remark-plugins/util/option-parser.cjs.map +1 -0
  128. package/dist/remark-plugins/util/option-parser.d.ts +26 -0
  129. package/dist/remark-plugins/util/option-parser.js +39 -0
  130. package/dist/remark-plugins/util/option-parser.js.map +1 -0
  131. package/dist/remark-plugins/util/option-parser.spec.d.ts +1 -0
  132. package/dist/swr/index.cjs +2 -0
  133. package/dist/swr/index.cjs.map +1 -0
  134. package/dist/swr/index.d.ts +3 -0
  135. package/dist/swr/index.js +11 -0
  136. package/dist/swr/index.js.map +1 -0
  137. package/dist/swr/use-global-socket.cjs +2 -0
  138. package/dist/swr/use-global-socket.cjs.map +1 -0
  139. package/dist/swr/use-global-socket.d.ts +6 -0
  140. package/dist/swr/use-global-socket.js +8 -0
  141. package/dist/swr/use-global-socket.js.map +1 -0
  142. package/dist/swr/use-swr-static.cjs +2 -0
  143. package/dist/swr/use-swr-static.cjs.map +1 -0
  144. package/dist/swr/use-swr-static.d.ts +5 -0
  145. package/dist/swr/use-swr-static.js +17 -0
  146. package/dist/swr/use-swr-static.js.map +1 -0
  147. package/dist/swr/with-utils.cjs +2 -0
  148. package/dist/swr/with-utils.cjs.map +1 -0
  149. package/dist/swr/with-utils.d.ts +4 -0
  150. package/dist/swr/with-utils.js +5 -0
  151. package/dist/swr/with-utils.js.map +1 -0
  152. package/dist/utils/browser-utils.cjs +2 -0
  153. package/dist/utils/browser-utils.cjs.map +1 -0
  154. package/dist/utils/browser-utils.d.ts +2 -0
  155. package/dist/utils/browser-utils.js +6 -0
  156. package/dist/utils/browser-utils.js.map +1 -0
  157. package/dist/utils/env-utils.cjs +2 -0
  158. package/dist/utils/env-utils.cjs.map +1 -0
  159. package/dist/utils/env-utils.d.ts +5 -0
  160. package/dist/utils/env-utils.js +7 -0
  161. package/dist/utils/env-utils.js.map +1 -0
  162. package/dist/utils/env-utils.spec.d.ts +1 -0
  163. package/dist/utils/growi-theme-metadata.cjs +2 -0
  164. package/dist/utils/growi-theme-metadata.cjs.map +1 -0
  165. package/dist/utils/growi-theme-metadata.d.ts +4 -0
  166. package/dist/utils/growi-theme-metadata.js +6 -0
  167. package/dist/utils/growi-theme-metadata.js.map +1 -0
  168. package/dist/utils/index.cjs +2 -0
  169. package/dist/utils/index.cjs.map +1 -0
  170. package/dist/utils/index.d.ts +9 -0
  171. package/dist/utils/index.js +21 -0
  172. package/dist/utils/index.js.map +1 -0
  173. package/dist/utils/objectid-utils.cjs +2 -0
  174. package/dist/utils/objectid-utils.cjs.map +1 -0
  175. package/dist/utils/objectid-utils.d.ts +3 -0
  176. package/dist/utils/objectid-utils.js +8 -0
  177. package/dist/utils/objectid-utils.js.map +1 -0
  178. package/dist/utils/objectid-utils.spec.d.ts +1 -0
  179. package/dist/utils/page-path-utils/index.cjs +2 -0
  180. package/dist/utils/page-path-utils/index.cjs.map +1 -0
  181. package/dist/utils/page-path-utils/index.d.ts +125 -0
  182. package/dist/utils/page-path-utils/index.js +91 -0
  183. package/dist/utils/page-path-utils/index.js.map +1 -0
  184. package/dist/utils/page-path-utils/index.spec.d.ts +1 -0
  185. package/dist/utils/page-path-utils/is-top-page.cjs +2 -0
  186. package/dist/utils/page-path-utils/is-top-page.cjs.map +1 -0
  187. package/dist/utils/page-path-utils/is-top-page.d.ts +5 -0
  188. package/dist/utils/page-path-utils/is-top-page.js +5 -0
  189. package/dist/utils/page-path-utils/is-top-page.js.map +1 -0
  190. package/dist/utils/page-path-utils/is-top-page.spec.d.ts +1 -0
  191. package/dist/utils/page-utils.cjs +2 -0
  192. package/dist/utils/page-utils.cjs.map +1 -0
  193. package/dist/utils/page-utils.d.ts +18 -0
  194. package/dist/utils/page-utils.js +13 -0
  195. package/dist/utils/page-utils.js.map +1 -0
  196. package/dist/utils/path-utils.cjs +2 -0
  197. package/dist/utils/path-utils.cjs.map +1 -0
  198. package/dist/utils/path-utils.d.ts +66 -0
  199. package/dist/utils/path-utils.js +45 -0
  200. package/dist/utils/path-utils.js.map +1 -0
  201. package/dist/utils/path-utils.spec.d.ts +1 -0
  202. package/dist/utils/template-checker.cjs +2 -0
  203. package/dist/utils/template-checker.cjs.map +1 -0
  204. package/dist/utils/template-checker.d.ts +4 -0
  205. package/dist/utils/template-checker.js +7 -0
  206. package/dist/utils/template-checker.js.map +1 -0
  207. package/package.json +75 -0
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={ALL:"all",IMAGE:"image",NONE:"none"};exports.AcceptedUploadFileType=e;
2
+ //# sourceMappingURL=accepted-upload-file-type.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accepted-upload-file-type.cjs","sources":["../../src/consts/accepted-upload-file-type.ts"],"sourcesContent":["export const AcceptedUploadFileType = {\n ALL: 'all',\n IMAGE: 'image',\n NONE: 'none',\n} as const;\nexport type AcceptedUploadFileType = typeof AcceptedUploadFileType[keyof typeof AcceptedUploadFileType];\n"],"names":["AcceptedUploadFileType"],"mappings":"gFAAO,MAAMA,EAAyB,CACpC,IAAK,MACL,MAAO,QACP,KAAM,MACR"}
@@ -0,0 +1,6 @@
1
+ export declare const AcceptedUploadFileType: {
2
+ readonly ALL: "all";
3
+ readonly IMAGE: "image";
4
+ readonly NONE: "none";
5
+ };
6
+ export type AcceptedUploadFileType = typeof AcceptedUploadFileType[keyof typeof AcceptedUploadFileType];
@@ -0,0 +1,9 @@
1
+ const e = {
2
+ ALL: "all",
3
+ IMAGE: "image",
4
+ NONE: "none"
5
+ };
6
+ export {
7
+ e as AcceptedUploadFileType
8
+ };
9
+ //# sourceMappingURL=accepted-upload-file-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accepted-upload-file-type.js","sources":["../../src/consts/accepted-upload-file-type.ts"],"sourcesContent":["export const AcceptedUploadFileType = {\n ALL: 'all',\n IMAGE: 'image',\n NONE: 'none',\n} as const;\nexport type AcceptedUploadFileType = typeof AcceptedUploadFileType[keyof typeof AcceptedUploadFileType];\n"],"names":["AcceptedUploadFileType"],"mappings":"AAAO,MAAMA,IAAyB;AAAA,EACpC,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AACR;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={Template:"template",Style:"style",Theme:"theme",Script:"script"};exports.GrowiPluginType=e;
2
+ //# sourceMappingURL=growi-plugin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"growi-plugin.cjs","sources":["../../src/consts/growi-plugin.ts"],"sourcesContent":["export const GrowiPluginType = {\n Template: 'template',\n Style: 'style',\n Theme: 'theme',\n Script: 'script',\n} as const;\nexport type GrowiPluginType = typeof GrowiPluginType[keyof typeof GrowiPluginType];\n"],"names":["GrowiPluginType"],"mappings":"gFAAO,MAAMA,EAAkB,CAC7B,SAAU,WACV,MAAO,QACP,MAAO,QACP,OAAQ,QACV"}
@@ -0,0 +1,7 @@
1
+ export declare const GrowiPluginType: {
2
+ readonly Template: "template";
3
+ readonly Style: "style";
4
+ readonly Theme: "theme";
5
+ readonly Script: "script";
6
+ };
7
+ export type GrowiPluginType = typeof GrowiPluginType[keyof typeof GrowiPluginType];
@@ -0,0 +1,10 @@
1
+ const e = {
2
+ Template: "template",
3
+ Style: "style",
4
+ Theme: "theme",
5
+ Script: "script"
6
+ };
7
+ export {
8
+ e as GrowiPluginType
9
+ };
10
+ //# sourceMappingURL=growi-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"growi-plugin.js","sources":["../../src/consts/growi-plugin.ts"],"sourcesContent":["export const GrowiPluginType = {\n Template: 'template',\n Style: 'style',\n Theme: 'theme',\n Script: 'script',\n} as const;\nexport type GrowiPluginType = typeof GrowiPluginType[keyof typeof GrowiPluginType];\n"],"names":["GrowiPluginType"],"mappings":"AAAO,MAAMA,IAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AACV;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./accepted-upload-file-type.cjs"),i=require("./growi-plugin.cjs");exports.AcceptedUploadFileType=e.AcceptedUploadFileType;exports.GrowiPluginType=i.GrowiPluginType;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './accepted-upload-file-type';
2
+ export * from './growi-plugin';
@@ -0,0 +1,7 @@
1
+ import { AcceptedUploadFileType as p } from "./accepted-upload-file-type.js";
2
+ import { GrowiPluginType as i } from "./growi-plugin.js";
3
+ export {
4
+ p as AcceptedUploadFileType,
5
+ i as GrowiPluginType
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./consts/accepted-upload-file-type.cjs"),a=require("./consts/growi-plugin.cjs"),s=require("./interfaces/color-scheme.cjs"),r=require("./interfaces/common.cjs"),c=require("./interfaces/external-account.cjs"),l=require("./interfaces/growi-theme-metadata.cjs"),o=require("./interfaces/lang.cjs"),e=require("./interfaces/page.cjs"),i=require("./interfaces/revision.cjs"),t=require("./interfaces/subscription.cjs"),u=require("./interfaces/user.cjs"),p=require("./interfaces/websocket.cjs");exports.AcceptedUploadFileType=n.AcceptedUploadFileType;exports.GrowiPluginType=a.GrowiPluginType;exports.ColorScheme=s.ColorScheme;exports.getIdForRef=r.getIdForRef;exports.isPopulated=r.isPopulated;exports.IExternalAuthProviderType=c.IExternalAuthProviderType;exports.GrowiThemeSchemeType=l.GrowiThemeSchemeType;exports.AllLang=o.AllLang;exports.Lang=o.Lang;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=i.Origin;exports.allOrigin=i.allOrigin;exports.AllSubscriptionStatusType=t.AllSubscriptionStatusType;exports.SubscriptionStatusType=t.SubscriptionStatusType;exports.USER_STATUS=u.USER_STATUS;exports.GlobalSocketEventName=p.GlobalSocketEventName;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './consts';
2
+ export * from './interfaces';
package/dist/index.js ADDED
@@ -0,0 +1,36 @@
1
+ import { AcceptedUploadFileType as r } from "./consts/accepted-upload-file-type.js";
2
+ import { GrowiPluginType as p } from "./consts/growi-plugin.js";
3
+ import { ColorScheme as a } from "./interfaces/color-scheme.js";
4
+ import { getIdForRef as m, isPopulated as n } from "./interfaces/common.js";
5
+ import { IExternalAuthProviderType as x } from "./interfaces/external-account.js";
6
+ import { GrowiThemeSchemeType as S } from "./interfaces/growi-theme-metadata.js";
7
+ import { AllLang as T, Lang as u } from "./interfaces/lang.js";
8
+ import { GroupType as I, PageGrant as P, PageStatus as c, isIPageInfoForEntity as d, isIPageInfoForListing as A, isIPageInfoForOperation as F } from "./interfaces/page.js";
9
+ import { Origin as h, allOrigin as E } from "./interfaces/revision.js";
10
+ import { AllSubscriptionStatusType as L, SubscriptionStatusType as O } from "./interfaces/subscription.js";
11
+ import { USER_STATUS as v } from "./interfaces/user.js";
12
+ import { GlobalSocketEventName as R } from "./interfaces/websocket.js";
13
+ export {
14
+ r as AcceptedUploadFileType,
15
+ T as AllLang,
16
+ L as AllSubscriptionStatusType,
17
+ a as ColorScheme,
18
+ R as GlobalSocketEventName,
19
+ I as GroupType,
20
+ p as GrowiPluginType,
21
+ S as GrowiThemeSchemeType,
22
+ x as IExternalAuthProviderType,
23
+ u as Lang,
24
+ h as Origin,
25
+ P as PageGrant,
26
+ c as PageStatus,
27
+ O as SubscriptionStatusType,
28
+ v as USER_STATUS,
29
+ E as allOrigin,
30
+ m as getIdForRef,
31
+ d as isIPageInfoForEntity,
32
+ A as isIPageInfoForListing,
33
+ F as isIPageInfoForOperation,
34
+ n as isPopulated
35
+ };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=attachment.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import { IUser } from './user';
2
+ import { IPage } from './page';
3
+ import { HasObjectId } from './has-object-id';
4
+ import { Ref } from './common';
5
+
6
+ export type IAttachment = {
7
+ page?: Ref<IPage>;
8
+ creator?: Ref<IUser>;
9
+ fileName: string;
10
+ fileFormat: string;
11
+ fileSize: number;
12
+ originalName: string;
13
+ temporaryUrlCached?: string;
14
+ temporaryUrlExpiredAt?: Date;
15
+ createdAt: Date;
16
+ filePathProxied: string;
17
+ downloadPathProxied: string;
18
+ };
19
+ export type IAttachmentHasId = IAttachment & HasObjectId;
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={LIGHT:"light",DARK:"dark"};exports.ColorScheme=e;
2
+ //# sourceMappingURL=color-scheme.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-scheme.cjs","sources":["../../src/interfaces/color-scheme.ts"],"sourcesContent":["export const ColorScheme = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const;\nexport type ColorScheme = typeof ColorScheme[keyof typeof ColorScheme];\n"],"names":["ColorScheme"],"mappings":"gFAAO,MAAMA,EAAc,CACzB,MAAO,QACP,KAAM,MACR"}
@@ -0,0 +1,5 @@
1
+ export declare const ColorScheme: {
2
+ readonly LIGHT: "light";
3
+ readonly DARK: "dark";
4
+ };
5
+ export type ColorScheme = typeof ColorScheme[keyof typeof ColorScheme];
@@ -0,0 +1,8 @@
1
+ const o = {
2
+ LIGHT: "light",
3
+ DARK: "dark"
4
+ };
5
+ export {
6
+ o as ColorScheme
7
+ };
8
+ //# sourceMappingURL=color-scheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-scheme.js","sources":["../../src/interfaces/color-scheme.ts"],"sourcesContent":["export const ColorScheme = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const;\nexport type ColorScheme = typeof ColorScheme[keyof typeof ColorScheme];\n"],"names":["ColorScheme"],"mappings":"AAAO,MAAMA,IAAc;AAAA,EACzB,OAAO;AAAA,EACP,MAAM;AACR;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>typeof t!="string",o=t=>e(t)?t._id:t;exports.getIdForRef=o;exports.isPopulated=e;
2
+ //# sourceMappingURL=common.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.cjs","sources":["../../src/interfaces/common.ts"],"sourcesContent":["/*\n * Common types and interfaces\n */\n\nimport type { HasObjectId } from './has-object-id';\n\n\n// Foreign key field\nexport type Ref<T> = string | T & HasObjectId;\n\nexport type Nullable<T> = T | null | undefined;\n\nexport const isPopulated = <T>(ref: T & HasObjectId | Ref<T>): ref is T & HasObjectId => {\n return !(typeof ref === 'string');\n};\n\nexport const getIdForRef = <T>(ref: T & HasObjectId | Ref<T>): string => {\n return isPopulated(ref)\n ? ref._id\n : ref;\n};\n"],"names":["isPopulated","ref","getIdForRef"],"mappings":"gFAYa,MAAAA,EAAkBC,GACpB,OAAOA,GAAQ,SAGbC,EAAkBD,GACtBD,EAAYC,CAAG,EAClBA,EAAI,IACJA"}
@@ -0,0 +1,6 @@
1
+ import { HasObjectId } from './has-object-id';
2
+
3
+ export type Ref<T> = string | T & HasObjectId;
4
+ export type Nullable<T> = T | null | undefined;
5
+ export declare const isPopulated: <T>(ref: Ref<T>) => ref is T & HasObjectId;
6
+ export declare const getIdForRef: <T>(ref: Ref<T>) => string;
@@ -0,0 +1,6 @@
1
+ const o = (t) => typeof t != "string", e = (t) => o(t) ? t._id : t;
2
+ export {
3
+ e as getIdForRef,
4
+ o as isPopulated
5
+ };
6
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sources":["../../src/interfaces/common.ts"],"sourcesContent":["/*\n * Common types and interfaces\n */\n\nimport type { HasObjectId } from './has-object-id';\n\n\n// Foreign key field\nexport type Ref<T> = string | T & HasObjectId;\n\nexport type Nullable<T> = T | null | undefined;\n\nexport const isPopulated = <T>(ref: T & HasObjectId | Ref<T>): ref is T & HasObjectId => {\n return !(typeof ref === 'string');\n};\n\nexport const getIdForRef = <T>(ref: T & HasObjectId | Ref<T>): string => {\n return isPopulated(ref)\n ? ref._id\n : ref;\n};\n"],"names":["isPopulated","ref","getIdForRef"],"mappings":"AAYa,MAAAA,IAAc,CAAIC,MACpB,OAAOA,KAAQ,UAGbC,IAAc,CAAID,MACtBD,EAAYC,CAAG,IAClBA,EAAI,MACJA;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={ldap:"ldap",saml:"saml",oidc:"oidc",google:"google",github:"github",facebook:"facebook"};exports.IExternalAuthProviderType=e;
2
+ //# sourceMappingURL=external-account.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-account.cjs","sources":["../../src/interfaces/external-account.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IUser } from './user';\n\nexport const IExternalAuthProviderType = {\n ldap: 'ldap',\n saml: 'saml',\n oidc: 'oidc',\n google: 'google',\n github: 'github',\n facebook: 'facebook',\n} as const;\n\nexport type IExternalAuthProviderType = typeof IExternalAuthProviderType[keyof typeof IExternalAuthProviderType]\n\nexport type IExternalAccount = {\n providerType: IExternalAuthProviderType,\n accountId: string,\n user: Ref<IUser>,\n}\n\nexport type IExternalAccountHasId = IExternalAccount & HasObjectId\n"],"names":["IExternalAuthProviderType"],"mappings":"gFAIO,MAAMA,EAA4B,CACvC,KAAM,OACN,KAAM,OACN,KAAM,OACN,OAAQ,SACR,OAAQ,SACR,SAAU,UACZ"}
@@ -0,0 +1,19 @@
1
+ import { IUser } from './user';
2
+ import { HasObjectId } from './has-object-id';
3
+ import { Ref } from './common';
4
+
5
+ export declare const IExternalAuthProviderType: {
6
+ readonly ldap: "ldap";
7
+ readonly saml: "saml";
8
+ readonly oidc: "oidc";
9
+ readonly google: "google";
10
+ readonly github: "github";
11
+ readonly facebook: "facebook";
12
+ };
13
+ export type IExternalAuthProviderType = typeof IExternalAuthProviderType[keyof typeof IExternalAuthProviderType];
14
+ export type IExternalAccount = {
15
+ providerType: IExternalAuthProviderType;
16
+ accountId: string;
17
+ user: Ref<IUser>;
18
+ };
19
+ export type IExternalAccountHasId = IExternalAccount & HasObjectId;
@@ -0,0 +1,12 @@
1
+ const o = {
2
+ ldap: "ldap",
3
+ saml: "saml",
4
+ oidc: "oidc",
5
+ google: "google",
6
+ github: "github",
7
+ facebook: "facebook"
8
+ };
9
+ export {
10
+ o as IExternalAuthProviderType
11
+ };
12
+ //# sourceMappingURL=external-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-account.js","sources":["../../src/interfaces/external-account.ts"],"sourcesContent":["import type { Ref } from './common';\nimport type { HasObjectId } from './has-object-id';\nimport type { IUser } from './user';\n\nexport const IExternalAuthProviderType = {\n ldap: 'ldap',\n saml: 'saml',\n oidc: 'oidc',\n google: 'google',\n github: 'github',\n facebook: 'facebook',\n} as const;\n\nexport type IExternalAuthProviderType = typeof IExternalAuthProviderType[keyof typeof IExternalAuthProviderType]\n\nexport type IExternalAccount = {\n providerType: IExternalAuthProviderType,\n accountId: string,\n user: Ref<IUser>,\n}\n\nexport type IExternalAccountHasId = IExternalAccount & HasObjectId\n"],"names":["IExternalAuthProviderType"],"mappings":"AAIO,MAAMA,IAA4B;AAAA,EACvC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AACZ;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=growi-facade.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"growi-facade.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export type GrowiFacade = {
2
+ markdownRenderer?: {
3
+ optionsGenerators?: {
4
+ generateViewOptions?: any;
5
+ customGenerateViewOptions?: any;
6
+ generatePreviewOptions?: any;
7
+ customGeneratePreviewOptions?: any;
8
+ };
9
+ optionsMutators?: any;
10
+ };
11
+ };
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=growi-facade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"growi-facade.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./color-scheme.cjs"),o={...e.ColorScheme,BOTH:"both"};exports.GrowiThemeSchemeType=o;
2
+ //# sourceMappingURL=growi-theme-metadata.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"growi-theme-metadata.cjs","sources":["../../src/interfaces/growi-theme-metadata.ts"],"sourcesContent":["import { ColorScheme } from './color-scheme';\n\nexport const GrowiThemeSchemeType = {\n ...ColorScheme,\n BOTH: 'both',\n} as const;\nexport type GrowiThemeSchemeType = typeof GrowiThemeSchemeType[keyof typeof GrowiThemeSchemeType];\n\nexport type GrowiThemeMetadata = {\n name: string,\n manifestKey: string,\n schemeType: GrowiThemeSchemeType,\n lightBg: string,\n darkBg: string,\n lightSidebar: string,\n darkSidebar: string,\n lightIcon: string,\n darkIcon: string,\n createBtn: string,\n isPresetTheme?: boolean,\n};\n"],"names":["GrowiThemeSchemeType","ColorScheme"],"mappings":"sHAEaA,EAAuB,CAClC,GAAGC,EAAA,YACH,KAAM,MACR"}
@@ -0,0 +1,19 @@
1
+ export declare const GrowiThemeSchemeType: {
2
+ readonly BOTH: "both";
3
+ readonly LIGHT: "light";
4
+ readonly DARK: "dark";
5
+ };
6
+ export type GrowiThemeSchemeType = typeof GrowiThemeSchemeType[keyof typeof GrowiThemeSchemeType];
7
+ export type GrowiThemeMetadata = {
8
+ name: string;
9
+ manifestKey: string;
10
+ schemeType: GrowiThemeSchemeType;
11
+ lightBg: string;
12
+ darkBg: string;
13
+ lightSidebar: string;
14
+ darkSidebar: string;
15
+ lightIcon: string;
16
+ darkIcon: string;
17
+ createBtn: string;
18
+ isPresetTheme?: boolean;
19
+ };
@@ -0,0 +1,9 @@
1
+ import { ColorScheme as e } from "./color-scheme.js";
2
+ const m = {
3
+ ...e,
4
+ BOTH: "both"
5
+ };
6
+ export {
7
+ m as GrowiThemeSchemeType
8
+ };
9
+ //# sourceMappingURL=growi-theme-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"growi-theme-metadata.js","sources":["../../src/interfaces/growi-theme-metadata.ts"],"sourcesContent":["import { ColorScheme } from './color-scheme';\n\nexport const GrowiThemeSchemeType = {\n ...ColorScheme,\n BOTH: 'both',\n} as const;\nexport type GrowiThemeSchemeType = typeof GrowiThemeSchemeType[keyof typeof GrowiThemeSchemeType];\n\nexport type GrowiThemeMetadata = {\n name: string,\n manifestKey: string,\n schemeType: GrowiThemeSchemeType,\n lightBg: string,\n darkBg: string,\n lightSidebar: string,\n darkSidebar: string,\n lightIcon: string,\n darkIcon: string,\n createBtn: string,\n isPresetTheme?: boolean,\n};\n"],"names":["GrowiThemeSchemeType","ColorScheme"],"mappings":";AAEO,MAAMA,IAAuB;AAAA,EAClC,GAAGC;AAAA,EACH,MAAM;AACR;"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=has-object-id.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-object-id.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export type HasObjectId = {
2
+ _id: string;
3
+ };
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=has-object-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-object-id.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./color-scheme.cjs"),r=require("./common.cjs"),a=require("./external-account.cjs"),s=require("./growi-theme-metadata.cjs"),t=require("./lang.cjs"),e=require("./page.cjs"),o=require("./revision.cjs"),i=require("./subscription.cjs"),u=require("./user.cjs"),c=require("./websocket.cjs");exports.ColorScheme=n.ColorScheme;exports.getIdForRef=r.getIdForRef;exports.isPopulated=r.isPopulated;exports.IExternalAuthProviderType=a.IExternalAuthProviderType;exports.GrowiThemeSchemeType=s.GrowiThemeSchemeType;exports.AllLang=t.AllLang;exports.Lang=t.Lang;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=o.Origin;exports.allOrigin=o.allOrigin;exports.AllSubscriptionStatusType=i.AllSubscriptionStatusType;exports.SubscriptionStatusType=i.SubscriptionStatusType;exports.USER_STATUS=u.USER_STATUS;exports.GlobalSocketEventName=c.GlobalSocketEventName;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ export * from './attachment';
2
+ export * from './color-scheme';
3
+ export * from './color-scheme';
4
+ export * from './common';
5
+ export * from './external-account';
6
+ export * from './growi-facade';
7
+ export * from './growi-theme-metadata';
8
+ export * from './has-object-id';
9
+ export * from './lang';
10
+ export * from './page';
11
+ export * from './revision';
12
+ export * from './subscription';
13
+ export * from './tag';
14
+ export * from './user';
15
+ export * from './vite';
16
+ export * from './websocket';
@@ -0,0 +1,32 @@
1
+ import { ColorScheme as e } from "./color-scheme.js";
2
+ import { getIdForRef as p, isPopulated as i } from "./common.js";
3
+ import { IExternalAuthProviderType as n } from "./external-account.js";
4
+ import { GrowiThemeSchemeType as m } from "./growi-theme-metadata.js";
5
+ import { AllLang as l, Lang as x } from "./lang.js";
6
+ import { GroupType as s, PageGrant as u, PageStatus as I, isIPageInfoForEntity as T, isIPageInfoForListing as P, isIPageInfoForOperation as y } from "./page.js";
7
+ import { Origin as h, allOrigin as A } from "./revision.js";
8
+ import { AllSubscriptionStatusType as F, SubscriptionStatusType as G } from "./subscription.js";
9
+ import { USER_STATUS as d } from "./user.js";
10
+ import { GlobalSocketEventName as O } from "./websocket.js";
11
+ export {
12
+ l as AllLang,
13
+ F as AllSubscriptionStatusType,
14
+ e as ColorScheme,
15
+ O as GlobalSocketEventName,
16
+ s as GroupType,
17
+ m as GrowiThemeSchemeType,
18
+ n as IExternalAuthProviderType,
19
+ x as Lang,
20
+ h as Origin,
21
+ u as PageGrant,
22
+ I as PageStatus,
23
+ G as SubscriptionStatusType,
24
+ d as USER_STATUS,
25
+ A as allOrigin,
26
+ p as getIdForRef,
27
+ T as isIPageInfoForEntity,
28
+ P as isIPageInfoForListing,
29
+ y as isIPageInfoForOperation,
30
+ i as isPopulated
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +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"},n=Object.values(e);exports.AllLang=n;exports.Lang=e;
2
+ //# sourceMappingURL=lang.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lang.cjs","sources":["../../src/interfaces/lang.ts"],"sourcesContent":["export const Lang = {\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 AllLang = Object.values(Lang);\nexport type Lang = typeof Lang[keyof typeof Lang];\n"],"names":["Lang","AllLang"],"mappings":"gFAAO,MAAMA,EAAO,CAClB,MAAO,QACP,MAAO,QACP,MAAO,QACP,MAAO,OACT,EACaC,EAAU,OAAO,OAAOD,CAAI"}
@@ -0,0 +1,8 @@
1
+ export declare const Lang: {
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 AllLang: ("en_US" | "ja_JP" | "zh_CN" | "fr_FR")[];
8
+ export type Lang = typeof Lang[keyof typeof Lang];
@@ -0,0 +1,11 @@
1
+ const _ = {
2
+ en_US: "en_US",
3
+ ja_JP: "ja_JP",
4
+ zh_CN: "zh_CN",
5
+ fr_FR: "fr_FR"
6
+ }, n = Object.values(_);
7
+ export {
8
+ n as AllLang,
9
+ _ as Lang
10
+ };
11
+ //# sourceMappingURL=lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lang.js","sources":["../../src/interfaces/lang.ts"],"sourcesContent":["export const Lang = {\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 AllLang = Object.values(Lang);\nexport type Lang = typeof Lang[keyof typeof Lang];\n"],"names":["Lang","AllLang"],"mappings":"AAAO,MAAMA,IAAO;AAAA,EAClB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT,GACaC,IAAU,OAAO,OAAOD,CAAI;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={userGroup:"UserGroup",externalUserGroup:"ExternalUserGroup"},n={GRANT_PUBLIC:1,GRANT_RESTRICTED:2,GRANT_SPECIFIED:3,GRANT_OWNER:4,GRANT_USER_GROUP:5},o={STATUS_PUBLISHED:"published",STATUS_DELETED:"deleted"},t=r=>r!=null,i=r=>r!=null&&t(r)&&("isBookmarked"in r||"isLiked"in r||"subscriptionStatus"in r),s=r=>r!=null&&t(r)&&"revisionShortBody"in r;exports.GroupType=e;exports.PageGrant=n;exports.PageStatus=o;exports.isIPageInfoForEntity=t;exports.isIPageInfoForListing=s;exports.isIPageInfoForOperation=i;
2
+ //# sourceMappingURL=page.cjs.map
@@ -0,0 +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;\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,KAIRC,EAA2BD,GAC/BA,GAAY,MACdD,EAAqBC,CAAQ,IAC5B,iBAAkBA,GAAY,YAAaA,GAAY,uBAAwBA,GAI1EE,EAAyBF,GAC7BA,GAAY,MACdD,EAAqBC,CAAQ,GAC7B,sBAAuBA"}
@@ -0,0 +1,113 @@
1
+ import { IUser, IUserGroup, IUserGroupHasId, IUserHasId } from './user';
2
+ import { ITag } from './tag';
3
+ import { SubscriptionStatusType } from './subscription';
4
+ import { IRevision, HasRevisionShortbody, IRevisionHasId } from './revision';
5
+ import { HasObjectId } from './has-object-id';
6
+ import { Ref } from './common';
7
+
8
+ export declare const GroupType: {
9
+ readonly userGroup: "UserGroup";
10
+ readonly externalUserGroup: "ExternalUserGroup";
11
+ };
12
+ export type GroupType = typeof GroupType[keyof typeof GroupType];
13
+ export type IGrantedGroup = {
14
+ type: GroupType;
15
+ item: Ref<IUserGroup>;
16
+ };
17
+ export type IPage = {
18
+ path: string;
19
+ status: string;
20
+ revision?: Ref<IRevision>;
21
+ tags: Ref<ITag>[];
22
+ creator?: Ref<IUser>;
23
+ createdAt: Date;
24
+ updatedAt: Date;
25
+ seenUsers: Ref<IUser>[];
26
+ parent: Ref<IPage> | null;
27
+ descendantCount: number;
28
+ isEmpty: boolean;
29
+ grant: PageGrant;
30
+ grantedUsers: Ref<IUser>[];
31
+ grantedGroups: IGrantedGroup[];
32
+ lastUpdateUser?: Ref<IUser>;
33
+ liker: Ref<IUser>[];
34
+ commentCount: number;
35
+ slackChannels: string;
36
+ deleteUser: Ref<IUser>;
37
+ deletedAt: Date;
38
+ latestRevision?: Ref<IRevision>;
39
+ latestRevisionBodyLength?: number;
40
+ expandContentWidth?: boolean;
41
+ wip?: boolean;
42
+ ttlTimestamp?: Date;
43
+ };
44
+ export type IPagePopulatedToShowRevision = Omit<IPageHasId, 'lastUpdateUser' | 'creator' | 'deleteUser' | 'grantedGroups' | 'revision' | 'author'> & {
45
+ lastUpdateUser?: IUserHasId;
46
+ creator?: IUserHasId;
47
+ deleteUser: IUserHasId;
48
+ grantedGroups: {
49
+ type: GroupType;
50
+ item: IUserGroupHasId;
51
+ }[];
52
+ revision?: IRevisionHasId;
53
+ author: IUserHasId;
54
+ };
55
+ export declare const PageGrant: {
56
+ readonly GRANT_PUBLIC: 1;
57
+ readonly GRANT_RESTRICTED: 2;
58
+ readonly GRANT_SPECIFIED: 3;
59
+ readonly GRANT_OWNER: 4;
60
+ readonly GRANT_USER_GROUP: 5;
61
+ };
62
+ type UnionPageGrantKeys = keyof typeof PageGrant;
63
+ export type PageGrant = typeof PageGrant[UnionPageGrantKeys];
64
+ export declare const PageStatus: {
65
+ readonly STATUS_PUBLISHED: "published";
66
+ readonly STATUS_DELETED: "deleted";
67
+ };
68
+ export type PageStatus = typeof PageStatus[keyof typeof PageStatus];
69
+ export type IPageHasId = IPage & HasObjectId;
70
+ export type IPageInfo = {
71
+ isV5Compatible: boolean;
72
+ isEmpty: boolean;
73
+ isMovable: boolean;
74
+ isDeletable: boolean;
75
+ isAbleToDeleteCompletely: boolean;
76
+ isRevertible: boolean;
77
+ };
78
+ export type IPageInfoForEntity = IPageInfo & {
79
+ bookmarkCount: number;
80
+ sumOfLikers: number;
81
+ likerIds: string[];
82
+ sumOfSeenUsers: number;
83
+ seenUserIds: string[];
84
+ contentAge: number;
85
+ descendantCount: number;
86
+ commentCount: number;
87
+ };
88
+ export type IPageInfoForOperation = IPageInfoForEntity & {
89
+ isBookmarked?: boolean;
90
+ isLiked?: boolean;
91
+ subscriptionStatus?: SubscriptionStatusType;
92
+ };
93
+ export type IPageInfoForListing = IPageInfoForEntity & HasRevisionShortbody;
94
+ export type IPageInfoAll = IPageInfo | IPageInfoForEntity | IPageInfoForOperation | IPageInfoForListing;
95
+ export declare const isIPageInfoForEntity: (pageInfo: any | undefined) => pageInfo is IPageInfoForEntity;
96
+ export declare const isIPageInfoForOperation: (pageInfo: any | undefined) => pageInfo is IPageInfoForOperation;
97
+ export declare const isIPageInfoForListing: (pageInfo: any | undefined) => pageInfo is IPageInfoForListing;
98
+ /**
99
+ * Union Distribution
100
+ * @param pageInfo
101
+ * @returns
102
+ */
103
+ export type IDataWithMeta<D = unknown, M = unknown> = {
104
+ data: D;
105
+ meta?: M;
106
+ };
107
+ export type IPageWithMeta<M = IPageInfoAll> = IDataWithMeta<IPageHasId, M>;
108
+ export type IPageToDeleteWithMeta<T = IPageInfoForEntity | unknown> = IDataWithMeta<HasObjectId & (IPage | {
109
+ path: string;
110
+ revision: string | null;
111
+ }), T>;
112
+ export type IPageToRenameWithMeta<T = IPageInfoForEntity | unknown> = IPageToDeleteWithMeta<T>;
113
+ export {};