@contractspec/example.saas-boilerplate 3.7.6 → 3.7.7

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 (114) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/AGENTS.md +50 -27
  3. package/README.md +64 -144
  4. package/dist/billing/billing.event.js +1 -1
  5. package/dist/billing/index.d.ts +6 -6
  6. package/dist/billing/index.js +1 -1
  7. package/dist/browser/billing/billing.event.js +1 -1
  8. package/dist/browser/billing/index.js +1 -1
  9. package/dist/browser/index.js +931 -932
  10. package/dist/browser/project/index.js +209 -209
  11. package/dist/browser/project/project.event.js +1 -1
  12. package/dist/browser/ui/SaasDashboard.js +45 -45
  13. package/dist/browser/ui/SaasProjectList.js +7 -7
  14. package/dist/browser/ui/SaasSettingsPanel.js +12 -12
  15. package/dist/browser/ui/hooks/index.js +2 -2
  16. package/dist/browser/ui/hooks/useProjectList.js +1 -1
  17. package/dist/browser/ui/hooks/useProjectMutations.js +1 -1
  18. package/dist/browser/ui/index.js +483 -484
  19. package/dist/browser/ui/modals/CreateProjectModal.js +10 -10
  20. package/dist/browser/ui/modals/ProjectActionsModal.js +13 -13
  21. package/dist/browser/ui/modals/index.js +23 -23
  22. package/dist/browser/ui/renderers/index.js +112 -112
  23. package/dist/browser/ui/renderers/project-list.renderer.js +7 -7
  24. package/dist/handlers/index.d.ts +2 -2
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +931 -932
  27. package/dist/node/billing/billing.event.js +1 -1
  28. package/dist/node/billing/index.js +1 -1
  29. package/dist/node/index.js +931 -932
  30. package/dist/node/project/index.js +209 -209
  31. package/dist/node/project/project.event.js +1 -1
  32. package/dist/node/ui/SaasDashboard.js +45 -45
  33. package/dist/node/ui/SaasProjectList.js +7 -7
  34. package/dist/node/ui/SaasSettingsPanel.js +12 -12
  35. package/dist/node/ui/hooks/index.js +2 -2
  36. package/dist/node/ui/hooks/useProjectList.js +1 -1
  37. package/dist/node/ui/hooks/useProjectMutations.js +1 -1
  38. package/dist/node/ui/index.js +483 -484
  39. package/dist/node/ui/modals/CreateProjectModal.js +10 -10
  40. package/dist/node/ui/modals/ProjectActionsModal.js +13 -13
  41. package/dist/node/ui/modals/index.js +23 -23
  42. package/dist/node/ui/renderers/index.js +112 -112
  43. package/dist/node/ui/renderers/project-list.renderer.js +7 -7
  44. package/dist/presentations/index.d.ts +1 -1
  45. package/dist/project/index.d.ts +7 -7
  46. package/dist/project/index.js +209 -209
  47. package/dist/project/project.event.js +1 -1
  48. package/dist/settings/index.d.ts +1 -1
  49. package/dist/ui/SaasDashboard.js +45 -45
  50. package/dist/ui/SaasProjectList.js +7 -7
  51. package/dist/ui/SaasSettingsPanel.js +12 -12
  52. package/dist/ui/hooks/index.d.ts +2 -2
  53. package/dist/ui/hooks/index.js +2 -2
  54. package/dist/ui/hooks/useProjectList.d.ts +5 -0
  55. package/dist/ui/hooks/useProjectList.js +1 -1
  56. package/dist/ui/hooks/useProjectMutations.d.ts +8 -0
  57. package/dist/ui/hooks/useProjectMutations.js +1 -1
  58. package/dist/ui/index.d.ts +4 -4
  59. package/dist/ui/index.js +483 -484
  60. package/dist/ui/modals/CreateProjectModal.js +10 -10
  61. package/dist/ui/modals/ProjectActionsModal.js +13 -13
  62. package/dist/ui/modals/index.js +23 -23
  63. package/dist/ui/renderers/index.d.ts +1 -1
  64. package/dist/ui/renderers/index.js +112 -112
  65. package/dist/ui/renderers/project-list.renderer.d.ts +1 -1
  66. package/dist/ui/renderers/project-list.renderer.js +7 -7
  67. package/package.json +10 -10
  68. package/src/billing/billing.entity.ts +132 -132
  69. package/src/billing/billing.enum.ts +9 -9
  70. package/src/billing/billing.event.ts +71 -71
  71. package/src/billing/billing.handler.ts +87 -87
  72. package/src/billing/billing.operations.ts +158 -158
  73. package/src/billing/billing.presentation.ts +45 -45
  74. package/src/billing/billing.schema.ts +76 -76
  75. package/src/billing/index.ts +43 -48
  76. package/src/dashboard/dashboard.presentation.ts +45 -45
  77. package/src/dashboard/index.ts +2 -2
  78. package/src/docs/saas-boilerplate.docblock.ts +43 -43
  79. package/src/example.ts +32 -32
  80. package/src/handlers/index.ts +9 -9
  81. package/src/handlers/saas.handlers.ts +250 -249
  82. package/src/index.ts +40 -41
  83. package/src/presentations/index.ts +18 -20
  84. package/src/project/index.ts +45 -50
  85. package/src/project/project.entity.ts +68 -68
  86. package/src/project/project.enum.ts +8 -8
  87. package/src/project/project.event.ts +79 -79
  88. package/src/project/project.handler.ts +103 -103
  89. package/src/project/project.operations.ts +236 -236
  90. package/src/project/project.presentation.ts +46 -46
  91. package/src/project/project.schema.ts +90 -90
  92. package/src/saas-boilerplate.feature.ts +100 -100
  93. package/src/seeders/index.ts +20 -20
  94. package/src/settings/index.ts +2 -3
  95. package/src/settings/settings.entity.ts +65 -65
  96. package/src/settings/settings.enum.ts +4 -4
  97. package/src/shared/mock-data.ts +92 -92
  98. package/src/shared/overlay-types.ts +23 -23
  99. package/src/tests/operations.test-spec.ts +96 -96
  100. package/src/ui/SaasDashboard.tsx +270 -270
  101. package/src/ui/SaasProjectList.tsx +90 -90
  102. package/src/ui/SaasSettingsPanel.tsx +84 -84
  103. package/src/ui/hooks/index.ts +3 -3
  104. package/src/ui/hooks/useProjectList.ts +69 -68
  105. package/src/ui/hooks/useProjectMutations.ts +144 -143
  106. package/src/ui/index.ts +8 -12
  107. package/src/ui/modals/CreateProjectModal.tsx +154 -154
  108. package/src/ui/modals/ProjectActionsModal.tsx +321 -321
  109. package/src/ui/overlays/demo-overlays.ts +49 -49
  110. package/src/ui/renderers/index.ts +5 -4
  111. package/src/ui/renderers/project-list.markdown.ts +204 -204
  112. package/src/ui/renderers/project-list.renderer.tsx +14 -13
  113. package/tsconfig.json +7 -8
  114. package/tsdown.config.js +7 -3
