API Reference
Last updated
Last updated
Instantiates a Standard SDK with your APIs of choice.
The build
method takes one argument which may have either or both of apiSpecs
and sklEngineOptions
.
apiSpecs
object
A hash of ApiSpecOptions
objects. Describes the API specs for StandardSDK to construct namespaced operations from.
sklEngineOptions
object
ApiSpecOptions
are the configurations you pass when building a Standard SDK for the APIs you want to work with. Different types of APIs have their own specific options. Currently we only support OpenAPI specs.
type
Required
A type of API specification. Possible values are: openapi
value
Required
The contents of the API specification. Usually a string or JSON object. When using Typescript, use as const
on your API spec to get extended type support.
defaultConfiguration
defaultOptions
A StandardSDK
instance with a namespace for each key in apiSpecs
. It may also have an skl
property if sklEngineOptions
was supplied.
In Typescript:
A namespace of a StandardSDK
instance corresponding to a set of supplied Api Spec Options. A namespace has a property for each operation in the supplied API specification. Each namespace also includes methods setDefaultConfiguration
and setDefaultOptions
to update the default configuration and options to all operations if the API.
In Typescript:
In Typescript:
In Typescript:
Executes the API operation called <operation>
according to the API specification corresponding to the namespace <namespace>
.
All parameters are optional, however, when using Typescript and executing an OpenAPI operation with required parameters or request body, the args
parameter will be required.
args
object
Arguments for the operation as defined by the API specification. For example, an operation in an OpenAPI spec has either a requestBody
or a parameters
field. StandardSDK will read these fields and construct and send a web request with the data from args
in the correct parts of the request.
configuration
object
options
object
In Typescript:
In Typescript:
In Typescript:
args
object
The arguments supplied to the Verb which should conform to the Verb's parameters
field of the Verb's Schema.
In Typescript:
An SKLEngineOptions
object as defined by
Optional configuration that will be added to every operation of this API. For OpenAPI specs, this field will be an OpenApiClientConfiguration
object as defined in .
Optional options that will be applied to every operation of this API. For OpenAPI operations, this is an AxiosRequestConfig
object. See the for reference.
Sets the default configuration for all operations of in an API namespace. When using an API described via an OpenAPI spec, the configuration
parameter should be a OpenApiClientConfiguration
object as defined in .
Sets the default options for all operations of in an API namespace. When using an API described via an OpenAPI spec, the options
parameter should be an AxiosRequestConfig
object as defined in the .
An object holding any configuration necessary for the operation. Most often this includes security credentials. For example, for an OpenAPI operation configuration
may include an apiKey
or accessToken
to satisfy the of the operation. See note below for more information.
An object holding any options to supply to the operation execution module to modfy default behaviors the request or message sent for the operation. For OpenAPI operations, this is an AxiosRequestConfig
object. See the for reference.
⚠️ StandardSDK uses the package to execute OpenAPI operations. This library currently supports OpenAPI security types oauth2
, apiKey
, and http
with schemes basic
or bearer
. See for reference and the for more information.
Operations return which resolve to different values depending on the type of API. OpenAPI operations will resolve to an object.
A instance which is instantiated when the sklEngineOptions
parameter is supplied when Standard SDK is built.
The execution interface of the instance accessed through Standard SDK.
Executes the verb called <verb>
according to its Schema and related Mappings in the Schemas provided to the instance via the sklEngineOptions
parameter when building Standard SDK.
Verbs executed using return which resolve to an object.