npm.io
1.9.0 • Published 2 weeks ago

@or-sdk/deployer

Licence
Apache-2.0
Version
1.9.0
Deps
2
Size
103 kB
Vulns
0
Weekly
0

@or-sdk/deployer

OneReach SDK client for Deployer.

When to use

  • Use this package when integrating with the Deployer capability on the OneReach platform.
  • Use its typed client and exported models instead of hand-writing requests to that service.

When not to use

  • Do not use it for a different platform capability; choose the dedicated @or-sdk/* package instead.
  • Do not use it for generic third-party HTTP calls.

Installation

$ npm i @or-sdk/deployer

Usage

import { Deployer } from '@or-sdk/deployer'

// with direct api url
const deployer = new Deployer({
  token: 'my-account-token-string',
  deployerUrl: 'http://example.deployer/endpoint'
});

// with service discovery(slower)
const deployer = new Deployer({
  token: 'my-account-token-string',
  discoveryUrl: 'http://example.discovery/endpoint'
});

Configuration

  • Prefer deployerUrl when the service URL is known; it avoids a discovery request.
  • Use discoveryUrl only when the service URL is not available.
  • Provide token as a bearer-token string or getter where supported.

Common pitfalls

  • Keep the client token current when it can expire; a token getter is preferable where the constructor accepts one.
  • Treat the generated TypeScript types as the authoritative contract for optional parameters and response shapes.

Method map

Method Purpose
removeRole(...) See the exported TypeScript signature for parameters and result.
activateFlowNoPoll(...) See the exported TypeScript signature for parameters and result.
activateFlow(...) See the exported TypeScript signature for parameters and result.
deactivateFlowNoPoll(...) See the exported TypeScript signature for parameters and result.
deactivateFlow(...) See the exported TypeScript signature for parameters and result.
progressCallback(...) See the exported TypeScript signature for parameters and result.
suspendAccount(...) See the exported TypeScript signature for parameters and result.
resumeAccount(...) See the exported TypeScript signature for parameters and result.
fetchFlowLogsChunk(...) See the exported TypeScript signature for parameters and result.
fetchAllFlowLogs(...) See the exported TypeScript signature for parameters and result.

More detail

Full signatures and exported types are available in src/ and dist/types/.

Additional API reference

Methods below were missing from the package guide. Signatures and return types are taken directly from the exported source API.

Deployer
Method Returns Purpose
pollResult({ flowId, requestId }: PollingParams, progressCallback?: (progress: PollingResultPending) => void, options?: PollingOptions) Promise<T> Polls for activation or deactivation status, which can be 'pending' during the process