@rabbitholegg/questdk-plugin-utils
Advanced tools
Comparing version 1.0.0-alpha.28 to 1.0.0-alpha.29
# @rabbitholegg/questdk-plugin-utils | ||
## 1.0.0-alpha.29 | ||
### Patch Changes | ||
- [#408](https://github.com/rabbitholegg/questdk-plugins/pull/408) [`ddbfdc18`](https://github.com/rabbitholegg/questdk-plugins/commit/ddbfdc181c9de12a7d135b161ad34d6df1ad6366) Thanks [@jonathandiep](https://github.com/jonathandiep)! - Adds the Complete Action Type | ||
## 1.0.0-alpha.28 | ||
@@ -4,0 +10,0 @@ |
export { CHAIN_TO_TOKENS, Chains, DEFAULT_ACCOUNT, BOOST_TREASURY_ADDRESS, } from './constants/index'; | ||
export type { TestParams, TestCase } from './helpers/index'; | ||
export * from './helpers'; | ||
export type { IntentParams, MintIntentParams, SwapActionParams, OptionsActionParams, StakeActionParams, BridgeActionParams, VoteActionParams, MintActionParams, BurnActionParams, QuestActionParams, DelegateActionParams, ActionParams, FollowActionParams, RecastActionParams, CreateActionParams, IActionPlugin, FilterObject, BitmaskFilter, NthFilter, Filter, FilterArray, AbiFilter, AbstractAbiFilter, AbiParamFilter, ArrayOperator, LogicalOperator, NumericOperator, StringOperator, FilterOperator, TransactionFilter, DisctriminatedActionParams, Quest, QuestReward, QuestAndReward, RewardType, NetworkWithChainId, Reward, Task, QuestDetails, RewardWithClaim, QuestInputActionParamsAmountOperator, BridgeActionDetail, SwapActionDetail, DelegateActionDetail, DelegateActionForm, StakeActionDetail, MintActionDetail, MintActionForm, VoteActionDetail, VoteActionForm, OptionsActionDetail, OptionsActionForm, ActionParamsForm, CreateQuestInput, QuestActionParamsByType, FollowValidationParams, FollowActionDetail, FollowActionForm, RecastValidationParams, RecastActionDetail, RecastActionForm, ValidationParams, ActionValidation, PluginActionPayload, PluginActionValidation, QuestCompletionPayload, } from './types'; | ||
export type { IntentParams, MintIntentParams, SwapActionParams, OptionsActionParams, StakeActionParams, BridgeActionParams, VoteActionParams, MintActionParams, BurnActionParams, QuestActionParams, DelegateActionParams, ActionParams, FollowActionParams, RecastActionParams, CreateActionParams, CompleteActionParams, IActionPlugin, FilterObject, BitmaskFilter, NthFilter, Filter, FilterArray, AbiFilter, AbstractAbiFilter, AbiParamFilter, ArrayOperator, LogicalOperator, NumericOperator, StringOperator, FilterOperator, TransactionFilter, DisctriminatedActionParams, Quest, QuestReward, QuestAndReward, RewardType, NetworkWithChainId, Reward, Task, QuestDetails, RewardWithClaim, QuestInputActionParamsAmountOperator, BridgeActionDetail, SwapActionDetail, DelegateActionDetail, DelegateActionForm, StakeActionDetail, MintActionDetail, MintActionForm, VoteActionDetail, VoteActionForm, OptionsActionDetail, OptionsActionForm, ActionParamsForm, CreateQuestInput, QuestActionParamsByType, FollowValidationParams, FollowActionDetail, FollowActionForm, RecastValidationParams, RecastActionDetail, RecastActionForm, ValidationParams, ActionValidation, PluginActionPayload, PluginActionValidation, QuestCompletionPayload, } from './types'; | ||
export { ActionType, OrderType, GetQuestsResponseSchema, NetworkWithChainIdSchema, QuestDetailsSchema, RewardWithClaimSchema, QuestInputActionParamsAmountOperatorEnum, QuestInputActionParamsAmountOperatorWithoutAny, BridgeActionDetailSchema, SwapActionDetailSchema, DelegateActionFormSchema, DelegateActionDetailSchema, StakeActionDetailSchema, BridgeActionFormSchema, SwapActionFormSchema, BaseStakeActionFormaSchema, StakeActionFormSchema, MintActionFormSchema, MintActionDetailSchema, VoteActionFormSchema, VoteActionDetailSchema, OptionsActionFormSchema, OptionsActionDetailSchema, ActionParamsFormSchema, CreateQuestInputSchema, EthAddressSchema, QuestActionParamsSchema, NetworkNameSchema, FollowActionFormSchema, FollowActionDetailSchema, FollowValidationParamsSchema, RecastActionFormSchema, RecastActionDetailSchema, RecastValidationParamsSchema, ActionParamsSchema, ValidationParamsSchema, ActionValidationSchema, PluginActionValidationSchema, } from './types'; | ||
export { PluginActionNotImplementedError } from './errors'; | ||
//# sourceMappingURL=index.d.ts.map |
export type { IntentParams, MintIntentParams } from './intents'; | ||
export type { SwapActionParams, OptionsActionParams, StakeActionParams, BridgeActionParams, MintActionParams, VoteActionParams, BurnActionParams, QuestActionParams, DelegateActionParams, CreateActionParams, ActionParams, IActionPlugin, DisctriminatedActionParams, QuestInputActionParamsAmountOperator, BridgeActionDetail, SwapActionDetail, DelegateActionDetail, DelegateActionForm, StakeActionDetail, MintActionDetail, MintActionForm, VoteActionDetail, VoteActionForm, OptionsActionDetail, OptionsActionForm, ActionParamsForm, FollowActionParams, FollowValidationParams, FollowActionDetail, FollowActionForm, RecastActionParams, RecastValidationParams, RecastActionDetail, RecastActionForm, ValidationParams, ActionValidation, PluginActionPayload, PluginActionValidation, } from './actions'; | ||
export { QuestActionParamsSchema, QuestInputActionParamsAmountOperatorEnum, QuestInputActionParamsAmountOperatorWithoutAny, BridgeActionDetailSchema, SwapActionDetailSchema, DelegateActionFormSchema, DelegateActionDetailSchema, StakeActionDetailSchema, BridgeActionFormSchema, CreateActionFormSchema, CreateActionDetailSchema, SwapActionFormSchema, BaseStakeActionFormaSchema, StakeActionFormSchema, MintActionFormSchema, MintActionDetailSchema, VoteActionFormSchema, VoteActionDetailSchema, OptionsActionFormSchema, OptionsActionDetailSchema, ActionParamsFormSchema, FollowActionFormSchema, FollowActionDetailSchema, FollowValidationParamsSchema, RecastActionFormSchema, RecastActionDetailSchema, RecastValidationParamsSchema, ActionParamsSchema, ValidationParamsSchema, ActionValidationSchema, PluginActionValidationSchema, } from './actions'; | ||
export type { SwapActionParams, OptionsActionParams, StakeActionParams, BridgeActionParams, MintActionParams, VoteActionParams, BurnActionParams, QuestActionParams, DelegateActionParams, CreateActionParams, CompleteActionParams, ActionParams, IActionPlugin, DisctriminatedActionParams, QuestInputActionParamsAmountOperator, BridgeActionDetail, SwapActionDetail, DelegateActionDetail, DelegateActionForm, StakeActionDetail, MintActionDetail, MintActionForm, VoteActionDetail, VoteActionForm, OptionsActionDetail, OptionsActionForm, ActionParamsForm, FollowActionParams, FollowValidationParams, FollowActionDetail, FollowActionForm, RecastActionParams, RecastValidationParams, RecastActionDetail, RecastActionForm, ValidationParams, ActionValidation, PluginActionPayload, PluginActionValidation, } from './actions'; | ||
export { QuestActionParamsSchema, QuestInputActionParamsAmountOperatorEnum, QuestInputActionParamsAmountOperatorWithoutAny, BridgeActionDetailSchema, SwapActionDetailSchema, DelegateActionFormSchema, DelegateActionDetailSchema, StakeActionDetailSchema, BridgeActionFormSchema, CreateActionFormSchema, CreateActionDetailSchema, CompleteActionFormSchema, CompleteActionDetailSchema, SwapActionFormSchema, BaseStakeActionFormaSchema, StakeActionFormSchema, MintActionFormSchema, MintActionDetailSchema, VoteActionFormSchema, VoteActionDetailSchema, OptionsActionFormSchema, OptionsActionDetailSchema, ActionParamsFormSchema, FollowActionFormSchema, FollowActionDetailSchema, FollowValidationParamsSchema, RecastActionFormSchema, RecastActionDetailSchema, RecastValidationParamsSchema, ActionParamsSchema, ValidationParamsSchema, ActionValidationSchema, PluginActionValidationSchema, } from './actions'; | ||
export { EthAddressSchema, NetworkNameSchema, } from './common'; | ||
@@ -5,0 +5,0 @@ export { ActionType, OrderType } from './actions'; |
{ | ||
"name": "@rabbitholegg/questdk-plugin-utils", | ||
"version": "1.0.0-alpha.28", | ||
"version": "1.0.0-alpha.29", | ||
"exports": { | ||
@@ -5,0 +5,0 @@ "require": "./dist/cjs/index.js", |
@@ -27,2 +27,3 @@ export { | ||
CreateActionParams, | ||
CompleteActionParams, | ||
IActionPlugin, | ||
@@ -29,0 +30,0 @@ FilterObject, |
@@ -102,2 +102,3 @@ import { | ||
| CreateActionParams | ||
| CompleteActionParams | ||
@@ -114,2 +115,3 @@ export type DisctriminatedActionParams = | ||
| { type: ActionType.Create; data: CreateActionParams } | ||
| { type: ActionType.Complete; data: CompleteActionParams } | ||
@@ -298,2 +300,29 @@ export const QuestInputActionParamsAmountOperatorEnum = z.enum([ | ||
/* | ||
COMPLETE | ||
*/ | ||
export type CompleteActionParams = { | ||
chainId?: string | ||
boostId?: string | ||
actionType?: string | ||
} | ||
export const CompleteActionDetailSchema = z | ||
.object({ | ||
chainId: z.string().optional(), | ||
boostId: z.string().optional(), | ||
actionType: z.string().optional(), | ||
}) | ||
.refine( | ||
(data) => | ||
data.chainId != null || data.boostId != null || data.actionType != null, | ||
{ | ||
message: | ||
'At least one of chainId, boostId, or actionType must be provided', | ||
}, | ||
) | ||
export const CompleteActionFormSchema = CompleteActionDetailSchema | ||
export type CompleteActionDetail = z.infer<typeof CompleteActionDetailSchema> | ||
export type CompleteActionForm = z.infer<typeof CompleteActionFormSchema> | ||
/* | ||
VOTE | ||
@@ -349,2 +378,3 @@ */ | ||
z.object({ type: z.literal('create'), data: CreateActionFormSchema }), | ||
z.object({ type: z.literal('complete'), data: CompleteActionFormSchema }), | ||
]) | ||
@@ -365,2 +395,3 @@ | ||
z.object({ type: z.literal('create'), data: CreateActionDetailSchema }), | ||
z.object({ type: z.literal('complete'), data: CompleteActionDetailSchema }), | ||
]) | ||
@@ -414,2 +445,5 @@ | ||
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError> | ||
complete?: ( | ||
params: CompleteActionParams, | ||
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError> | ||
getMintIntent?: ( | ||
@@ -507,2 +541,3 @@ mint: MintIntentParams, | ||
Create = 'create', | ||
Complete = 'complete', | ||
} | ||
@@ -509,0 +544,0 @@ |
@@ -13,2 +13,3 @@ export type { IntentParams, MintIntentParams } from './intents' | ||
CreateActionParams, | ||
CompleteActionParams, | ||
ActionParams, | ||
@@ -56,2 +57,4 @@ IActionPlugin, | ||
CreateActionDetailSchema, | ||
CompleteActionFormSchema, | ||
CompleteActionDetailSchema, | ||
SwapActionFormSchema, | ||
@@ -58,0 +61,0 @@ BaseStakeActionFormaSchema, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1220176
18009