@amigo-ai/platform-sdk 0.54.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.
@@ -1,207 +0,0 @@
1
- import type { paths } from '../generated/api.js';
2
- import { WorkspaceScopedResource } from './base.js';
3
- export type CrmContactSearchParams = NonNullable<paths['/v1/{workspace_id}/crm/contacts']['get']['parameters']['query']>;
4
- export type CrmCompanySearchParams = NonNullable<paths['/v1/{workspace_id}/crm/companies']['get']['parameters']['query']>;
5
- export type CrmDealSearchParams = NonNullable<paths['/v1/{workspace_id}/crm/deals']['get']['parameters']['query']>;
6
- /**
7
- * CRM — read-mostly view of contacts, companies, deals, and pipeline state
8
- * sourced from the connected CRM integration (HubSpot/Salesforce/etc.).
9
- *
10
- * The platform refreshes this view in the background; the SDK exposes search
11
- * + detail endpoints plus a per-contact activity timeline. Writes happen
12
- * upstream in the CRM itself, not here.
13
- *
14
- * @beta New in this release; surface may evolve.
15
- */
16
- export declare class CrmResource extends WorkspaceScopedResource {
17
- /** Health/status of the workspace's CRM integration sync */
18
- getStatus(): Promise<{
19
- company_count?: number | undefined;
20
- configured: boolean;
21
- connector_type?: string | null | undefined;
22
- contact_count?: number | undefined;
23
- data_source_id?: string | null | undefined;
24
- deal_count?: number | undefined;
25
- last_sync_at?: string | null | undefined;
26
- last_sync_status?: ("success" | "error") | null | undefined;
27
- sync_failure_count?: number | undefined;
28
- sync_healthy?: boolean | null | undefined;
29
- } & import("../index.js").ResponseMetadata>;
30
- readonly contacts: {
31
- list: (params?: CrmContactSearchParams) => Promise<{
32
- contacts: {
33
- address?: {
34
- [x: string]: unknown;
35
- } | null | undefined;
36
- birth_date?: string | null | undefined;
37
- company?: string | null | undefined;
38
- confidence?: number | undefined;
39
- created_at?: string | null | undefined;
40
- email?: string | null | undefined;
41
- entity_id: string;
42
- event_count?: number | undefined;
43
- first_name?: string | null | undefined;
44
- gender?: string | null | undefined;
45
- hubspot_id?: string | null | undefined;
46
- last_activity_at?: string | null | undefined;
47
- last_name?: string | null | undefined;
48
- lifecycle_stage?: string | null | undefined;
49
- mrn?: string | null | undefined;
50
- name?: string | null | undefined;
51
- phone?: string | null | undefined;
52
- source_system?: string | null | undefined;
53
- }[];
54
- has_more?: boolean | undefined;
55
- next_offset?: number | null | undefined;
56
- total: number;
57
- } & import("../index.js").ResponseMetadata>;
58
- get: (contactId: string) => Promise<{
59
- address?: {
60
- [x: string]: unknown;
61
- } | null | undefined;
62
- birth_date?: string | null | undefined;
63
- canonical_id?: string | null | undefined;
64
- clinical?: {
65
- [x: string]: unknown;
66
- } | undefined;
67
- company?: string | null | undefined;
68
- confidence?: number | undefined;
69
- created_at?: string | null | undefined;
70
- email?: string | null | undefined;
71
- entity_id: string;
72
- event_count?: number | undefined;
73
- external_ids?: {
74
- [x: string]: unknown;
75
- } | undefined;
76
- first_name?: string | null | undefined;
77
- gender?: string | null | undefined;
78
- hubspot_id?: string | null | undefined;
79
- last_activity_at?: string | null | undefined;
80
- last_name?: string | null | undefined;
81
- lifecycle_stage?: string | null | undefined;
82
- merged_with?: {
83
- address?: {
84
- [x: string]: unknown;
85
- } | null | undefined;
86
- birth_date?: string | null | undefined;
87
- company?: string | null | undefined;
88
- confidence?: number | undefined;
89
- created_at?: string | null | undefined;
90
- email?: string | null | undefined;
91
- entity_id: string;
92
- event_count?: number | undefined;
93
- first_name?: string | null | undefined;
94
- gender?: string | null | undefined;
95
- hubspot_id?: string | null | undefined;
96
- last_activity_at?: string | null | undefined;
97
- last_name?: string | null | undefined;
98
- lifecycle_stage?: string | null | undefined;
99
- mrn?: string | null | undefined;
100
- name?: string | null | undefined;
101
- phone?: string | null | undefined;
102
- source_system?: string | null | undefined;
103
- }[] | undefined;
104
- mrn?: string | null | undefined;
105
- name?: string | null | undefined;
106
- operational?: {
107
- [x: string]: unknown;
108
- } | undefined;
109
- phone?: string | null | undefined;
110
- source_system?: string | null | undefined;
111
- } & import("../index.js").ResponseMetadata>;
112
- /** Per-contact activity timeline (calls, emails, deal events) */
113
- getTimeline: (contactId: string) => Promise<{
114
- activities: {
115
- activity_type: string;
116
- confidence?: number | undefined;
117
- data?: {
118
- [x: string]: unknown;
119
- } | undefined;
120
- description?: string | null | undefined;
121
- direction?: string | null | undefined;
122
- id: string;
123
- occurred_at?: string | null | undefined;
124
- source?: string | undefined;
125
- source_system?: string | null | undefined;
126
- }[];
127
- entity_id: string;
128
- has_more?: boolean | undefined;
129
- total: number;
130
- } & import("../index.js").ResponseMetadata>;
131
- };
132
- readonly companies: {
133
- list: (params?: CrmCompanySearchParams) => Promise<{
134
- companies: {
135
- address?: {
136
- [x: string]: unknown;
137
- } | null | undefined;
138
- created_at?: string | null | undefined;
139
- domain?: string | null | undefined;
140
- entity_id: string;
141
- event_count?: number | undefined;
142
- hubspot_id?: string | null | undefined;
143
- industry?: string | null | undefined;
144
- last_activity_at?: string | null | undefined;
145
- name?: string | null | undefined;
146
- phone?: string | null | undefined;
147
- source_system?: string | null | undefined;
148
- }[];
149
- has_more?: boolean | undefined;
150
- next_offset?: number | null | undefined;
151
- total: number;
152
- } & import("../index.js").ResponseMetadata>;
153
- get: (companyId: string) => Promise<{
154
- address?: {
155
- [x: string]: unknown;
156
- } | null | undefined;
157
- created_at?: string | null | undefined;
158
- domain?: string | null | undefined;
159
- entity_id: string;
160
- event_count?: number | undefined;
161
- hubspot_id?: string | null | undefined;
162
- industry?: string | null | undefined;
163
- last_activity_at?: string | null | undefined;
164
- name?: string | null | undefined;
165
- phone?: string | null | undefined;
166
- source_system?: string | null | undefined;
167
- } & import("../index.js").ResponseMetadata>;
168
- };
169
- readonly deals: {
170
- list: (params?: CrmDealSearchParams) => Promise<{
171
- deals: {
172
- amount?: number | null | undefined;
173
- close_date?: string | null | undefined;
174
- created_at?: string | null | undefined;
175
- deal_type?: string | null | undefined;
176
- entity_id: string;
177
- event_count?: number | undefined;
178
- hubspot_id?: string | null | undefined;
179
- last_activity_at?: string | null | undefined;
180
- name?: string | null | undefined;
181
- pipeline?: string | null | undefined;
182
- stage?: string | null | undefined;
183
- }[];
184
- has_more?: boolean | undefined;
185
- next_offset?: number | null | undefined;
186
- total: number;
187
- } & import("../index.js").ResponseMetadata>;
188
- get: (dealId: string) => Promise<{
189
- amount?: number | null | undefined;
190
- close_date?: string | null | undefined;
191
- created_at?: string | null | undefined;
192
- deal_type?: string | null | undefined;
193
- entity_id: string;
194
- event_count?: number | undefined;
195
- hubspot_id?: string | null | undefined;
196
- last_activity_at?: string | null | undefined;
197
- name?: string | null | undefined;
198
- pipeline?: string | null | undefined;
199
- stage?: string | null | undefined;
200
- } & import("../index.js").ResponseMetadata>;
201
- /** Aggregated pipeline view: deals grouped by stage with rolled-up totals */
202
- getPipeline: () => Promise<{
203
- [x: string]: unknown;
204
- } & import("../index.js").ResponseMetadata>;
205
- };
206
- }
207
- //# sourceMappingURL=crm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crm.d.ts","sourceRoot":"","sources":["../../../src/resources/crm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAC9C,KAAK,CAAC,iCAAiC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CACvE,CAAA;AACD,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAC9C,KAAK,CAAC,kCAAkC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CACxE,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAC3C,KAAK,CAAC,8BAA8B,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CACpE,CAAA;AAED;;;;;;;;;GASG;AACH,qBAAa,WAAY,SAAQ,uBAAuB;IACtD,4DAA4D;IACtD,SAAS;;;;;;;;;;;;IAQf,QAAQ,CAAC,QAAQ;wBACO,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAOrB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAO7B,iEAAiE;iCAClC,MAAM;;;;;;;;;;;;;;;;;;MAMtC;IAED,QAAQ,CAAC,SAAS;wBACM,sBAAsB;;;;;;;;;;;;;;;;;;;;yBAOrB,MAAM;;;;;;;;;;;;;;;MAM9B;IAED,QAAQ,CAAC,KAAK;wBACU,mBAAmB;;;;;;;;;;;;;;;;;;sBAOrB,MAAM;;;;;;;;;;;;;QAO1B,6EAA6E;;;;MAO9E;CACF"}