-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Madhusudhan Reddy Vuppala
committed
Aug 4, 2023
1 parent
a4cd443
commit 6be3f4d
Showing
21 changed files
with
211 additions
and
244 deletions.
There are no files selected for viewing
18 changes: 7 additions & 11 deletions
18
examples/freeTrialNumbers-create.ts → examples/freeTrialNumbers-create.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
import { FreeTrialNumbers } from '../dist/index.js'; | ||
import { TFreeTrialNumbers } from '../dist/messaging/types/FreeTrialNumberTypes.js'; | ||
|
||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_js_1 = require("../dist/index.js"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const trialNumber = new TrialNumbers(AUTH_CONFIG); | ||
|
||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
const freeTrialNumbers = new FreeTrialNumbers(); | ||
|
||
var freeTrialNumbers = new index_js_1.FreeTrialNumbers(); | ||
/** | ||
* FreeTrial Numbers - Create | ||
*/ | ||
|
||
const params: TFreeTrialNumbers = { | ||
var params = { | ||
freeTrialNumbers: [ | ||
"0412345678" | ||
] | ||
}; | ||
|
||
freeTrialNumbers.create(params) | ||
.then(result => { | ||
.then(function (result) { | ||
console.log('SUCCESS:freeTrialNumbers:create:', result); | ||
}) | ||
.catch(error => { | ||
.catch(function (error) { | ||
console.error('ERROR:freeTrialNumber:create:', error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_js_1 = require("../dist/index.js"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const trialNumber = new TrialNumbers(AUTH_CONFIG); | ||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
var freeTrialNumbers = new index_js_1.FreeTrialNumbers(); | ||
/** | ||
* FreeTrial Numbers - Fetch all numbers associated to the account | ||
*/ | ||
freeTrialNumbers.getAll() | ||
.then(function (result) { return console.log('SUCCESS:freeTrialNumbers:getAll:', result); }) | ||
.catch(function (error) { return console.error('ERROR:freeTrialNumber:getAll:', error); }); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { HealthCheck } from '../dist/index.js' | ||
|
||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_js_1 = require("../dist/index.js"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const healthCheck = new HealthCheck(AUTH_CONFIG); | ||
|
||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
const healthCheck = new HealthCheck(); | ||
|
||
var healthCheck = new index_js_1.HealthCheck(); | ||
healthCheck.get() | ||
.then(result => { | ||
.then(function (result) { | ||
console.log('SUCCESS:healthCheck:', result); | ||
}) | ||
.catch(error => { | ||
.catch(function (error) { | ||
console.error('ERROR:healthCheck:', error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var dist_1 = require("../dist"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const message = new Message(AUTH_CONFIG); | ||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
var messages = new dist_1.Messages(); | ||
/** | ||
* Messages - Fetch all | ||
*/ | ||
messages.getAll() | ||
.then(function (result) { return console.log('SUCCESS:messages:getAll:', result); }) | ||
.catch(function (error) { return console.error('ERROR:messages:getAll:', error); }); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_js_1 = require("../dist/index.js"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const message = new Message(AUTH_CONFIG); | ||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
var message = new index_js_1.Messages(); | ||
message.send({ | ||
to: '+61123456789', | ||
from: 'private', | ||
messageContent: 'Hello from Messaging SDK!' | ||
}) | ||
.then(function (result) { | ||
console.log('SUCCESS:messages:send:sms:', result); | ||
var messageId = Array.isArray(result.messageId) ? result.messageId[0] : result.messageId; | ||
/** Get a Message */ | ||
message.get(messageId) | ||
.then(function (getMsgResult) { return console.log('SUCCESS:messages:get:', getMsgResult); }) | ||
.catch(function (getMsgError) { return console.error('ERROR:messages:get:', getMsgError); }); | ||
}) | ||
.catch(function (error) { | ||
console.error('ERROR:messages:send:sms:', error); | ||
}); |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_js_1 = require("../dist/index.js"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const reports = new Reports(AUTH_CONFIG); | ||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
var reports = new index_js_1.Reports(); | ||
var startDate = new Date(); | ||
var endDate = new Date(startDate); | ||
endDate.setDate(startDate.getDate() - 10); | ||
var startDateStr = "".concat(startDate.toLocaleDateString('fr-CA')); | ||
var endDateStr = "".concat(endDate.toLocaleDateString('fr-CA')); | ||
/** | ||
* Reports - Create - Daily Summary Report | ||
*/ | ||
var params = { | ||
startDate: startDateStr, | ||
endDate: endDateStr | ||
}; | ||
reports.createDailySummary(params) | ||
.then(function (result) { return console.log('SUCCESS:reports:create-daily:', result); }) | ||
.catch(function (error) { return console.error('ERROR:reports:create-daily:', error); }); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_js_1 = require("../dist/index.js"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const reports = new Reports(AUTH_CONFIG); | ||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
var reports = new index_js_1.Reports(); | ||
var startDate = new Date(); | ||
var endDate = new Date(startDate); | ||
endDate.setDate(startDate.getDate() - 10); | ||
var startDateStr = "".concat(startDate.toLocaleDateString('fr-CA')); | ||
var endDateStr = "".concat(endDate.toLocaleDateString('fr-CA')); | ||
/** | ||
* Reports - Create - Messages Report | ||
*/ | ||
var params = { | ||
startDate: startDateStr, | ||
endDate: endDateStr | ||
}; | ||
reports.create(params) | ||
.then(function (result) { return console.log('SUCCESS:reports:create:', result); }) | ||
.catch(function (error) { return console.error('ERROR:reports:create:', error); }); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var dist_1 = require("../dist"); | ||
// Auth using JSON file import | ||
// var AUTH_CONFIG = require('./credentials.json'); | ||
// const reports = new Reports(AUTH_CONFIG); | ||
// Auth via ENV VARS or SHARED CREDENTIALS | ||
var reports = new dist_1.Reports(); | ||
/** | ||
* Reports - Fetch all reports | ||
*/ | ||
reports.getAll() | ||
.then(function (result) { return console.log('SUCCESS:reports:getAll:', result); }) | ||
.catch(function (error) { return console.error('ERROR:reports:getAll:', error); }); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.