@creator.co/wapi 1.3.1 → 1.3.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export type StringMap = {
|
|
|
36
36
|
* @template ResponseInnerType - The type of the inner response data for the transaction.
|
|
37
37
|
* @template MiscRespType - The type of miscellaneous response data for the transaction.
|
|
38
38
|
*/
|
|
39
|
-
export default class Transaction<InputType = object, ResponseInnerType = null, MiscRespType = null,
|
|
39
|
+
export default class Transaction<InputType = object, ResponseInnerType = null, MiscRespType = null, PathParamsType = StringMap, QueryParamsType = StringMap> {
|
|
40
40
|
/**
|
|
41
41
|
* The instance of the DatabaseManager class used for managing the database.
|
|
42
42
|
*/
|
|
@@ -105,7 +105,7 @@ export default class Transaction<InputType = object, ResponseInnerType = null, M
|
|
|
105
105
|
* @param {TransactionExecution<Transaction<InputType, ResponseInnerType, MiscRespType>, ResponseInnerType, MiscRespType>} executionFunc - The execution function to be executed.
|
|
106
106
|
* @returns {Promise<Response<ResponseInnerType | ResponseErrorType> | MiscRespType>} - A promise that resolves to the response or miscellaneous response.
|
|
107
107
|
*/
|
|
108
|
-
execute(executionFunc: TransactionExecution<Transaction<InputType, ResponseInnerType, MiscRespType,
|
|
108
|
+
execute(executionFunc: TransactionExecution<Transaction<InputType, ResponseInnerType, MiscRespType, PathParamsType, QueryParamsType>, ResponseInnerType, MiscRespType>): Promise<Response<ResponseInnerType | ResponseErrorType> | MiscRespType | null>;
|
|
109
109
|
/**
|
|
110
110
|
* Executes a transaction using the provided execution function and handles the response.
|
|
111
111
|
* @param {TransactionExecution<Transaction<InputType, ResponseInnerType, MiscRespType>, ResponseInnerType, MiscRespType>} executionFunc - The function to execute the transaction.
|
package/package.json
CHANGED
|
@@ -49,8 +49,8 @@ export default class Transaction<
|
|
|
49
49
|
InputType = object,
|
|
50
50
|
ResponseInnerType = null,
|
|
51
51
|
MiscRespType = null,
|
|
52
|
-
QueryParamsType = StringMap,
|
|
53
52
|
PathParamsType = StringMap,
|
|
53
|
+
QueryParamsType = StringMap,
|
|
54
54
|
> {
|
|
55
55
|
/**
|
|
56
56
|
* The instance of the DatabaseManager class used for managing the database.
|
|
@@ -147,7 +147,7 @@ export default class Transaction<
|
|
|
147
147
|
*/
|
|
148
148
|
public async execute(
|
|
149
149
|
executionFunc: TransactionExecution<
|
|
150
|
-
Transaction<InputType, ResponseInnerType, MiscRespType,
|
|
150
|
+
Transaction<InputType, ResponseInnerType, MiscRespType, PathParamsType, QueryParamsType>,
|
|
151
151
|
ResponseInnerType,
|
|
152
152
|
MiscRespType
|
|
153
153
|
>
|
|
@@ -170,7 +170,7 @@ export default class Transaction<
|
|
|
170
170
|
*/
|
|
171
171
|
private async iexecute(
|
|
172
172
|
executionFunc: TransactionExecution<
|
|
173
|
-
Transaction<InputType, ResponseInnerType, MiscRespType,
|
|
173
|
+
Transaction<InputType, ResponseInnerType, MiscRespType, PathParamsType, QueryParamsType>,
|
|
174
174
|
ResponseInnerType,
|
|
175
175
|
MiscRespType
|
|
176
176
|
>
|