@elevasis/sdk 0.8.10 → 0.8.12

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/cli.cjs CHANGED
@@ -43883,7 +43883,7 @@ function wrapAction(commandName, fn) {
43883
43883
  // package.json
43884
43884
  var package_default = {
43885
43885
  name: "@elevasis/sdk",
43886
- version: "0.8.10",
43886
+ version: "0.8.12",
43887
43887
  description: "SDK for building Elevasis organization resources",
43888
43888
  type: "module",
43889
43889
  bin: {
@@ -48518,6 +48518,41 @@ function registerCredsCommand(program3) {
48518
48518
  }));
48519
48519
  }
48520
48520
 
48521
+ // src/cli/commands/error/error-resolve.ts
48522
+ async function resolveError(apiUrl, errorId) {
48523
+ const spinner = ora("Resolving error...").start();
48524
+ await apiPatch(`/api/external/observability/errors/${errorId}/resolve`, {}, apiUrl);
48525
+ spinner.stop();
48526
+ console.log(source_default.green(`
48527
+ Error '${errorId}' marked as resolved.`));
48528
+ }
48529
+ async function resolveErrorsByExecution(apiUrl, executionId) {
48530
+ const spinner = ora("Resolving all errors for execution...").start();
48531
+ const result = await apiPatch(
48532
+ `/api/external/observability/errors/execution/${executionId}/resolve`,
48533
+ {},
48534
+ apiUrl
48535
+ );
48536
+ spinner.stop();
48537
+ console.log(source_default.green(`
48538
+ ${result.count} error(s) resolved for execution '${executionId}'.`));
48539
+ }
48540
+
48541
+ // src/cli/commands/error/error.ts
48542
+ function registerErrorCommand(program3) {
48543
+ const error46 = program3.command("error").description("Manage execution errors");
48544
+ error46.command("resolve <errorId>").description("Mark a specific execution error as resolved").option("--api-url <url>", "API URL").action(
48545
+ wrapAction("error resolve", async (errorId, options2) => {
48546
+ await resolveError(resolveApiUrl(options2.apiUrl), errorId);
48547
+ })
48548
+ );
48549
+ error46.command("resolve-execution <executionId>").description("Mark all errors for an execution as resolved").option("--api-url <url>", "API URL").action(
48550
+ wrapAction("error resolve-execution", async (executionId, options2) => {
48551
+ await resolveErrorsByExecution(resolveApiUrl(options2.apiUrl), executionId);
48552
+ })
48553
+ );
48554
+ }
48555
+
48521
48556
  // src/cli/commands/rename.ts
