@elevasis/sdk 0.8.10 → 0.8.11

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.11",
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,86 @@ 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
+ engagement_count: number;
1864
+ id: string;
1865
+ matched_keywords: string[];
1866
+ matched_query: string | null;
1867
+ metadata: Json;
1868
+ organization_id: string;
1869
+ platform: string;
1870
+ platform_post_id: string;
1871
+ post_text: string;
1872
+ post_url: string;
1873
+ posted_at: string;
1874
+ relevance_score: number;
1875
+ responded_at: string | null;
1876
+ response_notes: string | null;
1877
+ status: string;
1878
+ updated_at: string;
1879
+ };
1880
+ Insert: {
1881
+ author_name: string;
1882
+ author_url?: string | null;
1883
+ comments_count?: number;
1884
+ created_at?: string;
1885
+ discovered_at?: string;
1886
+ engagement_count?: number;
1887
+ id?: string;
1888
+ matched_keywords?: string[];
1889
+ matched_query?: string | null;
1890
+ metadata?: Json;
1891
+ organization_id: string;
1892
+ platform: string;
1893
+ platform_post_id: string;
1894
+ post_text: string;
1895
+ post_url: string;
1896
+ posted_at: string;
1897
+ relevance_score?: number;
1898
+ responded_at?: string | null;
1899
+ response_notes?: string | null;
1900
+ status?: string;
1901
+ updated_at?: string;
1902
+ };
1903
+ Update: {
1904
+ author_name?: string;
1905
+ author_url?: string | null;
1906
+ comments_count?: number;
1907
+ created_at?: string;
1908
+ discovered_at?: string;
1909
+ engagement_count?: number;
1910
+ id?: string;
1911
+ matched_keywords?: string[];
1912
+ matched_query?: string | null;
1913
+ metadata?: Json;
1914
+ organization_id?: string;
1915
+ platform?: string;
1916
+ platform_post_id?: string;
1917
+ post_text?: string;
1918
+ post_url?: string;
1919
+ posted_at?: string;
1920
+ relevance_score?: number;
1921
+ responded_at?: string | null;
1922
+ response_notes?: string | null;
1923
+ status?: string;
1924
+ updated_at?: string;
1925
+ };
1926
+ Relationships: [
1927
+ {
1928
+ foreignKeyName: "acq_social_posts_organization_id_fkey";
1929
+ columns: ["organization_id"];
1930
+ isOneToOne: false;
1931
+ referencedRelation: "organizations";
1932
+ referencedColumns: ["id"];
1933
+ }
1934
+ ];
1935
+ };
1850
1936
  activities: {
1851
1937
  Row: {
1852
1938
  activity_type: string;
@@ -3073,6 +3159,20 @@ type Database = {
3073
3159
  [_ in never]: never;
3074
3160
  };
3075
3161
  Functions: {
3162
+ acq_default_checklist: {
3163
+ Args: {
3164
+ p_platform: string;
3165
+ };
3166
+ Returns: Json;
3167
+ };
3168
+ append_deal_activity: {
3169
+ Args: {
3170
+ p_activity: Json;
3171
+ p_deal_id: string;
3172
+ p_organization_id: string;
3173
+ };
3174
+ Returns: undefined;
3175
+ };
3076
3176
  auth_jwt_claims: {
3077
3177
  Args: never;
3078
3178
  Returns: Json;
@@ -3949,6 +4049,26 @@ interface DeleteDealParams {
3949
4049
  organizationId: string;
3950
4050
  dealId: string;
3951
4051
  }
4052
+ interface UpsertSocialPostParams {
4053
+ organizationId: string;
4054
+ platform: string;
4055
+ platformPostId: string;
4056
+ authorName: string;
4057
+ authorUrl?: string | null;
4058
+ postText: string;
4059
+ postUrl: string;
4060
+ engagementCount?: number;
4061
+ commentsCount?: number;
4062
+ postedAt: string;
4063
+ metadata?: Record<string, unknown>;
4064
+ relevanceScore?: number;
4065
+ matchedKeywords?: string[];
4066
+ matchedQuery?: string | null;
4067
+ }
4068
+ interface UpsertSocialPostsResult {
4069
+ inserted: number;
4070
+ duplicatesSkipped: number;
4071
+ }
3952
4072
  interface AcqDeal {
3953
4073
  id: string;
3954
4074
  organizationId: string;
@@ -3963,9 +4083,18 @@ interface AcqDeal {
3963
4083
  signatureEnvelopeId?: string | null;
3964
4084
  sourceListId?: string | null;
3965
4085
  sourceType?: string | null;
4086
+ activityLog: DealActivityEntry[];
3966
4087
  createdAt: Date;
3967
4088
  updatedAt: Date;
3968
4089
  }
4090
+ interface DealActivityEntry {
4091
+ type: string;
4092
+ title: string;
4093
+ description?: string;
4094
+ metadata?: Record<string, unknown>;
4095
+ occurredAt: string;
4096
+ actor?: string;
4097
+ }
3969
4098
  interface DealStageSummary {
3970
4099
  stage: string;
3971
4100
  count: number;
@@ -6408,6 +6537,15 @@ type LeadToolMap = {
6408
6537
  params: Omit<DeleteDealParams, 'organizationId'>;
6409
6538
  result: void;
6410
6539
  };
6540
+ recordReply: {
6541
+ params: {
6542
+ contactEmail: string;
6543
+ replyText: string;
6544
+ replySubject?: string;
6545
+ campaignName?: string;
6546
+ };
6547
+ result: void;
6548
+ };
6411
6549
  listDeals: {
6412
6550
  params: DealFilters;
6413
6551
  result: AcqDeal[];
@@ -6426,6 +6564,12 @@ type LeadToolMap = {
6426
6564
  };
6427
6565
  result: void;
6428
6566
  };
6567
+ upsertSocialPosts: {
6568
+ params: {
6569
+ posts: Omit<UpsertSocialPostParams, 'organizationId'>[];
6570
+ };
6571
+ result: UpsertSocialPostsResult;
6572
+ };
6429
6573
  };
6430
6574
  type PdfToolMap = {
6431
6575
  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
+ * 38 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,11 @@ var acqDb = createAdapter("acqDb", [
5009
5009
  "cancelHitlByDealId",
5010
5010
  "clearDealFields",
5011
5011
  "deleteDeal",
5012
+ "recordReply",
5012
5013
  // Enrichment data operations
5013
- "mergeEnrichmentData"
5014
+ "mergeEnrichmentData",
5015
+ // Social monitoring operations
5016
+ "upsertSocialPosts"
5014
5017
  ]);
5015
5018
 
5016
5019
  // 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.11",
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",