@memberjunction/actions-apollo 6.2.0-edge.2 → 6.2.0-edge.4

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.
Files changed (44) hide show
  1. package/README.md +88 -53
  2. package/dist/__tests__/apollo-enrichment.test.js +339 -233
  3. package/dist/__tests__/apollo-enrichment.test.js.map +1 -1
  4. package/dist/__tests__/apollo-lists.test.js +29 -1
  5. package/dist/__tests__/apollo-lists.test.js.map +1 -1
  6. package/dist/__tests__/apollo-people-client.test.d.ts +2 -0
  7. package/dist/__tests__/apollo-people-client.test.d.ts.map +1 -0
  8. package/dist/__tests__/apollo-people-client.test.js +153 -0
  9. package/dist/__tests__/apollo-people-client.test.js.map +1 -0
  10. package/dist/accounts.d.ts +80 -291
  11. package/dist/accounts.d.ts.map +1 -1
  12. package/dist/accounts.js +391 -782
  13. package/dist/accounts.js.map +1 -1
  14. package/dist/contacts.d.ts +140 -207
  15. package/dist/contacts.d.ts.map +1 -1
  16. package/dist/contacts.js +372 -724
  17. package/dist/contacts.js.map +1 -1
  18. package/dist/generic/apollo-lists.types.d.ts +18 -3
  19. package/dist/generic/apollo-lists.types.d.ts.map +1 -1
  20. package/dist/http/ApolloHttp.d.ts +42 -0
  21. package/dist/http/ApolloHttp.d.ts.map +1 -0
  22. package/dist/http/ApolloHttp.js +117 -0
  23. package/dist/http/ApolloHttp.js.map +1 -0
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +5 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/lists/ApolloRESTClient.d.ts +2 -0
  29. package/dist/lists/ApolloRESTClient.d.ts.map +1 -1
  30. package/dist/lists/ApolloRESTClient.js +33 -52
  31. package/dist/lists/ApolloRESTClient.js.map +1 -1
  32. package/dist/lists/ApolloSearchActions.d.ts +6 -1
  33. package/dist/lists/ApolloSearchActions.d.ts.map +1 -1
  34. package/dist/lists/ApolloSearchActions.js +19 -4
  35. package/dist/lists/ApolloSearchActions.js.map +1 -1
  36. package/dist/people/ApolloPeopleClient.d.ts +114 -0
  37. package/dist/people/ApolloPeopleClient.d.ts.map +1 -0
  38. package/dist/people/ApolloPeopleClient.js +168 -0
  39. package/dist/people/ApolloPeopleClient.js.map +1 -0
  40. package/dist/people/apollo-people.types.d.ts +55 -0
  41. package/dist/people/apollo-people.types.d.ts.map +1 -0
  42. package/dist/people/apollo-people.types.js +8 -0
  43. package/dist/people/apollo-people.types.js.map +1 -0
  44. package/package.json +8 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-people-client.test.js","sourceRoot":"","sources":["../../src/__tests__/apollo-people-client.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9D,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE;KAAQ,EAAE,OAAO,EAAE;QAAQ,OAAO,KAAK,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;KAAE,EAAE,CAAC,CAAC,CAAC;AACvL,EAAE,CAAC,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAEjJ,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,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,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;QACrN,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAC9D,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvD,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpD,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC7C,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,330 +1,119 @@
