Skip to content
Closed
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
171 changes: 85 additions & 86 deletions generated/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@ tags:
paths:
/badge:
post:
description: "Updates the App Icon Badge Count on devices matched by API key\
\ scope and optional target channels. Send `badge: 0` to clear the count.\
\ Badge updates are independent of push notifications and do not create a\
\ push notification history item."
description: Shows a number on the ActivitySmith app icon.
operationId: updateAppIconBadgeCount
requestBody:
content:
application/json:
examples:
set_count:
value:
badge: 12
badge: 8333
clear_count:
value:
badge: 0
Expand All @@ -53,7 +50,7 @@ paths:
default:
value:
success: true
badge: 12
badge: 8333
devices_notified: 2
users_notified: 1
effective_channel_slugs: null
Expand All @@ -74,32 +71,18 @@ paths:
"400":
content:
application/json:
examples:
invalid_badge:
value:
error: Invalid badge
message: badge must be a non-negative integer between 0 and 2147483647.
Use 0 to clear the badge.
schema:
$ref: '#/components/schemas/BadRequestError'
description: Bad request (invalid badge value or channel targeting input)
description: Bad request
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
description: Forbidden (API key scope or channel assignment violation)
description: Forbidden
"404":
content:
application/json:
examples:
no_devices:
value:
error: No recipients found
message: No devices matched the effective channel target
badge: 12
effective_channel_slugs:
- sales
schema:
$ref: '#/components/schemas/NoRecipientsError'
description: No recipients found for effective channel target
Expand All @@ -109,18 +92,36 @@ paths:
schema:
$ref: '#/components/schemas/RateLimitError'
description: Rate limit exceeded
summary: Update App Icon Badge Count
summary: Set App Icon Badge Count
tags:
- AppIconBadges
x-codeSamples:
- lang: javascript
label: Node
source: await activitysmith.badgeCount(8333);
- lang: python
label: Python
source: activitysmith.badge_count(8333)
- lang: go
label: Go
source: activitysmith.BadgeCount(8333)
- lang: php
label: PHP
source: $activitysmith->badgeCount(8333);
- lang: ruby
label: Ruby
source: activitysmith.badge_count(8333)
- lang: bash
label: CLI
source: activitysmith badge 8333
- lang: bash
label: cURL
source: |-
curl -X POST "https://activitysmith.com/api/badge" \
-H "Authorization: Bearer $ACTIVITYSMITH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"badge": 12
"badge": 8333
}'
/push-notification:
post:
Expand Down Expand Up @@ -335,7 +336,7 @@ paths:
\ ends the current Live Activity for this stream and dismisses it from devices.\
\ If you need direct lifecycle control, use /live-activity/start, /live-activity/update,\
\ and /live-activity/end instead. Use secondary_action for a second button\
\ on alert, progress, and segmented_progress Live Activities only."
\ on alert, progress, and segmented_progress Live Activities."
operationId: endLiveActivityStream
parameters:
- description: "Stable identifier for one ongoing thing. Allowed characters:\
Expand Down Expand Up @@ -551,8 +552,7 @@ paths:
\ ActivitySmith will keep the Live Activity in sync. For timer streams, send\
\ duration_seconds to start or reset the timer; omit duration_seconds on later\
\ updates to preserve the existing timer window. Use secondary_action for\
\ a second button on alert, progress, and segmented_progress Live Activities\
\ only."
\ a second button on alert, progress, and segmented_progress Live Activities."
operationId: reconcileLiveActivityStream
parameters:
- description: "Stable identifier for one ongoing thing. Allowed characters:\
Expand Down Expand Up @@ -827,7 +827,7 @@ paths:
\ progress, metrics, stats, alert, and timer activity types. For segmented_progress\
\ activities, number_of_steps can be changed later during update or end calls\
\ if the workflow changes. Use secondary_action for a second button on alert,\
\ progress, and segmented_progress Live Activities only."
\ progress, and segmented_progress Live Activities."
operationId: startLiveActivity
requestBody:
content:
Expand Down Expand Up @@ -1124,7 +1124,7 @@ paths:
\ here as the workflow changes. For timer activities, send duration_seconds\
\ only when you want to reset the timer window; omit it to keep the current\
\ timer running. Use secondary_action for a second button on alert, progress,\
\ and segmented_progress Live Activities only."
\ and segmented_progress Live Activities."
operationId: updateLiveActivity
requestBody:
content:
Expand Down Expand Up @@ -1339,7 +1339,7 @@ paths:
\ progress, metrics, stats, alert, and timer activity types. For segmented_progress\
\ activities, you can send the latest number_of_steps here if the workflow\
\ changed after start. Use secondary_action for a second button on alert,\
\ progress, and segmented_progress Live Activities only."
\ progress, and segmented_progress Live Activities."
operationId: endLiveActivity
requestBody:
content:
Expand Down Expand Up @@ -2568,6 +2568,61 @@ components:
- title
- type
- url
AppIconBadgeCountUpdateRequest:
additionalProperties: false
example:
badge: 171976544
target:
channels:
- channels
- channels
properties:
badge:
description: The count to show on the ActivitySmith app icon. Send 0 to
clear it.
maximum: 2147483647
minimum: 0
type: integer
target:
$ref: '#/components/schemas/ChannelTarget'
required:
- badge
AppIconBadgeCountUpdateResponse:
additionalProperties: false
example:
badge: 171976544
success: true
users_notified: 1
devices_notified: 6
effective_channel_slugs:
- effective_channel_slugs
- effective_channel_slugs
timestamp: 2000-01-23T04:56:07.000+00:00
properties:
success:
type: boolean
badge:
maximum: 2147483647
minimum: 0
type: integer
devices_notified:
type: integer
users_notified:
type: integer
effective_channel_slugs:
items:
type: string
type: array
timestamp:
format: date-time
type: string
required:
- badge
- devices_notified
- effective_channel_slugs
- success
- timestamp
- users_notified
PushNotificationRequest:
additionalProperties: {}
example:
Expand Down Expand Up @@ -2663,62 +2718,6 @@ components:
required:
- success
- timestamp
AppIconBadgeCountUpdateRequest:
additionalProperties: false
description: App Icon Badge Count update. Send badge 0 to clear the count.
example:
badge: 171976544
target:
channels:
- channels
- channels
properties:
badge:
description: The count to show on the ActivitySmith app icon. Send 0 to
clear it.
maximum: 2147483647
minimum: 0
type: integer
target:
$ref: '#/components/schemas/ChannelTarget'
required:
- badge
AppIconBadgeCountUpdateResponse:
additionalProperties: false
example:
badge: 171976544
success: true
users_notified: 1
devices_notified: 6
effective_channel_slugs:
- effective_channel_slugs
- effective_channel_slugs
timestamp: 2000-01-23T04:56:07.000+00:00
properties:
success:
type: boolean
badge:
maximum: 2147483647
minimum: 0
type: integer
devices_notified:
type: integer
users_notified:
type: integer
effective_channel_slugs:
items:
type: string
type: array
timestamp:
format: date-time
type: string
required:
- badge
- devices_notified
- effective_channel_slugs
- success
- timestamp
- users_notified
LiveActivityStartRequest:
additionalProperties: false
description: Start a new Live Activity. The response includes activity_id for
Expand Down
4 changes: 2 additions & 2 deletions generated/api_app_icon_badges.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions generated/api_live_activities.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generated/configuration.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions generated/docs/AppIconBadgesAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ All URIs are relative to *https://activitysmith.com/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**UpdateAppIconBadgeCount**](AppIconBadgesAPI.md#UpdateAppIconBadgeCount) | **Post** /badge | Update App Icon Badge Count
[**UpdateAppIconBadgeCount**](AppIconBadgesAPI.md#UpdateAppIconBadgeCount) | **Post** /badge | Set App Icon Badge Count



## UpdateAppIconBadgeCount

> AppIconBadgeCountUpdateResponse UpdateAppIconBadgeCount(ctx).AppIconBadgeCountUpdateRequest(appIconBadgeCountUpdateRequest).Execute()

Update App Icon Badge Count
Set App Icon Badge Count



Expand Down
2 changes: 1 addition & 1 deletion generated/docs/LiveActivityEndRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
**ActivityId** | **string** | |
**ContentState** | [**ContentStateEnd**](ContentStateEnd.md) | |
**Action** | Pointer to [**LiveActivityAction**](LiveActivityAction.md) | | [optional]
**SecondaryAction** | Pointer to [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional]
**SecondaryAction** | Pointer to [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional]

## Methods

Expand Down
Loading