@contractspec/example.saas-boilerplate 1.44.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 (142) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +113 -0
  2. package/.turbo/turbo-build.log +114 -0
  3. package/CHANGELOG.md +246 -0
  4. package/LICENSE +21 -0
  5. package/README.md +156 -0
  6. package/dist/billing/billing.entity.d.ts +61 -0
  7. package/dist/billing/billing.entity.d.ts.map +1 -0
  8. package/dist/billing/billing.entity.js +122 -0
  9. package/dist/billing/billing.entity.js.map +1 -0
  10. package/dist/billing/billing.enum.d.ts +16 -0
  11. package/dist/billing/billing.enum.d.ts.map +1 -0
  12. package/dist/billing/billing.enum.js +27 -0
  13. package/dist/billing/billing.enum.js.map +1 -0
  14. package/dist/billing/billing.event.d.ts +86 -0
  15. package/dist/billing/billing.event.d.ts.map +1 -0
  16. package/dist/billing/billing.event.js +153 -0
  17. package/dist/billing/billing.event.js.map +1 -0
  18. package/dist/billing/billing.handler.d.ts +82 -0
  19. package/dist/billing/billing.handler.d.ts.map +1 -0
  20. package/dist/billing/billing.handler.js +58 -0
  21. package/dist/billing/billing.handler.js.map +1 -0
  22. package/dist/billing/billing.operations.d.ts +166 -0
  23. package/dist/billing/billing.operations.d.ts.map +1 -0
  24. package/dist/billing/billing.operations.js +181 -0
  25. package/dist/billing/billing.operations.js.map +1 -0
  26. package/dist/billing/billing.presentation.d.ts +15 -0
  27. package/dist/billing/billing.presentation.d.ts.map +1 -0
  28. package/dist/billing/billing.presentation.js +59 -0
  29. package/dist/billing/billing.presentation.js.map +1 -0
  30. package/dist/billing/billing.schema.d.ts +201 -0
  31. package/dist/billing/billing.schema.d.ts.map +1 -0
  32. package/dist/billing/billing.schema.js +214 -0
  33. package/dist/billing/billing.schema.js.map +1 -0
  34. package/dist/billing/index.d.ts +8 -0
  35. package/dist/billing/index.js +9 -0
  36. package/dist/dashboard/dashboard.presentation.d.ts +15 -0
  37. package/dist/dashboard/dashboard.presentation.d.ts.map +1 -0
  38. package/dist/dashboard/dashboard.presentation.js +55 -0
  39. package/dist/dashboard/dashboard.presentation.js.map +1 -0
  40. package/dist/dashboard/index.d.ts +2 -0
  41. package/dist/dashboard/index.js +3 -0
  42. package/dist/docs/index.d.ts +1 -0
  43. package/dist/docs/index.js +1 -0
  44. package/dist/docs/saas-boilerplate.docblock.d.ts +1 -0
  45. package/dist/docs/saas-boilerplate.docblock.js +100 -0
  46. package/dist/docs/saas-boilerplate.docblock.js.map +1 -0
  47. package/dist/example.d.ts +37 -0
  48. package/dist/example.d.ts.map +1 -0
  49. package/dist/example.js +46 -0
  50. package/dist/example.js.map +1 -0
  51. package/dist/handlers/index.d.ts +3 -0
  52. package/dist/handlers/index.js +4 -0
  53. package/dist/index.d.ts +42 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +69 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/presentations/index.d.ts +17 -0
  58. package/dist/presentations/index.d.ts.map +1 -0
  59. package/dist/presentations/index.js +17 -0
  60. package/dist/presentations/index.js.map +1 -0
  61. package/dist/project/index.d.ts +8 -0
  62. package/dist/project/index.js +9 -0
  63. package/dist/project/project.entity.d.ts +40 -0
  64. package/dist/project/project.entity.d.ts.map +1 -0
  65. package/dist/project/project.entity.js +85 -0
  66. package/dist/project/project.entity.js.map +1 -0
  67. package/dist/project/project.enum.d.ts +16 -0
  68. package/dist/project/project.enum.d.ts.map +1 -0
  69. package/dist/project/project.enum.js +26 -0
  70. package/dist/project/project.enum.js.map +1 -0
  71. package/dist/project/project.event.d.ts +92 -0
  72. package/dist/project/project.event.d.ts.map +1 -0
  73. package/dist/project/project.event.js +165 -0
  74. package/dist/project/project.event.js.map +1 -0
  75. package/dist/project/project.handler.d.ts +72 -0
  76. package/dist/project/project.handler.d.ts.map +1 -0
  77. package/dist/project/project.handler.js +82 -0
  78. package/dist/project/project.handler.js.map +1 -0
  79. package/dist/project/project.operations.d.ts +419 -0
  80. package/dist/project/project.operations.d.ts.map +1 -0
  81. package/dist/project/project.operations.js +260 -0
  82. package/dist/project/project.operations.js.map +1 -0
  83. package/dist/project/project.presentation.d.ts +15 -0
  84. package/dist/project/project.presentation.d.ts.map +1 -0
  85. package/dist/project/project.presentation.js +65 -0
  86. package/dist/project/project.presentation.js.map +1 -0
  87. package/dist/project/project.schema.d.ts +235 -0
  88. package/dist/project/project.schema.d.ts.map +1 -0
  89. package/dist/project/project.schema.js +215 -0
  90. package/dist/project/project.schema.js.map +1 -0
  91. package/dist/saas-boilerplate.feature.d.ts +12 -0
  92. package/dist/saas-boilerplate.feature.d.ts.map +1 -0
  93. package/dist/saas-boilerplate.feature.js +201 -0
  94. package/dist/saas-boilerplate.feature.js.map +1 -0
  95. package/dist/settings/index.d.ts +3 -0
  96. package/dist/settings/index.js +4 -0
  97. package/dist/settings/settings.entity.d.ts +37 -0
  98. package/dist/settings/settings.entity.d.ts.map +1 -0
  99. package/dist/settings/settings.entity.js +78 -0
  100. package/dist/settings/settings.entity.js.map +1 -0
  101. package/dist/settings/settings.enum.d.ts +10 -0
  102. package/dist/settings/settings.enum.d.ts.map +1 -0
  103. package/dist/settings/settings.enum.js +21 -0
  104. package/dist/settings/settings.enum.js.map +1 -0
  105. package/dist/shared/mock-data.d.ts +86 -0
  106. package/dist/shared/mock-data.d.ts.map +1 -0
  107. package/dist/shared/mock-data.js +138 -0
  108. package/dist/shared/mock-data.js.map +1 -0
  109. package/example.ts +1 -0
  110. package/package.json +113 -0
  111. package/src/billing/billing.entity.ts +158 -0
  112. package/src/billing/billing.enum.ts +23 -0
  113. package/src/billing/billing.event.ts +108 -0
  114. package/src/billing/billing.handler.ts +137 -0
  115. package/src/billing/billing.operations.ts +187 -0
  116. package/src/billing/billing.presentation.ts +57 -0
  117. package/src/billing/billing.schema.ts +133 -0
  118. package/src/billing/index.ts +64 -0
  119. package/src/dashboard/dashboard.presentation.ts +57 -0
  120. package/src/dashboard/index.ts +8 -0
  121. package/src/docs/index.ts +1 -0
  122. package/src/docs/saas-boilerplate.docblock.ts +98 -0
  123. package/src/example.ts +31 -0
  124. package/src/handlers/index.ts +20 -0
  125. package/src/index.ts +71 -0
  126. package/src/presentations/index.ts +36 -0
  127. package/src/project/index.ts +66 -0
  128. package/src/project/project.entity.ts +93 -0
  129. package/src/project/project.enum.ts +22 -0
  130. package/src/project/project.event.ts +128 -0
  131. package/src/project/project.handler.ts +168 -0
  132. package/src/project/project.operations.ts +272 -0
  133. package/src/project/project.presentation.ts +59 -0
  134. package/src/project/project.schema.ts +147 -0
  135. package/src/saas-boilerplate.feature.ts +109 -0
  136. package/src/settings/index.ts +9 -0
  137. package/src/settings/settings.entity.ts +89 -0
  138. package/src/settings/settings.enum.ts +11 -0
  139. package/src/shared/mock-data.ts +110 -0
  140. package/tsconfig.json +10 -0
  141. package/tsconfig.tsbuildinfo +1 -0
  142. package/tsdown.config.js +7 -0
