@marktoflow/integrations 2.0.0-alpha.14 → 2.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/claude-agent-hooks.d.ts +176 -0
- package/dist/adapters/claude-agent-types.d.ts +34 -34
- package/dist/adapters/codex-types.d.ts +20 -20
- package/dist/adapters/github-copilot-types.d.ts +16 -16
- package/dist/adapters/ollama-types.d.ts +128 -128
- package/dist/services/github.d.ts +3 -0
- package/dist/services/gmail-trigger.d.ts +92 -0
- package/dist/services/gmail.d.ts +116 -0
- package/dist/services/google-calendar.d.ts +220 -0
- package/dist/services/google-docs.d.ts +197 -0
- package/dist/services/google-drive.d.ts +149 -0
- package/dist/services/google-sheets.d.ts +165 -0
- package/dist/services/http.d.ts +120 -0
- package/dist/services/hubspot.d.ts +315 -0
- package/dist/services/hubspot.d.ts.map +1 -0
- package/dist/services/hubspot.js +246 -0
- package/dist/services/hubspot.js.map +1 -0
- package/dist/services/jira.d.ts +3 -0
- package/dist/services/linear.d.ts +163 -0
- package/dist/services/mysql.d.ts +91 -0
- package/dist/services/outlook-trigger.d.ts +121 -0
- package/dist/services/outlook.d.ts +237 -0
- package/dist/services/postgres.d.ts +83 -0
- package/dist/services/salesforce.d.ts +269 -0
- package/dist/services/salesforce.d.ts.map +1 -0
- package/dist/services/salesforce.js +286 -0
- package/dist/services/salesforce.js.map +1 -0
- package/dist/services/slack-socket.d.ts +18 -0
- package/dist/services/slack.d.ts +3 -0
- package/dist/services/whatsapp.d.ts +311 -0
- package/package.json +5 -2
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { Client } from '@microsoft/microsoft-graph-client';
|
|
2
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
3
|
+
export interface OutlookEmail {
|
|
4
|
+
id: string;
|
|
5
|
+
conversationId: string;
|
|
6
|
+
subject: string;
|
|
7
|
+
from: string;
|
|
8
|
+
fromAddress: string;
|
|
9
|
+
to: {
|
|
10
|
+
name: string;
|
|
11
|
+
address: string;
|
|
12
|
+
}[];
|
|
13
|
+
cc?: {
|
|
14
|
+
name: string;
|
|
15
|
+
address: string;
|
|
16
|
+
}[];
|
|
17
|
+
bcc?: {
|
|
18
|
+
name: string;
|
|
19
|
+
address: string;
|
|
20
|
+
}[];
|
|
21
|
+
receivedDateTime: string;
|
|
22
|
+
sentDateTime?: string;
|
|
23
|
+
bodyPreview: string;
|
|
24
|
+
body?: string;
|
|
25
|
+
bodyHtml?: string;
|
|
26
|
+
isRead: boolean;
|
|
27
|
+
hasAttachments: boolean;
|
|
28
|
+
importance: 'low' | 'normal' | 'high';
|
|
29
|
+
categories: string[];
|
|
30
|
+
webLink?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface GetEmailsOptions {
|
|
33
|
+
folder?: string;
|
|
34
|
+
filter?: string;
|
|
35
|
+
select?: string[];
|
|
36
|
+
top?: number;
|
|
37
|
+
skip?: number;
|
|
38
|
+
orderBy?: string;
|
|
39
|
+
search?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface SendEmailOptions {
|
|
42
|
+
to: string | string[] | {
|
|
43
|
+
name?: string;
|
|
44
|
+
address: string;
|
|
45
|
+
}[];
|
|
46
|
+
subject: string;
|
|
47
|
+
body: string;
|
|
48
|
+
bodyType?: 'text' | 'html';
|
|
49
|
+
cc?: string | string[] | {
|
|
50
|
+
name?: string;
|
|
51
|
+
address: string;
|
|
52
|
+
}[];
|
|
53
|
+
bcc?: string | string[] | {
|
|
54
|
+
name?: string;
|
|
55
|
+
address: string;
|
|
56
|
+
}[];
|
|
57
|
+
importance?: 'low' | 'normal' | 'high';
|
|
58
|
+
saveToSentItems?: boolean;
|
|
59
|
+
replyTo?: string | {
|
|
60
|
+
name?: string;
|
|
61
|
+
address: string;
|
|
62
|
+
}[];
|
|
63
|
+
}
|
|
64
|
+
export interface CreateDraftOptions {
|
|
65
|
+
to?: string | string[] | {
|
|
66
|
+
name?: string;
|
|
67
|
+
address: string;
|
|
68
|
+
}[];
|
|
69
|
+
subject?: string;
|
|
70
|
+
body?: string;
|
|
71
|
+
bodyType?: 'text' | 'html';
|
|
72
|
+
cc?: string | string[] | {
|
|
73
|
+
name?: string;
|
|
74
|
+
address: string;
|
|
75
|
+
}[];
|
|
76
|
+
bcc?: string | string[] | {
|
|
77
|
+
name?: string;
|
|
78
|
+
address: string;
|
|
79
|
+
}[];
|
|
80
|
+
importance?: 'low' | 'normal' | 'high';
|
|
81
|
+
}
|
|
82
|
+
export interface CalendarEvent {
|
|
83
|
+
id: string;
|
|
84
|
+
subject: string;
|
|
85
|
+
body?: string;
|
|
86
|
+
bodyHtml?: string;
|
|
87
|
+
start: {
|
|
88
|
+
dateTime: string;
|
|
89
|
+
timeZone: string;
|
|
90
|
+
};
|
|
91
|
+
end: {
|
|
92
|
+
dateTime: string;
|
|
93
|
+
timeZone: string;
|
|
94
|
+
};
|
|
95
|
+
location?: string;
|
|
96
|
+
attendees: {
|
|
97
|
+
name: string;
|
|
98
|
+
address: string;
|
|
99
|
+
type: string;
|
|
100
|
+
}[];
|
|
101
|
+
organizer?: {
|
|
102
|
+
name: string;
|
|
103
|
+
address: string;
|
|
104
|
+
};
|
|
105
|
+
isOnlineMeeting: boolean;
|
|
106
|
+
onlineMeetingUrl?: string;
|
|
107
|
+
webLink?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface GetEventsOptions {
|
|
110
|
+
startDateTime?: string;
|
|
111
|
+
endDateTime?: string;
|
|
112
|
+
top?: number;
|
|
113
|
+
skip?: number;
|
|
114
|
+
filter?: string;
|
|
115
|
+
orderBy?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface CreateEventOptions {
|
|
118
|
+
subject: string;
|
|
119
|
+
body?: string;
|
|
120
|
+
bodyType?: 'text' | 'html';
|
|
121
|
+
start: {
|
|
122
|
+
dateTime: string;
|
|
123
|
+
timeZone?: string;
|
|
124
|
+
};
|
|
125
|
+
end: {
|
|
126
|
+
dateTime: string;
|
|
127
|
+
timeZone?: string;
|
|
128
|
+
};
|
|
129
|
+
location?: string;
|
|
130
|
+
attendees?: (string | {
|
|
131
|
+
name?: string;
|
|
132
|
+
address: string;
|
|
133
|
+
})[];
|
|
134
|
+
isOnlineMeeting?: boolean;
|
|
135
|
+
reminderMinutesBeforeStart?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface OutlookDraft {
|
|
138
|
+
id: string;
|
|
139
|
+
conversationId?: string;
|
|
140
|
+
webLink?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface GetEmailsResult {
|
|
143
|
+
emails: OutlookEmail[];
|
|
144
|
+
nextLink?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Outlook actions for workflow integration (Email + Calendar)
|
|
148
|
+
*/
|
|
149
|
+
export declare class OutlookActions {
|
|
150
|
+
private client;
|
|
151
|
+
constructor(client: Client);
|
|
152
|
+
/**
|
|
153
|
+
* Get emails from Outlook mailbox
|
|
154
|
+
*/
|
|
155
|
+
getEmails(options?: GetEmailsOptions): Promise<GetEmailsResult>;
|
|
156
|
+
/**
|
|
157
|
+
* Get a specific email by ID
|
|
158
|
+
*/
|
|
159
|
+
getEmail(id: string): Promise<OutlookEmail>;
|
|
160
|
+
/**
|
|
161
|
+
* Send an email via Outlook
|
|
162
|
+
*/
|
|
163
|
+
sendEmail(options: SendEmailOptions): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Create a draft email in Outlook
|
|
166
|
+
*/
|
|
167
|
+
createDraft(options: CreateDraftOptions): Promise<OutlookDraft>;
|
|
168
|
+
/**
|
|
169
|
+
* Reply to an email
|
|
170
|
+
*/
|
|
171
|
+
reply(messageId: string, body: string, bodyType?: 'text' | 'html', replyAll?: boolean): Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* Forward an email
|
|
174
|
+
*/
|
|
175
|
+
forward(messageId: string, to: string | string[] | {
|
|
176
|
+
name?: string;
|
|
177
|
+
address: string;
|
|
178
|
+
}[], comment?: string): Promise<void>;
|
|
179
|
+
/**
|
|
180
|
+
* Mark an email as read
|
|
181
|
+
*/
|
|
182
|
+
markAsRead(id: string): Promise<void>;
|
|
183
|
+
/**
|
|
184
|
+
* Mark an email as unread
|
|
185
|
+
*/
|
|
186
|
+
markAsUnread(id: string): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Move an email to a folder
|
|
189
|
+
*/
|
|
190
|
+
moveToFolder(messageId: string, destinationFolderId: string): Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Delete an email (move to deleted items)
|
|
193
|
+
*/
|
|
194
|
+
delete(id: string): Promise<void>;
|
|
195
|
+
/**
|
|
196
|
+
* List mail folders
|
|
197
|
+
*/
|
|
198
|
+
listFolders(): Promise<{
|
|
199
|
+
id: string;
|
|
200
|
+
displayName: string;
|
|
201
|
+
totalItemCount: number;
|
|
202
|
+
}[]>;
|
|
203
|
+
/**
|
|
204
|
+
* Get calendar events
|
|
205
|
+
*/
|
|
206
|
+
getEvents(options?: GetEventsOptions): Promise<CalendarEvent[]>;
|
|
207
|
+
/**
|
|
208
|
+
* Get a specific calendar event by ID
|
|
209
|
+
*/
|
|
210
|
+
getEvent(id: string): Promise<CalendarEvent>;
|
|
211
|
+
/**
|
|
212
|
+
* Create a calendar event
|
|
213
|
+
*/
|
|
214
|
+
createEvent(options: CreateEventOptions): Promise<CalendarEvent>;
|
|
215
|
+
/**
|
|
216
|
+
* Update a calendar event
|
|
217
|
+
*/
|
|
218
|
+
updateEvent(id: string, updates: Partial<CreateEventOptions>): Promise<CalendarEvent>;
|
|
219
|
+
/**
|
|
220
|
+
* Delete a calendar event
|
|
221
|
+
*/
|
|
222
|
+
deleteEvent(id: string): Promise<void>;
|
|
223
|
+
/**
|
|
224
|
+
* Accept a meeting invitation
|
|
225
|
+
*/
|
|
226
|
+
acceptEvent(id: string, comment?: string, sendResponse?: boolean): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Decline a meeting invitation
|
|
229
|
+
*/
|
|
230
|
+
declineEvent(id: string, comment?: string, sendResponse?: boolean): Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* Tentatively accept a meeting invitation
|
|
233
|
+
*/
|
|
234
|
+
tentativelyAcceptEvent(id: string, comment?: string, sendResponse?: boolean): Promise<void>;
|
|
235
|
+
}
|
|
236
|
+
export declare const OutlookInitializer: SDKInitializer;
|
|
237
|
+
//# sourceMappingURL=outlook.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostgreSQL Integration
|
|
3
|
+
*
|
|
4
|
+
* Popular open-source relational database.
|
|
5
|
+
* API: Using node-postgres (pg) driver
|
|
6
|
+
*/
|
|
7
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
8
|
+
export interface PostgresConfig {
|
|
9
|
+
host: string;
|
|
10
|
+
port?: number;
|
|
11
|
+
database: string;
|
|
12
|
+
user: string;
|
|
13
|
+
password: string;
|
|
14
|
+
ssl?: boolean | {
|
|
15
|
+
rejectUnauthorized?: boolean;
|
|
16
|
+
};
|
|
17
|
+
connectionTimeoutMillis?: number;
|
|
18
|
+
idleTimeoutMillis?: number;
|
|
19
|
+
max?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface QueryResult<T = unknown> {
|
|
22
|
+
rows: T[];
|
|
23
|
+
rowCount: number;
|
|
24
|
+
command: string;
|
|
25
|
+
fields: {
|
|
26
|
+
name: string;
|
|
27
|
+
dataTypeID: number;
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
30
|
+
export interface PostgresTransaction {
|
|
31
|
+
query<T = unknown>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;
|
|
32
|
+
commit(): Promise<void>;
|
|
33
|
+
rollback(): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* PostgreSQL client wrapper for workflow integration
|
|
37
|
+
* Note: This is a lightweight wrapper. The actual pg module will be dynamically imported.
|
|
38
|
+
*/
|
|
39
|
+
export declare class PostgresClient {
|
|
40
|
+
private pool;
|
|
41
|
+
private config;
|
|
42
|
+
constructor(config: PostgresConfig);
|
|
43
|
+
/**
|
|
44
|
+
* Initialize the connection pool
|
|
45
|
+
*/
|
|
46
|
+
connect(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Execute a SQL query
|
|
49
|
+
*/
|
|
50
|
+
query<T = unknown>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;
|
|
51
|
+
/**
|
|
52
|
+
* Select data from a table
|
|
53
|
+
*/
|
|
54
|
+
select<T = Record<string, unknown>>(table: string, options?: {
|
|
55
|
+
columns?: string[];
|
|
56
|
+
where?: Record<string, unknown>;
|
|
57
|
+
orderBy?: string;
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: number;
|
|
60
|
+
}): Promise<T[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Insert data into a table
|
|
63
|
+
*/
|
|
64
|
+
insert<T = Record<string, unknown>>(table: string, data: Record<string, unknown> | Record<string, unknown>[], returning?: string[]): Promise<T[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Update data in a table
|
|
67
|
+
*/
|
|
68
|
+
update<T = Record<string, unknown>>(table: string, data: Record<string, unknown>, where: Record<string, unknown>, returning?: string[]): Promise<T[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Delete data from a table
|
|
71
|
+
*/
|
|
72
|
+
delete<T = Record<string, unknown>>(table: string, where: Record<string, unknown>, returning?: string[]): Promise<T[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Begin a transaction
|
|
75
|
+
*/
|
|
76
|
+
transaction<T>(callback: (trx: PostgresTransaction) => Promise<T>): Promise<T>;
|
|
77
|
+
/**
|
|
78
|
+
* Close the connection pool
|
|
79
|
+
*/
|
|
80
|
+
close(): Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
export declare const PostgresInitializer: SDKInitializer;
|
|
83
|
+
//# sourceMappingURL=postgres.d.ts.map
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Salesforce Integration
|
|
3
|
+
*
|
|
4
|
+
* CRM and sales automation via Salesforce REST API.
|
|
5
|
+
* API Docs: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/
|
|
6
|
+
* SDK: https://jsforce.github.io/
|
|
7
|
+
*/
|
|
8
|
+
import jsforce from 'jsforce';
|
|
9
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
10
|
+
export type SalesforceConnection = jsforce.Connection;
|
|
11
|
+
export interface RecordResult {
|
|
12
|
+
id: string;
|
|
13
|
+
success: boolean;
|
|
14
|
+
errors: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface QueryResult<T> {
|
|
17
|
+
done: boolean;
|
|
18
|
+
totalSize: number;
|
|
19
|
+
records: T[];
|
|
20
|
+
nextRecordsUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SalesforceLead {
|
|
23
|
+
Id?: string;
|
|
24
|
+
FirstName?: string;
|
|
25
|
+
LastName: string;
|
|
26
|
+
Company: string;
|
|
27
|
+
Email?: string;
|
|
28
|
+
Phone?: string;
|
|
29
|
+
Status: string;
|
|
30
|
+
LeadSource?: string;
|
|
31
|
+
Description?: string;
|
|
32
|
+
OwnerId?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface SalesforceAccount {
|
|
35
|
+
Id?: string;
|
|
36
|
+
Name: string;
|
|
37
|
+
Type?: string;
|
|
38
|
+
Industry?: string;
|
|
39
|
+
Website?: string;
|
|
40
|
+
Phone?: string;
|
|
41
|
+
BillingStreet?: string;
|
|
42
|
+
BillingCity?: string;
|
|
43
|
+
BillingState?: string;
|
|
44
|
+
BillingPostalCode?: string;
|
|
45
|
+
BillingCountry?: string;
|
|
46
|
+
Description?: string;
|
|
47
|
+
OwnerId?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface SalesforceContact {
|
|
50
|
+
Id?: string;
|
|
51
|
+
FirstName?: string;
|
|
52
|
+
LastName: string;
|
|
53
|
+
AccountId?: string;
|
|
54
|
+
Email?: string;
|
|
55
|
+
Phone?: string;
|
|
56
|
+
MobilePhone?: string;
|
|
57
|
+
Title?: string;
|
|
58
|
+
Department?: string;
|
|
59
|
+
Description?: string;
|
|
60
|
+
OwnerId?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SalesforceOpportunity {
|
|
63
|
+
Id?: string;
|
|
64
|
+
Name: string;
|
|
65
|
+
AccountId?: string;
|
|
66
|
+
StageName: string;
|
|
67
|
+
Amount?: number;
|
|
68
|
+
CloseDate: string;
|
|
69
|
+
Probability?: number;
|
|
70
|
+
Type?: string;
|
|
71
|
+
LeadSource?: string;
|
|
72
|
+
Description?: string;
|
|
73
|
+
OwnerId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface SalesforceCase {
|
|
76
|
+
Id?: string;
|
|
77
|
+
Subject: string;
|
|
78
|
+
Description?: string;
|
|
79
|
+
Status: string;
|
|
80
|
+
Priority: string;
|
|
81
|
+
Origin?: string;
|
|
82
|
+
Type?: string;
|
|
83
|
+
AccountId?: string;
|
|
84
|
+
ContactId?: string;
|
|
85
|
+
OwnerId?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface CreateRecordOptions {
|
|
88
|
+
sobject: string;
|
|
89
|
+
data: Record<string, unknown>;
|
|
90
|
+
}
|
|
91
|
+
export interface UpdateRecordOptions {
|
|
92
|
+
sobject: string;
|
|
93
|
+
id: string;
|
|
94
|
+
data: Record<string, unknown>;
|
|
95
|
+
}
|
|
96
|
+
export interface QueryOptions {
|
|
97
|
+
query: string;
|
|
98
|
+
useToolingApi?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface SearchOptions {
|
|
101
|
+
search: string;
|
|
102
|
+
}
|
|
103
|
+
export interface DeleteRecordOptions {
|
|
104
|
+
sobject: string;
|
|
105
|
+
id: string;
|
|
106
|
+
}
|
|
107
|
+
export interface DescribeOptions {
|
|
108
|
+
sobject: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Salesforce client for workflow integration
|
|
112
|
+
*/
|
|
113
|
+
export declare class SalesforceClient {
|
|
114
|
+
private conn;
|
|
115
|
+
constructor(conn: jsforce.Connection);
|
|
116
|
+
/**
|
|
117
|
+
* Get connection info
|
|
118
|
+
*/
|
|
119
|
+
getConnectionInfo(): {
|
|
120
|
+
accessToken?: string;
|
|
121
|
+
instanceUrl?: string;
|
|
122
|
+
userId?: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Create a lead
|
|
126
|
+
*/
|
|
127
|
+
createLead(lead: SalesforceLead): Promise<Record<string, unknown>>;
|
|
128
|
+
/**
|
|
129
|
+
* Get a lead by ID
|
|
130
|
+
*/
|
|
131
|
+
getLead(id: string): Promise<SalesforceLead>;
|
|
132
|
+
/**
|
|
133
|
+
* Update a lead
|
|
134
|
+
*/
|
|
135
|
+
updateLead(id: string, data: Partial<SalesforceLead>): Promise<Record<string, unknown>>;
|
|
136
|
+
/**
|
|
137
|
+
* Delete a lead
|
|
138
|
+
*/
|
|
139
|
+
deleteLead(id: string): Promise<Record<string, unknown>>;
|
|
140
|
+
/**
|
|
141
|
+
* Query leads
|
|
142
|
+
*/
|
|
143
|
+
queryLeads(conditions?: string): Promise<QueryResult<SalesforceLead>>;
|
|
144
|
+
/**
|
|
145
|
+
* Create an account
|
|
146
|
+
*/
|
|
147
|
+
createAccount(account: SalesforceAccount): Promise<Record<string, unknown>>;
|
|
148
|
+
/**
|
|
149
|
+
* Get an account by ID
|
|
150
|
+
*/
|
|
151
|
+
getAccount(id: string): Promise<SalesforceAccount>;
|
|
152
|
+
/**
|
|
153
|
+
* Update an account
|
|
154
|
+
*/
|
|
155
|
+
updateAccount(id: string, data: Partial<SalesforceAccount>): Promise<Record<string, unknown>>;
|
|
156
|
+
/**
|
|
157
|
+
* Delete an account
|
|
158
|
+
*/
|
|
159
|
+
deleteAccount(id: string): Promise<Record<string, unknown>>;
|
|
160
|
+
/**
|
|
161
|
+
* Query accounts
|
|
162
|
+
*/
|
|
163
|
+
queryAccounts(conditions?: string): Promise<QueryResult<SalesforceAccount>>;
|
|
164
|
+
/**
|
|
165
|
+
* Create a contact
|
|
166
|
+
*/
|
|
167
|
+
createContact(contact: SalesforceContact): Promise<Record<string, unknown>>;
|
|
168
|
+
/**
|
|
169
|
+
* Get a contact by ID
|
|
170
|
+
*/
|
|
171
|
+
getContact(id: string): Promise<SalesforceContact>;
|
|
172
|
+
/**
|
|
173
|
+
* Update a contact
|
|
174
|
+
*/
|
|
175
|
+
updateContact(id: string, data: Partial<SalesforceContact>): Promise<Record<string, unknown>>;
|
|
176
|
+
/**
|
|
177
|
+
* Delete a contact
|
|
178
|
+
*/
|
|
179
|
+
deleteContact(id: string): Promise<Record<string, unknown>>;
|
|
180
|
+
/**
|
|
181
|
+
* Query contacts
|
|
182
|
+
*/
|
|
183
|
+
queryContacts(conditions?: string): Promise<QueryResult<SalesforceContact>>;
|
|
184
|
+
/**
|
|
185
|
+
* Create an opportunity
|
|
186
|
+
*/
|
|
187
|
+
createOpportunity(opportunity: SalesforceOpportunity): Promise<Record<string, unknown>>;
|
|
188
|
+
/**
|
|
189
|
+
* Get an opportunity by ID
|
|
190
|
+
*/
|
|
191
|
+
getOpportunity(id: string): Promise<SalesforceOpportunity>;
|
|
192
|
+
/**
|
|
193
|
+
* Update an opportunity
|
|
194
|
+
*/
|
|
195
|
+
updateOpportunity(id: string, data: Partial<SalesforceOpportunity>): Promise<Record<string, unknown>>;
|
|
196
|
+
/**
|
|
197
|
+
* Delete an opportunity
|
|
198
|
+
*/
|
|
199
|
+
deleteOpportunity(id: string): Promise<Record<string, unknown>>;
|
|
200
|
+
/**
|
|
201
|
+
* Query opportunities
|
|
202
|
+
*/
|
|
203
|
+
queryOpportunities(conditions?: string): Promise<QueryResult<SalesforceOpportunity>>;
|
|
204
|
+
/**
|
|
205
|
+
* Create a case
|
|
206
|
+
*/
|
|
207
|
+
createCase(caseData: SalesforceCase): Promise<Record<string, unknown>>;
|
|
208
|
+
/**
|
|
209
|
+
* Get a case by ID
|
|
210
|
+
*/
|
|
211
|
+
getCase(id: string): Promise<SalesforceCase>;
|
|
212
|
+
/**
|
|
213
|
+
* Update a case
|
|
214
|
+
*/
|
|
215
|
+
updateCase(id: string, data: Partial<SalesforceCase>): Promise<Record<string, unknown>>;
|
|
216
|
+
/**
|
|
217
|
+
* Delete a case
|
|
218
|
+
*/
|
|
219
|
+
deleteCase(id: string): Promise<Record<string, unknown>>;
|
|
220
|
+
/**
|
|
221
|
+
* Query cases
|
|
222
|
+
*/
|
|
223
|
+
queryCases(conditions?: string): Promise<QueryResult<SalesforceCase>>;
|
|
224
|
+
/**
|
|
225
|
+
* Create a record of any sobject type
|
|
226
|
+
*/
|
|
227
|
+
createRecord(options: CreateRecordOptions): Promise<Record<string, unknown>>;
|
|
228
|
+
/**
|
|
229
|
+
* Get a record by ID
|
|
230
|
+
*/
|
|
231
|
+
getRecord(sobject: string, id: string): Promise<Record<string, unknown>>;
|
|
232
|
+
/**
|
|
233
|
+
* Update a record
|
|
234
|
+
*/
|
|
235
|
+
updateRecord(options: UpdateRecordOptions): Promise<Record<string, unknown>>;
|
|
236
|
+
/**
|
|
237
|
+
* Delete a record
|
|
238
|
+
*/
|
|
239
|
+
deleteRecord(options: DeleteRecordOptions): Promise<Record<string, unknown>>;
|
|
240
|
+
/**
|
|
241
|
+
* Execute SOQL query
|
|
242
|
+
*/
|
|
243
|
+
query<T = Record<string, unknown>>(options: QueryOptions): Promise<QueryResult<T>>;
|
|
244
|
+
/**
|
|
245
|
+
* Execute SOSL search
|
|
246
|
+
*/
|
|
247
|
+
search(options: SearchOptions): Promise<Record<string, unknown>[]>;
|
|
248
|
+
/**
|
|
249
|
+
* Describe an sobject
|
|
250
|
+
*/
|
|
251
|
+
describe(options: DescribeOptions): Promise<Record<string, unknown>>;
|
|
252
|
+
/**
|
|
253
|
+
* Get global describe (all sobjects)
|
|
254
|
+
*/
|
|
255
|
+
describeGlobal(): Promise<Record<string, unknown>>;
|
|
256
|
+
/**
|
|
257
|
+
* Get current user info
|
|
258
|
+
*/
|
|
259
|
+
getUserInfo(): Promise<Record<string, unknown> | undefined>;
|
|
260
|
+
/**
|
|
261
|
+
* Get org limits
|
|
262
|
+
*/
|
|
263
|
+
getLimits(): Promise<Record<string, {
|
|
264
|
+
Max: number;
|
|
265
|
+
Remaining: number;
|
|
266
|
+
}>>;
|
|
267
|
+
}
|
|
268
|
+
export declare const SalesforceInitializer: SDKInitializer;
|
|
269
|
+
//# sourceMappingURL=salesforce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"salesforce.d.ts","sourceRoot":"","sources":["../../src/services/salesforce.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAc,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG9D,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC;AAGtD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACl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