1
- import { BaseAction } from "@memberjunction/actions";
2
- import { IMetadataProvider, UserInfo } from "@memberjunction/core";
3
- import { HttpRequestConfig, HttpResponse } from '@memberjunction/network-utils';
4
- import { ProcessSingleDomainParams, TechnologyMap } from "./generic/apollo.types.js";
5
- import { ActionResultSimple, RunActionParams } from "@memberjunction/actions-base";
1
+ import { BaseAction } from '@memberjunction/actions';
2
+ import { IMetadataProvider, UserInfo } from '@memberjunction/core';
3
+ import { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
4
+ import { AccountEntityFields, AccountTechnologyEntityFields, ContactEducationHistoryEntityFields, ContactEntityFields, ProcessSingleDomainParams, TechnologyCategoryEntityFields, TechnologyMap } from './generic/apollo.types.js';
5
+ import { IApolloRESTClient } from './generic/apollo-lists.types.js';
6
+ import { ApolloPeopleClient } from './people/ApolloPeopleClient.js';
6
7
  /**
7
- * Action that enriches account records using Apollo.io's organization and people data
8
+ * Configuration parameters for account enrichment action
9
+ * Defines the field mappings and optional entity configurations for enrichment
10
+ */
11
+ interface AccountEnrichmentParams {
12
+ accountEntityFields: AccountEntityFields;
13
+ accountTechnologyEntityFields?: AccountTechnologyEntityFields | null;
14
+ technologyCategoryEntityFields?: TechnologyCategoryEntityFields | null;
15
+ contactEntityFields?: ContactEntityFields | null;
16
+ contactEducationHistoryEntityFields?: ContactEducationHistoryEntityFields | null;
17
+ /** Resolve the Apollo key from this company's credential; null means the environment key. */
18
+ companyID: string | null;
19
+ }
20
+ /** The two Apollo clients one run uses: enrichment (header auth, bulk_match) and prospecting search. */
21
+ export interface ApolloAccountClients {
22
+ People: ApolloPeopleClient;
23
+ Search: IApolloRESTClient;
24
+ }
25
+ /** Everything one run needs, resolved once in InternalRunAction and threaded through. */
26
+ interface AccountRunContext {
27
+ Clients: ApolloAccountClients;
28
+ Md: IMetadataProvider;
29
+ User: UserInfo;
30
+ Params: AccountEnrichmentParams;
31
+ }
32
+ /**
33
+ * Apollo.io Account Enrichment Action
8
34
  *
9
- * This action performs comprehensive account enrichment by:
10
- * 1. Enriching organization data (address, phone, social profiles, etc.)
11
- * 2. Creating technology stack records for the organization
12
- * 3. Finding and enriching contacts associated with the organization
13
- * 4. Creating employment/education history for contacts
35
+ * Enriches account records with organization data (`organizations/enrich`), their technology
36
+ * stack, and the people Apollo lists at the account's domain. People discovery is two steps:
37
+ * `mixed_people/api_search` (free, obfuscated: ids, first names and titles only) and then a paid
38
+ * `people/bulk_match` by id, ten at a time, for emails and profiles. Each matched person costs
39
+ * one Apollo credit; a domain with no people costs nothing.
14
40
  *
15
- * @example
16
- * ```typescript
17
- * // Basic account enrichment
18
- * await runAction({
19
- * ActionName: 'ApolloEnrichmentAccountsAction',
20
- * Params: [{
21
- * Name: 'AccountEntityFieldMappings',
22
- * Value: JSON.stringify({
23
- * EntityName: 'Accounts',
24
- * Filter: 'Domain IS NOT NULL AND EnrichedAt IS NULL',
25
- * DomainField: 'Domain',
26
- * AccountIDField: 'ID',
27
- * EnrichedAtField: 'EnrichedAt'
28
- * })
29
- * }]
30
- * });
41
+ * Params: AccountEntityFieldMappings (required); ContactEntityFieldMappings,
42
+ * AccountTechnologyEntityFieldMappings, TechnologyCategoryEntityFieldMappings,
43
+ * ContactEducationHistoryEntityFieldMappings, CompanyID (optional).
31
44
  *
32
- * // Full enrichment with contacts and technologies
33
- * await runAction({
34
- * ActionName: 'ApolloEnrichmentAccountsAction',
35
- * Params: [{
36
- * Name: 'AccountEntityFieldMappings',
37
- * Value: JSON.stringify(accountConfig)
38
- * }, {
39
- * Name: 'ContactEntityFieldMappings',
40
- * Value: JSON.stringify(contactConfig)
41
- * }, {
42
- * Name: 'AccountTechnologyEntityFieldMappings',
43
- * Value: JSON.stringify(technologyConfig)
44
- * }]
45
- * });
46
- * ```
45
+ * Result codes: SUCCESS, VALIDATION_ERROR, CONFIGURATION_ERROR, RATE_LIMIT_EXCEEDED, FAILED.
47
46
  */
48
47
  export declare class ApolloEnrichmentAccountsAction extends BaseAction {
49
- /**
50
- * Job titles to exclude when creating contact records
51
- * These are typically not decision-makers or relevant contacts
52
- */
48
+ /** Job titles to exclude when creating contact records (not decision-makers). */
53
49
  private readonly excludeTitles;
54
- /**
55
- * Main entry point for the Apollo account enrichment action
56
- *
57
- * @param params - The action parameters containing:
58
- * - AccountEntityFieldMappings: Required JSON configuration for account entity field mappings
59
- * - ContactEntityFieldMappings: Optional JSON configuration for contact entity field mappings
60
- * - AccountTechnologyEntityFieldMappings: Optional JSON configuration for technology tracking
61
- * - TechnologyCategoryEntityFieldMappings: Optional JSON configuration for technology categories
62
- * - ContactEducationHistoryEntityFieldMappings: Optional JSON configuration for education history
63
- *
64
- * @returns Promise<ActionResultSimple> indicating success/failure and any error messages
65
- */
66
50
  protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
67
51
  /**
68
- * Validates that the Apollo.io API key is configured properly
69
- * @returns Validation result with success flag and potential error details
70
- */
71
- private validateConfiguration;
72
- /**
73
- * Extracts and validates all action parameters from the request
74
- *
75
- * @param params - The action parameters containing JSON configurations
76
- * @returns Object with success flag, validated parameters, or error details
52
+ * Resolve the key (company credential first, then `APOLLO_API_KEY`) and build both clients.
53
+ * A protected seam so tests can substitute clients that never reach api.apollo.io.
77
54
  */
55
+ protected CreateClients(companyID: string | null, contextUser: UserInfo): Promise<ApolloAccountClients | null>;
78
56
  private extractAndValidateParameters;
79
- /**
80
- * Gets a required parameter from the action parameters
81
- * @param params - The action parameters
82
- * @param paramName - Name of the required parameter
83
- * @returns The parameter if found, null otherwise
84
- */
85
57
  private getRequiredParam;
86
- /**
87
- * Parses an optional JSON parameter with error handling
88
- * @param params - The action parameters
89
- * @param paramName - Name of the optional JSON parameter
90
- * @returns Parsed object of type T or null if not provided/invalid
91
- */
92
58
  private parseOptionalJSONParam;
93
- /**
94
- * Parses a parameter value that may be a JSON string or already parsed object
95
- * Handles the case where action parameters ending with JSON can be either strings or objects
96
- *
97
- * @param value - The parameter value to parse (string or object)
98
- * @returns Parsed object of type T
99
- * @throws Error if value cannot be parsed as JSON (when it's a string)
100
- */
59
+ /** A parameter value that may be a JSON string or an already-parsed object. */
101
60
  private parseJSONParam;
102
61
  /**
103
- * Recursively processes all account records that match the filter criteria
104
- * Uses batching and concurrency control to handle large datasets efficiently
105
- *
106
- * @param actionParams - Validated action parameters with entity field mappings
107
- * @param contextUser - User context for data access and security
108
- * @param executionCount - Current execution count to prevent infinite recursion (max 5)
109
- * @returns Promise indicating overall success/failure of the batch
62
+ * Processes every account the filter selects, re-running the query until it drains or
63
+ * {@link MAX_EXECUTIONS} passes have run. The filter is expected to exclude stamped rows
64
+ * (every processed account is stamped, matched or not).
110
65
  */
111
66
  private processAllAccountRecords;
112
- /**
113
- * Processes account records in concurrent groups to optimize performance
114
- * Respects the configured concurrency limit to avoid overwhelming APIs
115
- *
116
- * @param results - Array of account records to process
117
- * @param actionParams - Configuration parameters for enrichment
118
- * @param md - Metadata instance for entity operations
119
- * @param contextUser - User context for data access
120
- */
121
- private processAccountGroups;
122
- /**
123
- * Processes a single domain for both organization and people enrichment
124
- * This is the main orchestration method for enriching one account
125
- *
126
- * @param params - Domain processing parameters with entity configurations
127
- * @param startRow - Current row number for progress tracking
128
- * @param totalRows - Total number of rows for progress tracking
129
- * @param md - Metadata instance for entity operations
130
- * @param currentUser - User context for data access
131
- * @returns Promise<boolean> indicating success/failure of domain processing
132
- */
133
- protected ProcessSingleDomain(params: ProcessSingleDomainParams, startRow: number, totalRows: number, md: IMetadataProvider, currentUser: UserInfo): Promise<boolean>;
134
- /**
135
- * Enriches organization data using Apollo.io's organization enrichment endpoint
136
- * Updates account record with company information and triggers technology processing
137
- *
138
- * @param params - Domain processing parameters
139
- * @param startRow - Current row for progress tracking
140
- * @param totalRows - Total rows for progress tracking
141
- * @param md - Metadata instance for entity operations
142
- * @param currentUser - User context for data access
143
- * @returns Promise<boolean> indicating success/failure
144
- */
67
+ /** Enriches one account and, when contacts are configured, the people at its domain. */
68
+ protected ProcessSingleDomain(ctx: AccountRunContext, record: Record<string, unknown>): Promise<boolean>;
69
+ /** `organizations/enrich` for the account's domain; a miss still stamps the account. */
145
70
  private enrichOrganization;
146
- /**
147
- * Updates an account entity with enriched organization data from Apollo.io
148
- * Maps Apollo organization fields to the configured account entity fields
149
- *
150
- * @param organization - Apollo organization data
151
- * @param params - Processing parameters with field mappings
152
- * @param record - Current account record data
153
- * @param md - Metadata instance for entity operations
154
- * @param currentUser - User context for data access
155
- * @returns Promise<boolean> indicating save success/failure
156
- */
71
+ /** Maps Apollo organization fields to the configured account entity fields and stamps the account. */
157
72
  private updateAccountWithOrganizationData;
158
- /**
159
- * Updates the enrichment timestamp on an account even when no data was found
160
- * Prevents repeated attempts to enrich accounts with no Apollo data
161
- *
162
- * @param params - Processing parameters with field mappings
163
- * @param record - Current account record data
164
- * @param md - Metadata instance for entity operations
165
- * @param currentUser - User context for data access
166
- * @returns Promise<boolean> indicating save success/failure
167
- */
73
+ /** Stamps the account's enrichment timestamp when Apollo had nothing, so it is not retried every run. */
168
74
  private updateAccountEnrichedTimestamp;
169
- /**
170
- * Safely sets a field on an entity if the field name is defined and value is not null
171
- * Prevents errors from undefined field mappings
172
- *
173
- * @param entity - Target entity to update
174
- * @param fieldName - Name of the field (can be undefined)
175
- * @param value - Value to set (checked for null/undefined)
176
- */
75
+ /** Sets a field when the mapping names it and the value is present. */
177
76
  private setFieldIfExists;
178
77
  /**
179
- * Creates or updates technology records associated with an account
180
- * Manages the relationship between accounts and their technology stack
181
- * Marks old technologies as ended if no longer detected
182
- *
183
- * @param params - Processing parameters with technology entity configuration
184
- * @param accountID - ID of the account to associate technologies with
185
- * @param technologies - Array of technology data from Apollo
186
- * @param md - Metadata instance for entity operations
187
- * @param currentUser - User context for data access
188
- * @returns Promise<boolean> indicating overall success/failure
78
+ * Creates account-technology rows for technologies Apollo reports and marks the rows for
79
+ * technologies it no longer reports as ended. Every save runs; a failure is counted, never
80
+ * allowed to skip the rows after it.
189
81
  */
190
82
  protected CreateAccountTechnologyRecords(params: ProcessSingleDomainParams, accountID: string | number, technologies: TechnologyMap[], md: IMetadataProvider, currentUser: UserInfo): Promise<boolean>;
191
- /**
192
- * Gets or creates a technology category record by name
193
- * Ensures technology categories exist before creating technology records
194
- *
195
- * @param params - Processing parameters with category entity configuration
196
- * @param categoryName - Name of the technology category
197
- * @param md - Metadata instance for entity operations
198
- * @param currentUser - User context for data access
199
- * @returns Promise<number> - ID of the category (0 if error)
200
- */
83
+ private endUnmatchedTechnologies;
84
+ /** The configured category entity's key for a category name, creating the row when absent. 0 on error. */
201
85
  private getOrCreateTechnologyCategoryId;
202
- /**
203
- * Gets or creates a technology record by name and category
204
- * Maintains referential integrity between technologies and categories
205
- *
206
- * @param name - Name of the technology
207
- * @param categoryId - ID of the technology category
208
- * @param md - Metadata instance for entity operations
209
- * @param currentUser - User context for data access
210
- * @returns Promise<number> - ID of the technology (0 if error)
211
- */
86
+ /** The `Technologies` entity's key for a name within a category, creating the row when absent. 0 on error. */
212
87
  private getOrCreateTechnologyId;
213
88
  /**
214
- * Searches for and enriches people associated with an organization's domain
215
- * Uses Apollo's people search to find contacts at the organization
216
- * Handles pagination to retrieve all available contacts (up to configured limit)
217
- *
218
- * @param params - Processing parameters with contact entity configuration
219
- * @param accountID - ID of the account to associate contacts with
220
- * @param domain - Organization domain to search for people
221
- * @param startRow - Current row for progress tracking
222
- * @param md - Metadata instance for entity operations
223
- * @param currentUser - User context for data access
224
- * @returns Promise<boolean> indicating success/failure of people processing
89
+ * Discovers the people Apollo lists at the domain (free search, ids only), then matches them
90
+ * ten at a time by id (one credit per match) and creates or updates a contact for each.
225
91
  */
226
92
  private createAndEnrichPeople;
227
- /**
228
- * Determines if a person should be skipped during contact creation
229
- * Filters out people with missing data or excluded job titles
230
- *
231
- * @param person - Person data from Apollo search response
232
- * @param domain - Expected domain for email validation
233
- * @returns boolean - true if person should be skipped
234
- */
93
+ /** Apollo ids of the people at the domain, from `api_search`, up to `MaxPeopleToEnrichPerOrg`. */
94
+ private discoverPeopleIDs;
95
+ /** Skips a miss, a person with no last name or email, an email outside the domain, and an excluded title. */
235
96
  private shouldSkipPerson;
236
- /**
237
- * Creates or updates a contact record with enriched data from Apollo
238
- * Handles contact deduplication and data validation
239
- *
240
- * @param params - Processing parameters with contact entity configuration
241
- * @param accountID - ID of the account to associate contact with
242
- * @param person - Person data from Apollo search response
243
- * @param md - Metadata instance for entity operations
244
- * @param currentUser - User context for data access
245
- * @param sequence - Current contact number for progress tracking
246
- * @param total - Total contacts for progress tracking
247
- * @returns Promise<boolean> indicating success/failure
248
- */
97
+ /** Creates or updates one contact and, when configured, its education history. */
249
98
  private createAndEnrichContact;
250
- /**
251
- * Updates contact entity fields with person data from Apollo
252
- * Maps Apollo person fields to the configured contact entity fields
253
- *
254
- * @param contact - Contact entity to update
255
- * @param person - Person data from Apollo
256
- * @param CEntity - Contact entity field name mappings
257
- */
258
99
  private updateContactFields;
259
100
  /**
260
- * Gets an existing contact or creates a new one with conflict detection
261
- * Prevents duplicate contacts across different accounts
262
- * Supports matching by email or name combination
263
- *
264
- * @param params - Processing parameters with contact entity configuration
265
- * @param accountID - ID of the account to associate contact with
266
- * @param person - Person data from Apollo
267
- * @param md - Metadata instance for entity operations
268
- * @param currentUser - User context for data access
269
- * @returns Promise<BaseEntity | null> - Contact entity or null if conflict/error
101
+ * The existing contact for this account (by email, or by first and last name), or a new one.
102
+ * Null when the person is already a contact of a different account, or on a lookup error.
270
103
  */
271
104
  private getOrCreateContact;
272
- /**
273
- * Creates or updates employment and education history records for a contact
274
- * Processes Apollo employment history data to create education records
275
- *
276
- * @param params - Processing parameters with education entity configuration
277
- * @param contactID - ID of the contact to create history for
278
- * @param person - Person data containing employment history
279
- * @param md - Metadata instance for entity operations
280
- * @param currentUser - User context for data access
281
- * @returns Promise<boolean> indicating success/failure
282
- */
283
- private createUpdateContactEmploymentAndEducationHistory;
284
- /**
285
- * Validates if a date string represents a valid date
286
- * Used for employment/education history date validation
287
- *
288
- * @param dateString - Date string to validate
289
- * @returns boolean - true if valid date
290
- */
105
+ /** Writes the match's education entries to the configured education history entity. */
106
+ private createUpdateContactEducationHistory;
107
+ private saveEducationRow;
108
+ /** True when the string parses as a date. */
291
109
  protected IsValidDate(dateString: string): boolean;
292
- /**
293
- * Checks if a job title should be excluded from contact creation
294
- * Filters out non-business contacts like students and volunteers
295
- *
296
- * @param title - Job title to check
297
- * @returns boolean - true if title should be excluded
298
- */
110
+ /** True for titles that are not decision-makers (members, students, volunteers). */
299
111
  protected IsExcludedTitle(title: string): boolean;
300
- /**
301
- * Escapes single quotes in strings for SQL query safety
302
- * Prevents SQL injection in dynamic filter construction
303
- *
304
- * @param str - String to escape
305
- * @returns string - Escaped string with doubled single quotes
306
- */
307
- protected EscapeSingleQuotes(str: string): string;
308
- /**
309
- * Wraps Apollo.io API calls with retry logic for rate limiting
310
- * Handles 429 (Too Many Requests) responses with exponential backoff
311
- *
312
- * @param method - HTTP method ('get' or 'post')
313
- * @param endpoint - Apollo API endpoint path
314
- * @param data - Request payload for POST requests
315
- * @param config - request configuration (headers / query params)
316
- * @param retryAttempts - Number of retry attempts remaining (default: 1)
317
- * @returns Promise<HttpResponse> - Apollo API response
318
- * @throws Error if rate limit exceeded or other API errors
319
- */
320
- protected WrapApolloCall<T = unknown>(method: 'get' | 'post', endpoint: string, data: unknown, config: Omit<HttpRequestConfig, 'Url' | 'Method' | 'Body'>, retryAttempts?: number): Promise<HttpResponse<T>>;
321
- /**
322
- * Utility method for creating delays in async operations
323
- * Used for rate limit backoff and API throttling
324
- *
325
- * @param ms - Number of milliseconds to wait
326
- * @returns Promise that resolves after the specified delay
327
- */
328
- private timeout;
329
112
  }
113
+ /**
114
+ * `[field] <op> <literal>` with the literal quoted per the column's type, so a UUID or string key
115
+ * is quoted and an integer key is not. An unknown column is treated as needing quotes.
116
+ */
117
+ export declare function FieldPredicate(md: IMetadataProvider, entityName: string, fieldName: string, value: unknown, op?: '=' | '<>'): string;
118
+ export {};
330
119
  //# sourceMappingURL=accounts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAc,iBAAiB,EAA0C,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAgC,iBAAiB,EAAE,YAAY,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