@topolo/sdk 0.2.3 → 0.2.5
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 +266 -4
- package/dist/index.d.cts +173 -3
- package/dist/index.d.ts +173 -3
- package/dist/index.js +266 -4
- package/package.json +1 -1
- package/src/applications.generated.ts +244 -2
- package/src/services.generated.ts +21 -1
- package/src/services.test.ts +24 -0
|
@@ -73,6 +73,30 @@ export const APPLICATIONS = {
|
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
|
+
"books": {
|
|
77
|
+
"id": "books",
|
|
78
|
+
"appDir": "TopoloBooks",
|
|
79
|
+
"name": "topolo-books",
|
|
80
|
+
"packageName": "topolo-books",
|
|
81
|
+
"productionUrl": "https://books.topolo.app",
|
|
82
|
+
"services": [
|
|
83
|
+
"books"
|
|
84
|
+
],
|
|
85
|
+
"deployTargets": [
|
|
86
|
+
{
|
|
87
|
+
"name": "topolo-books",
|
|
88
|
+
"kind": "worker",
|
|
89
|
+
"apiUrl": "https://books.topolo.app",
|
|
90
|
+
"domains": [
|
|
91
|
+
"books.topolo.app"
|
|
92
|
+
],
|
|
93
|
+
"routes": [
|
|
94
|
+
"books.topolo.app"
|
|
95
|
+
],
|
|
96
|
+
"serviceId": "books"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
76
100
|
"bugfix": {
|
|
77
101
|
"id": "bugfix",
|
|
78
102
|
"appDir": "TopoloBugFix",
|
|
@@ -274,6 +298,30 @@ export const APPLICATIONS = {
|
|
|
274
298
|
}
|
|
275
299
|
]
|
|
276
300
|
},
|
|
301
|
+
"customer_success": {
|
|
302
|
+
"id": "customer_success",
|
|
303
|
+
"appDir": "TopoloCustomerSuccess",
|
|
304
|
+
"name": "topolo-customer-success",
|
|
305
|
+
"packageName": "topolo-customer-success",
|
|
306
|
+
"productionUrl": "https://customer-success.topolo.app",
|
|
307
|
+
"services": [
|
|
308
|
+
"customer_success"
|
|
309
|
+
],
|
|
310
|
+
"deployTargets": [
|
|
311
|
+
{
|
|
312
|
+
"name": "topolo-customer-success",
|
|
313
|
+
"kind": "worker",
|
|
314
|
+
"apiUrl": "https://customer-success.topolo.app",
|
|
315
|
+
"domains": [
|
|
316
|
+
"customer-success.topolo.app"
|
|
317
|
+
],
|
|
318
|
+
"routes": [
|
|
319
|
+
"customer-success.topolo.app"
|
|
320
|
+
],
|
|
321
|
+
"serviceId": "customer_success"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
},
|
|
277
325
|
"developers": {
|
|
278
326
|
"id": "developers",
|
|
279
327
|
"appDir": "TopoloDevelopers",
|
|
@@ -350,6 +398,30 @@ export const APPLICATIONS = {
|
|
|
350
398
|
}
|
|
351
399
|
]
|
|
352
400
|
},
|
|
401
|
+
"flow": {
|
|
402
|
+
"id": "flow",
|
|
403
|
+
"appDir": "TopoloFlow",
|
|
404
|
+
"name": "topolo-flow",
|
|
405
|
+
"packageName": "topolo-flow",
|
|
406
|
+
"productionUrl": "https://flow.topolo.app",
|
|
407
|
+
"services": [
|
|
408
|
+
"flow"
|
|
409
|
+
],
|
|
410
|
+
"deployTargets": [
|
|
411
|
+
{
|
|
412
|
+
"name": "topolo-flow",
|
|
413
|
+
"kind": "worker",
|
|
414
|
+
"apiUrl": "https://flow.topolo.app",
|
|
415
|
+
"domains": [
|
|
416
|
+
"flow.topolo.app"
|
|
417
|
+
],
|
|
418
|
+
"routes": [
|
|
419
|
+
"flow.topolo.app"
|
|
420
|
+
],
|
|
421
|
+
"serviceId": "flow"
|
|
422
|
+
}
|
|
423
|
+
]
|
|
424
|
+
},
|
|
353
425
|
"forecast": {
|
|
354
426
|
"id": "forecast",
|
|
355
427
|
"appDir": "TopoloForecast",
|
|
@@ -378,6 +450,78 @@ export const APPLICATIONS = {
|
|
|
378
450
|
}
|
|
379
451
|
]
|
|
380
452
|
},
|
|
453
|
+
"forms": {
|
|
454
|
+
"id": "forms",
|
|
455
|
+
"appDir": "TopoloForms",
|
|
456
|
+
"name": "topolo-forms",
|
|
457
|
+
"packageName": "topolo-forms",
|
|
458
|
+
"productionUrl": "https://forms.topolo.app",
|
|
459
|
+
"services": [
|
|
460
|
+
"forms"
|
|
461
|
+
],
|
|
462
|
+
"deployTargets": [
|
|
463
|
+
{
|
|
464
|
+
"name": "topolo-forms",
|
|
465
|
+
"kind": "worker",
|
|
466
|
+
"apiUrl": "https://forms.topolo.app",
|
|
467
|
+
"domains": [
|
|
468
|
+
"forms.topolo.app"
|
|
469
|
+
],
|
|
470
|
+
"routes": [
|
|
471
|
+
"forms.topolo.app"
|
|
472
|
+
],
|
|
473
|
+
"serviceId": "forms"
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
},
|
|
477
|
+
"insights": {
|
|
478
|
+
"id": "insights",
|
|
479
|
+
"appDir": "TopoloInsights",
|
|
480
|
+
"name": "topolo-insights",
|
|
481
|
+
"packageName": "topolo-insights",
|
|
482
|
+
"productionUrl": "https://insights.topolo.app",
|
|
483
|
+
"services": [
|
|
484
|
+
"insights"
|
|
485
|
+
],
|
|
486
|
+
"deployTargets": [
|
|
487
|
+
{
|
|
488
|
+
"name": "topolo-insights",
|
|
489
|
+
"kind": "worker",
|
|
490
|
+
"apiUrl": "https://insights.topolo.app",
|
|
491
|
+
"domains": [
|
|
492
|
+
"insights.topolo.app"
|
|
493
|
+
],
|
|
494
|
+
"routes": [
|
|
495
|
+
"insights.topolo.app"
|
|
496
|
+
],
|
|
497
|
+
"serviceId": "insights"
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
"inventory": {
|
|
502
|
+
"id": "inventory",
|
|
503
|
+
"appDir": "TopoloInventory",
|
|
504
|
+
"name": "topolo-inventory",
|
|
505
|
+
"packageName": "topolo-inventory",
|
|
506
|
+
"productionUrl": "https://inventory.topolo.app",
|
|
507
|
+
"services": [
|
|
508
|
+
"inventory"
|
|
509
|
+
],
|
|
510
|
+
"deployTargets": [
|
|
511
|
+
{
|
|
512
|
+
"name": "topolo-inventory",
|
|
513
|
+
"kind": "worker",
|
|
514
|
+
"apiUrl": "https://inventory.topolo.app",
|
|
515
|
+
"domains": [
|
|
516
|
+
"inventory.topolo.app"
|
|
517
|
+
],
|
|
518
|
+
"routes": [
|
|
519
|
+
"inventory.topolo.app"
|
|
520
|
+
],
|
|
521
|
+
"serviceId": "inventory"
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
381
525
|
"learn": {
|
|
382
526
|
"id": "learn",
|
|
383
527
|
"appDir": "TopoloLearn",
|
|
@@ -578,7 +722,9 @@ export const APPLICATIONS = {
|
|
|
578
722
|
"kind": "worker",
|
|
579
723
|
"apiUrl": null,
|
|
580
724
|
"domains": [
|
|
581
|
-
"one.topolo.io"
|
|
725
|
+
"one.topolo.io",
|
|
726
|
+
"topolo.io",
|
|
727
|
+
"www.topolo.io"
|
|
582
728
|
],
|
|
583
729
|
"routes": [],
|
|
584
730
|
"serviceId": null
|
|
@@ -586,7 +732,7 @@ export const APPLICATIONS = {
|
|
|
586
732
|
{
|
|
587
733
|
"name": "topoloone-worker",
|
|
588
734
|
"kind": "worker",
|
|
589
|
-
"apiUrl": "https://
|
|
735
|
+
"apiUrl": "https://one.topolo.app",
|
|
590
736
|
"domains": [],
|
|
591
737
|
"routes": [
|
|
592
738
|
"one.topolo.app/*"
|
|
@@ -615,6 +761,30 @@ export const APPLICATIONS = {
|
|
|
615
761
|
}
|
|
616
762
|
]
|
|
617
763
|
},
|
|
764
|
+
"people": {
|
|
765
|
+
"id": "people",
|
|
766
|
+
"appDir": "TopoloPeople",
|
|
767
|
+
"name": "topolo-people",
|
|
768
|
+
"packageName": "topolo-people",
|
|
769
|
+
"productionUrl": "https://people.topolo.app",
|
|
770
|
+
"services": [
|
|
771
|
+
"people"
|
|
772
|
+
],
|
|
773
|
+
"deployTargets": [
|
|
774
|
+
{
|
|
775
|
+
"name": "topolo-people",
|
|
776
|
+
"kind": "worker",
|
|
777
|
+
"apiUrl": "https://people.topolo.app",
|
|
778
|
+
"domains": [
|
|
779
|
+
"people.topolo.app"
|
|
780
|
+
],
|
|
781
|
+
"routes": [
|
|
782
|
+
"people.topolo.app"
|
|
783
|
+
],
|
|
784
|
+
"serviceId": "people"
|
|
785
|
+
}
|
|
786
|
+
]
|
|
787
|
+
},
|
|
618
788
|
"quro": {
|
|
619
789
|
"id": "quro",
|
|
620
790
|
"appDir": "TopoloQuro",
|
|
@@ -686,6 +856,30 @@ export const APPLICATIONS = {
|
|
|
686
856
|
}
|
|
687
857
|
]
|
|
688
858
|
},
|
|
859
|
+
"sign": {
|
|
860
|
+
"id": "sign",
|
|
861
|
+
"appDir": "TopoloSign",
|
|
862
|
+
"name": "topolo-sign",
|
|
863
|
+
"packageName": "topolo-sign",
|
|
864
|
+
"productionUrl": "https://sign.topolo.app",
|
|
865
|
+
"services": [
|
|
866
|
+
"sign"
|
|
867
|
+
],
|
|
868
|
+
"deployTargets": [
|
|
869
|
+
{
|
|
870
|
+
"name": "topolo-sign",
|
|
871
|
+
"kind": "worker",
|
|
872
|
+
"apiUrl": "https://sign.topolo.app",
|
|
873
|
+
"domains": [
|
|
874
|
+
"sign.topolo.app"
|
|
875
|
+
],
|
|
876
|
+
"routes": [
|
|
877
|
+
"sign.topolo.app"
|
|
878
|
+
],
|
|
879
|
+
"serviceId": "sign"
|
|
880
|
+
}
|
|
881
|
+
]
|
|
882
|
+
},
|
|
689
883
|
"social_studio": {
|
|
690
884
|
"id": "social_studio",
|
|
691
885
|
"appDir": "TopoloSocialStudio",
|
|
@@ -782,6 +976,54 @@ export const APPLICATIONS = {
|
|
|
782
976
|
}
|
|
783
977
|
]
|
|
784
978
|
},
|
|
979
|
+
"survey": {
|
|
980
|
+
"id": "survey",
|
|
981
|
+
"appDir": "TopoloSurvey",
|
|
982
|
+
"name": "topolo-survey",
|
|
983
|
+
"packageName": "topolo-survey",
|
|
984
|
+
"productionUrl": "https://survey.topolo.app",
|
|
985
|
+
"services": [
|
|
986
|
+
"survey"
|
|
987
|
+
],
|
|
988
|
+
"deployTargets": [
|
|
989
|
+
{
|
|
990
|
+
"name": "topolo-survey",
|
|
991
|
+
"kind": "worker",
|
|
992
|
+
"apiUrl": "https://survey.topolo.app",
|
|
993
|
+
"domains": [
|
|
994
|
+
"survey.topolo.app"
|
|
995
|
+
],
|
|
996
|
+
"routes": [
|
|
997
|
+
"survey.topolo.app"
|
|
998
|
+
],
|
|
999
|
+
"serviceId": "survey"
|
|
1000
|
+
}
|
|
1001
|
+
]
|
|
1002
|
+
},
|
|
1003
|
+
"voice": {
|
|
1004
|
+
"id": "voice",
|
|
1005
|
+
"appDir": "TopoloVoice",
|
|
1006
|
+
"name": "topolo-voice",
|
|
1007
|
+
"packageName": "topolo-voice",
|
|
1008
|
+
"productionUrl": "https://voice.topolo.app",
|
|
1009
|
+
"services": [
|
|
1010
|
+
"voice"
|
|
1011
|
+
],
|
|
1012
|
+
"deployTargets": [
|
|
1013
|
+
{
|
|
1014
|
+
"name": "topolo-voice",
|
|
1015
|
+
"kind": "worker",
|
|
1016
|
+
"apiUrl": "https://voice.topolo.app",
|
|
1017
|
+
"domains": [
|
|
1018
|
+
"voice.topolo.app"
|
|
1019
|
+
],
|
|
1020
|
+
"routes": [
|
|
1021
|
+
"voice.topolo.app"
|
|
1022
|
+
],
|
|
1023
|
+
"serviceId": "voice"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
},
|
|
785
1027
|
"web": {
|
|
786
1028
|
"id": "web",
|
|
787
1029
|
"appDir": "TopoloWeb",
|
|
@@ -5,32 +5,52 @@
|
|
|
5
5
|
export const SERVICES = {
|
|
6
6
|
agent: "https://topolo-agent-worker.topolo.workers.dev",
|
|
7
7
|
auth: "https://auth.topolo.app",
|
|
8
|
+
books: "https://books.topolo.app",
|
|
8
9
|
bugfix: "https://bugfix.topolo.app",
|
|
9
10
|
bytes: "https://r2-media-manager-worker.topolo.workers.dev",
|
|
10
11
|
calendar: "https://calendar.topolo.app",
|
|
11
12
|
chat: "https://chat.topolo.app",
|
|
12
13
|
commerce: "https://topolo-commerce-api.topolo.workers.dev",
|
|
13
14
|
crm: "https://crm-api.topolo.app",
|
|
15
|
+
customer_success: "https://customer-success.topolo.app",
|
|
14
16
|
feed: "https://topolo-feed-api.topolo.app",
|
|
17
|
+
flow: "https://flow.topolo.app",
|
|
15
18
|
forecast: "https://forecast-worker-production.topolo.workers.dev",
|
|
19
|
+
forms: "https://forms.topolo.app",
|
|
20
|
+
insights: "https://insights.topolo.app",
|
|
21
|
+
inventory: "https://inventory.topolo.app",
|
|
16
22
|
learn: "https://topololearn-api.topolo.workers.dev",
|
|
17
23
|
mail: "https://mail.topolo.app",
|
|
18
24
|
mdm: "https://topolo-mdm-api.topolo.app",
|
|
19
25
|
messaging: "https://messages.topolo.app",
|
|
20
26
|
nexus: "https://topolo-nexus-gateway.topolo.workers.dev",
|
|
21
|
-
one: "https://
|
|
27
|
+
one: "https://one.topolo.app",
|
|
22
28
|
pay: "https://topolo-pay.topolo.workers.dev",
|
|
29
|
+
people: "https://people.topolo.app",
|
|
23
30
|
"quro.api": "https://api.ol0.me",
|
|
24
31
|
"quro.redirect": "https://ol0.me",
|
|
25
32
|
roadmapper: "https://roadmapper-api.topolo.app",
|
|
33
|
+
sign: "https://sign.topolo.app",
|
|
26
34
|
social_studio: "https://topolo-social-studio-api.topolo.workers.dev",
|
|
27
35
|
socialize: "https://socialize-prod-api.topolo.workers.dev",
|
|
28
36
|
support: "https://support.topolo.app",
|
|
37
|
+
survey: "https://survey.topolo.app",
|
|
38
|
+
voice: "https://voice.topolo.app",
|
|
29
39
|
web: "https://web-api.topolo.app",
|
|
30
40
|
} as const;
|
|
31
41
|
|
|
32
42
|
export type ServiceId = keyof typeof SERVICES;
|
|
33
43
|
|
|
34
44
|
export const PLATFORM_SERVICE_IDS: Partial<Record<ServiceId, string>> = {
|
|
45
|
+
books: "srv_topolo_books",
|
|
35
46
|
crm: "srv_iCwM4jGXcwlj",
|
|
47
|
+
customer_success: "srv_topolo_customer_success",
|
|
48
|
+
flow: "srv_topolo_flow",
|
|
49
|
+
forms: "srv_topolo_forms",
|
|
50
|
+
insights: "srv_topolo_insights",
|
|
51
|
+
inventory: "srv_topolo_inventory",
|
|
52
|
+
people: "srv_topolo_people",
|
|
53
|
+
sign: "srv_topolo_sign",
|
|
54
|
+
survey: "srv_topolo_survey",
|
|
55
|
+
voice: "srv_topolo_voice",
|
|
36
56
|
};
|
package/src/services.test.ts
CHANGED
|
@@ -14,6 +14,7 @@ const EXPECTED_APPLICATION_IDS = [
|
|
|
14
14
|
'admin',
|
|
15
15
|
'agent',
|
|
16
16
|
'auth',
|
|
17
|
+
'books',
|
|
17
18
|
'bugfix',
|
|
18
19
|
'bytes',
|
|
19
20
|
'calendar',
|
|
@@ -22,10 +23,15 @@ const EXPECTED_APPLICATION_IDS = [
|
|
|
22
23
|
'cloudcontrol',
|
|
23
24
|
'commerce',
|
|
24
25
|
'crm',
|
|
26
|
+
'customer_success',
|
|
25
27
|
'developers',
|
|
26
28
|
'docs',
|
|
27
29
|
'feed',
|
|
30
|
+
'flow',
|
|
28
31
|
'forecast',
|
|
32
|
+
'forms',
|
|
33
|
+
'insights',
|
|
34
|
+
'inventory',
|
|
29
35
|
'learn',
|
|
30
36
|
'mail',
|
|
31
37
|
'mcp',
|
|
@@ -34,11 +40,15 @@ const EXPECTED_APPLICATION_IDS = [
|
|
|
34
40
|
'nexus',
|
|
35
41
|
'one',
|
|
36
42
|
'pay',
|
|
43
|
+
'people',
|
|
37
44
|
'quro',
|
|
38
45
|
'roadmapper',
|
|
46
|
+
'sign',
|
|
39
47
|
'social_studio',
|
|
40
48
|
'socialize',
|
|
41
49
|
'support',
|
|
50
|
+
'survey',
|
|
51
|
+
'voice',
|
|
42
52
|
'web',
|
|
43
53
|
];
|
|
44
54
|
|
|
@@ -46,14 +56,28 @@ describe('service registry', () => {
|
|
|
46
56
|
it('includes every production worker API that belongs to a platform application', () => {
|
|
47
57
|
expect(DEFAULT_SERVICE_URLS).toMatchObject({
|
|
48
58
|
calendar: 'https://calendar.topolo.app',
|
|
59
|
+
books: 'https://books.topolo.app',
|
|
49
60
|
feed: 'https://topolo-feed-api.topolo.app',
|
|
50
61
|
mail: 'https://mail.topolo.app',
|
|
62
|
+
one: 'https://one.topolo.app',
|
|
51
63
|
web: 'https://web-api.topolo.app',
|
|
52
64
|
});
|
|
65
|
+
expect(DEFAULT_SERVICE_URLS).toMatchObject({
|
|
66
|
+
customer_success: 'https://customer-success.topolo.app',
|
|
67
|
+
forms: 'https://forms.topolo.app',
|
|
68
|
+
survey: 'https://survey.topolo.app',
|
|
69
|
+
});
|
|
53
70
|
expect(DEFAULT_SERVICE_URLS).not.toHaveProperty('web.api');
|
|
54
71
|
expect(DEFAULT_SERVICE_URLS).not.toHaveProperty('web.runtime');
|
|
55
72
|
});
|
|
56
73
|
|
|
74
|
+
it('infers platform Auth service ids from scaffolded app metadata', async () => {
|
|
75
|
+
const { PLATFORM_SERVICE_IDS } = await import('./services.js');
|
|
76
|
+
|
|
77
|
+
expect(PLATFORM_SERVICE_IDS.books).toBe('srv_topolo_books');
|
|
78
|
+
expect(PLATFORM_SERVICE_IDS.customer_success).toBe('srv_topolo_customer_success');
|
|
79
|
+
});
|
|
80
|
+
|
|
57
81
|
it('maps every callable service back to an application catalog entry', () => {
|
|
58
82
|
const applicationServices = new Set<string>(
|
|
59
83
|
Object.values(APPLICATIONS).flatMap((application) => [...application.services]),
|