@p7m/queue-backend v0.7.0
@p7m/queue-backend
QueueBackend - JavaScript client for @p7m/queue-backend API for managing phone services
This is the API of the service at P7M that manages phone services.
Attention: this API will probably still change a lot in the future, it's not at all stable yet This SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.7.0
- Package version: 0.7.0
- Generator version: 7.11.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install @p7m/queue-backend --saveFinally, you need to build the module:
npm run buildLocal development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:
npm installNext, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:
npm linkTo use the link you just defined in your project, switch to the directory you want to use your @p7m/queue-backend from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>Finally, you need to build the module:
npm run buildgit
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --saveFor browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.jsThen include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}Getting Started
Please follow the installation instruction and execute the following JS code:
var QueueBackend = require('@p7m/queue-backend');
var defaultClient = QueueBackend.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth
var oauth = defaultClient.authentications['oauth'];
oauth.accessToken = "YOUR ACCESS TOKEN"
var api = new QueueBackend.BlockApi()
var id = "id_example"; // {String} ID of the block
api.deleteBlockById(id).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});Documentation for API Endpoints
All URIs are relative to https://queue.api.p7m.de/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| QueueBackend.BlockApi | deleteBlockById | DELETE /block/{id} | Delete a block by its ID |
| QueueBackend.BlockApi | getBlockById | GET /block/{id} | Get a single block by its ID |
| QueueBackend.BlockApi | getBlocks | GET /block | Get the list of all waiting queue blocks |
| QueueBackend.BlockApi | postBlock | POST /block | Create a new block for a waiting queue |
| QueueBackend.BlockApi | putBlockById | PUT /block/{id} | Update an existing block |
| QueueBackend.CallApi | getCallAlarm | GET /call/alarm | Get the list of all alarm calls |
| QueueBackend.CallApi | getCallAlarmByCalleeE164Unsecure | GET /call/alarm/by-callee/{e164} | Get the alarm calls for a given telephone number |
| QueueBackend.CallApi | postCallAlarm | POST /call/alarm | Create a new alarm call |
| QueueBackend.CallApi | postCallCode | POST /call/code | RPC to trigger an outgoing call to send a PIN code to a user |
| QueueBackend.CallApi | putCallAlarmId | PUT /call/alarm/{id} | Update the state of an existing alarm call |
| QueueBackend.InternalApi | checkPendingBlocks | GET /block/check_pending | Internal call: check for blocks that are pending and have to be started/stopped |
| QueueBackend.NumberConfigurationApi | deleteNumberConfigurationsNumberConfigurationId | DELETE /numberconfigurations/{ncid} | Delete a number configuration |
| QueueBackend.NumberConfigurationApi | getNumberConfigurationsNumberConfigurationId | GET /numberconfigurations/{ncid} | Get a single number configuration |
| QueueBackend.NumberConfigurationApi | getNumberConfigurationsNumberSuperadmin | GET /numberconfigurations/{phone_number} | Get a number configuration for a given phone number |
| QueueBackend.NumberConfigurationApi | getNumberConfigurationsSuperadmin | GET /numberconfigurations | Get the list of all number configurations |
| QueueBackend.NumberConfigurationApi | postNumberConfigurations | POST /numberconfigurations | Create a new number configuration |
| QueueBackend.QueueApi | deleteQueueOpeningsId | DELETE /queues/{qid}/openings/{qoid} | Delete a queue opening interval by its ID |
| QueueBackend.QueueApi | deleteQueueQueueIdCallersQueueCallerId | DELETE /queues/{qid}/callers/{qcid} | Remove a caller from a queue |
| QueueBackend.QueueApi | deleteQueuesQueueIdDestinationsQueueNumberId | DELETE /queues/{qid}/destinations/{qdid} | Delete a destination from a queue |
| QueueBackend.QueueApi | deleteQueuesQueueIdNumbersQueueNumberId | DELETE /queues/{qid}/numbers/{qnid} | Delete a number from a queue |
| QueueBackend.QueueApi | getQueueOpening | GET /queues/{qid}/openings | Get the list of intervals where the waiting queue is opened |
| QueueBackend.QueueApi | getQueueOpeningsId | GET /queues/{qid}/openings/{qoid} | Get an opening interval by its ID |
| QueueBackend.QueueApi | getQueueQueueIdCallers | GET /queues/{qid}/callers | Get the list of callers in a waiting queue |
| QueueBackend.QueueApi | getQueues | GET /queues | Get the list of all waiting queues |
| QueueBackend.QueueApi | getQueuesByNumberPhoneNumber | GET /queues/bynumber/{phone_number} | Find a queue by its number |
| QueueBackend.QueueApi | getQueuesQueueId | GET /queues/{qid} | Get a single queue by its ID |
| QueueBackend.QueueApi | getQueuesQueueIdCallersQueueCallerId | GET /queues/{qid}/callers/{qcid} | Get an invidivual caller in a queue |
| QueueBackend.QueueApi | getQueuesQueueIdDestinationsQueueDestinationId | GET /queues/{qid}/destinations/{qdid} | Get a single queue destination |
| QueueBackend.QueueApi | getQueuesQueueIdQueueNumberId | GET /queues/{qid}/numbers/{qnid} | Get a single queue number |
| QueueBackend.QueueApi | postQueueOpenings | POST /queues/{qid}/openings | Create a new queue opening interval |
| QueueBackend.QueueApi | postQueuesQueueIdCallers | POST /queues/{qid}/callers | Add a caller to a waiting queue |
| QueueBackend.QueueApi | postQueuesQueueIdDestinations | POST /queues/{qid}/destinations | Add a destination to a queue |
| QueueBackend.QueueApi | postQueuesQueueIdNumber | POST /queues/{qid}/numbers | Add a number to a queue |
| QueueBackend.QueueApi | putQueueOpeningsId | PUT /queues/{qid}/openings/{qoid} | Update an existing queue opening interval |
| QueueBackend.QueueApi | putQueueQueueIdCallersQueueCallerId | PUT /queues/{qid}/callers/{qcid} | Update or just keep-alive for a queue caller |
| QueueBackend.QueueApi | putQueuesQueueIdDestinationsQueueDestinationId | PUT /queues/{qid}/destinations/{qdid} | Update a destination configuration of a queue |
| QueueBackend.QueueApi | putQueuesQueueIdNumbersQueueNumberId | PUT /queues/{qid}/numbers/{qnid} | Update a number configuration of a queue |
| QueueBackend.QueueApi | queue | GET /queue | Get the list of all waiting queues |
| QueueBackend.StatusApi | status | GET /status/{queue} | Get the current calls present in a queue |
Documentation for Models
- QueueBackend.AlarmCall
- QueueBackend.AlarmCallState
- QueueBackend.AlarmCallUpdate
- QueueBackend.Block
- QueueBackend.CallState
- QueueBackend.CodeCallRequest
- QueueBackend.CodeCallResult
- QueueBackend.LegacyQueue
- QueueBackend.ListWrapperAlarmCall
- QueueBackend.ListWrapperAlarmCallDataInner
- QueueBackend.ListWrapperNumberConfiguration
- QueueBackend.ListWrapperNumberConfigurationDataInner
- QueueBackend.ListWrapperQueueCaller
- QueueBackend.ListWrapperQueueCallerDataInner
- QueueBackend.ListWrapperQueueOpening
- QueueBackend.ListWrapperQueueOpeningDataInner
- QueueBackend.NewAlarmCall
- QueueBackend.NewBlock
- QueueBackend.NewNumberConfiguration
- QueueBackend.NewQueueCaller
- QueueBackend.NewQueueDestination
- QueueBackend.NewQueueNumber
- QueueBackend.NewQueueOpening
- QueueBackend.NumberConfiguration
- QueueBackend.Queue
- QueueBackend.QueueCall
- QueueBackend.QueueCaller
- QueueBackend.QueueCallerUpdate
- QueueBackend.QueueDestination
- QueueBackend.QueueNumber
- QueueBackend.QueueOpening
- QueueBackend.QueuePrio
- QueueBackend.WeekdayHoliday
Documentation for Authorization
Authentication schemes defined for the API:
oauth
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://login.p7m.de/auth/authorize
- Scopes: N/A