Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const activitysmith = new ActivitySmith({

```ts
const response = await activitysmith.notifications.send({
title: "Build Failed",
message: "CI pipeline failed on main branch",
title: "New subscription 💸",
message: "Customer upgraded to Pro plan",
channels: ["devs", "ops"], // Optional
});

Expand All @@ -52,9 +52,9 @@ console.log(response.devices_notified);
```ts
const start = await activitysmith.liveActivities.start({
content_state: {
title: "ActivitySmith API Deployment",
subtitle: "start",
number_of_steps: 4,
title: "Nightly database backup",
subtitle: "create snapshot",
number_of_steps: 3,
current_step: 1,
type: "segmented_progress",
color: "yellow",
Expand All @@ -71,9 +71,9 @@ const activityId = start.activity_id;
const update = await activitysmith.liveActivities.update({
activity_id: activityId,
content_state: {
title: "ActivitySmith API Deployment",
subtitle: "npm i & pm2",
current_step: 3,
title: "Nightly database backup",
subtitle: "upload archive",
current_step: 2,
},
});

Expand All @@ -86,10 +86,10 @@ console.log(update.devices_notified);
const end = await activitysmith.liveActivities.end({
activity_id: activityId,
content_state: {
title: "ActivitySmith API Deployment",
subtitle: "done",
current_step: 4,
auto_dismiss_minutes: 3,
title: "Nightly database backup",
subtitle: "verify restore",
current_step: 3,
auto_dismiss_minutes: 2,
},
});

Expand All @@ -101,7 +101,7 @@ console.log(end.success);
```ts
try {
await activitysmith.notifications.send({
title: "Build Failed",
title: "New subscription 💸",
});
} catch (error) {
console.error(error);
Expand Down
2 changes: 1 addition & 1 deletion generated/.regen-branch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
regen/openapi-e3d906fdaa37dd3d08772a17115a21f9c25e0ace
regen/openapi-2e618c9b53b45115eb880ab971dae2a3dae7d3f4