@friggframework/core 2.0.0--canary.531.bae174b.0 → 2.0.0--canary.531.eb2e0bb.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.
@@ -157,7 +157,7 @@ function createSchedulerCommands({ integrationName, schedulerService }) {
157
157
  const result = await service.scheduleOneTime({
158
158
  scheduleName: jobId,
159
159
  scheduleAt: scheduledAt,
160
- targetArn: queueArn,
160
+ queueResourceId: queueArn,
161
161
  payload: sqsPayload,
162
162
  });
163
163
 
@@ -167,7 +167,7 @@ function createSchedulerCommands({ integrationName, schedulerService }) {
167
167
 
168
168
  return {
169
169
  jobId,
170
- jobArn: result.scheduleArn,
170
+ jobArn: result.scheduledJobId,
171
171
  scheduledAt: result.scheduledAt,
172
172
  };
173
173
  } catch (error) {
@@ -39,19 +39,19 @@ class EventBridgeSchedulerAdapter extends SchedulerServiceInterface {
39
39
  * @param {Object} params
40
40
  * @param {string} params.scheduleName - Unique name for the schedule
41
41
  * @param {Date} params.scheduleAt - When to trigger the schedule
42
- * @param {string} params.targetArn - SQS queue ARN to send message to
42
+ * @param {string} params.queueResourceId - Queue resource identifier (ARN) to send message to
43
43
  * @param {Object} params.payload - Message payload
44
- * @returns {Promise<{scheduleArn: string, scheduledAt: string}>}
44
+ * @returns {Promise<{scheduledJobId: string, scheduledAt: string}>}
45
45
  */
46
- async scheduleOneTime({ scheduleName, scheduleAt, targetArn, payload }) {
46
+ async scheduleOneTime({ scheduleName, scheduleAt, queueResourceId, payload }) {
47
47
  if (!scheduleName) {
48
48
  throw new Error('scheduleName is required');
49
49
  }
50
50
  if (!scheduleAt || !(scheduleAt instanceof Date)) {
51
51
  throw new Error('scheduleAt must be a valid Date object');
52
52
  }
53
- if (!targetArn) {
54
- throw new Error('targetArn is required');
53
+ if (!queueResourceId) {
54
+ throw new Error('queueResourceId is required');
55
55
  }
56
56
  if (!this.roleArn) {
57
57
  throw new Error(
@@ -71,7 +71,7 @@ class EventBridgeSchedulerAdapter extends SchedulerServiceInterface {
71
71
  Mode: 'OFF',
72
72
  },
73
73
  Target: {
74
- Arn: targetArn,
74
+ Arn: queueResourceId,
75
75
  RoleArn: this.roleArn,
76
76
  Input: JSON.stringify(payload),
77
77
  },
@@ -85,7 +85,7 @@ class EventBridgeSchedulerAdapter extends SchedulerServiceInterface {
85
85
  );
86
86
 
87
87
  return {
88
- scheduleArn: response.ScheduleArn,
88
+ scheduledJobId: response.ScheduleArn,
89
89
  scheduledAt: scheduleAt.toISOString(),
90
90
  };
91
91
  } catch (error) {
@@ -22,25 +22,25 @@ class MockSchedulerAdapter extends SchedulerServiceInterface {
22
22
  * @param {Object} params
23
23
  * @param {string} params.scheduleName - Unique name for the schedule
24
24
  * @param {Date} params.scheduleAt - When to trigger the schedule
25
- * @param {string} params.targetArn - Target resource ARN (SQS queue)
25
+ * @param {string} params.queueResourceId - Queue resource identifier to send message to
26
26
  * @param {Object} params.payload - JSON payload to send
27
- * @returns {Promise<{scheduleArn: string, scheduledAt: string}>}
27
+ * @returns {Promise<{scheduledJobId: string, scheduledAt: string}>}
28
28
  */
29
- async scheduleOneTime({ scheduleName, scheduleAt, targetArn, payload }) {
29
+ async scheduleOneTime({ scheduleName, scheduleAt, queueResourceId, payload }) {
30
30
  if (!scheduleName) {
31
31
  throw new Error('scheduleName is required');
32
32
  }
33
33
  if (!scheduleAt || !(scheduleAt instanceof Date)) {
34
34
  throw new Error('scheduleAt must be a valid Date object');
35
35
  }
36
- if (!targetArn) {
37
- throw new Error('targetArn is required');
36
+ if (!queueResourceId) {
37
+ throw new Error('queueResourceId is required');
38
38
  }
39
39
 
40
40
  const scheduleData = {
41
41
  scheduleName,
42
42
  scheduledAt: scheduleAt.toISOString(),
43
- targetArn,
43
+ queueResourceId,
44
44
  payload,
45
45
  createdAt: new Date().toISOString(),
46
46
  state: 'ENABLED',
@@ -50,13 +50,13 @@ class MockSchedulerAdapter extends SchedulerServiceInterface {
50
50
 
51
51
  console.log(`[MockScheduler] Created schedule: ${scheduleName}`);
52
52
  console.log(`[MockScheduler] Scheduled for: ${scheduleAt.toISOString()}`);
53
- console.log(`[MockScheduler] Target: ${targetArn}`);
53
+ console.log(`[MockScheduler] Target: ${queueResourceId}`);
54
54
  if (this.verbose) {
55
55
  console.log(`[MockScheduler] Payload:`, JSON.stringify(payload, null, 2));
56
56
  }
57
57
 
58
58
  return {
59
- scheduleArn: `arn:aws:scheduler:mock-region:123456789:schedule/frigg-integration-schedules/${scheduleName}`,
59
+ scheduledJobId: `mock-job-${scheduleName}`,
60
60
  scheduledAt: scheduleAt.toISOString(),
61
61
  };
62
62
  }
@@ -15,11 +15,11 @@ class SchedulerServiceInterface {
15
15
  * @param {Object} params
16
16
  * @param {string} params.scheduleName - Unique name for the schedule
17
17
  * @param {Date} params.scheduleAt - When to trigger the schedule
18
- * @param {string} params.targetArn - Target resource ARN (SQS queue)
18
+ * @param {string} params.queueResourceId - Queue resource identifier to send message to
19
19
  * @param {Object} params.payload - JSON payload to send
20
- * @returns {Promise<{scheduleArn: string, scheduledAt: string}>}
20
+ * @returns {Promise<{scheduledJobId: string, scheduledAt: string}>}
21
21
  */
22
- async scheduleOneTime({ scheduleName, scheduleAt, targetArn, payload }) {
22
+ async scheduleOneTime({ scheduleName, scheduleAt, queueResourceId, payload }) {
23
23
  throw new Error('Method scheduleOneTime must be implemented by subclass');
24
24
  }
25
25
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.531.bae174b.0",
4
+ "version": "2.0.0--canary.531.eb2e0bb.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -38,9 +38,9 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@friggframework/eslint-config": "2.0.0--canary.531.bae174b.0",
42
- "@friggframework/prettier-config": "2.0.0--canary.531.bae174b.0",
43
- "@friggframework/test": "2.0.0--canary.531.bae174b.0",
41
+ "@friggframework/eslint-config": "2.0.0--canary.531.eb2e0bb.0",
42
+ "@friggframework/prettier-config": "2.0.0--canary.531.eb2e0bb.0",
43
+ "@friggframework/test": "2.0.0--canary.531.eb2e0bb.0",
44
44
  "@prisma/client": "^6.17.0",
45
45
  "@types/lodash": "4.17.15",
46
46
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "bae174bf894cc6a31a748e6c35df8c2c0ff8d2bd"
83
+ "gitHead": "eb2e0bb683bc39772b4f30b25ad871a2ef729075"
84
84
  }