@ever-works/pipedrive-connector-plugin 1.0.0

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/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @ever-works/pipedrive-connector-plugin
2
+
3
+ First-party **Pipedrive CRM connector** for the Ever Works platform, built on
4
+ the official [`pipedrive`](https://www.npmjs.com/package/pipedrive) Node SDK.
5
+
6
+ Capabilities: `connector`, `connector-pipedrive`, `event-source`.
7
+
8
+ ## What it does
9
+
10
+ - **Outbound message** — `send()` appends a note to a deal (default), person or
11
+ organization (`targetConfig.recordId` + `recordType`, or
12
+ `settings.defaultDealId`), idempotent on `messageRef`.
13
+ - **Outbound record** — `createRecord()` writes a deal / person / organization,
14
+ idempotent on `idempotencyKey`.
15
+ - **Event source** — `pullEvents()` sweeps each configured entity type in turn
16
+ through Pipedrive's own `/recents` endpoint (its native "everything that
17
+ changed since this timestamp" API), normalized into `IngestedEventEnvelope`s
18
+ (`pipedrive.deal` / `pipedrive.person` / `pipedrive.organization`) for the
19
+ event-ingest spine. With a `companyDomain` configured each envelope carries a
20
+ record deep link as `sourceUrl`.
21
+ - **Opt-in historical backfill** — `backfillDays` (default `0` = off, max 90)
22
+ widens the FIRST pull's window only, bounded to
23
+ `PIPEDRIVE_BACKFILL_MAX_PAGES` pages per entity type.
24
+
25
+ ## Degradation is loud, never silent
26
+
27
+ - `verifyConnection()` reports the missing `apiToken` and surfaces the
28
+ Pipedrive error payload when the probe fails.
29
+ - `send()` / `createRecord()` throw on a missing token, a missing record id, or
30
+ an unsupported collection.
31
+ - `pullEvents()` throws `EventSourceNotConfiguredError`.
32
+
33
+ ## Settings
34
+
35
+ | Key | Notes |
36
+ | --------------- | ---------------------------------------------------------------------- |
37
+ | `apiToken` | API token — secret, env `PIPEDRIVE_API_TOKEN`. |
38
+ | `entityTypes` | Comma-separated sweep list (deals, persons, organizations by default). |
39
+ | `companyDomain` | `acme` for `acme.pipedrive.com` — enables record deep links. |
40
+ | `backfillDays` | Opt-in first-pull history window (0 = off, max 90). |
41
+ | `defaultDealId` | Default deal outbound notes attach to. |
42
+
43
+ Envelope payloads carry a per-entity field whitelist only — custom fields and
44
+ nested expansions never ride along, and no credential is hardcoded, logged, or
45
+ written into an envelope.
46
+
47
+ ## Testing
48
+
49
+ Hermetic Vitest suite (`pnpm test`) — the SDK client is stubbed through the
50
+ `createClient` seam; no network calls.
package/dist/index.cjs ADDED
@@ -0,0 +1,488 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var crypto = require('crypto');
6
+ var v1 = require('pipedrive/v1');
7
+ var v2 = require('pipedrive/v2');
8
+ require('@ever-works/contracts');
9
+
10
+ // src/pipedrive-connector-plugin.ts
11
+ var EventSourceNotConfiguredError = class extends Error {
12
+ constructor(message) {
13
+ super(message ?? "Event-source plugin is not configured in this runtime.");
14
+ this.name = "EventSourceNotConfiguredError";
15
+ }
16
+ };
17
+ var PLUGIN_CAPABILITIES = {
18
+ // Connectors ("Connector fabric") — first-party BIDIRECTIONAL
19
+ // communication-channel plugins. Each connector declares `CONNECTOR`
20
+ // (umbrella, for discovery/grouping) plus its `CONNECTOR_<provider>`
21
+ // constant. Superset of the outbound-only notification channels; see
22
+ // `capabilities/connector.interface.ts`.
23
+ CONNECTOR: "connector",
24
+ CONNECTOR_PIPEDRIVE: "connector-pipedrive",
25
+ // Event-ingest spine (Wave 6) — plugins that pull/push normalized
26
+ // external events into the platform ingest pipeline. See
27
+ // capabilities/event-source.interface.ts.
28
+ EVENT_SOURCE: "event-source"};
29
+
30
+ // src/pipedrive-connector-plugin.ts
31
+ var PIPEDRIVE_EVENT_TEXT_MAX_CHARS = 4e3;
32
+ var PIPEDRIVE_PULL_PAGE_SIZE = 50;
33
+ var PIPEDRIVE_BACKFILL_MAX_PAGES = 10;
34
+ var PIPEDRIVE_ENTITY_TYPES = ["deals", "persons", "organizations"];
35
+ var PIPEDRIVE_ENTITY_META = {
36
+ deals: {
37
+ kind: "pipedrive.deal",
38
+ recentsItem: "deal",
39
+ urlSegment: "deal",
40
+ titleField: "title",
41
+ noteField: "deal_id",
42
+ payloadFields: ["title", "status", "stage_id", "pipeline_id", "value", "currency", "add_time", "update_time"]
43
+ },
44
+ persons: {
45
+ kind: "pipedrive.person",
46
+ recentsItem: "person",
47
+ urlSegment: "person",
48
+ titleField: "name",
49
+ noteField: "person_id",
50
+ payloadFields: ["name", "org_id", "owner_id", "add_time", "update_time"]
51
+ },
52
+ organizations: {
53
+ kind: "pipedrive.organization",
54
+ recentsItem: "organization",
55
+ urlSegment: "organization",
56
+ titleField: "name",
57
+ noteField: "org_id",
58
+ payloadFields: ["name", "address", "owner_id", "people_count", "add_time", "update_time"]
59
+ }
60
+ };
61
+ function clampBackfillDays(value) {
62
+ const num = typeof value === "number" ? value : Number(value);
63
+ if (!Number.isFinite(num) || num <= 0) return 0;
64
+ return Math.min(Math.floor(num), 90);
65
+ }
66
+ function truncateText(text) {
67
+ return text.length > PIPEDRIVE_EVENT_TEXT_MAX_CHARS ? text.slice(0, PIPEDRIVE_EVENT_TEXT_MAX_CHARS) : text;
68
+ }
69
+ function resolveEntityTypes(settings) {
70
+ const raw = settings?.entityTypes;
71
+ if (typeof raw !== "string" || raw.trim().length === 0) return [...PIPEDRIVE_ENTITY_TYPES];
72
+ const requested = raw.split(/[\s,]+/).map((t) => t.trim().toLowerCase()).filter((t) => PIPEDRIVE_ENTITY_TYPES.includes(t));
73
+ return requested.length > 0 ? [...PIPEDRIVE_ENTITY_TYPES].filter((t) => requested.includes(t)) : [...PIPEDRIVE_ENTITY_TYPES];
74
+ }
75
+ function pipedriveTimeToIso(value) {
76
+ if (value instanceof Date) return value.toISOString();
77
+ if (typeof value === "string" && value.trim().length > 0) {
78
+ const raw = value.trim();
79
+ const normalized = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(raw) ? `${raw.replace(" ", "T")}Z` : raw;
80
+ const ms = Date.parse(normalized);
81
+ if (Number.isFinite(ms)) return new Date(ms).toISOString();
82
+ }
83
+ return (/* @__PURE__ */ new Date(0)).toISOString();
84
+ }
85
+ function isoToPipedriveTime(iso) {
86
+ const ms = Date.parse(iso);
87
+ const date = new Date(Number.isFinite(ms) ? ms : 0);
88
+ return date.toISOString().replace("T", " ").slice(0, 19);
89
+ }
90
+ function pipedriveErrorMessage(err) {
91
+ const e = err;
92
+ return e.response?.data?.error ?? e.message ?? (typeof e.response?.status === "number" ? `HTTP ${e.response.status}` : "unknown error");
93
+ }
94
+ function parsePullCursor(cursor) {
95
+ if (!cursor) return void 0;
96
+ try {
97
+ const parsed = JSON.parse(cursor);
98
+ if (parsed && typeof parsed.s === "string" && PIPEDRIVE_ENTITY_TYPES.includes(parsed.t)) {
99
+ return parsed;
100
+ }
101
+ } catch {
102
+ }
103
+ return void 0;
104
+ }
105
+ function resolveApiToken(config, options) {
106
+ const candidates = [config.apiToken, options.settings?.apiToken];
107
+ for (const c of candidates) {
108
+ if (typeof c === "string" && c.length > 0) return c;
109
+ }
110
+ return void 0;
111
+ }
112
+ function firstString(candidates) {
113
+ for (const c of candidates) {
114
+ if (typeof c === "string" && c.trim().length > 0) return c.trim();
115
+ if (typeof c === "number" && Number.isFinite(c)) return String(c);
116
+ }
117
+ return void 0;
118
+ }
119
+ function asEntityType(value) {
120
+ if (typeof value !== "string") return void 0;
121
+ const candidate = value.trim().toLowerCase();
122
+ return PIPEDRIVE_ENTITY_TYPES.includes(candidate) ? candidate : void 0;
123
+ }
124
+ function resolveNoteTarget(config, options) {
125
+ const explicitId = firstString([config.recordId, config.dealId]);
126
+ if (explicitId) {
127
+ const entityType = asEntityType(config.recordType) ?? "deals";
128
+ return { entityType, recordId: explicitId };
129
+ }
130
+ const defaultDealId = firstString([config.defaultDealId, options.settings?.defaultDealId]);
131
+ if (defaultDealId) {
132
+ return { entityType: "deals", recordId: defaultDealId };
133
+ }
134
+ throw new Error(
135
+ "pipedrive-connector: a record id is required for an outbound note (targetConfig.recordId or settings.defaultDealId)"
136
+ );
137
+ }
138
+ var PipedriveConnectorPlugin = class {
139
+ constructor() {
140
+ this.id = "pipedrive-connector";
141
+ this.name = "Pipedrive Connector";
142
+ this.version = "1.0.0";
143
+ this.category = "connector";
144
+ this.capabilities = [
145
+ PLUGIN_CAPABILITIES.CONNECTOR,
146
+ PLUGIN_CAPABILITIES.CONNECTOR_PIPEDRIVE,
147
+ PLUGIN_CAPABILITIES.EVENT_SOURCE
148
+ ];
149
+ this.providerName = "pipedrive";
150
+ this.connector = {
151
+ direction: "outbound",
152
+ transport: "poll",
153
+ flags: {
154
+ outboundMessage: true,
155
+ outboundRecord: true,
156
+ inbound: false,
157
+ reply: false,
158
+ pairing: false,
159
+ richOutbound: false
160
+ }
161
+ };
162
+ this.settingsSchema = {
163
+ type: "object",
164
+ required: ["apiToken"],
165
+ properties: {
166
+ apiToken: {
167
+ type: "string",
168
+ title: "Pipedrive API token",
169
+ "x-secret": true,
170
+ "x-envVar": "PIPEDRIVE_API_TOKEN"
171
+ },
172
+ entityTypes: {
173
+ type: "string",
174
+ title: "Entity types to ingest (comma-separated; deals, persons, organizations when empty)",
175
+ default: "deals,persons,organizations"
176
+ },
177
+ companyDomain: {
178
+ type: "string",
179
+ title: "Pipedrive company domain (e.g. `acme` for acme.pipedrive.com) \u2014 enables deep links"
180
+ },
181
+ backfillDays: {
182
+ type: "number",
183
+ title: "Historical backfill window in days on first pull (0 = off, max 90)",
184
+ default: 0,
185
+ minimum: 0,
186
+ maximum: 90
187
+ },
188
+ defaultDealId: {
189
+ type: "string",
190
+ title: "Default deal id outbound notes are attached to"
191
+ }
192
+ }
193
+ };
194
+ this.idempotencyCache = /* @__PURE__ */ new Map();
195
+ this.recordIdempotencyCache = /* @__PURE__ */ new Map();
196
+ }
197
+ async onLoad() {
198
+ }
199
+ async onUnload() {
200
+ this.idempotencyCache.clear();
201
+ this.recordIdempotencyCache.clear();
202
+ }
203
+ /**
204
+ * Testable seam — specs stub this; production adapts the official
205
+ * SDK's per-resource API classes onto the narrow surface above.
206
+ */
207
+ createClient(apiToken) {
208
+ const v1$1 = new v1.Configuration({ apiKey: apiToken });
209
+ const v2$1 = new v2.Configuration({ apiKey: apiToken });
210
+ const users = new v1.UsersApi(v1$1);
211
+ const recents = new v1.RecentsApi(v1$1);
212
+ const notes = new v1.NotesApi(v1$1);
213
+ const deals = new v2.DealsApi(v2$1);
214
+ const persons = new v2.PersonsApi(v2$1);
215
+ const organizations = new v2.OrganizationsApi(v2$1);
216
+ return {
217
+ getCurrentUser: () => users.getCurrentUser(),
218
+ getRecents: (params) => recents.getRecents(
219
+ params
220
+ ),
221
+ // The generated SDK wraps every request body in a property
222
+ // named after its schema — `addNote({ AddNoteRequest: {…} })`.
223
+ addNote: (payload) => notes.addNote({
224
+ AddNoteRequest: payload
225
+ }),
226
+ addRecord: (entityType, fields) => {
227
+ if (entityType === "persons") {
228
+ return persons.addPerson({
229
+ AddPersonRequest: fields
230
+ });
231
+ }
232
+ if (entityType === "organizations") {
233
+ return organizations.addOrganization({
234
+ AddOrganizationRequest: fields
235
+ });
236
+ }
237
+ return deals.addDeal({
238
+ AddDealRequest: fields
239
+ });
240
+ }
241
+ };
242
+ }
243
+ async verifyConnection(config, options) {
244
+ const apiToken = resolveApiToken(config, options);
245
+ if (!apiToken) {
246
+ return { valid: false, message: "apiToken is required" };
247
+ }
248
+ try {
249
+ const me = await this.createClient(apiToken).getCurrentUser();
250
+ const user = me?.data ?? void 0;
251
+ return {
252
+ valid: true,
253
+ details: {
254
+ ...user?.id !== void 0 ? { userId: String(user.id) } : {},
255
+ ...user?.name ? { userName: user.name } : {},
256
+ ...user?.company_name ? { companyName: user.company_name } : {},
257
+ ...user?.company_domain ? { companyDomain: user.company_domain } : {}
258
+ }
259
+ };
260
+ } catch (err) {
261
+ return { valid: false, message: `Pipedrive getCurrentUser failed: ${pipedriveErrorMessage(err)}` };
262
+ }
263
+ }
264
+ /** Outbound leg — append a note to a deal / person / organization. */
265
+ async send(payload, options) {
266
+ const config = payload.target ?? options.target ?? {};
267
+ const apiToken = resolveApiToken(config, options);
268
+ if (!apiToken) {
269
+ throw new Error(
270
+ "pipedrive-connector: an API token is required (targetConfig.apiToken or settings.apiToken)"
271
+ );
272
+ }
273
+ const { entityType, recordId } = resolveNoteTarget(config, options);
274
+ const noteField = PIPEDRIVE_ENTITY_META[entityType].noteField;
275
+ const cacheKey = `${options.connectorId ?? ""}\0${entityType}\0${recordId}\0${payload.messageRef}`;
276
+ const cached = this.idempotencyCache.get(cacheKey);
277
+ if (cached) return cached;
278
+ let noteId;
279
+ try {
280
+ const numericId = Number(recordId);
281
+ const res = await this.createClient(apiToken).addNote({
282
+ content: payload.text,
283
+ [noteField]: Number.isFinite(numericId) ? numericId : recordId
284
+ });
285
+ const id = res?.data?.id;
286
+ noteId = id === void 0 || id === null ? void 0 : String(id);
287
+ } catch (err) {
288
+ throw new Error(`Pipedrive addNote failed: ${pipedriveErrorMessage(err)}`);
289
+ }
290
+ const result = {
291
+ provider: this.id,
292
+ providerMessageId: noteId ?? `pipedrive-${payload.messageRef}`,
293
+ deliveredAt: /* @__PURE__ */ new Date()
294
+ };
295
+ this.idempotencyCache.set(cacheKey, result);
296
+ if (this.idempotencyCache.size > 500) {
297
+ const firstKey = this.idempotencyCache.keys().next().value;
298
+ if (firstKey) this.idempotencyCache.delete(firstKey);
299
+ }
300
+ return result;
301
+ }
302
+ /** Outbound record leg — create a deal / person / organization. */
303
+ async createRecord(record, options) {
304
+ const config = options.target ?? {};
305
+ const apiToken = resolveApiToken(config, options);
306
+ if (!apiToken) {
307
+ throw new Error(
308
+ "pipedrive-connector: an API token is required (targetConfig.apiToken or settings.apiToken)"
309
+ );
310
+ }
311
+ const entityType = asEntityType(record.collection);
312
+ if (!entityType) {
313
+ throw new Error(
314
+ `pipedrive-connector: unsupported collection '${record.collection}' \u2014 use one of ${PIPEDRIVE_ENTITY_TYPES.join(", ")}`
315
+ );
316
+ }
317
+ const cacheKey = `${options.connectorId ?? ""}\0${entityType}\0${record.idempotencyKey}`;
318
+ const cached = this.recordIdempotencyCache.get(cacheKey);
319
+ if (cached) return cached;
320
+ let recordId;
321
+ try {
322
+ const res = await this.createClient(apiToken).addRecord(entityType, { ...record.fields });
323
+ const id = res?.data?.id;
324
+ recordId = id === void 0 || id === null ? void 0 : String(id);
325
+ } catch (err) {
326
+ throw new Error(`Pipedrive ${entityType} create failed: ${pipedriveErrorMessage(err)}`);
327
+ }
328
+ if (!recordId) {
329
+ throw new Error(`Pipedrive ${entityType} create returned no record id`);
330
+ }
331
+ const result = { provider: this.id, recordId };
332
+ this.recordIdempotencyCache.set(cacheKey, result);
333
+ if (this.recordIdempotencyCache.size > 500) {
334
+ const firstKey = this.recordIdempotencyCache.keys().next().value;
335
+ if (firstKey) this.recordIdempotencyCache.delete(firstKey);
336
+ }
337
+ return result;
338
+ }
339
+ // ── Event source (pull) ─────────────────────────────────────────────
340
+ /**
341
+ * Pull one `/recents` page of the current entity-type phase since the
342
+ * effective watermark, normalized to envelopes. The returned cursor
343
+ * resumes the same phase (`next_start` offset) or advances to the
344
+ * next configured entity type; no cursor means the sweep is done.
345
+ *
346
+ * First pull (epoch/absent watermark, no cursor): the window is
347
+ * `now - backfillDays` when the opt-in backfill is on, otherwise
348
+ * `now` — history stays untouched unless the user asked for it.
349
+ */
350
+ async pullEvents(input) {
351
+ const apiToken = input.settings?.apiToken;
352
+ if (typeof apiToken !== "string" || apiToken.length === 0) {
353
+ throw new EventSourceNotConfiguredError(
354
+ "pipedrive-connector: settings.apiToken is required to pull events"
355
+ );
356
+ }
357
+ const entityTypes = resolveEntityTypes(input.settings);
358
+ const cursor = parsePullCursor(input.cursor);
359
+ let entityType;
360
+ let start;
361
+ let since;
362
+ let backfill;
363
+ let pagesUsed;
364
+ if (cursor) {
365
+ entityType = cursor.t;
366
+ start = cursor.n;
367
+ since = cursor.s;
368
+ backfill = cursor.f === 1;
369
+ pagesUsed = cursor.b ?? 0;
370
+ } else {
371
+ const sinceMs = Date.parse(input.since);
372
+ const firstPull = !Number.isFinite(sinceMs) || sinceMs <= 0;
373
+ const backfillDays = clampBackfillDays(input.settings?.backfillDays);
374
+ if (firstPull) {
375
+ const anchor = backfillDays > 0 ? Date.now() - backfillDays * 864e5 : Date.now();
376
+ since = new Date(anchor).toISOString();
377
+ backfill = backfillDays > 0;
378
+ } else {
379
+ since = new Date(sinceMs).toISOString();
380
+ backfill = false;
381
+ }
382
+ entityType = entityTypes[0];
383
+ start = void 0;
384
+ pagesUsed = 0;
385
+ }
386
+ let typeIndex = entityTypes.indexOf(entityType);
387
+ if (typeIndex === -1) {
388
+ typeIndex = 0;
389
+ entityType = entityTypes[0];
390
+ start = void 0;
391
+ pagesUsed = 0;
392
+ }
393
+ const meta = PIPEDRIVE_ENTITY_META[entityType];
394
+ const companyDomain = typeof input.settings?.companyDomain === "string" ? input.settings.companyDomain.trim() : void 0;
395
+ const client = this.createClient(apiToken);
396
+ const page = await client.getRecents({
397
+ since_timestamp: isoToPipedriveTime(since),
398
+ items: meta.recentsItem,
399
+ limit: PIPEDRIVE_PULL_PAGE_SIZE,
400
+ ...typeof start === "number" ? { start } : {}
401
+ });
402
+ const events = [];
403
+ for (const item of page.data ?? []) {
404
+ const envelope = this.normalizeRecent(item, entityType, since, companyDomain);
405
+ if (envelope) events.push(envelope);
406
+ }
407
+ const pagination = page.additional_data?.pagination;
408
+ const nextStart = pagination?.more_items_in_collection === true && typeof pagination.next_start === "number" ? pagination.next_start : void 0;
409
+ pagesUsed += 1;
410
+ const pageBudgetExhausted = backfill && pagesUsed >= PIPEDRIVE_BACKFILL_MAX_PAGES;
411
+ let next;
412
+ if (nextStart !== void 0 && !pageBudgetExhausted) {
413
+ next = { t: entityType, n: nextStart, s: since, ...backfill ? { f: 1 } : {}, b: pagesUsed };
414
+ } else if (typeIndex + 1 < entityTypes.length) {
415
+ next = { t: entityTypes[typeIndex + 1], s: since, ...backfill ? { f: 1 } : {}, b: 0 };
416
+ }
417
+ return next ? { events, nextCursor: JSON.stringify(next) } : { events };
418
+ }
419
+ normalizeRecent(item, entityType, since, companyDomain) {
420
+ const meta = PIPEDRIVE_ENTITY_META[entityType];
421
+ const data = item.data ?? {};
422
+ const rawId = item.id ?? data.id;
423
+ if (rawId === void 0 || rawId === null || rawId === "") return null;
424
+ const recordId = String(rawId);
425
+ const updatedAt = pipedriveTimeToIso(data.update_time ?? data.add_time);
426
+ const createdAt = pipedriveTimeToIso(data.add_time);
427
+ const changeType = Date.parse(createdAt) >= Date.parse(since) ? "created" : "updated";
428
+ const rawTitle = data[meta.titleField];
429
+ const title = typeof rawTitle === "string" && rawTitle.trim().length > 0 ? rawTitle.trim() : void 0;
430
+ const sourceUrl = companyDomain ? `https://${encodeURIComponent(companyDomain)}.pipedrive.com/${meta.urlSegment}/${encodeURIComponent(recordId)}` : void 0;
431
+ return {
432
+ id: crypto.randomUUID(),
433
+ source: this.id,
434
+ sourceEventId: `${entityType}:${recordId}:${updatedAt}`,
435
+ kind: meta.kind,
436
+ occurredAt: updatedAt,
437
+ subject: {
438
+ type: "crm-record",
439
+ externalId: recordId,
440
+ ...title ? { title } : {}
441
+ },
442
+ ...sourceUrl ? { sourceUrl } : {},
443
+ payload: {
444
+ entityType,
445
+ recordId,
446
+ changeType,
447
+ createdAt,
448
+ updatedAt,
449
+ fields: this.sanitizeFields(data, meta)
450
+ }
451
+ };
452
+ }
453
+ /**
454
+ * Payload fields are limited to the per-entity whitelist and each
455
+ * string value is capped, so a record with a huge free-text field can
456
+ * never blow the envelope byte budget (and custom fields, which can
457
+ * hold anything, never ride along).
458
+ */
459
+ sanitizeFields(data, meta) {
460
+ const out = {};
461
+ for (const key of meta.payloadFields) {
462
+ const value = data[key];
463
+ if (value === void 0 || value === null) continue;
464
+ if (typeof value === "string") {
465
+ out[key] = truncateText(value);
466
+ } else if (typeof value === "number" || typeof value === "boolean") {
467
+ out[key] = value;
468
+ }
469
+ }
470
+ return out;
471
+ }
472
+ };
473
+ var pipedriveConnectorPlugin = new PipedriveConnectorPlugin();
474
+
475
+ exports.PIPEDRIVE_BACKFILL_MAX_PAGES = PIPEDRIVE_BACKFILL_MAX_PAGES;
476
+ exports.PIPEDRIVE_ENTITY_META = PIPEDRIVE_ENTITY_META;
477
+ exports.PIPEDRIVE_ENTITY_TYPES = PIPEDRIVE_ENTITY_TYPES;
478
+ exports.PIPEDRIVE_EVENT_TEXT_MAX_CHARS = PIPEDRIVE_EVENT_TEXT_MAX_CHARS;
479
+ exports.PIPEDRIVE_PULL_PAGE_SIZE = PIPEDRIVE_PULL_PAGE_SIZE;
480
+ exports.PipedriveConnectorPlugin = PipedriveConnectorPlugin;
481
+ exports.asEntityType = asEntityType;
482
+ exports.clampBackfillDays = clampBackfillDays;
483
+ exports.default = PipedriveConnectorPlugin;
484
+ exports.isoToPipedriveTime = isoToPipedriveTime;
485
+ exports.pipedriveConnectorPlugin = pipedriveConnectorPlugin;
486
+ exports.pipedriveTimeToIso = pipedriveTimeToIso;
487
+ exports.resolveEntityTypes = resolveEntityTypes;
488
+ exports.resolveNoteTarget = resolveNoteTarget;