Variable rewardEventConfigApiConst
rewardEventConfigApi: {
"/v1/reward/event-config": {
get: {
description: "The CFX Rewards Engine supports the automation of reward issuance based off certain CFX Network events. This endpoint allows you to search for existing reward event configurations.\n\nThe search can be filtered to return either `ACTIVE` or `DISABLED` configurations. Each configuration returned will have a `status` (ACTIVE or DISABLED), an `event` name, and an array of reward `rules`. Rules are configured by specifying:\n\n* The `status` of the rule (ACTIVE or DISABLED)\n* The `event` the rule is triggered by\n* An array of reward `rules` to apply when the event occurs, which each specify a reward `amount`, `currency` and a `matcher` to filter the event more specifically.\n\nPlease see the Create Reward Event Configuration endpoint for more information.";
querystring: TObject<
{ status: TOptional<TUnsafe<"ACTIVE" | "DISABLED">> },
>;
response: {
"200": TObject<
{
items: TArray<
TObject<
{
createdAt: TString;
event: TString;
rules: TArray<TObject<(...)>>;
status: TUnsafe<(...) | (...)>;
updatedAt: TString;
},
>,
>;
},
>;
};
summary: "Search Reward Event Configurations";
tags: readonly ["Events"];
};
post: {
body: TObject<
{
event: TString;
rules: TArray<
TObject<
{
matcher: TOptional<TObject<{}>>;
reward: TObject<{ amount: TNumber; currency: TUnsafe<(...)> }>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
},
>,
>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
},
>;
description: "The CFX Rewards Engine supports the automation of reward issuance based off certain CFX Network events. These can be configured to ensure Identities are issued rewards as they perform specific network activities. For example:\n\n* Issue a $50 signup reward bonus\n* Issue a $5 reward for completing KYC\n* Issue a $1 reward for completing a deposit\n\n### Events\n\nThe following events are currently supported:\n\n* `deposit.cryptoRequest.statusUpdated`: The status of a crypto deposit quote has changed\n* `deposit.deposit.statusUpdated`: The status of a deposit has changed\n* `identity.identity.statusUpdated`: The status of an identity has changed\n* `identity.verification.statusUpdated`: The status of an identity verification process has changed\n* `organization.organization.statusUpdated`: The status of an organization has changed\n* `reward.reward.claimed`: THe status of a reward claim has changed\n* `reward.reward.created`: A reward has been created\n* `swap.swap.statusUpdated`: The status of a swap between currencies has changed\n* `withdrawal.withdrawal.statusUpdated`: The status of a withdrawal has changed\n* `send.send.statusUpdated`: The status of a fund transfer has changed\n* `user.register.statusUpdated`: The status of a CFX wallet has changed\n\nPlease see our WebHook Guide for details on the data structures for each event.\n\n### Event Rules\n\nOne or more rules can be configured for each event. When the event fires, the first matching rule, in order, will be triggered.\n\nRules are configured by specifying:\n\n* The `status` of the rule (ACTIVE or DISABLED)\n* The `event` the rule is triggered by\n* An array of reward `rules` to apply when the event occurs, which each specify a reward `amount`, `currency` and a `matcher` to filter the event more specifically.\n\nThe `matcher` configuration lets you refine the filtering for each event. Matcher qeuries are defined similar to [MongoDB query language](https://www.mongodb.com/docs/manual/tutorial/query-documents/). For example:\n\n* `\"matcher\":{\"countryOfResidence\":\"US\"}`\n* `\"matcher\":{\"amount\":{\"$gte\":10}}`\n\nPlease reach out to support for more information on how to use this feature.";
response: {
"200": TObject<
{
createdAt: TString;
event: TString;
rules: TArray<
TObject<
{
matcher: TOptional<TObject<(...)>>;
reward: TObject<{ amount: ...; currency: ... }>;
status: TUnsafe<(...) | (...)>;
},
>,
>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
updatedAt: TString;
},
>;
};
summary: "Create Reward Event Configuration";
tags: readonly ["Events"];
};
};
"/v1/reward/event-config/{event}": {
get: {
description: "The CFX Rewards Engine supports the automation of reward issuance based off certain CFX Network events. This endpoint allows you to retrieve the reward configurations for a specific event.\n\nConfiguration is retrieved by providing the `event` name within the URL path.\n\nPlease see the Create Reward Event Configuration endpoint for more information regarding the returned data types.";
params: TObject<{ event: TString }>;
response: {
"200": TObject<
{
createdAt: TString;
event: TString;
rules: TArray<
TObject<
{
matcher: TOptional<TObject<(...)>>;
reward: TObject<{ amount: ...; currency: ... }>;
status: TUnsafe<(...) | (...)>;
},
>,
>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
updatedAt: TString;
},
>;
"404": TObject<{ code: TLiteral<"NOT_FOUND">; message: TString }>;
};
summary: "Get Reward Event Configuration";
tags: readonly ["Events"];
};
};
} = ...
Type Declaration
Readonly/v1/reward/event-config: {
get: {
description: "The CFX Rewards Engine supports the automation of reward issuance based off certain CFX Network events. This endpoint allows you to search for existing reward event configurations.\n\nThe search can be filtered to return either `ACTIVE` or `DISABLED` configurations. Each configuration returned will have a `status` (ACTIVE or DISABLED), an `event` name, and an array of reward `rules`. Rules are configured by specifying:\n\n* The `status` of the rule (ACTIVE or DISABLED)\n* The `event` the rule is triggered by\n* An array of reward `rules` to apply when the event occurs, which each specify a reward `amount`, `currency` and a `matcher` to filter the event more specifically.\n\nPlease see the Create Reward Event Configuration endpoint for more information.";
querystring: TObject<
{ status: TOptional<TUnsafe<"ACTIVE" | "DISABLED">> },
>;
response: {
"200": TObject<
{
items: TArray<
TObject<
{
createdAt: TString;
event: TString;
rules: TArray<TObject<(...)>>;
status: TUnsafe<(...) | (...)>;
updatedAt: TString;
},
>,
>;
},
>;
};
summary: "Search Reward Event Configurations";
tags: readonly ["Events"];
};
post: {
body: TObject<
{
event: TString;
rules: TArray<
TObject<
{
matcher: TOptional<TObject<{}>>;
reward: TObject<{ amount: TNumber; currency: TUnsafe<(...)> }>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
},
>,
>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
},
>;
description: "The CFX Rewards Engine supports the automation of reward issuance based off certain CFX Network events. These can be configured to ensure Identities are issued rewards as they perform specific network activities. For example:\n\n* Issue a $50 signup reward bonus\n* Issue a $5 reward for completing KYC\n* Issue a $1 reward for completing a deposit\n\n### Events\n\nThe following events are currently supported:\n\n* `deposit.cryptoRequest.statusUpdated`: The status of a crypto deposit quote has changed\n* `deposit.deposit.statusUpdated`: The status of a deposit has changed\n* `identity.identity.statusUpdated`: The status of an identity has changed\n* `identity.verification.statusUpdated`: The status of an identity verification process has changed\n* `organization.organization.statusUpdated`: The status of an organization has changed\n* `reward.reward.claimed`: THe status of a reward claim has changed\n* `reward.reward.created`: A reward has been created\n* `swap.swap.statusUpdated`: The status of a swap between currencies has changed\n* `withdrawal.withdrawal.statusUpdated`: The status of a withdrawal has changed\n* `send.send.statusUpdated`: The status of a fund transfer has changed\n* `user.register.statusUpdated`: The status of a CFX wallet has changed\n\nPlease see our WebHook Guide for details on the data structures for each event.\n\n### Event Rules\n\nOne or more rules can be configured for each event. When the event fires, the first matching rule, in order, will be triggered.\n\nRules are configured by specifying:\n\n* The `status` of the rule (ACTIVE or DISABLED)\n* The `event` the rule is triggered by\n* An array of reward `rules` to apply when the event occurs, which each specify a reward `amount`, `currency` and a `matcher` to filter the event more specifically.\n\nThe `matcher` configuration lets you refine the filtering for each event. Matcher qeuries are defined similar to [MongoDB query language](https://www.mongodb.com/docs/manual/tutorial/query-documents/). For example:\n\n* `\"matcher\":{\"countryOfResidence\":\"US\"}`\n* `\"matcher\":{\"amount\":{\"$gte\":10}}`\n\nPlease reach out to support for more information on how to use this feature.";
response: {
"200": TObject<
{
createdAt: TString;
event: TString;
rules: TArray<
TObject<
{
matcher: TOptional<TObject<(...)>>;
reward: TObject<{ amount: ...; currency: ... }>;
status: TUnsafe<(...) | (...)>;
},
>,
>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
updatedAt: TString;
},
>;
};
summary: "Create Reward Event Configuration";
tags: readonly ["Events"];
};
}
Readonly/v1/reward/event-config/{event}: {
get: {
description: "The CFX Rewards Engine supports the automation of reward issuance based off certain CFX Network events. This endpoint allows you to retrieve the reward configurations for a specific event.\n\nConfiguration is retrieved by providing the `event` name within the URL path.\n\nPlease see the Create Reward Event Configuration endpoint for more information regarding the returned data types.";
params: TObject<{ event: TString }>;
response: {
"200": TObject<
{
createdAt: TString;
event: TString;
rules: TArray<
TObject<
{
matcher: TOptional<TObject<(...)>>;
reward: TObject<{ amount: ...; currency: ... }>;
status: TUnsafe<(...) | (...)>;
},
>,
>;
status: TUnsafe<"ACTIVE" | "DISABLED">;
updatedAt: TString;
},
>;
"404": TObject<{ code: TLiteral<"NOT_FOUND">; message: TString }>;
};
summary: "Get Reward Event Configuration";
tags: readonly ["Events"];
};
}