@applica-software-guru/persona-sdk 0.1.2 → 0.1.4
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 +49 -0
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.es.js +152 -55
- package/dist/bundle.es.js.map +1 -1
- package/dist/index.d.ts +138 -0
- package/package.json +1 -1
- package/src/billing/billing-client.ts +142 -0
- package/src/billing/types.ts +104 -0
- package/src/index.ts +15 -0
- package/src/persona-sdk.ts +10 -0
package/dist/bundle.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (n, t, s) =>
|
|
4
|
-
class
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var d = (n, t, s) => t in n ? l(n, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[t] = s;
|
|
3
|
+
var o = (n, t, s) => d(n, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
class h extends Error {
|
|
5
5
|
constructor(s, e) {
|
|
6
6
|
super(`API Error: ${s} - ${e}`);
|
|
7
7
|
o(this, "statusCode");
|
|
@@ -9,7 +9,7 @@ class c extends Error {
|
|
|
9
9
|
this.statusCode = s, this.body = e;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
class
|
|
12
|
+
class y {
|
|
13
13
|
constructor(t) {
|
|
14
14
|
this.apiKey = t;
|
|
15
15
|
}
|
|
@@ -24,7 +24,7 @@ class a {
|
|
|
24
24
|
constructor(t, s) {
|
|
25
25
|
o(this, "baseUrl");
|
|
26
26
|
o(this, "authProvider");
|
|
27
|
-
this.baseUrl = t, this.authProvider = typeof s == "string" ? new
|
|
27
|
+
this.baseUrl = t, this.authProvider = typeof s == "string" ? new y(s) : s;
|
|
28
28
|
}
|
|
29
29
|
getBaseUrl() {
|
|
30
30
|
return this.baseUrl;
|
|
@@ -45,7 +45,7 @@ class a {
|
|
|
45
45
|
async handleResponse(t) {
|
|
46
46
|
if (!t.ok) {
|
|
47
47
|
const e = await t.text();
|
|
48
|
-
throw new
|
|
48
|
+
throw new h(t.status, e);
|
|
49
49
|
}
|
|
50
50
|
const s = await t.text();
|
|
51
51
|
return s ? JSON.parse(s) : void 0;
|
|
@@ -88,11 +88,11 @@ class a {
|
|
|
88
88
|
});
|
|
89
89
|
if (!s.ok) {
|
|
90
90
|
const e = await s.text();
|
|
91
|
-
throw new
|
|
91
|
+
throw new h(s.status, e);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
class
|
|
95
|
+
class g extends a {
|
|
96
96
|
constructor(t, s) {
|
|
97
97
|
super(t, s);
|
|
98
98
|
}
|
|
@@ -125,7 +125,7 @@ class y extends a {
|
|
|
125
125
|
return this.httpPost("/projects/" + t + "/subscription/credits", s);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class w extends a {
|
|
129
129
|
constructor(t, s) {
|
|
130
130
|
super(t, s);
|
|
131
131
|
}
|
|
@@ -158,7 +158,7 @@ class g extends a {
|
|
|
158
158
|
return this.httpPost("/agents/" + t + "/revisions/" + s + "/rollback", {});
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
class
|
|
161
|
+
class m extends a {
|
|
162
162
|
constructor(s, e, r) {
|
|
163
163
|
super(s, e);
|
|
164
164
|
o(this, "knowledgeBaseId");
|
|
@@ -181,7 +181,7 @@ class w extends a {
|
|
|
181
181
|
await this.httpDelete("/knowledge-bases/" + this.knowledgeBaseId + "/documents/" + s);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
class
|
|
184
|
+
class b extends a {
|
|
185
185
|
constructor(t, s) {
|
|
186
186
|
super(t, s);
|
|
187
187
|
}
|
|
@@ -202,13 +202,13 @@ class m extends a {
|
|
|
202
202
|
await this.httpDelete("/knowledge-bases/" + t);
|
|
203
203
|
}
|
|
204
204
|
documents(t) {
|
|
205
|
-
return new
|
|
205
|
+
return new m(this.getBaseUrl(), this.getAuthProvider(), t);
|
|
206
206
|
}
|
|
207
207
|
async searchChunks(t, s) {
|
|
208
208
|
return this.httpPost("/knowledge-bases/" + t + "/search", s);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
class
|
|
211
|
+
class P extends a {
|
|
212
212
|
constructor(t, s) {
|
|
213
213
|
super(t, s);
|
|
214
214
|
}
|
|
@@ -226,7 +226,7 @@ class b extends a {
|
|
|
226
226
|
return this.httpPost("/workflows/" + t + "/executions/queue", s);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
class
|
|
229
|
+
class f extends a {
|
|
230
230
|
constructor(t, s) {
|
|
231
231
|
super(t, s);
|
|
232
232
|
}
|
|
@@ -247,7 +247,7 @@ class P extends a {
|
|
|
247
247
|
return this.httpGet("/workflows/" + t);
|
|
248
248
|
}
|
|
249
249
|
executions() {
|
|
250
|
-
return new
|
|
250
|
+
return new P(this.getBaseUrl(), this.getAuthProvider());
|
|
251
251
|
}
|
|
252
252
|
async listRevisions(t) {
|
|
253
253
|
return this.httpGet("/workflows/" + t + "/revisions");
|
|
@@ -259,7 +259,7 @@ class P extends a {
|
|
|
259
259
|
return this.httpPost("/workflows/" + t + "/revisions/" + s + "/rollback", {});
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
class
|
|
262
|
+
class v extends a {
|
|
263
263
|
constructor(t, s) {
|
|
264
264
|
super(t, s);
|
|
265
265
|
}
|
|
@@ -310,7 +310,7 @@ class k extends a {
|
|
|
310
310
|
return this.httpPost("/features/templates/mcp/available-tools", t);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
class
|
|
313
|
+
class G {
|
|
314
314
|
constructor(t, s) {
|
|
315
315
|
o(this, "baseUrl");
|
|
316
316
|
o(this, "auth");
|
|
@@ -320,7 +320,7 @@ class v {
|
|
|
320
320
|
return new k(this.baseUrl, this.auth);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
class
|
|
323
|
+
class x extends a {
|
|
324
324
|
constructor(t, s) {
|
|
325
325
|
super(t, s);
|
|
326
326
|
}
|
|
@@ -338,7 +338,7 @@ class G extends a {
|
|
|
338
338
|
await this.httpDelete("/triggers/executions/" + t);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
class
|
|
341
|
+
class U extends a {
|
|
342
342
|
constructor(t, s) {
|
|
343
343
|
super(t, s);
|
|
344
344
|
}
|
|
@@ -359,10 +359,10 @@ class x extends a {
|
|
|
359
359
|
return this.httpGet("/triggers/" + t);
|
|
360
360
|
}
|
|
361
361
|
executions() {
|
|
362
|
-
return new
|
|
362
|
+
return new x(this.getBaseUrl(), this.getAuthProvider());
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
class
|
|
365
|
+
class S extends a {
|
|
366
366
|
constructor(t, s) {
|
|
367
367
|
super(t, s);
|
|
368
368
|
}
|
|
@@ -383,13 +383,13 @@ class U extends a {
|
|
|
383
383
|
await this.httpDelete("/service-prices/" + t);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
class
|
|
386
|
+
class T extends a {
|
|
387
387
|
constructor(t, s) {
|
|
388
388
|
super(t, s);
|
|
389
389
|
}
|
|
390
390
|
async list(t, s, e, r, i, u) {
|
|
391
|
-
const
|
|
392
|
-
return t && (
|
|
391
|
+
const c = { page: i, size: u };
|
|
392
|
+
return t && (c.keyword = t), s && (c.status = s), e && (c.agentId = e), r && (c.userId = r), this.httpGet("/sessions", c);
|
|
393
393
|
}
|
|
394
394
|
async get(t) {
|
|
395
395
|
return this.httpGet("/sessions/" + t);
|
|
@@ -408,7 +408,7 @@ class A extends a {
|
|
|
408
408
|
await this.httpDelete("/sessions/" + t);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
class
|
|
411
|
+
class A extends a {
|
|
412
412
|
constructor(t, s) {
|
|
413
413
|
super(t, s);
|
|
414
414
|
}
|
|
@@ -450,44 +450,140 @@ class B extends a {
|
|
|
450
450
|
return this.httpPost("/missions/" + t + "/continue");
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class p {
|
|
454
|
+
constructor(t, s) {
|
|
455
|
+
o(this, "baseUrl");
|
|
456
|
+
o(this, "authProvider");
|
|
457
|
+
this.baseUrl = (t || "https://persona.applica.guru/billing").replace(/\/$/, ""), this.authProvider = s ?? null;
|
|
458
|
+
}
|
|
459
|
+
buildHeaders() {
|
|
460
|
+
const t = new Headers();
|
|
461
|
+
return t.set("Content-Type", "application/json"), this.authProvider && (typeof this.authProvider == "string" ? t.set("x-persona-apikey", this.authProvider) : this.authProvider.applyHeaders(t)), t;
|
|
462
|
+
}
|
|
463
|
+
async request(t, s, e) {
|
|
464
|
+
const r = await fetch(this.baseUrl + t, {
|
|
465
|
+
method: s,
|
|
466
|
+
headers: this.buildHeaders(),
|
|
467
|
+
body: e ? JSON.stringify(e) : void 0
|
|
468
|
+
});
|
|
469
|
+
if (!r.ok) {
|
|
470
|
+
const u = await r.text();
|
|
471
|
+
throw new h(r.status, u);
|
|
472
|
+
}
|
|
473
|
+
const i = await r.text();
|
|
474
|
+
return i ? JSON.parse(i) : void 0;
|
|
475
|
+
}
|
|
476
|
+
async createCustomer(t) {
|
|
477
|
+
return this.request("/customers", "POST", t);
|
|
478
|
+
}
|
|
479
|
+
async updateCustomer(t, s) {
|
|
480
|
+
return this.request("/customers/" + t, "PUT", s);
|
|
481
|
+
}
|
|
482
|
+
async getCustomer(t) {
|
|
483
|
+
return this.request("/customers/" + t, "GET");
|
|
484
|
+
}
|
|
485
|
+
async saveCustomer(t) {
|
|
486
|
+
return this.request("/customers", "POST", t);
|
|
487
|
+
}
|
|
488
|
+
async deleteCustomer(t) {
|
|
489
|
+
await this.request("/customers/" + t, "DELETE");
|
|
490
|
+
}
|
|
491
|
+
async createSubscription(t) {
|
|
492
|
+
return this.request("/customers/" + t.owner + "/subscription", "POST", t);
|
|
493
|
+
}
|
|
494
|
+
async getSubscription(t) {
|
|
495
|
+
return this.request("/customers/" + t + "/subscription", "GET");
|
|
496
|
+
}
|
|
497
|
+
async getProjectSubscription(t) {
|
|
498
|
+
return this.request("/projects/" + t + "/subscription", "GET");
|
|
499
|
+
}
|
|
500
|
+
async changeProjectSubscriptionPlan(t, s) {
|
|
501
|
+
return this.request("/projects/" + t + "/subscription/actions/change-plan", "POST", s);
|
|
502
|
+
}
|
|
503
|
+
async addProjectSubscriptionCredits(t, s) {
|
|
504
|
+
return this.request("/projects/" + t + "/subscription/actions/add-credits", "POST", s);
|
|
505
|
+
}
|
|
506
|
+
async beginUpgrade(t, s) {
|
|
507
|
+
return this.request("/customers/" + t + "/subscription/actions/upgrade", "POST", s);
|
|
508
|
+
}
|
|
509
|
+
async downgrade(t, s) {
|
|
510
|
+
return this.request("/customers/" + t + "/subscription/actions/downgrade", "POST", s);
|
|
511
|
+
}
|
|
512
|
+
async mentorize(t, s) {
|
|
513
|
+
return this.request("/customers/" + t + "/subscription/actions/mentorize", "POST", s);
|
|
514
|
+
}
|
|
515
|
+
async addCredits(t, s) {
|
|
516
|
+
return this.request("/customers/" + t + "/subscription/credits", "POST", { credits: s });
|
|
517
|
+
}
|
|
518
|
+
async useCredits(t, s, e, r) {
|
|
519
|
+
const i = { credits: s, services: e };
|
|
520
|
+
return r && (i.referenceId = r), this.request("/customers/" + t + "/subscription/credits", "DELETE", i);
|
|
521
|
+
}
|
|
522
|
+
async getCredits(t) {
|
|
523
|
+
try {
|
|
524
|
+
return (await this.request("/customers/" + t + "/subscription/credits", "GET")).credits ?? 0;
|
|
525
|
+
} catch {
|
|
526
|
+
return 0;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
async isValid(t) {
|
|
530
|
+
try {
|
|
531
|
+
return (await this.request("/customers/" + t + "/subscription/valid", "GET")).valid ?? !1;
|
|
532
|
+
} catch {
|
|
533
|
+
return !1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
async listInvoices(t, s, e) {
|
|
537
|
+
const r = [];
|
|
538
|
+
s && r.push("date_from=" + s), e && r.push("date_to=" + e);
|
|
539
|
+
const i = r.length > 0 ? "?" + r.join("&") : "";
|
|
540
|
+
return this.request("/customers/" + t + "/invoices" + i, "GET");
|
|
541
|
+
}
|
|
542
|
+
async cancelSubscription(t) {
|
|
543
|
+
return this.request("/customers/" + t + "/subscription/actions/cancel", "POST", {});
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
class B {
|
|
454
547
|
constructor(t, s) {
|
|
455
548
|
o(this, "baseUrl");
|
|
456
549
|
o(this, "workflowsBaseUrl");
|
|
457
550
|
this.baseUrl = t, this.workflowsBaseUrl = s;
|
|
458
551
|
}
|
|
459
552
|
projects(t) {
|
|
460
|
-
return new
|
|
553
|
+
return new g(this.baseUrl, t);
|
|
461
554
|
}
|
|
462
555
|
agents(t) {
|
|
463
|
-
return new
|
|
556
|
+
return new w(this.baseUrl, t);
|
|
464
557
|
}
|
|
465
558
|
knowledgeBases(t) {
|
|
466
|
-
return new
|
|
559
|
+
return new b(this.baseUrl, t);
|
|
467
560
|
}
|
|
468
561
|
workflows(t) {
|
|
469
|
-
return new
|
|
562
|
+
return new f(this.workflowsBaseUrl, t);
|
|
470
563
|
}
|
|
471
564
|
credentials(t) {
|
|
472
|
-
return new
|
|
565
|
+
return new v(this.baseUrl, t);
|
|
473
566
|
}
|
|
474
567
|
features(t) {
|
|
475
|
-
return new
|
|
568
|
+
return new G(this.baseUrl, t);
|
|
476
569
|
}
|
|
477
570
|
triggers(t) {
|
|
478
|
-
return new
|
|
571
|
+
return new U(this.baseUrl, t);
|
|
479
572
|
}
|
|
480
573
|
servicePrices(t) {
|
|
481
|
-
return new
|
|
574
|
+
return new S(this.baseUrl, t);
|
|
482
575
|
}
|
|
483
576
|
sessions(t) {
|
|
484
|
-
return new
|
|
577
|
+
return new T(this.baseUrl, t);
|
|
485
578
|
}
|
|
486
579
|
missions(t) {
|
|
487
|
-
return new
|
|
580
|
+
return new A(this.baseUrl, t);
|
|
581
|
+
}
|
|
582
|
+
billing(t) {
|
|
583
|
+
return !t || typeof t != "string" ? new p(void 0, t) : new p(t);
|
|
488
584
|
}
|
|
489
585
|
}
|
|
490
|
-
class
|
|
586
|
+
class E {
|
|
491
587
|
constructor(t) {
|
|
492
588
|
this.token = t;
|
|
493
589
|
}
|
|
@@ -499,23 +595,24 @@ class j {
|
|
|
499
595
|
}
|
|
500
596
|
}
|
|
501
597
|
export {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
598
|
+
w as AgentsApi,
|
|
599
|
+
h as ApiException,
|
|
600
|
+
y as ApiKeyAuthenticationProvider,
|
|
601
|
+
E as BearerTokenAuthenticationProvider,
|
|
602
|
+
p as BillingClient,
|
|
603
|
+
v as CredentialsApi,
|
|
507
604
|
k as FeatureTemplatesApi,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
605
|
+
G as FeaturesApi,
|
|
606
|
+
m as KnowledgeBaseDocumentsApi,
|
|
607
|
+
b as KnowledgeBasesApi,
|
|
608
|
+
A as MissionsApi,
|
|
609
|
+
B as PersonaSdk,
|
|
610
|
+
g as ProjectsApi,
|
|
611
|
+
S as ServicePricesApi,
|
|
612
|
+
T as SessionsApi,
|
|
613
|
+
x as TriggerExecutionsApi,
|
|
614
|
+
U as TriggersApi,
|
|
615
|
+
P as WorkflowExecutionsApi,
|
|
616
|
+
f as WorkflowsApi
|
|
520
617
|
};
|
|
521
618
|
//# sourceMappingURL=bundle.es.js.map
|
package/dist/bundle.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.es.js","sources":["../src/exceptions.ts","../src/auth/api-key-auth.ts","../src/http-api.ts","../src/projects/projects-api.ts","../src/agents/agents-api.ts","../src/knowledges/knowledge-base-documents-api.ts","../src/knowledges/knowledge-bases-api.ts","../src/workflows/workflow-executions-api.ts","../src/workflows/workflows-api.ts","../src/credentials/credentials-api.ts","../src/features/feature-templates-api.ts","../src/features/features-api.ts","../src/triggers/trigger-executions-api.ts","../src/triggers/triggers-api.ts","../src/service-prices/service-prices-api.ts","../src/sessions/sessions-api.ts","../src/missions/missions-api.ts","../src/persona-sdk.ts","../src/auth/bearer-token-auth.ts"],"sourcesContent":["export class ApiException extends Error {\n public readonly statusCode: number;\n public readonly body: string;\n\n constructor(statusCode: number, body: string) {\n super(`API Error: ${statusCode} - ${body}`);\n this.statusCode = statusCode;\n this.body = body;\n }\n}\n","import { AuthenticationProvider } from './authentication-provider';\n\nexport class ApiKeyAuthenticationProvider implements AuthenticationProvider {\n constructor(private readonly apiKey: string) {}\n\n applyHeaders(headers: Headers): void {\n headers.set('x-persona-apikey', this.apiKey);\n }\n\n getCredentials(): string {\n return this.apiKey;\n }\n}\n","import { ApiException } from './exceptions';\nimport { AuthenticationProvider } from './auth/authentication-provider';\nimport { ApiKeyAuthenticationProvider } from './auth/api-key-auth';\n\nexport abstract class HttpApi {\n private readonly baseUrl: string;\n private readonly authProvider: AuthenticationProvider;\n\n constructor(baseUrl: string, apiKey: string | AuthenticationProvider) {\n this.baseUrl = baseUrl;\n this.authProvider = typeof apiKey === 'string' ? new ApiKeyAuthenticationProvider(apiKey) : apiKey;\n }\n\n protected getBaseUrl(): string {\n return this.baseUrl;\n }\n\n protected getAuthProvider(): AuthenticationProvider {\n return this.authProvider;\n }\n\n private buildHeaders(): Headers {\n const headers = new Headers();\n headers.set('Content-Type', 'application/json');\n this.authProvider.applyHeaders(headers);\n return headers;\n }\n\n private buildUrl(path: string, params?: Record<string, unknown>): string {\n const url = new URL(this.baseUrl + path);\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value !== null && value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n });\n }\n return url.toString();\n }\n\n private async handleResponse<T>(response: Response): Promise<T> {\n if (!response.ok) {\n const body = await response.text();\n throw new ApiException(response.status, body);\n }\n const text = await response.text();\n return text ? JSON.parse(text) : (undefined as T);\n }\n\n protected async httpGet<T>(path: string, params?: Record<string, unknown>): Promise<T> {\n const response = await fetch(this.buildUrl(path, params), {\n method: 'GET',\n headers: this.buildHeaders(),\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpPost<T>(path: string, body?: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method: 'POST',\n headers: this.buildHeaders(),\n body: body ? JSON.stringify(body) : undefined,\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpPut<T>(path: string, body: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method: 'PUT',\n headers: this.buildHeaders(),\n body: JSON.stringify(body),\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpPatch<T>(path: string, body: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method: 'PATCH',\n headers: this.buildHeaders(),\n body: JSON.stringify(body),\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpDelete(path: string): Promise<void> {\n const response = await fetch(this.baseUrl + path, {\n method: 'DELETE',\n headers: this.buildHeaders(),\n });\n if (!response.ok) {\n const body = await response.text();\n throw new ApiException(response.status, body);\n }\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Project,\n ProjectCreateRequest,\n ProjectUpdateRequest,\n ProjectSubscription,\n ChangeProjectSubscriptionPlanRequest,\n AddProjectSubscriptionCreditsRequest,\n} from './types';\n\nexport class ProjectsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword: string | null, page: number, size: number): Promise<Paginated<Project>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Project>>('/projects', params);\n }\n\n async get(projectId: string): Promise<Project> {\n return this.httpGet<Project>('/projects/' + projectId);\n }\n\n async getMine(): Promise<Project> {\n return this.httpGet<Project>('/projects/mine');\n }\n\n async create(request: ProjectCreateRequest): Promise<Project> {\n return this.httpPost<Project>('/projects', request);\n }\n\n async update(request: ProjectUpdateRequest): Promise<Project> {\n return this.httpPut<Project>('/projects/' + request.projectId, request);\n }\n\n async remove(projectId: string): Promise<void> {\n await this.httpDelete('/projects/' + projectId);\n }\n\n async getSubscription(projectId: string): Promise<ProjectSubscription> {\n return this.httpGet<ProjectSubscription>('/projects/' + projectId + '/subscription');\n }\n\n async changeSubscriptionPlan(projectId: string, request: ChangeProjectSubscriptionPlanRequest): Promise<ProjectSubscription> {\n return this.httpPost<ProjectSubscription>('/projects/' + projectId + '/subscription/plan', request);\n }\n\n async addSubscriptionCredits(projectId: string, request: AddProjectSubscriptionCreditsRequest): Promise<ProjectSubscription> {\n return this.httpPost<ProjectSubscription>('/projects/' + projectId + '/subscription/credits', request);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Agent,\n AgentCreateRequest,\n AgentUpdateRequest,\n SynthesizerVoice,\n Revision,\n} from './types';\n\nexport class AgentsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<Agent>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Agent>>('/agents', params);\n }\n\n async get(agentId: string): Promise<Agent> {\n return this.httpGet<Agent>('/agents/' + agentId);\n }\n\n async create(request: AgentCreateRequest): Promise<Agent> {\n return this.httpPost<Agent>('/agents', request);\n }\n\n async update(request: AgentUpdateRequest): Promise<Agent> {\n return this.httpPut<Agent>('/agents/' + request.id, request);\n }\n\n async remove(agentId: string): Promise<void> {\n await this.httpDelete('/agents/' + agentId);\n }\n\n async getSynthesizerSupportedVoices(synthesizerName: string): Promise<SynthesizerVoice[]> {\n return this.httpGet<SynthesizerVoice[]>('/values/synthesizers/' + synthesizerName + '/voices');\n }\n\n async listRevisions(agentId: string): Promise<Revision[]> {\n return this.httpGet<Revision[]>('/agents/' + agentId + '/revisions');\n }\n\n async getRevision(agentId: string, revisionId: string): Promise<Revision> {\n return this.httpGet<Revision>('/agents/' + agentId + '/revisions/' + revisionId);\n }\n\n async rollback(agentId: string, revisionId: string): Promise<Agent> {\n return this.httpPost<Agent>('/agents/' + agentId + '/revisions/' + revisionId + '/rollback', {});\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n KnowledgeBaseDocument,\n KnowledgeBaseDocumentUploadRequest,\n} from './types';\n\nexport class KnowledgeBaseDocumentsApi extends HttpApi {\n private readonly knowledgeBaseId: string;\n\n constructor(baseUrl: string, auth: string | AuthenticationProvider, knowledgeBaseId: string) {\n super(baseUrl, auth);\n this.knowledgeBaseId = knowledgeBaseId;\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<KnowledgeBaseDocument>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<KnowledgeBaseDocument>>('/knowledge-bases/' + this.knowledgeBaseId + '/documents', params);\n }\n\n async upload(request: KnowledgeBaseDocumentUploadRequest): Promise<KnowledgeBaseDocument> {\n return this.httpPost<KnowledgeBaseDocument>('/knowledge-bases/' + this.knowledgeBaseId + '/documents', request);\n }\n\n async get(documentId: string): Promise<KnowledgeBaseDocument> {\n return this.httpGet<KnowledgeBaseDocument>('/knowledge-bases/' + this.knowledgeBaseId + '/documents/' + documentId);\n }\n\n async reprocess(documentId: string): Promise<KnowledgeBaseDocument> {\n return this.httpPost<KnowledgeBaseDocument>('/knowledge-bases/' + this.knowledgeBaseId + '/documents', { document_id: documentId });\n }\n\n async remove(documentId: string): Promise<void> {\n await this.httpDelete('/knowledge-bases/' + this.knowledgeBaseId + '/documents/' + documentId);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n KnowledgeBase,\n KnowledgeBaseCreateRequest,\n KnowledgeBaseUpdateRequest,\n ChunkResult,\n SearchChunksRequest,\n} from './types';\nimport { KnowledgeBaseDocumentsApi } from './knowledge-base-documents-api';\n\nexport class KnowledgeBasesApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<KnowledgeBase>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<KnowledgeBase>>('/knowledge-bases', params);\n }\n\n async get(id: string): Promise<KnowledgeBase> {\n return this.httpGet<KnowledgeBase>('/knowledge-bases/' + id);\n }\n\n async create(request: KnowledgeBaseCreateRequest): Promise<KnowledgeBase> {\n return this.httpPost<KnowledgeBase>('/knowledge-bases', request);\n }\n\n async update(request: KnowledgeBaseUpdateRequest): Promise<KnowledgeBase> {\n return this.httpPut<KnowledgeBase>('/knowledge-bases/' + request.id, request);\n }\n\n async remove(id: string): Promise<void> {\n await this.httpDelete('/knowledge-bases/' + id);\n }\n\n documents(knowledgeBaseId: string): KnowledgeBaseDocumentsApi {\n return new KnowledgeBaseDocumentsApi(this.getBaseUrl(), this.getAuthProvider(), knowledgeBaseId);\n }\n\n async searchChunks(id: string, request: SearchChunksRequest): Promise<ChunkResult[]> {\n return this.httpPost<ChunkResult[]>('/knowledge-bases/' + id + '/search', request);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Execution, ExecuteRequest } from './types';\n\nexport class WorkflowExecutionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(workflowId: string, page?: number, size?: number): Promise<Paginated<Execution>> {\n const params: Record<string, unknown> = { page, size };\n return this.httpGet<Paginated<Execution>>('/workflows/' + workflowId + '/executions', params);\n }\n\n async get(workflowId: string, executionId: string): Promise<Execution> {\n return this.httpGet<Execution>('/workflows/' + workflowId + '/executions/' + executionId);\n }\n\n async run(workflowId: string, request: ExecuteRequest): Promise<Execution> {\n return this.httpPost<Execution>('/workflows/' + workflowId + '/executions', request);\n }\n\n async queue(workflowId: string, request: ExecuteRequest): Promise<Execution> {\n return this.httpPost<Execution>('/workflows/' + workflowId + '/executions/queue', request);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Revision } from '../revisions/types';\nimport { Workflow } from './types';\nimport { WorkflowExecutionsApi } from './workflow-executions-api';\n\nexport class WorkflowsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<Workflow>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Workflow>>('/workflows', params);\n }\n\n async create(workflow: Workflow): Promise<Workflow> {\n return this.httpPost<Workflow>('/workflows', workflow);\n }\n\n async update(workflowId: string, workflow: Workflow): Promise<Workflow> {\n workflow.id = workflowId;\n return this.httpPut<Workflow>('/workflows/' + workflowId, workflow);\n }\n\n async remove(workflowId: string): Promise<void> {\n await this.httpDelete('/workflows/' + workflowId);\n }\n\n async get(workflowId: string): Promise<Workflow> {\n return this.httpGet<Workflow>('/workflows/' + workflowId);\n }\n\n executions(): WorkflowExecutionsApi {\n return new WorkflowExecutionsApi(this.getBaseUrl(), this.getAuthProvider());\n }\n\n async listRevisions(workflowId: string): Promise<Revision[]> {\n return this.httpGet<Revision[]>('/workflows/' + workflowId + '/revisions');\n }\n\n async getRevision(workflowId: string, revisionId: string): Promise<Revision> {\n return this.httpGet<Revision>('/workflows/' + workflowId + '/revisions/' + revisionId);\n }\n\n async rollback(workflowId: string, revisionId: string): Promise<Workflow> {\n return this.httpPost<Workflow>('/workflows/' + workflowId + '/revisions/' + revisionId + '/rollback', {});\n }\n}\n","import { HttpApi } from '../http-api';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Credentials,\n AuthorizeRequest,\n AuthorizeResponse,\n OAuth2CallbackResponse,\n} from './types';\n\nexport class CredentialsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async authorize(provider: string, request: AuthorizeRequest): Promise<AuthorizeResponse> {\n return this.httpPost<AuthorizeResponse>('/credentials/' + provider + '/authorize', request);\n }\n\n async handleOAuth2Callback(provider: string, code: string, state: string, scope?: string): Promise<OAuth2CallbackResponse> {\n const params: Record<string, unknown> = { code, state };\n if (scope) params.scope = scope;\n return this.httpGet<OAuth2CallbackResponse>('/credentials/' + provider + '/oauth2/callback', params);\n }\n\n async list(): Promise<Credentials[]> {\n return this.httpGet<Credentials[]>('/credentials');\n }\n\n async getByProvider(provider: string): Promise<Credentials[]> {\n return this.httpGet<Credentials[]>('/credentials/' + provider);\n }\n\n async getById(credentialsId: string): Promise<Credentials> {\n return this.httpGet<Credentials>('/credentials/all/' + credentialsId);\n }\n\n async remove(credentialsId: string): Promise<void> {\n await this.httpDelete('/credentials/all/' + credentialsId);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { FeatureTemplate, McpToolsResponse } from './types';\nimport { McpServerConfiguration } from '../agents/types';\n\nexport class FeatureTemplatesApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<FeatureTemplate>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<FeatureTemplate>>('/features/templates', params);\n }\n\n async get(templateId: string): Promise<FeatureTemplate> {\n return this.httpGet<FeatureTemplate>('/features/templates/' + templateId);\n }\n\n async create(template: FeatureTemplate): Promise<FeatureTemplate> {\n return this.httpPost<FeatureTemplate>('/features/templates', template);\n }\n\n async update(templateId: string, template: FeatureTemplate): Promise<FeatureTemplate> {\n return this.httpPut<FeatureTemplate>('/features/templates/' + templateId, template);\n }\n\n async patch(templateId: string, template: FeatureTemplate): Promise<FeatureTemplate> {\n return this.httpPatch<FeatureTemplate>('/features/templates/' + templateId, template);\n }\n\n async remove(templateId: string): Promise<void> {\n await this.httpDelete('/features/templates/' + templateId);\n }\n\n async getMcpAvailableTools(configuration: McpServerConfiguration): Promise<McpToolsResponse> {\n return this.httpPost<McpToolsResponse>('/features/templates/mcp/available-tools', configuration);\n }\n}\n","import { AuthenticationProvider } from '../auth/authentication-provider';\nimport { FeatureTemplatesApi } from './feature-templates-api';\n\nexport class FeaturesApi {\n private readonly baseUrl: string;\n private readonly auth: string | AuthenticationProvider;\n\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n this.baseUrl = baseUrl;\n this.auth = auth;\n }\n\n templates(): FeatureTemplatesApi {\n return new FeatureTemplatesApi(this.baseUrl, this.auth);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { TriggerExecutionResult } from './types';\n\nexport class TriggerExecutionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(triggerId: string, page?: number, size?: number): Promise<Paginated<TriggerExecutionResult>> {\n const params: Record<string, unknown> = { page, size };\n return this.httpGet<Paginated<TriggerExecutionResult>>('/triggers/' + triggerId + '/executions', params);\n }\n\n async execute(triggerId: string, execution: TriggerExecutionResult): Promise<TriggerExecutionResult> {\n return this.httpPost<TriggerExecutionResult>('/triggers/' + triggerId + '/executions', execution);\n }\n\n async get(executionId: string): Promise<TriggerExecutionResult> {\n return this.httpGet<TriggerExecutionResult>('/triggers/executions/' + executionId);\n }\n\n async remove(executionId: string): Promise<void> {\n await this.httpDelete('/triggers/executions/' + executionId);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Trigger } from './types';\nimport { TriggerExecutionsApi } from './trigger-executions-api';\n\nexport class TriggersApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<Trigger>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Trigger>>('/triggers', params);\n }\n\n async create(trigger: Trigger): Promise<Trigger> {\n return this.httpPost<Trigger>('/triggers', trigger);\n }\n\n async update(triggerId: string, trigger: Trigger): Promise<Trigger> {\n return this.httpPut<Trigger>('/triggers/' + triggerId, trigger);\n }\n\n async remove(triggerId: string): Promise<void> {\n await this.httpDelete('/triggers/' + triggerId);\n }\n\n async get(triggerId: string): Promise<Trigger> {\n return this.httpGet<Trigger>('/triggers/' + triggerId);\n }\n\n executions(): TriggerExecutionsApi {\n return new TriggerExecutionsApi(this.getBaseUrl(), this.getAuthProvider());\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { ServicePrice } from './types';\n\nexport class ServicePricesApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<ServicePrice>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<ServicePrice>>('/service-prices', params);\n }\n\n async get(id: string): Promise<ServicePrice> {\n return this.httpGet<ServicePrice>('/service-prices/' + id);\n }\n\n async create(servicePrice: ServicePrice): Promise<ServicePrice> {\n return this.httpPost<ServicePrice>('/service-prices', servicePrice);\n }\n\n async update(id: string, servicePrice: ServicePrice): Promise<ServicePrice> {\n return this.httpPut<ServicePrice>('/service-prices/' + id, servicePrice);\n }\n\n async remove(id: string): Promise<void> {\n await this.httpDelete('/service-prices/' + id);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Session,\n GenerationRequest,\n GenerationResponse,\n Message,\n CommittedUsage,\n} from './types';\n\nexport class SessionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(\n keyword?: string | null,\n status?: string | null,\n agentId?: string | null,\n userId?: string | null,\n page?: number,\n size?: number,\n ): Promise<Paginated<Session>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n if (status) params.status = status;\n if (agentId) params.agentId = agentId;\n if (userId) params.userId = userId;\n return this.httpGet<Paginated<Session>>('/sessions', params);\n }\n\n async get(sessionId: string): Promise<Session> {\n return this.httpGet<Session>('/sessions/' + sessionId);\n }\n\n async getUsage(sessionId: string): Promise<CommittedUsage[]> {\n return this.httpGet<CommittedUsage[]>('/sessions/' + sessionId + '/usage');\n }\n\n async generateMessage(code: string, request: GenerationRequest): Promise<GenerationResponse> {\n return this.httpPost<GenerationResponse>('/sessions/' + code + '/messages', request);\n }\n\n async findMessages(code: string, page?: number, size?: number): Promise<Paginated<Message>> {\n const params: Record<string, unknown> = {};\n if (page !== undefined) params.page = page;\n if (size !== undefined) params.size = size;\n return this.httpGet<Paginated<Message>>('/sessions/' + code + '/messages', params);\n }\n\n async remove(code: string): Promise<void> {\n await this.httpDelete('/sessions/' + code);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Mission } from './types';\n\nexport class MissionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(projectId?: string | null, status?: string | null, page?: number, size?: number): Promise<Mission[]> {\n const params: Record<string, unknown> = { page, size };\n if (projectId) params.projectId = projectId;\n if (status) params.status = status;\n return this.httpGet<Mission[]>('/missions', params);\n }\n\n async get(missionId: string): Promise<Mission> {\n return this.httpGet<Mission>('/missions/' + missionId);\n }\n\n async create(mission: Mission): Promise<Mission> {\n return this.httpPost<Mission>('/missions', mission);\n }\n\n async update(missionId: string, mission: Mission): Promise<Mission> {\n return this.httpPut<Mission>('/missions/' + missionId, mission);\n }\n\n async remove(missionId: string): Promise<void> {\n await this.httpDelete('/missions/' + missionId);\n }\n\n async generate(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/generate');\n }\n\n async execute(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/execute');\n }\n\n async retry(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/retry');\n }\n\n async replan(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/replan');\n }\n\n async sendInstruction(missionId: string, instruction: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/instructions', { instruction });\n }\n\n async stop(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/stop');\n }\n\n async resume(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/continue');\n }\n}\n","import { AuthenticationProvider } from './auth/authentication-provider';\nimport { ProjectsApi } from './projects/projects-api';\nimport { AgentsApi } from './agents/agents-api';\nimport { KnowledgeBasesApi } from './knowledges/knowledge-bases-api';\nimport { WorkflowsApi } from './workflows/workflows-api';\nimport { CredentialsApi } from './credentials/credentials-api';\nimport { FeaturesApi } from './features/features-api';\nimport { TriggersApi } from './triggers/triggers-api';\nimport { ServicePricesApi } from './service-prices/service-prices-api';\nimport { SessionsApi } from './sessions/sessions-api';\nimport { MissionsApi } from './missions/missions-api';\n\nexport class PersonaSdk {\n private readonly baseUrl: string;\n private readonly workflowsBaseUrl: string;\n\n constructor(baseUrl: string, workflowsBaseUrl: string) {\n this.baseUrl = baseUrl;\n this.workflowsBaseUrl = workflowsBaseUrl;\n }\n\n projects(apiKey: string): ProjectsApi;\n projects(authProvider: AuthenticationProvider): ProjectsApi;\n projects(auth: string | AuthenticationProvider): ProjectsApi {\n return new ProjectsApi(this.baseUrl, auth);\n }\n\n agents(apiKey: string): AgentsApi;\n agents(authProvider: AuthenticationProvider): AgentsApi;\n agents(auth: string | AuthenticationProvider): AgentsApi {\n return new AgentsApi(this.baseUrl, auth);\n }\n\n knowledgeBases(apiKey: string): KnowledgeBasesApi;\n knowledgeBases(authProvider: AuthenticationProvider): KnowledgeBasesApi;\n knowledgeBases(auth: string | AuthenticationProvider): KnowledgeBasesApi {\n return new KnowledgeBasesApi(this.baseUrl, auth);\n }\n\n workflows(apiKey: string): WorkflowsApi;\n workflows(authProvider: AuthenticationProvider): WorkflowsApi;\n workflows(auth: string | AuthenticationProvider): WorkflowsApi {\n return new WorkflowsApi(this.workflowsBaseUrl, auth);\n }\n\n credentials(apiKey: string): CredentialsApi;\n credentials(authProvider: AuthenticationProvider): CredentialsApi;\n credentials(auth: string | AuthenticationProvider): CredentialsApi {\n return new CredentialsApi(this.baseUrl, auth);\n }\n\n features(apiKey: string): FeaturesApi;\n features(authProvider: AuthenticationProvider): FeaturesApi;\n features(auth: string | AuthenticationProvider): FeaturesApi {\n return new FeaturesApi(this.baseUrl, auth);\n }\n\n triggers(apiKey: string): TriggersApi;\n triggers(authProvider: AuthenticationProvider): TriggersApi;\n triggers(auth: string | AuthenticationProvider): TriggersApi {\n return new TriggersApi(this.baseUrl, auth);\n }\n\n servicePrices(apiKey: string): ServicePricesApi;\n servicePrices(authProvider: AuthenticationProvider): ServicePricesApi;\n servicePrices(auth: string | AuthenticationProvider): ServicePricesApi {\n return new ServicePricesApi(this.baseUrl, auth);\n }\n\n sessions(apiKey: string): SessionsApi;\n sessions(authProvider: AuthenticationProvider): SessionsApi;\n sessions(auth: string | AuthenticationProvider): SessionsApi {\n return new SessionsApi(this.baseUrl, auth);\n }\n\n missions(apiKey: string): MissionsApi;\n missions(authProvider: AuthenticationProvider): MissionsApi;\n missions(auth: string | AuthenticationProvider): MissionsApi {\n return new MissionsApi(this.baseUrl, auth);\n }\n}\n","import { AuthenticationProvider } from './authentication-provider';\n\nexport class BearerTokenAuthenticationProvider implements AuthenticationProvider {\n constructor(private readonly token: string) {}\n\n applyHeaders(headers: Headers): void {\n headers.set('Authorization', `Bearer ${this.token}`);\n }\n\n getCredentials(): string {\n return this.token;\n }\n}\n"],"names":["ApiException","statusCode","body","__publicField","ApiKeyAuthenticationProvider","apiKey","headers","HttpApi","baseUrl","path","params","url","key","value","response","text","ProjectsApi","auth","keyword","page","size","projectId","request","AgentsApi","agentId","synthesizerName","revisionId","KnowledgeBaseDocumentsApi","knowledgeBaseId","documentId","KnowledgeBasesApi","id","WorkflowExecutionsApi","workflowId","executionId","WorkflowsApi","workflow","CredentialsApi","provider","code","state","scope","credentialsId","FeatureTemplatesApi","templateId","template","configuration","FeaturesApi","TriggerExecutionsApi","triggerId","execution","TriggersApi","trigger","ServicePricesApi","servicePrice","SessionsApi","status","userId","sessionId","MissionsApi","missionId","mission","instruction","PersonaSdk","workflowsBaseUrl","BearerTokenAuthenticationProvider","token"],"mappings":";;;AAAO,MAAMA,UAAqB,MAAM;AAAA,EAItC,YAAYC,GAAoBC,GAAc;AAC5C,UAAM,cAAcD,CAAU,MAAMC,CAAI,EAAE;AAJ5B,IAAAC,EAAA;AACA,IAAAA,EAAA;AAId,SAAK,aAAaF,GAClB,KAAK,OAAOC;AAAA,EACd;AACF;ACPO,MAAME,EAA+D;AAAA,EAC1E,YAA6BC,GAAgB;AAAhB,SAAA,SAAAA;AAAA,EAAiB;AAAA,EAE9C,aAAaC,GAAwB;AACnC,IAAAA,EAAQ,IAAI,oBAAoB,KAAK,MAAM;AAAA,EAC7C;AAAA,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SAAA,QAAAA;AAAA,EAAgB;AAAA,EAE7C,aAAa5D,GAAwB;AACnC,IAAAA,EAAQ,IAAI,iBAAiB,UAAU,KAAK,KAAK,EAAE;AAAA,EACrD;AAAA,EAEA,iBAAyB;AACvB,WAAO,KAAK;AAAA,EACd;AACF;"}
|
|
1
|
+
{"version":3,"file":"bundle.es.js","sources":["../src/exceptions.ts","../src/auth/api-key-auth.ts","../src/http-api.ts","../src/projects/projects-api.ts","../src/agents/agents-api.ts","../src/knowledges/knowledge-base-documents-api.ts","../src/knowledges/knowledge-bases-api.ts","../src/workflows/workflow-executions-api.ts","../src/workflows/workflows-api.ts","../src/credentials/credentials-api.ts","../src/features/feature-templates-api.ts","../src/features/features-api.ts","../src/triggers/trigger-executions-api.ts","../src/triggers/triggers-api.ts","../src/service-prices/service-prices-api.ts","../src/sessions/sessions-api.ts","../src/missions/missions-api.ts","../src/billing/billing-client.ts","../src/persona-sdk.ts","../src/auth/bearer-token-auth.ts"],"sourcesContent":["export class ApiException extends Error {\n public readonly statusCode: number;\n public readonly body: string;\n\n constructor(statusCode: number, body: string) {\n super(`API Error: ${statusCode} - ${body}`);\n this.statusCode = statusCode;\n this.body = body;\n }\n}\n","import { AuthenticationProvider } from './authentication-provider';\n\nexport class ApiKeyAuthenticationProvider implements AuthenticationProvider {\n constructor(private readonly apiKey: string) {}\n\n applyHeaders(headers: Headers): void {\n headers.set('x-persona-apikey', this.apiKey);\n }\n\n getCredentials(): string {\n return this.apiKey;\n }\n}\n","import { ApiException } from './exceptions';\nimport { AuthenticationProvider } from './auth/authentication-provider';\nimport { ApiKeyAuthenticationProvider } from './auth/api-key-auth';\n\nexport abstract class HttpApi {\n private readonly baseUrl: string;\n private readonly authProvider: AuthenticationProvider;\n\n constructor(baseUrl: string, apiKey: string | AuthenticationProvider) {\n this.baseUrl = baseUrl;\n this.authProvider = typeof apiKey === 'string' ? new ApiKeyAuthenticationProvider(apiKey) : apiKey;\n }\n\n protected getBaseUrl(): string {\n return this.baseUrl;\n }\n\n protected getAuthProvider(): AuthenticationProvider {\n return this.authProvider;\n }\n\n private buildHeaders(): Headers {\n const headers = new Headers();\n headers.set('Content-Type', 'application/json');\n this.authProvider.applyHeaders(headers);\n return headers;\n }\n\n private buildUrl(path: string, params?: Record<string, unknown>): string {\n const url = new URL(this.baseUrl + path);\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value !== null && value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n });\n }\n return url.toString();\n }\n\n private async handleResponse<T>(response: Response): Promise<T> {\n if (!response.ok) {\n const body = await response.text();\n throw new ApiException(response.status, body);\n }\n const text = await response.text();\n return text ? JSON.parse(text) : (undefined as T);\n }\n\n protected async httpGet<T>(path: string, params?: Record<string, unknown>): Promise<T> {\n const response = await fetch(this.buildUrl(path, params), {\n method: 'GET',\n headers: this.buildHeaders(),\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpPost<T>(path: string, body?: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method: 'POST',\n headers: this.buildHeaders(),\n body: body ? JSON.stringify(body) : undefined,\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpPut<T>(path: string, body: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method: 'PUT',\n headers: this.buildHeaders(),\n body: JSON.stringify(body),\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpPatch<T>(path: string, body: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method: 'PATCH',\n headers: this.buildHeaders(),\n body: JSON.stringify(body),\n });\n return this.handleResponse<T>(response);\n }\n\n protected async httpDelete(path: string): Promise<void> {\n const response = await fetch(this.baseUrl + path, {\n method: 'DELETE',\n headers: this.buildHeaders(),\n });\n if (!response.ok) {\n const body = await response.text();\n throw new ApiException(response.status, body);\n }\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Project,\n ProjectCreateRequest,\n ProjectUpdateRequest,\n ProjectSubscription,\n ChangeProjectSubscriptionPlanRequest,\n AddProjectSubscriptionCreditsRequest,\n} from './types';\n\nexport class ProjectsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword: string | null, page: number, size: number): Promise<Paginated<Project>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Project>>('/projects', params);\n }\n\n async get(projectId: string): Promise<Project> {\n return this.httpGet<Project>('/projects/' + projectId);\n }\n\n async getMine(): Promise<Project> {\n return this.httpGet<Project>('/projects/mine');\n }\n\n async create(request: ProjectCreateRequest): Promise<Project> {\n return this.httpPost<Project>('/projects', request);\n }\n\n async update(request: ProjectUpdateRequest): Promise<Project> {\n return this.httpPut<Project>('/projects/' + request.projectId, request);\n }\n\n async remove(projectId: string): Promise<void> {\n await this.httpDelete('/projects/' + projectId);\n }\n\n async getSubscription(projectId: string): Promise<ProjectSubscription> {\n return this.httpGet<ProjectSubscription>('/projects/' + projectId + '/subscription');\n }\n\n async changeSubscriptionPlan(projectId: string, request: ChangeProjectSubscriptionPlanRequest): Promise<ProjectSubscription> {\n return this.httpPost<ProjectSubscription>('/projects/' + projectId + '/subscription/plan', request);\n }\n\n async addSubscriptionCredits(projectId: string, request: AddProjectSubscriptionCreditsRequest): Promise<ProjectSubscription> {\n return this.httpPost<ProjectSubscription>('/projects/' + projectId + '/subscription/credits', request);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Agent,\n AgentCreateRequest,\n AgentUpdateRequest,\n SynthesizerVoice,\n Revision,\n} from './types';\n\nexport class AgentsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<Agent>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Agent>>('/agents', params);\n }\n\n async get(agentId: string): Promise<Agent> {\n return this.httpGet<Agent>('/agents/' + agentId);\n }\n\n async create(request: AgentCreateRequest): Promise<Agent> {\n return this.httpPost<Agent>('/agents', request);\n }\n\n async update(request: AgentUpdateRequest): Promise<Agent> {\n return this.httpPut<Agent>('/agents/' + request.id, request);\n }\n\n async remove(agentId: string): Promise<void> {\n await this.httpDelete('/agents/' + agentId);\n }\n\n async getSynthesizerSupportedVoices(synthesizerName: string): Promise<SynthesizerVoice[]> {\n return this.httpGet<SynthesizerVoice[]>('/values/synthesizers/' + synthesizerName + '/voices');\n }\n\n async listRevisions(agentId: string): Promise<Revision[]> {\n return this.httpGet<Revision[]>('/agents/' + agentId + '/revisions');\n }\n\n async getRevision(agentId: string, revisionId: string): Promise<Revision> {\n return this.httpGet<Revision>('/agents/' + agentId + '/revisions/' + revisionId);\n }\n\n async rollback(agentId: string, revisionId: string): Promise<Agent> {\n return this.httpPost<Agent>('/agents/' + agentId + '/revisions/' + revisionId + '/rollback', {});\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n KnowledgeBaseDocument,\n KnowledgeBaseDocumentUploadRequest,\n} from './types';\n\nexport class KnowledgeBaseDocumentsApi extends HttpApi {\n private readonly knowledgeBaseId: string;\n\n constructor(baseUrl: string, auth: string | AuthenticationProvider, knowledgeBaseId: string) {\n super(baseUrl, auth);\n this.knowledgeBaseId = knowledgeBaseId;\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<KnowledgeBaseDocument>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<KnowledgeBaseDocument>>('/knowledge-bases/' + this.knowledgeBaseId + '/documents', params);\n }\n\n async upload(request: KnowledgeBaseDocumentUploadRequest): Promise<KnowledgeBaseDocument> {\n return this.httpPost<KnowledgeBaseDocument>('/knowledge-bases/' + this.knowledgeBaseId + '/documents', request);\n }\n\n async get(documentId: string): Promise<KnowledgeBaseDocument> {\n return this.httpGet<KnowledgeBaseDocument>('/knowledge-bases/' + this.knowledgeBaseId + '/documents/' + documentId);\n }\n\n async reprocess(documentId: string): Promise<KnowledgeBaseDocument> {\n return this.httpPost<KnowledgeBaseDocument>('/knowledge-bases/' + this.knowledgeBaseId + '/documents', { document_id: documentId });\n }\n\n async remove(documentId: string): Promise<void> {\n await this.httpDelete('/knowledge-bases/' + this.knowledgeBaseId + '/documents/' + documentId);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n KnowledgeBase,\n KnowledgeBaseCreateRequest,\n KnowledgeBaseUpdateRequest,\n ChunkResult,\n SearchChunksRequest,\n} from './types';\nimport { KnowledgeBaseDocumentsApi } from './knowledge-base-documents-api';\n\nexport class KnowledgeBasesApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<KnowledgeBase>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<KnowledgeBase>>('/knowledge-bases', params);\n }\n\n async get(id: string): Promise<KnowledgeBase> {\n return this.httpGet<KnowledgeBase>('/knowledge-bases/' + id);\n }\n\n async create(request: KnowledgeBaseCreateRequest): Promise<KnowledgeBase> {\n return this.httpPost<KnowledgeBase>('/knowledge-bases', request);\n }\n\n async update(request: KnowledgeBaseUpdateRequest): Promise<KnowledgeBase> {\n return this.httpPut<KnowledgeBase>('/knowledge-bases/' + request.id, request);\n }\n\n async remove(id: string): Promise<void> {\n await this.httpDelete('/knowledge-bases/' + id);\n }\n\n documents(knowledgeBaseId: string): KnowledgeBaseDocumentsApi {\n return new KnowledgeBaseDocumentsApi(this.getBaseUrl(), this.getAuthProvider(), knowledgeBaseId);\n }\n\n async searchChunks(id: string, request: SearchChunksRequest): Promise<ChunkResult[]> {\n return this.httpPost<ChunkResult[]>('/knowledge-bases/' + id + '/search', request);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Execution, ExecuteRequest } from './types';\n\nexport class WorkflowExecutionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(workflowId: string, page?: number, size?: number): Promise<Paginated<Execution>> {\n const params: Record<string, unknown> = { page, size };\n return this.httpGet<Paginated<Execution>>('/workflows/' + workflowId + '/executions', params);\n }\n\n async get(workflowId: string, executionId: string): Promise<Execution> {\n return this.httpGet<Execution>('/workflows/' + workflowId + '/executions/' + executionId);\n }\n\n async run(workflowId: string, request: ExecuteRequest): Promise<Execution> {\n return this.httpPost<Execution>('/workflows/' + workflowId + '/executions', request);\n }\n\n async queue(workflowId: string, request: ExecuteRequest): Promise<Execution> {\n return this.httpPost<Execution>('/workflows/' + workflowId + '/executions/queue', request);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Revision } from '../revisions/types';\nimport { Workflow } from './types';\nimport { WorkflowExecutionsApi } from './workflow-executions-api';\n\nexport class WorkflowsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<Workflow>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Workflow>>('/workflows', params);\n }\n\n async create(workflow: Workflow): Promise<Workflow> {\n return this.httpPost<Workflow>('/workflows', workflow);\n }\n\n async update(workflowId: string, workflow: Workflow): Promise<Workflow> {\n workflow.id = workflowId;\n return this.httpPut<Workflow>('/workflows/' + workflowId, workflow);\n }\n\n async remove(workflowId: string): Promise<void> {\n await this.httpDelete('/workflows/' + workflowId);\n }\n\n async get(workflowId: string): Promise<Workflow> {\n return this.httpGet<Workflow>('/workflows/' + workflowId);\n }\n\n executions(): WorkflowExecutionsApi {\n return new WorkflowExecutionsApi(this.getBaseUrl(), this.getAuthProvider());\n }\n\n async listRevisions(workflowId: string): Promise<Revision[]> {\n return this.httpGet<Revision[]>('/workflows/' + workflowId + '/revisions');\n }\n\n async getRevision(workflowId: string, revisionId: string): Promise<Revision> {\n return this.httpGet<Revision>('/workflows/' + workflowId + '/revisions/' + revisionId);\n }\n\n async rollback(workflowId: string, revisionId: string): Promise<Workflow> {\n return this.httpPost<Workflow>('/workflows/' + workflowId + '/revisions/' + revisionId + '/rollback', {});\n }\n}\n","import { HttpApi } from '../http-api';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Credentials,\n AuthorizeRequest,\n AuthorizeResponse,\n OAuth2CallbackResponse,\n} from './types';\n\nexport class CredentialsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async authorize(provider: string, request: AuthorizeRequest): Promise<AuthorizeResponse> {\n return this.httpPost<AuthorizeResponse>('/credentials/' + provider + '/authorize', request);\n }\n\n async handleOAuth2Callback(provider: string, code: string, state: string, scope?: string): Promise<OAuth2CallbackResponse> {\n const params: Record<string, unknown> = { code, state };\n if (scope) params.scope = scope;\n return this.httpGet<OAuth2CallbackResponse>('/credentials/' + provider + '/oauth2/callback', params);\n }\n\n async list(): Promise<Credentials[]> {\n return this.httpGet<Credentials[]>('/credentials');\n }\n\n async getByProvider(provider: string): Promise<Credentials[]> {\n return this.httpGet<Credentials[]>('/credentials/' + provider);\n }\n\n async getById(credentialsId: string): Promise<Credentials> {\n return this.httpGet<Credentials>('/credentials/all/' + credentialsId);\n }\n\n async remove(credentialsId: string): Promise<void> {\n await this.httpDelete('/credentials/all/' + credentialsId);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { FeatureTemplate, McpToolsResponse } from './types';\nimport { McpServerConfiguration } from '../agents/types';\n\nexport class FeatureTemplatesApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<FeatureTemplate>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<FeatureTemplate>>('/features/templates', params);\n }\n\n async get(templateId: string): Promise<FeatureTemplate> {\n return this.httpGet<FeatureTemplate>('/features/templates/' + templateId);\n }\n\n async create(template: FeatureTemplate): Promise<FeatureTemplate> {\n return this.httpPost<FeatureTemplate>('/features/templates', template);\n }\n\n async update(templateId: string, template: FeatureTemplate): Promise<FeatureTemplate> {\n return this.httpPut<FeatureTemplate>('/features/templates/' + templateId, template);\n }\n\n async patch(templateId: string, template: FeatureTemplate): Promise<FeatureTemplate> {\n return this.httpPatch<FeatureTemplate>('/features/templates/' + templateId, template);\n }\n\n async remove(templateId: string): Promise<void> {\n await this.httpDelete('/features/templates/' + templateId);\n }\n\n async getMcpAvailableTools(configuration: McpServerConfiguration): Promise<McpToolsResponse> {\n return this.httpPost<McpToolsResponse>('/features/templates/mcp/available-tools', configuration);\n }\n}\n","import { AuthenticationProvider } from '../auth/authentication-provider';\nimport { FeatureTemplatesApi } from './feature-templates-api';\n\nexport class FeaturesApi {\n private readonly baseUrl: string;\n private readonly auth: string | AuthenticationProvider;\n\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n this.baseUrl = baseUrl;\n this.auth = auth;\n }\n\n templates(): FeatureTemplatesApi {\n return new FeatureTemplatesApi(this.baseUrl, this.auth);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { TriggerExecutionResult } from './types';\n\nexport class TriggerExecutionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(triggerId: string, page?: number, size?: number): Promise<Paginated<TriggerExecutionResult>> {\n const params: Record<string, unknown> = { page, size };\n return this.httpGet<Paginated<TriggerExecutionResult>>('/triggers/' + triggerId + '/executions', params);\n }\n\n async execute(triggerId: string, execution: TriggerExecutionResult): Promise<TriggerExecutionResult> {\n return this.httpPost<TriggerExecutionResult>('/triggers/' + triggerId + '/executions', execution);\n }\n\n async get(executionId: string): Promise<TriggerExecutionResult> {\n return this.httpGet<TriggerExecutionResult>('/triggers/executions/' + executionId);\n }\n\n async remove(executionId: string): Promise<void> {\n await this.httpDelete('/triggers/executions/' + executionId);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Trigger } from './types';\nimport { TriggerExecutionsApi } from './trigger-executions-api';\n\nexport class TriggersApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<Trigger>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<Trigger>>('/triggers', params);\n }\n\n async create(trigger: Trigger): Promise<Trigger> {\n return this.httpPost<Trigger>('/triggers', trigger);\n }\n\n async update(triggerId: string, trigger: Trigger): Promise<Trigger> {\n return this.httpPut<Trigger>('/triggers/' + triggerId, trigger);\n }\n\n async remove(triggerId: string): Promise<void> {\n await this.httpDelete('/triggers/' + triggerId);\n }\n\n async get(triggerId: string): Promise<Trigger> {\n return this.httpGet<Trigger>('/triggers/' + triggerId);\n }\n\n executions(): TriggerExecutionsApi {\n return new TriggerExecutionsApi(this.getBaseUrl(), this.getAuthProvider());\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { ServicePrice } from './types';\n\nexport class ServicePricesApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(keyword?: string | null, page?: number, size?: number): Promise<Paginated<ServicePrice>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n return this.httpGet<Paginated<ServicePrice>>('/service-prices', params);\n }\n\n async get(id: string): Promise<ServicePrice> {\n return this.httpGet<ServicePrice>('/service-prices/' + id);\n }\n\n async create(servicePrice: ServicePrice): Promise<ServicePrice> {\n return this.httpPost<ServicePrice>('/service-prices', servicePrice);\n }\n\n async update(id: string, servicePrice: ServicePrice): Promise<ServicePrice> {\n return this.httpPut<ServicePrice>('/service-prices/' + id, servicePrice);\n }\n\n async remove(id: string): Promise<void> {\n await this.httpDelete('/service-prices/' + id);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { Paginated } from '../paginated';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport {\n Session,\n GenerationRequest,\n GenerationResponse,\n Message,\n CommittedUsage,\n} from './types';\n\nexport class SessionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(\n keyword?: string | null,\n status?: string | null,\n agentId?: string | null,\n userId?: string | null,\n page?: number,\n size?: number,\n ): Promise<Paginated<Session>> {\n const params: Record<string, unknown> = { page, size };\n if (keyword) params.keyword = keyword;\n if (status) params.status = status;\n if (agentId) params.agentId = agentId;\n if (userId) params.userId = userId;\n return this.httpGet<Paginated<Session>>('/sessions', params);\n }\n\n async get(sessionId: string): Promise<Session> {\n return this.httpGet<Session>('/sessions/' + sessionId);\n }\n\n async getUsage(sessionId: string): Promise<CommittedUsage[]> {\n return this.httpGet<CommittedUsage[]>('/sessions/' + sessionId + '/usage');\n }\n\n async generateMessage(code: string, request: GenerationRequest): Promise<GenerationResponse> {\n return this.httpPost<GenerationResponse>('/sessions/' + code + '/messages', request);\n }\n\n async findMessages(code: string, page?: number, size?: number): Promise<Paginated<Message>> {\n const params: Record<string, unknown> = {};\n if (page !== undefined) params.page = page;\n if (size !== undefined) params.size = size;\n return this.httpGet<Paginated<Message>>('/sessions/' + code + '/messages', params);\n }\n\n async remove(code: string): Promise<void> {\n await this.httpDelete('/sessions/' + code);\n }\n}\n","import { HttpApi } from '../http-api';\nimport { AuthenticationProvider } from '../auth/authentication-provider';\nimport { Mission } from './types';\n\nexport class MissionsApi extends HttpApi {\n constructor(baseUrl: string, auth: string | AuthenticationProvider) {\n super(baseUrl, auth);\n }\n\n async list(projectId?: string | null, status?: string | null, page?: number, size?: number): Promise<Mission[]> {\n const params: Record<string, unknown> = { page, size };\n if (projectId) params.projectId = projectId;\n if (status) params.status = status;\n return this.httpGet<Mission[]>('/missions', params);\n }\n\n async get(missionId: string): Promise<Mission> {\n return this.httpGet<Mission>('/missions/' + missionId);\n }\n\n async create(mission: Mission): Promise<Mission> {\n return this.httpPost<Mission>('/missions', mission);\n }\n\n async update(missionId: string, mission: Mission): Promise<Mission> {\n return this.httpPut<Mission>('/missions/' + missionId, mission);\n }\n\n async remove(missionId: string): Promise<void> {\n await this.httpDelete('/missions/' + missionId);\n }\n\n async generate(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/generate');\n }\n\n async execute(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/execute');\n }\n\n async retry(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/retry');\n }\n\n async replan(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/replan');\n }\n\n async sendInstruction(missionId: string, instruction: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/instructions', { instruction });\n }\n\n async stop(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/stop');\n }\n\n async resume(missionId: string): Promise<Mission> {\n return this.httpPost<Mission>('/missions/' + missionId + '/continue');\n }\n}\n","import { AuthenticationProvider } from '../auth/authentication-provider';\nimport { ApiException } from '../exceptions';\nimport {\n Customer,\n Subscription,\n Invoice,\n CreateCustomerRequest,\n UpdateCustomerRequest,\n CreateSubscriptionRequest,\n UpgradeSubscriptionRequest,\n DowngradeSubscriptionRequest,\n MentorizeSubscriptionRequest,\n} from './types';\n\nexport class BillingClient {\n private readonly baseUrl: string;\n private readonly authProvider: AuthenticationProvider | string | null;\n\n constructor(baseUrl?: string, auth?: string | AuthenticationProvider | null) {\n this.baseUrl = (baseUrl || 'https://persona.applica.guru/billing').replace(/\\/$/, '');\n this.authProvider = auth ?? null;\n }\n\n private buildHeaders(): Headers {\n const headers = new Headers();\n headers.set('Content-Type', 'application/json');\n if (this.authProvider) {\n if (typeof this.authProvider === 'string') {\n headers.set('x-persona-apikey', this.authProvider);\n } else {\n this.authProvider.applyHeaders(headers);\n }\n }\n return headers;\n }\n\n private async request<T>(path: string, method: string, body?: unknown): Promise<T> {\n const response = await fetch(this.baseUrl + path, {\n method,\n headers: this.buildHeaders(),\n body: body ? JSON.stringify(body) : undefined,\n });\n if (!response.ok) {\n const text = await response.text();\n throw new ApiException(response.status, text);\n }\n const text = await response.text();\n return text ? JSON.parse(text) : (undefined as T);\n }\n\n async createCustomer(request: CreateCustomerRequest): Promise<Customer> {\n return this.request<Customer>('/customers', 'POST', request);\n }\n\n async updateCustomer(owner: string, request: UpdateCustomerRequest): Promise<Customer> {\n return this.request<Customer>('/customers/' + owner, 'PUT', request);\n }\n\n async getCustomer(owner: string): Promise<Customer> {\n return this.request<Customer>('/customers/' + owner, 'GET');\n }\n\n async saveCustomer(customer: Customer): Promise<Customer> {\n return this.request<Customer>('/customers', 'POST', customer);\n }\n\n async deleteCustomer(owner: string): Promise<void> {\n await this.request<void>('/customers/' + owner, 'DELETE');\n }\n\n async createSubscription(request: CreateSubscriptionRequest): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + request.owner + '/subscription', 'POST', request);\n }\n\n async getSubscription(owner: string): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + owner + '/subscription', 'GET');\n }\n\n async getProjectSubscription(projectId: string): Promise<Subscription> {\n return this.request<Subscription>('/projects/' + projectId + '/subscription', 'GET');\n }\n\n async changeProjectSubscriptionPlan(projectId: string, request: { toPlanType: string }): Promise<Subscription> {\n return this.request<Subscription>('/projects/' + projectId + '/subscription/actions/change-plan', 'POST', request);\n }\n\n async addProjectSubscriptionCredits(projectId: string, request: { credits: number }): Promise<Subscription> {\n return this.request<Subscription>('/projects/' + projectId + '/subscription/actions/add-credits', 'POST', request);\n }\n\n async beginUpgrade(owner: string, request: UpgradeSubscriptionRequest): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + owner + '/subscription/actions/upgrade', 'POST', request);\n }\n\n async downgrade(owner: string, request: DowngradeSubscriptionRequest): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + owner + '/subscription/actions/downgrade', 'POST', request);\n }\n\n async mentorize(owner: string, request: MentorizeSubscriptionRequest): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + owner + '/subscription/actions/mentorize', 'POST', request);\n }\n\n async addCredits(owner: string, credits: number): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + owner + '/subscription/credits', 'POST', { credits });\n }\n\n async useCredits(owner: string, credits: number, services: string[], referenceId?: string): Promise<Subscription> {\n const body: Record<string, unknown> = { credits, services };\n if (referenceId) body.referenceId = referenceId;\n return this.request<Subscription>('/customers/' + owner + '/subscription/credits', 'DELETE', body);\n }\n\n async getCredits(owner: string): Promise<number> {\n try {\n const result = await this.request<{ credits?: number }>('/customers/' + owner + '/subscription/credits', 'GET');\n return result.credits ?? 0;\n } catch {\n return 0;\n }\n }\n\n async isValid(owner: string): Promise<boolean> {\n try {\n const result = await this.request<{ valid?: boolean }>('/customers/' + owner + '/subscription/valid', 'GET');\n return result.valid ?? false;\n } catch {\n return false;\n }\n }\n\n async listInvoices(owner: string, dateFrom?: string, dateTo?: string): Promise<Invoice[]> {\n const params: string[] = [];\n if (dateFrom) params.push('date_from=' + dateFrom);\n if (dateTo) params.push('date_to=' + dateTo);\n const query = params.length > 0 ? '?' + params.join('&') : '';\n return this.request<Invoice[]>('/customers/' + owner + '/invoices' + query, 'GET');\n }\n\n async cancelSubscription(owner: string): Promise<Subscription> {\n return this.request<Subscription>('/customers/' + owner + '/subscription/actions/cancel', 'POST', {});\n }\n}\n","import { AuthenticationProvider } from './auth/authentication-provider';\nimport { ProjectsApi } from './projects/projects-api';\nimport { AgentsApi } from './agents/agents-api';\nimport { KnowledgeBasesApi } from './knowledges/knowledge-bases-api';\nimport { WorkflowsApi } from './workflows/workflows-api';\nimport { CredentialsApi } from './credentials/credentials-api';\nimport { FeaturesApi } from './features/features-api';\nimport { TriggersApi } from './triggers/triggers-api';\nimport { ServicePricesApi } from './service-prices/service-prices-api';\nimport { SessionsApi } from './sessions/sessions-api';\nimport { MissionsApi } from './missions/missions-api';\nimport { BillingClient } from './billing/billing-client';\n\nexport class PersonaSdk {\n private readonly baseUrl: string;\n private readonly workflowsBaseUrl: string;\n\n constructor(baseUrl: string, workflowsBaseUrl: string) {\n this.baseUrl = baseUrl;\n this.workflowsBaseUrl = workflowsBaseUrl;\n }\n\n projects(apiKey: string): ProjectsApi;\n projects(authProvider: AuthenticationProvider): ProjectsApi;\n projects(auth: string | AuthenticationProvider): ProjectsApi {\n return new ProjectsApi(this.baseUrl, auth);\n }\n\n agents(apiKey: string): AgentsApi;\n agents(authProvider: AuthenticationProvider): AgentsApi;\n agents(auth: string | AuthenticationProvider): AgentsApi {\n return new AgentsApi(this.baseUrl, auth);\n }\n\n knowledgeBases(apiKey: string): KnowledgeBasesApi;\n knowledgeBases(authProvider: AuthenticationProvider): KnowledgeBasesApi;\n knowledgeBases(auth: string | AuthenticationProvider): KnowledgeBasesApi {\n return new KnowledgeBasesApi(this.baseUrl, auth);\n }\n\n workflows(apiKey: string): WorkflowsApi;\n workflows(authProvider: AuthenticationProvider): WorkflowsApi;\n workflows(auth: string | AuthenticationProvider): WorkflowsApi {\n return new WorkflowsApi(this.workflowsBaseUrl, auth);\n }\n\n credentials(apiKey: string): CredentialsApi;\n credentials(authProvider: AuthenticationProvider): CredentialsApi;\n credentials(auth: string | AuthenticationProvider): CredentialsApi {\n return new CredentialsApi(this.baseUrl, auth);\n }\n\n features(apiKey: string): FeaturesApi;\n features(authProvider: AuthenticationProvider): FeaturesApi;\n features(auth: string | AuthenticationProvider): FeaturesApi {\n return new FeaturesApi(this.baseUrl, auth);\n }\n\n triggers(apiKey: string): TriggersApi;\n triggers(authProvider: AuthenticationProvider): TriggersApi;\n triggers(auth: string | AuthenticationProvider): TriggersApi {\n return new TriggersApi(this.baseUrl, auth);\n }\n\n servicePrices(apiKey: string): ServicePricesApi;\n servicePrices(authProvider: AuthenticationProvider): ServicePricesApi;\n servicePrices(auth: string | AuthenticationProvider): ServicePricesApi {\n return new ServicePricesApi(this.baseUrl, auth);\n }\n\n sessions(apiKey: string): SessionsApi;\n sessions(authProvider: AuthenticationProvider): SessionsApi;\n sessions(auth: string | AuthenticationProvider): SessionsApi {\n return new SessionsApi(this.baseUrl, auth);\n }\n\n missions(apiKey: string): MissionsApi;\n missions(authProvider: AuthenticationProvider): MissionsApi;\n missions(auth: string | AuthenticationProvider): MissionsApi {\n return new MissionsApi(this.baseUrl, auth);\n }\n\n billing(baseUrl?: string): BillingClient;\n billing(auth: string | AuthenticationProvider): BillingClient;\n billing(baseUrlOrAuth?: string | AuthenticationProvider): BillingClient {\n if (!baseUrlOrAuth || typeof baseUrlOrAuth !== 'string') {\n return new BillingClient(undefined, baseUrlOrAuth);\n }\n return new BillingClient(baseUrlOrAuth);\n }\n}\n","import { AuthenticationProvider } from './authentication-provider';\n\nexport class BearerTokenAuthenticationProvider implements AuthenticationProvider {\n constructor(private readonly token: string) {}\n\n applyHeaders(headers: Headers): void {\n headers.set('Authorization', `Bearer ${this.token}`);\n }\n\n getCredentials(): string {\n return this.token;\n }\n}\n"],"names":["ApiException","statusCode","body","__publicField","ApiKeyAuthenticationProvider","apiKey","headers","HttpApi","baseUrl","path","params","url","key","value","response","text","ProjectsApi","auth","keyword","page","size","projectId","request","AgentsApi","agentId","synthesizerName","revisionId","KnowledgeBaseDocumentsApi","knowledgeBaseId","documentId","KnowledgeBasesApi","id","WorkflowExecutionsApi","workflowId","executionId","WorkflowsApi","workflow","CredentialsApi","provider","code","state","scope","credentialsId","FeatureTemplatesApi","templateId","template","configuration","FeaturesApi","TriggerExecutionsApi","triggerId","execution","TriggersApi","trigger","ServicePricesApi","servicePrice","SessionsApi","status","userId","sessionId","MissionsApi","missionId","mission","instruction","BillingClient","method","owner","customer","credits","services","referenceId","dateFrom","dateTo","query","PersonaSdk","workflowsBaseUrl","baseUrlOrAuth","BearerTokenAuthenticationProvider","token"],"mappings":";;;AAAO,MAAMA,UAAqB,MAAM;AAAA,EAItC,YAAYC,GAAoBC,GAAc;AAC5C,UAAM,cAAcD,CAAU,MAAMC,CAAI,EAAE;AAJ5B,IAAAC,EAAA;AACA,IAAAA,EAAA;AAId,SAAK,aAAaF,GAClB,KAAK,OAAOC;AAAA,EACd;AACF;ACPO,MAAME,EAA+D;AAAA,EAC1E,YAA6BC,GAAgB;AAAhB,SAAA,SAAAA;AAAA,EAAiB;AAAA,EAE9C,aAAaC,GAAwB;AACnC,IAAAA,EAAQ,IAAI,oBAAoB,KAAK,MAAM;AAAA,EAC7C;AAAA,EAEA,iBAAyB;AACvB,WAAO,KAAK;AAAA,EACd;AACF;ACRO,MAAeC,EAAQ;AAAA,EAI5B,YAAYC,GAAiBH,GAAyC;AAHrD,IAAAF,EAAA;AACA,IAAAA,EAAA;AAGf,SAAK,UAAUK,GACf,KAAK,eAAe,OAAOH,KAAW,WAAW,IAAID,EAA6BC,CAAM,IAAIA;AAAA,EAC9F;AAAA,EAEU,aAAqB;AAC7B,WAAO,KAAK;AAAA,EACd;AAAA,EAEU,kBAA0C;AAClD,WAAO,KAAK;AAAA,EACd;AAAA,EAEQ,eAAwB;AAC9B,UAAMC,IAAU,IAAI,QAAA;AACp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