Knock.Objects (Knock v0.4.4) 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 all of the users preference sets
Returns channel data for the given channel id.
Returns paginated messages for the given object
Returns the preference set for the user.
Upserts the given object in the collection with the attrs provided.
Sets the category preferences for the user.
Sets the category preference for the user.
Upserts channel data for the given channel id.
Sets the channel type preference for the user.
Sets the channel type preferences for the user.
Sets an entire preference set for the user. Will overwrite any existing data.
Sets the workflow preference for the user.
Sets the workflow preferences for the user.
Unsets the 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_all_preferences(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Returns all of the users preference sets
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
get_preferences(Knock.Client.t(), String.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns the preference set for the user.
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_categories_preferences(client, collection, id, categories, options \\ [])
View SourceSpecs
set_categories_preferences( Knock.Client.t(), String.t(), String.t(), map(), Keyword.t() ) :: Knock.Api.response()
Sets the category preferences for the user.
set_category_preferences(client, collection, id, category_key, setting, options \\ [])
View SourceSpecs
set_category_preferences( Knock.Client.t(), String.t(), String.t(), String.t(), map() | boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the category preference for the user.
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.
set_channel_type_preferences(client, collection, id, channel_type, setting, options \\ [])
View SourceSpecs
set_channel_type_preferences( Knock.Client.t(), String.t(), String.t(), String.t(), boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the channel type preference for the user.
set_channel_types_preferences(client, collection, id, channel_types, options \\ [])
View SourceSpecs
set_channel_types_preferences( Knock.Client.t(), String.t(), String.t(), map(), Keyword.t() ) :: Knock.Api.response()
Sets the channel type preferences for the user.
set_preferences(client, collection, id, preferences, options \\ [])
View SourceSpecs
set_preferences(Knock.Client.t(), String.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets an entire preference set for the user. Will overwrite any existing data.
set_workflow_preferences(client, collection, id, workflow_key, setting, options \\ [])
View SourceSpecs
set_workflow_preferences( Knock.Client.t(), String.t(), String.t(), String.t(), map() | boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the workflow preference for the user.
set_workflows_preferences(client, collection, id, workflows, options \\ [])
View SourceSpecs
set_workflows_preferences( Knock.Client.t(), String.t(), String.t(), map(), Keyword.t() ) :: Knock.Api.response()
Sets the workflow preferences for the user.
Specs
unset_channel_data(Knock.Client.t(), String.t(), String.t(), String.t()) :: Knock.Api.response()
Unsets the channel data for the given channel id.