New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@doflo/flow-interfaces

Package Overview
Dependencies
Maintainers
2
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doflo/flow-interfaces - npm Package Compare versions

Comparing version 1.16.8 to 1.16.9

72

dist/types/api/element/credentialAPI.d.ts

@@ -0,1 +1,2 @@

import { ICredentialPointer } from '../..';
import { ICredential } from '../../..';

@@ -10,2 +11,3 @@ /**

export interface credentialAPI {
create(credentialPointer: ICredentialPointer): Promise<string | undefined>;
/**

@@ -20,2 +22,10 @@ * ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=api.element.credential#create&v=1.0.0)

create(FERN: string, teamId: string, data: JSON): Promise<string | undefined>;
/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=api.element.credential#create&v=1.0.0)
*
* ### Create (Credential)
*
* Create a credential, creates a credential and returns the id of the new credential
*
*/
create(FERN: string, teamId: string, id: string): Promise<string | undefined>;

@@ -34,2 +44,64 @@ /**

/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=api.element.credential#getDependencyGraph&v=1.0.0)
*
* ### Decode State (Credential)
*
* The state object is stored as a JWT, it is encoded and signed (by us) you can use it's content and you can add to it using appendToState
* you can also check with us and we will tell you if it is still valid so you know if it has been tampered with prior to sending it back to us
* (we'll check it again before creating a credential)
*
* This function is useful for two purposes
* 1. you are able to access the values encoded into the state object
* 2. you are able to pre-validate that the state has not been tampered with during the oAuth dance
*
* @param state encoded JWT string value
* @returns array of elements dependent upon this credential
*/
decodeState(state: string): Promise<{
serial: bigint;
teamId: string;
isValid: boolean;
} & {
[key: string]: string;
}>;
/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=api.element.credential#getDependencyGraph&v=1.0.0)
*
* ### Append to State (Credential)
*
* The state object is stored as a JWT, it is encoded and signed (by us) you can use it's content and you can add to it you can
* also check with us and we will tell you if it is still valid so you know if it has been tampered with prior to sending it back to us
* (we'll check it again before creating a credential)
*
* ### __What do I do if I can't pass state:__
* Not all oAuth flows support a state variable, in this case we recommend you append the state as a querystring parameter of the RETURN_URL
* which should in most cases be supported. If you are stuck please reach out to us ... we are here to help developers@doflo.com or join our
* slack developer community
*
* ### __IMPORTANT:__
* you *should* only use this function before a hard redirect, if you must use it after a hard redirect you are responsible for sending
* us our original state object, which we will validate prior to appending your new properties.
*
* ### __Implementation Details:__
* internally, to avoid collisions and systematic abuse, all keys are prepended with a random state specific value that will automatically
* be removed by the decode state method
*
* ### __Example:__
* ```typescript
*
* // Passive
* let newState = api.elements.credentials.appendToState({ valueA: 'test1', valueB: 'test2' })
*
* // Active
* let newState = api.elements.credentials.appendToState({ valueA: 'test1', valueB: 'test2' }, state)
*
* ```
*
* @param parameters the map of parameters to add to the state
* @param state the map of parameters to add to the state
* @returns encoded JWT of the state which can be passed into oAuth flows
*/
appendToState(parameters: Record<string, string>): Promise<string>;
appendToState(parameters: Record<string, string>, state: string): Promise<string>;
/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=api.element.credential#get&v=1.0.0)

@@ -36,0 +108,0 @@ *

6

dist/types/index.d.ts

@@ -128,7 +128,7 @@ /// <reference types="node" />

/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=ICredentialPointer;credentialType&v=1.0.0)
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=ICredentialPointer;FERN&v=1.0.0)
*
* **credentialType** this is the FERN of the credential Type
* **FERN** this is the (F)low (E)nterprise (R)esource (N)ame of the credential Type
*/
credentialType: string;
FERN: string;
/**

@@ -135,0 +135,0 @@ * ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=ICredentialPointer;state&v=1.0.0)

{
"name": "@doflo/flow-interfaces",
"version": "1.16.8",
"version": "1.16.9",
"description": "Public Interfaces, Schemas, & GRPC Signatures for doFlo developers",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc