@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.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
CrmModule: () => CrmModule,
|
|
27
27
|
DEFAULT_SERVICE_URLS: () => DEFAULT_SERVICE_URLS,
|
|
28
28
|
IdentityModule: () => IdentityModule,
|
|
29
|
+
P2PModule: () => P2PModule,
|
|
29
30
|
PLATFORM_SERVICE_IDS: () => PLATFORM_SERVICE_IDS,
|
|
30
31
|
TOPOLO_WIDGET_ENDPOINT: () => TOPOLO_WIDGET_ENDPOINT,
|
|
31
32
|
TOPOLO_WIDGET_REFRESH_INTERVAL_MS: () => TOPOLO_WIDGET_REFRESH_INTERVAL_MS,
|
|
@@ -112,39 +113,44 @@ var TopoloHttpError = class extends TopoloSdkError {
|
|
|
112
113
|
|
|
113
114
|
// src/services.generated.ts
|
|
114
115
|
var SERVICES = {
|
|
115
|
-
agent: "https://
|
|
116
|
+
agent: "https://agent-api.topolo.app",
|
|
116
117
|
auth: "https://auth.topolo.app",
|
|
117
118
|
books: "https://books.topolo.app",
|
|
118
119
|
bugfix: "https://bugfix.topolo.app",
|
|
119
|
-
bytes: "https://
|
|
120
|
+
bytes: "https://bytes-api.topolo.app",
|
|
120
121
|
calendar: "https://calendar.topolo.app",
|
|
121
|
-
capacity: "https://
|
|
122
|
+
capacity: "https://capacity.topolo.app",
|
|
122
123
|
chat: "https://chat.topolo.app",
|
|
123
|
-
commerce: "https://
|
|
124
|
+
commerce: "https://commerce-api.topolo.app",
|
|
124
125
|
compose: "https://compose.topolo.app",
|
|
125
126
|
crm: "https://crm-api.topolo.app",
|
|
126
|
-
customer_success: "https://
|
|
127
|
-
|
|
127
|
+
customer_success: "https://success.topolo.app",
|
|
128
|
+
director: "https://director.topolo.app",
|
|
129
|
+
feed: "https://feed-api.topolo.app",
|
|
128
130
|
flow: "https://flow.topolo.app",
|
|
129
|
-
forecast: "https://forecast-
|
|
131
|
+
forecast: "https://forecast-api.topolo.app",
|
|
130
132
|
forms: "https://forms.topolo.app",
|
|
131
133
|
insights: "https://insights.topolo.app",
|
|
132
134
|
inventory: "https://inventory.topolo.app",
|
|
133
|
-
learn: "https://
|
|
135
|
+
learn: "https://learn-api.topolo.app",
|
|
136
|
+
localize: "https://localize.topolo.app",
|
|
134
137
|
mail: "https://mail.topolo.app",
|
|
135
|
-
mdm: "https://
|
|
138
|
+
mdm: "https://mdm-api.topolo.app",
|
|
136
139
|
messaging: "https://messages.topolo.app",
|
|
137
|
-
nexus: "https://
|
|
140
|
+
nexus: "https://nexus-api.topolo.app",
|
|
138
141
|
notify: "https://notify.topolo.app",
|
|
139
142
|
one: "https://one.topolo.app",
|
|
140
|
-
|
|
143
|
+
"one.ai": "https://ai.one.topolo.app",
|
|
144
|
+
p2p: "https://p2p.topolo.app",
|
|
145
|
+
pay: "https://pay.topolo.app",
|
|
141
146
|
people: "https://people.topolo.app",
|
|
142
147
|
"quro.api": "https://api.ol0.me",
|
|
143
148
|
"quro.redirect": "https://ol0.me",
|
|
144
149
|
roadmapper: "https://roadmapper-api.topolo.app",
|
|
145
150
|
sign: "https://sign.topolo.app",
|
|
146
|
-
social_studio: "https://
|
|
147
|
-
socialize: "https://socialize-
|
|
151
|
+
social_studio: "https://studio-api.topolo.app",
|
|
152
|
+
socialize: "https://socialize-api.topolo.app",
|
|
153
|
+
status: "https://status.topolo.app",
|
|
148
154
|
support: "https://support.topolo.app",
|
|
149
155
|
survey: "https://survey.topolo.app",
|
|
150
156
|
voice: "https://voice.topolo.app",
|
|
@@ -152,16 +158,21 @@ var SERVICES = {
|
|
|
152
158
|
};
|
|
153
159
|
var PLATFORM_SERVICE_IDS = {
|
|
154
160
|
books: "srv_topolo_books",
|
|
161
|
+
bugfix: "srv_topolo_bugfix",
|
|
155
162
|
compose: "srv_topolo_compose",
|
|
156
163
|
crm: "srv_iCwM4jGXcwlj",
|
|
157
|
-
customer_success: "
|
|
164
|
+
customer_success: "srv_topolo_success",
|
|
165
|
+
director: "srv_topolo_director",
|
|
158
166
|
flow: "srv_topolo_flow",
|
|
159
167
|
forms: "srv_topolo_forms",
|
|
160
168
|
insights: "srv_topolo_insights",
|
|
161
169
|
inventory: "srv_topolo_inventory",
|
|
170
|
+
localize: "srv_topolo_localize",
|
|
162
171
|
notify: "svc_topolo_notify",
|
|
172
|
+
p2p: "srv_topolo_p2p",
|
|
163
173
|
people: "srv_topolo_people",
|
|
164
174
|
sign: "srv_topolo_sign",
|
|
175
|
+
status: "srv_topolo_status",
|
|
165
176
|
survey: "srv_topolo_survey",
|
|
166
177
|
voice: "srv_topolo_voice"
|
|
167
178
|
};
|
|
@@ -180,7 +191,9 @@ var APPLICATIONS = {
|
|
|
180
191
|
"name": "topoloadmin",
|
|
181
192
|
"kind": "pages",
|
|
182
193
|
"apiUrl": null,
|
|
183
|
-
"domains": [
|
|
194
|
+
"domains": [
|
|
195
|
+
"admin.topolo.app"
|
|
196
|
+
],
|
|
184
197
|
"routes": [],
|
|
185
198
|
"serviceId": null
|
|
186
199
|
}
|
|
@@ -200,15 +213,19 @@ var APPLICATIONS = {
|
|
|
200
213
|
"name": "topolo-agent",
|
|
201
214
|
"kind": "pages",
|
|
202
215
|
"apiUrl": null,
|
|
203
|
-
"domains": [
|
|
216
|
+
"domains": [
|
|
217
|
+
"agent.topolo.app"
|
|
218
|
+
],
|
|
204
219
|
"routes": [],
|
|
205
220
|
"serviceId": null
|
|
206
221
|
},
|
|
207
222
|
{
|
|
208
223
|
"name": "topolo-agent-worker",
|
|
209
224
|
"kind": "worker",
|
|
210
|
-
"apiUrl": "https://
|
|
211
|
-
"domains": [
|
|
225
|
+
"apiUrl": "https://agent-api.topolo.app",
|
|
226
|
+
"domains": [
|
|
227
|
+
"agent-api.topolo.app"
|
|
228
|
+
],
|
|
212
229
|
"routes": [],
|
|
213
230
|
"serviceId": "agent"
|
|
214
231
|
}
|
|
@@ -297,18 +314,22 @@ var APPLICATIONS = {
|
|
|
297
314
|
],
|
|
298
315
|
"deployTargets": [
|
|
299
316
|
{
|
|
300
|
-
"name": "bytes",
|
|
317
|
+
"name": "topolo-bytes",
|
|
301
318
|
"kind": "pages",
|
|
302
319
|
"apiUrl": null,
|
|
303
|
-
"domains": [
|
|
320
|
+
"domains": [
|
|
321
|
+
"bytes.topolo.app"
|
|
322
|
+
],
|
|
304
323
|
"routes": [],
|
|
305
324
|
"serviceId": null
|
|
306
325
|
},
|
|
307
326
|
{
|
|
308
|
-
"name": "
|
|
327
|
+
"name": "topolo-bytes-api",
|
|
309
328
|
"kind": "worker",
|
|
310
|
-
"apiUrl": "https://
|
|
311
|
-
"domains": [
|
|
329
|
+
"apiUrl": "https://bytes-api.topolo.app",
|
|
330
|
+
"domains": [
|
|
331
|
+
"bytes-api.topolo.app"
|
|
332
|
+
],
|
|
312
333
|
"routes": [],
|
|
313
334
|
"serviceId": "bytes"
|
|
314
335
|
}
|
|
@@ -351,10 +372,9 @@ var APPLICATIONS = {
|
|
|
351
372
|
{
|
|
352
373
|
"name": "topolo-capacity",
|
|
353
374
|
"kind": "worker",
|
|
354
|
-
"apiUrl": "https://
|
|
375
|
+
"apiUrl": "https://capacity.topolo.app",
|
|
355
376
|
"domains": [
|
|
356
|
-
"capacity.topolo.app"
|
|
357
|
-
"topolo-capacity.topolo.workers.dev"
|
|
377
|
+
"capacity.topolo.app"
|
|
358
378
|
],
|
|
359
379
|
"routes": [],
|
|
360
380
|
"serviceId": "capacity"
|
|
@@ -397,7 +417,7 @@ var APPLICATIONS = {
|
|
|
397
417
|
"cloudcontrol": {
|
|
398
418
|
"id": "cloudcontrol",
|
|
399
419
|
"appDir": "TopoloCloudControl",
|
|
400
|
-
"name": "
|
|
420
|
+
"name": "cloudcontrol",
|
|
401
421
|
"packageName": "topolo-cloudcontrol",
|
|
402
422
|
"productionUrl": null,
|
|
403
423
|
"services": [],
|
|
@@ -416,9 +436,9 @@ var APPLICATIONS = {
|
|
|
416
436
|
{
|
|
417
437
|
"name": "topolo-commerce-api",
|
|
418
438
|
"kind": "worker",
|
|
419
|
-
"apiUrl": "https://
|
|
439
|
+
"apiUrl": "https://commerce-api.topolo.app",
|
|
420
440
|
"domains": [
|
|
421
|
-
"
|
|
441
|
+
"commerce-api.topolo.app"
|
|
422
442
|
],
|
|
423
443
|
"routes": [],
|
|
424
444
|
"serviceId": "commerce"
|
|
@@ -428,8 +448,7 @@ var APPLICATIONS = {
|
|
|
428
448
|
"kind": "pages",
|
|
429
449
|
"apiUrl": null,
|
|
430
450
|
"domains": [
|
|
431
|
-
"guest.topolo.app"
|
|
432
|
-
"topolo-commerce-guest-web.pages.dev"
|
|
451
|
+
"guest.topolo.app"
|
|
433
452
|
],
|
|
434
453
|
"routes": [],
|
|
435
454
|
"serviceId": null
|
|
@@ -439,8 +458,7 @@ var APPLICATIONS = {
|
|
|
439
458
|
"kind": "pages",
|
|
440
459
|
"apiUrl": null,
|
|
441
460
|
"domains": [
|
|
442
|
-
"commerce.topolo.app"
|
|
443
|
-
"topolo-commerce-ops-web.pages.dev"
|
|
461
|
+
"commerce.topolo.app"
|
|
444
462
|
],
|
|
445
463
|
"routes": [],
|
|
446
464
|
"serviceId": null
|
|
@@ -450,8 +468,7 @@ var APPLICATIONS = {
|
|
|
450
468
|
"kind": "pages",
|
|
451
469
|
"apiUrl": null,
|
|
452
470
|
"domains": [
|
|
453
|
-
"station-commerce.topolo.app"
|
|
454
|
-
"topolo-commerce-station-web.pages.dev"
|
|
471
|
+
"station-commerce.topolo.app"
|
|
455
472
|
],
|
|
456
473
|
"routes": [],
|
|
457
474
|
"serviceId": null
|
|
@@ -493,47 +510,69 @@ var APPLICATIONS = {
|
|
|
493
510
|
],
|
|
494
511
|
"deployTargets": [
|
|
495
512
|
{
|
|
496
|
-
"name": "topolo-crm-
|
|
497
|
-
"kind": "pages",
|
|
498
|
-
"apiUrl": null,
|
|
499
|
-
"domains": [],
|
|
500
|
-
"routes": [],
|
|
501
|
-
"serviceId": null
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"name": "topolo-crm-worker",
|
|
513
|
+
"name": "topolo-crm-api",
|
|
505
514
|
"kind": "worker",
|
|
506
515
|
"apiUrl": "https://crm-api.topolo.app",
|
|
507
|
-
"domains": [
|
|
516
|
+
"domains": [
|
|
517
|
+
"crm-api.topolo.app"
|
|
518
|
+
],
|
|
508
519
|
"routes": [],
|
|
509
520
|
"serviceId": "crm"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "topolo-crm-app",
|
|
524
|
+
"kind": "pages",
|
|
525
|
+
"apiUrl": null,
|
|
526
|
+
"domains": [
|
|
527
|
+
"crm.topolo.app"
|
|
528
|
+
],
|
|
529
|
+
"routes": [],
|
|
530
|
+
"serviceId": null
|
|
510
531
|
}
|
|
511
532
|
]
|
|
512
533
|
},
|
|
513
534
|
"customer_success": {
|
|
514
535
|
"id": "customer_success",
|
|
515
|
-
"appDir": "
|
|
516
|
-
"name": "topolo-
|
|
517
|
-
"packageName": "topolo-
|
|
518
|
-
"productionUrl": "https://
|
|
536
|
+
"appDir": "TopoloSuccess",
|
|
537
|
+
"name": "topolo-success",
|
|
538
|
+
"packageName": "topolo-success",
|
|
539
|
+
"productionUrl": "https://success.topolo.app",
|
|
519
540
|
"services": [
|
|
520
541
|
"customer_success"
|
|
521
542
|
],
|
|
522
543
|
"deployTargets": [
|
|
523
544
|
{
|
|
524
|
-
"name": "topolo-
|
|
545
|
+
"name": "topolo-success",
|
|
525
546
|
"kind": "worker",
|
|
526
|
-
"apiUrl": "https://
|
|
547
|
+
"apiUrl": "https://success.topolo.app",
|
|
527
548
|
"domains": [
|
|
528
|
-
"
|
|
549
|
+
"success.topolo.app"
|
|
529
550
|
],
|
|
530
551
|
"routes": [
|
|
531
|
-
"
|
|
552
|
+
"success.topolo.app"
|
|
532
553
|
],
|
|
533
554
|
"serviceId": "customer_success"
|
|
534
555
|
}
|
|
535
556
|
]
|
|
536
557
|
},
|
|
558
|
+
"d1_backup": {
|
|
559
|
+
"id": "d1_backup",
|
|
560
|
+
"appDir": "TopoloD1Backup",
|
|
561
|
+
"name": "topolo-d1-backup",
|
|
562
|
+
"packageName": "topolo-d1-backup",
|
|
563
|
+
"productionUrl": null,
|
|
564
|
+
"services": [],
|
|
565
|
+
"deployTargets": [
|
|
566
|
+
{
|
|
567
|
+
"name": "topolo-d1-backup",
|
|
568
|
+
"kind": "worker",
|
|
569
|
+
"apiUrl": null,
|
|
570
|
+
"domains": [],
|
|
571
|
+
"routes": [],
|
|
572
|
+
"serviceId": null
|
|
573
|
+
}
|
|
574
|
+
]
|
|
575
|
+
},
|
|
537
576
|
"developers": {
|
|
538
577
|
"id": "developers",
|
|
539
578
|
"appDir": "TopoloDevelopers",
|
|
@@ -542,6 +581,14 @@ var APPLICATIONS = {
|
|
|
542
581
|
"productionUrl": "https://developers.topolo.app",
|
|
543
582
|
"services": [],
|
|
544
583
|
"deployTargets": [
|
|
584
|
+
{
|
|
585
|
+
"name": "topolo-catalog-cron",
|
|
586
|
+
"kind": "worker",
|
|
587
|
+
"apiUrl": null,
|
|
588
|
+
"domains": [],
|
|
589
|
+
"routes": [],
|
|
590
|
+
"serviceId": null
|
|
591
|
+
},
|
|
545
592
|
{
|
|
546
593
|
"name": "topolo-developers",
|
|
547
594
|
"kind": "pages",
|
|
@@ -554,6 +601,30 @@ var APPLICATIONS = {
|
|
|
554
601
|
}
|
|
555
602
|
]
|
|
556
603
|
},
|
|
604
|
+
"director": {
|
|
605
|
+
"id": "director",
|
|
606
|
+
"appDir": "TopoloDirector",
|
|
607
|
+
"name": "topolo-director",
|
|
608
|
+
"packageName": "topolo-director",
|
|
609
|
+
"productionUrl": "https://director.topolo.app",
|
|
610
|
+
"services": [
|
|
611
|
+
"director"
|
|
612
|
+
],
|
|
613
|
+
"deployTargets": [
|
|
614
|
+
{
|
|
615
|
+
"name": "topolo-director",
|
|
616
|
+
"kind": "worker",
|
|
617
|
+
"apiUrl": "https://director.topolo.app",
|
|
618
|
+
"domains": [
|
|
619
|
+
"director.topolo.app"
|
|
620
|
+
],
|
|
621
|
+
"routes": [
|
|
622
|
+
"director.topolo.app"
|
|
623
|
+
],
|
|
624
|
+
"serviceId": "director"
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
},
|
|
557
628
|
"docs": {
|
|
558
629
|
"id": "docs",
|
|
559
630
|
"appDir": "TopoloDocs",
|
|
@@ -578,8 +649,8 @@ var APPLICATIONS = {
|
|
|
578
649
|
"id": "feed",
|
|
579
650
|
"appDir": "TopoloFeed",
|
|
580
651
|
"name": "TopoloFeed",
|
|
581
|
-
"packageName":
|
|
582
|
-
"productionUrl": "https://
|
|
652
|
+
"packageName": "topolo-feed",
|
|
653
|
+
"productionUrl": "https://feed-api.topolo.app",
|
|
583
654
|
"services": [
|
|
584
655
|
"feed"
|
|
585
656
|
],
|
|
@@ -587,24 +658,24 @@ var APPLICATIONS = {
|
|
|
587
658
|
{
|
|
588
659
|
"name": "topolo-feed-analytics-api",
|
|
589
660
|
"kind": "worker",
|
|
590
|
-
"apiUrl": "https://
|
|
661
|
+
"apiUrl": "https://feed-analytics-api.topolo.app",
|
|
591
662
|
"domains": [
|
|
592
|
-
"
|
|
663
|
+
"feed-analytics-api.topolo.app"
|
|
593
664
|
],
|
|
594
665
|
"routes": [
|
|
595
|
-
"
|
|
666
|
+
"feed-analytics-api.topolo.app"
|
|
596
667
|
],
|
|
597
668
|
"serviceId": null
|
|
598
669
|
},
|
|
599
670
|
{
|
|
600
671
|
"name": "topolo-feed-api",
|
|
601
672
|
"kind": "worker",
|
|
602
|
-
"apiUrl": "https://
|
|
673
|
+
"apiUrl": "https://feed-api.topolo.app",
|
|
603
674
|
"domains": [
|
|
604
|
-
"
|
|
675
|
+
"feed-api.topolo.app"
|
|
605
676
|
],
|
|
606
677
|
"routes": [
|
|
607
|
-
"
|
|
678
|
+
"feed-api.topolo.app"
|
|
608
679
|
],
|
|
609
680
|
"serviceId": "feed"
|
|
610
681
|
}
|
|
@@ -645,18 +716,22 @@ var APPLICATIONS = {
|
|
|
645
716
|
],
|
|
646
717
|
"deployTargets": [
|
|
647
718
|
{
|
|
648
|
-
"name": "forecast",
|
|
719
|
+
"name": "topolo-forecast",
|
|
649
720
|
"kind": "pages",
|
|
650
721
|
"apiUrl": null,
|
|
651
|
-
"domains": [
|
|
722
|
+
"domains": [
|
|
723
|
+
"forecast.topolo.app"
|
|
724
|
+
],
|
|
652
725
|
"routes": [],
|
|
653
726
|
"serviceId": null
|
|
654
727
|
},
|
|
655
728
|
{
|
|
656
|
-
"name": "forecast-
|
|
729
|
+
"name": "topolo-forecast-api",
|
|
657
730
|
"kind": "worker",
|
|
658
|
-
"apiUrl": "https://forecast-
|
|
659
|
-
"domains": [
|
|
731
|
+
"apiUrl": "https://forecast-api.topolo.app",
|
|
732
|
+
"domains": [
|
|
733
|
+
"forecast-api.topolo.app"
|
|
734
|
+
],
|
|
660
735
|
"routes": [],
|
|
661
736
|
"serviceId": "forecast"
|
|
662
737
|
}
|
|
@@ -745,7 +820,7 @@ var APPLICATIONS = {
|
|
|
745
820
|
],
|
|
746
821
|
"deployTargets": [
|
|
747
822
|
{
|
|
748
|
-
"name": "
|
|
823
|
+
"name": "topolo-learn",
|
|
749
824
|
"kind": "pages",
|
|
750
825
|
"apiUrl": null,
|
|
751
826
|
"domains": [
|
|
@@ -755,17 +830,41 @@ var APPLICATIONS = {
|
|
|
755
830
|
"serviceId": null
|
|
756
831
|
},
|
|
757
832
|
{
|
|
758
|
-
"name": "
|
|
833
|
+
"name": "topolo-learn-api",
|
|
759
834
|
"kind": "worker",
|
|
760
|
-
"apiUrl": "https://
|
|
835
|
+
"apiUrl": "https://learn-api.topolo.app",
|
|
761
836
|
"domains": [
|
|
762
|
-
"
|
|
837
|
+
"learn-api.topolo.app"
|
|
763
838
|
],
|
|
764
839
|
"routes": [],
|
|
765
840
|
"serviceId": "learn"
|
|
766
841
|
}
|
|
767
842
|
]
|
|
768
843
|
},
|
|
844
|
+
"localize": {
|
|
845
|
+
"id": "localize",
|
|
846
|
+
"appDir": "TopoloLocalize",
|
|
847
|
+
"name": "topolo-localize",
|
|
848
|
+
"packageName": "topolo-localize",
|
|
849
|
+
"productionUrl": "https://localize.topolo.app",
|
|
850
|
+
"services": [
|
|
851
|
+
"localize"
|
|
852
|
+
],
|
|
853
|
+
"deployTargets": [
|
|
854
|
+
{
|
|
855
|
+
"name": "topolo-localize",
|
|
856
|
+
"kind": "worker",
|
|
857
|
+
"apiUrl": "https://localize.topolo.app",
|
|
858
|
+
"domains": [
|
|
859
|
+
"localize.topolo.app"
|
|
860
|
+
],
|
|
861
|
+
"routes": [
|
|
862
|
+
"localize.topolo.app"
|
|
863
|
+
],
|
|
864
|
+
"serviceId": "localize"
|
|
865
|
+
}
|
|
866
|
+
]
|
|
867
|
+
},
|
|
769
868
|
"mail": {
|
|
770
869
|
"id": "mail",
|
|
771
870
|
"appDir": "TopoloMail",
|
|
@@ -803,7 +902,7 @@ var APPLICATIONS = {
|
|
|
803
902
|
"id": "mdm",
|
|
804
903
|
"appDir": "TopoloMDM",
|
|
805
904
|
"name": "TopoloMDM",
|
|
806
|
-
"packageName":
|
|
905
|
+
"packageName": "topolo-mdm",
|
|
807
906
|
"productionUrl": "https://mdm.topolo.app",
|
|
808
907
|
"services": [
|
|
809
908
|
"mdm"
|
|
@@ -812,12 +911,12 @@ var APPLICATIONS = {
|
|
|
812
911
|
{
|
|
813
912
|
"name": "topolo-mdm-api",
|
|
814
913
|
"kind": "worker",
|
|
815
|
-
"apiUrl": "https://
|
|
914
|
+
"apiUrl": "https://mdm-api.topolo.app",
|
|
816
915
|
"domains": [
|
|
817
|
-
"
|
|
916
|
+
"mdm-api.topolo.app"
|
|
818
917
|
],
|
|
819
918
|
"routes": [
|
|
820
|
-
"
|
|
919
|
+
"mdm-api.topolo.app"
|
|
821
920
|
],
|
|
822
921
|
"serviceId": "mdm"
|
|
823
922
|
},
|
|
@@ -826,8 +925,7 @@ var APPLICATIONS = {
|
|
|
826
925
|
"kind": "pages",
|
|
827
926
|
"apiUrl": null,
|
|
828
927
|
"domains": [
|
|
829
|
-
"mdm.topolo.app"
|
|
830
|
-
"topolo-mdm-console.pages.dev"
|
|
928
|
+
"mdm.topolo.app"
|
|
831
929
|
],
|
|
832
930
|
"routes": [
|
|
833
931
|
"mdm.topolo.app"
|
|
@@ -881,8 +979,7 @@ var APPLICATIONS = {
|
|
|
881
979
|
"kind": "pages",
|
|
882
980
|
"apiUrl": null,
|
|
883
981
|
"domains": [
|
|
884
|
-
"nexus.topolo.app"
|
|
885
|
-
"topolo-nexus-dashboard.pages.dev"
|
|
982
|
+
"nexus.topolo.app"
|
|
886
983
|
],
|
|
887
984
|
"routes": [],
|
|
888
985
|
"serviceId": null
|
|
@@ -890,9 +987,9 @@ var APPLICATIONS = {
|
|
|
890
987
|
{
|
|
891
988
|
"name": "topolo-nexus-gateway",
|
|
892
989
|
"kind": "worker",
|
|
893
|
-
"apiUrl": "https://
|
|
990
|
+
"apiUrl": "https://nexus-api.topolo.app",
|
|
894
991
|
"domains": [
|
|
895
|
-
"
|
|
992
|
+
"nexus-api.topolo.app"
|
|
896
993
|
],
|
|
897
994
|
"routes": [],
|
|
898
995
|
"serviceId": "nexus"
|
|
@@ -923,6 +1020,15 @@ var APPLICATIONS = {
|
|
|
923
1020
|
}
|
|
924
1021
|
]
|
|
925
1022
|
},
|
|
1023
|
+
"observability_watch": {
|
|
1024
|
+
"id": "observability_watch",
|
|
1025
|
+
"appDir": "TopoloObservabilityWatch",
|
|
1026
|
+
"name": "topolo-observability-watch",
|
|
1027
|
+
"packageName": "topolo-observability-watch",
|
|
1028
|
+
"productionUrl": null,
|
|
1029
|
+
"services": [],
|
|
1030
|
+
"deployTargets": []
|
|
1031
|
+
},
|
|
926
1032
|
"one": {
|
|
927
1033
|
"id": "one",
|
|
928
1034
|
"appDir": "TopoloOne",
|
|
@@ -930,35 +1036,35 @@ var APPLICATIONS = {
|
|
|
930
1036
|
"packageName": "topolo-oneclick-sso",
|
|
931
1037
|
"productionUrl": "https://one.topolo.app",
|
|
932
1038
|
"services": [
|
|
933
|
-
"one"
|
|
1039
|
+
"one",
|
|
1040
|
+
"one.ai"
|
|
934
1041
|
],
|
|
935
1042
|
"deployTargets": [
|
|
936
1043
|
{
|
|
937
1044
|
"name": "ai-chat-rag",
|
|
938
1045
|
"kind": "worker",
|
|
939
|
-
"apiUrl":
|
|
1046
|
+
"apiUrl": "https://ai.one.topolo.app",
|
|
940
1047
|
"domains": [
|
|
941
|
-
"ai
|
|
1048
|
+
"ai.one.topolo.app"
|
|
942
1049
|
],
|
|
943
1050
|
"routes": [],
|
|
944
|
-
"serviceId":
|
|
1051
|
+
"serviceId": "one.ai"
|
|
945
1052
|
},
|
|
946
1053
|
{
|
|
947
|
-
"name": "
|
|
1054
|
+
"name": "topolo-one",
|
|
948
1055
|
"kind": "pages",
|
|
949
1056
|
"apiUrl": null,
|
|
950
1057
|
"domains": [
|
|
951
|
-
"
|
|
1058
|
+
"one.topolo.app"
|
|
952
1059
|
],
|
|
953
1060
|
"routes": [],
|
|
954
1061
|
"serviceId": null
|
|
955
1062
|
},
|
|
956
1063
|
{
|
|
957
|
-
"name": "
|
|
1064
|
+
"name": "topolo-one-website",
|
|
958
1065
|
"kind": "worker",
|
|
959
1066
|
"apiUrl": null,
|
|
960
1067
|
"domains": [
|
|
961
|
-
"one.topolo.io",
|
|
962
1068
|
"topolo.io",
|
|
963
1069
|
"www.topolo.io"
|
|
964
1070
|
],
|
|
@@ -966,17 +1072,47 @@ var APPLICATIONS = {
|
|
|
966
1072
|
"serviceId": null
|
|
967
1073
|
},
|
|
968
1074
|
{
|
|
969
|
-
"name": "
|
|
1075
|
+
"name": "topolo-one-worker",
|
|
970
1076
|
"kind": "worker",
|
|
971
1077
|
"apiUrl": "https://one.topolo.app",
|
|
972
|
-
"domains": [
|
|
1078
|
+
"domains": [
|
|
1079
|
+
"one.topolo.app",
|
|
1080
|
+
"topolo.app",
|
|
1081
|
+
"www.topolo.app"
|
|
1082
|
+
],
|
|
973
1083
|
"routes": [
|
|
974
|
-
"one.topolo.app/*"
|
|
1084
|
+
"one.topolo.app/*",
|
|
1085
|
+
"topolo.app",
|
|
1086
|
+
"www.topolo.app/*"
|
|
975
1087
|
],
|
|
976
1088
|
"serviceId": "one"
|
|
977
1089
|
}
|
|
978
1090
|
]
|
|
979
1091
|
},
|
|
1092
|
+
"p2p": {
|
|
1093
|
+
"id": "p2p",
|
|
1094
|
+
"appDir": "TopoloP2P",
|
|
1095
|
+
"name": "topolo-p2p",
|
|
1096
|
+
"packageName": "topolo-p2p",
|
|
1097
|
+
"productionUrl": "https://p2p.topolo.app",
|
|
1098
|
+
"services": [
|
|
1099
|
+
"p2p"
|
|
1100
|
+
],
|
|
1101
|
+
"deployTargets": [
|
|
1102
|
+
{
|
|
1103
|
+
"name": "topolo-p2p",
|
|
1104
|
+
"kind": "worker",
|
|
1105
|
+
"apiUrl": "https://p2p.topolo.app",
|
|
1106
|
+
"domains": [
|
|
1107
|
+
"p2p.topolo.app"
|
|
1108
|
+
],
|
|
1109
|
+
"routes": [
|
|
1110
|
+
"p2p.topolo.app"
|
|
1111
|
+
],
|
|
1112
|
+
"serviceId": "p2p"
|
|
1113
|
+
}
|
|
1114
|
+
]
|
|
1115
|
+
},
|
|
980
1116
|
"pay": {
|
|
981
1117
|
"id": "pay",
|
|
982
1118
|
"appDir": "TopoloPay",
|
|
@@ -990,8 +1126,10 @@ var APPLICATIONS = {
|
|
|
990
1126
|
{
|
|
991
1127
|
"name": "topolo-pay",
|
|
992
1128
|
"kind": "worker",
|
|
993
|
-
"apiUrl": "https://
|
|
994
|
-
"domains": [
|
|
1129
|
+
"apiUrl": "https://pay.topolo.app",
|
|
1130
|
+
"domains": [
|
|
1131
|
+
"pay.topolo.app"
|
|
1132
|
+
],
|
|
995
1133
|
"routes": [],
|
|
996
1134
|
"serviceId": "pay"
|
|
997
1135
|
}
|
|
@@ -1021,11 +1159,20 @@ var APPLICATIONS = {
|
|
|
1021
1159
|
}
|
|
1022
1160
|
]
|
|
1023
1161
|
},
|
|
1162
|
+
"pulse": {
|
|
1163
|
+
"id": "pulse",
|
|
1164
|
+
"appDir": "TopoloPulse",
|
|
1165
|
+
"name": "topolo-pulse",
|
|
1166
|
+
"packageName": "topolo-pulse",
|
|
1167
|
+
"productionUrl": null,
|
|
1168
|
+
"services": [],
|
|
1169
|
+
"deployTargets": []
|
|
1170
|
+
},
|
|
1024
1171
|
"quro": {
|
|
1025
1172
|
"id": "quro",
|
|
1026
1173
|
"appDir": "TopoloQuro",
|
|
1027
1174
|
"name": "TopoloQuro",
|
|
1028
|
-
"packageName":
|
|
1175
|
+
"packageName": "topolo-quro",
|
|
1029
1176
|
"productionUrl": "https://quro.topolo.app",
|
|
1030
1177
|
"services": [
|
|
1031
1178
|
"quro.api",
|
|
@@ -1036,7 +1183,9 @@ var APPLICATIONS = {
|
|
|
1036
1183
|
"name": "quro-api",
|
|
1037
1184
|
"kind": "worker",
|
|
1038
1185
|
"apiUrl": "https://api.ol0.me",
|
|
1039
|
-
"domains": [
|
|
1186
|
+
"domains": [
|
|
1187
|
+
"api.ol0.me"
|
|
1188
|
+
],
|
|
1040
1189
|
"routes": [],
|
|
1041
1190
|
"serviceId": "quro.api"
|
|
1042
1191
|
},
|
|
@@ -1044,7 +1193,9 @@ var APPLICATIONS = {
|
|
|
1044
1193
|
"name": "quro-redirect-system",
|
|
1045
1194
|
"kind": "worker",
|
|
1046
1195
|
"apiUrl": "https://ol0.me",
|
|
1047
|
-
"domains": [
|
|
1196
|
+
"domains": [
|
|
1197
|
+
"ol0.me"
|
|
1198
|
+
],
|
|
1048
1199
|
"routes": [
|
|
1049
1200
|
"ol0.me/*"
|
|
1050
1201
|
],
|
|
@@ -1054,7 +1205,9 @@ var APPLICATIONS = {
|
|
|
1054
1205
|
"name": "quro-ui",
|
|
1055
1206
|
"kind": "pages",
|
|
1056
1207
|
"apiUrl": null,
|
|
1057
|
-
"domains": [
|
|
1208
|
+
"domains": [
|
|
1209
|
+
"quro.topolo.app"
|
|
1210
|
+
],
|
|
1058
1211
|
"routes": [],
|
|
1059
1212
|
"serviceId": null
|
|
1060
1213
|
}
|
|
@@ -1071,7 +1224,7 @@ var APPLICATIONS = {
|
|
|
1071
1224
|
],
|
|
1072
1225
|
"deployTargets": [
|
|
1073
1226
|
{
|
|
1074
|
-
"name": "roadmapper",
|
|
1227
|
+
"name": "topolo-roadmapper",
|
|
1075
1228
|
"kind": "pages",
|
|
1076
1229
|
"apiUrl": null,
|
|
1077
1230
|
"domains": [
|
|
@@ -1081,7 +1234,7 @@ var APPLICATIONS = {
|
|
|
1081
1234
|
"serviceId": null
|
|
1082
1235
|
},
|
|
1083
1236
|
{
|
|
1084
|
-
"name": "topolo-
|
|
1237
|
+
"name": "topolo-roadmapper-api",
|
|
1085
1238
|
"kind": "worker",
|
|
1086
1239
|
"apiUrl": "https://roadmapper-api.topolo.app",
|
|
1087
1240
|
"domains": [
|
|
@@ -1130,15 +1283,19 @@ var APPLICATIONS = {
|
|
|
1130
1283
|
"name": "topolo-social-studio",
|
|
1131
1284
|
"kind": "pages",
|
|
1132
1285
|
"apiUrl": null,
|
|
1133
|
-
"domains": [
|
|
1286
|
+
"domains": [
|
|
1287
|
+
"studio.topolo.app"
|
|
1288
|
+
],
|
|
1134
1289
|
"routes": [],
|
|
1135
1290
|
"serviceId": null
|
|
1136
1291
|
},
|
|
1137
1292
|
{
|
|
1138
1293
|
"name": "topolo-social-studio-api",
|
|
1139
1294
|
"kind": "worker",
|
|
1140
|
-
"apiUrl": "https://
|
|
1141
|
-
"domains": [
|
|
1295
|
+
"apiUrl": "https://studio-api.topolo.app",
|
|
1296
|
+
"domains": [
|
|
1297
|
+
"studio-api.topolo.app"
|
|
1298
|
+
],
|
|
1142
1299
|
"routes": [],
|
|
1143
1300
|
"serviceId": "social_studio"
|
|
1144
1301
|
},
|
|
@@ -1163,23 +1320,27 @@ var APPLICATIONS = {
|
|
|
1163
1320
|
],
|
|
1164
1321
|
"deployTargets": [
|
|
1165
1322
|
{
|
|
1166
|
-
"name": "socialize",
|
|
1323
|
+
"name": "topolo-socialize",
|
|
1167
1324
|
"kind": "pages",
|
|
1168
1325
|
"apiUrl": null,
|
|
1169
|
-
"domains": [
|
|
1326
|
+
"domains": [
|
|
1327
|
+
"socialize.topolo.app"
|
|
1328
|
+
],
|
|
1170
1329
|
"routes": [],
|
|
1171
1330
|
"serviceId": null
|
|
1172
1331
|
},
|
|
1173
1332
|
{
|
|
1174
|
-
"name": "socialize-
|
|
1333
|
+
"name": "topolo-socialize-api",
|
|
1175
1334
|
"kind": "worker",
|
|
1176
|
-
"apiUrl": "https://socialize-
|
|
1177
|
-
"domains": [
|
|
1335
|
+
"apiUrl": "https://socialize-api.topolo.app",
|
|
1336
|
+
"domains": [
|
|
1337
|
+
"socialize-api.topolo.app"
|
|
1338
|
+
],
|
|
1178
1339
|
"routes": [],
|
|
1179
1340
|
"serviceId": "socialize"
|
|
1180
1341
|
},
|
|
1181
1342
|
{
|
|
1182
|
-
"name": "socialize-
|
|
1343
|
+
"name": "topolo-socialize-scheduler",
|
|
1183
1344
|
"kind": "worker",
|
|
1184
1345
|
"apiUrl": null,
|
|
1185
1346
|
"domains": [],
|
|
@@ -1188,6 +1349,30 @@ var APPLICATIONS = {
|
|
|
1188
1349
|
}
|
|
1189
1350
|
]
|
|
1190
1351
|
},
|
|
1352
|
+
"status": {
|
|
1353
|
+
"id": "status",
|
|
1354
|
+
"appDir": "TopoloStatus",
|
|
1355
|
+
"name": "topolo-status",
|
|
1356
|
+
"packageName": "topolo-status",
|
|
1357
|
+
"productionUrl": "https://status.topolo.app",
|
|
1358
|
+
"services": [
|
|
1359
|
+
"status"
|
|
1360
|
+
],
|
|
1361
|
+
"deployTargets": [
|
|
1362
|
+
{
|
|
1363
|
+
"name": "topolo-status",
|
|
1364
|
+
"kind": "worker",
|
|
1365
|
+
"apiUrl": "https://status.topolo.app",
|
|
1366
|
+
"domains": [
|
|
1367
|
+
"status.topolo.app"
|
|
1368
|
+
],
|
|
1369
|
+
"routes": [
|
|
1370
|
+
"status.topolo.app"
|
|
1371
|
+
],
|
|
1372
|
+
"serviceId": "status"
|
|
1373
|
+
}
|
|
1374
|
+
]
|
|
1375
|
+
},
|
|
1191
1376
|
"support": {
|
|
1192
1377
|
"id": "support",
|
|
1193
1378
|
"appDir": "TopoloSupport",
|
|
@@ -1271,7 +1456,7 @@ var APPLICATIONS = {
|
|
|
1271
1456
|
],
|
|
1272
1457
|
"deployTargets": [
|
|
1273
1458
|
{
|
|
1274
|
-
"name": "
|
|
1459
|
+
"name": "topolo-web-api",
|
|
1275
1460
|
"kind": "worker",
|
|
1276
1461
|
"apiUrl": "https://web-api.topolo.app",
|
|
1277
1462
|
"domains": [
|
|
@@ -1281,7 +1466,7 @@ var APPLICATIONS = {
|
|
|
1281
1466
|
"serviceId": "web"
|
|
1282
1467
|
},
|
|
1283
1468
|
{
|
|
1284
|
-
"name": "
|
|
1469
|
+
"name": "topolo-web-runtime",
|
|
1285
1470
|
"kind": "worker",
|
|
1286
1471
|
"apiUrl": "https://sites.topolo.app",
|
|
1287
1472
|
"domains": [
|
|
@@ -1291,7 +1476,7 @@ var APPLICATIONS = {
|
|
|
1291
1476
|
"serviceId": null
|
|
1292
1477
|
},
|
|
1293
1478
|
{
|
|
1294
|
-
"name": "
|
|
1479
|
+
"name": "topolo-web-studio",
|
|
1295
1480
|
"kind": "pages",
|
|
1296
1481
|
"apiUrl": null,
|
|
1297
1482
|
"domains": [
|
|
@@ -1305,7 +1490,7 @@ var APPLICATIONS = {
|
|
|
1305
1490
|
};
|
|
1306
1491
|
|
|
1307
1492
|
// src/application-requirements.ts
|
|
1308
|
-
var APPLICATION_REQUIREMENTS_VERSION = "2026-
|
|
1493
|
+
var APPLICATION_REQUIREMENTS_VERSION = "2026-05-01.1";
|
|
1309
1494
|
var APPLICATION_REQUIREMENTS = [
|
|
1310
1495
|
{
|
|
1311
1496
|
id: "platform-metadata",
|
|
@@ -1363,14 +1548,16 @@ var APPLICATION_REQUIREMENTS = [
|
|
|
1363
1548
|
evidence: [
|
|
1364
1549
|
"@topolo/ui-kit is used for the platform shell where the app has authenticated UI",
|
|
1365
1550
|
"The shared launcher/app switcher is reachable from authenticated app chrome",
|
|
1366
|
-
"Account menu and sign-out behavior use TopoloAppShell or TopoloAccountMenu"
|
|
1551
|
+
"Account menu and sign-out behavior use TopoloAppShell or TopoloAccountMenu",
|
|
1552
|
+
"Authenticated app body content stays inside the viewport on mobile and desktop widths"
|
|
1367
1553
|
],
|
|
1368
1554
|
implementation: [
|
|
1369
1555
|
"Use TopoloAppShell for authenticated app layouts",
|
|
1370
1556
|
"Use TopoloAccountMenu when a partial-shell surface still needs account chrome",
|
|
1371
1557
|
"Pass app-specific account actions as additive menu items instead of forking dropdowns",
|
|
1372
1558
|
"Use shared design tokens and platform UI primitives before creating local equivalents",
|
|
1373
|
-
"Keep mobile and desktop shell behavior aligned with the platform UI kit"
|
|
1559
|
+
"Keep mobile and desktop shell behavior aligned with the platform UI kit",
|
|
1560
|
+
"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"
|
|
1374
1561
|
]
|
|
1375
1562
|
},
|
|
1376
1563
|
{
|
|
@@ -1949,6 +2136,222 @@ var IdentityModule = class {
|
|
|
1949
2136
|
}
|
|
1950
2137
|
};
|
|
1951
2138
|
|
|
2139
|
+
// src/modules/p2p.ts
|
|
2140
|
+
var P2PModule = class {
|
|
2141
|
+
constructor(client) {
|
|
2142
|
+
this.client = client;
|
|
2143
|
+
}
|
|
2144
|
+
client;
|
|
2145
|
+
// Directory ----------------------------------------------------------------
|
|
2146
|
+
async listDirectory(options = {}) {
|
|
2147
|
+
const res = await this.client.request({
|
|
2148
|
+
service: "p2p",
|
|
2149
|
+
path: "/api/directory/capabilities",
|
|
2150
|
+
query: { limit: options.limit }
|
|
2151
|
+
});
|
|
2152
|
+
return res.data.capabilities;
|
|
2153
|
+
}
|
|
2154
|
+
async getCapability(capabilityId) {
|
|
2155
|
+
if (!capabilityId) throw new Error("capabilityId is required");
|
|
2156
|
+
try {
|
|
2157
|
+
const res = await this.client.request({
|
|
2158
|
+
service: "p2p",
|
|
2159
|
+
path: `/api/directory/capabilities/${encodeURIComponent(capabilityId)}`
|
|
2160
|
+
});
|
|
2161
|
+
return res.data.capability;
|
|
2162
|
+
} catch (err) {
|
|
2163
|
+
if (isNotFound(err)) return null;
|
|
2164
|
+
throw err;
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
async publishCapability(input) {
|
|
2168
|
+
const res = await this.client.request({
|
|
2169
|
+
service: "p2p",
|
|
2170
|
+
method: "POST",
|
|
2171
|
+
path: "/api/p2p/internal/capabilities/sync",
|
|
2172
|
+
body: {
|
|
2173
|
+
capability_id: input.capability_id,
|
|
2174
|
+
publisher_org_id: input.publisher_org_id,
|
|
2175
|
+
app_id: input.app_id,
|
|
2176
|
+
service_id: input.service_id,
|
|
2177
|
+
name: input.name,
|
|
2178
|
+
description: input.description,
|
|
2179
|
+
category: input.category,
|
|
2180
|
+
pricing_model: input.pricing_model,
|
|
2181
|
+
pricing_amount_minor: input.pricing_amount_minor ?? null,
|
|
2182
|
+
currency: input.currency ?? null,
|
|
2183
|
+
requires_human_approval: input.requires_human_approval ?? false,
|
|
2184
|
+
supported_contexts: input.supported_contexts,
|
|
2185
|
+
trust_level: input.trust_level ?? "standard",
|
|
2186
|
+
public_directory_visible: input.public_directory_visible,
|
|
2187
|
+
source_revision: input.source_revision,
|
|
2188
|
+
input_schema: input.input_schema ?? {},
|
|
2189
|
+
output_schema: input.output_schema ?? {},
|
|
2190
|
+
acting_for_org_id: input.acting_for_org_id ?? input.publisher_org_id
|
|
2191
|
+
},
|
|
2192
|
+
confirm: true
|
|
2193
|
+
});
|
|
2194
|
+
return res.data.capability;
|
|
2195
|
+
}
|
|
2196
|
+
// Actions ------------------------------------------------------------------
|
|
2197
|
+
async listActions(options = {}) {
|
|
2198
|
+
const res = await this.client.request({
|
|
2199
|
+
service: "p2p",
|
|
2200
|
+
path: "/api/actions",
|
|
2201
|
+
query: { state: options.state, limit: options.limit }
|
|
2202
|
+
});
|
|
2203
|
+
return res.data.actions;
|
|
2204
|
+
}
|
|
2205
|
+
async getAction(requestId) {
|
|
2206
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2207
|
+
try {
|
|
2208
|
+
const res = await this.client.request({
|
|
2209
|
+
service: "p2p",
|
|
2210
|
+
path: `/api/actions/${encodeURIComponent(requestId)}`
|
|
2211
|
+
});
|
|
2212
|
+
return res.data;
|
|
2213
|
+
} catch (err) {
|
|
2214
|
+
if (isNotFound(err)) return null;
|
|
2215
|
+
throw err;
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
async requestAction(input) {
|
|
2219
|
+
if (!input.capability_id) throw new Error("capability_id is required");
|
|
2220
|
+
if (!input.idempotency_key) throw new Error("idempotency_key is required");
|
|
2221
|
+
const res = await this.client.request({
|
|
2222
|
+
service: "p2p",
|
|
2223
|
+
method: "POST",
|
|
2224
|
+
path: "/api/actions/request",
|
|
2225
|
+
body: {
|
|
2226
|
+
capability_id: input.capability_id,
|
|
2227
|
+
idempotency_key: input.idempotency_key,
|
|
2228
|
+
inputs: input.inputs ?? {}
|
|
2229
|
+
},
|
|
2230
|
+
confirm: true
|
|
2231
|
+
});
|
|
2232
|
+
return res.data;
|
|
2233
|
+
}
|
|
2234
|
+
async respondAction(requestId, response, extras = {}) {
|
|
2235
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2236
|
+
const res = await this.client.request({
|
|
2237
|
+
service: "p2p",
|
|
2238
|
+
method: "POST",
|
|
2239
|
+
path: `/api/actions/${encodeURIComponent(requestId)}/respond`,
|
|
2240
|
+
body: { response, ...extras },
|
|
2241
|
+
confirm: true
|
|
2242
|
+
});
|
|
2243
|
+
return res.data.request;
|
|
2244
|
+
}
|
|
2245
|
+
async completeAction(requestId, result = {}) {
|
|
2246
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2247
|
+
const res = await this.client.request({
|
|
2248
|
+
service: "p2p",
|
|
2249
|
+
method: "POST",
|
|
2250
|
+
path: `/api/actions/${encodeURIComponent(requestId)}/complete`,
|
|
2251
|
+
body: { result },
|
|
2252
|
+
confirm: true
|
|
2253
|
+
});
|
|
2254
|
+
return res.data.request;
|
|
2255
|
+
}
|
|
2256
|
+
async disputeAction(requestId, reason) {
|
|
2257
|
+
if (!requestId) throw new Error("requestId is required");
|
|
2258
|
+
const res = await this.client.request({
|
|
2259
|
+
service: "p2p",
|
|
2260
|
+
method: "POST",
|
|
2261
|
+
path: `/api/actions/${encodeURIComponent(requestId)}/dispute`,
|
|
2262
|
+
body: { reason },
|
|
2263
|
+
confirm: true
|
|
2264
|
+
});
|
|
2265
|
+
return res.data.request;
|
|
2266
|
+
}
|
|
2267
|
+
// Policy + connections + ledger + settlement -----------------------------
|
|
2268
|
+
async getPolicy() {
|
|
2269
|
+
const res = await this.client.request({
|
|
2270
|
+
service: "p2p",
|
|
2271
|
+
path: "/api/policies"
|
|
2272
|
+
});
|
|
2273
|
+
return res.data.policy;
|
|
2274
|
+
}
|
|
2275
|
+
async updatePolicy(policy) {
|
|
2276
|
+
const res = await this.client.request({
|
|
2277
|
+
service: "p2p",
|
|
2278
|
+
method: "PUT",
|
|
2279
|
+
path: "/api/policies",
|
|
2280
|
+
body: policy,
|
|
2281
|
+
confirm: true
|
|
2282
|
+
});
|
|
2283
|
+
return res.data.policy;
|
|
2284
|
+
}
|
|
2285
|
+
async listConnections() {
|
|
2286
|
+
const res = await this.client.request({
|
|
2287
|
+
service: "p2p",
|
|
2288
|
+
path: "/api/connections"
|
|
2289
|
+
});
|
|
2290
|
+
return res.data.connections;
|
|
2291
|
+
}
|
|
2292
|
+
async createConnection(counterpartyOrgId, options = {}) {
|
|
2293
|
+
if (!counterpartyOrgId) throw new Error("counterpartyOrgId is required");
|
|
2294
|
+
const res = await this.client.request({
|
|
2295
|
+
service: "p2p",
|
|
2296
|
+
method: "POST",
|
|
2297
|
+
path: "/api/connections",
|
|
2298
|
+
body: { counterparty_org_id: counterpartyOrgId, status: options.status ?? "active" },
|
|
2299
|
+
confirm: true
|
|
2300
|
+
});
|
|
2301
|
+
return res.data.connection;
|
|
2302
|
+
}
|
|
2303
|
+
async revokeConnection(connectionId) {
|
|
2304
|
+
if (!connectionId) throw new Error("connectionId is required");
|
|
2305
|
+
await this.client.request({
|
|
2306
|
+
service: "p2p",
|
|
2307
|
+
method: "DELETE",
|
|
2308
|
+
path: `/api/connections/${encodeURIComponent(connectionId)}`,
|
|
2309
|
+
confirm: true
|
|
2310
|
+
});
|
|
2311
|
+
}
|
|
2312
|
+
async listLedger() {
|
|
2313
|
+
const res = await this.client.request({
|
|
2314
|
+
service: "p2p",
|
|
2315
|
+
path: "/api/ledger"
|
|
2316
|
+
});
|
|
2317
|
+
return res.data.ledger_entries;
|
|
2318
|
+
}
|
|
2319
|
+
async previewSettlements(filters = {}) {
|
|
2320
|
+
const res = await this.client.request({
|
|
2321
|
+
service: "p2p",
|
|
2322
|
+
method: "POST",
|
|
2323
|
+
path: "/api/settlements/preview",
|
|
2324
|
+
body: filters,
|
|
2325
|
+
confirm: true
|
|
2326
|
+
});
|
|
2327
|
+
return res.data.groups;
|
|
2328
|
+
}
|
|
2329
|
+
async createSettlement(filters = {}) {
|
|
2330
|
+
const res = await this.client.request({
|
|
2331
|
+
service: "p2p",
|
|
2332
|
+
method: "POST",
|
|
2333
|
+
path: "/api/settlements/create",
|
|
2334
|
+
body: { trigger: "manual", ...filters },
|
|
2335
|
+
confirm: true
|
|
2336
|
+
});
|
|
2337
|
+
return res.data;
|
|
2338
|
+
}
|
|
2339
|
+
async releaseHold(holdId, resolution, options = {}) {
|
|
2340
|
+
if (!holdId) throw new Error("holdId is required");
|
|
2341
|
+
const res = await this.client.request({
|
|
2342
|
+
service: "p2p",
|
|
2343
|
+
method: "POST",
|
|
2344
|
+
path: `/api/holds/${encodeURIComponent(holdId)}/release`,
|
|
2345
|
+
body: { resolution, reason: options.reason ?? null },
|
|
2346
|
+
confirm: true
|
|
2347
|
+
});
|
|
2348
|
+
return res.data;
|
|
2349
|
+
}
|
|
2350
|
+
};
|
|
2351
|
+
function isNotFound(err) {
|
|
2352
|
+
return Boolean(err && typeof err === "object" && "status" in err && err.status === 404);
|
|
2353
|
+
}
|
|
2354
|
+
|
|
1952
2355
|
// src/oauth.ts
|
|
1953
2356
|
var DEVICE_GRANT = "urn:ietf:params:oauth:grant-type:device_code";
|
|
1954
2357
|
var TopoloOAuth = class {
|
|
@@ -2201,6 +2604,7 @@ function createTopolo(options) {
|
|
|
2201
2604
|
CrmModule,
|
|
2202
2605
|
DEFAULT_SERVICE_URLS,
|
|
2203
2606
|
IdentityModule,
|
|
2607
|
+
P2PModule,
|
|
2204
2608
|
PLATFORM_SERVICE_IDS,
|
|
2205
2609
|
TOPOLO_WIDGET_ENDPOINT,
|
|
2206
2610
|
TOPOLO_WIDGET_REFRESH_INTERVAL_MS,
|