@@ -4,33 +4,31 @@
4
4
 
5
5
  // Billing presentations
6
6
  export {
7
- SubscriptionPresentation,
8
- UsageDashboardPresentation,
7
+ SubscriptionPresentation,
8
+ UsageDashboardPresentation,
9
9
  } from '../billing/billing.presentation';
10
-
11
- // Project presentations
12
- export {
13
- ProjectListPresentation,
14
- ProjectDetailPresentation,
15
- } from '../project/project.presentation';
16
-
17
10
  // Dashboard presentations
18
11
  export {
19
- SaasDashboardPresentation,
20
- SettingsPanelPresentation,
12
+ SaasDashboardPresentation,
13
+ SettingsPanelPresentation,
21
14
  } from '../dashboard/dashboard.presentation';
15
+ // Project presentations
16
+ export {
17
+ ProjectDetailPresentation,
18
+ ProjectListPresentation,
19
+ } from '../project/project.presentation';
22
20
 
23
21
  // All presentations collection
24
22
  export const SaasBoilerplatePresentations = {
25
- // Billing
26
- SubscriptionPresentation: undefined,
27
- UsageDashboardPresentation: undefined,
23
+ // Billing
24
+ SubscriptionPresentation: undefined,
25
+ UsageDashboardPresentation: undefined,
28
26
 
29
- // Project
30
- ProjectListPresentation: undefined,
31
- ProjectDetailPresentation: undefined,
27
+ // Project
28
+ ProjectListPresentation: undefined,
29
+ ProjectDetailPresentation: undefined,
32
30
 
33
- // Dashboard
34
- SaasDashboardPresentation: undefined,
35
- SettingsPanelPresentation: undefined,
31
+ // Dashboard
32
+ SaasDashboardPresentation: undefined,
33
+ SettingsPanelPresentation: undefined,
36
34
  };
