@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,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Sheets Integration
|
|
3
|
+
*
|
|
4
|
+
* Spreadsheet automation platform.
|
|
5
|
+
* API Docs: https://developers.google.com/sheets/api
|
|
6
|
+
*/
|
|
7
|
+
import { sheets_v4 } from 'googleapis';
|
|
8
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
9
|
+
export interface SpreadsheetInfo {
|
|
10
|
+
spreadsheetId: string;
|
|
11
|
+
properties: {
|
|
12
|
+
title: string;
|
|
13
|
+
locale: string;
|
|
14
|
+
autoRecalc: string;
|
|
15
|
+
timeZone: string;
|
|
16
|
+
};
|
|
17
|
+
sheets: SheetInfo[];
|
|
18
|
+
}
|
|
19
|
+
export interface SheetInfo {
|
|
20
|
+
sheetId: number;
|
|
21
|
+
title: string;
|
|
22
|
+
index: number;
|
|
23
|
+
sheetType: string;
|
|
24
|
+
gridProperties: {
|
|
25
|
+
rowCount: number;
|
|
26
|
+
columnCount: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface CellData {
|
|
30
|
+
row: number;
|
|
31
|
+
column: number;
|
|
32
|
+
value: string | number | boolean | null;
|
|
33
|
+
formattedValue?: string;
|
|
34
|
+
formula?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AppendValuesOptions {
|
|
37
|
+
range: string;
|
|
38
|
+
values: unknown[][];
|
|
39
|
+
valueInputOption?: 'RAW' | 'USER_ENTERED';
|
|
40
|
+
insertDataOption?: 'OVERWRITE' | 'INSERT_ROWS';
|
|
41
|
+
}
|
|
42
|
+
export interface UpdateValuesOptions {
|
|
43
|
+
range: string;
|
|
44
|
+
values: unknown[][];
|
|
45
|
+
valueInputOption?: 'RAW' | 'USER_ENTERED';
|
|
46
|
+
}
|
|
47
|
+
export interface BatchUpdateOptions {
|
|
48
|
+
data: {
|
|
49
|
+
range: string;
|
|
50
|
+
values: unknown[][];
|
|
51
|
+
}[];
|
|
52
|
+
valueInputOption?: 'RAW' | 'USER_ENTERED';
|
|
53
|
+
}
|
|
54
|
+
export interface CreateSpreadsheetOptions {
|
|
55
|
+
title: string;
|
|
56
|
+
sheets?: {
|
|
57
|
+
title: string;
|
|
58
|
+
rowCount?: number;
|
|
59
|
+
columnCount?: number;
|
|
60
|
+
}[];
|
|
61
|
+
locale?: string;
|
|
62
|
+
timeZone?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface AddSheetOptions {
|
|
65
|
+
title: string;
|
|
66
|
+
rowCount?: number;
|
|
67
|
+
columnCount?: number;
|
|
68
|
+
index?: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Google Sheets actions for workflow integration
|
|
72
|
+
*/
|
|
73
|
+
export declare class GoogleSheetsActions {
|
|
74
|
+
private sheets;
|
|
75
|
+
constructor(sheets: sheets_v4.Sheets);
|
|
76
|
+
/**
|
|
77
|
+
* Get spreadsheet metadata
|
|
78
|
+
*/
|
|
79
|
+
getSpreadsheet(spreadsheetId: string): Promise<SpreadsheetInfo>;
|
|
80
|
+
/**
|
|
81
|
+
* Get values from a range
|
|
82
|
+
*/
|
|
83
|
+
getValues(spreadsheetId: string, range: string): Promise<unknown[][]>;
|
|
84
|
+
/**
|
|
85
|
+
* Get multiple ranges at once
|
|
86
|
+
*/
|
|
87
|
+
batchGetValues(spreadsheetId: string, ranges: string[]): Promise<{
|
|
88
|
+
range: string;
|
|
89
|
+
values: unknown[][];
|
|
90
|
+
}[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Append values to a sheet
|
|
93
|
+
*/
|
|
94
|
+
appendValues(spreadsheetId: string, options: AppendValuesOptions): Promise<{
|
|
95
|
+
updatedRange: string;
|
|
96
|
+
updatedRows: number;
|
|
97
|
+
updatedColumns: number;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Update values in a range
|
|
101
|
+
*/
|
|
102
|
+
updateValues(spreadsheetId: string, options: UpdateValuesOptions): Promise<{
|
|
103
|
+
updatedRange: string;
|
|
104
|
+
updatedRows: number;
|
|
105
|
+
updatedColumns: number;
|
|
106
|
+
updatedCells: number;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* Update multiple ranges at once
|
|
110
|
+
*/
|
|
111
|
+
batchUpdateValues(spreadsheetId: string, options: BatchUpdateOptions): Promise<{
|
|
112
|
+
totalUpdatedRows: number;
|
|
113
|
+
totalUpdatedColumns: number;
|
|
114
|
+
totalUpdatedCells: number;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* Clear values in a range
|
|
118
|
+
*/
|
|
119
|
+
clearValues(spreadsheetId: string, range: string): Promise<{
|
|
120
|
+
clearedRange: string;
|
|
121
|
+
}>;
|
|
122
|
+
/**
|
|
123
|
+
* Create a new spreadsheet
|
|
124
|
+
*/
|
|
125
|
+
createSpreadsheet(options: CreateSpreadsheetOptions): Promise<SpreadsheetInfo>;
|
|
126
|
+
/**
|
|
127
|
+
* Add a new sheet to an existing spreadsheet
|
|
128
|
+
*/
|
|
129
|
+
addSheet(spreadsheetId: string, options: AddSheetOptions): Promise<SheetInfo>;
|
|
130
|
+
/**
|
|
131
|
+
* Delete a sheet
|
|
132
|
+
*/
|
|
133
|
+
deleteSheet(spreadsheetId: string, sheetId: number): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Duplicate a sheet
|
|
136
|
+
*/
|
|
137
|
+
duplicateSheet(spreadsheetId: string, sourceSheetId: number, newSheetName?: string): Promise<SheetInfo>;
|
|
138
|
+
/**
|
|
139
|
+
* Find and replace text
|
|
140
|
+
*/
|
|
141
|
+
findReplace(spreadsheetId: string, find: string, replacement: string, options?: {
|
|
142
|
+
sheetId?: number;
|
|
143
|
+
allSheets?: boolean;
|
|
144
|
+
matchCase?: boolean;
|
|
145
|
+
matchEntireCell?: boolean;
|
|
146
|
+
searchByRegex?: boolean;
|
|
147
|
+
}): Promise<{
|
|
148
|
+
occurrencesChanged: number;
|
|
149
|
+
valuesChanged: number;
|
|
150
|
+
}>;
|
|
151
|
+
/**
|
|
152
|
+
* Sort a range
|
|
153
|
+
*/
|
|
154
|
+
sortRange(spreadsheetId: string, range: string, sortSpecs: {
|
|
155
|
+
dimensionIndex: number;
|
|
156
|
+
sortOrder: 'ASCENDING' | 'DESCENDING';
|
|
157
|
+
}[]): Promise<void>;
|
|
158
|
+
/**
|
|
159
|
+
* Parse A1 notation into grid range
|
|
160
|
+
* Helper method for internal use
|
|
161
|
+
*/
|
|
162
|
+
private parseA1Notation;
|
|
163
|
+
}
|
|
164
|
+
export declare const GoogleSheetsInitializer: SDKInitializer;
|
|
165
|
+
//# sourceMappingURL=google-sheets.d.ts.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP Integration
|
|
3
|
+
*
|
|
4
|
+
* Generic REST API client for calling any HTTP endpoint.
|
|
5
|
+
* Essential for APIs without dedicated integrations.
|
|
6
|
+
*/
|
|
7
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
8
|
+
export interface HttpRequestOptions {
|
|
9
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
query?: Record<string, string | number | boolean>;
|
|
12
|
+
body?: unknown;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
followRedirects?: boolean;
|
|
15
|
+
validateStatus?: (status: number) => boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface HttpResponse<T = unknown> {
|
|
18
|
+
status: number;
|
|
19
|
+
statusText: string;
|
|
20
|
+
headers: Record<string, string>;
|
|
21
|
+
data: T;
|
|
22
|
+
ok: boolean;
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
export interface HttpClientConfig {
|
|
26
|
+
baseUrl?: string;
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
timeout?: number;
|
|
29
|
+
auth?: {
|
|
30
|
+
type: 'bearer' | 'basic' | 'api-key';
|
|
31
|
+
token?: string;
|
|
32
|
+
username?: string;
|
|
33
|
+
password?: string;
|
|
34
|
+
apiKey?: string;
|
|
35
|
+
apiKeyHeader?: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generic HTTP client for workflow integration
|
|
40
|
+
*/
|
|
41
|
+
export declare class HttpClient {
|
|
42
|
+
private baseUrl;
|
|
43
|
+
private defaultHeaders;
|
|
44
|
+
private defaultTimeout;
|
|
45
|
+
constructor(config?: HttpClientConfig);
|
|
46
|
+
/**
|
|
47
|
+
* Make an HTTP request
|
|
48
|
+
*/
|
|
49
|
+
request<T = unknown>(path: string, options?: HttpRequestOptions): Promise<HttpResponse<T>>;
|
|
50
|
+
/**
|
|
51
|
+
* GET request
|
|
52
|
+
*/
|
|
53
|
+
get<T = unknown>(path: string, options?: Omit<HttpRequestOptions, 'method' | 'body'>): Promise<HttpResponse<T>>;
|
|
54
|
+
/**
|
|
55
|
+
* POST request
|
|
56
|
+
*/
|
|
57
|
+
post<T = unknown>(path: string, body?: unknown, options?: Omit<HttpRequestOptions, 'method' | 'body'>): Promise<HttpResponse<T>>;
|
|
58
|
+
/**
|
|
59
|
+
* PUT request
|
|
60
|
+
*/
|
|
61
|
+
put<T = unknown>(path: string, body?: unknown, options?: Omit<HttpRequestOptions, 'method' | 'body'>): Promise<HttpResponse<T>>;
|
|
62
|
+
/**
|
|
63
|
+
* PATCH request
|
|
64
|
+
*/
|
|
65
|
+
patch<T = unknown>(path: string, body?: unknown, options?: Omit<HttpRequestOptions, 'method' | 'body'>): Promise<HttpResponse<T>>;
|
|
66
|
+
/**
|
|
67
|
+
* DELETE request
|
|
68
|
+
*/
|
|
69
|
+
delete<T = unknown>(path: string, options?: Omit<HttpRequestOptions, 'method'>): Promise<HttpResponse<T>>;
|
|
70
|
+
/**
|
|
71
|
+
* HEAD request
|
|
72
|
+
*/
|
|
73
|
+
head(path: string, options?: Omit<HttpRequestOptions, 'method' | 'body'>): Promise<HttpResponse<undefined>>;
|
|
74
|
+
/**
|
|
75
|
+
* Set a default header
|
|
76
|
+
*/
|
|
77
|
+
setHeader(name: string, value: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Remove a default header
|
|
80
|
+
*/
|
|
81
|
+
removeHeader(name: string): void;
|
|
82
|
+
/**
|
|
83
|
+
* Set bearer token
|
|
84
|
+
*/
|
|
85
|
+
setBearerToken(token: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Set base URL
|
|
88
|
+
*/
|
|
89
|
+
setBaseUrl(url: string): void;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* HTTP error with response details
|
|
93
|
+
*/
|
|
94
|
+
export declare class HttpError extends Error {
|
|
95
|
+
readonly status: number;
|
|
96
|
+
readonly statusText: string;
|
|
97
|
+
readonly headers: Record<string, string>;
|
|
98
|
+
readonly data: unknown;
|
|
99
|
+
readonly url: string;
|
|
100
|
+
constructor(response: HttpResponse);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Convenience function to make a one-off request
|
|
104
|
+
*/
|
|
105
|
+
export declare function httpRequest<T = unknown>(url: string, options?: HttpRequestOptions & {
|
|
106
|
+
headers?: Record<string, string>;
|
|
107
|
+
}): Promise<HttpResponse<T>>;
|
|
108
|
+
/**
|
|
109
|
+
* GraphQL client helper
|
|
110
|
+
*/
|
|
111
|
+
export declare class GraphQLClient {
|
|
112
|
+
private http;
|
|
113
|
+
constructor(endpoint: string, config?: Omit<HttpClientConfig, 'baseUrl'>);
|
|
114
|
+
/**
|
|
115
|
+
* Execute a GraphQL query or mutation
|
|
116
|
+
*/
|
|
117
|
+
query<T = unknown>(query: string, variables?: Record<string, unknown>, operationName?: string): Promise<T>;
|
|
118
|
+
}
|
|
119
|
+
export declare const HttpInitializer: SDKInitializer;
|
|
120
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HubSpot Integration
|
|
3
|
+
*
|
|
4
|
+
* Marketing and CRM platform integration via HubSpot API.
|
|
5
|
+
* API Docs: https://developers.hubspot.com/docs/api/overview
|
|
6
|
+
* SDK: https://github.com/HubSpot/hubspot-api-nodejs
|
|
7
|
+
*/
|
|
8
|
+
import { Client } from '@hubspot/api-client';
|
|
9
|
+
import { SDKInitializer } from '@marktoflow/core';
|
|
10
|
+
export type HubSpotClient = Client;
|
|
11
|
+
export interface HubSpotContact {
|
|
12
|
+
id?: string;
|
|
13
|
+
properties: {
|
|
14
|
+
email?: string;
|
|
15
|
+
firstname?: string;
|
|
16
|
+
lastname?: string;
|
|
17
|
+
phone?: string;
|
|
18
|
+
company?: string;
|
|
19
|
+
website?: string;
|
|
20
|
+
lifecyclestage?: string;
|
|
21
|
+
[key: string]: string | number | boolean | undefined;
|
|
22
|
+
};
|
|
23
|
+
createdAt?: string;
|
|
24
|
+
updatedAt?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface HubSpotCompany {
|
|
27
|
+
id?: string;
|
|
28
|
+
properties: {
|
|
29
|
+
name?: string;
|
|
30
|
+
domain?: string;
|
|
31
|
+
industry?: string;
|
|
32
|
+
phone?: string;
|
|
33
|
+
city?: string;
|
|
34
|
+
state?: string;
|
|
35
|
+
country?: string;
|
|
36
|
+
numberofemployees?: number;
|
|
37
|
+
[key: string]: string | number | boolean | undefined;
|
|
38
|
+
};
|
|
39
|
+
createdAt?: string;
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface HubSpotDeal {
|
|
43
|
+
id?: string;
|
|
44
|
+
properties: {
|
|
45
|
+
dealname?: string;
|
|
46
|
+
amount?: number;
|
|
47
|
+
dealstage?: string;
|
|
48
|
+
pipeline?: string;
|
|
49
|
+
closedate?: string;
|
|
50
|
+
dealtype?: string;
|
|
51
|
+
[key: string]: string | number | boolean | undefined;
|
|
52
|
+
};
|
|
53
|
+
createdAt?: string;
|
|
54
|
+
updatedAt?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface HubSpotTicket {
|
|
57
|
+
id?: string;
|
|
58
|
+
properties: {
|
|
59
|
+
subject?: string;
|
|
60
|
+
content?: string;
|
|
61
|
+
hs_pipeline_stage?: string;
|
|
62
|
+
hs_ticket_priority?: string;
|
|
63
|
+
hs_ticket_category?: string;
|
|
64
|
+
[key: string]: string | number | boolean | undefined;
|
|
65
|
+
};
|
|
66
|
+
createdAt?: string;
|
|
67
|
+
updatedAt?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface SearchOptions {
|
|
70
|
+
filterGroups: Array<{
|
|
71
|
+
filters: Array<{
|
|
72
|
+
propertyName: string;
|
|
73
|
+
operator: string;
|
|
74
|
+
value: string;
|
|
75
|
+
}>;
|
|
76
|
+
}>;
|
|
77
|
+
sorts?: Array<{
|
|
78
|
+
propertyName: string;
|
|
79
|
+
direction: 'ASCENDING' | 'DESCENDING';
|
|
80
|
+
}>;
|
|
81
|
+
properties?: string[];
|
|
82
|
+
limit?: number;
|
|
83
|
+
after?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface BatchReadOptions {
|
|
86
|
+
properties?: string[];
|
|
87
|
+
inputs: Array<{
|
|
88
|
+
id: string;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* HubSpot client wrapper for workflow integration
|
|
93
|
+
*/
|
|
94
|
+
export declare class HubSpotClientWrapper {
|
|
95
|
+
private client;
|
|
96
|
+
constructor(client: Client);
|
|
97
|
+
/**
|
|
98
|
+
* Create a contact
|
|
99
|
+
*/
|
|
100
|
+
createContact(contact: HubSpotContact): Promise<HubSpotContact>;
|
|
101
|
+
/**
|
|
102
|
+
* Get a contact by ID
|
|
103
|
+
*/
|
|
104
|
+
getContact(contactId: string, properties?: string[]): Promise<HubSpotContact>;
|
|
105
|
+
/**
|
|
106
|
+
* Update a contact
|
|
107
|
+
*/
|
|
108
|
+
updateContact(contactId: string, properties: Record<string, unknown>): Promise<HubSpotContact>;
|
|
109
|
+
/**
|
|
110
|
+
* Delete a contact
|
|
111
|
+
*/
|
|
112
|
+
deleteContact(contactId: string): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Search contacts
|
|
115
|
+
*/
|
|
116
|
+
searchContacts(options: SearchOptions): Promise<{
|
|
117
|
+
results: HubSpotContact[];
|
|
118
|
+
total: number;
|
|
119
|
+
paging?: {
|
|
120
|
+
next?: {
|
|
121
|
+
after: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}>;
|
|
125
|
+
/**
|
|
126
|
+
* List contacts
|
|
127
|
+
*/
|
|
128
|
+
listContacts(options?: {
|
|
129
|
+
limit?: number;
|
|
130
|
+
after?: string;
|
|
131
|
+
properties?: string[];
|
|
132
|
+
}): Promise<{
|
|
133
|
+
results: HubSpotContact[];
|
|
134
|
+
paging?: {
|
|
135
|
+
next?: {
|
|
136
|
+
after: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
140
|
+
/**
|
|
141
|
+
* Create a company
|
|
142
|
+
*/
|
|
143
|
+
createCompany(company: HubSpotCompany): Promise<HubSpotCompany>;
|
|
144
|
+
/**
|
|
145
|
+
* Get a company by ID
|
|
146
|
+
*/
|
|
147
|
+
getCompany(companyId: string, properties?: string[]): Promise<HubSpotCompany>;
|
|
148
|
+
/**
|
|
149
|
+
* Update a company
|
|
150
|
+
*/
|
|
151
|
+
updateCompany(companyId: string, properties: Record<string, unknown>): Promise<HubSpotCompany>;
|
|
152
|
+
/**
|
|
153
|
+
* Delete a company
|
|
154
|
+
*/
|
|
155
|
+
deleteCompany(companyId: string): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Search companies
|
|
158
|
+
*/
|
|
159
|
+
searchCompanies(options: SearchOptions): Promise<{
|
|
160
|
+
results: HubSpotCompany[];
|
|
161
|
+
total: number;
|
|
162
|
+
paging?: {
|
|
163
|
+
next?: {
|
|
164
|
+
after: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
}>;
|
|
168
|
+
/**
|
|
169
|
+
* List companies
|
|
170
|
+
*/
|
|
171
|
+
listCompanies(options?: {
|
|
172
|
+
limit?: number;
|
|
173
|
+
after?: string;
|
|
174
|
+
properties?: string[];
|
|
175
|
+
}): Promise<{
|
|
176
|
+
results: HubSpotCompany[];
|
|
177
|
+
paging?: {
|
|
178
|
+
next?: {
|
|
179
|
+
after: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
/**
|
|
184
|
+
* Create a deal
|
|
185
|
+
*/
|
|
186
|
+
createDeal(deal: HubSpotDeal): Promise<HubSpotDeal>;
|
|
187
|
+
/**
|
|
188
|
+
* Get a deal by ID
|
|
189
|
+
*/
|
|
190
|
+
getDeal(dealId: string, properties?: string[]): Promise<HubSpotDeal>;
|
|
191
|
+
/**
|
|
192
|
+
* Update a deal
|
|
193
|
+
*/
|
|
194
|
+
updateDeal(dealId: string, properties: Record<string, unknown>): Promise<HubSpotDeal>;
|
|
195
|
+
/**
|
|
196
|
+
* Delete a deal
|
|
197
|
+
*/
|
|
198
|
+
deleteDeal(dealId: string): Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* Search deals
|
|
201
|
+
*/
|
|
202
|
+
searchDeals(options: SearchOptions): Promise<{
|
|
203
|
+
results: HubSpotDeal[];
|
|
204
|
+
total: number;
|
|
205
|
+
paging?: {
|
|
206
|
+
next?: {
|
|
207
|
+
after: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
}>;
|
|
211
|
+
/**
|
|
212
|
+
* List deals
|
|
213
|
+
*/
|
|
214
|
+
listDeals(options?: {
|
|
215
|
+
limit?: number;
|
|
216
|
+
after?: string;
|
|
217
|
+
properties?: string[];
|
|
218
|
+
}): Promise<{
|
|
219
|
+
results: HubSpotDeal[];
|
|
220
|
+
paging?: {
|
|
221
|
+
next?: {
|
|
222
|
+
after: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
}>;
|
|
226
|
+
/**
|
|
227
|
+
* Create a ticket
|
|
228
|
+
*/
|
|
229
|
+
createTicket(ticket: HubSpotTicket): Promise<HubSpotTicket>;
|
|
230
|
+
/**
|
|
231
|
+
* Get a ticket by ID
|
|
232
|
+
*/
|
|
233
|
+
getTicket(ticketId: string, properties?: string[]): Promise<HubSpotTicket>;
|
|
234
|
+
/**
|
|
235
|
+
* Update a ticket
|
|
236
|
+
*/
|
|
237
|
+
updateTicket(ticketId: string, properties: Record<string, unknown>): Promise<HubSpotTicket>;
|
|
238
|
+
/**
|
|
239
|
+
* Delete a ticket
|
|
240
|
+
*/
|
|
241
|
+
deleteTicket(ticketId: string): Promise<void>;
|
|
242
|
+
/**
|
|
243
|
+
* Search tickets
|
|
244
|
+
*/
|
|
245
|
+
searchTickets(options: SearchOptions): Promise<{
|
|
246
|
+
results: HubSpotTicket[];
|
|
247
|
+
total: number;
|
|
248
|
+
paging?: {
|
|
249
|
+
next?: {
|
|
250
|
+
after: string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
}>;
|
|
254
|
+
/**
|
|
255
|
+
* List tickets
|
|
256
|
+
*/
|
|
257
|
+
listTickets(options?: {
|
|
258
|
+
limit?: number;
|
|
259
|
+
after?: string;
|
|
260
|
+
properties?: string[];
|
|
261
|
+
}): Promise<{
|
|
262
|
+
results: HubSpotTicket[];
|
|
263
|
+
paging?: {
|
|
264
|
+
next?: {
|
|
265
|
+
after: string;
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Associate two records
|
|
271
|
+
*/
|
|
272
|
+
createAssociation(fromObjectType: string, fromObjectId: string, toObjectType: string, toObjectId: string, associationType: string): Promise<void>;
|
|
273
|
+
/**
|
|
274
|
+
* Get associations for a record
|
|
275
|
+
*/
|
|
276
|
+
getAssociations(fromObjectType: string, fromObjectId: string, toObjectType: string): Promise<{
|
|
277
|
+
results: Array<{
|
|
278
|
+
toObjectId: string;
|
|
279
|
+
associationTypes: Array<{
|
|
280
|
+
category: string;
|
|
281
|
+
typeId: number;
|
|
282
|
+
}>;
|
|
283
|
+
}>;
|
|
284
|
+
}>;
|
|
285
|
+
/**
|
|
286
|
+
* Get properties for an object type
|
|
287
|
+
*/
|
|
288
|
+
getProperties(objectType: string): Promise<Array<{
|
|
289
|
+
name: string;
|
|
290
|
+
label: string;
|
|
291
|
+
type: string;
|
|
292
|
+
fieldType: string;
|
|
293
|
+
}>>;
|
|
294
|
+
/**
|
|
295
|
+
* List owners
|
|
296
|
+
*/
|
|
297
|
+
listOwners(options?: {
|
|
298
|
+
limit?: number;
|
|
299
|
+
after?: string;
|
|
300
|
+
}): Promise<{
|
|
301
|
+
results: Array<{
|
|
302
|
+
id: string;
|
|
303
|
+
email: string;
|
|
304
|
+
firstName: string;
|
|
305
|
+
lastName: string;
|
|
306
|
+
}>;
|
|
307
|
+
paging?: {
|
|
308
|
+
next?: {
|
|
309
|
+
after: string;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
}>;
|
|
313
|
+
}
|
|
314
|
+
export declare const HubSpotInitializer: SDKInitializer;
|
|
315
|
+
//# sourceMappingURL=hubspot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubspot.d.ts","sourceRoot":"","sources":["../../src/services/hubspot.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAc,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE;QACV,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;KACtD,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;C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