@gr4vy/sdk 1.1.7 → 1.1.9
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/README.md +2 -0
- package/docs/sdks/transactions/README.md +94 -0
- package/funcs/transactionsUpdate.d.ts +18 -0
- package/funcs/transactionsUpdate.d.ts.map +1 -0
- package/funcs/transactionsUpdate.js +136 -0
- package/funcs/transactionsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/transactionevent.d.ts +1 -0
- package/models/components/transactionevent.d.ts.map +1 -1
- package/models/components/transactionevent.js +1 -0
- package/models/components/transactionevent.js.map +1 -1
- package/models/components/transactionupdate.d.ts +54 -0
- package/models/components/transactionupdate.d.ts.map +1 -0
- package/models/components/transactionupdate.js +74 -0
- package/models/components/transactionupdate.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/updatetransaction.d.ts +65 -0
- package/models/operations/updatetransaction.d.ts.map +1 -0
- package/models/operations/updatetransaction.js +102 -0
- package/models/operations/updatetransaction.js.map +1 -0
- package/package.json +1 -1
- package/sdk/transactions.d.ts +7 -0
- package/sdk/transactions.d.ts.map +1 -1
- package/sdk/transactions.js +10 -0
- package/sdk/transactions.js.map +1 -1
- package/src/funcs/transactionsUpdate.ts +253 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +1 -0
- package/src/models/components/transactionevent.ts +1 -0
- package/src/models/components/transactionupdate.ts +94 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/updatetransaction.ts +150 -0
- package/src/sdk/transactions.ts +22 -0
|
@@ -104,6 +104,7 @@ __exportStar(require("./updatedigitalwallet.js"), exports);
|
|
|
104
104
|
__exportStar(require("./updatemerchantaccount.js"), exports);
|
|
105
105
|
__exportStar(require("./updatepaymentservice.js"), exports);
|
|
106
106
|
__exportStar(require("./updatereport.js"), exports);
|
|
107
|
+
__exportStar(require("./updatetransaction.js"), exports);
|
|
107
108
|
__exportStar(require("./verifypaymentservicecredentials.js"), exports);
|
|
108
109
|
__exportStar(require("./voidtransaction.js"), exports);
|
|
109
110
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/operations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,+DAA6C;AAC7C,sDAAoC;AACpC,iDAA+B;AAC/B,0DAAwC;AACxC,8DAA4C;AAC5C,+DAA6C;AAC7C,0EAAwD;AACxD,6DAA2C;AAC3C,mEAAiD;AACjD,sDAAoC;AACpC,2EAAyD;AACzD,2DAAyC;AACzC,uEAAqD;AACrD,iFAA+D;AAC/D,8EAA4D;AAC5D,4DAA0C;AAC1C,6EAA2D;AAC3D,mEAAiD;AACjD,oDAAkC;AAClC,gEAA8C;AAC9C,yDAAuC;AACvC,+DAA6C;AAC7C,mDAAiC;AACjC,kEAAgD;AAChD,6DAA2C;AAC3C,2DAAyC;AACzC,sDAAoC;AACpC,2DAAyC;AACzC,uEAAqD;AACrD,8EAA4D;AAC5D,4DAA0C;AAC1C,yDAAuC;AACvC,gDAA8B;AAC9B,+DAA6C;AAC7C,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,0DAAwC;AACxC,sDAAoC;AACpC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,0DAAwC;AACxC,sDAAoC;AACpC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,qDAAmC;AACnC,0DAAwC;AACxC,+DAA6C;AAC7C,kDAAgC;AAChC,gEAA8C;AAC9C,iEAA+C;AAC/C,0DAAwC;AACxC,4DAA0C;AAC1C,qDAAmC;AACnC,4DAA0C;AAC1C,wDAAsC;AACtC,sEAAoD;AACpD,6EAA2D;AAC3D,0DAAwC;AACxC,0DAAwC;AACxC,qEAAmD;AACnD,2DAAyC;AACzC,mDAAiC;AACjC,4DAA0C;AAC1C,mDAAiC;AACjC,6DAA2C;AAC3C,8DAA4C;AAC5C,wDAAsC;AACtC,kEAAgD;AAChD,mEAAiD;AACjD,uEAAqD;AACrD,wEAAsD;AACtD,uDAAqC;AACrC,qEAAmD;AACnD,mDAAiC;AACjC,kEAAgD;AAChD,6DAA2C;AAC3C,2DAAyC;AACzC,6DAA2C;AAC3C,4DAA0C;AAC1C,oDAAkC;AAClC,uEAAqD;AACrD,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/operations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,+DAA6C;AAC7C,sDAAoC;AACpC,iDAA+B;AAC/B,0DAAwC;AACxC,8DAA4C;AAC5C,+DAA6C;AAC7C,0EAAwD;AACxD,6DAA2C;AAC3C,mEAAiD;AACjD,sDAAoC;AACpC,2EAAyD;AACzD,2DAAyC;AACzC,uEAAqD;AACrD,iFAA+D;AAC/D,8EAA4D;AAC5D,4DAA0C;AAC1C,6EAA2D;AAC3D,mEAAiD;AACjD,oDAAkC;AAClC,gEAA8C;AAC9C,yDAAuC;AACvC,+DAA6C;AAC7C,mDAAiC;AACjC,kEAAgD;AAChD,6DAA2C;AAC3C,2DAAyC;AACzC,sDAAoC;AACpC,2DAAyC;AACzC,uEAAqD;AACrD,8EAA4D;AAC5D,4DAA0C;AAC1C,yDAAuC;AACvC,gDAA8B;AAC9B,+DAA6C;AAC7C,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,0DAAwC;AACxC,sDAAoC;AACpC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,iDAA+B;AAC/B,iDAA+B;AAC/B,iDAA+B;AAC/B,0DAAwC;AACxC,sDAAoC;AACpC,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C;AAC7C,qDAAmC;AACnC,0DAAwC;AACxC,+DAA6C;AAC7C,kDAAgC;AAChC,gEAA8C;AAC9C,iEAA+C;AAC/C,0DAAwC;AACxC,4DAA0C;AAC1C,qDAAmC;AACnC,4DAA0C;AAC1C,wDAAsC;AACtC,sEAAoD;AACpD,6EAA2D;AAC3D,0DAAwC;AACxC,0DAAwC;AACxC,qEAAmD;AACnD,2DAAyC;AACzC,mDAAiC;AACjC,4DAA0C;AAC1C,mDAAiC;AACjC,6DAA2C;AAC3C,8DAA4C;AAC5C,wDAAsC;AACtC,kEAAgD;AAChD,mEAAiD;AACjD,uEAAqD;AACrD,wEAAsD;AACtD,uDAAqC;AACrC,qEAAmD;AACnD,mDAAiC;AACjC,kEAAgD;AAChD,6DAA2C;AAC3C,2DAAyC;AACzC,6DAA2C;AAC3C,4DAA0C;AAC1C,oDAAkC;AAClC,yDAAuC;AACvC,uEAAqD;AACrD,uDAAqC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import * as components from "../components/index.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
export type UpdateTransactionGlobals = {
|
|
6
|
+
merchantAccountId?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type UpdateTransactionRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The ID of the transaction
|
|
11
|
+
*/
|
|
12
|
+
transactionId: string;
|
|
13
|
+
/**
|
|
14
|
+
* The ID of the merchant account to use for this request.
|
|
15
|
+
*/
|
|
16
|
+
merchantAccountId?: string | null | undefined;
|
|
17
|
+
transactionUpdate: components.TransactionUpdate;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const UpdateTransactionGlobals$inboundSchema: z.ZodType<UpdateTransactionGlobals, z.ZodTypeDef, unknown>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type UpdateTransactionGlobals$Outbound = {
|
|
23
|
+
merchantAccountId?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const UpdateTransactionGlobals$outboundSchema: z.ZodType<UpdateTransactionGlobals$Outbound, z.ZodTypeDef, UpdateTransactionGlobals>;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
30
|
+
*/
|
|
31
|
+
export declare namespace UpdateTransactionGlobals$ {
|
|
32
|
+
/** @deprecated use `UpdateTransactionGlobals$inboundSchema` instead. */
|
|
33
|
+
const inboundSchema: z.ZodType<UpdateTransactionGlobals, z.ZodTypeDef, unknown>;
|
|
34
|
+
/** @deprecated use `UpdateTransactionGlobals$outboundSchema` instead. */
|
|
35
|
+
const outboundSchema: z.ZodType<UpdateTransactionGlobals$Outbound, z.ZodTypeDef, UpdateTransactionGlobals>;
|
|
36
|
+
/** @deprecated use `UpdateTransactionGlobals$Outbound` instead. */
|
|
37
|
+
type Outbound = UpdateTransactionGlobals$Outbound;
|
|
38
|
+
}
|
|
39
|
+
export declare function updateTransactionGlobalsToJSON(updateTransactionGlobals: UpdateTransactionGlobals): string;
|
|
40
|
+
export declare function updateTransactionGlobalsFromJSON(jsonString: string): SafeParseResult<UpdateTransactionGlobals, SDKValidationError>;
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const UpdateTransactionRequest$inboundSchema: z.ZodType<UpdateTransactionRequest, z.ZodTypeDef, unknown>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type UpdateTransactionRequest$Outbound = {
|
|
45
|
+
transaction_id: string;
|
|
46
|
+
merchantAccountId?: string | null | undefined;
|
|
47
|
+
TransactionUpdate: components.TransactionUpdate$Outbound;
|
|
48
|
+
};
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const UpdateTransactionRequest$outboundSchema: z.ZodType<UpdateTransactionRequest$Outbound, z.ZodTypeDef, UpdateTransactionRequest>;
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export declare namespace UpdateTransactionRequest$ {
|
|
56
|
+
/** @deprecated use `UpdateTransactionRequest$inboundSchema` instead. */
|
|
57
|
+
const inboundSchema: z.ZodType<UpdateTransactionRequest, z.ZodTypeDef, unknown>;
|
|
58
|
+
/** @deprecated use `UpdateTransactionRequest$outboundSchema` instead. */
|
|
59
|
+
const outboundSchema: z.ZodType<UpdateTransactionRequest$Outbound, z.ZodTypeDef, UpdateTransactionRequest>;
|
|
60
|
+
/** @deprecated use `UpdateTransactionRequest$Outbound` instead. */
|
|
61
|
+
type Outbound = UpdateTransactionRequest$Outbound;
|
|
62
|
+
}
|
|
63
|
+
export declare function updateTransactionRequestToJSON(updateTransactionRequest: UpdateTransactionRequest): string;
|
|
64
|
+
export declare function updateTransactionRequestFromJSON(jsonString: string): SafeParseResult<UpdateTransactionRequest, SDKValidationError>;
|
|
65
|
+
//# sourceMappingURL=updatetransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updatetransaction.d.ts","sourceRoot":"","sources":["../../src/models/operations/updatetransaction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SA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,CAAC;IAC9C,iBAAiB,EAAE,UAAU,CAAC,0BAA0B,CAAC;CAC1D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAUxB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,yBAAyB,CAAC;IACzC,wEAAwE;IACjE,MAAM,aAAa,4DAAyC,CAAC;IACpE,yEAAyE;IAClE,MAAM,cAAc,sFAA0C,CAAC;IACtE,mEAAmE;IACnE,KAAY,QAAQ,GAAG,iCAAiC,CAAC;CAC1D;AAED,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR;AAED,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.UpdateTransactionRequest$ = exports.UpdateTransactionRequest$outboundSchema = exports.UpdateTransactionRequest$inboundSchema = exports.UpdateTransactionGlobals$ = exports.UpdateTransactionGlobals$outboundSchema = exports.UpdateTransactionGlobals$inboundSchema = void 0;
|
|
30
|
+
exports.updateTransactionGlobalsToJSON = updateTransactionGlobalsToJSON;
|
|
31
|
+
exports.updateTransactionGlobalsFromJSON = updateTransactionGlobalsFromJSON;
|
|
32
|
+
exports.updateTransactionRequestToJSON = updateTransactionRequestToJSON;
|
|
33
|
+
exports.updateTransactionRequestFromJSON = updateTransactionRequestFromJSON;
|
|
34
|
+
const z = __importStar(require("zod"));
|
|
35
|
+
const primitives_js_1 = require("../../lib/primitives.js");
|
|
36
|
+
const schemas_js_1 = require("../../lib/schemas.js");
|
|
37
|
+
const components = __importStar(require("../components/index.js"));
|
|
38
|
+
/** @internal */
|
|
39
|
+
exports.UpdateTransactionGlobals$inboundSchema = z.object({
|
|
40
|
+
merchantAccountId: z.string().optional(),
|
|
41
|
+
});
|
|
42
|
+
/** @internal */
|
|
43
|
+
exports.UpdateTransactionGlobals$outboundSchema = z.object({
|
|
44
|
+
merchantAccountId: z.string().optional(),
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
var UpdateTransactionGlobals$;
|
|
51
|
+
(function (UpdateTransactionGlobals$) {
|
|
52
|
+
/** @deprecated use `UpdateTransactionGlobals$inboundSchema` instead. */
|
|
53
|
+
UpdateTransactionGlobals$.inboundSchema = exports.UpdateTransactionGlobals$inboundSchema;
|
|
54
|
+
/** @deprecated use `UpdateTransactionGlobals$outboundSchema` instead. */
|
|
55
|
+
UpdateTransactionGlobals$.outboundSchema = exports.UpdateTransactionGlobals$outboundSchema;
|
|
56
|
+
})(UpdateTransactionGlobals$ || (exports.UpdateTransactionGlobals$ = UpdateTransactionGlobals$ = {}));
|
|
57
|
+
function updateTransactionGlobalsToJSON(updateTransactionGlobals) {
|
|
58
|
+
return JSON.stringify(exports.UpdateTransactionGlobals$outboundSchema.parse(updateTransactionGlobals));
|
|
59
|
+
}
|
|
60
|
+
function updateTransactionGlobalsFromJSON(jsonString) {
|
|
61
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateTransactionGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateTransactionGlobals' from JSON`);
|
|
62
|
+
}
|
|
63
|
+
/** @internal */
|
|
64
|
+
exports.UpdateTransactionRequest$inboundSchema = z.object({
|
|
65
|
+
transaction_id: z.string(),
|
|
66
|
+
merchantAccountId: z.nullable(z.string()).optional(),
|
|
67
|
+
TransactionUpdate: components.TransactionUpdate$inboundSchema,
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return (0, primitives_js_1.remap)(v, {
|
|
70
|
+
"transaction_id": "transactionId",
|
|
71
|
+
"TransactionUpdate": "transactionUpdate",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
/** @internal */
|
|
75
|
+
exports.UpdateTransactionRequest$outboundSchema = z.object({
|
|
76
|
+
transactionId: z.string(),
|
|
77
|
+
merchantAccountId: z.nullable(z.string()).optional(),
|
|
78
|
+
transactionUpdate: components.TransactionUpdate$outboundSchema,
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return (0, primitives_js_1.remap)(v, {
|
|
81
|
+
transactionId: "transaction_id",
|
|
82
|
+
transactionUpdate: "TransactionUpdate",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
+
*/
|
|
89
|
+
var UpdateTransactionRequest$;
|
|
90
|
+
(function (UpdateTransactionRequest$) {
|
|
91
|
+
/** @deprecated use `UpdateTransactionRequest$inboundSchema` instead. */
|
|
92
|
+
UpdateTransactionRequest$.inboundSchema = exports.UpdateTransactionRequest$inboundSchema;
|
|
93
|
+
/** @deprecated use `UpdateTransactionRequest$outboundSchema` instead. */
|
|
94
|
+
UpdateTransactionRequest$.outboundSchema = exports.UpdateTransactionRequest$outboundSchema;
|
|
95
|
+
})(UpdateTransactionRequest$ || (exports.UpdateTransactionRequest$ = UpdateTransactionRequest$ = {}));
|
|
96
|
+
function updateTransactionRequestToJSON(updateTransactionRequest) {
|
|
97
|
+
return JSON.stringify(exports.UpdateTransactionRequest$outboundSchema.parse(updateTransactionRequest));
|
|
98
|
+
}
|
|
99
|
+
function updateTransactionRequestFromJSON(jsonString) {
|
|
100
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateTransactionRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateTransactionRequest' from JSON`);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=updatetransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updatetransaction.js","sourceRoot":"","sources":["../../src/models/operations/updatetransaction.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DH,wEAMC;AAED,4EAQC;AAsDD,wEAMC;AAED,4EAQC;AAjJD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAmBrD,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,iBAAiB,EAAE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,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,iBAAiB,EAAE,UAAU,CAAC,gCAAgC;CAC/D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,aAAa,EAAE,gBAAgB;QAC/B,iBAAiB,EAAE,mBAAmB;KACvC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC,wEAAwE;IAC3D,uCAAa,GAAG,8CAAsC,CAAC;IACpE,yEAAyE;IAC5D,wCAAc,GAAG,+CAAuC,CAAC;AAGxE,CAAC,EAPgB,yBAAyB,yCAAzB,yBAAyB,QAOzC;AAED,SAAgB,8BAA8B,CAC5C,wBAAkD;IAElD,OAAO,IAAI,CAAC,SAAS,CACnB,+CAAuC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACxE,CAAC;AACJ,CAAC;AAED,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/sdk/transactions.d.ts
CHANGED
|
@@ -35,6 +35,13 @@ export declare class Transactions extends ClientSDK {
|
|
|
35
35
|
* Retrieve the details of a transaction by its unique identifier.
|
|
36
36
|
*/
|
|
37
37
|
get(transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.Transaction>;
|
|
38
|
+
/**
|
|
39
|
+
* Manually update a transaction
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Manually updates a transaction.
|
|
43
|
+
*/
|
|
44
|
+
update(transactionUpdate: components.TransactionUpdate, transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.Transaction>;
|
|
38
45
|
/**
|
|
39
46
|
* Capture transaction
|
|
40
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/sdk/transactions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/sdk/transactions.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,IAAI,OAAO,IAAI,YAAY,CAE1B;IAED,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED;;;;;OAKG;IACG,IAAI,CACR,OAAO,CAAC,EAAE,UAAU,CAAC,uBAAuB,GAAG,SAAS,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,YAAY,CAAC,UAAU,CAAC,wBAAwB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CACt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,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;CAQnC"}
|
package/sdk/transactions.js
CHANGED
|
@@ -9,6 +9,7 @@ const transactionsCreate_js_1 = require("../funcs/transactionsCreate.js");
|
|
|
9
9
|
const transactionsGet_js_1 = require("../funcs/transactionsGet.js");
|
|
10
10
|
const transactionsList_js_1 = require("../funcs/transactionsList.js");
|
|
11
11
|
const transactionsSync_js_1 = require("../funcs/transactionsSync.js");
|
|
12
|
+
const transactionsUpdate_js_1 = require("../funcs/transactionsUpdate.js");
|
|
12
13
|
const transactionsVoid_js_1 = require("../funcs/transactionsVoid.js");
|
|
13
14
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
14
15
|
const fp_js_1 = require("../types/fp.js");
|
|
@@ -53,6 +54,15 @@ class Transactions extends sdks_js_1.ClientSDK {
|
|
|
53
54
|
async get(transactionId, merchantAccountId, options) {
|
|
54
55
|
return (0, fp_js_1.unwrapAsync)((0, transactionsGet_js_1.transactionsGet)(this, transactionId, merchantAccountId, options));
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Manually update a transaction
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Manually updates a transaction.
|
|
62
|
+
*/
|
|
63
|
+
async update(transactionUpdate, transactionId, merchantAccountId, options) {
|
|
64
|
+
return (0, fp_js_1.unwrapAsync)((0, transactionsUpdate_js_1.transactionsUpdate)(this, transactionUpdate, transactionId, merchantAccountId, options));
|
|
65
|
+
}
|
|
56
66
|
/**
|
|
57
67
|
* Capture transaction
|
|
58
68
|
*
|
package/sdk/transactions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/sdk/transactions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,0EAAoE;AACpE,oEAA8D;AAC9D,sEAAgE;AAChE,sEAAgE;AAChE,sEAAgE;AAChE,4CAA2D;AAG3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R,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,aAAqB,EACrB,iBAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,aAAqB,EACrB,iBAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA5JD,oCA4JC"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Gr4vyCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import { Gr4vyError } from "../models/errors/gr4vyerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Manually update a transaction
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Manually updates a transaction.
|
|
34
|
+
*/
|
|
35
|
+
export function transactionsUpdate(
|
|
36
|
+
client: Gr4vyCore,
|
|
37
|
+
transactionUpdate: components.TransactionUpdate,
|
|
38
|
+
transactionId: string,
|
|
39
|
+
merchantAccountId?: string | null | undefined,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
components.Transaction,
|
|
44
|
+
| errors.Error400
|
|
45
|
+
| errors.Error401
|
|
46
|
+
| errors.Error403
|
|
47
|
+
| errors.Error404
|
|
48
|
+
| errors.Error405
|
|
49
|
+
| errors.Error409
|
|
50
|
+
| errors.HTTPValidationError
|
|
51
|
+
| errors.Error425
|
|
52
|
+
| errors.Error429
|
|
53
|
+
| errors.Error500
|
|
54
|
+
| errors.Error502
|
|
55
|
+
| errors.Error504
|
|
56
|
+
| Gr4vyError
|
|
57
|
+
| ResponseValidationError
|
|
58
|
+
| ConnectionError
|
|
59
|
+
| RequestAbortedError
|
|
60
|
+
| RequestTimeoutError
|
|
61
|
+
| InvalidRequestError
|
|
62
|
+
| UnexpectedClientError
|
|
63
|
+
| SDKValidationError
|
|
64
|
+
>
|
|
65
|
+
> {
|
|
66
|
+
return new APIPromise($do(
|
|
67
|
+
client,
|
|
68
|
+
transactionUpdate,
|
|
69
|
+
transactionId,
|
|
70
|
+
merchantAccountId,
|
|
71
|
+
options,
|
|
72
|
+
));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function $do(
|
|
76
|
+
client: Gr4vyCore,
|
|
77
|
+
transactionUpdate: components.TransactionUpdate,
|
|
78
|
+
transactionId: string,
|
|
79
|
+
merchantAccountId?: string | null | undefined,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): Promise<
|
|
82
|
+
[
|
|
83
|
+
Result<
|
|
84
|
+
components.Transaction,
|
|
85
|
+
| errors.Error400
|
|
86
|
+
| errors.Error401
|
|
87
|
+
| errors.Error403
|
|
88
|
+
| errors.Error404
|
|
89
|
+
| errors.Error405
|
|
90
|
+
| errors.Error409
|
|
91
|
+
| errors.HTTPValidationError
|
|
92
|
+
| errors.Error425
|
|
93
|
+
| errors.Error429
|
|
94
|
+
| errors.Error500
|
|
95
|
+
| errors.Error502
|
|
96
|
+
| errors.Error504
|
|
97
|
+
| Gr4vyError
|
|
98
|
+
| ResponseValidationError
|
|
99
|
+
| ConnectionError
|
|
100
|
+
| RequestAbortedError
|
|
101
|
+
| RequestTimeoutError
|
|
102
|
+
| InvalidRequestError
|
|
103
|
+
| UnexpectedClientError
|
|
104
|
+
| SDKValidationError
|
|
105
|
+
>,
|
|
106
|
+
APICall,
|
|
107
|
+
]
|
|
108
|
+
> {
|
|
109
|
+
const input: operations.UpdateTransactionRequest = {
|
|
110
|
+
transactionUpdate: transactionUpdate,
|
|
111
|
+
transactionId: transactionId,
|
|
112
|
+
merchantAccountId: merchantAccountId,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const parsed = safeParse(
|
|
116
|
+
input,
|
|
117
|
+
(value) => operations.UpdateTransactionRequest$outboundSchema.parse(value),
|
|
118
|
+
"Input validation failed",
|
|
119
|
+
);
|
|
120
|
+
if (!parsed.ok) {
|
|
121
|
+
return [parsed, { status: "invalid" }];
|
|
122
|
+
}
|
|
123
|
+
const payload = parsed.value;
|
|
124
|
+
const body = encodeJSON("body", payload.TransactionUpdate, { explode: true });
|
|
125
|
+
|
|
126
|
+
const pathParams = {
|
|
127
|
+
transaction_id: encodeSimple("transaction_id", payload.transaction_id, {
|
|
128
|
+
explode: false,
|
|
129
|
+
charEncoding: "percent",
|
|
130
|
+
}),
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const path = pathToFunc("/transactions/{transaction_id}")(pathParams);
|
|
134
|
+
|
|
135
|
+
const headers = new Headers(compactMap({
|
|
136
|
+
"Content-Type": "application/json",
|
|
137
|
+
Accept: "application/json",
|
|
138
|
+
"x-gr4vy-merchant-account-id": encodeSimple(
|
|
139
|
+
"x-gr4vy-merchant-account-id",
|
|
140
|
+
payload.merchantAccountId ?? client._options.merchantAccountId,
|
|
141
|
+
{ explode: false, charEncoding: "none" },
|
|
142
|
+
),
|
|
143
|
+
}));
|
|
144
|
+
|
|
145
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
146
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
147
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
148
|
+
|
|
149
|
+
const context = {
|
|
150
|
+
options: client._options,
|
|
151
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
152
|
+
operationID: "update_transaction",
|
|
153
|
+
oAuth2Scopes: [],
|
|
154
|
+
|
|
155
|
+
resolvedSecurity: requestSecurity,
|
|
156
|
+
|
|
157
|
+
securitySource: client._options.bearerAuth,
|
|
158
|
+
retryConfig: options?.retries
|
|
159
|
+
|| client._options.retryConfig
|
|
160
|
+
|| { strategy: "none" },
|
|
161
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const requestRes = client._createRequest(context, {
|
|
165
|
+
security: requestSecurity,
|
|
166
|
+
method: "PUT",
|
|
167
|
+
baseURL: options?.serverURL,
|
|
168
|
+
path: path,
|
|
169
|
+
headers: headers,
|
|
170
|
+
body: body,
|
|
171
|
+
userAgent: client._options.userAgent,
|
|
172
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
173
|
+
}, options);
|
|
174
|
+
if (!requestRes.ok) {
|
|
175
|
+
return [requestRes, { status: "invalid" }];
|
|
176
|
+
}
|
|
177
|
+
const req = requestRes.value;
|
|
178
|
+
|
|
179
|
+
const doResult = await client._do(req, {
|
|
180
|
+
context,
|
|
181
|
+
errorCodes: [
|
|
182
|
+
"400",
|
|
183
|
+
"401",
|
|
184
|
+
"403",
|
|
185
|
+
"404",
|
|
186
|
+
"405",
|
|
187
|
+
"409",
|
|
188
|
+
"422",
|
|
189
|
+
"425",
|
|
190
|
+
"429",
|
|
191
|
+
"4XX",
|
|
192
|
+
"500",
|
|
193
|
+
"502",
|
|
194
|
+
"504",
|
|
195
|
+
"5XX",
|
|
196
|
+
],
|
|
197
|
+
retryConfig: context.retryConfig,
|
|
198
|
+
retryCodes: context.retryCodes,
|
|
199
|
+
});
|
|
200
|
+
if (!doResult.ok) {
|
|
201
|
+
return [doResult, { status: "request-error", request: req }];
|
|
202
|
+
}
|
|
203
|
+
const response = doResult.value;
|
|
204
|
+
|
|
205
|
+
const responseFields = {
|
|
206
|
+
HttpMeta: { Response: response, Request: req },
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const [result] = await M.match<
|
|
210
|
+
components.Transaction,
|
|
211
|
+
| errors.Error400
|
|
212
|
+
| errors.Error401
|
|
213
|
+
| errors.Error403
|
|
214
|
+
| errors.Error404
|
|
215
|
+
| errors.Error405
|
|
216
|
+
| errors.Error409
|
|
217
|
+
| errors.HTTPValidationError
|
|
218
|
+
| errors.Error425
|
|
219
|
+
| errors.Error429
|
|
220
|
+
| errors.Error500
|
|
221
|
+
| errors.Error502
|
|
222
|
+
| errors.Error504
|
|
223
|
+
| Gr4vyError
|
|
224
|
+
| ResponseValidationError
|
|
225
|
+
| ConnectionError
|
|
226
|
+
| RequestAbortedError
|
|
227
|
+
| RequestTimeoutError
|
|
228
|
+
| InvalidRequestError
|
|
229
|
+
| UnexpectedClientError
|
|
230
|
+
| SDKValidationError
|
|
231
|
+
>(
|
|
232
|
+
M.json(200, components.Transaction$inboundSchema),
|
|
233
|
+
M.jsonErr(400, errors.Error400$inboundSchema),
|
|
234
|
+
M.jsonErr(401, errors.Error401$inboundSchema),
|
|
235
|
+
M.jsonErr(403, errors.Error403$inboundSchema),
|
|
236
|
+
M.jsonErr(404, errors.Error404$inboundSchema),
|
|
237
|
+
M.jsonErr(405, errors.Error405$inboundSchema),
|
|
238
|
+
M.jsonErr(409, errors.Error409$inboundSchema),
|
|
239
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
240
|
+
M.jsonErr(425, errors.Error425$inboundSchema),
|
|
241
|
+
M.jsonErr(429, errors.Error429$inboundSchema),
|
|
242
|
+
M.jsonErr(500, errors.Error500$inboundSchema),
|
|
243
|
+
M.jsonErr(502, errors.Error502$inboundSchema),
|
|
244
|
+
M.jsonErr(504, errors.Error504$inboundSchema),
|
|
245
|
+
M.fail("4XX"),
|
|
246
|
+
M.fail("5XX"),
|
|
247
|
+
)(response, req, { extraFields: responseFields });
|
|
248
|
+
if (!result.ok) {
|
|
249
|
+
return [result, { status: "complete", request: req, response }];
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return [result, { status: "complete", request: req, response }];
|
|
253
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
77
77
|
export const SDK_METADATA = {
|
|
78
78
|
language: "typescript",
|
|
79
79
|
openapiDocVersion: "1.0.0",
|
|
80
|
-
sdkVersion: "1.1.
|
|
81
|
-
genVersion: "2.
|
|
82
|
-
userAgent: "speakeasy-sdk/typescript 1.1.
|
|
80
|
+
sdkVersion: "1.1.9",
|
|
81
|
+
genVersion: "2.657.1",
|
|
82
|
+
userAgent: "speakeasy-sdk/typescript 1.1.9 2.657.1 1.0.0 @gr4vy/sdk",
|
|
83
83
|
} as const;
|
|
@@ -196,6 +196,7 @@ export * from "./transactionstatus.js";
|
|
|
196
196
|
export * from "./transactionsummaries.js";
|
|
197
197
|
export * from "./transactionsummary.js";
|
|
198
198
|
export * from "./transactionthreedsecuresummary.js";
|
|
199
|
+
export * from "./transactionupdate.js";
|
|
199
200
|
export * from "./userstatus.js";
|
|
200
201
|
export * from "./validationerror.js";
|
|
201
202
|
export * from "./verifycredentials.js";
|
|
@@ -20,6 +20,7 @@ export const Name = {
|
|
|
20
20
|
TransactionUpdatedStatus: "transaction-updated-status",
|
|
21
21
|
TransactionSyncEvent: "transaction-sync-event",
|
|
22
22
|
TransactionSyncFailedEvent: "transaction-sync-failed-event",
|
|
23
|
+
TransactionModifiedEvent: "transaction-modified-event",
|
|
23
24
|
TransactionApiRequest: "transaction-api-request",
|
|
24
25
|
TransactionApiResponse: "transaction-api-response",
|
|
25
26
|
BinLookupRequest: "bin-lookup-request",
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type TransactionUpdate = {
|
|
12
|
+
/**
|
|
13
|
+
* An external identifier that can be used to match the transaction against your own records.
|
|
14
|
+
*/
|
|
15
|
+
externalIdentifier?: string | null | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Additional information about the transaction stored as key-value pairs. If provided, the whole value will be overridden.
|
|
18
|
+
*/
|
|
19
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Allows for passing optional configuration per connection to take advantage of connection specific features. When provided, the data is only passed to the target connection type to prevent sharing configuration across connections. Please note that each of the keys this object are in kebab-case, for example `cybersource-anti-fraud` as they represent the ID of the connector. All the other keys will be snake case, for example `merchant_defined_data` or camel case to match an external API that the connector uses. If provided, the whole value will be overridden.
|
|
22
|
+
*/
|
|
23
|
+
connectionOptions?: { [k: string]: { [k: string]: any } } | null | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const TransactionUpdate$inboundSchema: z.ZodType<
|
|
28
|
+
TransactionUpdate,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
external_identifier: z.nullable(z.string()).optional(),
|
|
33
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
34
|
+
connection_options: z.nullable(z.record(z.record(z.any()))).optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"external_identifier": "externalIdentifier",
|
|
38
|
+
"connection_options": "connectionOptions",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type TransactionUpdate$Outbound = {
|
|
44
|
+
external_identifier?: string | null | undefined;
|
|
45
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
46
|
+
connection_options?: { [k: string]: { [k: string]: any } } | null | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const TransactionUpdate$outboundSchema: z.ZodType<
|
|
51
|
+
TransactionUpdate$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
TransactionUpdate
|
|
54
|
+
> = z.object({
|
|
55
|
+
externalIdentifier: z.nullable(z.string()).optional(),
|
|
56
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
57
|
+
connectionOptions: z.nullable(z.record(z.record(z.any()))).optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
externalIdentifier: "external_identifier",
|
|
61
|
+
connectionOptions: "connection_options",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace TransactionUpdate$ {
|
|
70
|
+
/** @deprecated use `TransactionUpdate$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = TransactionUpdate$inboundSchema;
|
|
72
|
+
/** @deprecated use `TransactionUpdate$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = TransactionUpdate$outboundSchema;
|
|
74
|
+
/** @deprecated use `TransactionUpdate$Outbound` instead. */
|
|
75
|
+
export type Outbound = TransactionUpdate$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function transactionUpdateToJSON(
|
|
79
|
+
transactionUpdate: TransactionUpdate,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
TransactionUpdate$outboundSchema.parse(transactionUpdate),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function transactionUpdateFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<TransactionUpdate, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => TransactionUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'TransactionUpdate' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -89,5 +89,6 @@ export * from "./updatedigitalwallet.js";
|
|
|
89
89
|
export * from "./updatemerchantaccount.js";
|
|
90
90
|
export * from "./updatepaymentservice.js";
|
|
91
91
|
export * from "./updatereport.js";
|
|
92
|
+
export * from "./updatetransaction.js";
|
|
92
93
|
export * from "./verifypaymentservicecredentials.js";
|
|
93
94
|
export * from "./voidtransaction.js";
|