48522
48557
  function registerRenameCommand(program3) {
48523
48558
  program3.command("rename <oldResourceId>").description("Rename a resource ID across all platform tables (dry run by default)").requiredOption("--to <newResourceId>", "New resource ID").option("--execute", "Apply the rename (default: dry run preview only)").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(
@@ -48588,6 +48623,7 @@ registerDeploymentsCommand(program2);
48588
48623
  registerInitCommand(program2);
48589
48624
  registerUpdateCommand(program2);
48590
48625
  registerCredsCommand(program2);
48626
+ registerErrorCommand(program2);
48591
48627
  registerRenameCommand(program2);
48592
48628
  program2.parse();
48593
48629
  /*! Bundled license information:
package/dist/index.d.ts CHANGED
@@ -1392,6 +1392,7 @@ type Database = {
1392
1392
  acq_content_distributions: {
1393
1393
  Row: {
1394
1394
  adapted_body: string | null;
1395
+ checklist: Json | null;
1395
1396
  content_id: string;
1396
1397
  created_at: string;
1397
1398
  format: string;
@@ -1401,15 +1402,16 @@ type Database = {
1401
1402
  metrics_updated_at: string | null;
1402
1403
  organization_id: string;
1403
1404
  platform: string;
1405
+ platform_content: Json | null;
1404
1406
  platform_post_id: string | null;
1405
1407
  platform_url: string | null;
1406
1408
  published_at: string | null;
1407
- scheduled_at: string | null;
1408
1409
  status: string;
1409
1410
  updated_at: string;
1410
1411
  };
1411
1412
  Insert: {
1412
1413
  adapted_body?: string | null;
1414
+ checklist?: Json | null;
1413
1415
  content_id: string;
1414
1416
  created_at?: string;
1415
1417
  format: string;
@@ -1419,15 +1421,16 @@ type Database = {
1419
1421
  metrics_updated_at?: string | null;
1420
1422
  organization_id: string;
1421
1423
  platform: string;
1424
+ platform_content?: Json | null;
1422
1425
  platform_post_id?: string | null;
1423
1426
  platform_url?: string | null;
1424
1427
  published_at?: string | null;
1425
- scheduled_at?: string | null;
1426
1428
  status?: string;
1427
1429
  updated_at?: string;
1428
1430
  };
1429
1431
  Update: {
1430
1432
  adapted_body?: string | null;
1433
+ checklist?: Json | null;
1431
1434
  content_id?: string;
1432
1435
  created_at?: string;
1433
1436
  format?: string;
@@ -1437,10 +1440,10 @@ type Database = {
1437
1440
  metrics_updated_at?: string | null;
1438
1441
  organization_id?: string;
1439
1442
  platform?: string;
1443
+ platform_content?: Json | null;
1440
1444
  platform_post_id?: string | null;
1441
1445
  platform_url?: string | null;
1442
1446
  published_at?: string | null;
1443
- scheduled_at?: string | null;
1444
1447
  status?: string;
1445
1448
  updated_at?: string;
1446
1449
  };
@@ -1463,6 +1466,7 @@ type Database = {
1463
1466
  };
1464
1467
  acq_deals: {
1465
1468
  Row: {
1469
+ activity_log: Json;
1466
1470
  attio_deal_id: string;
1467
1471
  cached_stage: string | null;
1468
1472
  closed_lost_at: string | null;
@@ -1497,6 +1501,7 @@ type Database = {
1497
1501
  updated_at: string;
1498
1502
  };
1499
1503
  Insert: {
1504
+ activity_log?: Json;
1500
1505
  attio_deal_id: string;
1501
1506
  cached_stage?: string | null;
1502
1507
  closed_lost_at?: string | null;
@@ -1531,6 +1536,7 @@ type Database = {
1531
1536
  updated_at?: string;
1532
1537
  };
1533
1538
  Update: {
1539
+ activity_log?: Json;
1534
1540
  attio_deal_id?: string;
1535
1541
  cached_stage?: string | null;
1536
1542
  closed_lost_at?: string | null;
@@ -1847,6 +1853,89 @@ type Database = {
1847
1853
  }
1848
1854
  ];
1849
1855
  };
1856
+ acq_social_posts: {
1857
+ Row: {
1858
+ author_name: string;
1859
+ author_url: string | null;
1860
+ comments_count: number;
1861
+ created_at: string;
1862
+ discovered_at: string;
1863
+ draft_response: string | null;
1864
+ engagement_count: number;
1865
+ id: string;
1866
+ matched_keywords: string[];
1867
+ matched_query: string | null;
1868
+ metadata: Json;
1869
+ organization_id: string;
1870
+ platform: string;
1871
+ platform_post_id: string;
1872
+ post_text: string;
1873
+ post_url: string;
1874
+ posted_at: string;
1875
+ relevance_score: number;
1876
+ responded_at: string | null;
1877
+ source_category: string | null;
1878
+ status: string;
1879
+ updated_at: string;
1880
+ };
1881
+ Insert: {
1882
+ author_name: string;
1883
+ author_url?: string | null;
1884
+ comments_count?: number;
1885
+ created_at?: string;
1886
+ discovered_at?: string;
1887
+ draft_response?: string | null;
1888
+ engagement_count?: number;
1889
+ id?: string;
1890
+ matched_keywords?: string[];
1891
+ matched_query?: string | null;
1892
+ metadata?: Json;
1893
+ organization_id: string;
1894
+ platform: string;
1895
+ platform_post_id: string;
1896
+ post_text: string;
1897
+ post_url: string;
1898
+ posted_at: string;
1899
+ relevance_score?: number;
1900
+ responded_at?: string | null;
1901
+ source_category?: string | null;
1902
+ status?: string;
1903
+ updated_at?: string;
1904
+ };
1905
+ Update: {
1906
+ author_name?: string;
1907
+ author_url?: string | null;
1908
+ comments_count?: number;
1909
+ created_at?: string;
1910
+ discovered_at?: string;
1911
+ draft_response?: string | null;
1912
+ engagement_count?: number;
1913
+ id?: string;
1914
+ matched_keywords?: string[];
1915
+ matched_query?: string | null;
1916
+ metadata?: Json;
1917
+ organization_id?: string;
1918
+ platform?: string;
1919
+ platform_post_id?: string;
1920
+ post_text?: string;
1921
+ post_url?: string;
1922
+ posted_at?: string;
1923
+ relevance_score?: number;
1924
+ responded_at?: string | null;
1925
+ source_category?: string | null;
1926
+ status?: string;
1927
+ updated_at?: string;
1928
+ };
1929
+ Relationships: [
1930
+ {
1931
+ foreignKeyName: "acq_social_posts_organization_id_fkey";
1932
+ columns: ["organization_id"];
1933
+ isOneToOne: false;
1934
+ referencedRelation: "organizations";
1935
+ referencedColumns: ["id"];
1936
+ }
1937
+ ];
1938
+ };
1850
1939
  activities: {
1851
1940
  Row: {
1852
1941
  activity_type: string;
@@ -3073,6 +3162,20 @@ type Database = {
3073
3162
  [_ in never]: never;
3074
3163
  };
3075
3164
  Functions: {
3165
+ acq_default_checklist: {
3166
+ Args: {
3167
+ p_platform: string;
3168
+ };
3169
+ Returns: Json;
3170
+ };
3171
+ append_deal_activity: {
3172
+ Args: {
3173
+ p_activity: Json;
3174
+ p_deal_id: string;
3175
+ p_organization_id: string;
3176
+ };
3177
+ Returns: undefined;
3178
+ };
3076
3179
  auth_jwt_claims: {
3077
3180
  Args: never;
3078
3181
  Returns: Json;
@@ -3949,6 +4052,28 @@ interface DeleteDealParams {
3949
4052
  organizationId: string;
3950
4053
  dealId: string;
3951
4054
  }
4055
+ interface UpsertSocialPostParams {
4056
+ organizationId: string;
4057
+ platform: string;
4058
+ platformPostId: string;
4059
+ authorName: string;
4060
+ authorUrl?: string | null;
4061
+ postText: string;
4062
+ postUrl: string;
4063
+ engagementCount?: number;
4064
+ commentsCount?: number;
4065
+ postedAt: string;
4066
+ metadata?: Record<string, unknown>;
4067
+ relevanceScore?: number;
4068
+ matchedKeywords?: string[];
4069
+ matchedQuery?: string | null;
4070
+ draftResponse?: string | null;
4071
+ sourceCategory?: string | null;
4072
+ }
4073
+ interface UpsertSocialPostsResult {
4074
+ inserted: number;
4075
+ duplicatesSkipped: number;
4076
+ }
3952
4077
  interface AcqDeal {
3953
4078
  id: string;
3954
4079
  organizationId: string;
@@ -3963,9 +4088,18 @@ interface AcqDeal {
3963
4088
  signatureEnvelopeId?: string | null;
3964
4089
  sourceListId?: string | null;
3965
4090
  sourceType?: string | null;
4091
+ activityLog: DealActivityEntry[];
3966
4092
  createdAt: Date;
3967
4093
  updatedAt: Date;
3968
4094
  }
4095
+ interface DealActivityEntry {
4096
+ type: string;
4097
+ title: string;
4098
+ description?: string;
4099
+ metadata?: Record<string, unknown>;
4100
+ occurredAt: string;
4101
+ actor?: string;
4102
+ }
3969
4103
  interface DealStageSummary {
3970
4104
  stage: string;
3971
4105
  count: number;
@@ -6408,6 +6542,26 @@ type LeadToolMap = {
6408
6542
  params: Omit<DeleteDealParams, 'organizationId'>;
6409
6543
  result: void;
6410
6544
  };
6545
+ recordReply: {
6546
+ params: {
6547
+ contactEmail: string;
6548
+ replyText: string;
6549
+ replySubject?: string;
6550
+ campaignName?: string;
6551
+ };
6552
+ result: void;
6553
+ };
6554
+ recordDealActivity: {
6555
+ params: {
6556
+ attioDealId?: string;
6557
+ contactEmail?: string;
6558
+ type: string;
6559
+ title: string;
6560
+ description?: string;
6561
+ metadata?: Record<string, unknown>;
6562
+ };
6563
+ result: void;
6564
+ };
6411
6565
  listDeals: {
6412
6566
  params: DealFilters;
6413
6567
  result: AcqDeal[];
@@ -6426,6 +6580,12 @@ type LeadToolMap = {
6426
6580
  };
6427
6581
  result: void;
6428
6582
  };
6583
+ upsertSocialPosts: {
6584
+ params: {
6585
+ posts: Omit<UpsertSocialPostParams, 'organizationId'>[];
6586
+ };
6587
+ result: UpsertSocialPostsResult;
6588
+ };
6429
6589
  };
6430
6590
  type PdfToolMap = {
6431
6591
  render: {
@@ -4,7 +4,7 @@
4
4
  * Typed wrapper over platform.call() for acquisition lead management.
5
5
  * Singleton export -- no credential needed (platform tool).
6
6
  *
7
- * 37 methods covering lists, companies, contacts, deals, deal-sync, and enrichment operations.
7
+ * 41 methods covering lists, companies, contacts, deals, deal-sync, enrichment, and social monitoring operations.
8
8
  * organizationId is injected server-side by the dispatcher -- never sent from the SDK.
9
9
  */
10
10
  import { type TypedAdapter } from './create-adapter.js';
@@ -5009,8 +5009,12 @@ var acqDb = createAdapter("acqDb", [
5009
5009
  "cancelHitlByDealId",
5010
5010
  "clearDealFields",
5011
5011
  "deleteDeal",
5012
+ "recordReply",
5013
+ "recordDealActivity",
5012
5014
  // Enrichment data operations
5013
- "mergeEnrichmentData"
5015
+ "mergeEnrichmentData",
5016
+ // Social monitoring operations
5017
+ "upsertSocialPosts"
5014
5018
  ]);
5015
5019
 
5016
5020
  // src/worker/adapters/pdf.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "0.8.10",
3
+ "version": "0.8.12",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "type": "module",
6
6
  "bin": {
@@ -50,8 +50,8 @@
50
50
  "tsup": "^8.0.0",
51
51
  "typescript": "5.9.2",
52
52
  "zod": "^4.1.0",
53
- "@repo/typescript-config": "0.0.0",
54
- "@repo/core": "0.0.0"
53
+ "@repo/core": "0.0.0",
54
+ "@repo/typescript-config": "0.0.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.core-dts.json && tsc -p tsconfig.build.json && tsup && rollup -c rollup.dts.config.mjs && esbuild src/cli/index.ts --bundle --platform=node --outfile=dist/cli.cjs --format=cjs --external:esbuild --banner:js=\"#!/usr/bin/env node\" && node scripts/copy-reference-docs.mjs && node scripts/generate-navigation.mjs",