@gol/sdk 0.3.0 → 0.4.0
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/dist/generated/platform.d.ts +515 -0
- package/dist/generated/platform.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/server.d.ts +5 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +20 -1
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ pnpm add @gol/sdk@next
|
|
|
14
14
|
|
|
15
15
|
Use Node.js 22 or later. The root entry point (`@gol/sdk`) is browser-safe: policy encoding, owner wallet payloads, owner operations, and verification. API clients and webhook verification are in `@gol/sdk/server` and must run on your server, because they hold your API key.
|
|
16
16
|
|
|
17
|
+
`GolManagementClient` also wraps developer session routes for server use: `startEmailChallenge`, `verifyEmailChallenge`, `createGoogleSession`, `renewSession`, and `revokeSession`. Google ID tokens come from a server-side OAuth code exchange. Keep the resulting GOL session token in an HTTP-only cookie and do not expose it to client JavaScript.
|
|
18
|
+
|
|
17
19
|
## Integration flow
|
|
18
20
|
|
|
19
21
|
Create a test project and an API key with `project:read`, `accounts:read`, `mandates:read`, `mandates:write`, `actions:submit`, and `webhooks:manage` at [console.gol.network](https://console.gol.network).
|
|
@@ -70,6 +70,54 @@ export interface paths {
|
|
|
70
70
|
patch?: never;
|
|
71
71
|
trace?: never;
|
|
72
72
|
};
|
|
73
|
+
"/v1/auth/google/sessions": {
|
|
74
|
+
parameters: {
|
|
75
|
+
query?: never;
|
|
76
|
+
header?: never;
|
|
77
|
+
path?: never;
|
|
78
|
+
cookie?: never;
|
|
79
|
+
};
|
|
80
|
+
get?: never;
|
|
81
|
+
put?: never;
|
|
82
|
+
post: operations["createGoogleSession"];
|
|
83
|
+
delete?: never;
|
|
84
|
+
options?: never;
|
|
85
|
+
head?: never;
|
|
86
|
+
patch?: never;
|
|
87
|
+
trace?: never;
|
|
88
|
+
};
|
|
89
|
+
"/v1/auth/sessions/renew": {
|
|
90
|
+
parameters: {
|
|
91
|
+
query?: never;
|
|
92
|
+
header?: never;
|
|
93
|
+
path?: never;
|
|
94
|
+
cookie?: never;
|
|
95
|
+
};
|
|
96
|
+
get?: never;
|
|
97
|
+
put?: never;
|
|
98
|
+
post: operations["renewConsoleSession"];
|
|
99
|
+
delete?: never;
|
|
100
|
+
options?: never;
|
|
101
|
+
head?: never;
|
|
102
|
+
patch?: never;
|
|
103
|
+
trace?: never;
|
|
104
|
+
};
|
|
105
|
+
"/v1/auth/sessions/current": {
|
|
106
|
+
parameters: {
|
|
107
|
+
query?: never;
|
|
108
|
+
header?: never;
|
|
109
|
+
path?: never;
|
|
110
|
+
cookie?: never;
|
|
111
|
+
};
|
|
112
|
+
get?: never;
|
|
113
|
+
put?: never;
|
|
114
|
+
post?: never;
|
|
115
|
+
delete: operations["revokeConsoleSession"];
|
|
116
|
+
options?: never;
|
|
117
|
+
head?: never;
|
|
118
|
+
patch?: never;
|
|
119
|
+
trace?: never;
|
|
120
|
+
};
|
|
73
121
|
"/v1/console/me": {
|
|
74
122
|
parameters: {
|
|
75
123
|
query?: never;
|
|
@@ -1150,6 +1198,473 @@ export interface operations {
|
|
|
1150
1198
|
};
|
|
1151
1199
|
};
|
|
1152
1200
|
};
|
|
1201
|
+
createGoogleSession: {
|
|
1202
|
+
parameters: {
|
|
1203
|
+
query?: never;
|
|
1204
|
+
header?: never;
|
|
1205
|
+
path?: never;
|
|
1206
|
+
cookie?: never;
|
|
1207
|
+
};
|
|
1208
|
+
requestBody: {
|
|
1209
|
+
content: {
|
|
1210
|
+
"application/json": {
|
|
1211
|
+
idToken: string;
|
|
1212
|
+
nonce: string;
|
|
1213
|
+
};
|
|
1214
|
+
};
|
|
1215
|
+
};
|
|
1216
|
+
responses: {
|
|
1217
|
+
/** @description Default Response */
|
|
1218
|
+
200: {
|
|
1219
|
+
headers: {
|
|
1220
|
+
[name: string]: unknown;
|
|
1221
|
+
};
|
|
1222
|
+
content: {
|
|
1223
|
+
"application/json": {
|
|
1224
|
+
sessionToken: string;
|
|
1225
|
+
/** Format: date-time */
|
|
1226
|
+
expiresAt: string;
|
|
1227
|
+
developer: {
|
|
1228
|
+
/** Format: uuid */
|
|
1229
|
+
id: string;
|
|
1230
|
+
email: string;
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
/** @description Default Response */
|
|
1236
|
+
400: {
|
|
1237
|
+
headers: {
|
|
1238
|
+
[name: string]: unknown;
|
|
1239
|
+
};
|
|
1240
|
+
content: {
|
|
1241
|
+
"application/json": {
|
|
1242
|
+
error: {
|
|
1243
|
+
code: string;
|
|
1244
|
+
message: string;
|
|
1245
|
+
/** Format: uuid */
|
|
1246
|
+
correlationId: string;
|
|
1247
|
+
};
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
};
|
|
1251
|
+
/** @description Default Response */
|
|
1252
|
+
401: {
|
|
1253
|
+
headers: {
|
|
1254
|
+
[name: string]: unknown;
|
|
1255
|
+
};
|
|
1256
|
+
content: {
|
|
1257
|
+
"application/json": {
|
|
1258
|
+
error: {
|
|
1259
|
+
code: string;
|
|
1260
|
+
message: string;
|
|
1261
|
+
/** Format: uuid */
|
|
1262
|
+
correlationId: string;
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
};
|
|
1266
|
+
};
|
|
1267
|
+
/** @description Default Response */
|
|
1268
|
+
403: {
|
|
1269
|
+
headers: {
|
|
1270
|
+
[name: string]: unknown;
|
|
1271
|
+
};
|
|
1272
|
+
content: {
|
|
1273
|
+
"application/json": {
|
|
1274
|
+
error: {
|
|
1275
|
+
code: string;
|
|
1276
|
+
message: string;
|
|
1277
|
+
/** Format: uuid */
|
|
1278
|
+
correlationId: string;
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
/** @description Default Response */
|
|
1284
|
+
404: {
|
|
1285
|
+
headers: {
|
|
1286
|
+
[name: string]: unknown;
|
|
1287
|
+
};
|
|
1288
|
+
content: {
|
|
1289
|
+
"application/json": {
|
|
1290
|
+
error: {
|
|
1291
|
+
code: string;
|
|
1292
|
+
message: string;
|
|
1293
|
+
/** Format: uuid */
|
|
1294
|
+
correlationId: string;
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
/** @description Default Response */
|
|
1300
|
+
409: {
|
|
1301
|
+
headers: {
|
|
1302
|
+
[name: string]: unknown;
|
|
1303
|
+
};
|
|
1304
|
+
content: {
|
|
1305
|
+
"application/json": {
|
|
1306
|
+
error: {
|
|
1307
|
+
code: string;
|
|
1308
|
+
message: string;
|
|
1309
|
+
/** Format: uuid */
|
|
1310
|
+
correlationId: string;
|
|
1311
|
+
};
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
};
|
|
1315
|
+
/** @description Default Response */
|
|
1316
|
+
429: {
|
|
1317
|
+
headers: {
|
|
1318
|
+
[name: string]: unknown;
|
|
1319
|
+
};
|
|
1320
|
+
content: {
|
|
1321
|
+
"application/json": {
|
|
1322
|
+
error: {
|
|
1323
|
+
code: string;
|
|
1324
|
+
message: string;
|
|
1325
|
+
/** Format: uuid */
|
|
1326
|
+
correlationId: string;
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
/** @description Default Response */
|
|
1332
|
+
500: {
|
|
1333
|
+
headers: {
|
|
1334
|
+
[name: string]: unknown;
|
|
1335
|
+
};
|
|
1336
|
+
content: {
|
|
1337
|
+
"application/json": {
|
|
1338
|
+
error: {
|
|
1339
|
+
code: string;
|
|
1340
|
+
message: string;
|
|
1341
|
+
/** Format: uuid */
|
|
1342
|
+
correlationId: string;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
/** @description Default Response */
|
|
1348
|
+
503: {
|
|
1349
|
+
headers: {
|
|
1350
|
+
[name: string]: unknown;
|
|
1351
|
+
};
|
|
1352
|
+
content: {
|
|
1353
|
+
"application/json": {
|
|
1354
|
+
error: {
|
|
1355
|
+
code: string;
|
|
1356
|
+
message: string;
|
|
1357
|
+
/** Format: uuid */
|
|
1358
|
+
correlationId: string;
|
|
1359
|
+
};
|
|
1360
|
+
};
|
|
1361
|
+
};
|
|
1362
|
+
};
|
|
1363
|
+
};
|
|
1364
|
+
};
|
|
1365
|
+
renewConsoleSession: {
|
|
1366
|
+
parameters: {
|
|
1367
|
+
query?: never;
|
|
1368
|
+
header?: never;
|
|
1369
|
+
path?: never;
|
|
1370
|
+
cookie?: never;
|
|
1371
|
+
};
|
|
1372
|
+
requestBody?: never;
|
|
1373
|
+
responses: {
|
|
1374
|
+
/** @description Default Response */
|
|
1375
|
+
200: {
|
|
1376
|
+
headers: {
|
|
1377
|
+
[name: string]: unknown;
|
|
1378
|
+
};
|
|
1379
|
+
content: {
|
|
1380
|
+
"application/json": {
|
|
1381
|
+
sessionToken: string;
|
|
1382
|
+
/** Format: date-time */
|
|
1383
|
+
expiresAt: string;
|
|
1384
|
+
developer: {
|
|
1385
|
+
/** Format: uuid */
|
|
1386
|
+
id: string;
|
|
1387
|
+
email: string;
|
|
1388
|
+
};
|
|
1389
|
+
};
|
|
1390
|
+
};
|
|
1391
|
+
};
|
|
1392
|
+
/** @description Default Response */
|
|
1393
|
+
400: {
|
|
1394
|
+
headers: {
|
|
1395
|
+
[name: string]: unknown;
|
|
1396
|
+
};
|
|
1397
|
+
content: {
|
|
1398
|
+
"application/json": {
|
|
1399
|
+
error: {
|
|
1400
|
+
code: string;
|
|
1401
|
+
message: string;
|
|
1402
|
+
/** Format: uuid */
|
|
1403
|
+
correlationId: string;
|
|
1404
|
+
};
|
|
1405
|
+
};
|
|
1406
|
+
};
|
|
1407
|
+
};
|
|
1408
|
+
/** @description Default Response */
|
|
1409
|
+
401: {
|
|
1410
|
+
headers: {
|
|
1411
|
+
[name: string]: unknown;
|
|
1412
|
+
};
|
|
1413
|
+
content: {
|
|
1414
|
+
"application/json": {
|
|
1415
|
+
error: {
|
|
1416
|
+
code: string;
|
|
1417
|
+
message: string;
|
|
1418
|
+
/** Format: uuid */
|
|
1419
|
+
correlationId: string;
|
|
1420
|
+
};
|
|
1421
|
+
};
|
|
1422
|
+
};
|
|
1423
|
+
};
|
|
1424
|
+
/** @description Default Response */
|
|
1425
|
+
403: {
|
|
1426
|
+
headers: {
|
|
1427
|
+
[name: string]: unknown;
|
|
1428
|
+
};
|
|
1429
|
+
content: {
|
|
1430
|
+
"application/json": {
|
|
1431
|
+
error: {
|
|
1432
|
+
code: string;
|
|
1433
|
+
message: string;
|
|
1434
|
+
/** Format: uuid */
|
|
1435
|
+
correlationId: string;
|
|
1436
|
+
};
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
};
|
|
1440
|
+
/** @description Default Response */
|
|
1441
|
+
404: {
|
|
1442
|
+
headers: {
|
|
1443
|
+
[name: string]: unknown;
|
|
1444
|
+
};
|
|
1445
|
+
content: {
|
|
1446
|
+
"application/json": {
|
|
1447
|
+
error: {
|
|
1448
|
+
code: string;
|
|
1449
|
+
message: string;
|
|
1450
|
+
/** Format: uuid */
|
|
1451
|
+
correlationId: string;
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
/** @description Default Response */
|
|
1457
|
+
409: {
|
|
1458
|
+
headers: {
|
|
1459
|
+
[name: string]: unknown;
|
|
1460
|
+
};
|
|
1461
|
+
content: {
|
|
1462
|
+
"application/json": {
|
|
1463
|
+
error: {
|
|
1464
|
+
code: string;
|
|
1465
|
+
message: string;
|
|
1466
|
+
/** Format: uuid */
|
|
1467
|
+
correlationId: string;
|
|
1468
|
+
};
|
|
1469
|
+
};
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
/** @description Default Response */
|
|
1473
|
+
429: {
|
|
1474
|
+
headers: {
|
|
1475
|
+
[name: string]: unknown;
|
|
1476
|
+
};
|
|
1477
|
+
content: {
|
|
1478
|
+
"application/json": {
|
|
1479
|
+
error: {
|
|
1480
|
+
code: string;
|
|
1481
|
+
message: string;
|
|
1482
|
+
/** Format: uuid */
|
|
1483
|
+
correlationId: string;
|
|
1484
|
+
};
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
/** @description Default Response */
|
|
1489
|
+
500: {
|
|
1490
|
+
headers: {
|
|
1491
|
+
[name: string]: unknown;
|
|
1492
|
+
};
|
|
1493
|
+
content: {
|
|
1494
|
+
"application/json": {
|
|
1495
|
+
error: {
|
|
1496
|
+
code: string;
|
|
1497
|
+
message: string;
|
|
1498
|
+
/** Format: uuid */
|
|
1499
|
+
correlationId: string;
|
|
1500
|
+
};
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
/** @description Default Response */
|
|
1505
|
+
503: {
|
|
1506
|
+
headers: {
|
|
1507
|
+
[name: string]: unknown;
|
|
1508
|
+
};
|
|
1509
|
+
content: {
|
|
1510
|
+
"application/json": {
|
|
1511
|
+
error: {
|
|
1512
|
+
code: string;
|
|
1513
|
+
message: string;
|
|
1514
|
+
/** Format: uuid */
|
|
1515
|
+
correlationId: string;
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
};
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
1522
|
+
revokeConsoleSession: {
|
|
1523
|
+
parameters: {
|
|
1524
|
+
query?: never;
|
|
1525
|
+
header?: never;
|
|
1526
|
+
path?: never;
|
|
1527
|
+
cookie?: never;
|
|
1528
|
+
};
|
|
1529
|
+
requestBody?: never;
|
|
1530
|
+
responses: {
|
|
1531
|
+
/** @description Default Response */
|
|
1532
|
+
204: {
|
|
1533
|
+
headers: {
|
|
1534
|
+
[name: string]: unknown;
|
|
1535
|
+
};
|
|
1536
|
+
content?: never;
|
|
1537
|
+
};
|
|
1538
|
+
/** @description Default Response */
|
|
1539
|
+
400: {
|
|
1540
|
+
headers: {
|
|
1541
|
+
[name: string]: unknown;
|
|
1542
|
+
};
|
|
1543
|
+
content: {
|
|
1544
|
+
"application/json": {
|
|
1545
|
+
error: {
|
|
1546
|
+
code: string;
|
|
1547
|
+
message: string;
|
|
1548
|
+
/** Format: uuid */
|
|
1549
|
+
correlationId: string;
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
};
|
|
1553
|
+
};
|
|
1554
|
+
/** @description Default Response */
|
|
1555
|
+
401: {
|
|
1556
|
+
headers: {
|
|
1557
|
+
[name: string]: unknown;
|
|
1558
|
+
};
|
|
1559
|
+
content: {
|
|
1560
|
+
"application/json": {
|
|
1561
|
+
error: {
|
|
1562
|
+
code: string;
|
|
1563
|
+
message: string;
|
|
1564
|
+
/** Format: uuid */
|
|
1565
|
+
correlationId: string;
|
|
1566
|
+
};
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
};
|
|
1570
|
+
/** @description Default Response */
|
|
1571
|
+
403: {
|
|
1572
|
+
headers: {
|
|
1573
|
+
[name: string]: unknown;
|
|
1574
|
+
};
|
|
1575
|
+
content: {
|
|
1576
|
+
"application/json": {
|
|
1577
|
+
error: {
|
|
1578
|
+
code: string;
|
|
1579
|
+
message: string;
|
|
1580
|
+
/** Format: uuid */
|
|
1581
|
+
correlationId: string;
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1585
|
+
};
|
|
1586
|
+
/** @description Default Response */
|
|
1587
|
+
404: {
|
|
1588
|
+
headers: {
|
|
1589
|
+
[name: string]: unknown;
|
|
1590
|
+
};
|
|
1591
|
+
content: {
|
|
1592
|
+
"application/json": {
|
|
1593
|
+
error: {
|
|
1594
|
+
code: string;
|
|
1595
|
+
message: string;
|
|
1596
|
+
/** Format: uuid */
|
|
1597
|
+
correlationId: string;
|
|
1598
|
+
};
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
};
|
|
1602
|
+
/** @description Default Response */
|
|
1603
|
+
409: {
|
|
1604
|
+
headers: {
|
|
1605
|
+
[name: string]: unknown;
|
|
1606
|
+
};
|
|
1607
|
+
content: {
|
|
1608
|
+
"application/json": {
|
|
1609
|
+
error: {
|
|
1610
|
+
code: string;
|
|
1611
|
+
message: string;
|
|
1612
|
+
/** Format: uuid */
|
|
1613
|
+
correlationId: string;
|
|
1614
|
+
};
|
|
1615
|
+
};
|
|
1616
|
+
};
|
|
1617
|
+
};
|
|
1618
|
+
/** @description Default Response */
|
|
1619
|
+
429: {
|
|
1620
|
+
headers: {
|
|
1621
|
+
[name: string]: unknown;
|
|
1622
|
+
};
|
|
1623
|
+
content: {
|
|
1624
|
+
"application/json": {
|
|
1625
|
+
error: {
|
|
1626
|
+
code: string;
|
|
1627
|
+
message: string;
|
|
1628
|
+
/** Format: uuid */
|
|
1629
|
+
correlationId: string;
|
|
1630
|
+
};
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
/** @description Default Response */
|
|
1635
|
+
500: {
|
|
1636
|
+
headers: {
|
|
1637
|
+
[name: string]: unknown;
|
|
1638
|
+
};
|
|
1639
|
+
content: {
|
|
1640
|
+
"application/json": {
|
|
1641
|
+
error: {
|
|
1642
|
+
code: string;
|
|
1643
|
+
message: string;
|
|
1644
|
+
/** Format: uuid */
|
|
1645
|
+
correlationId: string;
|
|
1646
|
+
};
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
};
|
|
1650
|
+
/** @description Default Response */
|
|
1651
|
+
503: {
|
|
1652
|
+
headers: {
|
|
1653
|
+
[name: string]: unknown;
|
|
1654
|
+
};
|
|
1655
|
+
content: {
|
|
1656
|
+
"application/json": {
|
|
1657
|
+
error: {
|
|
1658
|
+
code: string;
|
|
1659
|
+
message: string;
|
|
1660
|
+
/** Format: uuid */
|
|
1661
|
+
correlationId: string;
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1153
1668
|
getConsoleIdentity: {
|
|
1154
1669
|
parameters: {
|
|
1155
1670
|
query?: never;
|