@amigo-ai/platform-sdk 0.5.2 → 0.5.3

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.
Files changed (52) hide show
  1. package/README.md +81 -7
  2. package/api.md +3 -0
  3. package/dist/index.cjs +42 -10
  4. package/dist/index.cjs.map +2 -2
  5. package/dist/index.mjs +42 -10
  6. package/dist/index.mjs.map +2 -2
  7. package/dist/resources/base.js +7 -2
  8. package/dist/resources/base.js.map +1 -1
  9. package/dist/resources/operators.js.map +1 -1
  10. package/dist/resources/personas.js.map +1 -1
  11. package/dist/resources/webhook-destinations.js.map +1 -1
  12. package/dist/resources/workspaces.js +22 -0
  13. package/dist/resources/workspaces.js.map +1 -1
  14. package/dist/resources/world.js.map +1 -1
  15. package/dist/types/generated/api.d.ts +13373 -13213
  16. package/dist/types/generated/api.d.ts.map +1 -1
  17. package/dist/types/resources/actions.d.ts +166 -166
  18. package/dist/types/resources/agents.d.ts +88 -88
  19. package/dist/types/resources/analytics.d.ts +39 -39
  20. package/dist/types/resources/api-keys.d.ts +29 -29
  21. package/dist/types/resources/audit.d.ts +73 -73
  22. package/dist/types/resources/base.d.ts.map +1 -1
  23. package/dist/types/resources/billing.d.ts +36 -36
  24. package/dist/types/resources/calls.d.ts +106 -106
  25. package/dist/types/resources/compliance.d.ts +17 -17
  26. package/dist/types/resources/context-graphs.d.ts +643 -643
  27. package/dist/types/resources/data-sources.d.ts +81 -81
  28. package/dist/types/resources/functions.d.ts +22 -22
  29. package/dist/types/resources/functions.d.ts.map +1 -1
  30. package/dist/types/resources/integrations.d.ts +258 -258
  31. package/dist/types/resources/memory.d.ts +35 -35
  32. package/dist/types/resources/operators.d.ts +147 -147
  33. package/dist/types/resources/operators.d.ts.map +1 -1
  34. package/dist/types/resources/personas.d.ts +37 -37
  35. package/dist/types/resources/personas.d.ts.map +1 -1
  36. package/dist/types/resources/phone-numbers.d.ts +62 -62
  37. package/dist/types/resources/recordings.d.ts +9 -9
  38. package/dist/types/resources/review-queue.d.ts +331 -331
  39. package/dist/types/resources/safety.d.ts +33 -33
  40. package/dist/types/resources/services.d.ts +142 -142
  41. package/dist/types/resources/settings.d.ts +254 -254
  42. package/dist/types/resources/settings.d.ts.map +1 -1
  43. package/dist/types/resources/simulations.d.ts +73 -73
  44. package/dist/types/resources/skills.d.ts +163 -163
  45. package/dist/types/resources/triggers.d.ts +74 -74
  46. package/dist/types/resources/webhook-destinations.d.ts +57 -57
  47. package/dist/types/resources/webhook-destinations.d.ts.map +1 -1
  48. package/dist/types/resources/workspaces.d.ts +69 -35
  49. package/dist/types/resources/workspaces.d.ts.map +1 -1
  50. package/dist/types/resources/world.d.ts +216 -216
  51. package/dist/types/resources/world.d.ts.map +1 -1
  52. package/package.json +1 -1
