@clipboard-health/ai-rules 0.3.1 → 0.3.3

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/backend/AGENTS.md CHANGED
@@ -13,6 +13,151 @@
13
13
  - Requests and responses follow the JSON:API specification, including pagination for listings.
14
14
  - Use TypeDoc to document public functions, classes, methods, and complex code blocks.
15
15
 
16
+ <!-- Source: .ruler/backend/notifications.md -->
17
+
18
+ # Notifications
19
+
20
+ Send notifications through [Knock](https://docs.knock.app) using the `@clipboard-health/notifications` NPM library.
21
+
22
+ ## Usage
23
+
24
+ <embedex source="packages/notifications/examples/usage.md">
25
+
26
+ 1. Search your service for a `NotificationJobEnqueuer` instance. If there isn't one, create and export it:
27
+
28
+ ```ts
29
+ import { NotificationJobEnqueuer } from "@clipboard-health/notifications";
30
+
31
+ import { BackgroundJobsService } from "./setup";
32
+
33
+ // Create and export one instance of this in your microservice.
34
+ export const notificationJobEnqueuer = new NotificationJobEnqueuer({
35
+ // Use your instance of `@clipboard-health/mongo-jobs` or `@clipboard-health/background-jobs-postgres` here.
36
+ adapter: new BackgroundJobsService(),
37
+ });
38
+ ```
39
+
40
+ 1. Implement a minimal job, calling off to a NestJS service for any business logic and to send the notification.
41
+
42
+ ```ts
43
+ import { type BaseHandler } from "@clipboard-health/background-jobs-adapter";
44
+ import { type NotificationData } from "@clipboard-health/notifications";
45
+ import { isFailure, toError } from "@clipboard-health/util-ts";
46
+
47
+ import { type ExampleNotificationService } from "./exampleNotification.service";
48
+
49
+ export type ExampleNotificationData = NotificationData<{
50
+ workplaceId: string;
51
+ }>;
52
+
53
+ export const EXAMPLE_NOTIFICATION_JOB_NAME = "ExampleNotificationJob";
54
+
55
+ // For mongo-jobs, you'll implement HandlerInterface<ExampleNotificationData["Job"]>
56
+ // For background-jobs-postgres, you'll implement Handler<ExampleNotificationData["Job"]>
57
+ export class ExampleNotificationJob implements BaseHandler<ExampleNotificationData["Job"]> {
58
+ public name = EXAMPLE_NOTIFICATION_JOB_NAME;
59
+
60
+ constructor(private readonly service: ExampleNotificationService) {}
61
+
62
+ async perform(data: ExampleNotificationData["Job"], job: { attemptsCount: number }) {
63
+ const result = await this.service.sendNotification({
64
+ ...data,
65
+ // Include the job's attempts count for debugging, this is called `retryAttempts` in `background-jobs-postgres`.
66
+ attempt: job.attemptsCount + 1,
67
+ });
68
+
69
+ if (isFailure(result)) {
70
+ throw toError(result.error);
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ 1. Search your service for a constant that stores workflow keys. If there isn't one, create and export it:
77
+
78
+ ```ts
79
+ export const WORKFLOW_KEYS = {
80
+ eventStartingReminder: "event-starting-reminder",
81
+ } as const;
82
+ ```
83
+
84
+ 1. Enqueue your job:
85
+
86
+ ```ts
87
+ import {
88
+ EXAMPLE_NOTIFICATION_JOB_NAME,
89
+ type ExampleNotificationData,
90
+ } from "./exampleNotification.job";
91
+ import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
92
+ import { WORKFLOW_KEYS } from "./workflowKeys";
93
+
94
+ async function enqueueNotificationJob() {
95
+ await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
96
+ EXAMPLE_NOTIFICATION_JOB_NAME,
97
+ // Important: Read the TypeDoc documentation for additional context.
98
+ {
99
+ /**
100
+ * Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
101
+ * service instead of this manual calculation.
102
+ */
103
+ expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
104
+ // Set idempotencyKey at enqueue-time so it remains stable across job retries.
105
+ idempotencyKey: {
106
+ resourceId: "event-123",
107
+ },
108
+ // Set recipients at enqueue-time so they respect our notification provider's limits.
109
+ recipients: ["userId-1"],
110
+
111
+ workflowKey: WORKFLOW_KEYS.eventStartingReminder,
112
+
113
+ // Any additional enqueue-time data passed to the job:
114
+ workplaceId: "workplaceId-123",
115
+ },
116
+ );
117
+ }
118
+
119
+ // eslint-disable-next-line unicorn/prefer-top-level-await
120
+ void enqueueNotificationJob();
121
+ ```
122
+
123
+ 1. Trigger the job in your NestJS service:
124
+
125
+ ```ts
126
+ import { type NotificationClient } from "@clipboard-health/notifications";
127
+
128
+ import { type ExampleNotificationData } from "./exampleNotification.job";
129
+
130
+ type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
131
+
132
+ export class ExampleNotificationService {
133
+ constructor(private readonly client: NotificationClient) {}
134
+
135
+ async sendNotification(params: ExampleNotificationDo) {
136
+ const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
137
+
138
+ // Assume this comes from a database and are used as template variables...
139
+ // Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
140
+ const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
141
+
142
+ // Important: Read the TypeDoc documentation for additional context.
143
+ return await this.client.trigger({
144
+ attempt,
145
+ body: {
146
+ data,
147
+ recipients,
148
+ workplaceId,
149
+ },
150
+ expiresAt: new Date(expiresAt),
151
+ idempotencyKey,
152
+ keysToRedact: ["secret"],
153
+ workflowKey,
154
+ });
155
+ }
156
+ }
157
+ ```
158
+
159
+ </embedex>
160
+
16
161
  <!-- Source: .ruler/common/codeStyleAndStructure.md -->
17
162
 
18
163
  # Code style and structure
package/backend/CLAUDE.md CHANGED
@@ -11,6 +11,151 @@
11
11
  - Requests and responses follow the JSON:API specification, including pagination for listings.
12
12
  - Use TypeDoc to document public functions, classes, methods, and complex code blocks.
13
13
 
14
+ <!-- Source: .ruler/backend/notifications.md -->
15
+
16
+ # Notifications
17
+
18
+ Send notifications through [Knock](https://docs.knock.app) using the `@clipboard-health/notifications` NPM library.
19
+
20
+ ## Usage
21
+
22
+ <embedex source="packages/notifications/examples/usage.md">
23
+
24
+ 1. Search your service for a `NotificationJobEnqueuer` instance. If there isn't one, create and export it:
25
+
26
+ ```ts
27
+ import { NotificationJobEnqueuer } from "@clipboard-health/notifications";
28
+
29
+ import { BackgroundJobsService } from "./setup";
30
+
31
+ // Create and export one instance of this in your microservice.
32
+ export const notificationJobEnqueuer = new NotificationJobEnqueuer({
33
+ // Use your instance of `@clipboard-health/mongo-jobs` or `@clipboard-health/background-jobs-postgres` here.
34
+ adapter: new BackgroundJobsService(),
35
+ });
36
+ ```
37
+
38
+ 1. Implement a minimal job, calling off to a NestJS service for any business logic and to send the notification.
39
+
40
+ ```ts
41
+ import { type BaseHandler } from "@clipboard-health/background-jobs-adapter";
42
+ import { type NotificationData } from "@clipboard-health/notifications";
43
+ import { isFailure, toError } from "@clipboard-health/util-ts";
44
+
45
+ import { type ExampleNotificationService } from "./exampleNotification.service";
46
+
47
+ export type ExampleNotificationData = NotificationData<{
48
+ workplaceId: string;
49
+ }>;
50
+
51
+ export const EXAMPLE_NOTIFICATION_JOB_NAME = "ExampleNotificationJob";
52
+
53
+ // For mongo-jobs, you'll implement HandlerInterface<ExampleNotificationData["Job"]>
54
+ // For background-jobs-postgres, you'll implement Handler<ExampleNotificationData["Job"]>
55
+ export class ExampleNotificationJob implements BaseHandler<ExampleNotificationData["Job"]> {
56
+ public name = EXAMPLE_NOTIFICATION_JOB_NAME;
57
+
58
+ constructor(private readonly service: ExampleNotificationService) {}
59
+
60
+ async perform(data: ExampleNotificationData["Job"], job: { attemptsCount: number }) {
61
+ const result = await this.service.sendNotification({
62
+ ...data,
63
+ // Include the job's attempts count for debugging, this is called `retryAttempts` in `background-jobs-postgres`.
64
+ attempt: job.attemptsCount + 1,
65
+ });
66
+
67
+ if (isFailure(result)) {
68
+ throw toError(result.error);
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ 1. Search your service for a constant that stores workflow keys. If there isn't one, create and export it:
75
+
76
+ ```ts
77
+ export const WORKFLOW_KEYS = {
78
+ eventStartingReminder: "event-starting-reminder",
79
+ } as const;
80
+ ```
81
+
82
+ 1. Enqueue your job:
83
+
84
+ ```ts
85
+ import {
86
+ EXAMPLE_NOTIFICATION_JOB_NAME,
87
+ type ExampleNotificationData,
88
+ } from "./exampleNotification.job";
89
+ import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
90
+ import { WORKFLOW_KEYS } from "./workflowKeys";
91
+
92
+ async function enqueueNotificationJob() {
93
+ await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
94
+ EXAMPLE_NOTIFICATION_JOB_NAME,
95
+ // Important: Read the TypeDoc documentation for additional context.
96
+ {
97
+ /**
98
+ * Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
99
+ * service instead of this manual calculation.
100
+ */
101
+ expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
102
+ // Set idempotencyKey at enqueue-time so it remains stable across job retries.
103
+ idempotencyKey: {
104
+ resourceId: "event-123",
105
+ },
106
+ // Set recipients at enqueue-time so they respect our notification provider's limits.
107
+ recipients: ["userId-1"],
108
+
109
+ workflowKey: WORKFLOW_KEYS.eventStartingReminder,
110
+
111
+ // Any additional enqueue-time data passed to the job:
112
+ workplaceId: "workplaceId-123",
113
+ },
114
+ );
115
+ }
116
+
117
+ // eslint-disable-next-line unicorn/prefer-top-level-await
118
+ void enqueueNotificationJob();
119
+ ```
120
+
121
+ 1. Trigger the job in your NestJS service:
122
+
123
+ ```ts
124
+ import { type NotificationClient } from "@clipboard-health/notifications";
125
+
126
+ import { type ExampleNotificationData } from "./exampleNotification.job";
127
+
128
+ type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
129
+
130
+ export class ExampleNotificationService {
131
+ constructor(private readonly client: NotificationClient) {}
132
+
133
+ async sendNotification(params: ExampleNotificationDo) {
134
+ const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
135
+
136
+ // Assume this comes from a database and are used as template variables...
137
+ // Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
138
+ const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
139
+
140
+ // Important: Read the TypeDoc documentation for additional context.
141
+ return await this.client.trigger({
142
+ attempt,
143
+ body: {
144
+ data,
145
+ recipients,
146
+ workplaceId,
147
+ },
148
+ expiresAt: new Date(expiresAt),
149
+ idempotencyKey,
150
+ keysToRedact: ["secret"],
151
+ workflowKey,
152
+ });
153
+ }
154
+ }
155
+ ```
156
+
157
+ </embedex>
158
+
14
159
  <!-- Source: .ruler/common/codeStyleAndStructure.md -->
15
160
 
16
161
  # Code style and structure
@@ -13,6 +13,151 @@
13
13
  - Requests and responses follow the JSON:API specification, including pagination for listings.
14
14
  - Use TypeDoc to document public functions, classes, methods, and complex code blocks.
15
15
 
16
+ <!-- Source: .ruler/backend/notifications.md -->
17
+
18
+ # Notifications
19
+
20
+ Send notifications through [Knock](https://docs.knock.app) using the `@clipboard-health/notifications` NPM library.
21
+
22
+ ## Usage
23
+
24
+ <embedex source="packages/notifications/examples/usage.md">
25
+
26
+ 1. Search your service for a `NotificationJobEnqueuer` instance. If there isn't one, create and export it:
27
+
28
+ ```ts
29
+ import { NotificationJobEnqueuer } from "@clipboard-health/notifications";
30
+
31
+ import { BackgroundJobsService } from "./setup";
32
+
33
+ // Create and export one instance of this in your microservice.
34
+ export const notificationJobEnqueuer = new NotificationJobEnqueuer({
35
+ // Use your instance of `@clipboard-health/mongo-jobs` or `@clipboard-health/background-jobs-postgres` here.
36
+ adapter: new BackgroundJobsService(),
37
+ });
38
+ ```
39
+
40
+ 1. Implement a minimal job, calling off to a NestJS service for any business logic and to send the notification.
41
+
42
+ ```ts
43
+ import { type BaseHandler } from "@clipboard-health/background-jobs-adapter";
44
+ import { type NotificationData } from "@clipboard-health/notifications";
45
+ import { isFailure, toError } from "@clipboard-health/util-ts";
46
+
47
+ import { type ExampleNotificationService } from "./exampleNotification.service";
48
+
49
+ export type ExampleNotificationData = NotificationData<{
50
+ workplaceId: string;
51
+ }>;
52
+
53
+ export const EXAMPLE_NOTIFICATION_JOB_NAME = "ExampleNotificationJob";
54
+
55
+ // For mongo-jobs, you'll implement HandlerInterface<ExampleNotificationData["Job"]>
56
+ // For background-jobs-postgres, you'll implement Handler<ExampleNotificationData["Job"]>
57
+ export class ExampleNotificationJob implements BaseHandler<ExampleNotificationData["Job"]> {
58
+ public name = EXAMPLE_NOTIFICATION_JOB_NAME;
59
+
60
+ constructor(private readonly service: ExampleNotificationService) {}
61
+
62
+ async perform(data: ExampleNotificationData["Job"], job: { attemptsCount: number }) {
63
+ const result = await this.service.sendNotification({
64
+ ...data,
65
+ // Include the job's attempts count for debugging, this is called `retryAttempts` in `background-jobs-postgres`.
66
+ attempt: job.attemptsCount + 1,
67
+ });
68
+
69
+ if (isFailure(result)) {
70
+ throw toError(result.error);
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ 1. Search your service for a constant that stores workflow keys. If there isn't one, create and export it:
77
+
78
+ ```ts
79
+ export const WORKFLOW_KEYS = {
80
+ eventStartingReminder: "event-starting-reminder",
81
+ } as const;
82
+ ```
83
+
84
+ 1. Enqueue your job:
85
+
86
+ ```ts
87
+ import {
88
+ EXAMPLE_NOTIFICATION_JOB_NAME,
89
+ type ExampleNotificationData,
90
+ } from "./exampleNotification.job";
91
+ import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
92
+ import { WORKFLOW_KEYS } from "./workflowKeys";
93
+
94
+ async function enqueueNotificationJob() {
95
+ await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
96
+ EXAMPLE_NOTIFICATION_JOB_NAME,
97
+ // Important: Read the TypeDoc documentation for additional context.
98
+ {
99
+ /**
100
+ * Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
101
+ * service instead of this manual calculation.
102
+ */
103
+ expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
104
+ // Set idempotencyKey at enqueue-time so it remains stable across job retries.
105
+ idempotencyKey: {
106
+ resourceId: "event-123",
107
+ },
108
+ // Set recipients at enqueue-time so they respect our notification provider's limits.
109
+ recipients: ["userId-1"],
110
+
111
+ workflowKey: WORKFLOW_KEYS.eventStartingReminder,
112
+
113
+ // Any additional enqueue-time data passed to the job:
114
+ workplaceId: "workplaceId-123",
115
+ },
116
+ );
117
+ }
118
+
119
+ // eslint-disable-next-line unicorn/prefer-top-level-await
120
+ void enqueueNotificationJob();
121
+ ```
122
+
123
+ 1. Trigger the job in your NestJS service:
124
+
125
+ ```ts
126
+ import { type NotificationClient } from "@clipboard-health/notifications";
127
+
128
+ import { type ExampleNotificationData } from "./exampleNotification.job";
129
+
130
+ type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
131
+
132
+ export class ExampleNotificationService {
133
+ constructor(private readonly client: NotificationClient) {}
134
+
135
+ async sendNotification(params: ExampleNotificationDo) {
136
+ const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
137
+
138
+ // Assume this comes from a database and are used as template variables...
139
+ // Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
140
+ const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
141
+
142
+ // Important: Read the TypeDoc documentation for additional context.
143
+ return await this.client.trigger({
144
+ attempt,
145
+ body: {
146
+ data,
147
+ recipients,
148
+ workplaceId,
149
+ },
150
+ expiresAt: new Date(expiresAt),
151
+ idempotencyKey,
152
+ keysToRedact: ["secret"],
153
+ workflowKey,
154
+ });
155
+ }
156
+ }
157
+ ```
158
+
159
+ </embedex>
160
+
16
161
  <!-- Source: .ruler/common/codeStyleAndStructure.md -->
17
162
 
18
163
  # Code style and structure
@@ -11,6 +11,151 @@
11
11
  - Requests and responses follow the JSON:API specification, including pagination for listings.
12
12
  - Use TypeDoc to document public functions, classes, methods, and complex code blocks.
13
13
 
14
+ <!-- Source: .ruler/backend/notifications.md -->
15
+
16
+ # Notifications
17
+
18
+ Send notifications through [Knock](https://docs.knock.app) using the `@clipboard-health/notifications` NPM library.
19
+
20
+ ## Usage
21
+
22
+ <embedex source="packages/notifications/examples/usage.md">
23
+
24
+ 1. Search your service for a `NotificationJobEnqueuer` instance. If there isn't one, create and export it:
25
+
26
+ ```ts
27
+ import { NotificationJobEnqueuer } from "@clipboard-health/notifications";
28
+
29
+ import { BackgroundJobsService } from "./setup";
30
+
31
+ // Create and export one instance of this in your microservice.
32
+ export const notificationJobEnqueuer = new NotificationJobEnqueuer({
33
+ // Use your instance of `@clipboard-health/mongo-jobs` or `@clipboard-health/background-jobs-postgres` here.
34
+ adapter: new BackgroundJobsService(),
35
+ });
36
+ ```
37
+
38
+ 1. Implement a minimal job, calling off to a NestJS service for any business logic and to send the notification.
39
+
40
+ ```ts
41
+ import { type BaseHandler } from "@clipboard-health/background-jobs-adapter";
42
+ import { type NotificationData } from "@clipboard-health/notifications";
43
+ import { isFailure, toError } from "@clipboard-health/util-ts";
44
+
45
+ import { type ExampleNotificationService } from "./exampleNotification.service";
46
+
47
+ export type ExampleNotificationData = NotificationData<{
48
+ workplaceId: string;
49
+ }>;
50
+
51
+ export const EXAMPLE_NOTIFICATION_JOB_NAME = "ExampleNotificationJob";
52
+
53
+ // For mongo-jobs, you'll implement HandlerInterface<ExampleNotificationData["Job"]>
54
+ // For background-jobs-postgres, you'll implement Handler<ExampleNotificationData["Job"]>
55
+ export class ExampleNotificationJob implements BaseHandler<ExampleNotificationData["Job"]> {
56
+ public name = EXAMPLE_NOTIFICATION_JOB_NAME;
57
+
58
+ constructor(private readonly service: ExampleNotificationService) {}
59
+
60
+ async perform(data: ExampleNotificationData["Job"], job: { attemptsCount: number }) {
61
+ const result = await this.service.sendNotification({
62
+ ...data,
63
+ // Include the job's attempts count for debugging, this is called `retryAttempts` in `background-jobs-postgres`.
64
+ attempt: job.attemptsCount + 1,
65
+ });
66
+
67
+ if (isFailure(result)) {
68
+ throw toError(result.error);
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ 1. Search your service for a constant that stores workflow keys. If there isn't one, create and export it:
75
+
76
+ ```ts
77
+ export const WORKFLOW_KEYS = {
78
+ eventStartingReminder: "event-starting-reminder",
79
+ } as const;
80
+ ```
81
+
82
+ 1. Enqueue your job:
83
+
84
+ ```ts
85
+ import {
86
+ EXAMPLE_NOTIFICATION_JOB_NAME,
87
+ type ExampleNotificationData,
88
+ } from "./exampleNotification.job";
89
+ import { notificationJobEnqueuer } from "./notificationJobEnqueuer";
90
+ import { WORKFLOW_KEYS } from "./workflowKeys";
91
+
92
+ async function enqueueNotificationJob() {
93
+ await notificationJobEnqueuer.enqueueOneOrMore<ExampleNotificationData["Enqueue"]>(
94
+ EXAMPLE_NOTIFICATION_JOB_NAME,
95
+ // Important: Read the TypeDoc documentation for additional context.
96
+ {
97
+ /**
98
+ * Set expiresAt at enqueue-time so it remains stable across job retries. Use date-fns in your
99
+ * service instead of this manual calculation.
100
+ */
101
+ expiresAt: new Date(Date.now() + 60 * 60_000).toISOString(),
102
+ // Set idempotencyKey at enqueue-time so it remains stable across job retries.
103
+ idempotencyKey: {
104
+ resourceId: "event-123",
105
+ },
106
+ // Set recipients at enqueue-time so they respect our notification provider's limits.
107
+ recipients: ["userId-1"],
108
+
109
+ workflowKey: WORKFLOW_KEYS.eventStartingReminder,
110
+
111
+ // Any additional enqueue-time data passed to the job:
112
+ workplaceId: "workplaceId-123",
113
+ },
114
+ );
115
+ }
116
+
117
+ // eslint-disable-next-line unicorn/prefer-top-level-await
118
+ void enqueueNotificationJob();
119
+ ```
120
+
121
+ 1. Trigger the job in your NestJS service:
122
+
123
+ ```ts
124
+ import { type NotificationClient } from "@clipboard-health/notifications";
125
+
126
+ import { type ExampleNotificationData } from "./exampleNotification.job";
127
+
128
+ type ExampleNotificationDo = ExampleNotificationData["Job"] & { attempt: number };
129
+
130
+ export class ExampleNotificationService {
131
+ constructor(private readonly client: NotificationClient) {}
132
+
133
+ async sendNotification(params: ExampleNotificationDo) {
134
+ const { attempt, expiresAt, idempotencyKey, recipients, workflowKey, workplaceId } = params;
135
+
136
+ // Assume this comes from a database and are used as template variables...
137
+ // Use @clipboard-health/date-time's formatShortDateTime in your service for consistency.
138
+ const data = { favoriteColor: "blue", favoriteAt: new Date().toISOString(), secret: "2" };
139
+
140
+ // Important: Read the TypeDoc documentation for additional context.
141
+ return await this.client.trigger({
142
+ attempt,
143
+ body: {
144
+ data,
145
+ recipients,
146
+ workplaceId,
147
+ },
148
+ expiresAt: new Date(expiresAt),
149
+ idempotencyKey,
150
+ keysToRedact: ["secret"],
151
+ workflowKey,
152
+ });
153
+ }
154
+ }
155
+ ```
156
+
157
+ </embedex>
158
+
14
159
  <!-- Source: .ruler/common/codeStyleAndStructure.md -->
15
160
 
16
161
  # Code style and structure
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clipboard-health/ai-rules",
3
3
  "description": "Pre-built AI agent rules for consistent coding standards.",
4
- "version": "0.3.1",
4
+ "version": "0.3.3",
5
5
  "bugs": "https://github.com/ClipboardHealth/core-utils/issues",
6
6
  "devDependencies": {
7
7
  "@intellectronica/ruler": "0.3.10"