@topolo/sdk 0.2.8 → 0.2.10
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/index.cjs +518 -114
- package/dist/index.d.cts +443 -107
- package/dist/index.d.ts +443 -107
- package/dist/index.js +517 -114
- package/package.json +1 -1
- package/src/application-requirements.ts +3 -1
- package/src/applications.generated.ts +271 -97
- package/src/index.ts +17 -0
- package/src/modules/p2p.test.ts +218 -0
- package/src/modules/p2p.ts +451 -0
- package/src/services.generated.ts +24 -14
- package/src/services.test.ts +12 -5
package/dist/index.js
CHANGED
|
@@ -58,39 +58,44 @@ var TopoloHttpError = class extends TopoloSdkError {
|
|
|
58
58
|
|
|
59
59
|
// src/services.generated.ts
|
|
60
60
|
var SERVICES = {
|
|
61
|
-
agent: "https://
|
|
61
|
+
agent: "https://agent-api.topolo.app",
|
|
62
62
|
auth: "https://auth.topolo.app",
|
|
63
63
|
books: "https://books.topolo.app",
|
|
64
64
|
bugfix: "https://bugfix.topolo.app",
|
|
65
|
-
bytes: "https://
|
|
65
|
+
bytes: "https://bytes-api.topolo.app",
|
|
66
66
|
calendar: "https://calendar.topolo.app",
|
|
67
|
-
capacity: "https://
|
|
67
|
+
capacity: "https://capacity.topolo.app",
|
|
68
68
|
chat: "https://chat.topolo.app",
|
|
69
|
-
commerce: "https://
|
|
69
|
+
commerce: "https://commerce-api.topolo.app",
|
|
70
70
|
compose: "https://compose.topolo.app",
|
|
71
71
|
crm: "https://crm-api.topolo.app",
|
|
72
|
-
customer_success: "https://
|
|
73
|
-
|
|
72
|
+
customer_success: "https://success.topolo.app",
|
|
73
|
+
director: "https://director.topolo.app",
|
|
74
|
+
feed: "https://feed-api.topolo.app",
|
|
74
75
|
flow: "https://flow.topolo.app",
|
|
75
|
-
forecast: "https://forecast-
|
|
76
|
+
forecast: "https://forecast-api.topolo.app",
|
|
76
77
|
forms: "https://forms.topolo.app",
|
|
77
78
|
insights: "https://insights.topolo.app",
|
|
78
79
|
inventory: "https://inventory.topolo.app",
|
|
79
|
-
learn: "https://
|
|
80
|
+
learn: "https://learn-api.topolo.app",
|
|
81
|
+
localize: "https://localize.topolo.app",
|
|
80
82
|
mail: "https://mail.topolo.app",
|
|
81
|
-
mdm: "https://
|
|
83
|
+
mdm: "https://mdm-api.topolo.app",
|
|
82
84
|
messaging: "https://messages.topolo.app",
|
|
83
|
-
nexus: "https://
|
|
85
|
+
nexus: "https://nexus-api.topolo.app",
|
|
84
86
|
notify: "https://notify.topolo.app",
|
|
85
87
|
one: "https://one.topolo.app",
|
|
86
|
-
|
|
88
|
+
"one.ai": "https://ai.one.topolo.app",
|
|
89
|
+
p2p: "https://p2p.topolo.app",
|
|
90
|
+
pay: "https://pay.topolo.app",
|
|
87
91
|
people: "https://people.topolo.app",
|
|
88
92
|
"quro.api": "https://api.ol0.me",
|
|
89
93
|
"quro.redirect": "https://ol0.me",
|
|
90
94
|
roadmapper: "https://roadmapper-api.topolo.app",
|
|
91
95
|
sign: "https://sign.topolo.app",
|
|
92
|
-
social_studio: "https://
|
|
93
|
-
socialize: "https://socialize-
|
|
96
|
+
social_studio: "https://studio-api.topolo.app",
|
|
97
|
+
socialize: "https://socialize-api.topolo.app",
|
|
98
|
+
status: "https://status.topolo.app",
|
|
94
99
|
support: "https://support.topolo.app",
|
|
95
100
|
survey: "https://survey.topolo.app",
|
|
96
101
|
voice: "https://voice.topolo.app",
|
|
@@ -98,16 +103,21 @@ var SERVICES = {
|
|
|
98
103
|
};
|
|
99
104
|
var PLATFORM_SERVICE_IDS = {
|
|
100
105
|
books: "srv_topolo_books",
|
|
106
|
+
bugfix: "srv_topolo_bugfix",
|
|
101
107
|
compose: "srv_topolo_compose",
|
|
102
108
|
crm: "srv_iCwM4jGXcwlj",
|
|
103
|
-
customer_success: "
|
|
109
|
+
customer_success: "srv_topolo_success",
|
|
110
|
+
director: "srv_topolo_director",
|
|
104
111
|
flow: "srv_topolo_flow",
|
|
105
112
|
forms: "srv_topolo_forms",
|
|
106
113
|
insights: "srv_topolo_insights",
|
|
107
114
|
inventory: "srv_topolo_inventory",
|
|
115
|
+
localize: "srv_topolo_localize",
|
|
108
116
|
notify: "svc_topolo_notify",
|
|
117
|
+
p2p: "srv_topolo_p2p",
|
|
109
118
|
people: "srv_topolo_people",
|
|
110
119
|
sign: "srv_topolo_sign",
|
|
120
|
+
status: "srv_topolo_status",
|
|
111
121
|
survey: "srv_topolo_survey",
|
|
112
122
|
voice: "srv_topolo_voice"
|
|
113
123
|
};
|
|
@@ -126,7 +136,9 @@ var APPLICATIONS = {
|
|
|
126
136
|
"name": "topoloadmin",
|
|
127
137
|
"kind": "pages",
|
|
128
138
|
"apiUrl": null,
|
|
129
|
-
"domains": [
|
|
139
|
+
"domains": [
|
|
140
|
+
"admin.topolo.app"
|
|
141
|
+
],
|
|
130
142
|
"routes": [],
|
|
131
143
|
"serviceId": null
|
|
132
144
|
}
|
|
@@ -146,15 +158,19 @@ var APPLICATIONS = {
|
|
|
146
158
|
"name": "topolo-agent",
|
|
147
159
|
"kind": "pages",
|
|
148
160
|
"apiUrl": null,
|
|
149
|
-
"domains": [
|
|
161
|
+
"domains": [
|
|
162
|
+
"agent.topolo.app"
|
|
163
|
+
],
|
|
150
164
|
"routes": [],
|
|
151
165
|
"serviceId": null
|
|
152
166
|
},
|
|
153
167
|
{
|
|
154
168
|
"name": "topolo-agent-worker",
|
|
155
169
|
"kind": "worker",
|
|
156
|
-
"apiUrl": "https://
|
|
157
|
-
"domains": [
|
|
170
|
+
"apiUrl": "https://agent-api.topolo.app",
|
|
171
|
+
"domains": [
|
|
172
|
+
"agent-api.topolo.app"
|
|
173
|
+
],
|
|
158
174
|
"routes": [],
|
|
159
175
|
"serviceId": "agent"
|
|
160
176
|
}
|
|
@@ -243,18 +259,22 @@ var APPLICATIONS = {
|
|
|
243
259
|
],
|
|
244
260
|
"deployTargets": [
|
|
245
261
|
{
|
|
246
|
-
"name": "bytes",
|
|
262
|
+
"name": "topolo-bytes",
|
|
247
263
|
"kind": "pages",
|
|
248
264
|
"apiUrl": null,
|
|
249
|
-
"domains": [
|
|
265
|
+
"domains": [
|
|
266
|
+
"bytes.topolo.app"
|
|
267
|
+
],
|
|
250
268
|
"routes": [],
|
|
251
269
|
"serviceId": null
|
|
252
270
|
},
|
|
253
271
|
{
|
|
254
|
-
"name": "
|
|
272
|
+
"name": "topolo-bytes-api",
|
|
255
273
|
"kind": "worker",
|
|
256
|
-
"apiUrl": "https://
|
|
257
|
-
"domains": [
|
|
274
|
+
"apiUrl": "https://bytes-api.topolo.app",
|
|
275
|
+
"domains": [
|
|
276
|
+
"bytes-api.topolo.app"
|
|
277
|
+
],
|
|
258
278
|
"routes": [],
|
|
259
279
|
"serviceId": "bytes"
|
|
260
280
|
}
|
|
@@ -297,10 +317,9 @@ var APPLICATIONS = {
|
|
|
297
317
|
{
|
|
298
318
|
"name": "topolo-capacity",
|
|
299
319
|
"kind": "worker",
|
|
300
|
-
"apiUrl": "https://
|
|
320
|
+
"apiUrl": "https://capacity.topolo.app",
|
|
301
321
|
"domains": [
|
|
302
|
-
"capacity.topolo.app"
|
|
303
|
-
"topolo-capacity.topolo.workers.dev"
|
|
322
|
+
"capacity.topolo.app"
|
|
304
323
|
],
|
|
305
324
|
"routes": [],
|
|
306
325
|
"serviceId": "capacity"
|
|
@@ -343,7 +362,7 @@ var APPLICATIONS = {
|
|
|
343
362
|
"cloudcontrol": {
|
|
344
363
|
"id": "cloudcontrol",
|
|
345
364
|
"appDir": "TopoloCloudControl",
|
|
346
|
-
"name": "
|
|
365
|
+
"name": "cloudcontrol",
|
|
347
366
|
"packageName": "topolo-cloudcontrol",
|
|
348
367
|
"productionUrl": null,
|
|
349
368
|
"services": [],
|
|
@@ -362,9 +381,9 @@ var APPLICATIONS = {
|
|
|
362
381
|
{
|
|
363
382
|
"name": "topolo-commerce-api",
|
|
364
383
|
"kind": "worker",
|
|
365
|
-
"apiUrl": "https://
|
|
384
|
+
"apiUrl": "https://commerce-api.topolo.app",
|
|
366
385
|
"domains": [
|
|
367
|
-
"
|
|
386
|
+
"commerce-api.topolo.app"
|
|
368
387
|
],
|
|
369
388
|
"routes": [],
|
|
370
389
|
"serviceId": "commerce"
|
|
@@ -374,8 +393,7 @@ var APPLICATIONS = {
|
|
|
374
393
|
"kind": "pages",
|
|
375
394
|
"apiUrl": null,
|
|
376
395
|
"domains": [
|
|
377
|
-
"guest.topolo.app"
|
|
378
|
-
"topolo-commerce-guest-web.pages.dev"
|
|
396
|
+
"guest.topolo.app"
|
|
379
397
|
],
|
|
380
398
|
"routes": [],
|
|
381
399
|
"serviceId": null
|
|
@@ -385,8 +403,7 @@ var APPLICATIONS = {
|
|
|
385
403
|
"kind": "pages",
|
|
386
404
|
"apiUrl": null,
|
|
387
405
|
"domains": [
|
|
388
|
-
"commerce.topolo.app"
|
|
389
|
-
"topolo-commerce-ops-web.pages.dev"
|
|
406
|
+
"commerce.topolo.app"
|
|
390
407
|
],
|
|
391
408
|
"routes": [],
|
|
392
409
|
"serviceId": null
|
|
@@ -396,8 +413,7 @@ var APPLICATIONS = {
|
|
|
396
413
|
"kind": "pages",
|
|
397
414
|
"apiUrl": null,
|
|
398
415
|
"domains": [
|
|
399
|
-
"station-commerce.topolo.app"
|
|
400
|
-
"topolo-commerce-station-web.pages.dev"
|
|
416
|
+
"station-commerce.topolo.app"
|
|
401
417
|
],
|
|
402
418
|
"routes": [],
|
|
403
419
|
"serviceId": null
|
|
@@ -439,47 +455,69 @@ var APPLICATIONS = {
|
|
|
439
455
|
],
|
|
440
456
|
"deployTargets": [
|
|
441
457
|
{
|
|
442
|
-
"name": "topolo-crm-
|
|
443
|
-
"kind": "pages",
|
|
444
|
-
"apiUrl": null,
|
|
445
|
-
"domains": [],
|
|
446
|
-
"routes": [],
|
|
447
|
-
"serviceId": null
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
"name": "topolo-crm-worker",
|
|
458
|
+
"name": "topolo-crm-api",
|
|
451
459
|
"kind": "worker",
|
|
452
460
|
"apiUrl": "https://crm-api.topolo.app",
|
|
453
|
-
"domains": [
|
|
461
|
+
"domains": [
|
|
462
|
+
"crm-api.topolo.app"
|
|
463
|
+
],
|
|
454
464
|
"routes": [],
|
|
455
465
|
"serviceId": "crm"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "topolo-crm-app",
|
|
469
|
+
"kind": "pages",
|
|
470
|
+
"apiUrl": null,
|
|
471
|
+
"domains": [
|
|
472
|
+
"crm.topolo.app"
|
|
473
|
+
],
|
|
474
|
+
"routes": [],
|
|
475
|
+
"serviceId": null
|
|
456
476
|
}
|
|
457
477
|
]
|
|
458
478
|
},
|
|
459
479
|
"customer_success": {
|
|
460
480
|
"id": "customer_success",
|
|
461
|
-
"appDir": "
|
|
462
|
-
"name": "topolo-
|
|
463
|
-
"packageName": "topolo-
|
|
464
|
-
"productionUrl": "https://
|
|
481
|
+
"appDir": "TopoloSuccess",
|
|
482
|
+
"name": "topolo-success",
|
|
483
|
+
"packageName": "topolo-success",
|
|
484
|
+
"productionUrl": "https://success.topolo.app",
|
|
465
485
|
"services": [
|
|
466
486
|
"customer_success"
|
|
467
487
|
],
|
|
468
488
|
"deployTargets": [
|
|
469
489
|
{
|
|
470
|
-
"name": "topolo-
|
|
490
|
+
"name": "topolo-success",
|
|
471
491
|
"kind": "worker",
|
|
472
|
-
"apiUrl": "https://
|
|
492
|
+
"apiUrl": "https://success.topolo.app",
|
|
473
493
|
"domains": [
|
|
474
|
-
"
|
|
494
|
+
"success.topolo.app"
|
|
475
495
|
],
|
|
476
496
|
"routes": [
|
|
477
|
-
"
|
|
497
|
+
"success.topolo.app"
|
|
478
498
|
],
|
|
479
499
|
"serviceId": "customer_success"
|
|
480
500
|
}
|
|
481
501
|
]
|
|
482
502
|
},
|
|
503
|
+
"d1_backup": {
|
|
504
|
+
"id": "d1_backup",
|
|
505
|
+
"appDir": "TopoloD1Backup",
|
|
506
|
+
"name": "topolo-d1-backup",
|
|
507
|
+
"packageName": "topolo-d1-backup",
|
|
508
|
+
"productionUrl": null,
|
|
509
|
+
"services": [],
|
|
510
|
+
"deployTargets": [
|
|
511
|
+
{
|
|
512
|
+
"name": "topolo-d1-backup",
|
|
513
|
+
"kind": "worker",
|
|
514
|
+
"apiUrl": null,
|
|
515
|
+
"domains": [],
|
|
516
|
+
"routes": [],
|
|
517
|
+
"serviceId": null
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
},
|
|
483
521
|
"developers": {
|
|
484
522
|
"id": "developers",
|
|
485
523
|
"appDir": "TopoloDevelopers",
|
|
@@ -488,6 +526,14 @@ var APPLICATIONS = {
|
|
|
488
526
|
"productionUrl": "https://developers.topolo.app",
|
|
489
527
|
"services": [],
|
|
490
528
|
"deployTargets": [
|
|
529
|
+
{
|
|
530
|
+
"name": "topolo-catalog-cron",
|
|
531
|
+
"kind": "worker",
|
|
532
|
+
"apiUrl": null,
|
|
533
|
+
"domains": [],
|
|
534
|
+
"routes": [],
|
|
535
|
+
"serviceId": null
|
|
536
|
+
},
|
|
491
537
|
{
|
|
492
538
|
"name": "topolo-developers",
|
|
493
539
|
"kind": "pages",
|
|
@@ -500,6 +546,30 @@ var APPLICATIONS = {
|
|
|
500
546
|
}
|
|
501
547
|
]
|
|
502
548
|
},
|
|
549
|
+
"director": {
|
|
550
|
+
"id": "director",
|
|
551
|
+
"appDir": "TopoloDirector",
|
|
552
|
+
"name": "topolo-director",
|
|
553
|
+
"packageName": "topolo-director",
|
|
554
|
+
"productionUrl": "https://director.topolo.app",
|
|
555
|
+
"services": [
|
|
556
|
+
"director"
|
|
557
|
+
],
|
|
558
|
+
"deployTargets": [
|
|
559
|
+
{
|
|
560
|
+
"name": "topolo-director",
|
|
561
|
+
"kind": "worker",
|
|
562
|
+
"apiUrl": "https://director.topolo.app",
|
|
563
|
+
"domains": [
|
|
564
|
+
"director.topolo.app"
|
|
565
|
+
],
|
|
566
|
+
"routes": [
|
|
567
|
+
"director.topolo.app"
|
|
568
|
+
],
|
|
569
|
+
"serviceId": "director"
|
|
570
|
+
}
|
|
571
|
+
]
|
|
572
|
+
},
|
|
503
573
|
"docs": {
|
|
504
574
|
"id": "docs",
|
|
505
575
|
"appDir": "TopoloDocs",
|
|
@@ -524,8 +594,8 @@ var APPLICATIONS = {
|
|
|
524
594
|
"id": "feed",
|
|
525
595
|
"appDir": "TopoloFeed",
|
|
526
596
|
"name": "TopoloFeed",
|
|
527
|
-
"packageName":
|
|
528
|
-
"productionUrl": "https://
|
|
597
|
+
"packageName": "topolo-feed",
|
|
598
|
+
"productionUrl": "https://feed-api.topolo.app",
|
|
529
599
|
"services": [
|
|
530
600
|
"feed"
|
|
531
601
|
],
|
|
@@ -533,24 +603,24 @@ var APPLICATIONS = {
|
|
|
533
603
|
{
|
|
534
604
|
"name": "topolo-feed-analytics-api",
|
|
535
605
|
"kind": "worker",
|
|
536
|
-
"apiUrl": "https://
|
|
606
|
+
"apiUrl": "https://feed-analytics-api.topolo.app",
|
|
537
607
|
"domains": [
|
|
538
|
-
"
|
|
608
|
+
"feed-analytics-api.topolo.app"
|
|
539
609
|
],
|
|
540
610
|
"routes": [
|
|
541
|
-
"
|
|
611
|
+
"feed-analytics-api.topolo.app"
|
|
542
612
|
],
|
|
543
613
|
"serviceId": null
|
|
544
614
|
},
|
|
545
615
|
{
|
|
546
616
|
"name": "topolo-feed-api",
|
|
547
617
|
"kind": "worker",
|
|
548
|
-
"apiUrl": "https://
|
|
618
|
+
"apiUrl": "https://feed-api.topolo.app",
|
|
549
619
|
"domains": [
|
|
550
|
-
"
|
|
620
|
+
"feed-api.topolo.app"
|
|
551
621
|
],
|
|
552
622
|
"routes": [
|
|
553
|
-
"
|
|
623
|
+
"feed-api.topolo.app"
|
|
554
624
|
],
|
|
555
625
|
"serviceId": "feed"
|
|
556
626
|
}
|
|
@@ -591,18 +661,22 @@ var APPLICATIONS = {
|
|
|
591
661
|
],
|
|
592
662
|
"deployTargets": [
|
|
593
663
|
{
|
|
594
|
-
"name": "forecast",
|
|
664
|
+
"name": "topolo-forecast",
|
|
595
665
|
"kind": "pages",
|
|
596
666
|
"apiUrl": null,
|
|
597
|
-
"domains": [
|
|
667
|
+
"domains": [
|
|
668
|
+
"forecast.topolo.app"
|
|
669
|
+
],
|
|
598
670
|
"routes": [],
|
|
599
671
|
"serviceId": null
|
|
600
672
|
},
|
|
601
673
|
{
|
|
602
|
-
"name": "forecast-
|
|
674
|
+
"name": "topolo-forecast-api",
|
|
603
675
|
"kind": "worker",
|
|
604
|
-
"apiUrl": "https://forecast-
|
|
605
|
-
"domains": [
|
|
676
|
+
"apiUrl": "https://forecast-api.topolo.app",
|
|
677
|
+
"domains": [
|
|
678
|
+
"forecast-api.topolo.app"
|
|
679
|
+
],
|
|
606
680
|
"routes": [],
|
|
607
681
|
"serviceId": "forecast"
|
|
608
682
|
}
|
|
@@ -691,7 +765,7 @@ var APPLICATIONS = {
|
|
|
691
765
|
],
|
|
692
766
|
"deployTargets": [
|
|
693
767
|
{
|
|
694
|
-
"name": "
|
|
768
|
+
"name": "topolo-learn",
|
|
695
769
|
"kind": "pages",
|
|
696
770
|
"apiUrl": null,
|
|
697
771
|
"domains": [
|
|
@@ -701,17 +775,41 @@ var APPLICATIONS = {
|
|
|
701
775
|
"serviceId": null
|
|
702
776
|
},
|
|
703
777
|
{
|
|
704
|
-
"name": "
|
|
778
|
+
"name": "topolo-learn-api",
|
|
705
779
|
"kind": "worker",
|
|
706
|
-
"apiUrl": "https://
|
|
780
|
+
"apiUrl": "https://learn-api.topolo.app",
|
|
707
781
|
"domains": [
|
|
708
|
-
"
|
|
782
|
+
"learn-api.topolo.app"
|
|
709
783
|
],
|
|
710
784
|
"routes": [],
|
|
711
785
|
"serviceId": "learn"
|
|
712
786
|
}
|
|
713
787
|
]
|
|
714
788
|
},
|
|
789
|
+
"localize": {
|
|
790
|
+
"id": "localize",
|
|
791
|
+
"appDir": "TopoloLocalize",
|
|
792
|
+
"name": "topolo-localize",
|
|
793
|
+
"packageName": "topolo-localize",
|
|
794
|
+
"productionUrl": "https://localize.topolo.app",
|
|
795
|
+
"services": [
|
|
796
|
+
"localize"
|
|
797
|
+
],
|
|
798
|
+
"deployTargets": [
|
|
799
|
+
{
|
|
800
|
+
"name": "topolo-localize",
|
|
801
|
+
"kind": "worker",
|
|
802
|
+
"apiUrl": "https://localize.topolo.app",
|
|
803
|
+
"domains": [
|
|
804
|
+
"localize.topolo.app"
|
|
805
|
+
],
|
|
806
|
+
"routes": [
|
|
807
|
+
"localize.topolo.app"
|
|
808
|
+
],
|
|
809
|
+
"serviceId": "localize"
|
|
810
|
+
}
|
|
811
|
+
]
|
|
812
|
+
},
|
|
715
813
|
"mail": {
|
|
716
814
|
"id": "mail",
|
|
717
815
|
"appDir": "TopoloMail",
|
|
@@ -749,7 +847,7 @@ var APPLICATIONS = {
|
|
|
749
847
|
"id": "mdm",
|
|
750
848
|
"appDir": "TopoloMDM",
|
|
751
849
|
"name": "TopoloMDM",
|
|
752
|
-
"packageName":
|
|
850
|
+
"packageName": "topolo-mdm",
|
|
753
851
|
"productionUrl": "https://mdm.topolo.app",
|
|
754
852
|
"services": [
|
|
755
853
|
"mdm"
|
|
@@ -758,12 +856,12 @@ var APPLICATIONS = {
|
|
|
758
856
|
{
|
|
759
857
|
"name": "topolo-mdm-api",
|
|
760
858
|
"kind": "worker",
|
|
761
|
-
"apiUrl": "https://
|
|
859
|
+
"apiUrl": "https://mdm-api.topolo.app",
|
|
762
860
|
"domains": [
|
|
763
|
-
"
|
|
861
|
+
"mdm-api.topolo.app"
|
|
764
862
|
],
|
|
765
863
|
"routes": [
|
|
766
|
-
"
|
|
864
|
+
"mdm-api.topolo.app"
|
|
767
865
|
],
|
|
768
866
|
"serviceId": "mdm"
|
|
769
867
|
},
|
|
@@ -772,8 +870,7 @@ var APPLICATIONS = {
|
|
|
772
870
|
"kind": "pages",
|
|
773
871
|
"apiUrl": null,
|
|
774
872
|
"domains": [
|
|
775
|
-
"mdm.topolo.app"
|
|
776
|
-
"topolo-mdm-console.pages.dev"
|
|
873
|
+
"mdm.topolo.app"
|
|
777
874
|
],
|
|
778
875
|
"routes": [
|
|
779
876
|
"mdm.topolo.app"
|
|
@@ -827,8 +924,7 @@ var APPLICATIONS = {
|
|
|
827
924
|
"kind": "pages",
|
|
828
925
|
"apiUrl": null,
|
|
829
926
|
"domains": [
|
|
830
|
-
"nexus.topolo.app"
|
|
831
|
-
"topolo-nexus-dashboard.pages.dev"
|
|
927
|
+
"nexus.topolo.app"
|
|
832
928
|
],
|
|
833
929
|
"routes": [],
|
|
834
930
|
"serviceId": null
|
|
@@ -836,9 +932,9 @@ var APPLICATIONS = {
|
|
|
836
932
|
{
|
|
837
933
|
"name": "topolo-nexus-gateway",
|
|
838
934
|
"kind": "worker",
|
|
839
|
-
"apiUrl": "https://
|
|
935
|
+
"apiUrl": "https://nexus-api.topolo.app",
|
|
840
936
|
"domains": [
|
|
841
|
-
"
|
|
937
|
+
"nexus-api.topolo.app"
|
|
842
938
|
],
|
|
843
939
|
"routes": [],
|
|
844
940
|
"serviceId": "nexus"
|
|
@@ -869,6 +965,15 @@ var APPLICATIONS = {
|
|
|
869
965
|
}
|
|
870
966
|
]
|
|
871
967
|
},
|
|
968
|
+
"observability_watch": {
|
|
969
|
+
"id": "observability_watch",
|
|
970
|
+
"appDir": "TopoloObservabilityWatch",
|
|
971
|
+
"name": "topolo-observability-watch",
|
|
972
|
+
"packageName": "topolo-observability-watch",
|
|
973
|
+
"productionUrl": null,
|
|
974
|
+
"services": [],
|
|
975
|
+
"deployTargets": []
|
|
976
|
+
},
|
|
872
977
|
"one": {
|
|
873
978
|
"id": "one",
|
|
874
979
|
"appDir": "TopoloOne",
|
|
@@ -876,35 +981,35 @@ var APPLICATIONS = {
|
|
|
876
981
|
"packageName": "topolo-oneclick-sso",
|
|
877
982
|
"productionUrl": "https://one.topolo.app",
|
|
878
983
|
"services": [
|
|
879
|
-
"one"
|
|
984
|
+
"one",
|
|
985
|
+
"one.ai"
|
|
880
986
|
],
|
|
881
987
|
"deployTargets": [
|
|
882
988
|
{
|
|
883
989
|
"name": "ai-chat-rag",
|
|
884
990
|
"kind": "worker",
|
|
885
|
-
"apiUrl":
|
|
991
|
+
"apiUrl": "https://ai.one.topolo.app",
|
|
886
992
|
"domains": [
|
|
887
|
-
"ai
|
|
993
|
+
"ai.one.topolo.app"
|
|
888
994
|
],
|
|
889
995
|
"routes": [],
|
|
890
|
-
"serviceId":
|
|
996
|
+
"serviceId": "one.ai"
|
|
891
997
|
},
|
|
892
998
|
{
|
|
893
|
-
"name": "
|
|
999
|
+
"name": "topolo-one",
|
|
894
1000
|
"kind": "pages",
|
|
895
1001
|
"apiUrl": null,
|
|
896
1002
|
"domains": [
|
|
897
|
-
"
|
|
1003
|
+
"one.topolo.app"
|
|
898
1004
|
],
|
|
899
1005
|
"routes": [],
|
|
900
1006
|
"serviceId": null
|
|
901
1007
|
},
|
|
902
1008
|
{
|
|
903
|
-
"name": "
|
|
1009
|
+
"name": "topolo-one-website",
|
|
904
1010
|
"kind": "worker",
|
|
905
1011
|
"apiUrl": null,
|
|
906
1012
|
"domains": [
|
|
907
|
-
"one.topolo.io",
|
|
908
1013
|
"topolo.io",
|
|
909
1014
|
"www.topolo.io"
|
|
910
1015
|
],
|
|
@@ -912,17 +1017,47 @@ var APPLICATIONS = {
|
|
|
912
1017
|
"serviceId": null
|
|
913
1018
|
},
|
|
914
1019
|
{
|
|
915
|
-
"name": "
|
|
1020
|
+
"name": "topolo-one-worker",
|
|
916
1021
|
"kind": "worker",
|
|
917
1022
|
"apiUrl": "https://one.topolo.app",
|
|
918
|
-
"domains": [
|
|
1023
|
+
"domains": [
|
|
1024
|
+
"one.topolo.app",
|
|
1025
|
+
"topolo.app",
|
|
1026
|
+
"www.topolo.app"
|
|
1027
|
+
],
|
|
919
1028
|
"routes": [
|
|
920
|
-
"one.topolo.app/*"
|
|
1029
|
+
"one.topolo.app/*",
|
|
1030
|
+
"topolo.app",
|
|
1031
|
+
"www.topolo.app/*"
|
|
921
1032
|
],
|
|
922
1033
|
"serviceId": "one"
|
|
923
1034
|
}
|
|
924
1035
|
]
|
|
925
1036
|
},
|
|
1037
|
+
"p2p": {
|
|
1038
|
+
"id": "p2p",
|
|
1039
|
+
"appDir": "TopoloP2P",
|
|
1040
|
+
"name": "topolo-p2p",
|
|
1041
|
+
"packageName": "topolo-p2p",
|
|
1042
|
+
"productionUrl": "https://p2p.topolo.app",
|
|
1043
|
+
"services": [
|
|
1044
|
+
"p2p"
|
|
1045
|
+
],
|
|
1046
|
+
"deployTargets": [
|
|
1047
|
+
{
|
|
1048
|
+
"name": "topolo-p2p",
|
|
1049
|
+
"kind": "worker",
|
|
1050
|
+
"apiUrl": "https://p2p.topolo.app",
|
|
1051
|
+
"domains": [
|
|
1052
|
+
"p2p.topolo.app"
|
|
1053
|
+
],
|
|
1054
|
+
"routes": [
|
|
1055
|
+
"p2p.topolo.app"
|
|
1056
|
+
],
|
|
1057
|
+
"serviceId": "p2p"
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
926
1061
|
"pay": {
|
|
927
1062
|
"id": "pay",
|
|
928
1063
|
"appDir": "TopoloPay",
|
|
@@ -936,8 +1071,10 @@ var APPLICATIONS = {
|
|
|
936
1071
|
{
|
|
937
1072
|
"name": "topolo-pay",
|
|
938
1073
|
"kind": "worker",
|
|
939
|
-
"apiUrl": "https://
|
|
940
|
-
"domains": [
|
|
1074
|
+
"apiUrl": "https://pay.topolo.app",
|
|
1075
|
+
"domains": [
|
|
1076
|
+
"pay.topolo.app"
|
|
1077
|
+
],
|
|
941
1078
|
"routes": [],
|
|
942
1079
|
"serviceId": "pay"
|
|
943
1080
|
}
|
|
@@ -967,11 +1104,20 @@ var APPLICATIONS = {
|
|
|
967
1104
|
}
|
|
968
1105
|
]
|
|
969
1106
|
},
|
|
1107
|
+
"pulse": {
|
|
1108
|
+
"id": "pulse",
|
|
1109
|
+
"appDir": "TopoloPulse",
|
|
1110
|
+
"name": "topolo-pulse",
|
|
1111
|
+
"packageName": "topolo-pulse",
|
|
1112
|
+
"productionUrl": null,
|
|
1113
|
+
"services": [],
|
|
1114
|
+
"deployTargets": []
|
|
1115
|
+
},
|
|
970
1116
|
"quro": {
|
|
971
1117
|
"id": "quro",
|
|
972
1118
|
"appDir": "TopoloQuro",
|
|
973
1119
|
"name": "TopoloQuro",
|
|
974
|
-
"packageName":
|
|
1120
|
+
"packageName": "topolo-quro",
|
|
975
1121
|
"productionUrl": "https://quro.topolo.app",
|
|
976
1122
|
"services": [
|
|
977
1123
|
"quro.api",
|
|
@@ -982,7 +1128,9 @@ var APPLICATIONS = {
|
|
|
982
1128
|
"name": "quro-api",
|
|
983
1129
|
"kind": "worker",
|
|
984
1130
|
"apiUrl": "https://api.ol0.me",
|
|
985
|
-
"domains": [
|
|
1131
|
+
"domains": [
|
|
1132
|
+
"api.ol0.me"
|
|
1133
|
+
],
|
|
986
1134
|
"routes": [],
|
|
987
1135
|
"serviceId": "quro.api"
|
|
988
1136
|
},
|
|
@@ -990,7 +1138,9 @@ var APPLICATIONS = {
|
|
|
990
1138
|
"name": "quro-redirect-system",
|
|
991
1139
|
"kind": "worker",
|
|
992
1140
|
"apiUrl": "https://ol0.me",
|
|
993
|
-
"domains": [
|
|
1141
|
+
"domains": [
|
|
1142
|
+
"ol0.me"
|
|
1143
|
+
],
|
|
994
1144
|
"routes": [
|
|
995
1145
|
"ol0.me/*"
|
|
996
1146
|
],
|
|
@@ -1000,7 +1150,9 @@ var APPLICATIONS = {
|
|
|
1000
1150
|
"name": "quro-ui",
|
|
1001
1151
|
"kind": "pages",
|
|
1002
1152
|
"apiUrl": null,
|
|
1003
|
-
"domains": [
|
|
1153
|
+
"domains": [
|
|
1154
|
+
"quro.topolo.app"
|
|
1155
|
+
],
|
|
1004
1156
|
"routes": [],
|
|
1005
1157
|
"serviceId": null
|
|
1006
1158
|
}
|
|
@@ -1017,7 +1169,7 @@ var APPLICATIONS = {
|
|
|
1017
1169
|
],
|
|
1018
1170
|
"deployTargets": [
|
|
1019
1171
|
{
|
|
1020
|
-
"name": "roadmapper",
|
|
1172
|
+
"name": "topolo-roadmapper",
|
|
1021
1173
|
"kind": "pages",
|
|
1022
1174
|
"apiUrl": null,
|
|
1023
1175
|
"domains": [
|
|
@@ -1027,7 +1179,7 @@ var APPLICATIONS = {
|
|
|
1027
1179
|
"serviceId": null
|
|
1028
1180
|
},
|
|
1029
1181
|
{
|
|
1030
|
-
"name": "topolo-
|
|
1182
|
+
"name": "topolo-roadmapper-api",
|
|
1031
1183
|
"kind": "worker",
|
|
1032
1184
|
"apiUrl": "https://roadmapper-api.topolo.app",
|
|
1033
1185
|
"domains": [
|
|
@@ -1076,15 +1228,19 @@ var APPLICATIONS = {
|
|
|
1076
1228
|
"name": "topolo-social-studio",
|
|
1077
1229
|
"kind": "pages",
|
|
1078
1230
|
"apiUrl": null,
|
|
1079
|
-
"domains": [
|
|
1231
|
+
"domains": [
|
|
1232
|
+
"studio.topolo.app"
|
|
1233
|
+
],
|
|
1080
1234
|
"routes": [],
|
|
1081
1235
|
"serviceId": null
|
|
1082
1236
|
},
|
|
1083
1237
|
{
|
|
1084
1238
|
"name": "topolo-social-studio-api",
|
|
1085
1239
|
"kind": "worker",
|
|
1086
|
-
"apiUrl": "https://
|
|
1087
|
-
"domains": [
|
|
1240
|
+
"apiUrl": "https://studio-api.topolo.app",
|
|
1241
|
+
"domains": [
|
|
1242
|
+
"studio-api.topolo.app"
|
|
1243
|
+
],
|
|
1088
1244
|
"routes": [],
|
|
1089
1245
|
"serviceId": "social_studio"
|
|
1090
1246
|
},
|
|
@@ -1109,23 +1265,27 @@ var APPLICATIONS = {
|
|
|
1109
1265
|
],
|
|
1110
1266
|
"deployTargets": [
|
|
1111
1267
|
{
|
|
1112
|
-
"name": "socialize",
|
|
1268
|
+
"name": "topolo-socialize",
|
|
1113
1269
|
"kind": "pages",
|
|
1114
1270
|
"apiUrl": null,
|
|
1115
|
-
"domains": [
|
|
1271
|
+
"domains": [
|
|
1272
|
+
"socialize.topolo.app"
|
|
1273
|
+
],
|
|
1116
1274
|
"routes": [],
|
|
1117
1275
|
"serviceId": null
|
|
1118
1276
|
},
|
|
1119
1277
|
{
|
|
1120
|
-
"name": "socialize-
|
|
1278
|
+
"name": "topolo-socialize-api",
|
|
1121
1279
|
"kind": "worker",
|
|
1122
|
-
"apiUrl": "https://socialize-
|
|
1123
|
-
"domains": [
|
|
1280
|
+
"apiUrl": "https://socialize-api.topolo.app",
|
|
1281
|
+
"domains": [
|
|
1282
|
+
"socialize-api.topolo.app"
|
|
1283
|
+
],
|
|
1124
1284
|
"routes": [],
|
|
1125
1285
|
"serviceId": "socialize"
|
|
1126
1286
|
},
|
|
1127
1287
|
{
|
|
1128
|
-
"name": "socialize-
|
|
1288
|
+
"name": "topolo-socialize-scheduler",
|
|
1129
1289
|
"kind": "worker",
|
|
1130
1290
|
"apiUrl": null,
|
|
1131
1291
|
"domains": [],
|
|
@@ -1134,6 +1294,30 @@ var APPLICATIONS = {
|
|
|
1134
1294
|
}
|
|
1135
1295
|
]
|
|
1136
1296
|
},
|
|
1297
|
+
"status": {
|
|
1298
|
+
"id": "status",
|
|
1299
|
+
"appDir": "TopoloStatus",
|
|
1300
|
+
"name": "topolo-status",
|
|
1301
|
+
"packageName": "topolo-status",
|
|
1302
|
+
"productionUrl": "https://status.topolo.app",
|
|
1303
|
+
"services": [
|
|
1304
|
+
"status"
|
|
1305
|
+
],
|
|
1306
|
+
"deployTargets": [
|
|
1307
|
+
{
|
|
1308
|
+
"name": "topolo-status",
|
|
1309
|
+
"kind": "worker",
|
|
1310
|
+
"apiUrl": "https://status.topolo.app",
|
|
1311
|
+
"domains": [
|
|
1312
|
+
"status.topolo.app"
|
|
1313
|
+
],
|
|
1314
|
+
"routes": [
|
|
1315
|
+
"status.topolo.app"
|
|
1316
|
+
],
|
|
1317
|
+
"serviceId": "status"
|
|
1318
|
+
}
|
|
1319
|
+
]
|
|
1320
|
+
},
|
|
1137
1321
|
"support": {
|
|
1138
1322
|
"id": "support",
|
|
1139
1323
|
"appDir": "TopoloSupport",
|
|
@@ -1217,7 +1401,7 @@ var APPLICATIONS = {
|
|
|
1217
1401
|
],
|
|
1218
1402
|
"deployTargets": [
|
|
1219
1403
|
{
|
|
1220
|
-
"name": "
|
|
1404
|
+
"name": "topolo-web-api",
|
|
1221
1405
|
"kind": "worker",
|
|
1222
1406
|
"apiUrl": "https://web-api.topolo.app",
|
|
1223
1407
|
"domains": [
|
|
@@ -1227,7 +1411,7 @@ var APPLICATIONS = {
|
|
|
1227
1411
|
"serviceId": "web"
|
|
1228
1412
|
},
|
|
1229
1413
|
{
|
|
1230
|
-
"name": "
|
|
1414
|
+
"name": "topolo-web-runtime",
|
|
1231
1415
|
"kind": "worker",
|
|
1232
1416
|
"apiUrl": "https://sites.topolo.app",
|
|
1233
1417
|
"domains": [
|
|
@@ -1237,7 +1421,7 @@ var APPLICATIONS = {
|
|
|
1237
1421
|
"serviceId": null
|
|
1238
1422
|
},
|
|
1239
1423
|
{
|
|
1240
|
-
"name": "
|
|
1424
|
+
"name": "topolo-web-studio",
|
|
1241
1425
|
"kind": "pages",
|
|
1242
1426
|
"apiUrl": null,
|
|
1243
1427
|
"domains": [
|
|
@@ -1251,7 +1435,7 @@ var APPLICATIONS = {
|
|
|
1251
1435
|
};
|
|
1252
1436
|
|
|
1253
1437
|
// src/application-requirements.ts
|
|
1254
|
-
var APPLICATION_REQUIREMENTS_VERSION = "2026-
|
|
1438
|
+
var APPLICATION_REQUIREMENTS_VERSION = "2026-05-01.1";
|
|
1255
1439
|
var APPLICATION_REQUIREMENTS = [
|
|
1256
1440
|
{
|
|
1257
1441
|
id: "platform-metadata",
|
|
@@ -1309,14 +1493,16 @@ var APPLICATION_REQUIREMENTS = [
|
|
|
1309
1493
|
evidence: [
|
|
1310
1494
|
"@topolo/ui-kit is used for the platform shell where the app has authenticated UI",
|
|
1311
1495
|
"The shared launcher/app switcher is reachable from authenticated app chrome",
|
|
1312
|
-
"Account menu and sign-out behavior use TopoloAppShell or TopoloAccountMenu"
|
|
1496
|
+
"Account menu and sign-out behavior use TopoloAppShell or TopoloAccountMenu",
|
|
1497
|
+
"Authenticated app body content stays inside the viewport on mobile and desktop widths"
|
|
1313
1498
|
],
|
|
1314
1499
|
implementation: [
|
|
1315
1500
|
"Use TopoloAppShell for authenticated app layouts",
|
|
1316
1501
|
"Use TopoloAccountMenu when a partial-shell surface still needs account chrome",
|
|
1317
1502
|
"Pass app-specific account actions as additive menu items instead of forking dropdowns",
|
|
1318
1503
|
"Use shared design tokens and platform UI primitives before creating local equivalents",
|
|
1319
|
-
"Keep mobile and desktop shell behavior aligned with the platform UI kit"
|
|
1504
|
+
"Keep mobile and desktop shell behavior aligned with the platform UI kit",
|
|
1505
|
+
"Constrain app-owned workspace wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"
|
|
1320
1506
|
]
|
|
1321
1507
|
},
|
|
1322
1508
|
{
|
|
@@ -1895,6 +2081,222 @@ var IdentityModule = class {
|
|
|
1895
2081
|
}
|
|
1896
2082
|
};
|
|
1897
2083
|
|
|
2084
|
+
// src/modules/p2p.ts
|
|
2085
|
+
var P2PModule = class {
|
|
2086
|
+
constructor(client) {
|
|
2087
|
+
this.client = client;
|
|
2088
|
+
}
|
|
2089
|
+
client;
|
|
2090
|
+
// Directory ----------------------------------------------------------------
|
|
2091
|
+
async listDirectory(options = {}) {
|
|
2092
|
+
const res = await this.client.request({
|
|
2093
|
+
service: "p2p",
|
|
2094
|
+
path: "/api/directory/capabilities",
|
|
2095
|
+
query: { limit: options.limit }
|
|
2096
|
+
});
|
|
2097
|
+
return res.data.capabilities;
|
|
2098
|
+
}
|
|
2099
|
+
async getCapability(capabilityId) {
|
|
2100
|
+
if (!capabilityId) throw new Error("capabilityId is required");
|
|
2101
|
+
try {
|
|
2102
|
+
const res = await this.client.request({
|
|
2103
|
+
service: "p2p",
|
|
2104
|
+
path: `/api/directory/capabilities/${encodeURIComponent(capabilityId)}`
|
|
2105
|
+
});
|
|
2106
|
+
return res.data.capability;
|
|
2107
|
+
} catch (err) {
|
|
2108
|
+
if (isNotFound(err)) return null;
|
|
2109
|
+
throw err;
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
async publishCapability(input) {
|
|
2113
|
+
const res = await this.client.request({
|
|
2114
|
+
service: "p2p",
|
|
2115
|
+
method: "POST",
|
|
2116
|
+
path: "/api/p2p/internal/capabilities/sync",
|
|
2117
|
+
body: {
|
|
2118
|
+
capability_id: input.capability_id,
|
|
2119
|
+
publisher_org_id: input.publisher_org_id,
|
|
2120
|
+
app_id: input.app_id,
|
|
2121
|
+
service_id: input.service_id,
|
|
2122
|
+
name: input.name,
|
|
2123
|
+
description: input.description,
|
|
2124
|
+
category: input.category,
|
|
2125
|
+
pricing_model: input.pricing_model,
|
|
2126
|
+
pricing_amount_minor: input.pricing_amount_minor ?? null,
|
|
2127
|
+
currency: input.currency ?? null,
|
|
2128
|
+
requires_human_approval: input.requires_human_approval ?? false,
|
|
2129
|
+
supported_contexts: input.supported_contexts,
|
|
2130
|
+
trust_level: input.trust_level ?? "standard",
|
|
2131
|
+
public_directory_visible: input.public_directory_visible,
|
|
2132
|
+
source_revision: input.source_revision,
|
|
2133
|
+
input_schema: input.input_schema ?? {},
|
|
2134
|
+
output_schema: input.output_schema ?? {},
|
|
2135
|
+
acting_for_org_id: input.acting_for_org_id ?? input.publisher_org_id
|
|
2136
|
+
},
|
|
2137
|
+
confirm: true
|
|
2138
|
+
});
|
|
2139
|
+
return res.data.capability;
|
|
2140
|
+
}
|
|
2141
|
+
// Actions ------------------------------------------------------------------
|
|
2142
|
+
async listActions(options = {}) {
|
|
2143
|
+
const res = await this.client.request({
|
|
2144
|
+
service: "p2p",
|
|
2145
|
+
path: "/api/actions",
|
|
2146
|
+
query: { state: options.state, limit: options.limit }
|
|
2147
|
+
});
|
|
2148
|
+
return res.data.actions;
|
|
2149
|
+
}
|
|
2150
|
+
async getAction(requestId) {
|
|
2151
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2152
|
+
try {
|
|
2153
|
+
const res = await this.client.request({
|
|
2154
|
+
service: "p2p",
|
|
2155
|
+
path: `/api/actions/${encodeURIComponent(requestId)}`
|
|
2156
|
+
});
|
|
2157
|
+
return res.data;
|
|
2158
|
+
} catch (err) {
|
|
2159
|
+
if (isNotFound(err)) return null;
|
|
2160
|
+
throw err;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
async requestAction(input) {
|
|
2164
|
+
if (!input.capability_id) throw new Error("capability_id is required");
|
|
2165
|
+
if (!input.idempotency_key) throw new Error("idempotency_key is required");
|
|
2166
|
+
const res = await this.client.request({
|
|
2167
|
+
service: "p2p",
|
|
2168
|
+
method: "POST",
|
|
2169
|
+
path: "/api/actions/request",
|
|
2170
|
+
body: {
|
|
2171
|
+
capability_id: input.capability_id,
|
|
2172
|
+
idempotency_key: input.idempotency_key,
|
|
2173
|
+
inputs: input.inputs ?? {}
|
|
2174
|
+
},
|
|
2175
|
+
confirm: true
|
|
2176
|
+
});
|
|
2177
|
+
return res.data;
|
|
2178
|
+
}
|
|
2179
|
+
async respondAction(requestId, response, extras = {}) {
|
|
2180
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2181
|
+
const res = await this.client.request({
|
|
2182
|
+
service: "p2p",
|
|
2183
|
+
method: "POST",
|
|
2184
|
+
path: `/api/actions/${encodeURIComponent(requestId)}/respond`,
|
|
2185
|
+
body: { response, ...extras },
|
|
2186
|
+
confirm: true
|
|
2187
|
+
});
|
|
2188
|
+
return res.data.request;
|
|
2189
|
+
}
|
|
2190
|
+
async completeAction(requestId, result = {}) {
|
|
2191
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2192
|
+
const res = await this.client.request({
|
|
2193
|
+
service: "p2p",
|
|
2194
|
+
method: "POST",
|
|
2195
|
+
path: `/api/actions/${encodeURIComponent(requestId)}/complete`,
|
|
2196
|
+
body: { result },
|
|
2197
|
+
confirm: true
|
|
2198
|
+
});
|
|
2199
|
+
return res.data.request;
|
|
2200
|
+
}
|
|
2201
|
+
async disputeAction(requestId, reason) {
|
|
2202
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2203
|
+
const res = await this.client.request({
|
|
2204
|
+
service: "p2p",
|
|
2205
|
+
method: "POST",
|
|
2206
|
+
path: `/api/actions/${encodeURIComponent(requestId)}/dispute`,
|
|
2207
|
+
body: { reason },
|
|
2208
|
+
confirm: true
|
|
2209
|
+
});
|
|
2210
|
+
return res.data.request;
|
|
2211
|
+
}
|
|
2212
|
+
// Policy + connections + ledger + settlement -----------------------------
|
|
2213
|
+
async getPolicy() {
|
|
2214
|
+
const res = await this.client.request({
|
|
2215
|
+
service: "p2p",
|
|
2216
|
+
path: "/api/policies"
|
|
2217
|
+
});
|
|
2218
|
+
return res.data.policy;
|
|
2219
|
+
}
|
|
2220
|
+
async updatePolicy(policy) {
|
|
2221
|
+
const res = await this.client.request({
|
|
2222
|
+
service: "p2p",
|
|
2223
|
+
method: "PUT",
|
|
2224
|
+
path: "/api/policies",
|
|
2225
|
+
body: policy,
|
|
2226
|
+
confirm: true
|
|
2227
|
+
});
|
|
2228
|
+
return res.data.policy;
|
|
2229
|
+
}
|
|
2230
|
+
async listConnections() {
|
|
2231
|
+
const res = await this.client.request({
|
|
2232
|
+
service: "p2p",
|
|
2233
|
+
path: "/api/connections"
|
|
2234
|
+
});
|
|
2235
|
+
return res.data.connections;
|
|
2236
|
+
}
|
|
2237
|
+
async createConnection(counterpartyOrgId, options = {}) {
|
|
2238
|
+
if (!counterpartyOrgId) throw new Error("counterpartyOrgId is required");
|
|
2239
|
+
const res = await this.client.request({
|
|
2240
|
+
service: "p2p",
|
|
2241
|
+
method: "POST",
|
|
2242
|
+
path: "/api/connections",
|
|
2243
|
+
body: { counterparty_org_id: counterpartyOrgId, status: options.status ?? "active" },
|
|
2244
|
+
confirm: true
|
|
2245
|
+
});
|
|
2246
|
+
return res.data.connection;
|
|
2247
|
+
}
|
|
2248
|
+
async revokeConnection(connectionId) {
|
|
2249
|
+
if (!connectionId) throw new Error("connectionId is required");
|
|
2250
|
+
await this.client.request({
|
|
2251
|
+
service: "p2p",
|
|
2252
|
+
method: "DELETE",
|
|
2253
|
+
path: `/api/connections/${encodeURIComponent(connectionId)}`,
|
|
2254
|
+
confirm: true
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
async listLedger() {
|
|
2258
|
+
const res = await this.client.request({
|
|
2259
|
+
service: "p2p",
|
|
2260
|
+
path: "/api/ledger"
|
|
2261
|
+
});
|
|
2262
|
+
return res.data.ledger_entries;
|
|
2263
|
+
}
|
|
2264
|
+
async previewSettlements(filters = {}) {
|
|
2265
|
+
const res = await this.client.request({
|
|
2266
|
+
service: "p2p",
|
|
2267
|
+
method: "POST",
|
|
2268
|
+
path: "/api/settlements/preview",
|
|
2269
|
+
body: filters,
|
|
2270
|
+
confirm: true
|
|
2271
|
+
});
|
|
2272
|
+
return res.data.groups;
|
|
2273
|
+
}
|
|
2274
|
+
async createSettlement(filters = {}) {
|
|
2275
|
+
const res = await this.client.request({
|
|
2276
|
+
service: "p2p",
|
|
2277
|
+
method: "POST",
|
|
2278
|
+
path: "/api/settlements/create",
|
|
2279
|
+
body: { trigger: "manual", ...filters },
|
|
2280
|
+
confirm: true
|
|
2281
|
+
});
|
|
2282
|
+
return res.data;
|
|
2283
|
+
}
|
|
2284
|
+
async releaseHold(holdId, resolution, options = {}) {
|
|
2285
|
+
if (!holdId) throw new Error("holdId is required");
|
|
2286
|
+
const res = await this.client.request({
|
|
2287
|
+
service: "p2p",
|
|
2288
|
+
method: "POST",
|
|
2289
|
+
path: `/api/holds/${encodeURIComponent(holdId)}/release`,
|
|
2290
|
+
body: { resolution, reason: options.reason ?? null },
|
|
2291
|
+
confirm: true
|
|
2292
|
+
});
|
|
2293
|
+
return res.data;
|
|
2294
|
+
}
|
|
2295
|
+
};
|
|
2296
|
+
function isNotFound(err) {
|
|
2297
|
+
return Boolean(err && typeof err === "object" && "status" in err && err.status === 404);
|
|
2298
|
+
}
|
|
2299
|
+
|
|
1898
2300
|
// src/oauth.ts
|
|
1899
2301
|
var DEVICE_GRANT = "urn:ietf:params:oauth:grant-type:device_code";
|
|
1900
2302
|
var TopoloOAuth = class {
|
|
@@ -2146,6 +2548,7 @@ export {
|
|
|
2146
2548
|
CrmModule,
|
|
2147
2549
|
DEFAULT_SERVICE_URLS,
|
|
2148
2550
|
IdentityModule,
|
|
2551
|
+
P2PModule,
|
|
2149
2552
|
PLATFORM_SERVICE_IDS,
|
|
2150
2553
|
TOPOLO_WIDGET_ENDPOINT,
|
|
2151
2554
|
TOPOLO_WIDGET_REFRESH_INTERVAL_MS,
|