cf-service-sdk 0.0.1 → 0.0.2
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/sdk.d.ts +45 -43
- package/dist/sdk.js +85 -68
- package/package.json +1 -1
package/dist/sdk.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { CloudForgeClientOptions } from "./client";
|
|
2
|
-
import {
|
|
2
|
+
import { CompanyFilterInput, CompanySortInput, ContactFilterInput, ContactSortInput, CreateCallCampaignLogMutationVariables, CreateCallCampaignMutationVariables, CreateCampaignMutationVariables, CreateCompanyMutationVariables, CreateContactMutationVariables, CreateEmailTemplateMutationVariables, CreateNotificationMutationVariables, CreateSegmentMutationVariables, CreateTaskMutationVariables, FileUploadInput, InvitationResponseInput, InviteUserInput, MicrosoftUserInput, PaginationInput, SaveNylasConnectionMutationVariables, SegmentFilterInput, SignupInput, SubmitFeedbackMutationVariables, TaskFilterInput, UpdateCallCampaignLogMutationVariables, UpdateCallCampaignMutationVariables, UpdateCampaignMutationVariables, UpdateCompanyMutationVariables, UpdateContactMutationVariables, UpdateEmailTemplateMutationVariables, UpdateSegmentMutationVariables, UpdateTaskMutationVariables, UpdateUserProfileMutationVariables, UserTypeInput } from "./generated/graphql";
|
|
3
3
|
export declare class CloudForgeSDK {
|
|
4
4
|
private client;
|
|
5
5
|
private apolloClient;
|
|
6
6
|
constructor(options: CloudForgeClientOptions);
|
|
7
7
|
setToken(token: string): void;
|
|
8
8
|
logout(): void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
executeCustomQuery<T = any>(query: string | any, variables?: Record<string, any>): Promise<import("@apollo/client").ApolloQueryResult<T>>;
|
|
10
|
+
executeCustomMutation<T = any>(mutation: string | any, variables?: Record<string, any>): Promise<import("@apollo/client").FetchResult<T>>;
|
|
11
|
+
acceptInvitation(input: InvitationResponseInput): Promise<import("@apollo/client").FetchResult<any>>;
|
|
12
|
+
addContactsToSegment(contactIds: string[], segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
13
|
+
addSegmentToCallCampaign(campaignId: string, segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
12
14
|
addSegmentToCampaign(campaignId: string, segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
13
15
|
cancelCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
14
|
-
cancelInvitation(
|
|
15
|
-
changePassword(
|
|
16
|
+
cancelInvitation(invitationId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
17
|
+
changePassword(newPassword: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
16
18
|
completeCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
17
19
|
createCallCampaign(input: CreateCallCampaignMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
18
20
|
createCallCampaignLog(input: CreateCallCampaignLogMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
@@ -25,66 +27,66 @@ export declare class CloudForgeSDK {
|
|
|
25
27
|
createTask(input: CreateTaskMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
26
28
|
deleteCallCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
27
29
|
deleteCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
28
|
-
deleteCompany(id
|
|
29
|
-
deleteContact(id
|
|
30
|
+
deleteCompany(id?: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
31
|
+
deleteContact(id?: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
30
32
|
deleteEmailTemplate(uuid: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
31
33
|
deleteNotification(notificationId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
32
34
|
deleteSegment(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
33
|
-
deleteTask(id:
|
|
35
|
+
deleteTask(id: number): Promise<import("@apollo/client").FetchResult<any>>;
|
|
34
36
|
disconnectNylasIntegration(): Promise<import("@apollo/client").FetchResult<any>>;
|
|
35
37
|
forgotPassword(email: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
36
|
-
inviteUser(input:
|
|
38
|
+
inviteUser(input: InviteUserInput): Promise<import("@apollo/client").FetchResult<any>>;
|
|
37
39
|
login(email: string, password: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
38
|
-
loginWithGoogle(token: string, user
|
|
39
|
-
loginWithMicrosoft(accessToken: string, userData
|
|
40
|
+
loginWithGoogle(token: string, user?: UserTypeInput): Promise<import("@apollo/client").FetchResult<any>>;
|
|
41
|
+
loginWithMicrosoft(accessToken: string, userData?: MicrosoftUserInput): Promise<import("@apollo/client").FetchResult<any>>;
|
|
40
42
|
markAllNotificationsAsRead(): Promise<import("@apollo/client").FetchResult<any>>;
|
|
41
|
-
markNotificationAsRead(
|
|
43
|
+
markNotificationAsRead(notificationId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
42
44
|
pauseCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
43
|
-
previewCampaignEmail(
|
|
44
|
-
rejectInvitation(input:
|
|
45
|
-
removeContactsFromSegment(
|
|
46
|
-
removeMember(
|
|
47
|
-
removeSegmentFromCallCampaign(
|
|
45
|
+
previewCampaignEmail(campaignId: string, contactId: string, customSubject?: string, customTemplate?: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
46
|
+
rejectInvitation(input: InvitationResponseInput): Promise<import("@apollo/client").FetchResult<any>>;
|
|
47
|
+
removeContactsFromSegment(contactIds: string[], segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
48
|
+
removeMember(accountId: string, memberId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
49
|
+
removeSegmentFromCallCampaign(campaignId: string, segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
48
50
|
removeSegmentFromCampaign(campaignId: string, segmentId: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
49
51
|
saveNylasConnection(input: SaveNylasConnectionMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
50
|
-
scheduleCampaign(
|
|
51
|
-
sendEmailToContact(
|
|
52
|
-
sendTestEmail(
|
|
52
|
+
scheduleCampaign(id: string, scheduledFor: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
53
|
+
sendEmailToContact(contactId: string, subject: string, template: string, campaignId?: string, segmentId?: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
54
|
+
sendTestEmail(campaignId: string, emailAddress: string, subject: string, template: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
53
55
|
signup(input: SignupInput): Promise<import("@apollo/client").FetchResult<any>>;
|
|
54
56
|
startCampaign(id: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
55
57
|
submitFeedback(input: SubmitFeedbackMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
56
|
-
unsubscribeFromEmails(
|
|
58
|
+
unsubscribeFromEmails(emailHash: string, source: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
57
59
|
updateCallCampaign(id: string, input: UpdateCallCampaignMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
58
|
-
updateCallCampaignLog(input: UpdateCallCampaignLogMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
60
|
+
updateCallCampaignLog(id: string, input: UpdateCallCampaignLogMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
59
61
|
updateCampaign(input: UpdateCampaignMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
60
62
|
updateCompany(input: UpdateCompanyMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
61
63
|
updateContact(input: UpdateContactMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
62
64
|
updateEmailTemplate(input: UpdateEmailTemplateMutationVariables, uuid: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
63
65
|
updateSegment(input: UpdateSegmentMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
64
|
-
updateTask(input: UpdateTaskMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
66
|
+
updateTask(id: number, input: UpdateTaskMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
65
67
|
updateUserProfile(input: UpdateUserProfileMutationVariables): Promise<import("@apollo/client").FetchResult<any>>;
|
|
66
|
-
uploadFile(input:
|
|
67
|
-
validateOtpAndResetPassword(
|
|
68
|
+
uploadFile(input: FileUploadInput): Promise<any>;
|
|
69
|
+
validateOtpAndResetPassword(email: string, newPassword: string, otpCode: string): Promise<import("@apollo/client").FetchResult<any>>;
|
|
68
70
|
accountMembers(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
69
71
|
businessProfile(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
70
72
|
callCampaign(id: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
71
|
-
callCampaignAnalytics(
|
|
73
|
+
callCampaignAnalytics(campaignId?: string, startDate?: string, endDate?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
72
74
|
callCampaignLog(id: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
73
|
-
callCampaignLogs(callCampaignId: string, pagination: PaginationInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
75
|
+
callCampaignLogs(callCampaignId: string, pagination: PaginationInput, search?: string, status?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
74
76
|
callCampaigns(pagination: PaginationInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
75
77
|
campaign(id: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
76
|
-
campaignAnalytics(
|
|
77
|
-
campaignLogs(
|
|
78
|
-
campaignStats(fromDate
|
|
78
|
+
campaignAnalytics(campaignId: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
79
|
+
campaignLogs(campaignId: string, pagination: PaginationInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
80
|
+
campaignStats(fromDate?: string, toDate?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
79
81
|
campaigns(pagination: PaginationInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
80
|
-
companies(filters
|
|
81
|
-
company(id
|
|
82
|
-
contact(id
|
|
82
|
+
companies(filters?: CompanyFilterInput, pagination?: PaginationInput, sort?: CompanySortInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
83
|
+
company(id?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
84
|
+
contact(id?: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
83
85
|
contacts(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
84
|
-
contactsInSegment(segmentId: string, pagination
|
|
86
|
+
contactsInSegment(segmentId: string, pagination?: PaginationInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
85
87
|
currentAccount(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
86
|
-
emailTemplate(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
87
|
-
emailTemplates(campaignType
|
|
88
|
+
emailTemplate(uuid: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
89
|
+
emailTemplates(campaignType?: string, campaignTypes?: string[]): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
88
90
|
employeeSizes(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
89
91
|
industrySectors(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
90
92
|
industryTypes(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
@@ -92,17 +94,17 @@ export declare class CloudForgeSDK {
|
|
|
92
94
|
metalTypes(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
93
95
|
myInvitations(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
94
96
|
notification(id: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
95
|
-
notifications(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
97
|
+
notifications(limit?: number, offset?: number, unreadOnly?: boolean): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
96
98
|
nylasConnection(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
97
99
|
pendingInvitations(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
98
100
|
productCategories(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
99
101
|
productTypes(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
100
|
-
recentNotifications(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
101
|
-
searchContacts(filters
|
|
102
|
+
recentNotifications(limit?: number): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
103
|
+
searchContacts(filters?: ContactFilterInput, pagination?: PaginationInput, sort?: ContactSortInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
102
104
|
segment(id: string): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
103
|
-
segments(pagination
|
|
104
|
-
task(id:
|
|
105
|
-
tasks(filters
|
|
105
|
+
segments(pagination?: PaginationInput, includeSystemTemplates?: boolean, filters?: SegmentFilterInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
106
|
+
task(id: number): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
107
|
+
tasks(filters?: TaskFilterInput): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
106
108
|
unreadNotificationsCount(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
107
109
|
usStates(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
108
110
|
userProfile(): Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
package/dist/sdk.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CloudForgeSDK = void 0;
|
|
4
|
-
const client_1 = require("
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const client_2 = require("./client");
|
|
5
6
|
const mutations_1 = require("./mutations");
|
|
6
7
|
const queries_1 = require("./queries");
|
|
7
8
|
class CloudForgeSDK {
|
|
8
9
|
constructor(options) {
|
|
9
|
-
this.client = new
|
|
10
|
+
this.client = new client_2.CloudForgeClient(options);
|
|
10
11
|
this.apolloClient = this.client.getClient();
|
|
11
12
|
}
|
|
12
13
|
// Authentication
|
|
@@ -18,6 +19,19 @@ class CloudForgeSDK {
|
|
|
18
19
|
this.client.logout();
|
|
19
20
|
this.apolloClient = this.client.getClient();
|
|
20
21
|
}
|
|
22
|
+
// Custom GraphQL execution
|
|
23
|
+
async executeCustomQuery(query, variables) {
|
|
24
|
+
return this.apolloClient.query({
|
|
25
|
+
query: typeof query === 'string' ? (0, client_1.gql) `${query}` : query,
|
|
26
|
+
variables
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async executeCustomMutation(mutation, variables) {
|
|
30
|
+
return this.apolloClient.mutate({
|
|
31
|
+
mutation: typeof mutation === 'string' ? (0, client_1.gql) `${mutation}` : mutation,
|
|
32
|
+
variables
|
|
33
|
+
});
|
|
34
|
+
}
|
|
21
35
|
// Mutations
|
|
22
36
|
async acceptInvitation(input) {
|
|
23
37
|
return this.apolloClient.mutate({
|
|
@@ -25,16 +39,16 @@ class CloudForgeSDK {
|
|
|
25
39
|
variables: { ...input }
|
|
26
40
|
});
|
|
27
41
|
}
|
|
28
|
-
async addContactsToSegment(
|
|
42
|
+
async addContactsToSegment(contactIds, segmentId) {
|
|
29
43
|
return this.apolloClient.mutate({
|
|
30
44
|
mutation: mutations_1.ADD_CONTACTS_TO_SEGMENT,
|
|
31
|
-
variables: {
|
|
45
|
+
variables: { contactIds, segmentId }
|
|
32
46
|
});
|
|
33
47
|
}
|
|
34
|
-
async addSegmentToCallCampaign(
|
|
48
|
+
async addSegmentToCallCampaign(campaignId, segmentId) {
|
|
35
49
|
return this.apolloClient.mutate({
|
|
36
50
|
mutation: mutations_1.ADD_SEGMENT_TO_CALL_CAMPAIGN,
|
|
37
|
-
variables: {
|
|
51
|
+
variables: { campaignId, segmentId }
|
|
38
52
|
});
|
|
39
53
|
}
|
|
40
54
|
async addSegmentToCampaign(campaignId, segmentId) {
|
|
@@ -49,16 +63,16 @@ class CloudForgeSDK {
|
|
|
49
63
|
variables: { id }
|
|
50
64
|
});
|
|
51
65
|
}
|
|
52
|
-
async cancelInvitation(
|
|
66
|
+
async cancelInvitation(invitationId) {
|
|
53
67
|
return this.apolloClient.mutate({
|
|
54
68
|
mutation: mutations_1.CANCEL_INVITATION,
|
|
55
|
-
variables: {
|
|
69
|
+
variables: { invitationId }
|
|
56
70
|
});
|
|
57
71
|
}
|
|
58
|
-
async changePassword(
|
|
72
|
+
async changePassword(newPassword) {
|
|
59
73
|
return this.apolloClient.mutate({
|
|
60
74
|
mutation: mutations_1.CHANGE_PASSWORD,
|
|
61
|
-
variables: {
|
|
75
|
+
variables: { newPassword }
|
|
62
76
|
});
|
|
63
77
|
}
|
|
64
78
|
async completeCampaign(id) {
|
|
@@ -171,7 +185,7 @@ class CloudForgeSDK {
|
|
|
171
185
|
}
|
|
172
186
|
async disconnectNylasIntegration() {
|
|
173
187
|
return this.apolloClient.mutate({
|
|
174
|
-
mutation: mutations_1.DISCONNECT_NYLAS_INTEGRATION
|
|
188
|
+
mutation: mutations_1.DISCONNECT_NYLAS_INTEGRATION
|
|
175
189
|
});
|
|
176
190
|
}
|
|
177
191
|
async forgotPassword(email) {
|
|
@@ -206,13 +220,13 @@ class CloudForgeSDK {
|
|
|
206
220
|
}
|
|
207
221
|
async markAllNotificationsAsRead() {
|
|
208
222
|
return this.apolloClient.mutate({
|
|
209
|
-
mutation: mutations_1.MARK_ALL_NOTIFICATIONS_AS_READ
|
|
223
|
+
mutation: mutations_1.MARK_ALL_NOTIFICATIONS_AS_READ
|
|
210
224
|
});
|
|
211
225
|
}
|
|
212
|
-
async markNotificationAsRead(
|
|
226
|
+
async markNotificationAsRead(notificationId) {
|
|
213
227
|
return this.apolloClient.mutate({
|
|
214
228
|
mutation: mutations_1.MARK_NOTIFICATION_AS_READ,
|
|
215
|
-
variables: {
|
|
229
|
+
variables: { notificationId }
|
|
216
230
|
});
|
|
217
231
|
}
|
|
218
232
|
async pauseCampaign(id) {
|
|
@@ -221,10 +235,10 @@ class CloudForgeSDK {
|
|
|
221
235
|
variables: { id }
|
|
222
236
|
});
|
|
223
237
|
}
|
|
224
|
-
async previewCampaignEmail(
|
|
238
|
+
async previewCampaignEmail(campaignId, contactId, customSubject, customTemplate) {
|
|
225
239
|
return this.apolloClient.mutate({
|
|
226
240
|
mutation: mutations_1.PREVIEW_CAMPAIGN_EMAIL,
|
|
227
|
-
variables: {
|
|
241
|
+
variables: { campaignId, contactId, customSubject, customTemplate }
|
|
228
242
|
});
|
|
229
243
|
}
|
|
230
244
|
async rejectInvitation(input) {
|
|
@@ -233,22 +247,22 @@ class CloudForgeSDK {
|
|
|
233
247
|
variables: { ...input }
|
|
234
248
|
});
|
|
235
249
|
}
|
|
236
|
-
async removeContactsFromSegment(
|
|
250
|
+
async removeContactsFromSegment(contactIds, segmentId) {
|
|
237
251
|
return this.apolloClient.mutate({
|
|
238
252
|
mutation: mutations_1.REMOVE_CONTACTS_FROM_SEGMENT,
|
|
239
|
-
variables: {
|
|
253
|
+
variables: { contactIds, segmentId }
|
|
240
254
|
});
|
|
241
255
|
}
|
|
242
|
-
async removeMember(
|
|
256
|
+
async removeMember(accountId, memberId) {
|
|
243
257
|
return this.apolloClient.mutate({
|
|
244
258
|
mutation: mutations_1.REMOVE_MEMBER,
|
|
245
|
-
variables: {
|
|
259
|
+
variables: { accountId, memberId }
|
|
246
260
|
});
|
|
247
261
|
}
|
|
248
|
-
async removeSegmentFromCallCampaign(
|
|
262
|
+
async removeSegmentFromCallCampaign(campaignId, segmentId) {
|
|
249
263
|
return this.apolloClient.mutate({
|
|
250
264
|
mutation: mutations_1.REMOVE_SEGMENT_FROM_CALL_CAMPAIGN,
|
|
251
|
-
variables: {
|
|
265
|
+
variables: { campaignId, segmentId }
|
|
252
266
|
});
|
|
253
267
|
}
|
|
254
268
|
async removeSegmentFromCampaign(campaignId, segmentId) {
|
|
@@ -263,22 +277,22 @@ class CloudForgeSDK {
|
|
|
263
277
|
variables: { ...input }
|
|
264
278
|
});
|
|
265
279
|
}
|
|
266
|
-
async scheduleCampaign(
|
|
280
|
+
async scheduleCampaign(id, scheduledFor) {
|
|
267
281
|
return this.apolloClient.mutate({
|
|
268
282
|
mutation: mutations_1.SCHEDULE_CAMPAIGN,
|
|
269
|
-
variables: {
|
|
283
|
+
variables: { id, scheduledFor }
|
|
270
284
|
});
|
|
271
285
|
}
|
|
272
|
-
async sendEmailToContact(
|
|
286
|
+
async sendEmailToContact(contactId, subject, template, campaignId, segmentId) {
|
|
273
287
|
return this.apolloClient.mutate({
|
|
274
288
|
mutation: mutations_1.SEND_EMAIL_TO_CONTACT,
|
|
275
|
-
variables: {
|
|
289
|
+
variables: { contactId, subject, template, campaignId, segmentId }
|
|
276
290
|
});
|
|
277
291
|
}
|
|
278
|
-
async sendTestEmail(
|
|
292
|
+
async sendTestEmail(campaignId, emailAddress, subject, template) {
|
|
279
293
|
return this.apolloClient.mutate({
|
|
280
294
|
mutation: mutations_1.SEND_TEST_EMAIL,
|
|
281
|
-
variables: {
|
|
295
|
+
variables: { campaignId, emailAddress, subject, template }
|
|
282
296
|
});
|
|
283
297
|
}
|
|
284
298
|
async signup(input) {
|
|
@@ -299,22 +313,22 @@ class CloudForgeSDK {
|
|
|
299
313
|
variables: { ...input }
|
|
300
314
|
});
|
|
301
315
|
}
|
|
302
|
-
async unsubscribeFromEmails(
|
|
316
|
+
async unsubscribeFromEmails(emailHash, source) {
|
|
303
317
|
return this.apolloClient.mutate({
|
|
304
318
|
mutation: mutations_1.UNSUBSCRIBE_FROM_EMAILS,
|
|
305
|
-
variables: {
|
|
319
|
+
variables: { emailHash, source }
|
|
306
320
|
});
|
|
307
321
|
}
|
|
308
322
|
async updateCallCampaign(id, input) {
|
|
309
323
|
return this.apolloClient.mutate({
|
|
310
324
|
mutation: mutations_1.UPDATE_CALL_CAMPAIGN,
|
|
311
|
-
variables: {
|
|
325
|
+
variables: { id, input }
|
|
312
326
|
});
|
|
313
327
|
}
|
|
314
|
-
async updateCallCampaignLog(input) {
|
|
328
|
+
async updateCallCampaignLog(id, input) {
|
|
315
329
|
return this.apolloClient.mutate({
|
|
316
330
|
mutation: mutations_1.UPDATE_CALL_CAMPAIGN_LOG,
|
|
317
|
-
variables: {
|
|
331
|
+
variables: { id, input }
|
|
318
332
|
});
|
|
319
333
|
}
|
|
320
334
|
async updateCampaign(input) {
|
|
@@ -338,7 +352,7 @@ class CloudForgeSDK {
|
|
|
338
352
|
async updateEmailTemplate(input, uuid) {
|
|
339
353
|
return this.apolloClient.mutate({
|
|
340
354
|
mutation: mutations_1.UPDATE_EMAIL_TEMPLATE,
|
|
341
|
-
variables: {
|
|
355
|
+
variables: { input, uuid }
|
|
342
356
|
});
|
|
343
357
|
}
|
|
344
358
|
async updateSegment(input) {
|
|
@@ -347,10 +361,10 @@ class CloudForgeSDK {
|
|
|
347
361
|
variables: { ...input }
|
|
348
362
|
});
|
|
349
363
|
}
|
|
350
|
-
async updateTask(input) {
|
|
364
|
+
async updateTask(id, input) {
|
|
351
365
|
return this.apolloClient.mutate({
|
|
352
366
|
mutation: mutations_1.UPDATE_TASK,
|
|
353
|
-
variables: {
|
|
367
|
+
variables: { id, input }
|
|
354
368
|
});
|
|
355
369
|
}
|
|
356
370
|
async updateUserProfile(input) {
|
|
@@ -367,21 +381,21 @@ class CloudForgeSDK {
|
|
|
367
381
|
});
|
|
368
382
|
return (_a = result.data) === null || _a === void 0 ? void 0 : _a.uploadFile;
|
|
369
383
|
}
|
|
370
|
-
async validateOtpAndResetPassword(
|
|
384
|
+
async validateOtpAndResetPassword(email, newPassword, otpCode) {
|
|
371
385
|
return this.apolloClient.mutate({
|
|
372
386
|
mutation: mutations_1.VALIDATE_OTP_AND_RESET_PASSWORD,
|
|
373
|
-
variables: {
|
|
387
|
+
variables: { email, newPassword, otpCode }
|
|
374
388
|
});
|
|
375
389
|
}
|
|
376
390
|
// Queries
|
|
377
391
|
async accountMembers() {
|
|
378
392
|
return this.apolloClient.query({
|
|
379
|
-
query: queries_1.ACCOUNT_MEMBERS
|
|
393
|
+
query: queries_1.ACCOUNT_MEMBERS
|
|
380
394
|
});
|
|
381
395
|
}
|
|
382
396
|
async businessProfile() {
|
|
383
397
|
return this.apolloClient.query({
|
|
384
|
-
query: queries_1.BUSINESS_PROFILE
|
|
398
|
+
query: queries_1.BUSINESS_PROFILE
|
|
385
399
|
});
|
|
386
400
|
}
|
|
387
401
|
async callCampaign(id) {
|
|
@@ -390,10 +404,10 @@ class CloudForgeSDK {
|
|
|
390
404
|
variables: { id }
|
|
391
405
|
});
|
|
392
406
|
}
|
|
393
|
-
async callCampaignAnalytics(
|
|
407
|
+
async callCampaignAnalytics(campaignId, startDate, endDate) {
|
|
394
408
|
return this.apolloClient.query({
|
|
395
409
|
query: queries_1.CALL_CAMPAIGN_ANALYTICS,
|
|
396
|
-
variables: {
|
|
410
|
+
variables: { campaignId, startDate, endDate }
|
|
397
411
|
});
|
|
398
412
|
}
|
|
399
413
|
async callCampaignLog(id) {
|
|
@@ -402,10 +416,10 @@ class CloudForgeSDK {
|
|
|
402
416
|
variables: { id }
|
|
403
417
|
});
|
|
404
418
|
}
|
|
405
|
-
async callCampaignLogs(callCampaignId, pagination) {
|
|
419
|
+
async callCampaignLogs(callCampaignId, pagination, search, status) {
|
|
406
420
|
return this.apolloClient.query({
|
|
407
421
|
query: queries_1.CALL_CAMPAIGN_LOGS,
|
|
408
|
-
variables: { callCampaignId, pagination }
|
|
422
|
+
variables: { callCampaignId, pagination, search, status }
|
|
409
423
|
});
|
|
410
424
|
}
|
|
411
425
|
async callCampaigns(pagination) {
|
|
@@ -420,16 +434,16 @@ class CloudForgeSDK {
|
|
|
420
434
|
variables: { id }
|
|
421
435
|
});
|
|
422
436
|
}
|
|
423
|
-
async campaignAnalytics(
|
|
437
|
+
async campaignAnalytics(campaignId) {
|
|
424
438
|
return this.apolloClient.query({
|
|
425
439
|
query: queries_1.CAMPAIGN_ANALYTICS,
|
|
426
|
-
variables: {
|
|
440
|
+
variables: { campaignId }
|
|
427
441
|
});
|
|
428
442
|
}
|
|
429
|
-
async campaignLogs(
|
|
443
|
+
async campaignLogs(campaignId, pagination) {
|
|
430
444
|
return this.apolloClient.query({
|
|
431
445
|
query: queries_1.CAMPAIGN_LOGS,
|
|
432
|
-
variables: {
|
|
446
|
+
variables: { campaignId, pagination }
|
|
433
447
|
});
|
|
434
448
|
}
|
|
435
449
|
async campaignStats(fromDate, toDate) {
|
|
@@ -464,7 +478,7 @@ class CloudForgeSDK {
|
|
|
464
478
|
}
|
|
465
479
|
async contacts() {
|
|
466
480
|
return this.apolloClient.query({
|
|
467
|
-
query: queries_1.CONTACTS
|
|
481
|
+
query: queries_1.CONTACTS
|
|
468
482
|
});
|
|
469
483
|
}
|
|
470
484
|
async contactsInSegment(segmentId, pagination) {
|
|
@@ -475,12 +489,13 @@ class CloudForgeSDK {
|
|
|
475
489
|
}
|
|
476
490
|
async currentAccount() {
|
|
477
491
|
return this.apolloClient.query({
|
|
478
|
-
query: queries_1.CURRENT_ACCOUNT
|
|
492
|
+
query: queries_1.CURRENT_ACCOUNT
|
|
479
493
|
});
|
|
480
494
|
}
|
|
481
|
-
async emailTemplate() {
|
|
495
|
+
async emailTemplate(uuid) {
|
|
482
496
|
return this.apolloClient.query({
|
|
483
497
|
query: queries_1.EMAIL_TEMPLATE,
|
|
498
|
+
variables: { uuid }
|
|
484
499
|
});
|
|
485
500
|
}
|
|
486
501
|
async emailTemplates(campaignType, campaignTypes) {
|
|
@@ -491,32 +506,32 @@ class CloudForgeSDK {
|
|
|
491
506
|
}
|
|
492
507
|
async employeeSizes() {
|
|
493
508
|
return this.apolloClient.query({
|
|
494
|
-
query: queries_1.EMPLOYEE_SIZES
|
|
509
|
+
query: queries_1.EMPLOYEE_SIZES
|
|
495
510
|
});
|
|
496
511
|
}
|
|
497
512
|
async industrySectors() {
|
|
498
513
|
return this.apolloClient.query({
|
|
499
|
-
query: queries_1.INDUSTRY_SECTORS
|
|
514
|
+
query: queries_1.INDUSTRY_SECTORS
|
|
500
515
|
});
|
|
501
516
|
}
|
|
502
517
|
async industryTypes() {
|
|
503
518
|
return this.apolloClient.query({
|
|
504
|
-
query: queries_1.INDUSTRY_TYPES
|
|
519
|
+
query: queries_1.INDUSTRY_TYPES
|
|
505
520
|
});
|
|
506
521
|
}
|
|
507
522
|
async metalGrades() {
|
|
508
523
|
return this.apolloClient.query({
|
|
509
|
-
query: queries_1.METAL_GRADES
|
|
524
|
+
query: queries_1.METAL_GRADES
|
|
510
525
|
});
|
|
511
526
|
}
|
|
512
527
|
async metalTypes() {
|
|
513
528
|
return this.apolloClient.query({
|
|
514
|
-
query: queries_1.METAL_TYPES
|
|
529
|
+
query: queries_1.METAL_TYPES
|
|
515
530
|
});
|
|
516
531
|
}
|
|
517
532
|
async myInvitations() {
|
|
518
533
|
return this.apolloClient.query({
|
|
519
|
-
query: queries_1.MY_INVITATIONS
|
|
534
|
+
query: queries_1.MY_INVITATIONS
|
|
520
535
|
});
|
|
521
536
|
}
|
|
522
537
|
async notification(id) {
|
|
@@ -525,34 +540,36 @@ class CloudForgeSDK {
|
|
|
525
540
|
variables: { id }
|
|
526
541
|
});
|
|
527
542
|
}
|
|
528
|
-
async notifications() {
|
|
543
|
+
async notifications(limit, offset, unreadOnly) {
|
|
529
544
|
return this.apolloClient.query({
|
|
530
545
|
query: queries_1.NOTIFICATIONS,
|
|
546
|
+
variables: { limit, offset, unreadOnly }
|
|
531
547
|
});
|
|
532
548
|
}
|
|
533
549
|
async nylasConnection() {
|
|
534
550
|
return this.apolloClient.query({
|
|
535
|
-
query: queries_1.NYLAS_CONNECTION
|
|
551
|
+
query: queries_1.NYLAS_CONNECTION
|
|
536
552
|
});
|
|
537
553
|
}
|
|
538
554
|
async pendingInvitations() {
|
|
539
555
|
return this.apolloClient.query({
|
|
540
|
-
query: queries_1.PENDING_INVITATIONS
|
|
556
|
+
query: queries_1.PENDING_INVITATIONS
|
|
541
557
|
});
|
|
542
558
|
}
|
|
543
559
|
async productCategories() {
|
|
544
560
|
return this.apolloClient.query({
|
|
545
|
-
query: queries_1.PRODUCT_CATEGORIES
|
|
561
|
+
query: queries_1.PRODUCT_CATEGORIES
|
|
546
562
|
});
|
|
547
563
|
}
|
|
548
564
|
async productTypes() {
|
|
549
565
|
return this.apolloClient.query({
|
|
550
|
-
query: queries_1.PRODUCT_TYPES
|
|
566
|
+
query: queries_1.PRODUCT_TYPES
|
|
551
567
|
});
|
|
552
568
|
}
|
|
553
|
-
async recentNotifications() {
|
|
569
|
+
async recentNotifications(limit) {
|
|
554
570
|
return this.apolloClient.query({
|
|
555
571
|
query: queries_1.RECENT_NOTIFICATIONS,
|
|
572
|
+
variables: { limit }
|
|
556
573
|
});
|
|
557
574
|
}
|
|
558
575
|
async searchContacts(filters, pagination, sort) {
|
|
@@ -567,10 +584,10 @@ class CloudForgeSDK {
|
|
|
567
584
|
variables: { id }
|
|
568
585
|
});
|
|
569
586
|
}
|
|
570
|
-
async segments(pagination,
|
|
587
|
+
async segments(pagination, includeSystemTemplates, filters) {
|
|
571
588
|
return this.apolloClient.query({
|
|
572
589
|
query: queries_1.SEGMENTS,
|
|
573
|
-
variables: { pagination,
|
|
590
|
+
variables: { pagination, includeSystemTemplates, filters }
|
|
574
591
|
});
|
|
575
592
|
}
|
|
576
593
|
async task(id) {
|
|
@@ -587,17 +604,17 @@ class CloudForgeSDK {
|
|
|
587
604
|
}
|
|
588
605
|
async unreadNotificationsCount() {
|
|
589
606
|
return this.apolloClient.query({
|
|
590
|
-
query: queries_1.UNREAD_NOTIFICATIONS_COUNT
|
|
607
|
+
query: queries_1.UNREAD_NOTIFICATIONS_COUNT
|
|
591
608
|
});
|
|
592
609
|
}
|
|
593
610
|
async usStates() {
|
|
594
611
|
return this.apolloClient.query({
|
|
595
|
-
query: queries_1.US_STATES
|
|
612
|
+
query: queries_1.US_STATES
|
|
596
613
|
});
|
|
597
614
|
}
|
|
598
615
|
async userProfile() {
|
|
599
616
|
return this.apolloClient.query({
|
|
600
|
-
query: queries_1.USER_PROFILE
|
|
617
|
+
query: queries_1.USER_PROFILE
|
|
601
618
|
});
|
|
602
619
|
}
|
|
603
620
|
}
|