activitysmith 0.1.3 → 0.1.4

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 (2) hide show
  1. package/README.md +13 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -38,8 +38,8 @@ const activitysmith = new ActivitySmith({
38
38
 
39
39
  ```ts
40
40
  const response = await activitysmith.notifications.send({
41
- title: "Build Failed",
42
- message: "CI pipeline failed on main branch",
41
+ title: "New subscription 💸",
42
+ message: "Customer upgraded to Pro plan",
43
43
  channels: ["devs", "ops"], // Optional
44
44
  });
45
45
 
@@ -52,9 +52,9 @@ console.log(response.devices_notified);
52
52
  ```ts
53
53
  const start = await activitysmith.liveActivities.start({
54
54
  content_state: {
55
- title: "ActivitySmith API Deployment",
56
- subtitle: "start",
57
- number_of_steps: 4,
55
+ title: "Nightly database backup",
56
+ subtitle: "create snapshot",
57
+ number_of_steps: 3,
58
58
  current_step: 1,
59
59
  type: "segmented_progress",
60
60
  color: "yellow",
@@ -71,9 +71,9 @@ const activityId = start.activity_id;
71
71
  const update = await activitysmith.liveActivities.update({
72
72
  activity_id: activityId,
73
73
  content_state: {
74
- title: "ActivitySmith API Deployment",
75
- subtitle: "npm i & pm2",
76
- current_step: 3,
74
+ title: "Nightly database backup",
75
+ subtitle: "upload archive",
76
+ current_step: 2,
77
77
  },
78
78
  });
79
79
 
@@ -86,10 +86,10 @@ console.log(update.devices_notified);
86
86
  const end = await activitysmith.liveActivities.end({
87
87
  activity_id: activityId,
88
88
  content_state: {
89
- title: "ActivitySmith API Deployment",
90
- subtitle: "done",
91
- current_step: 4,
92
- auto_dismiss_minutes: 3,
89
+ title: "Nightly database backup",
90
+ subtitle: "verify restore",
91
+ current_step: 3,
92
+ auto_dismiss_minutes: 2,
93
93
  },
94
94
  });
95
95
 
@@ -101,7 +101,7 @@ console.log(end.success);
101
101
  ```ts
102
102
  try {
103
103
  await activitysmith.notifications.send({
104
- title: "Build Failed",
104
+ title: "New subscription 💸",
105
105
  });
106
106
  } catch (error) {
107
107
  console.error(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "activitysmith",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Official ActivitySmith Node.js SDK",
5
5
  "keywords": [
6
6
  "activitysmith",