Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dfin-jsdk

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dfin-jsdk

A jsdk client uses axios and typescript

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

jsdk

A jsdk client uses axios and typescript


export interface IParameters {
 url?: string; // source url
 	baseURL?: string; // base api url
 	source?: any; // source text
 	folder?: string; // main folder
 	definitionsFolder?: string; // definitions folder
 	utilsFolder?: string; // utils folder
 	typesFolder?: string; // types folder
 	restsFolder?: string; // rests folder
 	testsFolder?: string; // tests folder
 	name?: string; // sdk name
 	suffix?: string; // class suffix
 	prefix?: string; // class prefix
 	lib?: typeof LIBRARIES[number]; // axios, fetch, etc
 	unit?: boolean; // use unit tests - yes/no
 	responseType?: boolean; // use response type - yes/no, if no - use any as default
 	splitMethods?: boolean; // split methods to different files or combine in 1
 	splitDefinitions?: boolean; // split definitions to different files or combine in 1
 	splitTests?: boolean; // split tests to different files or combine in 1
 	modelMode?: 'class' | 'interface'; // model mode - class or interface
 	useStaticMethod?: boolean; // use static methods or use regular methods
 	methodNameMode?: 'id' | 'path'; // mode: id = simple method{N} name, path - path based name
 	http?: IDictionary<string>; // get, post, put, delete associations
 	methods?: IDictionary<string>; // list of methods associations
 	datas?: IDatas; // list of datas associations for tests
 	groups?: IDictionary<string>; // list of groups associations
 	pathsFilters?: string[]; // list of paths filters
 	groupsFilters?: string[]; // list of groups filters
 	format?: (data: string) => string; // format function
}

const defaultOptions: IParameters = {
    baseURL: '',
    folder: 'services',
    definitionsFolder: 'definitions',
    restsFolder: 'rests',
    typesFolder: 'types',
    utilsFolder: 'utils',
    testsFolder: '__tests__',
    prefix: '',
    suffix: 'Service',
    methods: {},
    datas: {},
    pathsFilters: ['**'],
    groupsFilters: ['**'],
    lib: 'axios',
    unit: true,
    modelMode: 'interface',
    useStaticMethod: true,
    methodNameMode: 'path',
    splitMethods: true,
    splitDefinitions: true,
    splitTests: true,
    responseType: true,
    http: {
        get: 'get',
        post: 'post',
        put: 'put',
        head: 'head',
        delete: 'delete',
        options: 'options',
        patch: 'patch',
        link: 'link',
        unlink: 'unlink',
    },
}

FAQs

Package last updated on 05 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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