@@ -12,171 +12,171 @@ export interface ListDataSourcesParams extends ListParams {
12
12
  */
13
13
  export declare class DataSourcesResource extends WorkspaceScopedResource {
14
14
  create(body: components['schemas']['CreateDataSourceRequest']): Promise<{
15
+ id: string;
16
+ workspace_id: string;
17
+ name: string;
18
+ display_name: string | null;
19
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
15
20
  connection_config: {
16
21
  [x: string]: unknown;
17
22
  };
18
- created_at: string;
19
- discovered_by: string | null;
20
- display_name: string | null;
21
23
  entity_types: string[] | null;
22
24
  field_mappings: {
23
25
  [x: string]: unknown;
24
26
  };
25
- health_status: "unknown" | "healthy" | "degraded";
26
- id: string;
27
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
28
+ sync_schedule: string | null;
29
+ last_sync_at: string | null;
30
+ last_sync_status: ("success" | "error") | null;
31
+ last_sync_event_count: number;
27
32
  is_active: boolean;
28
33
  is_stale: boolean;
34
+ health_status: "unknown" | "healthy" | "degraded";
29
35
  last_health_check: string | null;
30
- last_sync_at: string | null;
31
- last_sync_event_count: number;
32
- last_sync_status: ("success" | "error") | null;
33
- name: string;
34
- source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
35
- sync_schedule: string | null;
36
- sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
36
+ discovered_by: string | null;
37
+ created_at: string;
37
38
  updated_at: string;
38
- workspace_id: string;
39
39
  } & import("../index.js").ResponseMetadata>;
40
40
  list(params?: ListDataSourcesParams): Promise<{
41
- continuation_token?: number | null | undefined;
42
- has_more: boolean;
43
41
  items: {
42
+ id: string;
43
+ workspace_id: string;
44
+ name: string;
45
+ display_name: string | null;
46
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
44
47
  connection_config: {
45
48
  [x: string]: unknown;
46
49
  };
47
- created_at: string;
48
- discovered_by: string | null;
49
- display_name: string | null;
50
50
  entity_types: string[] | null;
51
51
  field_mappings: {
52
52
  [x: string]: unknown;
53
53
  };
54
- health_status: "unknown" | "healthy" | "degraded";
55
- id: string;
54
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
55
+ sync_schedule: string | null;
56
+ last_sync_at: string | null;
57
+ last_sync_status: ("success" | "error") | null;
58
+ last_sync_event_count: number;
56
59
  is_active: boolean;
57
60
  is_stale: boolean;
61
+ health_status: "unknown" | "healthy" | "degraded";
58
62
  last_health_check: string | null;
59
- last_sync_at: string | null;
60
- last_sync_event_count: number;
61
- last_sync_status: ("success" | "error") | null;
62
- name: string;
63
- source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
64
- sync_schedule: string | null;
65
- sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
63
+ discovered_by: string | null;
64
+ created_at: string;
66
65
  updated_at: string;
67
- workspace_id: string;
68
66
  }[];
67
+ has_more: boolean;
68
+ continuation_token?: number | null | undefined;
69
69
  total?: number | null | undefined;
70
70
  } & import("../index.js").ResponseMetadata>;
71
71
  listAutoPaging(params?: ListDataSourcesParams): AsyncGenerator<{
72
+ id: string;
73
+ workspace_id: string;
74
+ name: string;
75
+ display_name: string | null;
76
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
72
77
  connection_config: {
73
78
  [x: string]: unknown;
74
79
  };
75
- created_at: string;
76
- discovered_by: string | null;
77
- display_name: string | null;
78
80
  entity_types: string[] | null;
79
81
  field_mappings: {
80
82
  [x: string]: unknown;
81
83
  };
82
- health_status: "unknown" | "healthy" | "degraded";
83
- id: string;
84
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
85
+ sync_schedule: string | null;
86
+ last_sync_at: string | null;
87
+ last_sync_status: ("success" | "error") | null;
88
+ last_sync_event_count: number;
84
89
  is_active: boolean;
85
90
  is_stale: boolean;
91
+ health_status: "unknown" | "healthy" | "degraded";
86
92
  last_health_check: string | null;
87
- last_sync_at: string | null;
88
- last_sync_event_count: number;
89
- last_sync_status: ("success" | "error") | null;
90
- name: string;
91
- source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
92
- sync_schedule: string | null;
93
- sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
93
+ discovered_by: string | null;
94
+ created_at: string;
94
95
  updated_at: string;
95
- workspace_id: string;
96
96
  }, any, any>;
97
97
  get(dataSourceId: DataSourceId | string): Promise<{
98
+ id: string;
99
+ workspace_id: string;
100
+ name: string;
101
+ display_name: string | null;
102
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
98
103
  connection_config: {
99
104
  [x: string]: unknown;
100
105
  };
101
- created_at: string;
102
- discovered_by: string | null;
103
- display_name: string | null;
104
106
  entity_types: string[] | null;
105
107
  field_mappings: {
106
108
  [x: string]: unknown;
107
109
  };
108
- health_status: "unknown" | "healthy" | "degraded";
109
- id: string;
110
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
111
+ sync_schedule: string | null;
112
+ last_sync_at: string | null;
113
+ last_sync_status: ("success" | "error") | null;
114
+ last_sync_event_count: number;
110
115
  is_active: boolean;
111
116
  is_stale: boolean;
117
+ health_status: "unknown" | "healthy" | "degraded";
112
118
  last_health_check: string | null;
113
- last_sync_at: string | null;
114
- last_sync_event_count: number;
115
- last_sync_status: ("success" | "error") | null;
116
- name: string;
117
- source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
118
- sync_schedule: string | null;
119
- sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
119
+ discovered_by: string | null;
120
+ created_at: string;
120
121
  updated_at: string;
121
- workspace_id: string;
122
122
  } & import("../index.js").ResponseMetadata>;
123
123
  update(dataSourceId: DataSourceId | string, body: components['schemas']['UpdateDataSourceRequest']): Promise<{
124
+ id: string;
125
+ workspace_id: string;
126
+ name: string;
127
+ display_name: string | null;
128
+ source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
124
129
  connection_config: {
125
130
  [x: string]: unknown;
126
131
  };
127
- created_at: string;
128
- discovered_by: string | null;
129
- display_name: string | null;
130
132
  entity_types: string[] | null;
131
133
  field_mappings: {
132
134
  [x: string]: unknown;
133
135
  };
134
- health_status: "unknown" | "healthy" | "degraded";
135
- id: string;
136
+ sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
137
+ sync_schedule: string | null;
138
+ last_sync_at: string | null;
139
+ last_sync_status: ("success" | "error") | null;
140
+ last_sync_event_count: number;
136
141
  is_active: boolean;
137
142
  is_stale: boolean;
143
+ health_status: "unknown" | "healthy" | "degraded";
138
144
  last_health_check: string | null;
139
- last_sync_at: string | null;
140
- last_sync_event_count: number;
141
- last_sync_status: ("success" | "error") | null;
142
- name: string;
143
- source_type: "rest_api" | "webhook" | "file_drop" | "fhir" | "fhir_store" | "ehr" | "crm" | "database" | "custom" | "smart_fhir";
144
- sync_schedule: string | null;
145
- sync_strategy: "manual" | "scheduled" | "webhook" | "continuous";
145
+ discovered_by: string | null;
146
+ created_at: string;
146
147
  updated_at: string;
147
- workspace_id: string;
148
148
  } & import("../index.js").ResponseMetadata>;
149
149
  delete(dataSourceId: DataSourceId | string): Promise<void>;
150
150
  /** Get event counts, sync status, and health for a data source */
151
151
  getStatus(dataSourceId: DataSourceId | string): Promise<{
152
152
  data_source_id: string;
153
- event_count: number;
154
- failed_count: number;
155
- health_status: "unknown" | "healthy" | "degraded";
153
+ name: string;
156
154
  is_active: boolean;
155
+ health_status: "unknown" | "healthy" | "degraded";
157
156
  last_sync_at: string | null;
158
- last_sync_event_count: number;
159
157
  last_sync_status: ("success" | "error") | null;
160
- name: string;
158
+ last_sync_event_count: number;
159
+ event_count: number;
161
160
  synced_count: number;
161
+ failed_count: number;
162
162
  } & import("../index.js").ResponseMetadata>;
163
163
  /** Get daily event timeline + recent sync failures for a data source */
164
164
  getSyncHistory(dataSourceId: DataSourceId | string): Promise<{
165
165
  data_source_id: string;
166
166
  name: string;
167
+ timeline: {
168
+ date: string;
169
+ event_count: number;
170
+ synced_count: number;
171
+ failed_count: number;
172
+ }[];
167
173
  recent_failures: {
168
- created_at: string | null;
169
174
  event_id: string;
170
175
  event_type: string;
171
- fhir_resource_id: string | null;
172
176
  fhir_resource_type: string | null;
177
+ fhir_resource_id: string | null;
173
178
  sync_error: string | null;
174
- }[];
175
- timeline: {
176
- date: string;
177
- event_count: number;
178
- failed_count: number;
179
- synced_count: number;
179
+ created_at: string | null;
180
180
  }[];
181
181
  } & import("../index.js").ResponseMetadata>;
182
182
  /**
@@ -190,8 +190,8 @@ export declare class DataSourcesResource extends WorkspaceScopedResource {
190
190
  * connector-runner is unreachable.
191
191
  */
192
192
  triggerSync(dataSourceId: DataSourceId | string): Promise<{
193
- data_source_id: string;
194
193
  status: "started";
194
+ data_source_id: string;
195
195
  triggered_at: string;
196
196
  } & import("../index.js").ResponseMetadata>;
197
197
  }
@@ -2,72 +2,72 @@ import type { components } from '../generated/api.js';
2
2
  import { WorkspaceScopedResource } from './base.js';
3
3
  export declare class FunctionsResource extends WorkspaceScopedResource {
4
4
  list(): Promise<{
5
- count: number;
6
5
  items: {
6
+ name: components["schemas"]["NameString"];
7
7
  catalog?: string | undefined;
8
+ schema?: string | undefined;
8
9
  description?: components["schemas"]["DescriptionString"] | undefined;
9
- enabled?: boolean | undefined;
10
- function_type?: string | undefined;
11
10
  input_schema?: {
12
11
  [x: string]: unknown;
13
12
  } | undefined;
14
- name: components["schemas"]["NameString"];
15
13
  returns_table?: boolean | undefined;
16
- schema?: string | undefined;
14
+ enabled?: boolean | undefined;
15
+ function_type?: string | undefined;
17
16
  }[];
17
+ count: number;
18
18
  } & import("../index.js").ResponseMetadata>;
19
19
  create(body: components['schemas']['FunctionCreateRequest']): Promise<{
20
+ name: components["schemas"]["NameString"];
20
21
  catalog?: string | undefined;
22
+ schema?: string | undefined;
21
23
  description?: components["schemas"]["DescriptionString"] | undefined;
22
- enabled?: boolean | undefined;
23
- function_type?: string | undefined;
24
24
  input_schema?: {
25
25
  [x: string]: unknown;
26
26
  } | undefined;
27
- name: components["schemas"]["NameString"];
28
27
  returns_table?: boolean | undefined;
29
- schema?: string | undefined;
28
+ enabled?: boolean | undefined;
29
+ function_type?: string | undefined;
30
30
  } & import("../index.js").ResponseMetadata>;
31
31
  delete(functionName: string): Promise<void>;
32
32
  test(functionName: string, body: components['schemas']['FunctionTestRequest']): Promise<{
33
+ result?: unknown;
33
34
  duration_ms?: number | undefined;
34
35
  error?: string | null | undefined;
35
36
  function_name?: string | undefined;
36
- result?: unknown;
37
37
  } & import("../index.js").ResponseMetadata>;
38
38
  getCatalog(): Promise<{
39
- catalog?: string | undefined;
40
- count?: number | undefined;
41
39
  functions: {
42
- comment?: string | undefined;
43
- data_type?: string | undefined;
44
40
  name: string;
41
+ data_type?: string | undefined;
42
+ comment?: string | undefined;
45
43
  registered?: boolean | undefined;
46
44
  }[];
45
+ count?: number | undefined;
46
+ catalog?: string | undefined;
47
47
  schema?: string | undefined;
48
48
  } & import("../index.js").ResponseMetadata>;
49
49
  query(body: components['schemas']['QueryRequest']): Promise<{
50
- count?: number | undefined;
51
- duration_ms?: number | undefined;
52
- error?: string | null | undefined;
53
50
  results?: {
54
51
  [x: string]: unknown;
55
52
  }[] | undefined;
53
+ count?: number | undefined;
54
+ duration_ms?: number | undefined;
55
+ error?: string | null | undefined;
56
56
  } & import("../index.js").ResponseMetadata>;
57
57
  sync(): Promise<{
58
- count: number;
59
58
  items: {
59
+ name: components["schemas"]["NameString"];
60
60
  catalog?: string | undefined;
61
+ schema?: string | undefined;
61
62
  description?: components["schemas"]["DescriptionString"] | undefined;
62
- enabled?: boolean | undefined;
63
- function_type?: string | undefined;
64
63
  input_schema?: {
65
64
  [x: string]: unknown;
66
65
  } | undefined;
67
- name: components["schemas"]["NameString"];
68
66
  returns_table?: boolean | undefined;
69
- schema?: string | undefined;
67
+ enabled?: boolean | undefined;
68
+ function_type?: string | undefined;
70
69
  }[];
70
+ count: number;
71
71
  } & import("../index.js").ResponseMetadata>;
72
72
  }
73
73
  //# sourceMappingURL=functions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/resources/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,qBAAa,iBAAkB,SAAQ,uBAAuB;IACtD,IAAI;;;;0BAyD0/qa,qBAAsB;;;;;;kBAAic,qBAAsB;;;;;IAjD3+ra,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC;;sBAiDm8qa,qBAAsB;;;;;;cAAic,qBAAsB;;;;IAxC3+ra,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC;;;;;;IAS7E,UAAU;;;;;;;;;;;IAQV,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC;;;;;;;;IASjD,IAAI;;;;0BAQ0/qa,qBAAsB;;;;;;kBAAic,qBAAsB;;;;;CADl/ra"}
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/resources/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,qBAAa,iBAAkB,SAAQ,uBAAuB;IACtD,IAAI;;kBAyD8kua,qBAAsB;;;0BAA8S,qBAAsB;;;;;;;;;;IAjD56ua,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,uBAAuB,CAAC;cAiDuhua,qBAAsB;;;sBAA8S,qBAAsB;;;;;;;;IAxC56ua,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC;;;;;;IAS7E,UAAU;;;;;;;;;;;IAQV,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC;;;;;;;;IASjD,IAAI;;kBAQ8kua,qBAAsB;;;0BAA8S,qBAAsB;;;;;;;;;;CADn7ua"}