attio 0.0.1-experimental.20251020 → 0.0.1-experimental.20251021

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.
@@ -18,7 +18,7 @@ export async function generateAppEntryPoint(srcDirAbsolute) {
18
18
  });
19
19
  }
20
20
  }
21
- const appImportStatement = `import type {App} from "attio/client"`;
21
+ const appImportStatement = `import type {App} from "attio"\n`;
22
22
  const surfaceImportsStatements = SURFACE_TYPES.flatMap((surfaceType) => {
23
23
  const surfaceImports = surfaceImportFilesByType[surfaceType];
24
24
  return surfaceImports.map((surface) => {
@@ -26,36 +26,46 @@ export async function generateAppEntryPoint(srcDirAbsolute) {
26
26
  return `import {${surfaceType}${surfaceName !== surfaceType ? ` as ${surfaceName}` : ""}} from ${JSON.stringify(surface.importPath)}`;
27
27
  });
28
28
  }).join("\n");
29
- const getSurfaceNamesArray = (surfaceType) => {
29
+ const getSurfaceNames = (surfaceType) => {
30
30
  const surfaceImports = surfaceImportFilesByType[surfaceType];
31
31
  return surfaceImports.map((surface) => getSurfaceImportName(surface.id));
32
32
  };
33
- const appExportStatement = `export const app: App = {
33
+ const surfacesByType = SURFACE_TYPES.reduce((acc, surfaceType) => {
34
+ acc[surfaceType] = getSurfaceNames(surfaceType);
35
+ return acc;
36
+ }, {});
37
+ const hasCallRecordingSurfaces = surfacesByType["callRecordingInsightTextSelectionAction"].length > 0 ||
38
+ surfacesByType["callRecordingSummaryTextSelectionAction"].length > 0 ||
39
+ surfacesByType["callRecordingTranscriptTextSelectionAction"].length > 0;
40
+ const appExportStatement = `
41
+ export const app: App = {
34
42
  record: {
35
- actions: [${getSurfaceNamesArray("recordAction").join(",")}],
36
- bulkActions: [${getSurfaceNamesArray("bulkRecordAction").join(",")}],
37
- widgets: [${getSurfaceNamesArray("recordWidget").join(",")}],
38
- },
43
+ actions: [${surfacesByType["recordAction"].join(", ")}],
44
+ bulkActions: [${surfacesByType["bulkRecordAction"].join(", ")}],${surfacesByType["recordWidget"].length > 0
45
+ ? `
46
+ widgets: [${surfacesByType["recordWidget"].join(", ")}],`
47
+ : ""}
48
+ },${hasCallRecordingSurfaces
49
+ ? `
39
50
  callRecording: {
40
51
  insight: {
41
- textActions: [${getSurfaceNamesArray("callRecordingInsightTextSelectionAction")}]
52
+ textActions: [${surfacesByType["callRecordingInsightTextSelectionAction"].join(", ")}],
42
53
  },
43
54
  summary: {
44
- textActions: [${getSurfaceNamesArray("callRecordingSummaryTextSelectionAction")}]
55
+ textActions: [${surfacesByType["callRecordingSummaryTextSelectionAction"].join(", ")}],
45
56
  },
46
57
  transcript: {
47
- textActions: [${getSurfaceNamesArray("callRecordingTranscriptTextSelectionAction")}]
58
+ textActions: [${surfacesByType["callRecordingTranscriptTextSelectionAction"].join(", ")}],
48
59
  },
49
- },
50
- settings: {
51
- workspace: ${getSurfaceNamesArray("workspaceSettings")},
52
- },
53
- }`;
60
+ },`
61
+ : ""}
62
+ }
63
+ `;
54
64
  const appEntryPointContent = [
55
65
  appImportStatement,
56
66
  surfaceImportsStatements,
57
67
  appExportStatement,
58
- ].join("\n\n");
68
+ ].join("\n");
59
69
  const writeResult = await fromPromise(fs.writeFile(path.join(srcDirAbsolute, "app.ts"), appEntryPointContent));
60
70
  if (isErrored(writeResult)) {
61
71
  return writeResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attio",
3
- "version": "0.0.1-experimental.20251020",
3
+ "version": "0.0.1-experimental.20251021",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "lib",