@@ -2,65 +2,60 @@
2
2
  * Project domain - project management within organizations.
3
3
  */
4
4
 
5
+ // Entities
6
+ export {
7
+ ProjectEntity,
8
+ ProjectMemberEntity,
9
+ ProjectStatusEnum,
10
+ } from './project.entity';
5
11
  // Enums
6
12
  export {
7
- ProjectStatusSchemaEnum,
8
- ProjectStatusFilterEnum,
13
+ ProjectStatusFilterEnum,
14
+ ProjectStatusSchemaEnum,
9
15
  } from './project.enum';
10
-
11
- // Schema models
12
- export {
13
- ProjectModel,
14
- CreateProjectInputModel,
15
- UpdateProjectInputModel,
16
- GetProjectInputModel,
17
- DeleteProjectInputModel,
18
- DeleteProjectOutputModel,
19
- ProjectDeletedPayloadModel,
20
- ListProjectsInputModel,
21
- ListProjectsOutputModel,
22
- } from './project.schema';
23
-
24
- // Contracts
25
- export {
26
- CreateProjectContract,
27
- GetProjectContract,
28
- UpdateProjectContract,
29
- DeleteProjectContract,
30
- ListProjectsContract,
31
- } from './project.operations';
32
-
33
16
  // Events
34
17
  export {
35
- ProjectCreatedEvent,
36
- ProjectUpdatedEvent,
37
- ProjectDeletedEvent,
38
- ProjectArchivedEvent,
18
+ ProjectArchivedEvent,
19
+ ProjectCreatedEvent,
20
+ ProjectDeletedEvent,
21
+ ProjectUpdatedEvent,
39
22
  } from './project.event';
40
-
41
- // Entities
23
+ // Handlers
42
24
  export {
43
- ProjectStatusEnum,
44
- ProjectEntity,
45
- ProjectMemberEntity,
46
- } from './project.entity';
25
+ type CreateProjectInput,
26
+ type ListProjectsInput,
27
+ type ListProjectsOutput,
28
+ mockCreateProjectHandler,
29
+ mockDeleteProjectHandler,
30
+ mockGetProjectHandler,
31
+ mockListProjectsHandler,
32
+ mockUpdateProjectHandler,
33
+ type Project,
34
+ type UpdateProjectInput,
35
+ } from './project.handler';
36
+ // Contracts
37
+ export {
38
+ CreateProjectContract,
39
+ DeleteProjectContract,
40
+ GetProjectContract,
41
+ ListProjectsContract,
42
+ UpdateProjectContract,
43
+ } from './project.operations';
47
44
 
48
45
  // Presentations
49
46
  export {
50
- ProjectListPresentation,
51
- ProjectDetailPresentation,
47
+ ProjectDetailPresentation,
48
+ ProjectListPresentation,
52
49
  } from './project.presentation';
53
-
54
- // Handlers
50
+ // Schema models
55
51
  export {
56
- mockListProjectsHandler,
57
- mockGetProjectHandler,
58
- mockCreateProjectHandler,
59
- mockUpdateProjectHandler,
60
- mockDeleteProjectHandler,
61
- type Project,
62
- type CreateProjectInput,
63
- type UpdateProjectInput,
64
- type ListProjectsInput,
65
- type ListProjectsOutput,
66
- } from './project.handler';
52
+ CreateProjectInputModel,
53
+ DeleteProjectInputModel,
54
+ DeleteProjectOutputModel,
55
+ GetProjectInputModel,
56
+ ListProjectsInputModel,
57
+ ListProjectsOutputModel,
58
+ ProjectDeletedPayloadModel,
59
+ ProjectModel,
60
+ UpdateProjectInputModel,
61
+ } from './project.schema';
@@ -1,93 +1,93 @@
1
1
  import {
2
- defineEntity,
3
- defineEntityEnum,
4
- field,
5
- index,
2
+ defineEntity,
3
+ defineEntityEnum,
4
+ field,
5
+ index,
6
6
  } from '@contractspec/lib.schema';
7
7
 
