123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- "use strict";
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Business Analytics (C) Copyright IBM Corp. 2019, 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- /**
- * @interface TransactionAPI
- * @hideconstructor
- * @classdesc API class that is used to control transactional behaviour during API usage.
- * @example dashboard.getFeature('Transaction')
- */
- define([], function () {
- var TransactionAPI = function () {
- function TransactionAPI() {
- _classCallCheck(this, TransactionAPI);
- }
- /**
- * @public
- * @function TransactionAPI#startTransaction
- * @description Starts a new API transaction.
- * @param {SetOption} [transactionToken] Parent transaction token
- * @returns {SetOptions} transactionToken
- */
- TransactionAPI.prototype.startTransaction = function startTransaction() {};
- /**
- * @public
- * @deprecated
- * @function TransactionAPI#startTransactionById
- * @description Starts a new API transaction with the given transactionId.
- * Use {@link TransactionAPI#startTransaction} unless a transactionId needs to be reused from a legacy transaction.
- * @param {String} transactionId Unique transaction identifier
- * @returns {SetOptions} transactionToken
- */
- TransactionAPI.prototype.startTransactionById = function startTransactionById() {};
- /**
- * @public
- * @function TransactionAPI#endTransaction
- * @description Ends an existing API transaction.
- * @param {SetOptions} transactionToken
- */
- TransactionAPI.prototype.endTransaction = function endTransaction() {};
- /**
- * @public
- * @function TransactionAPI#getTransactionById
- * @description Returns the transaction token from the specified unique transaction identifier.
- * @returns {SetOptions} transactionToken
- */
- TransactionAPI.prototype.getTransactionById = function getTransactionById() {};
- /**
- * @public
- * @function TransactionAPI#isValidTransaction
- * @description Determines whether the token is a valid transaction.
- * @param {SetOptions} transactionToken Transaction token
- */
- TransactionAPI.prototype.isValidTransaction = function isValidTransaction() {};
- /**
- * @public
- * @function TransactionAPI#registerTransactionHandler
- * @description Registers an transaction handler for the existing API transaction.
- * @param {SetOptions} transactionToken Transaction token
- * @param {string} handlerId Unique handler identifier
- * @param {TransactionHandler} handler Handler to be executed when the transaction is complete
- * @param {Object} args Arguments to be passed to the TransactionHandler
- * @returns {Promise} Returns a promise that is resolved once the handler is executed.
- */
- TransactionAPI.prototype.registerTransactionHandler = function registerTransactionHandler() {};
- /**
- * @public
- * @function TransactionAPI#getCurrentTransactionList
- * @description Returns the list of currently active transaction tokens.
- * @returns {SetOptions[]} Array of all active transaction tokens
- */
- TransactionAPI.prototype.getActiveTransactionList = function getActiveTransactionList() {};
- return TransactionAPI;
- }();
- return TransactionAPI;
- });
- //# sourceMappingURL=TransactionAPI.js.map
|