memorysync-sdk 1.2.0 → 1.4.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/dist/index.js CHANGED
@@ -21,13 +21,24 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  AuthError: () => AuthError,
24
+ ConnectionOAuthNamespace: () => ConnectionOAuthNamespace,
25
+ ConnectionsNamespace: () => ConnectionsNamespace,
24
26
  ControlPlaneClient: () => ControlPlaneClient,
27
+ GoogleDriveNamespace: () => GoogleDriveNamespace,
28
+ GranolaNamespace: () => GranolaNamespace,
29
+ IntegrationsNamespace: () => IntegrationsNamespace,
25
30
  MemorySyncClient: () => MemorySyncClient,
26
31
  MemorySyncError: () => MemorySyncError,
27
32
  NotFoundError: () => NotFoundError,
33
+ ObjectsNamespace: () => ObjectsNamespace,
34
+ ProvidersNamespace: () => ProvidersNamespace,
28
35
  RateLimitError: () => RateLimitError,
36
+ S3Namespace: () => S3Namespace,
29
37
  ServerError: () => ServerError,
30
- ValidationError: () => ValidationError
38
+ SlackNamespace: () => SlackNamespace,
39
+ SyncJobsNamespace: () => SyncJobsNamespace,
40
+ ValidationError: () => ValidationError,
41
+ WebCrawlerNamespace: () => WebCrawlerNamespace
31
42
  });
32
43
  module.exports = __toCommonJS(index_exports);
33
44
 
@@ -73,8 +84,499 @@ var ServerError = class extends MemorySyncError {
73
84
  }
74
85
  };
75
86
 
