attio 0.0.1-experimental.20240925 → 0.0.1-experimental.20240926
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/lib/api/start-graphql-server.js +32 -0
- package/lib/commands/dev.js +3 -1
- package/lib/machines/dev-machine.js +50 -0
- package/lib/schema.graphql +536 -0
- package/lib/util/find-available-port.js +21 -0
- package/package.json +8 -2
- package/schema.graphql +536 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { graphqlServer } from "@hono/graphql-server";
|
|
2
|
+
import { serve } from "@hono/node-server";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import { buildSchema } from "graphql";
|
|
5
|
+
import { Hono } from "hono";
|
|
6
|
+
import path, { dirname } from "path";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
import { findAvailablePort } from "../util/find-available-port.js";
|
|
9
|
+
export function startGraphqlServer(sendBack) {
|
|
10
|
+
let server = null;
|
|
11
|
+
const startServer = async () => {
|
|
12
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
13
|
+
const currentDirPath = dirname(currentFilePath);
|
|
14
|
+
const schemaPath = path.resolve(currentDirPath, "..", "schema.graphql");
|
|
15
|
+
const schemaString = fs.readFileSync(schemaPath, "utf8");
|
|
16
|
+
const port = await findAvailablePort(8700);
|
|
17
|
+
const schema = buildSchema(schemaString);
|
|
18
|
+
const app = new Hono();
|
|
19
|
+
const rootResolver = () => {
|
|
20
|
+
return {};
|
|
21
|
+
};
|
|
22
|
+
app.use("/graphql", graphqlServer({ schema, rootResolver, graphiql: true }));
|
|
23
|
+
server = serve({ fetch: app.fetch, port });
|
|
24
|
+
sendBack({ type: "GraphQL Server Started", port });
|
|
25
|
+
};
|
|
26
|
+
startServer();
|
|
27
|
+
return () => {
|
|
28
|
+
if (!server)
|
|
29
|
+
return;
|
|
30
|
+
server.close();
|
|
31
|
+
};
|
|
32
|
+
}
|
package/lib/commands/dev.js
CHANGED
|
@@ -88,7 +88,9 @@ export default function Dev({ options: { debug } }) {
|
|
|
88
88
|
React.createElement(Text, { color: "redBright" }, "\u274C Upload Error"),
|
|
89
89
|
React.createElement(Text, null,
|
|
90
90
|
"\u2013 ",
|
|
91
|
-
snapshot.context.uploadError?.message))))
|
|
91
|
+
snapshot.context.uploadError?.message)))),
|
|
92
|
+
snapshot.matches({ Watching: { Graphql: "Started" } }) && (React.createElement(Box, { flexDirection: "column", marginTop: 1 },
|
|
93
|
+
React.createElement(Text, null, "Press \"o\" to open GraphQL Explorer")))),
|
|
92
94
|
hasErrors && (React.createElement(ScrollBox, { borderStyle: "round", padding: 1 },
|
|
93
95
|
jsError && renderBuildErrors(jsError),
|
|
94
96
|
tsErrors && renderTypeScriptErrors(tsErrors)))));
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import chokidar from "chokidar";
|
|
2
|
+
import open from "open";
|
|
3
|
+
import readline from "readline";
|
|
2
4
|
import { assign, fromCallback, setup, enqueueActions } from "xstate";
|
|
3
5
|
import { completeBundleUpload } from "../api/complete-bundle-upload.js";
|
|
4
6
|
import { createDevVersion } from "../api/create-dev-version.js";
|
|
7
|
+
import { startGraphqlServer } from "../api/start-graphql-server.js";
|
|
5
8
|
import { startUpload } from "../api/start-upload.js";
|
|
6
9
|
import { loadAppConfigFile } from "../util/app-config.js";
|
|
7
10
|
import { loadDeveloperConfig, loadInitialDeveloperConfig, } from "../util/load-developer-config.js";
|
|
@@ -30,6 +33,24 @@ export const devMachine = setup({
|
|
|
30
33
|
}
|
|
31
34
|
sendBack({ type: "Initialized", config });
|
|
32
35
|
}),
|
|
36
|
+
listenForGraphqlOpen: fromCallback(({ input }) => {
|
|
37
|
+
readline.emitKeypressEvents(process.stdin);
|
|
38
|
+
if (process.stdin.isTTY) {
|
|
39
|
+
process.stdin.setRawMode(true);
|
|
40
|
+
}
|
|
41
|
+
const handleKeyPress = (str, key) => {
|
|
42
|
+
if (key.name?.toLowerCase() === "o") {
|
|
43
|
+
open(`http://localhost:${input.graphqlPort}/graphql`);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
process.stdin.on("keypress", handleKeyPress);
|
|
47
|
+
return () => {
|
|
48
|
+
process.stdin.removeListener("keypress", handleKeyPress);
|
|
49
|
+
if (process.stdin.isTTY) {
|
|
50
|
+
process.stdin.setRawMode(false);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}),
|
|
33
54
|
prepareUpload: fromCallback(({ sendBack }) => {
|
|
34
55
|
const prepareUpload = async () => {
|
|
35
56
|
const config = await loadDeveloperConfig();
|
|
@@ -108,6 +129,7 @@ export const devMachine = setup({
|
|
|
108
129
|
watcher.close();
|
|
109
130
|
};
|
|
110
131
|
}),
|
|
132
|
+
graphql: fromCallback(({ sendBack }) => startGraphqlServer(sendBack)),
|
|
111
133
|
},
|
|
112
134
|
actions: {
|
|
113
135
|
clearUploadError: assign({ uploadError: undefined }),
|
|
@@ -125,6 +147,9 @@ export const devMachine = setup({
|
|
|
125
147
|
setDevVersion: assign({
|
|
126
148
|
devVersion: (_, params) => params.devVersion,
|
|
127
149
|
}),
|
|
150
|
+
setGraphqlPort: assign({
|
|
151
|
+
graphqlPort: (_, params) => params.port,
|
|
152
|
+
}),
|
|
128
153
|
setSuccess: assign({
|
|
129
154
|
jsContents: (_, params) => params.contents,
|
|
130
155
|
lastSuccessfulJavaScriptBuild: (_, params) => params.time,
|
|
@@ -252,6 +277,31 @@ export const devMachine = setup({
|
|
|
252
277
|
},
|
|
253
278
|
initial: "Validating",
|
|
254
279
|
},
|
|
280
|
+
Graphql: {
|
|
281
|
+
invoke: {
|
|
282
|
+
src: "graphql",
|
|
283
|
+
},
|
|
284
|
+
states: {
|
|
285
|
+
"Not Started": {
|
|
286
|
+
on: {
|
|
287
|
+
"GraphQL Server Started": {
|
|
288
|
+
target: "Started",
|
|
289
|
+
actions: {
|
|
290
|
+
type: "setGraphqlPort",
|
|
291
|
+
params: ({ event }) => event,
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
"Started": {
|
|
297
|
+
invoke: {
|
|
298
|
+
src: "listenForGraphqlOpen",
|
|
299
|
+
input: ({ context }) => ({ graphqlPort: context.graphqlPort }),
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
initial: "Not Started",
|
|
304
|
+
},
|
|
255
305
|
},
|
|
256
306
|
type: "parallel",
|
|
257
307
|
},
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
"""The current Attio workspace"""
|
|
2
|
+
type Workspace {
|
|
3
|
+
"""The name of the workspace."""
|
|
4
|
+
name: String
|
|
5
|
+
|
|
6
|
+
"""The slug of the workspace."""
|
|
7
|
+
slug: String
|
|
8
|
+
|
|
9
|
+
"""The objects inside the workspace."""
|
|
10
|
+
objects: [IObject]
|
|
11
|
+
object(
|
|
12
|
+
"""Slug of the object."""
|
|
13
|
+
slug: String!
|
|
14
|
+
): IObject
|
|
15
|
+
people: people
|
|
16
|
+
companies: companies
|
|
17
|
+
deals: deals
|
|
18
|
+
workspaces: workspaces
|
|
19
|
+
users: users
|
|
20
|
+
person(
|
|
21
|
+
"""The ID of the person record."""
|
|
22
|
+
id: String!
|
|
23
|
+
): PeopleRecord
|
|
24
|
+
company(
|
|
25
|
+
"""The ID of the company record."""
|
|
26
|
+
id: String!
|
|
27
|
+
): CompaniesRecord
|
|
28
|
+
deal(
|
|
29
|
+
"""The ID of the deal record."""
|
|
30
|
+
id: String!
|
|
31
|
+
): DealsRecord
|
|
32
|
+
workspace(
|
|
33
|
+
"""The ID of the workspace record."""
|
|
34
|
+
id: String!
|
|
35
|
+
): WorkspacesRecord
|
|
36
|
+
userRecord(
|
|
37
|
+
"""The ID of the user record."""
|
|
38
|
+
id: String!
|
|
39
|
+
): UsersRecord
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
"""The person object in the workspace."""
|
|
43
|
+
type people implements IObject {
|
|
44
|
+
"""The name of the object."""
|
|
45
|
+
_name: String!
|
|
46
|
+
|
|
47
|
+
"""The slug of the object."""
|
|
48
|
+
slug: String!
|
|
49
|
+
|
|
50
|
+
"""The attributes of the object."""
|
|
51
|
+
attributes: [Attribute]
|
|
52
|
+
attribute(
|
|
53
|
+
"""Slug of the attribute"""
|
|
54
|
+
slug: String!
|
|
55
|
+
): Attribute
|
|
56
|
+
record(
|
|
57
|
+
"""ID of the person record."""
|
|
58
|
+
id: String!
|
|
59
|
+
): PeopleRecord
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
"""A person record."""
|
|
63
|
+
type PeopleRecord implements Record {
|
|
64
|
+
attribute(
|
|
65
|
+
"""Slug of the attribute"""
|
|
66
|
+
slug: String!
|
|
67
|
+
): AttributeValue
|
|
68
|
+
|
|
69
|
+
"""The URL of the record in Attio."""
|
|
70
|
+
url: String!
|
|
71
|
+
name: PersonalName
|
|
72
|
+
email_addresses: [String!]
|
|
73
|
+
description: String
|
|
74
|
+
company: CompaniesRecord
|
|
75
|
+
job_title: String
|
|
76
|
+
avatar_url: String
|
|
77
|
+
phone_numbers: [String!]
|
|
78
|
+
primary_location: Location
|
|
79
|
+
angellist: String
|
|
80
|
+
facebook: String
|
|
81
|
+
instagram: String
|
|
82
|
+
linkedin: String
|
|
83
|
+
twitter: String
|
|
84
|
+
twitter_follower_count: Float
|
|
85
|
+
first_calendar_interaction: Interaction
|
|
86
|
+
last_calendar_interaction: Interaction
|
|
87
|
+
next_calendar_interaction: Interaction
|
|
88
|
+
last_email_interaction: Interaction
|
|
89
|
+
first_interaction: Interaction
|
|
90
|
+
last_interaction: Interaction
|
|
91
|
+
associated_deals: [DealsRecord!]
|
|
92
|
+
associated_users: [UsersRecord!]
|
|
93
|
+
list_entries: [Record!]
|
|
94
|
+
created_at: String
|
|
95
|
+
created_by: Actor
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
"""A record in the workspace."""
|
|
99
|
+
interface Record {
|
|
100
|
+
attribute(
|
|
101
|
+
"""Slug of the attribute"""
|
|
102
|
+
slug: String!
|
|
103
|
+
): AttributeValue
|
|
104
|
+
|
|
105
|
+
"""The URL of the record in Attio."""
|
|
106
|
+
url: String!
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
union AttributeValue = RecordReferenceValue | MultiRecordReferenceValue | PersonalNameValue | MultiPersonalNameValue | TextValue | MultiTextValue | DateValue | MultiDateValue | TimestampValue | MultiTimestampValue | NumberValue | MultiNumberValue | EmailAddressValue | MultiEmailAddressValue | DomainValue | MultiDomainValue | LocationValue | MultiLocationValue | InteractionValue | MultiInteractionValue | SelectValue | MultiSelectValue | PipelineValue | MultiPipelineValue | CheckboxValue | MultiCheckboxValue | RatingValue | MultiRatingValue | PhoneNumberValue | MultiPhoneNumberValue | CurrencyValue | MultiCurrencyValue | ActorReferenceValue | MultiActorReferenceValue
|
|
110
|
+
|
|
111
|
+
type RecordReferenceValue {
|
|
112
|
+
value: Record
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type MultiRecordReferenceValue {
|
|
116
|
+
values: [Record]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type PersonalNameValue {
|
|
120
|
+
value: PersonalName
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type PersonalName {
|
|
124
|
+
first: String
|
|
125
|
+
last: String
|
|
126
|
+
full: String
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
type MultiPersonalNameValue {
|
|
130
|
+
values: [PersonalName]
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
type TextValue {
|
|
134
|
+
value: String
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
type MultiTextValue {
|
|
138
|
+
values: [String]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type DateValue {
|
|
142
|
+
value: String
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
type MultiDateValue {
|
|
146
|
+
values: [String]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type TimestampValue {
|
|
150
|
+
value: String
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
type MultiTimestampValue {
|
|
154
|
+
values: [String]
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
type NumberValue {
|
|
158
|
+
value: Float
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
type MultiNumberValue {
|
|
162
|
+
values: [Float]
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
type EmailAddressValue {
|
|
166
|
+
value: String
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type MultiEmailAddressValue {
|
|
170
|
+
values: [String]
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
type DomainValue {
|
|
174
|
+
value: String
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
type MultiDomainValue {
|
|
178
|
+
values: [String]
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
type LocationValue {
|
|
182
|
+
value: Location
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
type Location {
|
|
186
|
+
line1: String
|
|
187
|
+
line2: String
|
|
188
|
+
line3: String
|
|
189
|
+
line4: String
|
|
190
|
+
locality: String
|
|
191
|
+
region: String
|
|
192
|
+
postcode: String
|
|
193
|
+
country: String
|
|
194
|
+
latitude: String
|
|
195
|
+
longitude: String
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
type MultiLocationValue {
|
|
199
|
+
values: [Location]
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
type InteractionValue {
|
|
203
|
+
value: Interaction
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
type Interaction {
|
|
207
|
+
timestamp: String!
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
type MultiInteractionValue {
|
|
211
|
+
values: [Interaction]
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
type SelectValue {
|
|
215
|
+
value: SelectOption
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
type SelectOption {
|
|
219
|
+
name: String!
|
|
220
|
+
id: String!
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
type MultiSelectValue {
|
|
224
|
+
values: [SelectOption]
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type PipelineValue {
|
|
228
|
+
value: PipelineStage
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type PipelineStage {
|
|
232
|
+
name: String!
|
|
233
|
+
id: String!
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
type MultiPipelineValue {
|
|
237
|
+
values: [PipelineStage]
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
type CheckboxValue {
|
|
241
|
+
value: Boolean!
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
type MultiCheckboxValue {
|
|
245
|
+
values: [Boolean!]
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
type RatingValue {
|
|
249
|
+
value: Int!
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
type MultiRatingValue {
|
|
253
|
+
values: [Int!]
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
type PhoneNumberValue {
|
|
257
|
+
value: String
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
type MultiPhoneNumberValue {
|
|
261
|
+
values: [String]
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
type CurrencyValue {
|
|
265
|
+
value: Money
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
type Money {
|
|
269
|
+
amount: Float!
|
|
270
|
+
currency: String!
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
type MultiCurrencyValue {
|
|
274
|
+
values: [Money]
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
type ActorReferenceValue {
|
|
278
|
+
value: Actor
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
"""An actor inside Attio."""
|
|
282
|
+
union Actor = User | SystemActor
|
|
283
|
+
|
|
284
|
+
"""An Attio user."""
|
|
285
|
+
type User {
|
|
286
|
+
email: String!
|
|
287
|
+
name: String!
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
"""A system inside Attio."""
|
|
291
|
+
type SystemActor {
|
|
292
|
+
name: String
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
type MultiActorReferenceValue {
|
|
296
|
+
values: [Actor]
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
"""A company record."""
|
|
300
|
+
type CompaniesRecord implements Record {
|
|
301
|
+
attribute(
|
|
302
|
+
"""Slug of the attribute"""
|
|
303
|
+
slug: String!
|
|
304
|
+
): AttributeValue
|
|
305
|
+
|
|
306
|
+
"""The URL of the record in Attio."""
|
|
307
|
+
url: String!
|
|
308
|
+
domains: [String!]
|
|
309
|
+
name: String
|
|
310
|
+
description: String
|
|
311
|
+
team: [PeopleRecord!]
|
|
312
|
+
categories: [SelectOption!]
|
|
313
|
+
primary_location: Location
|
|
314
|
+
logo_url: String
|
|
315
|
+
angellist: String
|
|
316
|
+
facebook: String
|
|
317
|
+
instagram: String
|
|
318
|
+
linkedin: String
|
|
319
|
+
twitter: String
|
|
320
|
+
twitter_follower_count: Float
|
|
321
|
+
estimated_arr_usd: SelectOption
|
|
322
|
+
funding_raised_usd: Money
|
|
323
|
+
foundation_date: String
|
|
324
|
+
employee_range: SelectOption
|
|
325
|
+
first_calendar_interaction: Interaction
|
|
326
|
+
last_calendar_interaction: Interaction
|
|
327
|
+
next_calendar_interaction: Interaction
|
|
328
|
+
last_email_interaction: Interaction
|
|
329
|
+
first_interaction: Interaction
|
|
330
|
+
last_interaction: Interaction
|
|
331
|
+
associated_deals: [DealsRecord!]
|
|
332
|
+
associated_workspaces: [WorkspacesRecord!]
|
|
333
|
+
list_entries: [Record!]
|
|
334
|
+
created_at: String
|
|
335
|
+
created_by: Actor
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
"""A deal record."""
|
|
339
|
+
type DealsRecord implements Record {
|
|
340
|
+
attribute(
|
|
341
|
+
"""Slug of the attribute"""
|
|
342
|
+
slug: String!
|
|
343
|
+
): AttributeValue
|
|
344
|
+
|
|
345
|
+
"""The URL of the record in Attio."""
|
|
346
|
+
url: String!
|
|
347
|
+
name: String
|
|
348
|
+
stage: PipelineStage
|
|
349
|
+
owner: Actor
|
|
350
|
+
value: Money
|
|
351
|
+
associated_people: [PeopleRecord!]
|
|
352
|
+
associated_company: CompaniesRecord
|
|
353
|
+
list_entries: [Record!]
|
|
354
|
+
created_at: String
|
|
355
|
+
created_by: Actor
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
"""A workspace record."""
|
|
359
|
+
type WorkspacesRecord implements Record {
|
|
360
|
+
attribute(
|
|
361
|
+
"""Slug of the attribute"""
|
|
362
|
+
slug: String!
|
|
363
|
+
): AttributeValue
|
|
364
|
+
|
|
365
|
+
"""The URL of the record in Attio."""
|
|
366
|
+
url: String!
|
|
367
|
+
workspace_id: String
|
|
368
|
+
name: String
|
|
369
|
+
users: [UsersRecord!]
|
|
370
|
+
company: CompaniesRecord
|
|
371
|
+
avatar_url: String
|
|
372
|
+
list_entries: [Record!]
|
|
373
|
+
created_at: String
|
|
374
|
+
created_by: Actor
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
"""A user record."""
|
|
378
|
+
type UsersRecord implements Record {
|
|
379
|
+
attribute(
|
|
380
|
+
"""Slug of the attribute"""
|
|
381
|
+
slug: String!
|
|
382
|
+
): AttributeValue
|
|
383
|
+
|
|
384
|
+
"""The URL of the record in Attio."""
|
|
385
|
+
url: String!
|
|
386
|
+
person: PeopleRecord
|
|
387
|
+
primary_email_address: String
|
|
388
|
+
workspace: WorkspacesRecord
|
|
389
|
+
list_entries: [Record!]
|
|
390
|
+
created_at: String
|
|
391
|
+
created_by: Actor
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
"""The company object in the workspace."""
|
|
395
|
+
type companies implements IObject {
|
|
396
|
+
"""The name of the object."""
|
|
397
|
+
_name: String!
|
|
398
|
+
|
|
399
|
+
"""The slug of the object."""
|
|
400
|
+
slug: String!
|
|
401
|
+
|
|
402
|
+
"""The attributes of the object."""
|
|
403
|
+
attributes: [Attribute]
|
|
404
|
+
attribute(
|
|
405
|
+
"""Slug of the attribute"""
|
|
406
|
+
slug: String!
|
|
407
|
+
): Attribute
|
|
408
|
+
record(
|
|
409
|
+
"""ID of the company record."""
|
|
410
|
+
id: String!
|
|
411
|
+
): CompaniesRecord
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
"""The deal object in the workspace."""
|
|
415
|
+
type deals implements IObject {
|
|
416
|
+
"""The name of the object."""
|
|
417
|
+
_name: String!
|
|
418
|
+
|
|
419
|
+
"""The slug of the object."""
|
|
420
|
+
slug: String!
|
|
421
|
+
|
|
422
|
+
"""The attributes of the object."""
|
|
423
|
+
attributes: [Attribute]
|
|
424
|
+
attribute(
|
|
425
|
+
"""Slug of the attribute"""
|
|
426
|
+
slug: String!
|
|
427
|
+
): Attribute
|
|
428
|
+
record(
|
|
429
|
+
"""ID of the deal record."""
|
|
430
|
+
id: String!
|
|
431
|
+
): DealsRecord
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
"""The workspace object in the workspace."""
|
|
435
|
+
type workspaces implements IObject {
|
|
436
|
+
"""The name of the object."""
|
|
437
|
+
_name: String!
|
|
438
|
+
|
|
439
|
+
"""The slug of the object."""
|
|
440
|
+
slug: String!
|
|
441
|
+
|
|
442
|
+
"""The attributes of the object."""
|
|
443
|
+
attributes: [Attribute]
|
|
444
|
+
attribute(
|
|
445
|
+
"""Slug of the attribute"""
|
|
446
|
+
slug: String!
|
|
447
|
+
): Attribute
|
|
448
|
+
record(
|
|
449
|
+
"""ID of the workspace record."""
|
|
450
|
+
id: String!
|
|
451
|
+
): WorkspacesRecord
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
"""The user object in the workspace."""
|
|
455
|
+
type users implements IObject {
|
|
456
|
+
"""The name of the object."""
|
|
457
|
+
_name: String!
|
|
458
|
+
|
|
459
|
+
"""The slug of the object."""
|
|
460
|
+
slug: String!
|
|
461
|
+
|
|
462
|
+
"""The attributes of the object."""
|
|
463
|
+
attributes: [Attribute]
|
|
464
|
+
attribute(
|
|
465
|
+
"""Slug of the attribute"""
|
|
466
|
+
slug: String!
|
|
467
|
+
): Attribute
|
|
468
|
+
record(
|
|
469
|
+
"""ID of the user record."""
|
|
470
|
+
id: String!
|
|
471
|
+
): UsersRecord
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
"""An object in the workspace."""
|
|
475
|
+
interface IObject {
|
|
476
|
+
"""The name of the object."""
|
|
477
|
+
_name: String!
|
|
478
|
+
|
|
479
|
+
"""The slug of the object."""
|
|
480
|
+
slug: String!
|
|
481
|
+
|
|
482
|
+
"""The attributes of the object."""
|
|
483
|
+
attributes: [Attribute]
|
|
484
|
+
attribute(
|
|
485
|
+
"""Slug of the attribute"""
|
|
486
|
+
slug: String!
|
|
487
|
+
): Attribute
|
|
488
|
+
record(
|
|
489
|
+
"""ID of the record."""
|
|
490
|
+
id: String!
|
|
491
|
+
): Record
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
"""An object in the workspace."""
|
|
495
|
+
type Object implements IObject {
|
|
496
|
+
"""The name of the object."""
|
|
497
|
+
_name: String!
|
|
498
|
+
|
|
499
|
+
"""The slug of the object."""
|
|
500
|
+
slug: String!
|
|
501
|
+
|
|
502
|
+
"""The attributes of the object."""
|
|
503
|
+
attributes: [Attribute]
|
|
504
|
+
attribute(
|
|
505
|
+
"""Slug of the attribute"""
|
|
506
|
+
slug: String!
|
|
507
|
+
): Attribute
|
|
508
|
+
record(
|
|
509
|
+
"""ID of the record."""
|
|
510
|
+
id: String!
|
|
511
|
+
): Record
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
"""An object attribute."""
|
|
515
|
+
type Attribute {
|
|
516
|
+
"""The slug of the attribute."""
|
|
517
|
+
slug: String!
|
|
518
|
+
|
|
519
|
+
"""The name of the attribute."""
|
|
520
|
+
name: String
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
"""A record for a custom object."""
|
|
524
|
+
type CustomRecord implements Record {
|
|
525
|
+
attribute(
|
|
526
|
+
"""Slug of the attribute"""
|
|
527
|
+
slug: String!
|
|
528
|
+
): AttributeValue
|
|
529
|
+
|
|
530
|
+
"""The URL of the record in Attio."""
|
|
531
|
+
url: String!
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
type Query {
|
|
535
|
+
workspace: Workspace
|
|
536
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import net from "net";
|
|
2
|
+
export async function findAvailablePort(startPort) {
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
const server = net.createServer();
|
|
5
|
+
const tryPort = (port) => {
|
|
6
|
+
server.once("error", (err) => {
|
|
7
|
+
if (err.code === "EADDRINUSE") {
|
|
8
|
+
tryPort(port + 1);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
reject(err);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
server.once("listening", () => {
|
|
15
|
+
server.close(() => resolve(port));
|
|
16
|
+
});
|
|
17
|
+
server.listen(port);
|
|
18
|
+
};
|
|
19
|
+
tryPort(startPort);
|
|
20
|
+
});
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "attio",
|
|
3
|
-
"version": "0.0.1-experimental.
|
|
3
|
+
"version": "0.0.1-experimental.20240926",
|
|
4
4
|
"bin": "lib/attio.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"client.d.ts",
|
|
10
10
|
"server.d.ts",
|
|
11
11
|
"global.d.ts",
|
|
12
|
-
"lint.cjs"
|
|
12
|
+
"lint.cjs",
|
|
13
|
+
"schema.graphql"
|
|
13
14
|
],
|
|
14
15
|
"exports": {
|
|
15
16
|
"./client": {
|
|
@@ -27,6 +28,8 @@
|
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
31
|
+
"@hono/graphql-server": "0.5.1",
|
|
32
|
+
"@hono/node-server": "1.13.1",
|
|
30
33
|
"@swc/core": "^1.3.58",
|
|
31
34
|
"@xstate/react": "4.1.1",
|
|
32
35
|
"@xstate/store": "1.0.0",
|
|
@@ -37,6 +40,8 @@
|
|
|
37
40
|
"eslint": "^8.56.0",
|
|
38
41
|
"figures": "^6.1.0",
|
|
39
42
|
"glob": "10.3.16",
|
|
43
|
+
"graphql": "16.9.0",
|
|
44
|
+
"hono": "4.6.3",
|
|
40
45
|
"immer": "^5.0.0",
|
|
41
46
|
"ini": "^4.1.3",
|
|
42
47
|
"ink": "^5.0.1",
|
|
@@ -47,6 +52,7 @@
|
|
|
47
52
|
"ink-spinner": "^5.0.0",
|
|
48
53
|
"ink-text-input": "^6.0.0",
|
|
49
54
|
"murmurhash-js": "^1.0.0",
|
|
55
|
+
"open": "^7.0.0",
|
|
50
56
|
"pastel": "^3.0.0",
|
|
51
57
|
"react": "18.3.1",
|
|
52
58
|
"tmp-promise": "^3.0.3",
|
package/schema.graphql
ADDED
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
"""The current Attio workspace"""
|
|
2
|
+
type Workspace {
|
|
3
|
+
"""The name of the workspace."""
|
|
4
|
+
name: String
|
|
5
|
+
|
|
6
|
+
"""The slug of the workspace."""
|
|
7
|
+
slug: String
|
|
8
|
+
|
|
9
|
+
"""The objects inside the workspace."""
|
|
10
|
+
objects: [IObject]
|
|
11
|
+
object(
|
|
12
|
+
"""Slug of the object."""
|
|
13
|
+
slug: String!
|
|
14
|
+
): IObject
|
|
15
|
+
people: people
|
|
16
|
+
companies: companies
|
|
17
|
+
deals: deals
|
|
18
|
+
workspaces: workspaces
|
|
19
|
+
users: users
|
|
20
|
+
person(
|
|
21
|
+
"""The ID of the person record."""
|
|
22
|
+
id: String!
|
|
23
|
+
): PeopleRecord
|
|
24
|
+
company(
|
|
25
|
+
"""The ID of the company record."""
|
|
26
|
+
id: String!
|
|
27
|
+
): CompaniesRecord
|
|
28
|
+
deal(
|
|
29
|
+
"""The ID of the deal record."""
|
|
30
|
+
id: String!
|
|
31
|
+
): DealsRecord
|
|
32
|
+
workspace(
|
|
33
|
+
"""The ID of the workspace record."""
|
|
34
|
+
id: String!
|
|
35
|
+
): WorkspacesRecord
|
|
36
|
+
userRecord(
|
|
37
|
+
"""The ID of the user record."""
|
|
38
|
+
id: String!
|
|
39
|
+
): UsersRecord
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
"""The person object in the workspace."""
|
|
43
|
+
type people implements IObject {
|
|
44
|
+
"""The name of the object."""
|
|
45
|
+
_name: String!
|
|
46
|
+
|
|
47
|
+
"""The slug of the object."""
|
|
48
|
+
slug: String!
|
|
49
|
+
|
|
50
|
+
"""The attributes of the object."""
|
|
51
|
+
attributes: [Attribute]
|
|
52
|
+
attribute(
|
|
53
|
+
"""Slug of the attribute"""
|
|
54
|
+
slug: String!
|
|
55
|
+
): Attribute
|
|
56
|
+
record(
|
|
57
|
+
"""ID of the person record."""
|
|
58
|
+
id: String!
|
|
59
|
+
): PeopleRecord
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
"""A person record."""
|
|
63
|
+
type PeopleRecord implements Record {
|
|
64
|
+
attribute(
|
|
65
|
+
"""Slug of the attribute"""
|
|
66
|
+
slug: String!
|
|
67
|
+
): AttributeValue
|
|
68
|
+
|
|
69
|
+
"""The URL of the record in Attio."""
|
|
70
|
+
url: String!
|
|
71
|
+
name: PersonalName
|
|
72
|
+
email_addresses: [String!]
|
|
73
|
+
description: String
|
|
74
|
+
company: CompaniesRecord
|
|
75
|
+
job_title: String
|
|
76
|
+
avatar_url: String
|
|
77
|
+
phone_numbers: [String!]
|
|
78
|
+
primary_location: Location
|
|
79
|
+
angellist: String
|
|
80
|
+
facebook: String
|
|
81
|
+
instagram: String
|
|
82
|
+
linkedin: String
|
|
83
|
+
twitter: String
|
|
84
|
+
twitter_follower_count: Float
|
|
85
|
+
first_calendar_interaction: Interaction
|
|
86
|
+
last_calendar_interaction: Interaction
|
|
87
|
+
next_calendar_interaction: Interaction
|
|
88
|
+
last_email_interaction: Interaction
|
|
89
|
+
first_interaction: Interaction
|
|
90
|
+
last_interaction: Interaction
|
|
91
|
+
associated_deals: [DealsRecord!]
|
|
92
|
+
associated_users: [UsersRecord!]
|
|
93
|
+
list_entries: [Record!]
|
|
94
|
+
created_at: String
|
|
95
|
+
created_by: Actor
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
"""A record in the workspace."""
|
|
99
|
+
interface Record {
|
|
100
|
+
attribute(
|
|
101
|
+
"""Slug of the attribute"""
|
|
102
|
+
slug: String!
|
|
103
|
+
): AttributeValue
|
|
104
|
+
|
|
105
|
+
"""The URL of the record in Attio."""
|
|
106
|
+
url: String!
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
union AttributeValue = RecordReferenceValue | MultiRecordReferenceValue | PersonalNameValue | MultiPersonalNameValue | TextValue | MultiTextValue | DateValue | MultiDateValue | TimestampValue | MultiTimestampValue | NumberValue | MultiNumberValue | EmailAddressValue | MultiEmailAddressValue | DomainValue | MultiDomainValue | LocationValue | MultiLocationValue | InteractionValue | MultiInteractionValue | SelectValue | MultiSelectValue | PipelineValue | MultiPipelineValue | CheckboxValue | MultiCheckboxValue | RatingValue | MultiRatingValue | PhoneNumberValue | MultiPhoneNumberValue | CurrencyValue | MultiCurrencyValue | ActorReferenceValue | MultiActorReferenceValue
|
|
110
|
+
|
|
111
|
+
type RecordReferenceValue {
|
|
112
|
+
value: Record
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type MultiRecordReferenceValue {
|
|
116
|
+
values: [Record]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type PersonalNameValue {
|
|
120
|
+
value: PersonalName
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type PersonalName {
|
|
124
|
+
first: String
|
|
125
|
+
last: String
|
|
126
|
+
full: String
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
type MultiPersonalNameValue {
|
|
130
|
+
values: [PersonalName]
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
type TextValue {
|
|
134
|
+
value: String
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
type MultiTextValue {
|
|
138
|
+
values: [String]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type DateValue {
|
|
142
|
+
value: String
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
type MultiDateValue {
|
|
146
|
+
values: [String]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type TimestampValue {
|
|
150
|
+
value: String
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
type MultiTimestampValue {
|
|
154
|
+
values: [String]
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
type NumberValue {
|
|
158
|
+
value: Float
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
type MultiNumberValue {
|
|
162
|
+
values: [Float]
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
type EmailAddressValue {
|
|
166
|
+
value: String
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type MultiEmailAddressValue {
|
|
170
|
+
values: [String]
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
type DomainValue {
|
|
174
|
+
value: String
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
type MultiDomainValue {
|
|
178
|
+
values: [String]
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
type LocationValue {
|
|
182
|
+
value: Location
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
type Location {
|
|
186
|
+
line1: String
|
|
187
|
+
line2: String
|
|
188
|
+
line3: String
|
|
189
|
+
line4: String
|
|
190
|
+
locality: String
|
|
191
|
+
region: String
|
|
192
|
+
postcode: String
|
|
193
|
+
country: String
|
|
194
|
+
latitude: String
|
|
195
|
+
longitude: String
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
type MultiLocationValue {
|
|
199
|
+
values: [Location]
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
type InteractionValue {
|
|
203
|
+
value: Interaction
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
type Interaction {
|
|
207
|
+
timestamp: String!
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
type MultiInteractionValue {
|
|
211
|
+
values: [Interaction]
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
type SelectValue {
|
|
215
|
+
value: SelectOption
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
type SelectOption {
|
|
219
|
+
name: String!
|
|
220
|
+
id: String!
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
type MultiSelectValue {
|
|
224
|
+
values: [SelectOption]
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type PipelineValue {
|
|
228
|
+
value: PipelineStage
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type PipelineStage {
|
|
232
|
+
name: String!
|
|
233
|
+
id: String!
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
type MultiPipelineValue {
|
|
237
|
+
values: [PipelineStage]
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
type CheckboxValue {
|
|
241
|
+
value: Boolean!
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
type MultiCheckboxValue {
|
|
245
|
+
values: [Boolean!]
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
type RatingValue {
|
|
249
|
+
value: Int!
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
type MultiRatingValue {
|
|
253
|
+
values: [Int!]
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
type PhoneNumberValue {
|
|
257
|
+
value: String
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
type MultiPhoneNumberValue {
|
|
261
|
+
values: [String]
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
type CurrencyValue {
|
|
265
|
+
value: Money
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
type Money {
|
|
269
|
+
amount: Float!
|
|
270
|
+
currency: String!
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
type MultiCurrencyValue {
|
|
274
|
+
values: [Money]
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
type ActorReferenceValue {
|
|
278
|
+
value: Actor
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
"""An actor inside Attio."""
|
|
282
|
+
union Actor = User | SystemActor
|
|
283
|
+
|
|
284
|
+
"""An Attio user."""
|
|
285
|
+
type User {
|
|
286
|
+
email: String!
|
|
287
|
+
name: String!
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
"""A system inside Attio."""
|
|
291
|
+
type SystemActor {
|
|
292
|
+
name: String
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
type MultiActorReferenceValue {
|
|
296
|
+
values: [Actor]
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
"""A company record."""
|
|
300
|
+
type CompaniesRecord implements Record {
|
|
301
|
+
attribute(
|
|
302
|
+
"""Slug of the attribute"""
|
|
303
|
+
slug: String!
|
|
304
|
+
): AttributeValue
|
|
305
|
+
|
|
306
|
+
"""The URL of the record in Attio."""
|
|
307
|
+
url: String!
|
|
308
|
+
domains: [String!]
|
|
309
|
+
name: String
|
|
310
|
+
description: String
|
|
311
|
+
team: [PeopleRecord!]
|
|
312
|
+
categories: [SelectOption!]
|
|
313
|
+
primary_location: Location
|
|
314
|
+
logo_url: String
|
|
315
|
+
angellist: String
|
|
316
|
+
facebook: String
|
|
317
|
+
instagram: String
|
|
318
|
+
linkedin: String
|
|
319
|
+
twitter: String
|
|
320
|
+
twitter_follower_count: Float
|
|
321
|
+
estimated_arr_usd: SelectOption
|
|
322
|
+
funding_raised_usd: Money
|
|
323
|
+
foundation_date: String
|
|
324
|
+
employee_range: SelectOption
|
|
325
|
+
first_calendar_interaction: Interaction
|
|
326
|
+
last_calendar_interaction: Interaction
|
|
327
|
+
next_calendar_interaction: Interaction
|
|
328
|
+
last_email_interaction: Interaction
|
|
329
|
+
first_interaction: Interaction
|
|
330
|
+
last_interaction: Interaction
|
|
331
|
+
associated_deals: [DealsRecord!]
|
|
332
|
+
associated_workspaces: [WorkspacesRecord!]
|
|
333
|
+
list_entries: [Record!]
|
|
334
|
+
created_at: String
|
|
335
|
+
created_by: Actor
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
"""A deal record."""
|
|
339
|
+
type DealsRecord implements Record {
|
|
340
|
+
attribute(
|
|
341
|
+
"""Slug of the attribute"""
|
|
342
|
+
slug: String!
|
|
343
|
+
): AttributeValue
|
|
344
|
+
|
|
345
|
+
"""The URL of the record in Attio."""
|
|
346
|
+
url: String!
|
|
347
|
+
name: String
|
|
348
|
+
stage: PipelineStage
|
|
349
|
+
owner: Actor
|
|
350
|
+
value: Money
|
|
351
|
+
associated_people: [PeopleRecord!]
|
|
352
|
+
associated_company: CompaniesRecord
|
|
353
|
+
list_entries: [Record!]
|
|
354
|
+
created_at: String
|
|
355
|
+
created_by: Actor
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
"""A workspace record."""
|
|
359
|
+
type WorkspacesRecord implements Record {
|
|
360
|
+
attribute(
|
|
361
|
+
"""Slug of the attribute"""
|
|
362
|
+
slug: String!
|
|
363
|
+
): AttributeValue
|
|
364
|
+
|
|
365
|
+
"""The URL of the record in Attio."""
|
|
366
|
+
url: String!
|
|
367
|
+
workspace_id: String
|
|
368
|
+
name: String
|
|
369
|
+
users: [UsersRecord!]
|
|
370
|
+
company: CompaniesRecord
|
|
371
|
+
avatar_url: String
|
|
372
|
+
list_entries: [Record!]
|
|
373
|
+
created_at: String
|
|
374
|
+
created_by: Actor
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
"""A user record."""
|
|
378
|
+
type UsersRecord implements Record {
|
|
379
|
+
attribute(
|
|
380
|
+
"""Slug of the attribute"""
|
|
381
|
+
slug: String!
|
|
382
|
+
): AttributeValue
|
|
383
|
+
|
|
384
|
+
"""The URL of the record in Attio."""
|
|
385
|
+
url: String!
|
|
386
|
+
person: PeopleRecord
|
|
387
|
+
primary_email_address: String
|
|
388
|
+
workspace: WorkspacesRecord
|
|
389
|
+
list_entries: [Record!]
|
|
390
|
+
created_at: String
|
|
391
|
+
created_by: Actor
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
"""The company object in the workspace."""
|
|
395
|
+
type companies implements IObject {
|
|
396
|
+
"""The name of the object."""
|
|
397
|
+
_name: String!
|
|
398
|
+
|
|
399
|
+
"""The slug of the object."""
|
|
400
|
+
slug: String!
|
|
401
|
+
|
|
402
|
+
"""The attributes of the object."""
|
|
403
|
+
attributes: [Attribute]
|
|
404
|
+
attribute(
|
|
405
|
+
"""Slug of the attribute"""
|
|
406
|
+
slug: String!
|
|
407
|
+
): Attribute
|
|
408
|
+
record(
|
|
409
|
+
"""ID of the company record."""
|
|
410
|
+
id: String!
|
|
411
|
+
): CompaniesRecord
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
"""The deal object in the workspace."""
|
|
415
|
+
type deals implements IObject {
|
|
416
|
+
"""The name of the object."""
|
|
417
|
+
_name: String!
|
|
418
|
+
|
|
419
|
+
"""The slug of the object."""
|
|
420
|
+
slug: String!
|
|
421
|
+
|
|
422
|
+
"""The attributes of the object."""
|
|
423
|
+
attributes: [Attribute]
|
|
424
|
+
attribute(
|
|
425
|
+
"""Slug of the attribute"""
|
|
426
|
+
slug: String!
|
|
427
|
+
): Attribute
|
|
428
|
+
record(
|
|
429
|
+
"""ID of the deal record."""
|
|
430
|
+
id: String!
|
|
431
|
+
): DealsRecord
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
"""The workspace object in the workspace."""
|
|
435
|
+
type workspaces implements IObject {
|
|
436
|
+
"""The name of the object."""
|
|
437
|
+
_name: String!
|
|
438
|
+
|
|
439
|
+
"""The slug of the object."""
|
|
440
|
+
slug: String!
|
|
441
|
+
|
|
442
|
+
"""The attributes of the object."""
|
|
443
|
+
attributes: [Attribute]
|
|
444
|
+
attribute(
|
|
445
|
+
"""Slug of the attribute"""
|
|
446
|
+
slug: String!
|
|
447
|
+
): Attribute
|
|
448
|
+
record(
|
|
449
|
+
"""ID of the workspace record."""
|
|
450
|
+
id: String!
|
|
451
|
+
): WorkspacesRecord
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
"""The user object in the workspace."""
|
|
455
|
+
type users implements IObject {
|
|
456
|
+
"""The name of the object."""
|
|
457
|
+
_name: String!
|
|
458
|
+
|
|
459
|
+
"""The slug of the object."""
|
|
460
|
+
slug: String!
|
|
461
|
+
|
|
462
|
+
"""The attributes of the object."""
|
|
463
|
+
attributes: [Attribute]
|
|
464
|
+
attribute(
|
|
465
|
+
"""Slug of the attribute"""
|
|
466
|
+
slug: String!
|
|
467
|
+
): Attribute
|
|
468
|
+
record(
|
|
469
|
+
"""ID of the user record."""
|
|
470
|
+
id: String!
|
|
471
|
+
): UsersRecord
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
"""An object in the workspace."""
|
|
475
|
+
interface IObject {
|
|
476
|
+
"""The name of the object."""
|
|
477
|
+
_name: String!
|
|
478
|
+
|
|
479
|
+
"""The slug of the object."""
|
|
480
|
+
slug: String!
|
|
481
|
+
|
|
482
|
+
"""The attributes of the object."""
|
|
483
|
+
attributes: [Attribute]
|
|
484
|
+
attribute(
|
|
485
|
+
"""Slug of the attribute"""
|
|
486
|
+
slug: String!
|
|
487
|
+
): Attribute
|
|
488
|
+
record(
|
|
489
|
+
"""ID of the record."""
|
|
490
|
+
id: String!
|
|
491
|
+
): Record
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
"""An object in the workspace."""
|
|
495
|
+
type Object implements IObject {
|
|
496
|
+
"""The name of the object."""
|
|
497
|
+
_name: String!
|
|
498
|
+
|
|
499
|
+
"""The slug of the object."""
|
|
500
|
+
slug: String!
|
|
501
|
+
|
|
502
|
+
"""The attributes of the object."""
|
|
503
|
+
attributes: [Attribute]
|
|
504
|
+
attribute(
|
|
505
|
+
"""Slug of the attribute"""
|
|
506
|
+
slug: String!
|
|
507
|
+
): Attribute
|
|
508
|
+
record(
|
|
509
|
+
"""ID of the record."""
|
|
510
|
+
id: String!
|
|
511
|
+
): Record
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
"""An object attribute."""
|
|
515
|
+
type Attribute {
|
|
516
|
+
"""The slug of the attribute."""
|
|
517
|
+
slug: String!
|
|
518
|
+
|
|
519
|
+
"""The name of the attribute."""
|
|
520
|
+
name: String
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
"""A record for a custom object."""
|
|
524
|
+
type CustomRecord implements Record {
|
|
525
|
+
attribute(
|
|
526
|
+
"""Slug of the attribute"""
|
|
527
|
+
slug: String!
|
|
528
|
+
): AttributeValue
|
|
529
|
+
|
|
530
|
+
"""The URL of the record in Attio."""
|
|
531
|
+
url: String!
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
type Query {
|
|
535
|
+
workspace: Workspace
|
|
536
|
+
}
|