Extracted types which are shared across multiple products; maintained exports in order to preserve import paths.
Moved types from dependencies
to devDependencies
, removed lodash helper function which was only being used in one place.
Hotfix on new authStatus()
fxn; the stale check now ensures that the other fields are non-empty.
Updated the trial stripe plan to reflect the new free tier
Added new authStatus(authData)
helper function to determine whether a given piece of auth data is:
- empty, meaning that a full login is required
- stale, meaning a refresh login is required
- active, meaning we are ready to make authenticated requests
Also reverted changeset from 1.7.5, as we're going to follow a different strategy for plugging in new pricing plans.
Add demo feature standard-tiered
plan
Bugfix; the new Chain.allDetails()
failed to call the Chain.detailsByName()
function, so it returned an empty array.
New types related to our supported blockchains.
- Each supported chain now has its chainId, genesisHash, & Web3URL stored within
Dapp.Chain
. Can be imported directly viaimport { Chain } from '@eximchain/dappbot-types/spec/dapp';
- Added new details about our test network
- Exported our internal Validator functions like
keysAreStrings()
andkeysValid()
, as they're useful in our other projects.
Bugfix; UpdateDapp.isArgs()
has a .some()
check which wasn't returning its result, so the typechecker was always failing.
Add optional metadata
to SignUp
args for analytics and/or logging
Fixes for Configure MFA API
- Simplified
SetMfaPreference.Args
to include only onemfaPreference
argument - Removed
session
fromBeginSetupAppMfa.Result
ConfirmSetupAppMfa
uses refreshToken
instead of session
New types for new MFA APIs
- Added auth namespaces
SetMfaPreference
,SetupSmsMfa
,BeginSetupAppMfa
, andConfirmSetupAppMfa
- Added auth types
SecretCodeResult
andSecretCodeResponse
- Renamed
Challenges.Types.SoftwareTokenMfa
toChallenges.Types.AppMfa
- Added type guards for booleans to util
New types relating to MFA challenges
- Added type guards for
Challenges.Types
andChallenges.MfaTypes
- Added
MfaLoginChallenge
andSelectMfaChallenge
toChallenges
namespace
Upgraded the isSuccessResponse()
, isErrorResponse()
, isMessageResult()
typeguards from Response
and UpdateDapp.isArgs()
to first check that the value is an object before trying to check any properties, guaranteeing no ReferenceErrors
at runtime.
Added Stripe's interface for credits cards at spec/methods/payment#StripeTypes.Card
.
Added validatePassword()
to spec/user
.
Added MfaTypes
challenge type corresponding to SmsMfa | SoftwareTokenMfa
.
Fixed enum values for MFA related challenges.
- Removed incorrect challenge
Mfa
- Added challenges
SmsMfa
,SoftwareTokenMfa
,SelectMfaType
, andMfaSetup
.
These versions were part of the debug loop as we built this package into our Lambda functions. The key changes were:
- Within
spec/methods
, we now define theRootResources
&apiBasePath
values before importing the child modules (e.g.Auth
,Private
, etc). Previously we ran into runtime issues because they were defined after the import, so the values didn't exist when the child modules tried to consume them. - Upgraded the
util.isObject()
function to returnfalse
fornull
. Turns out thattypeof null === 'object'
, sotypeof val === 'object'
isn't a sufficient test.
Larger overhaul as overall system integration continues.
- Added subtypes for
Item.Full
.Item.FullHub
&Item.FullEnterprise
now use theTier
value to explicitly determine whether the GitHub keys need to be set. - Renamed typeguard function arguments to be
val
, a noun, instead ofmaybe
, an adverb. - Renamed the factory functions to
new[Type]
instead ofempty[Type]
orEmpty[Type]
. - Added factory functions for all method arguments, so that callers can get the correct shape as a value (e.g. for error messages). This also makes the typeguards more resilient, as they no longer need to have lists of strings.
- Removed
Tiers.PoC
as no part of the system depends on that value anymore. - Created a generalized
typeValidationErrMsg
function which, given an incorrect shape and correct shape, returns an array of messages telling the user which keys they failed to provide (or had the wrong JS type for). - Brought the dapp management operations into the
Dapp
type as an enum. - Made API method's
HTTP
value hold a more specific type, so Typescript guarantees that it's called not just with anHttpMethod
, but with the correct one.
Added matching emptyUserAttributes()
and isUserAttributes()
helpers to the user types, making it easy to validate them directly.
Moved StripePlans
into methods/payment
so that all types related to Stripe would be located there. Added SubscriptionState
and ValidSubscriptionStates
to Payment.StripeTypes
, as those values are exposed to the client via GET /payment/stripe
.
Added new type guards:
- API methods with args now have a
isArgs()
fxn in their namespace APIResponse
now hasisSuccessResponse()
,isErrResponse()
, &isMessageResult()
guards