@amigo-ai/platform-sdk 0.53.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/api.md +3 -62
- package/dist/index.cjs +11 -419
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +0 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -419
- package/dist/index.mjs.map +4 -4
- package/dist/resources/analytics.js +0 -6
- package/dist/resources/analytics.js.map +1 -1
- package/dist/resources/functions.js +10 -118
- package/dist/resources/functions.js.map +1 -1
- package/dist/types/generated/api.d.ts +155 -4392
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +0 -13
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/analytics.d.ts +0 -25
- package/dist/types/resources/analytics.d.ts.map +1 -1
- package/dist/types/resources/data-sources.d.ts +5 -5
- package/dist/types/resources/functions.d.ts +21 -186
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/pipeline.d.ts +3 -3
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts +0 -10
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/resources/crm.js +0 -52
- package/dist/resources/crm.js.map +0 -1
- package/dist/resources/monitor-concepts.js +0 -47
- package/dist/resources/monitor-concepts.js.map +0 -1
- package/dist/resources/phone-numbers.js +0 -56
- package/dist/resources/phone-numbers.js.map +0 -1
- package/dist/resources/safety.js +0 -31
- package/dist/resources/safety.js.map +0 -1
- package/dist/resources/unification-rules.js +0 -46
- package/dist/resources/unification-rules.js.map +0 -1
- package/dist/types/resources/crm.d.ts +0 -207
- package/dist/types/resources/crm.d.ts.map +0 -1
- package/dist/types/resources/monitor-concepts.d.ts +0 -115
- package/dist/types/resources/monitor-concepts.d.ts.map +0 -1
- package/dist/types/resources/phone-numbers.d.ts +0 -145
- package/dist/types/resources/phone-numbers.d.ts.map +0 -1
- package/dist/types/resources/safety.d.ts +0 -83
- package/dist/types/resources/safety.d.ts.map +0 -1
- package/dist/types/resources/unification-rules.d.ts +0 -129
- package/dist/types/resources/unification-rules.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -696,12 +696,10 @@ const persona = await client.personas.create({
|
|
|
696
696
|
const { items: personas } = await client.personas.list()
|
|
697
697
|
```
|
|
698
698
|
|
|
699
|
-
### Compliance
|
|
699
|
+
### Compliance
|
|
700
700
|
|
|
701
701
|
```typescript
|
|
702
702
|
const hipaa = await client.compliance.getHipaa()
|
|
703
|
-
const safetyConfig = await client.safety.getConfig()
|
|
704
|
-
const templates = await client.safety.listTemplates()
|
|
705
703
|
```
|
|
706
704
|
|
|
707
705
|
### Audit
|
|
@@ -722,8 +720,8 @@ const metadata = await client.recordings.getMetadata('call-sid')
|
|
|
722
720
|
### Functions (UC Functions)
|
|
723
721
|
|
|
724
722
|
```typescript
|
|
725
|
-
const catalog = await client.functions.getCatalog()
|
|
726
723
|
const { items: functions } = await client.functions.list()
|
|
724
|
+
const fn = await client.functions.get('my-function')
|
|
727
725
|
const result = await client.functions.test('my-function', { input: { query: 'test' } })
|
|
728
726
|
```
|
|
729
727
|
|
package/api.md
CHANGED
|
@@ -267,17 +267,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
267
267
|
- `verify`
|
|
268
268
|
- `delete`
|
|
269
269
|
|
|
270
|
-
### `phoneNumbers`
|
|
271
|
-
|
|
272
|
-
- `provision`
|
|
273
|
-
- `list`
|
|
274
|
-
- `listAutoPaging`
|
|
275
|
-
- `get`
|
|
276
|
-
- `update`
|
|
277
|
-
- `release`
|
|
278
|
-
- `setForwarding`
|
|
279
|
-
- `clearForwarding`
|
|
280
|
-
|
|
281
270
|
### `integrations`
|
|
282
271
|
|
|
283
272
|
- `create`
|
|
@@ -302,7 +291,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
302
291
|
- `getDataQuality`
|
|
303
292
|
- `getUsage`
|
|
304
293
|
- `getEventBreakdown`
|
|
305
|
-
- `getSafetyTrends`
|
|
306
294
|
- `getOperatorPerformance`
|
|
307
295
|
- `getAdvancedCallStats`
|
|
308
296
|
- `compareCallPeriods`
|
|
@@ -442,14 +430,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
442
430
|
- `listDeliveriesAutoPaging`
|
|
443
431
|
- `rotateSecret`
|
|
444
432
|
|
|
445
|
-
### `safety`
|
|
446
|
-
|
|
447
|
-
- `getConfig`
|
|
448
|
-
- `updateConfig`
|
|
449
|
-
- `listTemplates`
|
|
450
|
-
- `getTemplate`
|
|
451
|
-
- `applyTemplate`
|
|
452
|
-
|
|
453
433
|
### `compliance`
|
|
454
434
|
|
|
455
435
|
- `getDashboard`
|
|
@@ -463,20 +443,11 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
463
443
|
### `functions`
|
|
464
444
|
|
|
465
445
|
- `list`
|
|
466
|
-
- `
|
|
467
|
-
- `delete`
|
|
468
|
-
- `test`
|
|
469
|
-
- `getCatalog`
|
|
470
|
-
- `query`
|
|
471
|
-
- `sync`
|
|
446
|
+
- `get`
|
|
472
447
|
- `deploy`
|
|
473
|
-
- `
|
|
474
|
-
- `listVersions`
|
|
475
|
-
- `getVersion`
|
|
448
|
+
- `delete`
|
|
476
449
|
- `invoke`
|
|
477
|
-
- `
|
|
478
|
-
- `promote`
|
|
479
|
-
- `rollback`
|
|
450
|
+
- `test`
|
|
480
451
|
|
|
481
452
|
### `observers`
|
|
482
453
|
|
|
@@ -512,36 +483,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
512
483
|
- `sessions.get`
|
|
513
484
|
- `sessions.chat`
|
|
514
485
|
|
|
515
|
-
### `monitorConcepts`
|
|
516
|
-
|
|
517
|
-
- `create`
|
|
518
|
-
- `list`
|
|
519
|
-
- `listAutoPaging`
|
|
520
|
-
- `get`
|
|
521
|
-
- `update`
|
|
522
|
-
- `delete`
|
|
523
|
-
|
|
524
|
-
### `unificationRules`
|
|
525
|
-
|
|
526
|
-
- `create`
|
|
527
|
-
- `list`
|
|
528
|
-
- `listAutoPaging`
|
|
529
|
-
- `get`
|
|
530
|
-
- `update`
|
|
531
|
-
- `delete`
|
|
532
|
-
|
|
533
|
-
### `crm`
|
|
534
|
-
|
|
535
|
-
- `getStatus`
|
|
536
|
-
- `contacts.list`
|
|
537
|
-
- `contacts.get`
|
|
538
|
-
- `contacts.getTimeline`
|
|
539
|
-
- `companies.list`
|
|
540
|
-
- `companies.get`
|
|
541
|
-
- `deals.list`
|
|
542
|
-
- `deals.get`
|
|
543
|
-
- `deals.getPipeline`
|
|
544
|
-
|
|
545
486
|
### `commandCenter`
|
|
546
487
|
|
|
547
488
|
- `get`
|
package/dist/index.cjs
CHANGED
|
@@ -2649,68 +2649,6 @@ var ChannelsResource = class extends WorkspaceScopedResource {
|
|
|
2649
2649
|
}
|
|
2650
2650
|
};
|
|
2651
2651
|
|
|
2652
|
-
// src/resources/phone-numbers.ts
|
|
2653
|
-
var PhoneNumbersResource = class extends WorkspaceScopedResource {
|
|
2654
|
-
/** Create a new phone number */
|
|
2655
|
-
async provision(body) {
|
|
2656
|
-
return extractData(
|
|
2657
|
-
await this.client.POST("/v1/{workspace_id}/phone-numbers", {
|
|
2658
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
2659
|
-
body
|
|
2660
|
-
})
|
|
2661
|
-
);
|
|
2662
|
-
}
|
|
2663
|
-
/** List phone numbers in the workspace */
|
|
2664
|
-
async list(params) {
|
|
2665
|
-
return extractData(
|
|
2666
|
-
await this.client.GET("/v1/{workspace_id}/phone-numbers", {
|
|
2667
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
2668
|
-
})
|
|
2669
|
-
);
|
|
2670
|
-
}
|
|
2671
|
-
listAutoPaging(params) {
|
|
2672
|
-
return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
|
|
2673
|
-
}
|
|
2674
|
-
/** Get a phone number */
|
|
2675
|
-
async get(phoneNumberId2) {
|
|
2676
|
-
return extractData(
|
|
2677
|
-
await this.client.GET("/v1/{workspace_id}/phone-numbers/{phone_number_id}", {
|
|
2678
|
-
params: { path: { workspace_id: this.workspaceId, phone_number_id: phoneNumberId2 } }
|
|
2679
|
-
})
|
|
2680
|
-
);
|
|
2681
|
-
}
|
|
2682
|
-
/** Update a phone number (assign to agent, rename) */
|
|
2683
|
-
async update(phoneNumberId2, body) {
|
|
2684
|
-
return extractData(
|
|
2685
|
-
await this.client.PUT("/v1/{workspace_id}/phone-numbers/{phone_number_id}", {
|
|
2686
|
-
params: { path: { workspace_id: this.workspaceId, phone_number_id: phoneNumberId2 } },
|
|
2687
|
-
body
|
|
2688
|
-
})
|
|
2689
|
-
);
|
|
2690
|
-
}
|
|
2691
|
-
/** Release a phone number back to the carrier */
|
|
2692
|
-
async release(phoneNumberId2) {
|
|
2693
|
-
await this.client.DELETE("/v1/{workspace_id}/phone-numbers/{phone_number_id}", {
|
|
2694
|
-
params: { path: { workspace_id: this.workspaceId, phone_number_id: phoneNumberId2 } }
|
|
2695
|
-
});
|
|
2696
|
-
}
|
|
2697
|
-
/** Set call forwarding for a phone number */
|
|
2698
|
-
async setForwarding(phoneNumberId2, body) {
|
|
2699
|
-
return extractData(
|
|
2700
|
-
await this.client.PUT("/v1/{workspace_id}/phone-numbers/{phone_number_id}/forwarding", {
|
|
2701
|
-
params: { path: { workspace_id: this.workspaceId, phone_number_id: phoneNumberId2 } },
|
|
2702
|
-
body
|
|
2703
|
-
})
|
|
2704
|
-
);
|
|
2705
|
-
}
|
|
2706
|
-
/** Clear call forwarding for a phone number */
|
|
2707
|
-
async clearForwarding(phoneNumberId2) {
|
|
2708
|
-
await this.client.DELETE("/v1/{workspace_id}/phone-numbers/{phone_number_id}/forwarding", {
|
|
2709
|
-
params: { path: { workspace_id: this.workspaceId, phone_number_id: phoneNumberId2 } }
|
|
2710
|
-
});
|
|
2711
|
-
}
|
|
2712
|
-
};
|
|
2713
|
-
|
|
2714
2652
|
// src/resources/integrations.ts
|
|
2715
2653
|
var IntegrationsResource = class extends WorkspaceScopedResource {
|
|
2716
2654
|
/** Create a new integration */
|
|
@@ -2899,14 +2837,6 @@ var AnalyticsResource = class extends WorkspaceScopedResource {
|
|
|
2899
2837
|
})
|
|
2900
2838
|
);
|
|
2901
2839
|
}
|
|
2902
|
-
/** Safety and escalation trends — risk distribution and time-series data */
|
|
2903
|
-
async getSafetyTrends(params) {
|
|
2904
|
-
return extractData(
|
|
2905
|
-
await this.client.GET("/v1/{workspace_id}/analytics/safety-trends", {
|
|
2906
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
2907
|
-
})
|
|
2908
|
-
);
|
|
2909
|
-
}
|
|
2910
2840
|
/** Operator escalation performance and quality comparison */
|
|
2911
2841
|
async getOperatorPerformance(params) {
|
|
2912
2842
|
return extractData(
|
|
@@ -3755,47 +3685,6 @@ var WebhookDestinationsResource = class extends WorkspaceScopedResource {
|
|
|
3755
3685
|
}
|
|
3756
3686
|
};
|
|
3757
3687
|
|
|
3758
|
-
// src/resources/safety.ts
|
|
3759
|
-
var SafetyResource = class extends WorkspaceScopedResource {
|
|
3760
|
-
async getConfig() {
|
|
3761
|
-
return extractData(
|
|
3762
|
-
await this.client.GET("/v1/{workspace_id}/safety/config", {
|
|
3763
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
3764
|
-
})
|
|
3765
|
-
);
|
|
3766
|
-
}
|
|
3767
|
-
async updateConfig(body) {
|
|
3768
|
-
return extractData(
|
|
3769
|
-
await this.client.PUT("/v1/{workspace_id}/safety/config", {
|
|
3770
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
3771
|
-
body
|
|
3772
|
-
})
|
|
3773
|
-
);
|
|
3774
|
-
}
|
|
3775
|
-
async listTemplates() {
|
|
3776
|
-
return extractData(
|
|
3777
|
-
await this.client.GET("/v1/{workspace_id}/safety/templates", {
|
|
3778
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
3779
|
-
})
|
|
3780
|
-
);
|
|
3781
|
-
}
|
|
3782
|
-
async getTemplate(templateId) {
|
|
3783
|
-
return extractData(
|
|
3784
|
-
await this.client.GET("/v1/{workspace_id}/safety/templates/{template_id}", {
|
|
3785
|
-
params: { path: { workspace_id: this.workspaceId, template_id: templateId } }
|
|
3786
|
-
})
|
|
3787
|
-
);
|
|
3788
|
-
}
|
|
3789
|
-
async applyTemplate(templateId, body) {
|
|
3790
|
-
return extractData(
|
|
3791
|
-
await this.client.POST("/v1/{workspace_id}/safety/templates/{template_id}/apply", {
|
|
3792
|
-
params: { path: { workspace_id: this.workspaceId, template_id: templateId } },
|
|
3793
|
-
body
|
|
3794
|
-
})
|
|
3795
|
-
);
|
|
3796
|
-
}
|
|
3797
|
-
};
|
|
3798
|
-
|
|
3799
3688
|
// src/resources/compliance.ts
|
|
3800
3689
|
var ComplianceResource = class extends WorkspaceScopedResource {
|
|
3801
3690
|
async getDashboard() {
|
|
@@ -4242,115 +4131,26 @@ var FunctionsResource = class extends WorkspaceScopedResource {
|
|
|
4242
4131
|
})
|
|
4243
4132
|
);
|
|
4244
4133
|
}
|
|
4245
|
-
async
|
|
4134
|
+
async get(functionName) {
|
|
4246
4135
|
return extractData(
|
|
4247
|
-
await this.client.
|
|
4248
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
4249
|
-
body
|
|
4136
|
+
await this.client.GET("/v1/{workspace_id}/functions/{function_name}", {
|
|
4137
|
+
params: { path: { workspace_id: this.workspaceId, function_name: functionName } }
|
|
4250
4138
|
})
|
|
4251
4139
|
);
|
|
4252
4140
|
}
|
|
4253
|
-
async
|
|
4254
|
-
await this.client.DELETE("/v1/{workspace_id}/functions/{function_name}", {
|
|
4255
|
-
params: { path: { workspace_id: this.workspaceId, function_name: functionName } }
|
|
4256
|
-
});
|
|
4257
|
-
}
|
|
4258
|
-
async test(functionName, body) {
|
|
4141
|
+
async deploy(functionName, body) {
|
|
4259
4142
|
return extractData(
|
|
4260
|
-
await this.client.
|
|
4143
|
+
await this.client.PUT("/v1/{workspace_id}/functions/{function_name}", {
|
|
4261
4144
|
params: { path: { workspace_id: this.workspaceId, function_name: functionName } },
|
|
4262
4145
|
body
|
|
4263
4146
|
})
|
|
4264
4147
|
);
|
|
4265
4148
|
}
|
|
4266
|
-
async
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
})
|
|
4271
|
-
);
|
|
4272
|
-
}
|
|
4273
|
-
async query(body) {
|
|
4274
|
-
return extractData(
|
|
4275
|
-
await this.client.POST("/v1/{workspace_id}/functions/query", {
|
|
4276
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
4277
|
-
body
|
|
4278
|
-
})
|
|
4279
|
-
);
|
|
4280
|
-
}
|
|
4281
|
-
async sync() {
|
|
4282
|
-
return extractData(
|
|
4283
|
-
await this.client.POST("/v1/{workspace_id}/functions/sync", {
|
|
4284
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
4285
|
-
})
|
|
4286
|
-
);
|
|
4287
|
-
}
|
|
4288
|
-
// ── V109 SQL-first surface ────────────────────────────────────────
|
|
4289
|
-
// The methods below operate against ``platform.functions`` (the
|
|
4290
|
-
// versioned, alias-pinned, typed-parameter table introduced in
|
|
4291
|
-
// platform migration V109). The legacy methods above continue to
|
|
4292
|
-
// wrap the JSONB-backed ``workspace.settings["functions"]`` shape;
|
|
4293
|
-
// both surfaces co-exist so callers can migrate at their own pace.
|
|
4294
|
-
/**
|
|
4295
|
-
* Validate + register a new platform function version. Atomic:
|
|
4296
|
-
* validation + INSERT + ``latest`` alias rebind happen in one
|
|
4297
|
-
* transaction. Concurrent deploys race-fail on the UNIQUE
|
|
4298
|
-
* constraint and return 409.
|
|
4299
|
-
*/
|
|
4300
|
-
async deploy(body) {
|
|
4301
|
-
return extractData(
|
|
4302
|
-
await this.client.POST("/v1/{workspace_id}/functions/deploy", {
|
|
4303
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
4304
|
-
body
|
|
4305
|
-
})
|
|
4306
|
-
);
|
|
4307
|
-
}
|
|
4308
|
-
/**
|
|
4309
|
-
* List the ``latest`` version of every V109-registered platform
|
|
4310
|
-
* function in the workspace. Returns one row per function (the
|
|
4311
|
-
* alias-pinned latest version).
|
|
4312
|
-
*
|
|
4313
|
-
* Distinct from :meth:`list` which reads the legacy
|
|
4314
|
-
* ``workspace.settings["functions"]`` JSONB store; both surfaces
|
|
4315
|
-
* co-exist while callers migrate. Prefer this for V109 functions.
|
|
4316
|
-
*/
|
|
4317
|
-
async listRegistered() {
|
|
4318
|
-
return extractData(
|
|
4319
|
-
await this.client.GET("/v1/{workspace_id}/functions/registered", {
|
|
4320
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
4321
|
-
})
|
|
4322
|
-
);
|
|
4323
|
-
}
|
|
4324
|
-
/**
|
|
4325
|
-
* List all immutable versions of a registered function, newest first.
|
|
4326
|
-
*/
|
|
4327
|
-
async listVersions(functionName) {
|
|
4328
|
-
return extractData(
|
|
4329
|
-
await this.client.GET("/v1/{workspace_id}/functions/{function_name}/versions", {
|
|
4330
|
-
params: { path: { workspace_id: this.workspaceId, function_name: functionName } }
|
|
4331
|
-
})
|
|
4332
|
-
);
|
|
4333
|
-
}
|
|
4334
|
-
/**
|
|
4335
|
-
* Resolve ``(function_name, alias)`` to a specific version row.
|
|
4336
|
-
* Default alias: ``latest``.
|
|
4337
|
-
*/
|
|
4338
|
-
async getVersion(functionName, alias = "latest") {
|
|
4339
|
-
return extractData(
|
|
4340
|
-
await this.client.GET("/v1/{workspace_id}/functions/{function_name}/version", {
|
|
4341
|
-
params: {
|
|
4342
|
-
path: { workspace_id: this.workspaceId, function_name: functionName },
|
|
4343
|
-
query: { alias }
|
|
4344
|
-
}
|
|
4345
|
-
})
|
|
4346
|
-
);
|
|
4149
|
+
async delete(functionName) {
|
|
4150
|
+
await this.client.DELETE("/v1/{workspace_id}/functions/{function_name}", {
|
|
4151
|
+
params: { path: { workspace_id: this.workspaceId, function_name: functionName } }
|
|
4152
|
+
});
|
|
4347
4153
|
}
|
|
4348
|
-
/**
|
|
4349
|
-
* Execute a registered function. Bound parameters validated against
|
|
4350
|
-
* the version's stored schema; ``ws_id`` auto-injected from request
|
|
4351
|
-
* context. Returns the executor's shaped response (rows for
|
|
4352
|
-
* ``returns=table``, scalar for ``returns=scalar``).
|
|
4353
|
-
*/
|
|
4354
4154
|
async invoke(functionName, body) {
|
|
4355
4155
|
return extractData(
|
|
4356
4156
|
await this.client.POST("/v1/{workspace_id}/functions/{function_name}/invoke", {
|
|
@@ -4359,46 +4159,9 @@ var FunctionsResource = class extends WorkspaceScopedResource {
|
|
|
4359
4159
|
})
|
|
4360
4160
|
);
|
|
4361
4161
|
}
|
|
4362
|
-
|
|
4363
|
-
* Test invoke — same as ``invoke`` plus persists ``last_test_*``
|
|
4364
|
-
* telemetry on the version row so the DC tool list can show
|
|
4365
|
-
* health without re-running.
|
|
4366
|
-
*
|
|
4367
|
-
* Returns :type:`TestInvokeResponse` (superset of `InvokeResponse`)
|
|
4368
|
-
* so callers can read ``status`` / ``error`` / ``test_duration_ms``
|
|
4369
|
-
* directly off the response. The platform-api route catches
|
|
4370
|
-
* ``ServiceUnavailableError`` and converts it into ``status='fail'``
|
|
4371
|
-
* with the executor's error string in ``error`` — so even on a
|
|
4372
|
-
* blown-up SQL execution the response is a 200 with the failure
|
|
4373
|
-
* detail surfaced to the caller.
|
|
4374
|
-
*/
|
|
4375
|
-
async testV2(functionName, body) {
|
|
4376
|
-
return extractData(
|
|
4377
|
-
await this.client.POST("/v1/{workspace_id}/functions/{function_name}/v2/test", {
|
|
4378
|
-
params: { path: { workspace_id: this.workspaceId, function_name: functionName } },
|
|
4379
|
-
body
|
|
4380
|
-
})
|
|
4381
|
-
);
|
|
4382
|
-
}
|
|
4383
|
-
/**
|
|
4384
|
-
* Rebind an alias (``latest`` / ``staging`` / ``production``) to a
|
|
4385
|
-
* specific version. Verifies the version exists before rebinding.
|
|
4386
|
-
*/
|
|
4387
|
-
async promote(functionName, body) {
|
|
4388
|
-
return extractData(
|
|
4389
|
-
await this.client.POST("/v1/{workspace_id}/functions/{function_name}/promote", {
|
|
4390
|
-
params: { path: { workspace_id: this.workspaceId, function_name: functionName } },
|
|
4391
|
-
body
|
|
4392
|
-
})
|
|
4393
|
-
);
|
|
4394
|
-
}
|
|
4395
|
-
/**
|
|
4396
|
-
* Rebind ``latest`` and ``production`` to a prior version. The
|
|
4397
|
-
* "oops the new deploy was bad" path. ``staging`` stays untouched.
|
|
4398
|
-
*/
|
|
4399
|
-
async rollback(functionName, body) {
|
|
4162
|
+
async test(functionName, body) {
|
|
4400
4163
|
return extractData(
|
|
4401
|
-
await this.client.POST("/v1/{workspace_id}/functions/{function_name}/
|
|
4164
|
+
await this.client.POST("/v1/{workspace_id}/functions/{function_name}/test", {
|
|
4402
4165
|
params: { path: { workspace_id: this.workspaceId, function_name: functionName } },
|
|
4403
4166
|
body
|
|
4404
4167
|
})
|
|
@@ -5066,164 +4829,6 @@ var InsightsResource = class extends WorkspaceScopedResource {
|
|
|
5066
4829
|
};
|
|
5067
4830
|
};
|
|
5068
4831
|
|
|
5069
|
-
// src/resources/monitor-concepts.ts
|
|
5070
|
-
var MonitorConceptsResource = class extends WorkspaceScopedResource {
|
|
5071
|
-
/** Create a new monitor concept */
|
|
5072
|
-
async create(body) {
|
|
5073
|
-
return extractData(
|
|
5074
|
-
await this.client.POST("/v1/{workspace_id}/monitor-concepts", {
|
|
5075
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
5076
|
-
body
|
|
5077
|
-
})
|
|
5078
|
-
);
|
|
5079
|
-
}
|
|
5080
|
-
/** List monitor concepts in the workspace */
|
|
5081
|
-
async list(params) {
|
|
5082
|
-
return extractData(
|
|
5083
|
-
await this.client.GET("/v1/{workspace_id}/monitor-concepts", {
|
|
5084
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
5085
|
-
})
|
|
5086
|
-
);
|
|
5087
|
-
}
|
|
5088
|
-
listAutoPaging(params) {
|
|
5089
|
-
return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
|
|
5090
|
-
}
|
|
5091
|
-
/** Get a single monitor concept */
|
|
5092
|
-
async get(conceptId) {
|
|
5093
|
-
return extractData(
|
|
5094
|
-
await this.client.GET("/v1/{workspace_id}/monitor-concepts/{concept_id}", {
|
|
5095
|
-
params: { path: { workspace_id: this.workspaceId, concept_id: conceptId } }
|
|
5096
|
-
})
|
|
5097
|
-
);
|
|
5098
|
-
}
|
|
5099
|
-
/** Update a monitor concept */
|
|
5100
|
-
async update(conceptId, body) {
|
|
5101
|
-
return extractData(
|
|
5102
|
-
await this.client.PATCH("/v1/{workspace_id}/monitor-concepts/{concept_id}", {
|
|
5103
|
-
params: { path: { workspace_id: this.workspaceId, concept_id: conceptId } },
|
|
5104
|
-
body
|
|
5105
|
-
})
|
|
5106
|
-
);
|
|
5107
|
-
}
|
|
5108
|
-
/** Delete a monitor concept */
|
|
5109
|
-
async delete(conceptId) {
|
|
5110
|
-
return extractData(
|
|
5111
|
-
await this.client.DELETE("/v1/{workspace_id}/monitor-concepts/{concept_id}", {
|
|
5112
|
-
params: { path: { workspace_id: this.workspaceId, concept_id: conceptId } }
|
|
5113
|
-
})
|
|
5114
|
-
);
|
|
5115
|
-
}
|
|
5116
|
-
};
|
|
5117
|
-
|
|
5118
|
-
// src/resources/unification-rules.ts
|
|
5119
|
-
var UnificationRulesResource = class extends WorkspaceScopedResource {
|
|
5120
|
-
/** Create a new unification rule */
|
|
5121
|
-
async create(body) {
|
|
5122
|
-
return extractData(
|
|
5123
|
-
await this.client.POST("/v1/{workspace_id}/unification-rules", {
|
|
5124
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
5125
|
-
body
|
|
5126
|
-
})
|
|
5127
|
-
);
|
|
5128
|
-
}
|
|
5129
|
-
/** List unification rules in the workspace */
|
|
5130
|
-
async list(params) {
|
|
5131
|
-
return extractData(
|
|
5132
|
-
await this.client.GET("/v1/{workspace_id}/unification-rules", {
|
|
5133
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
5134
|
-
})
|
|
5135
|
-
);
|
|
5136
|
-
}
|
|
5137
|
-
listAutoPaging(params) {
|
|
5138
|
-
return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
|
|
5139
|
-
}
|
|
5140
|
-
/** Get a single unification rule */
|
|
5141
|
-
async get(ruleId) {
|
|
5142
|
-
return extractData(
|
|
5143
|
-
await this.client.GET("/v1/{workspace_id}/unification-rules/{rule_id}", {
|
|
5144
|
-
params: { path: { workspace_id: this.workspaceId, rule_id: ruleId } }
|
|
5145
|
-
})
|
|
5146
|
-
);
|
|
5147
|
-
}
|
|
5148
|
-
/** Update a unification rule */
|
|
5149
|
-
async update(ruleId, body) {
|
|
5150
|
-
return extractData(
|
|
5151
|
-
await this.client.PATCH("/v1/{workspace_id}/unification-rules/{rule_id}", {
|
|
5152
|
-
params: { path: { workspace_id: this.workspaceId, rule_id: ruleId } },
|
|
5153
|
-
body
|
|
5154
|
-
})
|
|
5155
|
-
);
|
|
5156
|
-
}
|
|
5157
|
-
/** Delete a unification rule */
|
|
5158
|
-
async delete(ruleId) {
|
|
5159
|
-
return extractData(
|
|
5160
|
-
await this.client.DELETE("/v1/{workspace_id}/unification-rules/{rule_id}", {
|
|
5161
|
-
params: { path: { workspace_id: this.workspaceId, rule_id: ruleId } }
|
|
5162
|
-
})
|
|
5163
|
-
);
|
|
5164
|
-
}
|
|
5165
|
-
};
|
|
5166
|
-
|
|
5167
|
-
// src/resources/crm.ts
|
|
5168
|
-
var CrmResource = class extends WorkspaceScopedResource {
|
|
5169
|
-
/** Health/status of the workspace's CRM integration sync */
|
|
5170
|
-
async getStatus() {
|
|
5171
|
-
return extractData(
|
|
5172
|
-
await this.client.GET("/v1/{workspace_id}/crm/status", {
|
|
5173
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
5174
|
-
})
|
|
5175
|
-
);
|
|
5176
|
-
}
|
|
5177
|
-
contacts = {
|
|
5178
|
-
list: async (params) => extractData(
|
|
5179
|
-
await this.client.GET("/v1/{workspace_id}/crm/contacts", {
|
|
5180
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
5181
|
-
})
|
|
5182
|
-
),
|
|
5183
|
-
get: async (contactId) => extractData(
|
|
5184
|
-
await this.client.GET("/v1/{workspace_id}/crm/contacts/{contact_id}", {
|
|
5185
|
-
params: { path: { workspace_id: this.workspaceId, contact_id: contactId } }
|
|
5186
|
-
})
|
|
5187
|
-
),
|
|
5188
|
-
/** Per-contact activity timeline (calls, emails, deal events) */
|
|
5189
|
-
getTimeline: async (contactId) => extractData(
|
|
5190
|
-
await this.client.GET("/v1/{workspace_id}/crm/contacts/{contact_id}/timeline", {
|
|
5191
|
-
params: { path: { workspace_id: this.workspaceId, contact_id: contactId } }
|
|
5192
|
-
})
|
|
5193
|
-
)
|
|
5194
|
-
};
|
|
5195
|
-
companies = {
|
|
5196
|
-
list: async (params) => extractData(
|
|
5197
|
-
await this.client.GET("/v1/{workspace_id}/crm/companies", {
|
|
5198
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
5199
|
-
})
|
|
5200
|
-
),
|
|
5201
|
-
get: async (companyId) => extractData(
|
|
5202
|
-
await this.client.GET("/v1/{workspace_id}/crm/companies/{company_id}", {
|
|
5203
|
-
params: { path: { workspace_id: this.workspaceId, company_id: companyId } }
|
|
5204
|
-
})
|
|
5205
|
-
)
|
|
5206
|
-
};
|
|
5207
|
-
deals = {
|
|
5208
|
-
list: async (params) => extractData(
|
|
5209
|
-
await this.client.GET("/v1/{workspace_id}/crm/deals", {
|
|
5210
|
-
params: { path: { workspace_id: this.workspaceId }, query: params }
|
|
5211
|
-
})
|
|
5212
|
-
),
|
|
5213
|
-
get: async (dealId) => extractData(
|
|
5214
|
-
await this.client.GET("/v1/{workspace_id}/crm/deals/{deal_id}", {
|
|
5215
|
-
params: { path: { workspace_id: this.workspaceId, deal_id: dealId } }
|
|
5216
|
-
})
|
|
5217
|
-
),
|
|
5218
|
-
/** Aggregated pipeline view: deals grouped by stage with rolled-up totals */
|
|
5219
|
-
getPipeline: async () => extractData(
|
|
5220
|
-
await this.client.GET("/v1/{workspace_id}/crm/deals/pipeline", {
|
|
5221
|
-
params: { path: { workspace_id: this.workspaceId } }
|
|
5222
|
-
})
|
|
5223
|
-
)
|
|
5224
|
-
};
|
|
5225
|
-
};
|
|
5226
|
-
|
|
5227
4832
|
// src/resources/command-center.ts
|
|
5228
4833
|
var CommandCenterResource = class extends WorkspaceScopedResource {
|
|
5229
4834
|
/** Get the current command-center snapshot */
|
|
@@ -6389,7 +5994,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6389
5994
|
calls;
|
|
6390
5995
|
conversations;
|
|
6391
5996
|
channels;
|
|
6392
|
-
phoneNumbers;
|
|
6393
5997
|
integrations;
|
|
6394
5998
|
analytics;
|
|
6395
5999
|
simulations;
|
|
@@ -6402,7 +6006,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6402
6006
|
recordings;
|
|
6403
6007
|
audit;
|
|
6404
6008
|
webhookDestinations;
|
|
6405
|
-
safety;
|
|
6406
6009
|
compliance;
|
|
6407
6010
|
events;
|
|
6408
6011
|
functions;
|
|
@@ -6416,12 +6019,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6416
6019
|
fhir;
|
|
6417
6020
|
/** Natural-language insights — schema, suggestions, SQL, chat sessions */
|
|
6418
6021
|
insights;
|
|
6419
|
-
/** Workspace monitor concepts (semantic patterns watched across calls) */
|
|
6420
|
-
monitorConcepts;
|
|
6421
|
-
/** Entity unification rules (declarative deduplication of world-model entities) */
|
|
6422
|
-
unificationRules;
|
|
6423
|
-
/** CRM — contacts, companies, deals, pipeline (sync from connected CRM integration) */
|
|
6424
|
-
crm;
|
|
6425
6022
|
/** Command Center — rolled-up workspace homepage snapshot */
|
|
6426
6023
|
commandCenter;
|
|
6427
6024
|
/** Sensorium — operator-facing live agent loop observability */
|
|
@@ -6534,7 +6131,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6534
6131
|
mutable.calls = new CallsResource(client, workspaceId2);
|
|
6535
6132
|
mutable.conversations = new ConversationsResource(client, workspaceId2, agentBaseUrl);
|
|
6536
6133
|
mutable.channels = new ChannelsResource(client, workspaceId2);
|
|
6537
|
-
mutable.phoneNumbers = new PhoneNumbersResource(client, workspaceId2);
|
|
6538
6134
|
mutable.integrations = new IntegrationsResource(client, workspaceId2);
|
|
6539
6135
|
mutable.analytics = new AnalyticsResource(client, workspaceId2);
|
|
6540
6136
|
mutable.simulations = new SimulationsResource(client, workspaceId2);
|
|
@@ -6547,16 +6143,12 @@ var AmigoClient = class _AmigoClient {
|
|
|
6547
6143
|
mutable.recordings = new RecordingsResource(client, workspaceId2);
|
|
6548
6144
|
mutable.audit = new AuditResource(client, workspaceId2);
|
|
6549
6145
|
mutable.webhookDestinations = new WebhookDestinationsResource(client, workspaceId2);
|
|
6550
|
-
mutable.safety = new SafetyResource(client, workspaceId2);
|
|
6551
6146
|
mutable.compliance = new ComplianceResource(client, workspaceId2);
|
|
6552
6147
|
mutable.events = new EventsResource(client, workspaceId2);
|
|
6553
6148
|
mutable.functions = new FunctionsResource(client, workspaceId2);
|
|
6554
6149
|
mutable.observers = new ObserversResource(client, workspaceId2, agentBaseUrl);
|
|
6555
6150
|
mutable.fhir = new FhirResource(client, workspaceId2);
|
|
6556
6151
|
mutable.insights = new InsightsResource(client, workspaceId2);
|
|
6557
|
-
mutable.monitorConcepts = new MonitorConceptsResource(client, workspaceId2);
|
|
6558
|
-
mutable.unificationRules = new UnificationRulesResource(client, workspaceId2);
|
|
6559
|
-
mutable.crm = new CrmResource(client, workspaceId2);
|
|
6560
6152
|
mutable.commandCenter = new CommandCenterResource(client, workspaceId2);
|
|
6561
6153
|
mutable.sensorium = new SensoriumResource(client, workspaceId2);
|
|
6562
6154
|
mutable.dataQuery = new DataQueryResource(client, workspaceId2);
|