@@ -0,0 +1,72 @@
1
+ //#region src/project/project.handler.d.ts
2
+ interface Project {
3
+ id: string;
4
+ name: string;
5
+ description?: string;
6
+ slug?: string;
7
+ organizationId: string;
8
+ createdBy: string;
9
+ status: 'DRAFT' | 'ACTIVE' | 'ARCHIVED' | 'DELETED';
10
+ isPublic: boolean;
11
+ tags: string[];
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ }
15
+ interface CreateProjectInput {
16
+ name: string;
17
+ description?: string;
18
+ slug?: string;
19
+ isPublic?: boolean;
20
+ tags?: string[];
21
+ }
22
+ interface UpdateProjectInput {
23
+ projectId: string;
24
+ name?: string;
25
+ description?: string;
26
+ slug?: string;
27
+ isPublic?: boolean;
28
+ tags?: string[];
29
+ status?: 'DRAFT' | 'ACTIVE' | 'ARCHIVED' | 'DELETED';
30
+ }
31
+ interface ListProjectsInput {
32
+ status?: 'DRAFT' | 'ACTIVE' | 'ARCHIVED' | 'all';
33
+ search?: string;
34
+ limit?: number;
35
+ offset?: number;
36
+ }
37
+ interface ListProjectsOutput {
38
+ projects: Project[];
39
+ total: number;
40
+ }
41
+ /**
42
+ * Mock handler for ListProjectsContract.
43
+ */
44
+ declare function mockListProjectsHandler(input: ListProjectsInput): Promise<ListProjectsOutput>;
45
+ /**
46
+ * Mock handler for GetProjectContract.
47
+ */
48
+ declare function mockGetProjectHandler(input: {
49
+ projectId: string;
50
+ }): Promise<Project>;
51
+ /**
52
+ * Mock handler for CreateProjectContract.
53
+ */
54
+ declare function mockCreateProjectHandler(input: CreateProjectInput, context: {
55
+ organizationId: string;
56
+ userId: string;
57
+ }): Promise<Project>;
58
+ /**
59
+ * Mock handler for UpdateProjectContract.
60
+ */
61
+ declare function mockUpdateProjectHandler(input: UpdateProjectInput): Promise<Project>;
62
+ /**
63
+ * Mock handler for DeleteProjectContract.
64
+ */
65
+ declare function mockDeleteProjectHandler(input: {
66
+ projectId: string;
67
+ }): Promise<{
68
+ success: boolean;
69
+ }>;
70
+ //#endregion
71
+ export { CreateProjectInput, ListProjectsInput, ListProjectsOutput, Project, UpdateProjectInput, mockCreateProjectHandler, mockDeleteProjectHandler, mockGetProjectHandler, mockListProjectsHandler, mockUpdateProjectHandler };
72
+ //# sourceMappingURL=project.handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.handler.d.ts","names":[],"sources":["../../src/project/project.handler.ts"],"sourcesContent":[],"mappings":";UAMiB,OAAA;EAAA,EAAA,EAAA,MAAO;EAcP,IAAA,EAAA,MAAA;EAQA,WAAA,CAAA,EAAA,MAAA;EAUA,IAAA,CAAA,EAAA,MAAA;EAOA,cAAA,EAAA,MAAkB;EAQb,SAAA,EAAA,MAAA;EACb,MAAA,EAAA,OAAA,GAAA,QAAA,GAAA,UAAA,GAAA,SAAA;EACE,QAAA,EAAA,OAAA;EAAR,IAAA,EAAA,MAAA,EAAA;EAAO,SAAA,EAvCG,IAuCH;EAiCY,SAAA,EAvET,IAuES;AAetB;AACS,UApFQ,kBAAA,CAoFR;EAEE,IAAA,EAAA,MAAA;EAAR,WAAA,CAAA,EAAA,MAAA;EAAO,IAAA,CAAA,EAAA,MAAA;EA2BY,QAAA,CAAA,EAAA,OAAA;EACb,IAAA,CAAA,EAAA,MAAA,EAAA;;AACN,UA3Gc,kBAAA,CA2Gd;EAAO,SAAA,EAAA,MAAA;EAsBY,IAAA,CAAA,EAAA,MAAA;;;;;;;UAvHL,iBAAA;;;;;;UAOA,kBAAA;YACL;;;;;;iBAOU,uBAAA,QACb,oBACN,QAAQ;;;;iBAiCW,qBAAA;;IAElB,QAAQ;;;;iBAaU,wBAAA,QACb;;;IAEN,QAAQ;;;;iBA2BW,wBAAA,QACb,qBACN,QAAQ;;;;iBAsBW,wBAAA;;IAElB"}
@@ -0,0 +1,82 @@
1
+ import { MOCK_PROJECTS } from "../shared/mock-data.js";
2
+
3
+ //#region src/project/project.handler.ts
4
+ /**
5
+ * Mock handlers for Project contracts.
6
+ */
7
+ /**
8
+ * Mock handler for ListProjectsContract.
9
+ */
10
+ async function mockListProjectsHandler(input) {
11
+ const { status, search, limit = 20, offset = 0 } = input;
12
+ let filtered = [...MOCK_PROJECTS];
13
+ if (status && status !== "all") filtered = filtered.filter((p) => p.status === status);
14
+ if (search) {
15
+ const q = search.toLowerCase();
16
+ filtered = filtered.filter((p) => p.name.toLowerCase().includes(q) || p.description?.toLowerCase().includes(q) || p.tags.some((t) => t.toLowerCase().includes(q)));
17
+ }
18
+ filtered.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime());
19
+ const total = filtered.length;
20
+ return {
21
+ projects: filtered.slice(offset, offset + limit),
22
+ total
23
+ };
24
+ }
25
+ /**
26
+ * Mock handler for GetProjectContract.
27
+ */
28
+ async function mockGetProjectHandler(input) {
29
+ const project = MOCK_PROJECTS.find((p) => p.id === input.projectId);
30
+ if (!project) throw new Error("NOT_FOUND");
31
+ return project;
32
+ }
33
+ /**
34
+ * Mock handler for CreateProjectContract.
35
+ */
36
+ async function mockCreateProjectHandler(input, context) {
37
+ if (input.slug) {
38
+ if (MOCK_PROJECTS.some((p) => p.slug === input.slug)) throw new Error("SLUG_EXISTS");
39
+ }
40
+ const now = /* @__PURE__ */ new Date();
41
+ return {
42
+ id: `proj-${Date.now()}`,
43
+ name: input.name,
44
+ description: input.description,
45
+ slug: input.slug ?? input.name.toLowerCase().replace(/\s+/g, "-"),
46
+ organizationId: context.organizationId,
47
+ createdBy: context.userId,
48
+ status: "DRAFT",
49
+ isPublic: input.isPublic ?? false,
50
+ tags: input.tags ?? [],
51
+ createdAt: now,
52
+ updatedAt: now
53
+ };
54
+ }
55
+ /**
56
+ * Mock handler for UpdateProjectContract.
57
+ */
58
+ async function mockUpdateProjectHandler(input) {
59
+ const project = MOCK_PROJECTS.find((p) => p.id === input.projectId);
60
+ if (!project) throw new Error("NOT_FOUND");
61
+ return {
62
+ ...project,
63
+ name: input.name ?? project.name,
64
+ description: input.description ?? project.description,
65
+ slug: input.slug ?? project.slug,
66
+ isPublic: input.isPublic ?? project.isPublic,
67
+ tags: input.tags ?? project.tags,
68
+ status: input.status ?? project.status,
69
+ updatedAt: /* @__PURE__ */ new Date()
70
+ };
71
+ }
72
+ /**
73
+ * Mock handler for DeleteProjectContract.
74
+ */
75
+ async function mockDeleteProjectHandler(input) {
76
+ if (!MOCK_PROJECTS.find((p) => p.id === input.projectId)) throw new Error("NOT_FOUND");
77
+ return { success: true };
78
+ }
79
+
80
+ //#endregion
81
+ export { mockCreateProjectHandler, mockDeleteProjectHandler, mockGetProjectHandler, mockListProjectsHandler, mockUpdateProjectHandler };
82
+ //# sourceMappingURL=project.handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.handler.js","names":[],"sources":["../../src/project/project.handler.ts"],"sourcesContent":["/**\n * Mock handlers for Project contracts.\n */\nimport { MOCK_PROJECTS } from '../shared/mock-data';\n\n// Types inferred from contract schemas\nexport interface Project {\n id: string;\n name: string;\n description?: string;\n slug?: string;\n organizationId: string;\n createdBy: string;\n status: 'DRAFT' | 'ACTIVE' | 'ARCHIVED' | 'DELETED';\n isPublic: boolean;\n tags: string[];\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface CreateProjectInput {\n name: string;\n description?: string;\n slug?: string;\n isPublic?: boolean;\n tags?: string[];\n}\n\nexport interface UpdateProjectInput {\n projectId: string;\n name?: string;\n description?: string;\n slug?: string;\n isPublic?: boolean;\n tags?: string[];\n status?: 'DRAFT' | 'ACTIVE' | 'ARCHIVED' | 'DELETED';\n}\n\nexport interface ListProjectsInput {\n status?: 'DRAFT' | 'ACTIVE' | 'ARCHIVED' | 'all';\n search?: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface ListProjectsOutput {\n projects: Project[];\n total: number;\n}\n\n/**\n * Mock handler for ListProjectsContract.\n */\nexport async function mockListProjectsHandler(\n input: ListProjectsInput\n): Promise<ListProjectsOutput> {\n const { status, search, limit = 20, offset = 0 } = input;\n\n let filtered = [...MOCK_PROJECTS];\n\n if (status && status !== 'all') {\n filtered = filtered.filter((p) => p.status === status);\n }\n\n if (search) {\n const q = search.toLowerCase();\n filtered = filtered.filter(\n (p) =>\n p.name.toLowerCase().includes(q) ||\n p.description?.toLowerCase().includes(q) ||\n p.tags.some((t) => t.toLowerCase().includes(q))\n );\n }\n\n filtered.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime());\n\n const total = filtered.length;\n const projects = filtered.slice(offset, offset + limit);\n\n return {\n projects,\n total,\n };\n}\n\n/**\n * Mock handler for GetProjectContract.\n */\nexport async function mockGetProjectHandler(input: {\n projectId: string;\n}): Promise<Project> {\n const project = MOCK_PROJECTS.find((p) => p.id === input.projectId);\n\n if (!project) {\n throw new Error('NOT_FOUND');\n }\n\n return project;\n}\n\n/**\n * Mock handler for CreateProjectContract.\n */\nexport async function mockCreateProjectHandler(\n input: CreateProjectInput,\n context: { organizationId: string; userId: string }\n): Promise<Project> {\n if (input.slug) {\n const exists = MOCK_PROJECTS.some((p) => p.slug === input.slug);\n if (exists) {\n throw new Error('SLUG_EXISTS');\n }\n }\n\n const now = new Date();\n return {\n id: `proj-${Date.now()}`,\n name: input.name,\n description: input.description,\n slug: input.slug ?? input.name.toLowerCase().replace(/\\s+/g, '-'),\n organizationId: context.organizationId,\n createdBy: context.userId,\n status: 'DRAFT',\n isPublic: input.isPublic ?? false,\n tags: input.tags ?? [],\n createdAt: now,\n updatedAt: now,\n };\n}\n\n/**\n * Mock handler for UpdateProjectContract.\n */\nexport async function mockUpdateProjectHandler(\n input: UpdateProjectInput\n): Promise<Project> {\n const project = MOCK_PROJECTS.find((p) => p.id === input.projectId);\n\n if (!project) {\n throw new Error('NOT_FOUND');\n }\n\n return {\n ...project,\n name: input.name ?? project.name,\n description: input.description ?? project.description,\n slug: input.slug ?? project.slug,\n isPublic: input.isPublic ?? project.isPublic,\n tags: input.tags ?? project.tags,\n status: input.status ?? project.status,\n updatedAt: new Date(),\n };\n}\n\n/**\n * Mock handler for DeleteProjectContract.\n */\nexport async function mockDeleteProjectHandler(input: {\n projectId: string;\n}): Promise<{ success: boolean }> {\n const project = MOCK_PROJECTS.find((p) => p.id === input.projectId);\n\n if (!project) {\n throw new Error('NOT_FOUND');\n }\n\n return { success: true };\n}\n"],"mappings":";;;;;;;;;AAqDA,eAAsB,wBACpB,OAC6B;CAC7B,MAAM,EAAE,QAAQ,QAAQ,QAAQ,IAAI,SAAS,MAAM;CAEnD,IAAI,WAAW,CAAC,GAAG,cAAc;AAEjC,KAAI,UAAU,WAAW,MACvB,YAAW,SAAS,QAAQ,MAAM,EAAE,WAAW,OAAO;AAGxD,KAAI,QAAQ;EACV,MAAM,IAAI,OAAO,aAAa;AAC9B,aAAW,SAAS,QACjB,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,IAChC,EAAE,aAAa,aAAa,CAAC,SAAS,EAAE,IACxC,EAAE,KAAK,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CAClD;;AAGH,UAAS,MAAM,GAAG,MAAM,EAAE,UAAU,SAAS,GAAG,EAAE,UAAU,SAAS,CAAC;CAEtE,MAAM,QAAQ,SAAS;AAGvB,QAAO;EACL,UAHe,SAAS,MAAM,QAAQ,SAAS,MAAM;EAIrD;EACD;;;;;AAMH,eAAsB,sBAAsB,OAEvB;CACnB,MAAM,UAAU,cAAc,MAAM,MAAM,EAAE,OAAO,MAAM,UAAU;AAEnE,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,YAAY;AAG9B,QAAO;;;;;AAMT,eAAsB,yBACpB,OACA,SACkB;AAClB,KAAI,MAAM,MAER;MADe,cAAc,MAAM,MAAM,EAAE,SAAS,MAAM,KAAK,CAE7D,OAAM,IAAI,MAAM,cAAc;;CAIlC,MAAM,sBAAM,IAAI,MAAM;AACtB,QAAO;EACL,IAAI,QAAQ,KAAK,KAAK;EACtB,MAAM,MAAM;EACZ,aAAa,MAAM;EACnB,MAAM,MAAM,QAAQ,MAAM,KAAK,aAAa,CAAC,QAAQ,QAAQ,IAAI;EACjE,gBAAgB,QAAQ;EACxB,WAAW,QAAQ;EACnB,QAAQ;EACR,UAAU,MAAM,YAAY;EAC5B,MAAM,MAAM,QAAQ,EAAE;EACtB,WAAW;EACX,WAAW;EACZ;;;;;AAMH,eAAsB,yBACpB,OACkB;CAClB,MAAM,UAAU,cAAc,MAAM,MAAM,EAAE,OAAO,MAAM,UAAU;AAEnE,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,YAAY;AAG9B,QAAO;EACL,GAAG;EACH,MAAM,MAAM,QAAQ,QAAQ;EAC5B,aAAa,MAAM,eAAe,QAAQ;EAC1C,MAAM,MAAM,QAAQ,QAAQ;EAC5B,UAAU,MAAM,YAAY,QAAQ;EACpC,MAAM,MAAM,QAAQ,QAAQ;EAC5B,QAAQ,MAAM,UAAU,QAAQ;EAChC,2BAAW,IAAI,MAAM;EACtB;;;;;AAMH,eAAsB,yBAAyB,OAEb;AAGhC,KAAI,CAFY,cAAc,MAAM,MAAM,EAAE,OAAO,MAAM,UAAU,CAGjE,OAAM,IAAI,MAAM,YAAY;AAG9B,QAAO,EAAE,SAAS,MAAM"}
@@ -0,0 +1,419 @@
1
+ import * as _contractspec_lib_schema192 from "@contractspec/lib.schema";
2
+ import * as _contractspec_lib_contracts10 from "@contractspec/lib.contracts";
3
+
4
+ //#region src/project/project.operations.d.ts
5
+ /**
6
+ * Create a new project.
7
+ */
8
+ declare const CreateProjectContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema192.SchemaModel<{
9
+ name: {
10
+ type: _contractspec_lib_schema192.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ description: {
14
+ type: _contractspec_lib_schema192.FieldType<string, string>;
15
+ isOptional: true;
16
+ };
17
+ slug: {
18
+ type: _contractspec_lib_schema192.FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ isPublic: {
22
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
23
+ isOptional: true;
24
+ };
25
+ tags: {
26
+ type: _contractspec_lib_schema192.FieldType<string, string>;
27
+ isArray: true;
28
+ isOptional: true;
29
+ };
30
+ }>, _contractspec_lib_schema192.SchemaModel<{
31
+ id: {
32
+ type: _contractspec_lib_schema192.FieldType<string, string>;
33
+ isOptional: false;
34
+ };
35
+ name: {
36
+ type: _contractspec_lib_schema192.FieldType<string, string>;
37
+ isOptional: false;
38
+ };
39
+ description: {
40
+ type: _contractspec_lib_schema192.FieldType<string, string>;
41
+ isOptional: true;
42
+ };
43
+ slug: {
44
+ type: _contractspec_lib_schema192.FieldType<string, string>;
45
+ isOptional: true;
46
+ };
47
+ organizationId: {
48
+ type: _contractspec_lib_schema192.FieldType<string, string>;
49
+ isOptional: false;
50
+ };
51
+ createdBy: {
52
+ type: _contractspec_lib_schema192.FieldType<string, string>;
53
+ isOptional: false;
54
+ };
55
+ status: {
56
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
57
+ isOptional: false;
58
+ };
59
+ isPublic: {
60
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
61
+ isOptional: false;
62
+ };
63
+ tags: {
64
+ type: _contractspec_lib_schema192.FieldType<string, string>;
65
+ isArray: true;
66
+ isOptional: false;
67
+ };
68
+ createdAt: {
69
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
70
+ isOptional: false;
71
+ };
72
+ updatedAt: {
73
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
74
+ isOptional: false;
75
+ };
76
+ }>, {
77
+ key: string;
78
+ version: number;
79
+ when: string;
80
+ payload: _contractspec_lib_schema192.SchemaModel<{
81
+ id: {
82
+ type: _contractspec_lib_schema192.FieldType<string, string>;
83
+ isOptional: false;
84
+ };
85
+ name: {
86
+ type: _contractspec_lib_schema192.FieldType<string, string>;
87
+ isOptional: false;
88
+ };
89
+ description: {
90
+ type: _contractspec_lib_schema192.FieldType<string, string>;
91
+ isOptional: true;
92
+ };
93
+ slug: {
94
+ type: _contractspec_lib_schema192.FieldType<string, string>;
95
+ isOptional: true;
96
+ };
97
+ organizationId: {
98
+ type: _contractspec_lib_schema192.FieldType<string, string>;
99
+ isOptional: false;
100
+ };
101
+ createdBy: {
102
+ type: _contractspec_lib_schema192.FieldType<string, string>;
103
+ isOptional: false;
104
+ };
105
+ status: {
106
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
107
+ isOptional: false;
108
+ };
109
+ isPublic: {
110
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
111
+ isOptional: false;
112
+ };
113
+ tags: {
114
+ type: _contractspec_lib_schema192.FieldType<string, string>;
115
+ isArray: true;
116
+ isOptional: false;
117
+ };
118
+ createdAt: {
119
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
120
+ isOptional: false;
121
+ };
122
+ updatedAt: {
123
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
124
+ isOptional: false;
125
+ };
126
+ }>;
127
+ }[]>;
128
+ /**
129
+ * Get project by ID.
130
+ */
131
+ declare const GetProjectContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema192.SchemaModel<{
132
+ projectId: {
133
+ type: _contractspec_lib_schema192.FieldType<string, string>;
134
+ isOptional: false;
135
+ };
136
+ }>, _contractspec_lib_schema192.SchemaModel<{
137
+ id: {
138
+ type: _contractspec_lib_schema192.FieldType<string, string>;
139
+ isOptional: false;
140
+ };
141
+ name: {
142
+ type: _contractspec_lib_schema192.FieldType<string, string>;
143
+ isOptional: false;
144
+ };
145
+ description: {
146
+ type: _contractspec_lib_schema192.FieldType<string, string>;
147
+ isOptional: true;
148
+ };
149
+ slug: {
150
+ type: _contractspec_lib_schema192.FieldType<string, string>;
151
+ isOptional: true;
152
+ };
153
+ organizationId: {
154
+ type: _contractspec_lib_schema192.FieldType<string, string>;
155
+ isOptional: false;
156
+ };
157
+ createdBy: {
158
+ type: _contractspec_lib_schema192.FieldType<string, string>;
159
+ isOptional: false;
160
+ };
161
+ status: {
162
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
163
+ isOptional: false;
164
+ };
165
+ isPublic: {
166
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
167
+ isOptional: false;
168
+ };
169
+ tags: {
170
+ type: _contractspec_lib_schema192.FieldType<string, string>;
171
+ isArray: true;
172
+ isOptional: false;
173
+ };
174
+ createdAt: {
175
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
176
+ isOptional: false;
177
+ };
178
+ updatedAt: {
179
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
180
+ isOptional: false;
181
+ };
182
+ }>, undefined>;
183
+ /**
184
+ * Update a project.
185
+ */
186
+ declare const UpdateProjectContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema192.SchemaModel<{
187
+ projectId: {
188
+ type: _contractspec_lib_schema192.FieldType<string, string>;
189
+ isOptional: false;
190
+ };
191
+ name: {
192
+ type: _contractspec_lib_schema192.FieldType<string, string>;
193
+ isOptional: true;
194
+ };
195
+ description: {
196
+ type: _contractspec_lib_schema192.FieldType<string, string>;
197
+ isOptional: true;
198
+ };
199
+ slug: {
200
+ type: _contractspec_lib_schema192.FieldType<string, string>;
201
+ isOptional: true;
202
+ };
203
+ isPublic: {
204
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
205
+ isOptional: true;
206
+ };
207
+ tags: {
208
+ type: _contractspec_lib_schema192.FieldType<string, string>;
209
+ isArray: true;
210
+ isOptional: true;
211
+ };
212
+ status: {
213
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
214
+ isOptional: true;
215
+ };
216
+ }>, _contractspec_lib_schema192.SchemaModel<{
217
+ id: {
218
+ type: _contractspec_lib_schema192.FieldType<string, string>;
219
+ isOptional: false;
220
+ };
221
+ name: {
222
+ type: _contractspec_lib_schema192.FieldType<string, string>;
223
+ isOptional: false;
224
+ };
225
+ description: {
226
+ type: _contractspec_lib_schema192.FieldType<string, string>;
227
+ isOptional: true;
228
+ };
229
+ slug: {
230
+ type: _contractspec_lib_schema192.FieldType<string, string>;
231
+ isOptional: true;
232
+ };
233
+ organizationId: {
234
+ type: _contractspec_lib_schema192.FieldType<string, string>;
235
+ isOptional: false;
236
+ };
237
+ createdBy: {
238
+ type: _contractspec_lib_schema192.FieldType<string, string>;
239
+ isOptional: false;
240
+ };
241
+ status: {
242
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
243
+ isOptional: false;
244
+ };
245
+ isPublic: {
246
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
247
+ isOptional: false;
248
+ };
249
+ tags: {
250
+ type: _contractspec_lib_schema192.FieldType<string, string>;
251
+ isArray: true;
252
+ isOptional: false;
253
+ };
254
+ createdAt: {
255
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
256
+ isOptional: false;
257
+ };
258
+ updatedAt: {
259
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
260
+ isOptional: false;
261
+ };
262
+ }>, {
263
+ key: string;
264
+ version: number;
265
+ when: string;
266
+ payload: _contractspec_lib_schema192.SchemaModel<{
267
+ id: {
268
+ type: _contractspec_lib_schema192.FieldType<string, string>;
269
+ isOptional: false;
270
+ };
271
+ name: {
272
+ type: _contractspec_lib_schema192.FieldType<string, string>;
273
+ isOptional: false;
274
+ };
275
+ description: {
276
+ type: _contractspec_lib_schema192.FieldType<string, string>;
277
+ isOptional: true;
278
+ };
279
+ slug: {
280
+ type: _contractspec_lib_schema192.FieldType<string, string>;
281
+ isOptional: true;
282
+ };
283
+ organizationId: {
284
+ type: _contractspec_lib_schema192.FieldType<string, string>;
285
+ isOptional: false;
286
+ };
287
+ createdBy: {
288
+ type: _contractspec_lib_schema192.FieldType<string, string>;
289
+ isOptional: false;
290
+ };
291
+ status: {
292
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
293
+ isOptional: false;
294
+ };
295
+ isPublic: {
296
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
297
+ isOptional: false;
298
+ };
299
+ tags: {
300
+ type: _contractspec_lib_schema192.FieldType<string, string>;
301
+ isArray: true;
302
+ isOptional: false;
303
+ };
304
+ createdAt: {
305
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
306
+ isOptional: false;
307
+ };
308
+ updatedAt: {
309
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
310
+ isOptional: false;
311
+ };
312
+ }>;
313
+ }[]>;
314
+ /**
315
+ * Delete a project.
316
+ */
317
+ declare const DeleteProjectContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema192.SchemaModel<{
318
+ projectId: {
319
+ type: _contractspec_lib_schema192.FieldType<string, string>;
320
+ isOptional: false;
321
+ };
322
+ }>, _contractspec_lib_schema192.SchemaModel<{
323
+ success: {
324
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
325
+ isOptional: false;
326
+ };
327
+ }>, {
328
+ key: string;
329
+ version: number;
330
+ when: string;
331
+ payload: _contractspec_lib_schema192.SchemaModel<{
332
+ projectId: {
333
+ type: _contractspec_lib_schema192.FieldType<string, string>;
334
+ isOptional: false;
335
+ };
336
+ }>;
337
+ }[]>;
338
+ /**
339
+ * List organization projects.
340
+ */
341
+ declare const ListProjectsContract: _contractspec_lib_contracts10.OperationSpec<_contractspec_lib_schema192.SchemaModel<{
342
+ status: {
343
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
344
+ isOptional: true;
345
+ };
346
+ search: {
347
+ type: _contractspec_lib_schema192.FieldType<string, string>;
348
+ isOptional: true;
349
+ };
350
+ limit: {
351
+ type: _contractspec_lib_schema192.FieldType<number, number>;
352
+ isOptional: true;
353
+ defaultValue: number;
354
+ };
355
+ offset: {
356
+ type: _contractspec_lib_schema192.FieldType<number, number>;
357
+ isOptional: true;
358
+ defaultValue: number;
359
+ };
360
+ }>, _contractspec_lib_schema192.SchemaModel<{
361
+ projects: {
362
+ type: _contractspec_lib_schema192.SchemaModel<{
363
+ id: {
364
+ type: _contractspec_lib_schema192.FieldType<string, string>;
365
+ isOptional: false;
366
+ };
367
+ name: {
368
+ type: _contractspec_lib_schema192.FieldType<string, string>;
369
+ isOptional: false;
370
+ };
371
+ description: {
372
+ type: _contractspec_lib_schema192.FieldType<string, string>;
373
+ isOptional: true;
374
+ };
375
+ slug: {
376
+ type: _contractspec_lib_schema192.FieldType<string, string>;
377
+ isOptional: true;
378
+ };
379
+ organizationId: {
380
+ type: _contractspec_lib_schema192.FieldType<string, string>;
381
+ isOptional: false;
382
+ };
383
+ createdBy: {
384
+ type: _contractspec_lib_schema192.FieldType<string, string>;
385
+ isOptional: false;
386
+ };
387
+ status: {
388
+ type: _contractspec_lib_schema192.EnumType<[string, string, string, string]>;
389
+ isOptional: false;
390
+ };
391
+ isPublic: {
392
+ type: _contractspec_lib_schema192.FieldType<boolean, boolean>;
393
+ isOptional: false;
394
+ };
395
+ tags: {
396
+ type: _contractspec_lib_schema192.FieldType<string, string>;
397
+ isArray: true;
398
+ isOptional: false;
399
+ };
400
+ createdAt: {
401
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
402
+ isOptional: false;
403
+ };
404
+ updatedAt: {
405
+ type: _contractspec_lib_schema192.FieldType<Date, string>;
406
+ isOptional: false;
407
+ };
408
+ }>;
409
+ isArray: true;
410
+ isOptional: false;
411
+ };
412
+ total: {
413
+ type: _contractspec_lib_schema192.FieldType<number, number>;
414
+ isOptional: false;
415
+ };
416
+ }>, undefined>;
417
+ //#endregion
418
+ export { CreateProjectContract, DeleteProjectContract, GetProjectContract, ListProjectsContract, UpdateProjectContract };
419
+ //# sourceMappingURL=project.operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.operations.d.ts","names":[],"sources":["../../src/project/project.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAqBa,qDAAqB,0CAAA;EAArB,IAAA,EAAA;IA4DX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;EA5DgC,CAAA;;;;;;;;;;;;;;;;UAAA,2BAAA,CAAA;;;;;;;;;;;;+CAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAiErB,CAAA;EA2CX,cAAA,EAAA;+CA3C6B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;IAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAgDlB,OAAA,EAAA,IAAA;IA8CX,UAAA,EAAA,KAAA;;;;;;;+CA9CgC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAA,CAAA,MAAA,EAAA,MAAA,CAAA;MAAA,UAAA,EAAA,KAAA;IAmDrB,CAAA;IA8CX,MAAA,EAAA;gDA9CgC,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;MAAA,UAAA,EAAA,KAAA;;;;;IAAA,CAAA;IAmDrB,IAAA,EAAA;MAmCX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;MAnC+B,IAAA,uCAAA,KAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;cAtJpB,kDAAkB,0CAAA;;UA2C7B,2BAAA,CAAA;;;CA2G+B,CAAA,yCAAA,CAAA;;UAtJF,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgDlB,qDAAqB,0CAAA;;UA8ChC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA9CgC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmDrB,qDAAqB,0CAAA;;UA8ChC,2BAAA,CAAA;;;;;UA9CgC,2BAAA,CAAA;;;;;;;;;;;;;;;;;cAmDrB,oDAAoB,0CAAA;;UAmC/B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAnC+B,2BAAA,CAAA"}