2.0.30 • Published 3 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
3 months ago
2.0.28
12 months ago
2.0.29
12 months ago
2.0.15
12 months ago
2.0.16
12 months ago
2.0.17
12 months ago
2.0.18
12 months ago
2.0.26
12 months ago
2.0.27
12 months ago
2.0.24
12 months ago
2.0.25
12 months ago
2.0.22
12 months ago
2.0.23
12 months ago
2.0.20
12 months ago
2.0.21
12 months 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