@gr4vy/sdk 0.18.15 → 0.18.16

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.
Files changed (38) hide show
  1. package/FUNCTIONS.md +6 -1
  2. package/README.md +40 -8
  3. package/bin/mcp-server.js +5 -5
  4. package/bin/mcp-server.js.map +4 -4
  5. package/docs/sdks/all/README.md +11 -2
  6. package/docs/sdks/auditlogs/README.md +11 -2
  7. package/docs/sdks/balances/README.md +11 -2
  8. package/docs/sdks/buyers/README.md +55 -10
  9. package/docs/sdks/cardschemedefinitions/README.md +11 -2
  10. package/docs/sdks/checkoutsessions/README.md +44 -8
  11. package/docs/sdks/cryptogram/README.md +11 -2
  12. package/docs/sdks/digitalwallets/README.md +55 -10
  13. package/docs/sdks/domains/README.md +22 -4
  14. package/docs/sdks/giftcards/README.md +44 -8
  15. package/docs/sdks/gr4vygiftcards/README.md +11 -2
  16. package/docs/sdks/gr4vypaymentmethods/README.md +11 -2
  17. package/docs/sdks/gr4vyrefunds/README.md +11 -2
  18. package/docs/sdks/gr4vytransactionsrefunds/README.md +22 -4
  19. package/docs/sdks/jobs/README.md +11 -2
  20. package/docs/sdks/merchantaccounts/README.md +44 -8
  21. package/docs/sdks/networktokens/README.md +55 -10
  22. package/docs/sdks/paymentmethods/README.md +44 -8
  23. package/docs/sdks/paymentoptions/README.md +11 -2
  24. package/docs/sdks/paymentservicetokens/README.md +33 -6
  25. package/docs/sdks/payouts/README.md +33 -6
  26. package/docs/sdks/refunds/README.md +11 -2
  27. package/docs/sdks/sessions/README.md +33 -6
  28. package/docs/sdks/shippingdetails/README.md +55 -10
  29. package/docs/sdks/transactions/README.md +77 -14
  30. package/jsr.json +1 -1
  31. package/lib/config.d.ts +2 -2
  32. package/lib/config.js +2 -2
  33. package/mcp-server/mcp-server.js +1 -1
  34. package/mcp-server/server.js +1 -1
  35. package/package.json +1 -1
  36. package/src/lib/config.ts +2 -2
  37. package/src/mcp-server/mcp-server.ts +1 -1
  38. package/src/mcp-server/server.ts +1 -1
@@ -23,7 +23,11 @@ List all transactions for a specific merchant account sorted by most recently cr
23
23
  import { Gr4vy } from "@gr4vy/sdk";
24
24
 
25
25
  const gr4vy = new Gr4vy({
26
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
26
+ server: "sandbox",
27
+ id: "example",
28
+ bearerAuth: withToken({
29
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
30
+ }),
27
31
  });
28
32
 
