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.
- package/README.md +13 -13
- 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: "
|
|
42
|
-
message: "
|
|
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: "
|
|
56
|
-
subtitle: "
|
|
57
|
-
number_of_steps:
|
|
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: "
|
|
75
|
-
subtitle: "
|
|
76
|
-
current_step:
|
|
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: "
|
|
90
|
-
subtitle: "
|
|
91
|
-
current_step:
|
|
92
|
-
auto_dismiss_minutes:
|
|
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: "
|
|
104
|
+
title: "New subscription 💸",
|
|
105
105
|
});
|
|
106
106
|
} catch (error) {
|
|
107
107
|
console.error(error);
|