Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add useraction type and nextUpdateAt field #45

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,18 @@ export type ItemProductState = {
isUpdated: boolean
/** Date when product was last collected for this Item, null if it has never been. */
lastUpdatedAt: Date | null
/** Warnings about this product's data. */
warnings: ItemProductWarning[]
}

/** Warnings about the product data. For example, a warning about missing permissions for viewing a product */
type ItemProductWarning = {
/** The warning code generated by Pluggy */
code: string
/** The warning message in english generated by Pluggy */
message: string
/** The warning message from the FI if provided */
providerMessage?: string
}

/**
Expand Down Expand Up @@ -512,6 +524,8 @@ export type ItemProductsStatusDetail = {
}

export type UserAction = {
/** What type of action is required from the user, scanning a QR or authorizing access from an app. */
type: 'qr' | 'authorize-access'
/** Human readble instructions that explains the user action to be done, */
instructions: string
/** Unstructured properties that provide additional context of the user action. */
Expand Down Expand Up @@ -549,6 +563,8 @@ export type Item = {
userAction: UserAction | null
/** The number of consecutive failed login attempts for this item. */
consecutiveFailedLoginAttempts: number
/** Date of next auto-sync, or null if auto-sync is disabled for this Item */
nextUpdateAt: Date | null
}

export enum HttpStatusCode {
Expand Down
Loading