@contractspec/example.saas-boilerplate 1.44.1 → 1.45.1
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/.turbo/turbo-build$colon$bundle.log +24 -24
- package/.turbo/turbo-build.log +24 -24
- package/CHANGELOG.md +45 -0
- package/dist/billing/billing.event.js +3 -3
- package/dist/billing/billing.event.js.map +1 -1
- package/dist/billing/billing.operations.d.ts +42 -42
- package/dist/billing/billing.operations.js +5 -5
- package/dist/billing/billing.operations.js.map +1 -1
- package/dist/billing/billing.presentation.js +2 -2
- package/dist/billing/billing.presentation.js.map +1 -1
- package/dist/billing/billing.schema.d.ts +47 -47
- package/dist/billing/billing.schema.d.ts.map +1 -1
- package/dist/dashboard/dashboard.presentation.js +2 -2
- package/dist/dashboard/dashboard.presentation.js.map +1 -1
- package/dist/example.d.ts +3 -33
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +16 -11
- package/dist/example.js.map +1 -1
- package/dist/project/project.entity.d.ts +24 -24
- package/dist/project/project.enum.d.ts +3 -3
- package/dist/project/project.event.d.ts +21 -21
- package/dist/project/project.event.js +4 -4
- package/dist/project/project.event.js.map +1 -1
- package/dist/project/project.operations.d.ts +105 -105
- package/dist/project/project.operations.d.ts.map +1 -1
- package/dist/project/project.operations.js +8 -8
- package/dist/project/project.operations.js.map +1 -1
- package/dist/project/project.presentation.js +2 -2
- package/dist/project/project.presentation.js.map +1 -1
- package/dist/project/project.schema.d.ts +54 -54
- package/dist/saas-boilerplate.feature.js +38 -38
- package/dist/saas-boilerplate.feature.js.map +1 -1
- package/dist/settings/settings.entity.d.ts +24 -24
- package/dist/settings/settings.enum.d.ts +2 -2
- package/package.json +10 -10
- package/src/billing/billing.event.ts +3 -3
- package/src/billing/billing.operations.ts +5 -5
- package/src/billing/billing.presentation.ts +2 -2
- package/src/dashboard/dashboard.presentation.ts +2 -2
- package/src/example.ts +16 -9
- package/src/project/project.event.ts +4 -4
- package/src/project/project.operations.ts +8 -8
- package/src/project/project.presentation.ts +2 -2
- package/src/saas-boilerplate.feature.ts +42 -38
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.operations.js","names":[],"sources":["../../src/project/project.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n CreateProjectInputModel,\n DeleteProjectInputModel,\n DeleteProjectOutputModel,\n GetProjectInputModel,\n ListProjectsInputModel,\n ListProjectsOutputModel,\n ProjectDeletedPayloadModel,\n ProjectModel,\n UpdateProjectInputModel,\n} from './project.schema';\n\nconst OWNERS = ['example.saas-boilerplate'] as const;\n\n/**\n * Create a new project.\n */\nexport const CreateProjectContract = defineCommand({\n meta: {\n key: 'saas.project.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'create'],\n description: 'Create a new project in the organization.',\n goal: 'Allow users to create projects for organizing work.',\n context: 'Called from project creation UI or API.',\n },\n io: {\n input: CreateProjectInputModel,\n output: ProjectModel,\n errors: {\n SLUG_EXISTS: {\n description: 'A project with this slug already exists',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken in the organization',\n },\n LIMIT_REACHED: {\n description: 'Project limit reached for this plan',\n http: 403,\n gqlCode: 'LIMIT_REACHED',\n when: 'Organization has reached project limit',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'project.created',\n version: 1,\n when: 'Project is created',\n payload: ProjectModel,\n },\n ],\n audit: ['project.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-project-happy-path',\n given: ['User is authenticated'],\n when: ['User creates project'],\n then: ['Project is created', 'ProjectCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-basic',\n input: { name: 'Website Redesign', slug: 'website-redesign' },\n output: { id: 'proj-123', name: 'Website Redesign', isArchived: false },\n },\n ],\n },\n});\n\n/**\n * Get project by ID.\n */\nexport const GetProjectContract = defineQuery({\n meta: {\n key: 'saas.project.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'get'],\n description: 'Get a project by ID.',\n goal: 'Retrieve project details.',\n context: 'Project detail page, API calls.',\n },\n io: {\n input: GetProjectInputModel,\n output: ProjectModel,\n errors: {\n NOT_FOUND: {\n description: 'Project not found',\n http: 404,\n gqlCode: 'NOT_FOUND',\n when: 'Project ID is invalid or user lacks access',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'get-project-happy-path',\n given: ['Project exists'],\n when: ['User requests project'],\n then: ['Project details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-existing',\n input: { projectId: 'proj-123' },\n output: { id: 'proj-123', name: 'Website Redesign' },\n },\n ],\n },\n});\n\n/**\n * Update a project.\n */\nexport const UpdateProjectContract = defineCommand({\n meta: {\n key: 'saas.project.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'update'],\n description: 'Update project details.',\n goal: 'Allow project owners/editors to modify project.',\n context: 'Project settings page.',\n },\n io: {\n input: UpdateProjectInputModel,\n output: ProjectModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'project.updated',\n version: 1,\n when: 'Project is updated',\n payload: ProjectModel,\n },\n ],\n audit: ['project.updated'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'update-project-happy-path',\n given: ['Project exists'],\n when: ['User updates description'],\n then: ['Project is updated', 'ProjectUpdated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'update-desc',\n input: { projectId: 'proj-123', description: 'New description' },\n output: { id: 'proj-123', description: 'New description' },\n },\n ],\n },\n});\n\n/**\n * Delete a project.\n */\nexport const DeleteProjectContract = defineCommand({\n meta: {\n key: 'saas.project.delete',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'delete'],\n description: 'Delete a project (soft delete).',\n goal: 'Allow project owners to remove projects.',\n context: 'Project settings page.',\n },\n io: {\n input: DeleteProjectInputModel,\n output: DeleteProjectOutputModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'project.deleted',\n version: 1,\n when: 'Project is deleted',\n payload: ProjectDeletedPayloadModel,\n },\n ],\n audit: ['project.deleted'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'delete-project-happy-path',\n given: ['Project exists'],\n when: ['User deletes project'],\n then: ['Project is deleted', 'ProjectDeleted event is emitted'],\n },\n ],\n examples: [\n {\n key: 'delete-existing',\n input: { projectId: 'proj-123' },\n output: { success: true },\n },\n ],\n },\n});\n\n/**\n * List organization projects.\n */\nexport const ListProjectsContract = defineQuery({\n meta: {\n key: 'saas.project.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'list'],\n description: 'List projects in the organization.',\n goal: 'Show all projects user has access to.',\n context: 'Project list page, dashboard.',\n },\n io: {\n input: ListProjectsInputModel,\n output: ListProjectsOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'list-projects-happy-path',\n given: ['Projects exist'],\n when: ['User lists projects'],\n then: ['List of projects is returned'],\n },\n ],\n examples: [\n {\n key: 'list-all',\n input: { limit: 10 },\n output: { items: [], total: 5 },\n },\n ],\n },\n});\n"],"mappings":";;;;AAgBA,MAAM,SAAS,CAAC,2BAA2B;;;;AAK3C,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAS;EACnC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ;GACN,aAAa;IACX,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,eAAe;IACb,aAAa;IACb,MAAM;IACN,SAAS;IACT,M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I;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,iBAAiB;GACzB,MAAM,CAAC,sBAAsB;GAC7B,MAAM,CAAC,+BAA+B;GACvC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,OAAO,IAAI;GACpB,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAG;GAChC,CACF;EACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"project.operations.js","names":[],"sources":["../../src/project/project.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport {\n CreateProjectInputModel,\n DeleteProjectInputModel,\n DeleteProjectOutputModel,\n GetProjectInputModel,\n ListProjectsInputModel,\n ListProjectsOutputModel,\n ProjectDeletedPayloadModel,\n ProjectModel,\n UpdateProjectInputModel,\n} from './project.schema';\n\nconst OWNERS = ['example.saas-boilerplate'] as const;\n\n/**\n * Create a new project.\n */\nexport const CreateProjectContract = defineCommand({\n meta: {\n key: 'saas.project.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'create'],\n description: 'Create a new project in the organization.',\n goal: 'Allow users to create projects for organizing work.',\n context: 'Called from project creation UI or API.',\n },\n io: {\n input: CreateProjectInputModel,\n output: ProjectModel,\n errors: {\n SLUG_EXISTS: {\n description: 'A project with this slug already exists',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken in the organization',\n },\n LIMIT_REACHED: {\n description: 'Project limit reached for this plan',\n http: 403,\n gqlCode: 'LIMIT_REACHED',\n when: 'Organization has reached project limit',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'project.created',\n version: '1.0.0',\n when: 'Project is created',\n payload: ProjectModel,\n },\n ],\n audit: ['project.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-project-happy-path',\n given: ['User is authenticated'],\n when: ['User creates project'],\n then: ['Project is created', 'ProjectCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'create-basic',\n input: { name: 'Website Redesign', slug: 'website-redesign' },\n output: { id: 'proj-123', name: 'Website Redesign', isArchived: false },\n },\n ],\n },\n});\n\n/**\n * Get project by ID.\n */\nexport const GetProjectContract = defineQuery({\n meta: {\n key: 'saas.project.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'get'],\n description: 'Get a project by ID.',\n goal: 'Retrieve project details.',\n context: 'Project detail page, API calls.',\n },\n io: {\n input: GetProjectInputModel,\n output: ProjectModel,\n errors: {\n NOT_FOUND: {\n description: 'Project not found',\n http: 404,\n gqlCode: 'NOT_FOUND',\n when: 'Project ID is invalid or user lacks access',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'get-project-happy-path',\n given: ['Project exists'],\n when: ['User requests project'],\n then: ['Project details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-existing',\n input: { projectId: 'proj-123' },\n output: { id: 'proj-123', name: 'Website Redesign' },\n },\n ],\n },\n});\n\n/**\n * Update a project.\n */\nexport const UpdateProjectContract = defineCommand({\n meta: {\n key: 'saas.project.update',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'update'],\n description: 'Update project details.',\n goal: 'Allow project owners/editors to modify project.',\n context: 'Project settings page.',\n },\n io: {\n input: UpdateProjectInputModel,\n output: ProjectModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'project.updated',\n version: '1.0.0',\n when: 'Project is updated',\n payload: ProjectModel,\n },\n ],\n audit: ['project.updated'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'update-project-happy-path',\n given: ['Project exists'],\n when: ['User updates description'],\n then: ['Project is updated', 'ProjectUpdated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'update-desc',\n input: { projectId: 'proj-123', description: 'New description' },\n output: { id: 'proj-123', description: 'New description' },\n },\n ],\n },\n});\n\n/**\n * Delete a project.\n */\nexport const DeleteProjectContract = defineCommand({\n meta: {\n key: 'saas.project.delete',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'delete'],\n description: 'Delete a project (soft delete).',\n goal: 'Allow project owners to remove projects.',\n context: 'Project settings page.',\n },\n io: {\n input: DeleteProjectInputModel,\n output: DeleteProjectOutputModel,\n },\n policy: {\n auth: 'user',\n },\n sideEffects: {\n emits: [\n {\n key: 'project.deleted',\n version: '1.0.0',\n when: 'Project is deleted',\n payload: ProjectDeletedPayloadModel,\n },\n ],\n audit: ['project.deleted'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'delete-project-happy-path',\n given: ['Project exists'],\n when: ['User deletes project'],\n then: ['Project is deleted', 'ProjectDeleted event is emitted'],\n },\n ],\n examples: [\n {\n key: 'delete-existing',\n input: { projectId: 'proj-123' },\n output: { success: true },\n },\n ],\n },\n});\n\n/**\n * List organization projects.\n */\nexport const ListProjectsContract = defineQuery({\n meta: {\n key: 'saas.project.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['saas', 'project', 'list'],\n description: 'List projects in the organization.',\n goal: 'Show all projects user has access to.',\n context: 'Project list page, dashboard.',\n },\n io: {\n input: ListProjectsInputModel,\n output: ListProjectsOutputModel,\n },\n policy: {\n auth: 'user',\n },\n acceptance: {\n scenarios: [\n {\n key: 'list-projects-happy-path',\n given: ['Projects exist'],\n when: ['User lists projects'],\n then: ['List of projects is returned'],\n },\n ],\n examples: [\n {\n key: 'list-all',\n input: { limit: 10 },\n output: { items: [], total: 5 },\n },\n ],\n },\n});\n"],"mappings":";;;;AAgBA,MAAM,SAAS,CAAC,2BAA2B;;;;AAK3C,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC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AAQ,EAAE,SAAS,MAAM;GAC1B,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAQ;GAAW;GAAO;EACjC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,iBAAiB;GACzB,MAAM,CAAC,sBAAsB;GAC7B,MAAM,CAAC,+BAA+B;GACvC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,OAAO,IAAI;GACpB,QAAQ;IAAE,OAAO,EAAE;IAAE,OAAO;IAAG;GAChC,CACF;EACF;CACF,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
|
8
8
|
const ProjectListPresentation = {
|
|
9
9
|
meta: {
|
|
10
10
|
key: "saas.project.list",
|
|
11
|
-
version: 1,
|
|
11
|
+
version: "1.0.0",
|
|
12
12
|
title: "Project List",
|
|
13
13
|
description: "List view of projects with status, tags, and last updated info",
|
|
14
14
|
domain: "saas-boilerplate",
|
|
@@ -41,7 +41,7 @@ const ProjectListPresentation = {
|
|
|
41
41
|
const ProjectDetailPresentation = {
|
|
42
42
|
meta: {
|
|
43
43
|
key: "saas.project.detail",
|
|
44
|
-
version: 1,
|
|
44
|
+
version: "1.0.0",
|
|
45
45
|
title: "Project Details",
|
|
46
46
|
description: "Detailed view of a project with settings and activity",
|
|
47
47
|
domain: "saas-boilerplate",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.presentation.js","names":["ProjectListPresentation: PresentationSpec","ProjectDetailPresentation: PresentationSpec"],"sources":["../../src/project/project.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { ProjectModel } from './project.schema';\n\n/**\n * Presentation for displaying a list of projects.\n */\nexport const ProjectListPresentation: PresentationSpec = {\n meta: {\n key: 'saas.project.list',\n version: 1,\n title: 'Project List',\n description:\n 'List view of projects with status, tags, and last updated info',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['project', 'list', 'dashboard'],\n stability: StabilityEnum.Beta,\n goal: 'Browse and manage projects',\n context: 'Project list page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProjectListView',\n props: ProjectModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: {\n flags: ['saas.projects.enabled'],\n },\n};\n\n/**\n * Presentation for project detail view.\n */\nexport const ProjectDetailPresentation: PresentationSpec = {\n meta: {\n key: 'saas.project.detail',\n version: 1,\n title: 'Project Details',\n description: 'Detailed view of a project with settings and activity',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['project', 'detail'],\n stability: StabilityEnum.Beta,\n goal: 'View and edit project details',\n context: 'Project detail page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProjectDetailView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.projects.enabled'],\n },\n};\n"],"mappings":";;;;;;;AAOA,MAAaA,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAW;GAAQ;GAAY;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EACN,OAAO,CAAC,wBAAwB,EACjC;CACF;;;;AAKD,MAAaC,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,SAAS;EAC3B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,wBAAwB,EACjC;CACF"}
|
|
1
|
+
{"version":3,"file":"project.presentation.js","names":["ProjectListPresentation: PresentationSpec","ProjectDetailPresentation: PresentationSpec"],"sources":["../../src/project/project.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\nimport { ProjectModel } from './project.schema';\n\n/**\n * Presentation for displaying a list of projects.\n */\nexport const ProjectListPresentation: PresentationSpec = {\n meta: {\n key: 'saas.project.list',\n version: '1.0.0',\n title: 'Project List',\n description:\n 'List view of projects with status, tags, and last updated info',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['project', 'list', 'dashboard'],\n stability: StabilityEnum.Beta,\n goal: 'Browse and manage projects',\n context: 'Project list page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProjectListView',\n props: ProjectModel,\n },\n targets: ['react', 'markdown', 'application/json'],\n policy: {\n flags: ['saas.projects.enabled'],\n },\n};\n\n/**\n * Presentation for project detail view.\n */\nexport const ProjectDetailPresentation: PresentationSpec = {\n meta: {\n key: 'saas.project.detail',\n version: '1.0.0',\n title: 'Project Details',\n description: 'Detailed view of a project with settings and activity',\n domain: 'saas-boilerplate',\n owners: ['@saas-team'],\n tags: ['project', 'detail'],\n stability: StabilityEnum.Beta,\n goal: 'View and edit project details',\n context: 'Project detail page',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ProjectDetailView',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['saas.projects.enabled'],\n },\n};\n"],"mappings":";;;;;;;AAOA,MAAaA,0BAA4C;CACvD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAW;GAAQ;GAAY;EACtC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS;EAAC;EAAS;EAAY;EAAmB;CAClD,QAAQ,EACN,OAAO,CAAC,wBAAwB,EACjC;CACF;;;;AAKD,MAAaC,4BAA8C;CACzD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM,CAAC,WAAW,SAAS;EAC3B,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,wBAAwB,EACjC;CACF"}
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema129 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/project/project.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A project within an organization.
|
|
6
6
|
*/
|
|
7
|
-
declare const ProjectModel:
|
|
7
|
+
declare const ProjectModel: _contractspec_lib_schema129.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
name: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
description: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
18
18
|
isOptional: true;
|
|
19
19
|
};
|
|
20
20
|
slug: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
22
22
|
isOptional: true;
|
|
23
23
|
};
|
|
24
24
|
organizationId: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
createdBy: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
status: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema129.EnumType<[string, string, string, string]>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
isPublic: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema129.FieldType<boolean, boolean>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
tags: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
42
42
|
isArray: true;
|
|
43
43
|
isOptional: false;
|
|
44
44
|
};
|
|
45
45
|
createdAt: {
|
|
46
|
-
type:
|
|
46
|
+
type: _contractspec_lib_schema129.FieldType<Date, string>;
|
|
47
47
|
isOptional: false;
|
|
48
48
|
};
|
|
49
49
|
updatedAt: {
|
|
50
|
-
type:
|
|
50
|
+
type: _contractspec_lib_schema129.FieldType<Date, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
}>;
|
|
54
54
|
/**
|
|
55
55
|
* Input for creating a project.
|
|
56
56
|
*/
|
|
57
|
-
declare const CreateProjectInputModel:
|
|
57
|
+
declare const CreateProjectInputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
58
58
|
name: {
|
|
59
|
-
type:
|
|
59
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
60
60
|
isOptional: false;
|
|
61
61
|
};
|
|
62
62
|
description: {
|
|
63
|
-
type:
|
|
63
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
64
64
|
isOptional: true;
|
|
65
65
|
};
|
|
66
66
|
slug: {
|
|
67
|
-
type:
|
|
67
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
68
68
|
isOptional: true;
|
|
69
69
|
};
|
|
70
70
|
isPublic: {
|
|
71
|
-
type:
|
|
71
|
+
type: _contractspec_lib_schema129.FieldType<boolean, boolean>;
|
|
72
72
|
isOptional: true;
|
|
73
73
|
};
|
|
74
74
|
tags: {
|
|
75
|
-
type:
|
|
75
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
76
76
|
isArray: true;
|
|
77
77
|
isOptional: true;
|
|
78
78
|
};
|
|
@@ -80,92 +80,92 @@ declare const CreateProjectInputModel: _contractspec_lib_schema275.SchemaModel<{
|
|
|
80
80
|
/**
|
|
81
81
|
* Input for updating a project.
|
|
82
82
|
*/
|
|
83
|
-
declare const UpdateProjectInputModel:
|
|
83
|
+
declare const UpdateProjectInputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
84
84
|
projectId: {
|
|
85
|
-
type:
|
|
85
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
86
86
|
isOptional: false;
|
|
87
87
|
};
|
|
88
88
|
name: {
|
|
89
|
-
type:
|
|
89
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
90
90
|
isOptional: true;
|
|
91
91
|
};
|
|
92
92
|
description: {
|
|
93
|
-
type:
|
|
93
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
94
94
|
isOptional: true;
|
|
95
95
|
};
|
|
96
96
|
slug: {
|
|
97
|
-
type:
|
|
97
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
98
98
|
isOptional: true;
|
|
99
99
|
};
|
|
100
100
|
isPublic: {
|
|
101
|
-
type:
|
|
101
|
+
type: _contractspec_lib_schema129.FieldType<boolean, boolean>;
|
|
102
102
|
isOptional: true;
|
|
103
103
|
};
|
|
104
104
|
tags: {
|
|
105
|
-
type:
|
|
105
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
106
106
|
isArray: true;
|
|
107
107
|
isOptional: true;
|
|
108
108
|
};
|
|
109
109
|
status: {
|
|
110
|
-
type:
|
|
110
|
+
type: _contractspec_lib_schema129.EnumType<[string, string, string, string]>;
|
|
111
111
|
isOptional: true;
|
|
112
112
|
};
|
|
113
113
|
}>;
|
|
114
114
|
/**
|
|
115
115
|
* Input for getting a project.
|
|
116
116
|
*/
|
|
117
|
-
declare const GetProjectInputModel:
|
|
117
|
+
declare const GetProjectInputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
118
118
|
projectId: {
|
|
119
|
-
type:
|
|
119
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
120
120
|
isOptional: false;
|
|
121
121
|
};
|
|
122
122
|
}>;
|
|
123
123
|
/**
|
|
124
124
|
* Input for deleting a project.
|
|
125
125
|
*/
|
|
126
|
-
declare const DeleteProjectInputModel:
|
|
126
|
+
declare const DeleteProjectInputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
127
127
|
projectId: {
|
|
128
|
-
type:
|
|
128
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
129
129
|
isOptional: false;
|
|
130
130
|
};
|
|
131
131
|
}>;
|
|
132
132
|
/**
|
|
133
133
|
* Output for delete operation.
|
|
134
134
|
*/
|
|
135
|
-
declare const DeleteProjectOutputModel:
|
|
135
|
+
declare const DeleteProjectOutputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
136
136
|
success: {
|
|
137
|
-
type:
|
|
137
|
+
type: _contractspec_lib_schema129.FieldType<boolean, boolean>;
|
|
138
138
|
isOptional: false;
|
|
139
139
|
};
|
|
140
140
|
}>;
|
|
141
141
|
/**
|
|
142
142
|
* Payload for project deleted event.
|
|
143
143
|
*/
|
|
144
|
-
declare const ProjectDeletedPayloadModel:
|
|
144
|
+
declare const ProjectDeletedPayloadModel: _contractspec_lib_schema129.SchemaModel<{
|
|
145
145
|
projectId: {
|
|
146
|
-
type:
|
|
146
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
147
147
|
isOptional: false;
|
|
148
148
|
};
|
|
149
149
|
}>;
|
|
150
150
|
/**
|
|
151
151
|
* Input for listing projects.
|
|
152
152
|
*/
|
|
153
|
-
declare const ListProjectsInputModel:
|
|
153
|
+
declare const ListProjectsInputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
154
154
|
status: {
|
|
155
|
-
type:
|
|
155
|
+
type: _contractspec_lib_schema129.EnumType<[string, string, string, string]>;
|
|
156
156
|
isOptional: true;
|
|
157
157
|
};
|
|
158
158
|
search: {
|
|
159
|
-
type:
|
|
159
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
160
160
|
isOptional: true;
|
|
161
161
|
};
|
|
162
162
|
limit: {
|
|
163
|
-
type:
|
|
163
|
+
type: _contractspec_lib_schema129.FieldType<number, number>;
|
|
164
164
|
isOptional: true;
|
|
165
165
|
defaultValue: number;
|
|
166
166
|
};
|
|
167
167
|
offset: {
|
|
168
|
-
type:
|
|
168
|
+
type: _contractspec_lib_schema129.FieldType<number, number>;
|
|
169
169
|
isOptional: true;
|
|
170
170
|
defaultValue: number;
|
|
171
171
|
};
|
|
@@ -173,52 +173,52 @@ declare const ListProjectsInputModel: _contractspec_lib_schema275.SchemaModel<{
|
|
|
173
173
|
/**
|
|
174
174
|
* Output for listing projects.
|
|
175
175
|
*/
|
|
176
|
-
declare const ListProjectsOutputModel:
|
|
176
|
+
declare const ListProjectsOutputModel: _contractspec_lib_schema129.SchemaModel<{
|
|
177
177
|
projects: {
|
|
178
|
-
type:
|
|
178
|
+
type: _contractspec_lib_schema129.SchemaModel<{
|
|
179
179
|
id: {
|
|
180
|
-
type:
|
|
180
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
181
181
|
isOptional: false;
|
|
182
182
|
};
|
|
183
183
|
name: {
|
|
184
|
-
type:
|
|
184
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
185
185
|
isOptional: false;
|
|
186
186
|
};
|
|
187
187
|
description: {
|
|
188
|
-
type:
|
|
188
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
189
189
|
isOptional: true;
|
|
190
190
|
};
|
|
191
191
|
slug: {
|
|
192
|
-
type:
|
|
192
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
193
193
|
isOptional: true;
|
|
194
194
|
};
|
|
195
195
|
organizationId: {
|
|
196
|
-
type:
|
|
196
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
197
197
|
isOptional: false;
|
|
198
198
|
};
|
|
199
199
|
createdBy: {
|
|
200
|
-
type:
|
|
200
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
201
201
|
isOptional: false;
|
|
202
202
|
};
|
|
203
203
|
status: {
|
|
204
|
-
type:
|
|
204
|
+
type: _contractspec_lib_schema129.EnumType<[string, string, string, string]>;
|
|
205
205
|
isOptional: false;
|
|
206
206
|
};
|
|
207
207
|
isPublic: {
|
|
208
|
-
type:
|
|
208
|
+
type: _contractspec_lib_schema129.FieldType<boolean, boolean>;
|
|
209
209
|
isOptional: false;
|
|
210
210
|
};
|
|
211
211
|
tags: {
|
|
212
|
-
type:
|
|
212
|
+
type: _contractspec_lib_schema129.FieldType<string, string>;
|
|
213
213
|
isArray: true;
|
|
214
214
|
isOptional: false;
|
|
215
215
|
};
|
|
216
216
|
createdAt: {
|
|
217
|
-
type:
|
|
217
|
+
type: _contractspec_lib_schema129.FieldType<Date, string>;
|
|
218
218
|
isOptional: false;
|
|
219
219
|
};
|
|
220
220
|
updatedAt: {
|
|
221
|
-
type:
|
|
221
|
+
type: _contractspec_lib_schema129.FieldType<Date, string>;
|
|
222
222
|
isOptional: false;
|
|
223
223
|
};
|
|
224
224
|
}>;
|
|
@@ -226,7 +226,7 @@ declare const ListProjectsOutputModel: _contractspec_lib_schema275.SchemaModel<{
|
|
|
226
226
|
isOptional: false;
|
|
227
227
|
};
|
|
228
228
|
total: {
|
|
229
|
-
type:
|
|
229
|
+
type: _contractspec_lib_schema129.FieldType<number, number>;
|
|
230
230
|
isOptional: false;
|
|
231
231
|
};
|
|
232
232
|
}>;
|
|
@@ -16,153 +16,153 @@ const SaasBoilerplateFeature = {
|
|
|
16
16
|
"billing"
|
|
17
17
|
],
|
|
18
18
|
stability: "experimental",
|
|
19
|
-
version: 1
|
|
19
|
+
version: "1.0.0"
|
|
20
20
|
},
|
|
21
21
|
operations: [
|
|
22
22
|
{
|
|
23
23
|
key: "saas.project.create",
|
|
24
|
-
version: 1
|
|
24
|
+
version: "1.0.0"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
key: "saas.project.get",
|
|
28
|
-
version: 1
|
|
28
|
+
version: "1.0.0"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
key: "saas.project.update",
|
|
32
|
-
version: 1
|
|
32
|
+
version: "1.0.0"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
key: "saas.project.delete",
|
|
36
|
-
version: 1
|
|
36
|
+
version: "1.0.0"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
key: "saas.project.list",
|
|
40
|
-
version: 1
|
|
40
|
+
version: "1.0.0"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
key: "saas.billing.subscription.get",
|
|
44
|
-
version: 1
|
|
44
|
+
version: "1.0.0"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
key: "saas.billing.usage.record",
|
|
48
|
-
version: 1
|
|
48
|
+
version: "1.0.0"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
key: "saas.billing.usage.summary",
|
|
52
|
-
version: 1
|
|
52
|
+
version: "1.0.0"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
key: "saas.billing.feature.check",
|
|
56
|
-
version: 1
|
|
56
|
+
version: "1.0.0"
|
|
57
57
|
}
|
|
58
58
|
],
|
|
59
59
|
events: [
|
|
60
60
|
{
|
|
61
61
|
key: "project.created",
|
|
62
|
-
version: 1
|
|
62
|
+
version: "1.0.0"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
key: "project.updated",
|
|
66
|
-
version: 1
|
|
66
|
+
version: "1.0.0"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
key: "project.deleted",
|
|
70
|
-
version: 1
|
|
70
|
+
version: "1.0.0"
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
key: "project.archived",
|
|
74
|
-
version: 1
|
|
74
|
+
version: "1.0.0"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
key: "billing.usage.recorded",
|
|
78
|
-
version: 1
|
|
78
|
+
version: "1.0.0"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
key: "billing.subscription.changed",
|
|
82
|
-
version: 1
|
|
82
|
+
version: "1.0.0"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
key: "billing.limit.reached",
|
|
86
|
-
version: 1
|
|
86
|
+
version: "1.0.0"
|
|
87
87
|
}
|
|
88
88
|
],
|
|
89
89
|
presentations: [
|
|
90
90
|
{
|
|
91
91
|
key: "saas.dashboard",
|
|
92
|
-
version: 1
|
|
92
|
+
version: "1.0.0"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
key: "saas.project.list",
|
|
96
|
-
version: 1
|
|
96
|
+
version: "1.0.0"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
key: "saas.project.detail",
|
|
100
|
-
version: 1
|
|
100
|
+
version: "1.0.0"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
key: "saas.billing.subscription",
|
|
104
|
-
version: 1
|
|
104
|
+
version: "1.0.0"
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
key: "saas.billing.usage",
|
|
108
|
-
version: 1
|
|
108
|
+
version: "1.0.0"
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
key: "saas.settings",
|
|
112
|
-
version: 1
|
|
112
|
+
version: "1.0.0"
|
|
113
113
|
}
|
|
114
114
|
],
|
|
115
115
|
opToPresentation: [
|
|
116
116
|
{
|
|
117
117
|
op: {
|
|
118
118
|
key: "saas.project.list",
|
|
119
|
-
version: 1
|
|
119
|
+
version: "1.0.0"
|
|
120
120
|
},
|
|
121
121
|
pres: {
|
|
122
122
|
key: "saas.project.list",
|
|
123
|
-
version: 1
|
|
123
|
+
version: "1.0.0"
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
op: {
|
|
128
128
|
key: "saas.project.get",
|
|
129
|
-
version: 1
|
|
129
|
+
version: "1.0.0"
|
|
130
130
|
},
|
|
131
131
|
pres: {
|
|
132
132
|
key: "saas.project.detail",
|
|
133
|
-
version: 1
|
|
133
|
+
version: "1.0.0"
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
op: {
|
|
138
138
|
key: "saas.billing.subscription.get",
|
|
139
|
-
version: 1
|
|
139
|
+
version: "1.0.0"
|
|
140
140
|
},
|
|
141
141
|
pres: {
|
|
142
142
|
key: "saas.billing.subscription",
|
|
143
|
-
version: 1
|
|
143
|
+
version: "1.0.0"
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
op: {
|
|
148
148
|
key: "saas.billing.usage.summary",
|
|
149
|
-
version: 1
|
|
149
|
+
version: "1.0.0"
|
|
150
150
|
},
|
|
151
151
|
pres: {
|
|
152
152
|
key: "saas.billing.usage",
|
|
153
|
-
version: 1
|
|
153
|
+
version: "1.0.0"
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
],
|
|
157
157
|
presentationsTargets: [
|
|
158
158
|
{
|
|
159
159
|
key: "saas.dashboard",
|
|
160
|
-
version: 1,
|
|
160
|
+
version: "1.0.0",
|
|
161
161
|
targets: ["react", "markdown"]
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
key: "saas.project.list",
|
|
165
|
-
version: 1,
|
|
165
|
+
version: "1.0.0",
|
|
166
166
|
targets: [
|
|
167
167
|
"react",
|
|
168
168
|
"markdown",
|
|
@@ -171,27 +171,27 @@ const SaasBoilerplateFeature = {
|
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
key: "saas.billing.subscription",
|
|
174
|
-
version: 1,
|
|
174
|
+
version: "1.0.0",
|
|
175
175
|
targets: ["react", "markdown"]
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
key: "saas.billing.usage",
|
|
179
|
-
version: 1,
|
|
179
|
+
version: "1.0.0",
|
|
180
180
|
targets: ["react", "markdown"]
|
|
181
181
|
}
|
|
182
182
|
],
|
|
183
183
|
capabilities: { requires: [
|
|
184
184
|
{
|
|
185
185
|
key: "identity",
|
|
186
|
-
version: 1
|
|
186
|
+
version: "1.0.0"
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
key: "audit-trail",
|
|
190
|
-
version: 1
|
|
190
|
+
version: "1.0.0"
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
key: "notifications",
|
|
194
|
-
version: 1
|
|
194
|
+
version: "1.0.0"
|
|
195
195
|
}
|
|
196
196
|
] }
|
|
197
197
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saas-boilerplate.feature.js","names":["SaasBoilerplateFeature: FeatureModuleSpec"],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":["/**\n * SaaS Boilerplate Feature Module Specification\n *\n * Defines the feature module for the SaaS application foundation.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * SaaS Boilerplate feature module that bundles project management,\n * billing, and settings operations into an installable feature.\n */\nexport const SaasBoilerplateFeature: FeatureModuleSpec = {\n meta: {\n key: 'saas-boilerplate',\n title: 'SaaS Boilerplate',\n description:\n 'SaaS application foundation with projects, billing, and settings',\n domain: 'saas',\n owners: ['@saas-team'],\n tags: ['saas', 'projects', 'billing'],\n stability: 'experimental',\n version: 1,\n },\n\n // All contract operations included in this feature\n operations: [\n // Project operations\n { key: 'saas.project.create', version: 1 },\n { key: 'saas.project.get', version: 1 },\n { key: 'saas.project.update', version: 1 },\n { key: 'saas.project.delete', version: 1 },\n { key: 'saas.project.list', version: 1 },\n\n // Billing operations\n { key: 'saas.billing.subscription.get', version: 1 },\n { key: 'saas.billing.usage.record', version: 1 },\n { key: 'saas.billing.usage.summary', version: 1 },\n { key: 'saas.billing.feature.check', version: 1 },\n ],\n\n // Events emitted by this feature\n events: [\n // Project events\n { key: 'project.created', version: 1 },\n { key: 'project.updated', version: 1 },\n { key: 'project.deleted', version: 1 },\n { key: 'project.archived', version: 1 },\n\n // Billing events\n { key: 'billing.usage.recorded', version: 1 },\n { key: 'billing.subscription.changed', version: 1 },\n { key: 'billing.limit.reached', version: 1 },\n ],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'saas.dashboard', version: 1 },\n { key: 'saas.project.list', version: 1 },\n { key: 'saas.project.detail', version: 1 },\n { key: 'saas.billing.subscription', version: 1 },\n { key: 'saas.billing.usage', version: 1 },\n { key: 'saas.settings', version: 1 },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'saas.project.list', version: 1 },\n pres: { key: 'saas.project.list', version: 1 },\n },\n {\n op: { key: 'saas.project.get', version: 1 },\n pres: { key: 'saas.project.detail', version: 1 },\n },\n {\n op: { key: 'saas.billing.subscription.get', version: 1 },\n pres: { key: 'saas.billing.subscription', version: 1 },\n },\n {\n op: { key: 'saas.billing.usage.summary', version: 1 },\n pres: { key: 'saas.billing.usage', version: 1 },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n { key: 'saas.dashboard', version: 1, targets: ['react', 'markdown'] },\n {\n key: 'saas.project.list',\n version: 1,\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'saas.billing.subscription',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {
|
|
1
|
+
{"version":3,"file":"saas-boilerplate.feature.js","names":["SaasBoilerplateFeature: FeatureModuleSpec"],"sources":["../src/saas-boilerplate.feature.ts"],"sourcesContent":["/**\n * SaaS Boilerplate Feature Module Specification\n *\n * Defines the feature module for the SaaS application foundation.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * SaaS Boilerplate feature module that bundles project management,\n * billing, and settings operations into an installable feature.\n */\nexport const SaasBoilerplateFeature: FeatureModuleSpec = {\n meta: {\n key: 'saas-boilerplate',\n title: 'SaaS Boilerplate',\n description:\n 'SaaS application foundation with projects, billing, and settings',\n domain: 'saas',\n owners: ['@saas-team'],\n tags: ['saas', 'projects', 'billing'],\n stability: 'experimental',\n version: '1.0.0',\n },\n\n // All contract operations included in this feature\n operations: [\n // Project operations\n { key: 'saas.project.create', version: '1.0.0' },\n { key: 'saas.project.get', version: '1.0.0' },\n { key: 'saas.project.update', version: '1.0.0' },\n { key: 'saas.project.delete', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n\n // Billing operations\n { key: 'saas.billing.subscription.get', version: '1.0.0' },\n { key: 'saas.billing.usage.record', version: '1.0.0' },\n { key: 'saas.billing.usage.summary', version: '1.0.0' },\n { key: 'saas.billing.feature.check', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [\n // Project events\n { key: 'project.created', version: '1.0.0' },\n { key: 'project.updated', version: '1.0.0' },\n { key: 'project.deleted', version: '1.0.0' },\n { key: 'project.archived', version: '1.0.0' },\n\n // Billing events\n { key: 'billing.usage.recorded', version: '1.0.0' },\n { key: 'billing.subscription.changed', version: '1.0.0' },\n { key: 'billing.limit.reached', version: '1.0.0' },\n ],\n\n // Presentations associated with this feature\n presentations: [\n { key: 'saas.dashboard', version: '1.0.0' },\n { key: 'saas.project.list', version: '1.0.0' },\n { key: 'saas.project.detail', version: '1.0.0' },\n { key: 'saas.billing.subscription', version: '1.0.0' },\n { key: 'saas.billing.usage', version: '1.0.0' },\n { key: 'saas.settings', version: '1.0.0' },\n ],\n\n // Link operations to their primary presentations\n opToPresentation: [\n {\n op: { key: 'saas.project.list', version: '1.0.0' },\n pres: { key: 'saas.project.list', version: '1.0.0' },\n },\n {\n op: { key: 'saas.project.get', version: '1.0.0' },\n pres: { key: 'saas.project.detail', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.subscription.get', version: '1.0.0' },\n pres: { key: 'saas.billing.subscription', version: '1.0.0' },\n },\n {\n op: { key: 'saas.billing.usage.summary', version: '1.0.0' },\n pres: { key: 'saas.billing.usage', version: '1.0.0' },\n },\n ],\n\n // Target requirements for multi-surface rendering\n presentationsTargets: [\n { key: 'saas.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },\n {\n key: 'saas.project.list',\n version: '1.0.0',\n targets: ['react', 'markdown', 'application/json'],\n },\n {\n key: 'saas.billing.subscription',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'saas.billing.usage',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n // Capability requirements\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n ],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,yBAA4C;CACvD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,aAAa;EACtB,MAAM;GAAC;GAAQ;GAAY;GAAU;EACrC,WAAW;EACX,SAAS;EACV;CAGD,YAAY;EAEV;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAG9C;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAA6B,SAAS;G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