29
33
  async function run() {
@@ -97,12 +101,17 @@ The standalone function version of this method:
97
101
 
98
102
  ```typescript
99
103
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
104
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
100
105
  import { transactionsList } from "@gr4vy/sdk/funcs/transactionsList.js";
101
106
 
102
107
  // Use `Gr4vyCore` for best tree-shaking performance.
103
108
  // You can create one instance of it to use across an application.
104
109
  const gr4vy = new Gr4vyCore({
105
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
110
+ server: "sandbox",
111
+ id: "example",
112
+ bearerAuth: withToken({
113
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
114
+ }),
106
115
  });
107
116
 
108
117
  async function run() {
@@ -220,7 +229,11 @@ import { Gr4vy } from "@gr4vy/sdk";
220
229
  import { RFCDate } from "@gr4vy/sdk/types";
221
230
 
222
231
  const gr4vy = new Gr4vy({
223
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
232
+ server: "sandbox",
233
+ id: "example",
234
+ bearerAuth: withToken({
235
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
236
+ }),
224
237
  });
225
238
 
226
239
  async function run() {
@@ -472,13 +485,18 @@ The standalone function version of this method:
472
485
 
473
486
  ```typescript
474
487
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
488
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
475
489
  import { transactionsCreate } from "@gr4vy/sdk/funcs/transactionsCreate.js";
476
490
  import { RFCDate } from "@gr4vy/sdk/types";
477
491
 
478
492
  // Use `Gr4vyCore` for best tree-shaking performance.
479
493
  // You can create one instance of it to use across an application.
480
494
  const gr4vy = new Gr4vyCore({
481
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
495
+ server: "sandbox",
496
+ id: "example",
497
+ bearerAuth: withToken({
498
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
499
+ }),
482
500
  });
483
501
 
484
502
  async function run() {
@@ -776,7 +794,11 @@ Fetch a single transaction by its ID.
776
794
  import { Gr4vy } from "@gr4vy/sdk";
777
795
 
778
796
  const gr4vy = new Gr4vy({
779
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
797
+ server: "sandbox",
798
+ id: "example",
799
+ bearerAuth: withToken({
800
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
801
+ }),
780
802
  });
781
803
 
782
804
  async function run() {
@@ -795,12 +817,17 @@ The standalone function version of this method:
795
817
 
796
818
  ```typescript
797
819
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
820
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
798
821
  import { transactionsGet } from "@gr4vy/sdk/funcs/transactionsGet.js";
799
822
 
800
823
  // Use `Gr4vyCore` for best tree-shaking performance.
801
824
  // You can create one instance of it to use across an application.
802
825
  const gr4vy = new Gr4vyCore({
803
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
826
+ server: "sandbox",
827
+ id: "example",
828
+ bearerAuth: withToken({
829
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
830
+ }),
804
831
  });
805
832
 
806
833
  async function run() {
@@ -864,7 +891,11 @@ import { Gr4vy } from "@gr4vy/sdk";
864
891
  import { RFCDate } from "@gr4vy/sdk/types";
865
892
 
866
893
  const gr4vy = new Gr4vy({
867
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
894
+ server: "sandbox",
895
+ id: "example",
896
+ bearerAuth: withToken({
897
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
898
+ }),
868
899
  });
869
900
 
870
901
  async function run() {
@@ -951,13 +982,18 @@ The standalone function version of this method:
951
982
 
952
983
  ```typescript
953
984
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
985
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
954
986
  import { transactionsCapture } from "@gr4vy/sdk/funcs/transactionsCapture.js";
955
987
  import { RFCDate } from "@gr4vy/sdk/types";
956
988
 
957
989
  // Use `Gr4vyCore` for best tree-shaking performance.
958
990
  // You can create one instance of it to use across an application.
959
991
  const gr4vy = new Gr4vyCore({
960
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
992
+ server: "sandbox",
993
+ id: "example",
994
+ bearerAuth: withToken({
995
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
996
+ }),
961
997
  });
962
998
 
963
999
  async function run() {
@@ -1090,7 +1126,11 @@ Void a previously authorized transaction.
1090
1126
  import { Gr4vy } from "@gr4vy/sdk";
1091
1127
 
1092
1128
  const gr4vy = new Gr4vy({
1093
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
1129
+ server: "sandbox",
1130
+ id: "example",
1131
+ bearerAuth: withToken({
1132
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
1133
+ }),
1094
1134
  });
1095
1135
 
1096
1136
  async function run() {
@@ -1109,12 +1149,17 @@ The standalone function version of this method:
1109
1149
 
1110
1150
  ```typescript
1111
1151
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
1152
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
1112
1153
  import { transactionsVoid } from "@gr4vy/sdk/funcs/transactionsVoid.js";
1113
1154
 
1114
1155
  // Use `Gr4vyCore` for best tree-shaking performance.
1115
1156
  // You can create one instance of it to use across an application.
1116
1157
  const gr4vy = new Gr4vyCore({
1117
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
1158
+ server: "sandbox",
1159
+ id: "example",
1160
+ bearerAuth: withToken({
1161
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
1162
+ }),
1118
1163
  });
1119
1164
 
1120
1165
  async function run() {
@@ -1178,7 +1223,11 @@ Fetch a summary for a transaction.
1178
1223
  import { Gr4vy } from "@gr4vy/sdk";
1179
1224
 
1180
1225
  const gr4vy = new Gr4vy({
1181
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
1226
+ server: "sandbox",
1227
+ id: "example",
1228
+ bearerAuth: withToken({
1229
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
1230
+ }),
1182
1231
  });
1183
1232
 
1184
1233
  async function run() {
@@ -1197,12 +1246,17 @@ The standalone function version of this method:
1197
1246
 
1198
1247
  ```typescript
1199
1248
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
1249
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
1200
1250
  import { transactionsSummary } from "@gr4vy/sdk/funcs/transactionsSummary.js";
1201
1251
 
1202
1252
  // Use `Gr4vyCore` for best tree-shaking performance.
1203
1253
  // You can create one instance of it to use across an application.
1204
1254
  const gr4vy = new Gr4vyCore({
1205
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
1255
+ server: "sandbox",
1256
+ id: "example",
1257
+ bearerAuth: withToken({
1258
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
1259
+ }),
1206
1260
  });
1207
1261
 
1208
1262
  async function run() {
@@ -1265,7 +1319,11 @@ Fetch the latest status for a transaction.
1265
1319
  import { Gr4vy } from "@gr4vy/sdk";
1266
1320
 
1267
1321
  const gr4vy = new Gr4vy({
1268
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
1322
+ server: "sandbox",
1323
+ id: "example",
1324
+ bearerAuth: withToken({
1325
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
1326
+ }),
1269
1327
  });
1270
1328
 
1271
1329
  async function run() {
@@ -1284,12 +1342,17 @@ The standalone function version of this method:
1284
1342
 
1285
1343
  ```typescript
1286
1344
  import { Gr4vyCore } from "@gr4vy/sdk/core.js";
1345
+ import { withToken } from "@gr4vy/sdk/lib/auth.js";
1287
1346
  import { transactionsSync } from "@gr4vy/sdk/funcs/transactionsSync.js";
1288
1347
 
1289
1348
  // Use `Gr4vyCore` for best tree-shaking performance.
1290
1349
  // You can create one instance of it to use across an application.
1291
1350
  const gr4vy = new Gr4vyCore({
1292
- bearerAuth: process.env["GR4VY_BEARER_AUTH"] ?? "",
1351
+ server: "sandbox",
1352
+ id: "example",
1353
+ bearerAuth: withToken({
1354
+ privateKey: fs.readFileSync("private_key.pem", "utf8"),
1355
+ }),
1293
1356
  });
1294
1357
 
1295
1358
  async function run() {
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gr4vy/sdk",
5
- "version": "0.18.15",
5
+ "version": "0.18.16",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/lib/config.d.ts CHANGED
@@ -40,8 +40,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
40
40
  export declare const SDK_METADATA: {
41
41
  readonly language: "typescript";
42
42
  readonly openapiDocVersion: "1.0.0";
43
- readonly sdkVersion: "0.18.15";
43
+ readonly sdkVersion: "0.18.16";
44
44
  readonly genVersion: "2.593.4";
45
- readonly userAgent: "speakeasy-sdk/typescript 0.18.15 2.593.4 1.0.0 @gr4vy/sdk";
45
+ readonly userAgent: "speakeasy-sdk/typescript 0.18.16 2.593.4 1.0.0 @gr4vy/sdk";
46
46
  };
47
47
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -37,8 +37,8 @@ function serverURLFromOptions(options) {
37
37
  exports.SDK_METADATA = {
38
38
  language: "typescript",
39
39
  openapiDocVersion: "1.0.0",
40
- sdkVersion: "0.18.15",
40
+ sdkVersion: "0.18.16",
41
41
  genVersion: "2.593.4",
42
- userAgent: "speakeasy-sdk/typescript 0.18.15 2.593.4 1.0.0 @gr4vy/sdk",
42
+ userAgent: "speakeasy-sdk/typescript 0.18.16 2.593.4 1.0.0 @gr4vy/sdk",
43
43
  };
44
44
  //# sourceMappingURL=config.js.map
@@ -22,7 +22,7 @@ const routes = (0, core_1.buildRouteMap)({
22
22
  exports.app = (0, core_1.buildApplication)(routes, {
23
23
  name: "mcp",
24
24
  versionInfo: {
25
- currentVersion: "0.18.15",
25
+ currentVersion: "0.18.16",
26
26
  },
27
27
  });
28
28
  (0, core_1.run)(exports.app, node_process_1.default.argv.slice(2), (0, cli_js_1.buildContext)(node_process_1.default));
@@ -79,7 +79,7 @@ const transactionsVoid_js_1 = require("./tools/transactionsVoid.js");
79
79
  function createMCPServer(deps) {
80
80
  const server = new mcp_js_1.McpServer({
81
81
  name: "Gr4vy",
82
- version: "0.18.15",
82
+ version: "0.18.16",
83
83
  });
84
84
  const client = new core_js_1.Gr4vyCore({
85
85
  bearerAuth: deps.bearerAuth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gr4vy/sdk",
3
- "version": "0.18.15",
3
+ "version": "0.18.16",
4
4
  "author": "Gr4vy",
5
5
  "bin": {
6
6
  "mcp": "bin/mcp-server.js"
package/src/lib/config.ts CHANGED
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "1.0.0",
76
- sdkVersion: "0.18.15",
76
+ sdkVersion: "0.18.16",
77
77
  genVersion: "2.593.4",
78
- userAgent: "speakeasy-sdk/typescript 0.18.15 2.593.4 1.0.0 @gr4vy/sdk",
78
+ userAgent: "speakeasy-sdk/typescript 0.18.16 2.593.4 1.0.0 @gr4vy/sdk",
79
79
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.18.15",
22
+ currentVersion: "0.18.16",
23
23
  },
24
24
  });
25
25
 
@@ -93,7 +93,7 @@ export function createMCPServer(deps: {
93
93
  }) {
94
94
  const server = new McpServer({
95
95
  name: "Gr4vy",
96
- version: "0.18.15",
96
+ version: "0.18.16",
97
97
  });
98
98
 
99
99
  const client = new Gr4vyCore({