87
+ // src/connections.ts
88
+ var V2 = "/api/v2/integrations";
89
+ var V1 = "/api/v1/integrations";
90
+ function seg(value) {
91
+ return encodeURIComponent(String(value));
92
+ }
93
+ function asItem(value, key) {
94
+ return typeof value === "string" ? { [key]: value } : value;
95
+ }
96
+ var Namespace = class {
97
+ constructor(request) {
98
+ this.req = request;
99
+ }
100
+ };
101
+ var SlackNamespace = class extends Namespace {
102
+ /**
103
+ * Channels the app can see and could be added.
104
+ *
105
+ * Private channels appear only where the deployment allows them *and* a human
106
+ * has invited the app, so this never widens what someone already granted.
107
+ */
108
+ availableChannels(connectionId, query) {
109
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/slack/available-channels`, { query });
110
+ }
111
+ /** Channels currently selected for syncing. */
112
+ channels(connectionId) {
113
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/slack/channels`);
114
+ }
115
+ /**
116
+ * Select channels for syncing.
117
+ *
118
+ * Accepts bare channel ids, which is the common case, or objects carrying the
119
+ * name and type across so the server does not have to look them up again:
120
+ *
121
+ * ```ts
122
+ * await client.connections.slack.addChannels("c1", ["C0123", "C0456"]);
123
+ * await client.connections.slack.addChannels("c1", [
124
+ * { id: "C0123", name: "support", is_private: false },
125
+ * ]);
126
+ * ```
127
+ */
128
+ addChannels(connectionId, channels) {
129
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/slack/channels`, {
130
+ body: { channels: channels.map((c) => asItem(c, "id")) }
131
+ });
132
+ }
133
+ /** Stop syncing one channel. */
134
+ removeChannel(connectionId, channelId) {
135
+ return this.req(
136
+ "DELETE",
137
+ `${V2}/connections/${seg(connectionId)}/slack/channels/${seg(channelId)}`
138
+ );
139
+ }
140
+ /**
141
+ * Channels this connection will never sync.
142
+ *
143
+ * The deployment-wide floor cannot be removed here; a tenant may only add to it.
144
+ */
145
+ exclusionPolicy(connectionId) {
146
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/slack/exclusion-policy`);
147
+ }
148
+ /** Replace this connection's additions to the exclusion policy. */
149
+ setExclusionPolicy(connectionId, policy) {
150
+ return this.req("PUT", `${V2}/connections/${seg(connectionId)}/slack/exclusion-policy`, {
151
+ body: policy
152
+ });
153
+ }
154
+ /** Slack users seen on this connection and who they map to. */
155
+ identities(connectionId) {
156
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/slack/identities`);
157
+ }
158
+ /** Map a Slack user to a MemorySync end user. */
159
+ linkIdentity(connectionId, body) {
160
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/slack/identities/link`, { body });
161
+ }
162
+ /** Re-read the Slack member list and refresh the identity table. */
163
+ syncIdentities(connectionId) {
164
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/slack/identities/sync`);
165
+ }
166
+ };
167
+ var GoogleDriveNamespace = class extends Namespace {
168
+ /** Config for rendering Google's own file picker in your UI. */
169
+ pickerConfig(connectionId) {
170
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/gdrive/picker-config`);
171
+ }
172
+ /** Files and folders selected for syncing. */
173
+ resources(connectionId, query) {
174
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/gdrive/resources`, { query });
175
+ }
176
+ /** Select files or folders for syncing. */
177
+ addResources(connectionId, body) {
178
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/gdrive/resources`, { body });
179
+ }
180
+ /** Stop syncing one file or folder. */
181
+ removeResource(connectionId, resourceId) {
182
+ return this.req(
183
+ "DELETE",
184
+ `${V2}/connections/${seg(connectionId)}/gdrive/resources/${seg(resourceId)}`
185
+ );
186
+ }
187
+ };
188
+ var S3Namespace = class extends Namespace {
189
+ /** Prefixes visible in the bucket that could be added. */
190
+ availablePrefixes(connectionId, query) {
191
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/s3/available-prefixes`, { query });
192
+ }
193
+ /** Prefixes currently selected for syncing. */
194
+ prefixes(connectionId) {
195
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/s3/prefixes`);
196
+ }
197
+ /**
198
+ * Select prefixes for syncing.
199
+ *
200
+ * Accepts bare prefixes, or objects carrying `bucket` and `label`:
201
+ *
202
+ * ```ts
203
+ * await client.connections.s3.addPrefixes("c1", ["handbook/", "policies/"]);
204
+ * await client.connections.s3.addPrefixes("c1", [
205
+ * { prefix: "handbook/", label: "Handbook" },
206
+ * ]);
207
+ * ```
208
+ *
209
+ * An empty string means the bucket root. The bucket defaults to the one the
210
+ * connection's credentials were validated against, and the API rejects any
211
+ * other bucket rather than indexing one nobody proved access to.
212
+ */
213
+ addPrefixes(connectionId, prefixes) {
214
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/s3/prefixes`, {
215
+ body: { prefixes: prefixes.map((p) => asItem(p, "prefix")) }
216
+ });
217
+ }
218
+ /**
219
+ * Revoke one prefix approval, optionally purging what it produced.
220
+ *
221
+ * The prefix travels as a query parameter, not in the body and not as a path
222
+ * segment: prefixes contain slashes, which a path segment cannot carry
223
+ * unambiguously, and this endpoint reads no body at all.
224
+ *
225
+ * Pass `purge: true` to also delete the memories already derived from the
226
+ * prefix. The default leaves them in place, so revoking an approval does not
227
+ * silently destroy knowledge.
228
+ */
229
+ removePrefix(connectionId, prefix = "", options = {}) {
230
+ const query = { prefix, purge: options.purge ?? false };
231
+ if (options.bucket !== void 0) query.bucket = options.bucket;
232
+ return this.req("DELETE", `${V2}/connections/${seg(connectionId)}/s3/prefixes`, { query });
233
+ }
234
+ /** Keys and patterns this connection will never sync. */
235
+ exclusionPolicy(connectionId) {
236
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/s3/exclusion-policy`);
237
+ }
238
+ /** Replace this connection's additions to the exclusion policy. */
239
+ setExclusionPolicy(connectionId, policy) {
240
+ return this.req("PUT", `${V2}/connections/${seg(connectionId)}/s3/exclusion-policy`, {
241
+ body: policy
242
+ });
243
+ }
244
+ /** Effective S3 settings, including the per-object size ceiling. */
245
+ settings(connectionId) {
246
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/s3/settings`);
247
+ }
248
+ };
249
+ var GranolaNamespace = class extends Namespace {
250
+ /** Folders that could be added. */
251
+ availableFolders(connectionId, query) {
252
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/granola/available-folders`, { query });
253
+ }
254
+ /** Folders currently selected for syncing. */
255
+ folders(connectionId) {
256
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/granola/folders`);
257
+ }
258
+ /** Select folders for syncing. */
259
+ addFolders(connectionId, body) {
260
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/granola/folders`, { body });
261
+ }
262
+ /** Stop syncing one folder. */
263
+ removeFolder(connectionId, folderId) {
264
+ return this.req(
265
+ "DELETE",
266
+ `${V2}/connections/${seg(connectionId)}/granola/folders/${seg(folderId)}`
267
+ );
268
+ }
269
+ /** Folders and meetings this connection will never sync. */
270
+ exclusionPolicy(connectionId) {
271
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/granola/exclusion-policy`);
272
+ }
273
+ /** Replace this connection's additions to the exclusion policy. */
274
+ setExclusionPolicy(connectionId, policy) {
275
+ return this.req("PUT", `${V2}/connections/${seg(connectionId)}/granola/exclusion-policy`, {
276
+ body: policy
277
+ });
278
+ }
279
+ /** Meeting participants seen on this connection and who they map to. */
280
+ identities(connectionId) {
281
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/granola/identities`);
282
+ }
283
+ /** Map a participant to a MemorySync end user. */
284
+ linkIdentity(connectionId, body) {
285
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/granola/identities/link`, { body });
286
+ }
287
+ /**
288
+ * Re-run identity matching for this connection.
289
+ *
290
+ * Takes no arguments: the route reads no body and re-matches the whole roster.
291
+ * `body` is kept optional only so a forward-compatible field can be passed
292
+ * once the route grows one.
293
+ */
294
+ relinkIdentity(connectionId, body = {}) {
295
+ const hasFields = Object.keys(body).length > 0;
296
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/granola/identities/relink`, {
297
+ body: hasFields ? body : void 0
298
+ });
299
+ }
300
+ /** Effective Granola settings for this connection. */
301
+ settings(connectionId) {
302
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/granola/settings`);
303
+ }
304
+ /** Update Granola settings for this connection. */
305
+ setSettings(connectionId, settings) {
306
+ return this.req("PUT", `${V2}/connections/${seg(connectionId)}/granola/settings`, {
307
+ body: settings
308
+ });
309
+ }
310
+ };
311
+ var ConnectionOAuthNamespace = class extends Namespace {
312
+ /**
313
+ * Begin an OAuth connection and get the URL to send the user to.
314
+ *
315
+ * The user completes consent in a browser and the provider calls the platform
316
+ * back — not your backend. Poll {@link status} to find out how it went.
317
+ */
318
+ initiate(provider, body = {}) {
319
+ return this.req("POST", `${V2}/oauth/initiate`, {
320
+ body: { provider_id: provider, ...body }
321
+ });
322
+ }
323
+ /** Where an in-flight OAuth connection got to. */
324
+ status(query) {
325
+ return this.req("GET", `${V2}/oauth/status`, { query });
326
+ }
327
+ };
328
+ var ConnectionsNamespace = class extends Namespace {
329
+ constructor(request) {
330
+ super(request);
331
+ this.slack = new SlackNamespace(request);
332
+ this.gdrive = new GoogleDriveNamespace(request);
333
+ this.s3 = new S3Namespace(request);
334
+ this.granola = new GranolaNamespace(request);
335
+ this.oauth = new ConnectionOAuthNamespace(request);
336
+ }
337
+ /** Every connection in this organization. */
338
+ list(query) {
339
+ return this.req("GET", `${V2}/connections`, { query });
340
+ }
341
+ /** One connection, including its status and last sync. */
342
+ get(connectionId) {
343
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}`);
344
+ }
345
+ /** Connect a provider that authenticates with an API key or bot token. */
346
+ /**
347
+ * Connect a provider that authenticates with an API key or bot token.
348
+ *
349
+ * The wire field is `provider_id`; the argument is named `provider` because
350
+ * that is what the rest of this namespace calls it.
351
+ */
352
+ createWithApiKey(provider, apiKey, body = {}) {
353
+ return this.req("POST", `${V2}/connections/api-key`, {
354
+ body: { provider_id: provider, api_key: apiKey, ...body }
355
+ });
356
+ }
357
+ /** Connect a provider that needs a credential bundle, such as S3 keys. */
358
+ createWithCredentials(provider, credentials, body = {}) {
359
+ return this.req("POST", `${V2}/connections/credentials`, {
360
+ body: { provider_id: provider, credentials, ...body }
361
+ });
362
+ }
363
+ /** Change a connection's name, schedule or settings. */
364
+ update(connectionId, body) {
365
+ return this.req("PATCH", `${V2}/connections/${seg(connectionId)}`, { body });
366
+ }
367
+ /**
368
+ * Remove a connection.
369
+ *
370
+ * Stops future syncing. Memories already extracted are left in place — use
371
+ * {@link purge} for those, so disconnecting never silently deletes knowledge
372
+ * someone still depends on.
373
+ */
374
+ delete(connectionId) {
375
+ return this.req("DELETE", `${V2}/connections/${seg(connectionId)}`);
376
+ }
377
+ /** Re-authorise a connection whose credentials expired or were revoked. */
378
+ reconnect(connectionId, body = {}) {
379
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/reconnect`, { body });
380
+ }
381
+ /**
382
+ * Delete the memories this connection produced.
383
+ *
384
+ * Separate from {@link delete} on purpose: removing a connection and removing
385
+ * what it taught you are different decisions.
386
+ */
387
+ purge(connectionId, body = {}) {
388
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/purge`, { body });
389
+ }
390
+ /** Current and recent sync state for a connection. */
391
+ syncStatus(connectionId) {
392
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/sync`);
393
+ }
394
+ /** Start a sync now instead of waiting for the schedule. */
395
+ triggerSync(connectionId, body = {}) {
396
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/sync`, { body });
397
+ }
398
+ /** Objects a connection has ingested — files, messages, meetings. */
399
+ objects(connectionId, query) {
400
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/objects`, { query });
401
+ }
402
+ /** Object listing with richer filtering and paging than {@link objects}. */
403
+ objectsV2(connectionId, query) {
404
+ return this.req("GET", `${V2}/connections/${seg(connectionId)}/objects/v2`, { query });
405
+ }
406
+ /** Apply one action to many objects — pause, resume, re-extract. */
407
+ bulkObjectAction(connectionId, body) {
408
+ return this.req("POST", `${V2}/connections/${seg(connectionId)}/objects/bulk`, { body });
409
+ }
410
+ /** Connector totals: connections, objects synced, memories produced. */
411
+ stats(query) {
412
+ return this.req("GET", `${V2}/stats`, { query });
413
+ }
414
+ /** Audit trail of connector activity. */
415
+ auditLogs(query) {
416
+ return this.req("GET", `${V2}/audit-logs`, { query });
417
+ }
418
+ };
419
+ var ObjectsNamespace = class extends Namespace {
420
+ /** Metadata and sync state for one object. */
421
+ get(objectId) {
422
+ return this.req("GET", `${V2}/objects/${seg(objectId)}`);
423
+ }
424
+ /** What extraction made of this object. */
425
+ analysis(objectId) {
426
+ return this.req("GET", `${V2}/objects/${seg(objectId)}/analysis`);
427
+ }
428
+ /** Every action taken on this object. */
429
+ audit(objectId, query) {
430
+ return this.req("GET", `${V2}/objects/${seg(objectId)}/audit`, { query });
431
+ }
432
+ /** Versions of this object seen across syncs. */
433
+ history(objectId, query) {
434
+ return this.req("GET", `${V2}/objects/${seg(objectId)}/history`, { query });
435
+ }
436
+ /** Which memories this object produced, and whether extraction finished. */
437
+ memoryStatus(objectId) {
438
+ return this.req("GET", `${V2}/objects/${seg(objectId)}/memory-status`);
439
+ }
440
+ /** Row and column statistics for spreadsheet-shaped objects. */
441
+ structuredStats(objectId) {
442
+ return this.req("GET", `${V2}/objects/${seg(objectId)}/structured-stats`);
443
+ }
444
+ /** Score this object for extraction worthiness without extracting. */
445
+ evaluate(objectId, body = {}) {
446
+ return this.req("POST", `${V2}/objects/${seg(objectId)}/evaluate`, { body });
447
+ }
448
+ /** Stop re-syncing this object, leaving its memories in place. */
449
+ pause(objectId) {
450
+ return this.req("POST", `${V2}/objects/${seg(objectId)}/pause`);
451
+ }
452
+ /** Resume syncing a paused object. */
453
+ resume(objectId) {
454
+ return this.req("POST", `${V2}/objects/${seg(objectId)}/resume`);
455
+ }
456
+ /**
457
+ * Run extraction again over content already fetched.
458
+ *
459
+ * Counts against the plan's add allowance, exactly like the first extraction,
460
+ * because it creates memories the same way.
461
+ */
462
+ reextract(objectId, body = {}) {
463
+ return this.req("POST", `${V2}/objects/${seg(objectId)}/reextract`, { body });
464
+ }
465
+ /** Fetch this object from the provider again, then extract. */
466
+ resync(objectId, body = {}) {
467
+ return this.req("POST", `${V2}/objects/${seg(objectId)}/resync`, { body });
468
+ }
469
+ /** Remove the memories this object produced, keeping the object record. */
470
+ deleteMemories(objectId, query) {
471
+ return this.req("DELETE", `${V2}/objects/${seg(objectId)}/memories`, { query });
472
+ }
473
+ };
474
+ var ProvidersNamespace = class extends Namespace {
475
+ /** Every available provider and what it needs to connect. */
476
+ list(query) {
477
+ return this.req("GET", `${V2}/providers`, { query });
478
+ }
479
+ /** One provider's capabilities, scopes and settings schema. */
480
+ get(providerId) {
481
+ return this.req("GET", `${V2}/providers/${seg(providerId)}`);
482
+ }
483
+ };
484
+ var SyncJobsNamespace = class extends Namespace {
485
+ /** Progress and outcome of one sync run. */
486
+ get(jobId) {
487
+ return this.req("GET", `${V2}/sync-jobs/${seg(jobId)}`);
488
+ }
489
+ /** Stop a running sync. Objects already ingested are kept. */
490
+ cancel(jobId, body = {}) {
491
+ return this.req("POST", `${V2}/sync-jobs/${seg(jobId)}/cancel`, { body });
492
+ }
493
+ };
494
+ var WebCrawlerNamespace = class extends Namespace {
495
+ /** Check a URL is reachable and crawlable before committing to a job. */
496
+ validate(url, body = {}) {
497
+ return this.req("POST", `${V1}/web-crawler/validate`, { body: { url, ...body } });
498
+ }
499
+ /**
500
+ * Start a crawl. Returns a job to poll.
501
+ *
502
+ * Crawling only fetches and stores page content. Nothing becomes a memory until
503
+ * you call {@link importJob}, so a large crawl cannot quietly consume your add
504
+ * allowance.
505
+ */
506
+ crawl(url, body = {}) {
507
+ return this.req("POST", `${V1}/web-crawler/crawl`, { body: { url, ...body } });
508
+ }
509
+ /** Crawl jobs for this organization. */
510
+ jobs(query) {
511
+ return this.req("GET", `${V1}/web-crawler/jobs`, { query });
512
+ }
513
+ /** One crawl job's status and progress. */
514
+ job(jobId) {
515
+ return this.req("GET", `${V1}/web-crawler/jobs/${seg(jobId)}`);
516
+ }
517
+ /** Stop a running crawl. Pages already fetched are kept. */
518
+ cancelJob(jobId) {
519
+ return this.req("POST", `${V1}/web-crawler/jobs/${seg(jobId)}/cancel`);
520
+ }
521
+ /** Delete a crawl job and its fetched pages. */
522
+ deleteJob(jobId) {
523
+ return this.req("DELETE", `${V1}/web-crawler/jobs/${seg(jobId)}`);
524
+ }
525
+ /** Pages a crawl fetched, before any import. */
526
+ jobContent(jobId, query) {
527
+ return this.req("GET", `${V1}/web-crawler/jobs/${seg(jobId)}/content`, { query });
528
+ }
529
+ /** Page counts, byte totals and error breakdown for a crawl. */
530
+ jobStatistics(jobId) {
531
+ return this.req("GET", `${V1}/web-crawler/jobs/${seg(jobId)}/statistics`);
532
+ }
533
+ /**
534
+ * Turn a completed crawl's pages into memories.
535
+ *
536
+ * This is the step that creates memories, so this is the step that is billed —
537
+ * one unit per memory created, like every other ingestion path.
538
+ */
539
+ importJob(jobId, body = {}) {
540
+ return this.req("POST", `${V1}/web-crawler/jobs/${seg(jobId)}/import`, { body });
541
+ }
542
+ /** Crawls running right now. */
543
+ active() {
544
+ return this.req("GET", `${V1}/web-crawler/active`);
545
+ }
546
+ /** Crawler limits in force: depth, page ceiling, rate, timeouts. */
547
+ config() {
548
+ return this.req("GET", `${V1}/web-crawler/config`);
549
+ }
550
+ };
551
+ var IntegrationsNamespace = class extends Namespace {
552
+ constructor(request) {
553
+ super(request);
554
+ this.webCrawler = new WebCrawlerNamespace(request);
555
+ }
556
+ /** Every integration this deployment offers, for building a picker UI. */
557
+ catalog(query) {
558
+ return this.req("GET", `${V1}/catalog`, { query });
559
+ }
560
+ /** Integrations currently connected. Older view of `connections.list()`. */
561
+ connected(query) {
562
+ return this.req("GET", `${V1}/connected`, { query });
563
+ }
564
+ /** Legacy integration counters. Prefer `connections.stats()`. */
565
+ stats(query) {
566
+ return this.req("GET", `${V1}/stats`, { query });
567
+ }
568
+ /** Update a legacy integration record. */
569
+ update(integrationId, body) {
570
+ return this.req("PATCH", `${V1}/${seg(integrationId)}`, { body });
571
+ }
572
+ /** Delete a legacy integration record. */
573
+ delete(integrationId) {
574
+ return this.req("DELETE", `${V1}/${seg(integrationId)}`);
575
+ }
576
+ };
577
+
76
578
  // src/control-plane.ts
77
- var SDK_VERSION = "1.1.1";
579
+ var SDK_VERSION = "1.4.0";
78
580
  function safeJson(text) {
79
581
  try {
80
582
  return JSON.parse(text);
@@ -500,7 +1002,7 @@ var ControlPlaneClient = class {
500
1002
  };
501
1003
 
502
1004
  // src/index.ts
503
- var SDK_VERSION2 = "1.2.0";
1005
+ var SDK_VERSION2 = "1.4.0";
504
1006
  function camelToSnakeKey(key) {
505
1007
  return key.replace(/([A-Z])/g, "_$1").toLowerCase();
506
1008
  }
@@ -590,6 +1092,12 @@ var MemorySyncClient = class {
590
1092
  throw new Error("No fetch implementation available. Pass `fetch` in config or use Node 18+.");
591
1093
  }
592
1094
  this.fetchImpl = f;
1095
+ const request = (method, path, options) => this.request(method, path, options ?? {});
1096
+ this.connections = new ConnectionsNamespace(request);
1097
+ this.objects = new ObjectsNamespace(request);
1098
+ this.providers = new ProvidersNamespace(request);
1099
+ this.syncJobs = new SyncJobsNamespace(request);
1100
+ this.integrations = new IntegrationsNamespace(request);
593
1101
  }
594
1102
  headers(extra = {}) {
595
1103
  const h = {
@@ -1194,12 +1702,23 @@ function toOntology(raw) {
1194
1702
  // Annotate the CommonJS export names for ESM import in node:
1195
1703
  0 && (module.exports = {
1196
1704
  AuthError,
1705
+ ConnectionOAuthNamespace,
1706
+ ConnectionsNamespace,
1197
1707
  ControlPlaneClient,
1708
+ GoogleDriveNamespace,
1709
+ GranolaNamespace,
1710
+ IntegrationsNamespace,
1198
1711
  MemorySyncClient,
1199
1712
  MemorySyncError,
1200
1713
  NotFoundError,
1714
+ ObjectsNamespace,
1715
+ ProvidersNamespace,
1201
1716
  RateLimitError,
1717
+ S3Namespace,
1202
1718
  ServerError,
1203
- ValidationError
1719
+ SlackNamespace,
1720
+ SyncJobsNamespace,
1721
+ ValidationError,
1722
+ WebCrawlerNamespace
1204
1723
  });
1205
1724
  //# sourceMappingURL=index.js.map