8
8
  /**
9
9
  * Project status enum for entities.
10
10
  */
11
11
  export const ProjectStatusEnum = defineEntityEnum({
12
- name: 'ProjectStatus',
13
- values: ['DRAFT', 'ACTIVE', 'ARCHIVED', 'DELETED'] as const,
14
- schema: 'saas_app',
15
- description: 'Status of a project.',
12
+ name: 'ProjectStatus',
13
+ values: ['DRAFT', 'ACTIVE', 'ARCHIVED', 'DELETED'] as const,
14
+ schema: 'saas_app',
15
+ description: 'Status of a project.',
16
16
  });
17
17
 
18
18
  /**
19
19
  * Project entity - team-scoped work container.
20
20
  */
21
21
  export const ProjectEntity = defineEntity({
22
- name: 'Project',
23
- description: 'A project belonging to an organization.',
24
- schema: 'saas_app',
25
- map: 'project',
26
- fields: {
27
- id: field.id({ description: 'Unique project ID' }),
28
- name: field.string({ description: 'Project name' }),
29
- description: field.string({
30
- isOptional: true,
31
- description: 'Project description',
32
- }),
33
- slug: field.string({
34
- isOptional: true,
35
- description: 'URL-friendly identifier',
36
- }),
22
+ name: 'Project',
23
+ description: 'A project belonging to an organization.',
24
+ schema: 'saas_app',
25
+ map: 'project',
26
+ fields: {
27
+ id: field.id({ description: 'Unique project ID' }),
28
+ name: field.string({ description: 'Project name' }),
29
+ description: field.string({
30
+ isOptional: true,
31
+ description: 'Project description',
32
+ }),
33
+ slug: field.string({
34
+ isOptional: true,
35
+ description: 'URL-friendly identifier',
36
+ }),
37
37
 
38
- // Ownership
39
- organizationId: field.foreignKey({ description: 'Owning organization' }),
40
- createdBy: field.foreignKey({
41
- description: 'User who created the project',
42
- }),
38
+ // Ownership
39
+ organizationId: field.foreignKey({ description: 'Owning organization' }),
40
+ createdBy: field.foreignKey({
41
+ description: 'User who created the project',
42
+ }),
43
43
 
44
- // Status
45
- status: field.enum('ProjectStatus', { default: 'DRAFT' }),
44
+ // Status
45
+ status: field.enum('ProjectStatus', { default: 'DRAFT' }),
46
46
 
47
- // Settings
48
- isPublic: field.boolean({
49
- default: false,
50
- description: 'Whether project is publicly visible',
51
- }),
52
- settings: field.json({
53
- isOptional: true,
54
- description: 'Project-specific settings',
55
- }),
47
+ // Settings
48
+ isPublic: field.boolean({
49
+ default: false,
50
+ description: 'Whether project is publicly visible',
51
+ }),
52
+ settings: field.json({
53
+ isOptional: true,
54
+ description: 'Project-specific settings',
55
+ }),
56
56
 
57
- // Metadata
58
- tags: field.string({ isArray: true, description: 'Project tags' }),
59
- metadata: field.json({ isOptional: true }),
57
+ // Metadata
58
+ tags: field.string({ isArray: true, description: 'Project tags' }),
59
+ metadata: field.json({ isOptional: true }),
60
60
 
61
- // Timestamps
62
- createdAt: field.createdAt(),
63
- updatedAt: field.updatedAt(),
64
- archivedAt: field.dateTime({ isOptional: true }),
65
- },
66
- indexes: [
67
- index.on(['organizationId', 'status']),
68
- index.on(['organizationId', 'createdAt']),
69
- index.unique(['organizationId', 'slug']),
70
- ],
71
- enums: [ProjectStatusEnum],
61
+ // Timestamps
62
+ createdAt: field.createdAt(),
63
+ updatedAt: field.updatedAt(),
64
+ archivedAt: field.dateTime({ isOptional: true }),
65
+ },
66
+ indexes: [
67
+ index.on(['organizationId', 'status']),
68
+ index.on(['organizationId', 'createdAt']),
69
+ index.unique(['organizationId', 'slug']),
70
+ ],
71
+ enums: [ProjectStatusEnum],
72
72
  });
73
73
 
74
74
  /**
75
75
  * ProjectMember entity - project-level access.
76
76
  */
