1 | import { Connection, Callback } from '../connection';
|
2 |
|
3 | export class SoapApi {
|
4 | constructor(conn: Connection);
|
5 |
|
6 | convertLead(
|
7 | leadConverts: LeadConvert | LeadConvert[],
|
8 | callback?: Callback<LeadConvertResult | LeadConvertResult[]>,
|
9 | ): Promise<LeadConvertResult | LeadConvertResult[]>;
|
10 |
|
11 | describeTabs(callback?: Callback<DescribeTabSetResult[]>): Promise<DescribeTabSetResult[]>;
|
12 |
|
13 | emptyRecycleBin(ids: string[], callback?: Callback<EmptyRecycleBinResult[]>): Promise<EmptyRecycleBinResult[]>;
|
14 |
|
15 | getServerTimestamp(callback?: Callback<ServerTimestampResult>): Promise<ServerTimestampResult>;
|
16 |
|
17 | getUserInfo(callback?: Callback<UserInfoResult>): Promise<UserInfoResult>;
|
18 |
|
19 | merge(
|
20 | mergeRequests: MergeRequest | MergeRequest[],
|
21 | callback?: Callback<MergeResult | MergeResult[]>,
|
22 | ): Promise<MergeResult | MergeResult[]>;
|
23 |
|
24 | setPassword(userId: string, password: string, callback?: Callback<string>): Promise<ResetPasswordResult>;
|
25 |
|
26 | create(sObjects: Object[], callback?: Callback<SoapSaveResult>): Promise<SoapSaveResult>;
|
27 |
|
28 | update(sObjects: Object[], callback?: Callback<SoapSaveResult>): Promise<SoapSaveResult>;
|
29 |
|
30 | upsert(
|
31 | externalIdFieldName: string,
|
32 | sObjects: Object[],
|
33 | callback?: Callback<SoapUpsertResult>,
|
34 | ): Promise<SoapUpsertResult>;
|
35 |
|
36 | delete(ids: Object[], callback?: Callback<SoapDeleteResult>): Promise<SoapDeleteResult>;
|
37 | }
|
38 |
|
39 | export interface SoapDeleteResult {
|
40 | success: boolean;
|
41 | errors: Object[];
|
42 | id: string;
|
43 | }
|
44 |
|
45 | export interface SoapUpsertResult {
|
46 | created: boolean;
|
47 | success: boolean;
|
48 | errors: Object[];
|
49 | id: string;
|
50 | }
|
51 |
|
52 | export interface SoapSaveResult {
|
53 | success: boolean;
|
54 | errors: Object[];
|
55 | id: string;
|
56 | }
|
57 | export interface ResetPasswordResult {
|
58 | password: string;
|
59 | }
|
60 |
|
61 | export interface UserInfoResult {
|
62 | accessibilityMode: boolean;
|
63 | currencySymbol: string;
|
64 | orgAttachmentFileSizeLimit: number;
|
65 | orgDefaultCurrencyIsoCode: string;
|
66 | orgDisallowHtmlAttachments: string;
|
67 | orgHasPersonAccounts: boolean;
|
68 | organizationId: string;
|
69 | organizationMultiCurrency: boolean;
|
70 | organizationName: string;
|
71 | profileId: string;
|
72 | roleId: string;
|
73 | sessionSecondsValid: number;
|
74 | userDefaultCurrencyIsoCode: string;
|
75 | userEmail: string;
|
76 | userFullName: string;
|
77 | userId: string;
|
78 | userLanguage: string;
|
79 | userLocale: string;
|
80 | userName: string;
|
81 | userTimeZone: string;
|
82 | userType: string;
|
83 | userUiSkin: string;
|
84 | }
|
85 |
|
86 | export interface DescribeTabSetResult {
|
87 | label: string;
|
88 | logoUrl: string;
|
89 | namespace: string;
|
90 | selected: boolean;
|
91 | tabs: DescribeTab[];
|
92 | }
|
93 |
|
94 | export interface DescribeTab {
|
95 | colors: Object[];
|
96 | custom: boolean;
|
97 | iconUrl: Object[];
|
98 | icons: Object[];
|
99 | label: string;
|
100 | miniIconUrl: string;
|
101 | name: string;
|
102 | sobjectName: string;
|
103 | url: string;
|
104 | }
|
105 |
|
106 | export interface ServerTimestampResult {
|
107 | timestamp: string;
|
108 | }
|
109 |
|
110 | export interface LeadConvert {
|
111 | convertedStatus: string;
|
112 | leadId: string;
|
113 | accountId?: string | undefined;
|
114 | contactId?: string | undefined;
|
115 | doNotCreateOpportunity?: boolean | undefined;
|
116 | opportunityName?: string | undefined;
|
117 | overwriteLeadSource?: boolean | undefined;
|
118 | ownerId?: string | undefined;
|
119 | sendNotificationEmail?: boolean | undefined;
|
120 | }
|
121 |
|
122 | export interface LeadConvertResult {
|
123 | leadId: string;
|
124 | accountId?: string | undefined;
|
125 |
|
126 | contactId?: string | undefined;
|
127 | opportunityId?: string | undefined;
|
128 | success: boolean;
|
129 | errors: Object[];
|
130 | }
|
131 |
|
132 | export interface MergeRequest {
|
133 | masterRecord: Object;
|
134 | recordToMergeIds: string[];
|
135 | }
|
136 |
|
137 | export interface MergeResult {
|
138 | success: boolean;
|
139 | errors?: Object[] | undefined;
|
140 | id: string;
|
141 | mergedRecordIds?: string[] | undefined;
|
142 | updatedRelatedIds?: string[] | undefined;
|
143 | }
|
144 |
|
145 | export interface EmptyRecycleBinResult {
|
146 | id: string;
|
147 | success: boolean;
|
148 | errors: Object[];
|
149 | }
|