Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include Slack route API options #30

Merged
merged 2 commits into from
Sep 11, 2023
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
71 changes: 70 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,7 @@ components:
description: Type of route.
enum: ["http", "proxy", "google-function", "mqtt", "aws-lambda", "aws-lambda-with-access-key", "aws-sqs", "aws-sqs-with-access-key", "aws-sqs-fifo",
"aws-sqs-fifo-with-access-key", "aws-iot-analytics", "radnote-radresp-fixed-survey", "radnote-radresp-mobile-survey", "azure-function",
"azure-function-with-key", "azure-service-bus-with-sas-token", "thingworx", "snowflake"]
"azure-function-with-key", "azure-service-bus-with-sas-token", "thingworx", "snowflake", "slack-bearer", "slack-webhook"]
modified:
type: string
description: Last Modified
Expand All @@ -3070,6 +3070,7 @@ components:
- $ref: '#/components/schemas/azure'
- $ref: '#/components/schemas/thingworx'
- $ref: '#/components/schemas/snowflake'
- $ref: '#/components/schemas/slack'

UserDbRoute:
type: object
Expand Down Expand Up @@ -3589,6 +3590,74 @@ components:
description: Message to send, leave blank to use notefile.
throttle_ms:
type: integer

slack:
description: Route settings specific to Slack routes. Only used for Slack route types
type: object
properties:
fleets:
type: array
items:
type: string
minItems: 0
description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
filter:
type: object
properties:
type:
type: string
description: What notefiles this route applies to.
enum: ["all", "include", "exclude"]
system_notefiles:
type: boolean
description: Whether system notefiles should be affected by this route
files:
type: array
items:
type: string
description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here
minItems: 0
description: Route filtering settings
transform:
type: object
properties:
format:
type: string
description: Data transformation to apply. Only "jsonata" is valid for Snowflake routes
default: "jsonata"
jsonata:
type: string
description: JSONata transformation
throttle_ms:
type: integer
description: Minimum time between requests in Miliseconds
timeout:
type: integer
default: 15
description: Timeout in seconds for each request

slack_type:
type: string
description: The type of Slack message. Must be one of "slack-bearer" for Bearer Token or "slack-webhook" for Webhook messages
bearer:
type: string
description: The Bearer Token for Slack messaging, if the "slack-bearer" type is selected
example: xoxb-1234-56789abcdefghijklmnop
channel:
type : string
description: The Channel ID for Bearer Token method, if the "slack-bearer" type is selected
example: C8675309
webhook_url:
type: string
description: The Webhook URL for Slack Messaging if the "slack-webhook" type is selected
example: https://hooks.slack.com/services/FOO4BAR/THIS4THAT/123xYzaBC456
text:
type: string
description: The simple text message to be sent, if the blocks message field is not in use. Placeholders are available for this field.
example: "[.device] reported temp(s) of [.body.temp] at [.body.location]"
blocks:
type: string
description: The Blocks message to be sent. If populated, this field overrides the text field within the Slack Messaging API. Placeholders are available for this field.

EnvironmentVariables:
type: object
Expand Down
3 changes: 3 additions & 0 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ docs/Route.md
docs/RouteApi.md
docs/RouteLogsApi.md
docs/RouteSchema.md
docs/Slack.md
docs/Snowflake.md
docs/SnowflakeTransform.md
docs/Thingworx.md
Expand Down Expand Up @@ -164,10 +165,12 @@ src/model/Radresponder.js
src/model/Role.js
src/model/Route.js
src/model/RouteSchema.js
src/model/Slack.js
src/model/Snowflake.js
src/model/SnowflakeTransform.js
src/model/Thingworx.js
src/model/TowerLocation.js
src/model/Twilio.js
src/model/UpdateFleetRequest.js
src/model/UserDbRoute.js
test/model/Slack.spec.js
1 change: 1 addition & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ All URIs are relative to *https://api.notefile.net*
- [NotehubJs.Role](docs/Role.md)
- [NotehubJs.Route](docs/Route.md)
- [NotehubJs.RouteSchema](docs/RouteSchema.md)
- [NotehubJs.Slack](docs/Slack.md)
- [NotehubJs.Snowflake](docs/Snowflake.md)
- [NotehubJs.SnowflakeTransform](docs/SnowflakeTransform.md)
- [NotehubJs.Thingworx](docs/Thingworx.md)
Expand Down
4 changes: 4 additions & 0 deletions src/docs/Route.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@
- `thingworx` (value: `"thingworx"`)

- `snowflake` (value: `"snowflake"`)

- `slack-bearer` (value: `"slack-bearer"`)

- `slack-webhook` (value: `"slack-webhook"`)
Loading