77
77
  export const ProjectMemberEntity = defineEntity({
78
- name: 'ProjectMember',
79
- description: 'User access to a specific project.',
80
- schema: 'saas_app',
81
- map: 'project_member',
82
- fields: {
83
- id: field.id(),
84
- projectId: field.foreignKey(),
85
- userId: field.foreignKey(),
86
- role: field.string({
87
- description: 'Role in project (owner, editor, viewer)',
88
- }),
89
- addedBy: field.string({ isOptional: true }),
90
- createdAt: field.createdAt(),
91
- },
92
- indexes: [index.unique(['projectId', 'userId'])],
78
+ name: 'ProjectMember',
79
+ description: 'User access to a specific project.',
80
+ schema: 'saas_app',
81
+ map: 'project_member',
82
+ fields: {
83
+ id: field.id(),
84
+ projectId: field.foreignKey(),
85
+ userId: field.foreignKey(),
86
+ role: field.string({
87
+ description: 'Role in project (owner, editor, viewer)',
88
+ }),
89
+ addedBy: field.string({ isOptional: true }),
90
+ createdAt: field.createdAt(),
91
+ },
92
+ indexes: [index.unique(['projectId', 'userId'])],
93
93
  });
@@ -5,18 +5,18 @@ import { defineEnum } from '@contractspec/lib.schema';
5
5
  * Note: Entity enum is defined separately in project.entity.ts
6
6
  */
7
7
  export const ProjectStatusSchemaEnum = defineEnum('ProjectStatus', [
8
- 'DRAFT',
9
- 'ACTIVE',
10
- 'ARCHIVED',
11
- 'DELETED',
8
+ 'DRAFT',
9
+ 'ACTIVE',
10
+ 'ARCHIVED',
11
+ 'DELETED',
12
12
  ]);
13
13
 
14
14
  /**
15
15
  * Project status filter enum (includes 'all' option).
16
16
  */
17
17
  export const ProjectStatusFilterEnum = defineEnum('ProjectStatusFilter', [
18
- 'DRAFT',
19
- 'ACTIVE',
20
- 'ARCHIVED',
21
- 'all',
18
+ 'DRAFT',
19
+ 'ACTIVE',
20
+ 'ARCHIVED',
21
+ 'all',
22
22
  ]);
@@ -1,128 +1,128 @@
1
- import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';
2
1
  import { defineEvent } from '@contractspec/lib.contracts-spec';
2
+ import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
3
3
 
4
4
  /**
5
5
  * Payload when a project is created.
6
6
  */
7
7
  const ProjectCreatedPayload = defineSchemaModel({
8
- name: 'ProjectCreatedPayload',
9
- description: 'Payload when a project is created',
10
- fields: {
11
- projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
- name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
- organizationId: {
14
- type: ScalarTypeEnum.String_unsecure(),
15
- isOptional: false,
16
- },
17
- createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
18
- createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
19
- },
8
+ name: 'ProjectCreatedPayload',
9
+ description: 'Payload when a project is created',
10
+ fields: {
11
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ organizationId: {
14
+ type: ScalarTypeEnum.String_unsecure(),
15
+ isOptional: false,
16
+ },
17
+ createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
18
+ createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
19
+ },
20
20
  });
21
21
 
22
22
  /**
23
23
  * Payload when a project is updated.
24
24
  */
25
25
  const ProjectUpdatedPayload = defineSchemaModel({
26
- name: 'ProjectUpdatedPayload',
27
- description: 'Payload when a project is updated',
28
- fields: {
29
- projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
30
- updatedFields: {
31
- type: ScalarTypeEnum.String_unsecure(),
32
- isArray: true,
33
- isOptional: false,
34
- },
35
- updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
36
- updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
37
- },
26
+ name: 'ProjectUpdatedPayload',
27
+ description: 'Payload when a project is updated',
28
+ fields: {
29
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
30
+ updatedFields: {
31
+ type: ScalarTypeEnum.String_unsecure(),
32
+ isArray: true,
33
+ isOptional: false,
34
+ },
35
+ updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
36
+ updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
37
+ },
38
38
  });
39
39
 
40
40
  /**
41
41
  * Payload when a project is deleted.
42
42
  */
