-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aefbca7
commit 9a3a319
Showing
47 changed files
with
645 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export interface AccessorType { | ||
$ref: string; | ||
} |
5 changes: 5 additions & 0 deletions
5
src/api/resources/automations/types/AutomationAddToBatchMaxItemsType.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export type AutomationAddToBatchMaxItemsType = string | number; |
36 changes: 36 additions & 0 deletions
36
src/api/resources/automations/types/AutomationAddToBatchRetain.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as Courier from "../../.."; | ||
|
||
/** | ||
* Defines what items should be retained and passed along to the next steps when the batch is released | ||
* | ||
* @example | ||
* { | ||
* type: Courier.AutomationAddToBatchRetainType.Highest, | ||
* count: 10, | ||
* sort_key: "refs.data.my_custom_scoring" | ||
* } | ||
* | ||
* @example | ||
* { | ||
* type: Courier.AutomationAddToBatchRetainType.Last, | ||
* count: 10 | ||
* } | ||
*/ | ||
export interface AutomationAddToBatchRetain { | ||
/** | ||
* Keep N number of notifications based on the type. First/Last N based on notification received. | ||
* highest/lowest based on a scoring key providing in the data accessed by sort_key | ||
*/ | ||
type: Courier.AutomationAddToBatchRetainType; | ||
/** | ||
* The number of records to keep in batch. Default is 10 and only configurable by requesting from support. | ||
* When configurable minimum is 2 and maximum is 100. | ||
*/ | ||
count: number; | ||
/** Defines the data value data[sort_key] that is used to sort the stored items. Required when type is set to highest or lowest. */ | ||
sort_key?: string; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/api/resources/automations/types/AutomationAddToBatchRetainType.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export type AutomationAddToBatchRetainType = "first" | "last" | "highest" | "lowest"; | ||
|
||
export const AutomationAddToBatchRetainType = { | ||
First: "first", | ||
Last: "last", | ||
Highest: "highest", | ||
Lowest: "lowest", | ||
} as const; |
11 changes: 11 additions & 0 deletions
11
src/api/resources/automations/types/AutomationAddToBatchScope.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export type AutomationAddToBatchScope = "user" | "global" | "dynamic"; | ||
|
||
export const AutomationAddToBatchScope = { | ||
User: "user", | ||
Global: "global", | ||
Dynamic: "dynamic", | ||
} as const; |
41 changes: 41 additions & 0 deletions
41
src/api/resources/automations/types/AutomationAddToBatchStep.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as Courier from "../../.."; | ||
|
||
/** | ||
* @example | ||
* { | ||
* action: "add-to-batch", | ||
* wait_period: "PT5M", | ||
* max_wait_period: "PT1H", | ||
* retain: { | ||
* type: Courier.AutomationAddToBatchRetainType.Highest, | ||
* count: 10, | ||
* sort_key: "refs.data.my_custom_scoring" | ||
* }, | ||
* scope: Courier.AutomationAddToBatchScope.User, | ||
* category_key: "refs.data.status" | ||
* } | ||
*/ | ||
export interface AutomationAddToBatchStep extends Courier.AutomationStep { | ||
action: "add-to-batch"; | ||
/** Defines the period of inactivity before the batch is released. Specified as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) */ | ||
wait_period: string; | ||
/** Defines the maximum wait time before the batch should be released. Must be less than wait period. Maximum of 60 days. Specified as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) */ | ||
max_wait_period: string; | ||
/** If specified, the batch will release as soon as this number is reached */ | ||
max_items?: Courier.AutomationAddToBatchMaxItemsType; | ||
retain: Courier.AutomationAddToBatchRetain; | ||
/** | ||
* Determine the scope of the batching. If user, chosen in this order: recipient, profile.user_id, data.user_id, data.userId. | ||
* If dynamic, then specify where the batch_key or a reference to the batch_key | ||
*/ | ||
scope?: Courier.AutomationAddToBatchScope; | ||
/** If using scope=dynamic, provide the key or a reference (e.g., refs.data.batch_key) */ | ||
batch_key?: string; | ||
batch_id?: string; | ||
/** Defines the field of the data object the batch is set to when complete. Defaults to `batch` */ | ||
category_key?: string; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/api/resources/automations/types/AutomationAddToDigestStep.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as Courier from "../../.."; | ||
|
||
/** | ||
* @example | ||
* { | ||
* action: "add-to-digest", | ||
* subscription_topic_id: "RAJE97CMT04KDJJ88ZDS2TP1690S" | ||
* } | ||
*/ | ||
export interface AutomationAddToDigestStep extends Courier.AutomationStep { | ||
action: "add-to-digest"; | ||
/** The subscription topic that has digests enabled */ | ||
subscription_topic_id: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/api/resources/automations/types/AutomationFetchDataStep.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as Courier from "../../.."; | ||
|
||
/** | ||
* @example | ||
* { | ||
* action: "fetch-data", | ||
* merge_strategy: Courier.MergeAlgorithm.None, | ||
* webhook: { | ||
* body: { | ||
* "foo": "bar" | ||
* }, | ||
* params: { | ||
* "hello": "world" | ||
* }, | ||
* headers: { | ||
* "content-type": "application/json" | ||
* }, | ||
* method: Courier.AutomationFetchDataWebhookMethod.Post, | ||
* url: "https://bryan-at-courier.free.beeceptor.com" | ||
* } | ||
* } | ||
*/ | ||
export interface AutomationFetchDataStep extends Courier.AutomationStep { | ||
action: "fetch-data"; | ||
webhook: Courier.AutomationFetchDataWebhook; | ||
merge_strategy: Courier.MergeAlgorithm; | ||
idempotency_expiry?: string; | ||
idempotency_key?: string; | ||
} |
13 changes: 13 additions & 0 deletions
13
src/api/resources/automations/types/AutomationFetchDataWebhook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as Courier from "../../.."; | ||
|
||
export interface AutomationFetchDataWebhook { | ||
body?: Record<string, any>; | ||
headers?: Record<string, any>; | ||
params?: Record<string, any>; | ||
method: Courier.AutomationFetchDataWebhookMethod; | ||
url: string; | ||
} |
10 changes: 10 additions & 0 deletions
10
src/api/resources/automations/types/AutomationFetchDataWebhookMethod.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export type AutomationFetchDataWebhookMethod = "GET" | "POST"; | ||
|
||
export const AutomationFetchDataWebhookMethod = { | ||
Get: "GET", | ||
Post: "POST", | ||
} as const; |
14 changes: 0 additions & 14 deletions
14
src/api/resources/automations/types/AutomationStepAction.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/api/resources/automations/types/AutomationThrottleOnThrottle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export interface AutomationThrottleOnThrottle { | ||
/** The node to go to if the request is throttled */ | ||
$node_id: string; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/api/resources/automations/types/AutomationThrottleScope.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
export type AutomationThrottleScope = "user" | "global" | "dynamic"; | ||
|
||
export const AutomationThrottleScope = { | ||
User: "user", | ||
Global: "global", | ||
Dynamic: "dynamic", | ||
} as const; |
Oops, something went wrong.