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
1
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.4.0 to 1.5.0

137

dist/types/index.d.ts
/// <reference types="node" />
import type * as http from 'http';
import type { Struct } from 'google-protobuf/google/protobuf/struct_pb';
import type { AuthContextInterface, ExecutionResponseInterface, ElementActionsSchema, HTTPStatus } from './schemaTypes';
import type { AuthContextInterface, ExecutionResponseInterface, ElementActionSchema, HTTPStatus, ElementSignalSchema, WebhooksSchema } from './schemaTypes';
import type { Logger } from './logger';
export declare type ExecutionResponseOrVoid = ExecutionResponseInterface | void;
export type { Struct, Logger };
export * from './schemaTypes';
export interface IDataObject {
}
export interface IWebhookFunctions {
getHeaderData(): any;
}
export interface IResponse {
}
export declare type IWebHookResponses = Promise<IResponse> | IResponse | void | Promise<void>;
export interface IElement {
webhook(context: IWebhookContext): IWebHookResponses;
}
export interface IWebhookContext {
/**
* ### defer
*
* This will move the remaining processing behind an enterprise level queue for
* safety and reliability
*
*/
defer(fn: (context: IWebhookContext) => Promise<IResponse>): Promise<void>;
log(...args: any[]): void;
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=IResponse;data&v=1.0.0)
*
* **data** refers to the data that utilized in the workflow
* this data object is almost immediately striped from the
* response and wrapped into a new object that is passed
* into the workflow
*/
data?: any;
deferred?: boolean;
/**
* ### webhookInfo
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=IResponse;httpData&v=1.0.0)
*
* Provides information about the currently running webhook endpoint
* **httpData** refers to the data that utilized in the workflow
* this data object is almost immediately striped from the
* response and wrapped into a new object that is passed
* into the workflow
*/
webhookInfo: IWebhookInfo;
httpData?: any;
httpOptions?: {
doNotRespond?: boolean;
status?: HTTPStatus;
};
}
export interface IElementWorkUnit {
isSignal: boolean;
data: any;
}
export declare type IWebHookResponses = Promise<IResponse | void>;
export interface IElement {
webhook(context: ExecutionContext): IWebHookResponses;
}
export interface IWebhookContext {
}
export interface IWebhookInfo {

@@ -64,17 +74,21 @@ name: string;

*
* Generic Interface Support
* Generic Interface Support:
* - Strongly Typed Instance Data
* - Strongly Typed Query Parameters
* - Strongly Typed Parameters
* - Strongly Typed Headers
* - Strongly Typed Body
*
* Additional Resources:
* - [Developer Documents](https://developers.doflo.com/docs/general-welcome)
* - [Execution Context Schema](https://schemas.doflo.com/doflo/v1.0.0/contexts/executionContext.json)
* */
export interface ExecutionContext<IncomingMessage = DefaultHttpRequest, Query = DefaultQuery, Params = DefaultParams, Headers = DefaultHeaders, Body = DefaultBody> extends ExecutionContextExtensionMethods, Logger {
action: ElementAction;
req: ElementRequest<IncomingMessage, Query, Params, Headers, Body>;
res: ElementResponse<IncomingMessage, Query, Params, Headers, Body>;
authContext: AuthContext<IncomingMessage, Query, Params, Headers, Body>;
export interface ExecutionContext<InstanceData = any, Query = DefaultQuery, Headers = DefaultHeaders, Body = DefaultBody> extends ExecutionContextExtensionMethods<InstanceData, Query, Headers, Body>, Logger {
signal: ElementSignal;
webhook: Webhook;
instanceData: InstanceData;
req: ElementRequest<DefaultHttpRequest, Query, DefaultParams, Headers, Body>;
res: ElementResponse<DefaultHttpRequest, Query, DefaultParams, Headers, Body>;
}
export interface DeferredExecutionContext<InstanceData = any, Query = DefaultQuery, Headers = DefaultHeaders, Body = DefaultBody> extends Omit<ExecutionContext<InstanceData, Query, Headers, Body>, 'res' | 'redirect' | 'setCookie' | 'defer' | 'setHTTPStatus'>, Logger {
}
/**

@@ -97,3 +111,2 @@ * ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=ExecutionContext&v=1.0.0)

res: RPCElementResponse<IncomingMessage, Headers, Data>;
authContext: RPCAuthContext<IncomingMessage, Headers, Data>;
}

@@ -108,3 +121,3 @@ /**

* Important Considerations:
* - Contexts are disconnected data sets that traverse the NS8 infrastructure.
* - Contexts are disconnected data sets that traverse the doFlo infrastructure.
* - Contexts may be copied split or cloned.

@@ -123,7 +136,13 @@ * - Contexts execution environment is not guarantee.

}
export interface ExecutionRequest<IncomingMessage = DefaultHttpRequest, Query = DefaultQuery, Params = DefaultParams, Headers = DefaultHeaders, Body = DefaultBody> extends ElementRequest<IncomingMessage, Query, Params, Headers, Body> {
}
export interface ElementAction extends ElementActionsSchema {
export interface ElementAction extends ElementActionSchema {
actionName: string;
}
export interface ElementSignal extends ElementSignalSchema {
signalName: string;
methods: {
[key: string]: (context: ExecutionContext) => Promise<void> | Promise<IResponse>;
};
}
export interface Webhook extends WebhooksSchema {
}
export interface GRPCIncomingContext<Headers, Data> {

@@ -175,3 +194,3 @@ request: RPCElementRequest<GRPCIncomingMessage, Headers, Data> | {

}
export interface ElementResponse<IncomingMessage, Query, Params, Headers, Body> extends BaseElementResponse<IncomingMessage, Headers> {
export interface ElementResponse<IncomingMessage = DefaultHttpRequest, Query = DefaultQuery, Params = DefaultParams, Headers = DefaultHeaders, Body = DefaultBody> extends BaseElementResponse<IncomingMessage, Headers> {
code(statusCode: number): void;

@@ -190,7 +209,7 @@ status(statusCode: number): void;

/**
* Set response cookie
* @param name Cookie name
* @param value Cookie value
* @param options Serialize options
*/
* Set response cookie
* @param name Cookie name
* @param value Cookie value
* @param options Serialize options
*/
setCookie(name: string, value: string, options?: CookieOptions): void;

@@ -234,3 +253,3 @@ /**

}
export interface ElementRequest<IncomingMessage, Query, Params, Headers, Body> extends BaseElementRequest<IncomingMessage, Headers> {
export interface ElementRequest<IncomingMessage = DefaultHttpRequest, Query = DefaultQuery, Params = DefaultParams, Headers = DefaultHeaders, Body = DefaultBody> extends BaseElementRequest<IncomingMessage, Headers> {
query: Query;

@@ -242,7 +261,33 @@ params: Params;

body: Body;
rawBody?: Buffer;
}
export interface RPCExecutionContextExtensionMethods {
}
export interface ExecutionContextExtensionMethods {
export interface ExecutionContextExtensionMethods<InstanceData, Query, Headers, Body> {
/**
* ### defer
*
* This will move the remaining processing behind an enterprise level queue for
* safety and reliability
*
*/
defer(fn: (context: DeferredExecutionContext<InstanceData, Query, Headers, Body>) => IWebHookResponses): Promise<IResponse>;
/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=getRawBody&v=1.0.0)
* ### getRawBody
*
* gets the raw body from the request.
*
* Supported Protocols: HTTP | HTTPS
*
* Additional Reading:
* - [Developer Documents](https://developers.doflo.com/docs/general-welcome)
* - [Execution Response Schema](https://schemas.doflo.com/doflo/v1.0.0/responses/executionResponse.json)
*
* @param {string} key
* @param {string} value
* @returns void
*/
getRawBody(): Buffer;
/**
* ![doFlo Logo](https://schemas.doflo.com/docslogo.png?topic=getCookie&v=1.0.0)

@@ -460,7 +505,7 @@ * ### getCookie

/**
* **InvalidArgument** indicates client specified an invalid argument.
* Note that this differs from FailedPrecondition. It indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
* */
* **InvalidArgument** indicates client specified an invalid argument.
* Note that this differs from FailedPrecondition. It indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
* */
InvalidArgument = 3,

@@ -467,0 +512,0 @@ /**

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./schemaTypes"), exports);
//# sourceMappingURL=index.js.map
/**
* Event Context Interface for doFlo Elements Event Messaging
* JSON schema for doFlo Elements Project Files
*/
export interface EventContextInterface {
authContext?: AuthContextInterface;
data?: {
[key: string]: any;
};
eventName?: string;
}
/**
* Auth Context for doFlo Elements
*/
export interface AuthContextInterface {
activeUser?: UserContextInterface;
user?: UserContextInterface;
}
/**
* User Context for doFlo Elements
*/
export interface UserContextInterface {
displayName?: string;
}
/**
* Execution Exchange Context for doFlo Elements RPC
*
* Object used between the NS8 Integration SDK and Switchboard Action Switches
*/
export interface ExecutionExchangeContext {
actionName?: string;
data?: {
[key: string]: any;
};
}
/**
* Instance Context for doFlo Elements
*/
export interface InstanceContextInterface {
instanceInfo?: {
[key: string]: any;
};
}
/**
* Project Context for doFlo Elements
*/
export interface ProjectContextInterface {
projectInfo?: {
[key: string]: any;
};
}
/**
* Request Context for doFlo Elements SDK Client
*/
export interface RequestContextInterface {
export interface DoFlo {
/**
* Platform (most likely ecommerce platform) that the NS8 Client Library is requesting on
* behalf of
* This is the URN that describes the schema of this document
*/
IntegrationPlatform?: string;
/**
* Platform Version Number (most likely ecommerce platform) that the NS8 Client Library is
* requesting on behalf of
*/
IntegrationPlatformVersion?: string;
/**
* Version of the NS8 Client Library making the current request
*/
NS8ClientLibrary?: string;
/**
* Operating System that the NS8 Client Library is requesting from
*/
OperatingSystem?: string;
/**
* Operating System Version Number that the NS8 Client Library is requesting from
*/
OperatingSystemVersion?: string;
/**
* Programing Language that the that the NS8 Client Library is written in
*/
ProgramingLanguage?: string;
/**
* Programing Language Version Number that the that the NS8 Client Library is written in
*/
ProgramingLanguageVersion?: string;
}
/**
* Scoring Context Interface for doFlo Elements Scoring Messaging
*/
export interface ScoringContextInterface {
authContext?: AuthContextInterface;
data?: {
[key: string]: any;
$schema?: string;
actions?: {
[key: string]: ElementActionSchema;
};
scoringProviderName?: string;
}
/**
* Base Element Schema for for doFlo Elements
*/
export interface ElementSchema {
notes?: string;
/**
* The FQN of the function in your project
*/
switchMethod: string;
}
export declare enum ElementTypes {
Action = "action",
Event = "event",
Score = "score"
}
/**
* Event Response Interface for doFlo Elements Event Messaging
*/
export interface EventResponseInterface {
data?: {
[key: string]: any;
bridgeApps?: {
[key: string]: BridgeAppSchema;
};
}
/**
* Execution Response Interface for doFlo Elements Execution Messaging
*/
export interface ExecutionResponseInterface {
data?: {
[key: string]: any;
configuration: any;
contexts?: any;
credentials?: {
[key: string]: CredentialsSchema;
};
}
/**
* Scoring Response Interface for doFlo Elements Scoring Messaging
*/
export interface ScoringResponseInterface {
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements Coordination Provider Properties
*/
export interface UICoordinationProviderProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI Dashboard Pod Properties
*/
export interface UIDashboardPodProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI Detail Pod Properties
*/
export interface UIDetailPodProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI Settings Provider Properties
*/
export interface UISettingsProviderProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI View Properties
*/
export interface UIViewProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements Project Files
*/
export interface Doflo {
/**
* This is the URN that describes the schema of this document
* Informs the element loader which language to assume the default text queues (contained in
* this file) are written in.
*/
$schema?: string;
actions?: ElementActionsSchema;
configuration: any;
defaultLanguage?: DefaultLanguage;
env?: EnvSchema;
events?: {
[key: string]: ElementEventSchema;
};
integrationId: string;
integrations?: any;
notes?: string;
projectName: string;
projectType?: ProjectTypeSchema;
scorers?: {
[key: string]: ElementScoreSchema;
signals?: {
[key: string]: ElementSignalSchema;
};
spaSettings?: any[] | boolean | number | number | null | SPASettingsObject | string;
/**
* Describes the UI elements of an extension project
*/
ui?: any[] | boolean | number | number | null | UIObject | string;
version: string;
}
export interface ElementActionsSchema {
authActions?: {
[key: string]: ElementAuthenticatorSchema;
};
}
/**
* Definition of a element authenticator action
* Definition of a doFlo action element
*
* Base Element Schema for for doFlo Elements
*/
export interface ElementAuthenticatorSchema {
export interface ElementActionSchema {
notes?: string;
/**
* The FQN of the function in your project
*/
switchMethod: string;
}
/**
* Definition of a elementboard action element
*
* Base Element Schema for for doFlo Elements
* Definition of a doFlo bridge application
*/
export interface SwitchActionSchema {
authenticationMethod?: string;
endPoints?: EndpointSchema[];
/**
* Hide this action from the swagger documentation
*/
hideFromSwagger?: boolean;
notes?: string;
/**
* The FQN of the function in your project
*/
switchMethod: string;
switchType?: any;
export interface BridgeAppSchema {
endpoints?: AppEndpointsSchema[];
}
export interface EndpointSchema {
export interface AppEndpointsSchema {
file?: string;
fn?: string;
method?: HTTPMethods;

@@ -260,2 +58,3 @@ /**

path?: string;
ui?: UI;
}

@@ -274,2 +73,46 @@ /**

}
export interface UI {
component?: string;
file?: string;
useWrapper?: boolean;
}
export interface CredentialsSchema {
extends?: string[];
hidden?: boolean;
properties?: {
[key: string]: CredentialPropertySchema;
};
}
export interface CredentialPropertySchema {
default?: string;
description?: string;
required?: boolean;
title?: string;
type?: SemanticTypes;
}
export declare enum SemanticTypes {
Boolean = "boolean",
Collection = "collection",
Color = "color",
DateTime = "dateTime",
FixedCollection = "fixedCollection",
Hidden = "hidden",
JSON = "json",
MultiOptions = "multiOptions",
Number = "number",
Options = "options",
String = "string"
}
/**
* Informs the element loader which language to assume the default text queues (contained in
* this file) are written in.
*/
export declare enum DefaultLanguage {
En = "en",
Fr = "fr",
Jp = "jp",
Ru = "ru",
SP = "sp",
Xn = "xn"
}
export interface EnvSchema {

@@ -290,64 +133,116 @@ global?: {

/**
* Definition of a switchboard event switch
* Definition of a doFlo trigger element
*
* Base Element Schema for for doFlo Elements
*/
export interface ElementEventSchema {
notes?: string;
export interface ElementSignalSchema {
authenticationMethod?: string;
credentialTypes?: string[];
endPoints?: EndpointsSchema[];
/**
* The FQN of the function in your project
* By specifying the file name you override the default behavior of matching the file name
* to the triggers name
*/
switchMethod: string;
/**
* In an event switch this should be event
*/
switchType?: any;
}
export declare enum ProjectTypeSchema {
Element = "element",
Integration = "integration"
}
/**
* Definition of a switchboard score element
*
* Base Element Schema for for doFlo Elements
*/
export interface ElementScoreSchema {
/**
* These scorers should run before
*/
dependencies?: string[];
fileName?: string;
notes?: string;
scriptDependencies?: {
[key: string]: ElementScoreSchemaItems;
processes?: {
[key: string]: string;
};
webhooks?: {
[key: string]: WebhooksSchema;
};
}
export interface EndpointsSchema {
method?: HTTPMethods;
/**
* Should users be able to directly utilize this scorer in order rules
* This is the full path that will invoke your method
*/
selectable?: boolean;
/**
* The FQN of the function in your project
*/
switchMethod: string;
switchType: any;
/**
* Should users see this scorer available in order rules
*/
visible?: boolean;
path?: string;
}
export interface ElementScoreSchemaItems {
export interface WebhooksSchema {
executionType?: ExecutionType;
/**
* These scorers should run before
* Does this webhook require the use of the raw form of the request body, if not leave this
* setting alone
*/
dependencies?: string[];
notes?: string;
exposeRawBody?: boolean;
method?: HTTPMethods;
/**
* The relative path to this project of the sidecar tracking script
* Named method to handled webhooks that are automatically deferred
*/
scriptName?: string;
/**
* The action that will generate the tracking script
*/
actionName?: string;
postProcess?: string;
responseCode?: HTTPStatus;
}
export declare enum ExecutionType {
Asynchronous = "asynchronous",
Synchronous = "synchronous"
}
/**
* This is the HTTP status that is returned if this request was made over HTTP[S]
*/
export declare enum HTTPStatus {
Status100Continue = "Status 100 Continue",
Status101SwitchingProtocols = "Status 101 Switching Protocols",
Status102Processing = "Status 102 Processing",
Status200OK = "Status 200 OK",
Status201Created = "Status 201 Created",
Status202Accepted = "Status 202 Accepted",
Status203NonAuthoritativeInformation = "Status 203 Non-authoritative Information",
Status204NoContent = "Status 204 No Content",
Status205ResetContent = "Status 205 Reset Content",
Status206PartialContent = "Status 206 Partial Content",
Status207MultiStatus = "Status 207 Multi-Status",
Status208AlreadyReported = "Status 208 Already Reported",
Status226IMUsed = "Status 226 IM Used",
Status300MultipleChoices = "Status 300 Multiple Choices",
Status301MovedPermanently = "Status 301 Moved Permanently",
Status302Found = "Status 302 Found",
Status303SeeOther = "Status 303 See Other",
Status304NotModified = "Status 304 Not Modified",
Status305UseProxy = "Status 305 Use Proxy",
Status307TemporaryRedirect = "Status 307 Temporary Redirect",
Status308PermanentRedirect = "Status 308 Permanent Redirect",
Status400BadRequest = "Status 400 Bad Request",
Status401Unauthorized = "Status 401 Unauthorized",
Status402PaymentRequired = "Status 402 Payment Required",
Status403Forbidden = "Status 403 Forbidden",
Status404NotFound = "Status 404 Not Found",
Status405MethodNotAllowed = "Status 405 Method Not Allowed",
Status406NotAcceptable = "Status 406 Not Acceptable",
Status407ProxyAuthenticationRequired = "Status 407 Proxy Authentication Required",
Status408RequestTimeout = "Status 408 Request Timeout",
Status409Conflict = "Status 409 Conflict",
Status410Gone = "Status 410 Gone",
Status411LengthRequired = "Status 411 Length Required",
Status412PreconditionFailed = "Status 412 Precondition Failed",
Status413PayloadTooLarge = "Status 413 Payload Too Large",
Status414RequestURITooLong = "Status 414 Request-URI Too Long",
Status415UnsupportedMediaType = "Status 415 Unsupported Media Type",
Status416RequestedRangeNotSatisfiable = "Status 416 Requested Range Not Satisfiable",
Status417ExpectationFailed = "Status 417 Expectation Failed",
Status418IMATeapot = "Status 418 I'm a teapot",
Status421MisdirectedRequest = "Status 421 Misdirected Request",
Status422UnprocessableEntity = "Status 422 Unprocessable Entity",
Status423Locked = "Status 423 Locked",
Status424FailedDependency = "Status 424 Failed Dependency",
Status426UpgradeRequired = "Status 426 Upgrade Required",
Status428PreconditionRequired = "Status 428 Precondition Required",
Status429TooManyRequests = "Status 429 Too Many Requests",
Status431RequestHeaderFieldsTooLarge = "Status 431 Request Header Fields Too Large",
Status444ConnectionClosedWithoutResponse = "Status 444 Connection Closed Without Response",
Status451UnavailableForLegalReasons = "Status 451 Unavailable For Legal Reasons",
Status499ClientClosedRequest = "Status 499 Client Closed Request",
Status500InternalServerError = "Status 500 Internal Server Error",
Status501NotImplemented = "Status 501 Not Implemented",
Status502BadGateway = "Status 502 Bad Gateway",
Status503ServiceUnavailable = "Status 503 Service Unavailable",
Status504GatewayTimeout = "Status 504 Gateway Timeout",
Status505HTTPVersionNotSupported = "Status 505 HTTP Version Not Supported",
Status506VariantAlsoNegotiates = "Status 506 Variant Also Negotiates",
Status507InsufficientStorage = "Status 507 Insufficient Storage",
Status508LoopDetected = "Status 508 Loop Detected",
Status510NotExtended = "Status 510 Not Extended",
Status511NetworkAuthenticationRequired = "Status 511 Network Authentication Required",
Status599NetworkConnectTimeoutError = "Status 599 Network Connect Timeout Error"
}
export interface SPASettingsObject {

@@ -423,40 +318,3 @@ rootIncludes?: RootIncludesSchema[];

}
export interface UIObject {
coordinationProvider?: {
[key: string]: any;
};
dashboardPods?: DashboardPods;
detailPods?: DetailPods;
settingPods?: SettingPods;
settingsProvider?: UISettingsSchema;
views?: Views;
}
export interface DashboardPods {
}
export interface DetailPods {
}
export interface SettingPods {
}
export interface UISettingsSchema {
/**
* The FQN of the class in your project, this is a react UI element
*/
className?: string;
implementation?: SettingsImplementationType;
notes?: string;
}
/**
* Type of settings view implementation [ complex : simple ]
* complex: A full react control that implements it's saving logic and / or could
* potentially be multiple views or steps
* simple: A simple react control that responds to an onSave event and bubbles up key value
* pairs
*/
export declare enum SettingsImplementationType {
Complex = "complex",
Simple = "simple"
}
export interface Views {
}
/**
* Request Context Interface

@@ -513,68 +371,202 @@ */

/**
* This is the HTTP status that is returned if this request was made over HTTP[S]
* Event Context Interface for doFlo Elements Event Messaging
*/
export declare enum HTTPStatus {
Status100Continue = "Status 100 Continue",
Status101SwitchingProtocols = "Status 101 Switching Protocols",
Status102Processing = "Status 102 Processing",
Status200OK = "Status 200 OK",
Status201Created = "Status 201 Created",
Status202Accepted = "Status 202 Accepted",
Status203NonAuthoritativeInformation = "Status 203 Non-authoritative Information",
Status204NoContent = "Status 204 No Content",
Status205ResetContent = "Status 205 Reset Content",
Status206PartialContent = "Status 206 Partial Content",
Status207MultiStatus = "Status 207 Multi-Status",
Status208AlreadyReported = "Status 208 Already Reported",
Status226IMUsed = "Status 226 IM Used",
Status300MultipleChoices = "Status 300 Multiple Choices",
Status301MovedPermanently = "Status 301 Moved Permanently",
Status302Found = "Status 302 Found",
Status303SeeOther = "Status 303 See Other",
Status304NotModified = "Status 304 Not Modified",
Status305UseProxy = "Status 305 Use Proxy",
Status307TemporaryRedirect = "Status 307 Temporary Redirect",
Status308PermanentRedirect = "Status 308 Permanent Redirect",
Status400BadRequest = "Status 400 Bad Request",
Status401Unauthorized = "Status 401 Unauthorized",
Status402PaymentRequired = "Status 402 Payment Required",
Status403Forbidden = "Status 403 Forbidden",
Status404NotFound = "Status 404 Not Found",
Status405MethodNotAllowed = "Status 405 Method Not Allowed",
Status406NotAcceptable = "Status 406 Not Acceptable",
Status407ProxyAuthenticationRequired = "Status 407 Proxy Authentication Required",
Status408RequestTimeout = "Status 408 Request Timeout",
Status409Conflict = "Status 409 Conflict",
Status410Gone = "Status 410 Gone",
Status411LengthRequired = "Status 411 Length Required",
Status412PreconditionFailed = "Status 412 Precondition Failed",
Status413PayloadTooLarge = "Status 413 Payload Too Large",
Status414RequestURITooLong = "Status 414 Request-URI Too Long",
Status415UnsupportedMediaType = "Status 415 Unsupported Media Type",
Status416RequestedRangeNotSatisfiable = "Status 416 Requested Range Not Satisfiable",
Status417ExpectationFailed = "Status 417 Expectation Failed",
Status418IMATeapot = "Status 418 I'm a teapot",
Status421MisdirectedRequest = "Status 421 Misdirected Request",
Status422UnprocessableEntity = "Status 422 Unprocessable Entity",
Status423Locked = "Status 423 Locked",
Status424FailedDependency = "Status 424 Failed Dependency",
Status426UpgradeRequired = "Status 426 Upgrade Required",
Status428PreconditionRequired = "Status 428 Precondition Required",
Status429TooManyRequests = "Status 429 Too Many Requests",
Status431RequestHeaderFieldsTooLarge = "Status 431 Request Header Fields Too Large",
Status444ConnectionClosedWithoutResponse = "Status 444 Connection Closed Without Response",
Status451UnavailableForLegalReasons = "Status 451 Unavailable For Legal Reasons",
Status499ClientClosedRequest = "Status 499 Client Closed Request",
Status500InternalServerError = "Status 500 Internal Server Error",
Status501NotImplemented = "Status 501 Not Implemented",
Status502BadGateway = "Status 502 Bad Gateway",
Status503ServiceUnavailable = "Status 503 Service Unavailable",
Status504GatewayTimeout = "Status 504 Gateway Timeout",
Status505HTTPVersionNotSupported = "Status 505 HTTP Version Not Supported",
Status506VariantAlsoNegotiates = "Status 506 Variant Also Negotiates",
Status507InsufficientStorage = "Status 507 Insufficient Storage",
Status508LoopDetected = "Status 508 Loop Detected",
Status510NotExtended = "Status 510 Not Extended",
Status511NetworkAuthenticationRequired = "Status 511 Network Authentication Required",
Status599NetworkConnectTimeoutError = "Status 599 Network Connect Timeout Error"
export interface EventContextInterface {
authContext?: AuthContextInterface;
data?: {
[key: string]: any;
};
eventName?: string;
}
/**
* Auth Context for doFlo Elements
*/
export interface AuthContextInterface {
activeUser?: UserContextInterface;
user?: UserContextInterface;
}
/**
* User Context for doFlo Elements
*/
export interface UserContextInterface {
displayName?: string;
}
/**
* Execution Exchange Context for doFlo Elements RPC
*
* Object used between the doFlo Integration SDK and Element Actions and Signals
*/
export interface ExecutionExchangeContext {
actionName?: string;
data?: {
[key: string]: any;
};
}
/**
* Instance Context for doFlo Elements
*/
export interface InstanceContextInterface {
instanceInfo?: {
[key: string]: any;
};
}
/**
* Project Context for doFlo Elements
*/
export interface ProjectContextInterface {
projectInfo?: {
[key: string]: any;
};
}
/**
* Request Context for doFlo Elements SDK Client
*/
export interface RequestContextInterface {
/**
* Version of the doFlo Client Library making the current request
*/
doFloClientLibrary?: string;
/**
* Platform (most likely ecommerce platform) that the doFlo Client Library is requesting on
* behalf of
*/
IntegrationPlatform?: string;
/**
* Platform Version Number (most likely ecommerce platform) that the doFlo Client Library is
* requesting on behalf of
*/
IntegrationPlatformVersion?: string;
/**
* Operating System that the doFlo Client Library is requesting from
*/
OperatingSystem?: string;
/**
* Operating System Version Number that the doFlo Client Library is requesting from
*/
OperatingSystemVersion?: string;
/**
* Programing Language that the that the doFlo Client Library is written in
*/
ProgramingLanguage?: string;
/**
* Programing Language Version Number that the that the doFlo Client Library is written in
*/
ProgramingLanguageVersion?: string;
}
/**
* Scoring Context Interface for doFlo Elements Scoring Messaging
*/
export interface ScoringContextInterface {
authContext?: AuthContextInterface;
data?: {
[key: string]: any;
};
scoringProviderName?: string;
}
/**
* Definition of a element authenticator action
*
* Base Element Schema for for doFlo Elements
*/
export interface ElementAuthenticatorSchema {
notes?: string;
/**
* The FQN of the function in your project
*/
switchMethod?: string;
}
/**
* Base Element Schema for for doFlo Elements
*/
export interface ElementSchema {
notes?: string;
/**
* The FQN of the function in your project
*/
switchMethod?: string;
}
export declare enum ElementTypes {
Action = "action",
DataContext = "data-context",
Integration = "integration",
Signal = "signal"
}
/**
* Event Response Interface for doFlo Elements Event Messaging
*/
export interface EventResponseInterface {
data?: {
[key: string]: any;
};
}
/**
* Execution Response Interface for doFlo Elements Execution Messaging
*/
export interface ExecutionResponseInterface {
data?: {
[key: string]: any;
};
}
/**
* Scoring Response Interface for doFlo Elements Scoring Messaging
*/
export interface ScoringResponseInterface {
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements Coordination Provider Properties
*/
export interface UICoordinationProviderProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI Dashboard Pod Properties
*/
export interface UIDashboardPodProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI Detail Pod Properties
*/
export interface UIDetailPodProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI Settings Provider Properties
*/
export interface UISettingsProviderProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
/**
* JSON schema for doFlo Elements UI View Properties
*/
export interface UIViewProperties {
authContext?: {
[key: string]: any;
};
data?: {
[key: string]: any;
};
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HTTPStatus = exports.Protocol = exports.SettingsImplementationType = exports.TagName = exports.ReferrerPolicy = exports.ProjectTypeSchema = exports.HTTPMethods = exports.ElementTypes = void 0;
var ElementTypes;
(function (ElementTypes) {
ElementTypes["Action"] = "action";
ElementTypes["Event"] = "event";
ElementTypes["Score"] = "score";
})(ElementTypes = exports.ElementTypes || (exports.ElementTypes = {}));
exports.ElementTypes = exports.Protocol = exports.TagName = exports.ReferrerPolicy = exports.HTTPStatus = exports.ExecutionType = exports.DefaultLanguage = exports.SemanticTypes = exports.HTTPMethods = void 0;
/**

@@ -23,43 +17,35 @@ * Standard HTTP methods

})(HTTPMethods = exports.HTTPMethods || (exports.HTTPMethods = {}));
var ProjectTypeSchema;
(function (ProjectTypeSchema) {
ProjectTypeSchema["Element"] = "element";
ProjectTypeSchema["Integration"] = "integration";
})(ProjectTypeSchema = exports.ProjectTypeSchema || (exports.ProjectTypeSchema = {}));
var ReferrerPolicy;
(function (ReferrerPolicy) {
ReferrerPolicy["NoReferrer"] = "no-referrer";
ReferrerPolicy["NoReferrerWhenDowngrade"] = "no-referrer-when-downgrade";
ReferrerPolicy["Origin"] = "origin";
ReferrerPolicy["OriginWhenCrossOrigin"] = "origin-when-cross-origin";
ReferrerPolicy["UnsafeURL"] = "unsafe-url";
})(ReferrerPolicy = exports.ReferrerPolicy || (exports.ReferrerPolicy = {}));
var TagName;
(function (TagName) {
TagName["Link"] = "link";
TagName["Meta"] = "meta";
TagName["Script"] = "script";
})(TagName = exports.TagName || (exports.TagName = {}));
var SemanticTypes;
(function (SemanticTypes) {
SemanticTypes["Boolean"] = "boolean";
SemanticTypes["Collection"] = "collection";
SemanticTypes["Color"] = "color";
SemanticTypes["DateTime"] = "dateTime";
SemanticTypes["FixedCollection"] = "fixedCollection";
SemanticTypes["Hidden"] = "hidden";
SemanticTypes["JSON"] = "json";
SemanticTypes["MultiOptions"] = "multiOptions";
SemanticTypes["Number"] = "number";
SemanticTypes["Options"] = "options";
SemanticTypes["String"] = "string";
})(SemanticTypes = exports.SemanticTypes || (exports.SemanticTypes = {}));
/**
* Type of settings view implementation [ complex : simple ]
* complex: A full react control that implements it's saving logic and / or could
* potentially be multiple views or steps
* simple: A simple react control that responds to an onSave event and bubbles up key value
* pairs
* Informs the element loader which language to assume the default text queues (contained in
* this file) are written in.
*/
var SettingsImplementationType;
(function (SettingsImplementationType) {
SettingsImplementationType["Complex"] = "complex";
SettingsImplementationType["Simple"] = "simple";
})(SettingsImplementationType = exports.SettingsImplementationType || (exports.SettingsImplementationType = {}));
var DefaultLanguage;
(function (DefaultLanguage) {
DefaultLanguage["En"] = "en";
DefaultLanguage["Fr"] = "fr";
DefaultLanguage["Jp"] = "jp";
DefaultLanguage["Ru"] = "ru";
DefaultLanguage["SP"] = "sp";
DefaultLanguage["Xn"] = "xn";
})(DefaultLanguage = exports.DefaultLanguage || (exports.DefaultLanguage = {}));
var ExecutionType;
(function (ExecutionType) {
ExecutionType["Asynchronous"] = "asynchronous";
ExecutionType["Synchronous"] = "synchronous";
})(ExecutionType = exports.ExecutionType || (exports.ExecutionType = {}));
/**
* Protocol of the request
*/
var Protocol;
(function (Protocol) {
Protocol["GRPC"] = "gRPC";
Protocol["HTTP"] = "http";
Protocol["HTTPS"] = "https";
})(Protocol = exports.Protocol || (exports.Protocol = {}));
/**
* This is the HTTP status that is returned if this request was made over HTTP[S]

@@ -133,2 +119,32 @@ */

})(HTTPStatus = exports.HTTPStatus || (exports.HTTPStatus = {}));
var ReferrerPolicy;
(function (ReferrerPolicy) {
ReferrerPolicy["NoReferrer"] = "no-referrer";
ReferrerPolicy["NoReferrerWhenDowngrade"] = "no-referrer-when-downgrade";
ReferrerPolicy["Origin"] = "origin";
ReferrerPolicy["OriginWhenCrossOrigin"] = "origin-when-cross-origin";
ReferrerPolicy["UnsafeURL"] = "unsafe-url";
})(ReferrerPolicy = exports.ReferrerPolicy || (exports.ReferrerPolicy = {}));
var TagName;
(function (TagName) {
TagName["Link"] = "link";
TagName["Meta"] = "meta";
TagName["Script"] = "script";
})(TagName = exports.TagName || (exports.TagName = {}));
/**
* Protocol of the request
*/
var Protocol;
(function (Protocol) {
Protocol["GRPC"] = "gRPC";
Protocol["HTTP"] = "http";
Protocol["HTTPS"] = "https";
})(Protocol = exports.Protocol || (exports.Protocol = {}));
var ElementTypes;
(function (ElementTypes) {
ElementTypes["Action"] = "action";
ElementTypes["DataContext"] = "data-context";
ElementTypes["Integration"] = "integration";
ElementTypes["Signal"] = "signal";
})(ElementTypes = exports.ElementTypes || (exports.ElementTypes = {}));
//# sourceMappingURL=schemaTypes.js.map
{
"name": "@doflo/flow-interfaces",
"version": "1.4.0",
"version": "1.5.0",
"description": "A boilerplate repo for publishing typescript packages to npm",

@@ -12,3 +12,3 @@ "main": "dist/index.js",

"test:watch": "jest --watchAll",
"build": "npx quicktype --src ./src/schema/doflo/v1.0.0/**/*.json --src ./src/schema/doflo/v1.0.0/*.json -o ./src/types/schemaTypes.ts --just-types --no-explicit-unions --no-combine-classes -t doflo -s schema && tsc",
"build": "npx quicktype --src ./src/schema/doflo/v1.0.0/*.json --src ./src/schema/doflo/v1.0.0/**/*.json -o ./src/types/schemaTypes.ts --just-types -t doflo -s schema && tsc",
"watch": "tsc -w",

@@ -59,6 +59,6 @@ "start": "npm link && nodemon",

"husky": "4.3.0",
"jest": "26.6.3",
"nodemon": "2.0.6",
"prettier": "2.2.0",
"semantic-release": "17.3.0",
"jest": "26.6.3",
"ts-jest": "26.4.4",

@@ -65,0 +65,0 @@ "typescript": "4.1.2"

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

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