43
43
  const ProjectDeletedPayload = defineSchemaModel({
44
- name: 'ProjectDeletedPayload',
45
- description: 'Payload when a project is deleted',
46
- fields: {
47
- projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
48
- organizationId: {
49
- type: ScalarTypeEnum.String_unsecure(),
50
- isOptional: false,
51
- },
52
- deletedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
53
- deletedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
54
- },
44
+ name: 'ProjectDeletedPayload',
45
+ description: 'Payload when a project is deleted',
46
+ fields: {
47
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
48
+ organizationId: {
49
+ type: ScalarTypeEnum.String_unsecure(),
50
+ isOptional: false,
51
+ },
52
+ deletedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
53
+ deletedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
54
+ },
55
55
  });
56
56
 
57
57
  /**
58
58
  * Payload when a project is archived.
59
59
  */
60
60
  const ProjectArchivedPayload = defineSchemaModel({
61
- name: 'ProjectArchivedPayload',
62
- description: 'Payload when a project is archived',
63
- fields: {
64
- projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
65
- archivedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
66
- archivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
67
- },
61
+ name: 'ProjectArchivedPayload',
62
+ description: 'Payload when a project is archived',
63
+ fields: {
64
+ projectId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
65
+ archivedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
66
+ archivedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
67
+ },
68
68
  });
69
69
 
70
70
  /**
71
71
  * Event: A new project has been created.
72
72
  */
73
73
  export const ProjectCreatedEvent = defineEvent({
74
- meta: {
75
- key: 'project.created',
76
- version: '1.0.0',
77
- description: 'A new project has been created.',
78
- stability: 'stable',
79
- owners: ['@saas-team'],
80
- tags: ['project', 'created'],
81
- },
82
- payload: ProjectCreatedPayload,
74
+ meta: {
75
+ key: 'project.created',
76
+ version: '1.0.0',
77
+ description: 'A new project has been created.',
78
+ stability: 'stable',
79
+ owners: ['@saas-team'],
80
+ tags: ['project', 'created'],
81
+ },
82
+ payload: ProjectCreatedPayload,
83
83
  });
84
84
 
85
85
  /**
86
86
  * Event: A project has been updated.
87
87
  */
88
88
  export const ProjectUpdatedEvent = defineEvent({
89
- meta: {
90
- key: 'project.updated',
91
- version: '1.0.0',
92
- description: 'A project has been updated.',
93
- stability: 'stable',
94
- owners: ['@saas-team'],
95
- tags: ['project', 'updated'],
96
- },
97
- payload: ProjectUpdatedPayload,
89
+ meta: {
90
+ key: 'project.updated',
91
+ version: '1.0.0',
92
+ description: 'A project has been updated.',
93
+ stability: 'stable',
94
+ owners: ['@saas-team'],
95
+ tags: ['project', 'updated'],
96
+ },
97
+ payload: ProjectUpdatedPayload,
98
98
  });
99
99
 
100
100
  /**
101
101
  * Event: A project has been deleted.
102
102
  */
103
103
  export const ProjectDeletedEvent = defineEvent({
104
- meta: {
105
- key: 'project.deleted',
106
- version: '1.0.0',
107
- description: 'A project has been deleted.',
108
- stability: 'stable',
109
- owners: ['@saas-team'],
110
- tags: ['project', 'deleted'],
111
- },
112
- payload: ProjectDeletedPayload,
104
+ meta: {
105
+ key: 'project.deleted',
106
+ version: '1.0.0',
107
+ description: 'A project has been deleted.',
108
+ stability: 'stable',
109
+ owners: ['@saas-team'],
110
+ tags: ['project', 'deleted'],
111
+ },
112
+ payload: ProjectDeletedPayload,
113
113
  });
114
114
 
115
115
  /**
116
116
  * Event: A project has been archived.
117
117
  */
118
118
  export const ProjectArchivedEvent = defineEvent({
119
- meta: {
120
- key: 'project.archived',
121
- version: '1.0.0',
122
- description: 'A project has been archived.',
123
- stability: 'stable',
124
- owners: ['@saas-team'],
125
- tags: ['project', 'archived'],
126
- },
127
- payload: ProjectArchivedPayload,
119
+ meta: {
120
+ key: 'project.archived',
121
+ version: '1.0.0',
122
+ description: 'A project has been archived.',
123
+ stability: 'stable',
124
+ owners: ['@saas-team'],
125
+ tags: ['project', 'archived'],
126
+ },
127
+ payload: ProjectArchivedPayload,
128
128
  });