Knock.Objects (Knock v0.4.3) View Source
Knock resources for accessing Objects
Link to this section Summary
Functions
Builds an object reference, which can be used in workflow trigger calls.
Bulk deletes one or more objects in a collection.
Bulk upserts one or more objects in a collection.
Deletes the given object.
Gets the given object.
Returns channel data for the given channel id.
Returns paginated messages for the given object
Upserts the given object in the collection with the attrs provided.
Upserts channel data for the given channel id.
Link to this section Types
Specs
ref() :: %{id: :string, collection: :string}
An object reference is how we refer to a particular object in a collection
Link to this section Functions
Specs
Builds an object reference, which can be used in workflow trigger calls.
Specs
bulk_delete(Knock.Client.t(), String.t(), [String.t()]) :: Knock.Api.response()
Bulk deletes one or more objects in a collection.
Specs
bulk_set(Knock.Client.t(), String.t(), [map()]) :: Knock.Api.response()
Bulk upserts one or more objects in a collection.
Specs
delete(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Deletes the given object.
Specs
get(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Gets the given object.
Specs
get_channel_data(Knock.Client.t(), String.t(), String.t(), String.t()) :: Knock.Api.response()
Returns channel data for the given channel id.
Specs
get_messages(Knock.Client.t(), String.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns paginated messages for the given object
Available optional parameters:
#
- page_size: specify size of the page to be returned by the api. (max limit: 50)
- after: after cursor for pagination
- before: before cursor for pagination
- status: list of statuses to filter messages with
- tenant: tenant_id to filter messages with
- channel_id: channel_id to filter messages with
- source: workflow key to filter messages with
Specs
set(Knock.Client.t(), String.t(), String.t(), map()) :: Knock.Api.response()
Upserts the given object in the collection with the attrs provided.
set_channel_data(client, collection, id, channel_id, channel_data)
View SourceSpecs
set_channel_data(Knock.Client.t(), String.t(), String.t(), String.t(), map()) :: Knock.Api.response()
Upserts channel data for the given channel id.