2.0.30 • Published 6 months ago
@youfibre/otsc v2.0.30
One-Touch Switching Client
Installation
npm install @youfibre/otsc
Basic Usage
// Add these imports...
import { OTSClient } from '@youfibre/otsc';
const client = new OTSClient(
'https://hub-base-url',
'https://sit-base-url',
'my-client-id',
'my-client-secret',
);
const clientWithCaching = new OTSClient(
'https://hub-base-url',
'https://sit-base-url',
'my-client-id',
'my-client-secret',
{
setItem: (key: string, value: string, ttlSeconds: number) => {
// redisClient.set(key, value, 'EX', ttlSeconds);
},
getItem: (key: string) => {
// return redisClient.get(key);
}
}
);
const message = {
envelope: {
source: {
type: 'RCPID',
identity: 'RCP001',
correlationID: 'XYZ987'
},
destination: {
type: 'RCPID',
identity: 'RCP002',
correlationID: 'XYZ123'
},
routingID: 'residentialSwitchMatchRequest'
},
residentialSwitchMatchRequest: {
grcpBrandName: 'YouFibre Limited',
name: 'Miggins', // Dummy data
account: '0003316563216', // Dummy data
address: {
uprn: '12345', // Dummy data
addressLines: ['Flat 1', 'Rose Cottage', '22 Cheshunt Mews', 'Cypress Street', 'Tyre Industrial Estate', 'Blnatyre'], // Dummy data
postTown: 'Glasgow', // Dummy data
postCode: 'SW1P 3UX' // Dummy data
},
services: [
{
serviceType: 'IAS',
action: 'cease'
},
{
serviceType: 'NBICS',
serviceIdentifierType: 'DN',
serviceIdentifier: '0101111222', // Dummy data
action: 'port'
}
]
}
} as SwitchMessage;
const response = await client.postMessage(message);
console.log(response);
2.0.30
6 months ago
2.0.28
1 year ago
2.0.29
1 year ago
2.0.15
1 year ago
2.0.16
1 year ago
2.0.17
1 year ago
2.0.18
1 year ago
2.0.26
1 year ago
2.0.27
1 year ago
2.0.24
1 year ago
2.0.25
1 year ago
2.0.22
1 year ago
2.0.23
1 year ago
2.0.20
1 year ago
2.0.21
1 year ago
2.0.13
2 years ago
2.0.14
2 years ago
2.0.11
2 years ago
2.0.12
2 years ago
2.0.10
2 years ago
2.0.9
2 years ago
2.0.8
2 years ago
2.0.7
2 years ago
2.0.6
2 years ago
2.0.5
2 years ago
2.0.4
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago