@composable-os/pack-deals 0.0.0-stage → 0.1.0-beta.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/LICENSE +109 -0
- package/dist/automations.d.ts +49 -0
- package/dist/automations.js +173 -0
- package/dist/client/index.d.ts +87 -0
- package/dist/client/index.js +25 -0
- package/dist/dashboards.d.ts +3 -0
- package/dist/dashboards.js +318 -0
- package/dist/index.d.ts +643 -0
- package/dist/index.js +388 -0
- package/dist/tools.d.ts +21 -0
- package/dist/tools.js +90 -0
- package/package.json +30 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
declare const _default: import("@composable-os/sdk").Extension<{
|
|
2
|
+
readonly id: "deals";
|
|
3
|
+
readonly version: "1.2.0";
|
|
4
|
+
readonly contractVersion: 1;
|
|
5
|
+
readonly label: "Deals";
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly permissions: {
|
|
8
|
+
readonly read: ["organisation", "person", "activity"];
|
|
9
|
+
readonly write: ["task"];
|
|
10
|
+
readonly operations: ["query.sql", "notification.send"];
|
|
11
|
+
readonly modules: ["ops", "log"];
|
|
12
|
+
};
|
|
13
|
+
readonly objects: {
|
|
14
|
+
readonly pipeline: {
|
|
15
|
+
readonly label: "Pipeline";
|
|
16
|
+
readonly plural: "Pipelines";
|
|
17
|
+
readonly icon: "kanban";
|
|
18
|
+
readonly titleField: "name";
|
|
19
|
+
readonly description: "A sales process: an ordered set of stages deals move through.";
|
|
20
|
+
readonly navigation: "settings";
|
|
21
|
+
readonly fields: {
|
|
22
|
+
readonly name: {
|
|
23
|
+
readonly type: "text";
|
|
24
|
+
readonly label: "Name";
|
|
25
|
+
readonly required: true;
|
|
26
|
+
};
|
|
27
|
+
readonly position: {
|
|
28
|
+
readonly type: "number";
|
|
29
|
+
readonly label: "Order";
|
|
30
|
+
};
|
|
31
|
+
readonly description: {
|
|
32
|
+
readonly type: "longText";
|
|
33
|
+
readonly label: "Description";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly indexes: readonly [readonly ["position"]];
|
|
37
|
+
readonly seed: {
|
|
38
|
+
readonly newBusiness: {
|
|
39
|
+
readonly name: "New business";
|
|
40
|
+
readonly position: 1;
|
|
41
|
+
};
|
|
42
|
+
readonly renewals: {
|
|
43
|
+
readonly name: "Renewals";
|
|
44
|
+
readonly position: 2;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly stage: {
|
|
49
|
+
readonly label: "Stage";
|
|
50
|
+
readonly plural: "Stages";
|
|
51
|
+
readonly icon: "list-ordered";
|
|
52
|
+
readonly titleField: "name";
|
|
53
|
+
readonly description: string;
|
|
54
|
+
readonly navigation: "settings";
|
|
55
|
+
readonly fields: {
|
|
56
|
+
readonly name: {
|
|
57
|
+
readonly type: "text";
|
|
58
|
+
readonly label: "Name";
|
|
59
|
+
readonly required: true;
|
|
60
|
+
};
|
|
61
|
+
readonly pipeline: {
|
|
62
|
+
readonly type: "relation";
|
|
63
|
+
readonly label: "Pipeline";
|
|
64
|
+
readonly to: "deals.pipeline";
|
|
65
|
+
readonly required: true;
|
|
66
|
+
};
|
|
67
|
+
readonly position: {
|
|
68
|
+
readonly type: "number";
|
|
69
|
+
readonly label: "Order";
|
|
70
|
+
readonly required: true;
|
|
71
|
+
};
|
|
72
|
+
readonly type: {
|
|
73
|
+
readonly type: "select";
|
|
74
|
+
readonly label: "Type";
|
|
75
|
+
readonly required: true;
|
|
76
|
+
readonly options: readonly [{
|
|
77
|
+
readonly value: "open";
|
|
78
|
+
readonly label: "Open";
|
|
79
|
+
}, {
|
|
80
|
+
readonly value: "won";
|
|
81
|
+
readonly label: "Won";
|
|
82
|
+
readonly color: "green";
|
|
83
|
+
}, {
|
|
84
|
+
readonly value: "lost";
|
|
85
|
+
readonly label: "Lost";
|
|
86
|
+
readonly color: "red";
|
|
87
|
+
}];
|
|
88
|
+
};
|
|
89
|
+
readonly probability: {
|
|
90
|
+
readonly type: "percent";
|
|
91
|
+
readonly label: "Default probability";
|
|
92
|
+
};
|
|
93
|
+
readonly requiredFields: {
|
|
94
|
+
readonly type: "multiSelect";
|
|
95
|
+
readonly label: "Required fields";
|
|
96
|
+
readonly description: "Deal fields that must have a value to enter this stage.";
|
|
97
|
+
readonly options: {
|
|
98
|
+
value: string;
|
|
99
|
+
label: string;
|
|
100
|
+
}[];
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
readonly indexes: readonly [readonly ["pipeline", "position"]];
|
|
104
|
+
readonly seed: {
|
|
105
|
+
readonly nbLead: {
|
|
106
|
+
name: string;
|
|
107
|
+
pipeline: {
|
|
108
|
+
seed: string;
|
|
109
|
+
};
|
|
110
|
+
position: number;
|
|
111
|
+
type: "open" | "won" | "lost";
|
|
112
|
+
probability: number;
|
|
113
|
+
requiredFields: string[];
|
|
114
|
+
};
|
|
115
|
+
readonly nbQualified: {
|
|
116
|
+
name: string;
|
|
117
|
+
pipeline: {
|
|
118
|
+
seed: string;
|
|
119
|
+
};
|
|
120
|
+
position: number;
|
|
121
|
+
type: "open" | "won" | "lost";
|
|
122
|
+
probability: number;
|
|
123
|
+
requiredFields: string[];
|
|
124
|
+
};
|
|
125
|
+
readonly nbProposal: {
|
|
126
|
+
name: string;
|
|
127
|
+
pipeline: {
|
|
128
|
+
seed: string;
|
|
129
|
+
};
|
|
130
|
+
position: number;
|
|
131
|
+
type: "open" | "won" | "lost";
|
|
132
|
+
probability: number;
|
|
133
|
+
requiredFields: string[];
|
|
134
|
+
};
|
|
135
|
+
readonly nbNegotiation: {
|
|
136
|
+
name: string;
|
|
137
|
+
pipeline: {
|
|
138
|
+
seed: string;
|
|
139
|
+
};
|
|
140
|
+
position: number;
|
|
141
|
+
type: "open" | "won" | "lost";
|
|
142
|
+
probability: number;
|
|
143
|
+
requiredFields: string[];
|
|
144
|
+
};
|
|
145
|
+
readonly nbWon: {
|
|
146
|
+
name: string;
|
|
147
|
+
pipeline: {
|
|
148
|
+
seed: string;
|
|
149
|
+
};
|
|
150
|
+
position: number;
|
|
151
|
+
type: "open" | "won" | "lost";
|
|
152
|
+
probability: number;
|
|
153
|
+
requiredFields: string[];
|
|
154
|
+
};
|
|
155
|
+
readonly nbLost: {
|
|
156
|
+
name: string;
|
|
157
|
+
pipeline: {
|
|
158
|
+
seed: string;
|
|
159
|
+
};
|
|
160
|
+
position: number;
|
|
161
|
+
type: "open" | "won" | "lost";
|
|
162
|
+
probability: number;
|
|
163
|
+
requiredFields: string[];
|
|
164
|
+
};
|
|
165
|
+
readonly rnUpcoming: {
|
|
166
|
+
name: string;
|
|
167
|
+
pipeline: {
|
|
168
|
+
seed: string;
|
|
169
|
+
};
|
|
170
|
+
position: number;
|
|
171
|
+
type: "open" | "won" | "lost";
|
|
172
|
+
probability: number;
|
|
173
|
+
requiredFields: string[];
|
|
174
|
+
};
|
|
175
|
+
readonly rnInDiscussion: {
|
|
176
|
+
name: string;
|
|
177
|
+
pipeline: {
|
|
178
|
+
seed: string;
|
|
179
|
+
};
|
|
180
|
+
position: number;
|
|
181
|
+
type: "open" | "won" | "lost";
|
|
182
|
+
probability: number;
|
|
183
|
+
requiredFields: string[];
|
|
184
|
+
};
|
|
185
|
+
readonly rnCommitted: {
|
|
186
|
+
name: string;
|
|
187
|
+
pipeline: {
|
|
188
|
+
seed: string;
|
|
189
|
+
};
|
|
190
|
+
position: number;
|
|
191
|
+
type: "open" | "won" | "lost";
|
|
192
|
+
probability: number;
|
|
193
|
+
requiredFields: string[];
|
|
194
|
+
};
|
|
195
|
+
readonly rnRenewed: {
|
|
196
|
+
name: string;
|
|
197
|
+
pipeline: {
|
|
198
|
+
seed: string;
|
|
199
|
+
};
|
|
200
|
+
position: number;
|
|
201
|
+
type: "open" | "won" | "lost";
|
|
202
|
+
probability: number;
|
|
203
|
+
requiredFields: string[];
|
|
204
|
+
};
|
|
205
|
+
readonly rnChurned: {
|
|
206
|
+
name: string;
|
|
207
|
+
pipeline: {
|
|
208
|
+
seed: string;
|
|
209
|
+
};
|
|
210
|
+
position: number;
|
|
211
|
+
type: "open" | "won" | "lost";
|
|
212
|
+
probability: number;
|
|
213
|
+
requiredFields: string[];
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
readonly deal: {
|
|
218
|
+
readonly label: "Deal";
|
|
219
|
+
readonly plural: "Deals";
|
|
220
|
+
readonly icon: "handshake";
|
|
221
|
+
readonly titleField: "name";
|
|
222
|
+
readonly description: "A potential sale moving through a pipeline.";
|
|
223
|
+
readonly owner: "owner";
|
|
224
|
+
readonly navigationOrder: 20;
|
|
225
|
+
readonly fields: {
|
|
226
|
+
readonly name: {
|
|
227
|
+
readonly type: "text";
|
|
228
|
+
readonly label: "Name";
|
|
229
|
+
readonly required: true;
|
|
230
|
+
};
|
|
231
|
+
readonly value: {
|
|
232
|
+
readonly type: "currency";
|
|
233
|
+
readonly label: "Value";
|
|
234
|
+
readonly description: "In the deployment's base currency (Settings → General).";
|
|
235
|
+
};
|
|
236
|
+
readonly pipeline: {
|
|
237
|
+
readonly type: "relation";
|
|
238
|
+
readonly label: "Pipeline";
|
|
239
|
+
readonly to: "deals.pipeline";
|
|
240
|
+
readonly description: "Defaults to the Default pipeline setting (New business).";
|
|
241
|
+
};
|
|
242
|
+
readonly stage: {
|
|
243
|
+
readonly type: "relation";
|
|
244
|
+
readonly label: "Stage";
|
|
245
|
+
readonly to: "deals.stage";
|
|
246
|
+
readonly track: "timeline";
|
|
247
|
+
readonly description: "Defaults to the pipeline's first stage. Stage rules apply on entering it.";
|
|
248
|
+
};
|
|
249
|
+
readonly status: {
|
|
250
|
+
readonly type: "select";
|
|
251
|
+
readonly label: "Status";
|
|
252
|
+
readonly readOnly: true;
|
|
253
|
+
readonly description: "Open, won or lost: the type of the deal's stage.";
|
|
254
|
+
readonly options: readonly [{
|
|
255
|
+
readonly value: "open";
|
|
256
|
+
readonly label: "Open";
|
|
257
|
+
}, {
|
|
258
|
+
readonly value: "won";
|
|
259
|
+
readonly label: "Won";
|
|
260
|
+
readonly color: "green";
|
|
261
|
+
}, {
|
|
262
|
+
readonly value: "lost";
|
|
263
|
+
readonly label: "Lost";
|
|
264
|
+
readonly color: "red";
|
|
265
|
+
}];
|
|
266
|
+
};
|
|
267
|
+
readonly expectedClose: {
|
|
268
|
+
readonly type: "date";
|
|
269
|
+
readonly label: "Expected close";
|
|
270
|
+
};
|
|
271
|
+
readonly probability: {
|
|
272
|
+
readonly type: "percent";
|
|
273
|
+
readonly label: "Probability";
|
|
274
|
+
readonly description: "Follows the stage's default unless set by hand.";
|
|
275
|
+
};
|
|
276
|
+
readonly probabilityOverridden: {
|
|
277
|
+
readonly type: "boolean";
|
|
278
|
+
readonly label: "Probability set by hand";
|
|
279
|
+
readonly description: "Clear it to go back to the stage's default probability.";
|
|
280
|
+
};
|
|
281
|
+
readonly weightedValue: {
|
|
282
|
+
readonly type: "formula";
|
|
283
|
+
readonly label: "Weighted value";
|
|
284
|
+
readonly expression: "round(coalesce(value, 0) * coalesce(probability, 0) / 100, 2)";
|
|
285
|
+
};
|
|
286
|
+
readonly owner: {
|
|
287
|
+
readonly type: "user";
|
|
288
|
+
readonly label: "Owner";
|
|
289
|
+
};
|
|
290
|
+
readonly organisation: {
|
|
291
|
+
readonly type: "relation";
|
|
292
|
+
readonly label: "Organisation";
|
|
293
|
+
readonly to: "organisation";
|
|
294
|
+
};
|
|
295
|
+
readonly source: {
|
|
296
|
+
readonly type: "select";
|
|
297
|
+
readonly label: "Source";
|
|
298
|
+
readonly options: readonly [{
|
|
299
|
+
readonly value: "inbound";
|
|
300
|
+
readonly label: "Inbound";
|
|
301
|
+
}, {
|
|
302
|
+
readonly value: "outbound";
|
|
303
|
+
readonly label: "Outbound";
|
|
304
|
+
}, {
|
|
305
|
+
readonly value: "referral";
|
|
306
|
+
readonly label: "Referral";
|
|
307
|
+
}, {
|
|
308
|
+
readonly value: "partner";
|
|
309
|
+
readonly label: "Partner";
|
|
310
|
+
}, {
|
|
311
|
+
readonly value: "event";
|
|
312
|
+
readonly label: "Event";
|
|
313
|
+
}, {
|
|
314
|
+
readonly value: "existing";
|
|
315
|
+
readonly label: "Existing customer";
|
|
316
|
+
}, {
|
|
317
|
+
readonly value: "other";
|
|
318
|
+
readonly label: "Other";
|
|
319
|
+
}];
|
|
320
|
+
};
|
|
321
|
+
readonly lostReason: {
|
|
322
|
+
readonly type: "select";
|
|
323
|
+
readonly label: "Lost reason";
|
|
324
|
+
readonly description: "Required to move a deal to a lost stage.";
|
|
325
|
+
readonly options: readonly [{
|
|
326
|
+
readonly value: "price";
|
|
327
|
+
readonly label: "Price";
|
|
328
|
+
}, {
|
|
329
|
+
readonly value: "competitor";
|
|
330
|
+
readonly label: "Went with a competitor";
|
|
331
|
+
}, {
|
|
332
|
+
readonly value: "noBudget";
|
|
333
|
+
readonly label: "No budget";
|
|
334
|
+
}, {
|
|
335
|
+
readonly value: "noDecision";
|
|
336
|
+
readonly label: "No decision";
|
|
337
|
+
}, {
|
|
338
|
+
readonly value: "timing";
|
|
339
|
+
readonly label: "Timing";
|
|
340
|
+
}, {
|
|
341
|
+
readonly value: "productFit";
|
|
342
|
+
readonly label: "Product fit";
|
|
343
|
+
}, {
|
|
344
|
+
readonly value: "other";
|
|
345
|
+
readonly label: "Other";
|
|
346
|
+
}];
|
|
347
|
+
};
|
|
348
|
+
readonly nextStep: {
|
|
349
|
+
readonly type: "text";
|
|
350
|
+
readonly label: "Next step";
|
|
351
|
+
};
|
|
352
|
+
readonly nextStepDate: {
|
|
353
|
+
readonly type: "date";
|
|
354
|
+
readonly label: "Next step date";
|
|
355
|
+
};
|
|
356
|
+
readonly closedAt: {
|
|
357
|
+
readonly type: "datetime";
|
|
358
|
+
readonly label: "Won/lost date";
|
|
359
|
+
readonly readOnly: true;
|
|
360
|
+
readonly description: "Set when the deal enters a won or lost stage; cleared when it reopens.";
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
readonly stages: {
|
|
364
|
+
readonly field: "stage";
|
|
365
|
+
readonly stage: {
|
|
366
|
+
readonly type: "type";
|
|
367
|
+
readonly order: "position";
|
|
368
|
+
readonly requiredFields: "requiredFields";
|
|
369
|
+
readonly probability: "probability";
|
|
370
|
+
readonly group: "pipeline";
|
|
371
|
+
};
|
|
372
|
+
readonly group: "pipeline";
|
|
373
|
+
readonly probability: {
|
|
374
|
+
readonly field: "probability";
|
|
375
|
+
readonly overridden: "probabilityOverridden";
|
|
376
|
+
};
|
|
377
|
+
readonly closedDate: "closedAt";
|
|
378
|
+
readonly status: "status";
|
|
379
|
+
readonly requiredByType: {
|
|
380
|
+
readonly lost: readonly ["lostReason"];
|
|
381
|
+
};
|
|
382
|
+
readonly defaultGroupSetting: "defaultPipeline";
|
|
383
|
+
};
|
|
384
|
+
readonly timelineLinks: readonly ["organisation"];
|
|
385
|
+
readonly indexes: readonly [readonly ["stage"], readonly ["pipeline", "status"], readonly ["status", "expectedClose"], readonly ["status", "closedAt"], readonly ["organisation"], readonly ["owner", "status"], readonly ["status", "updatedAt"]];
|
|
386
|
+
};
|
|
387
|
+
readonly participant: {
|
|
388
|
+
readonly label: "Deal participant";
|
|
389
|
+
readonly plural: "Deal participants";
|
|
390
|
+
readonly icon: "users";
|
|
391
|
+
readonly titleField: "role";
|
|
392
|
+
readonly description: "A person involved in a deal, and their role in it.";
|
|
393
|
+
readonly navigation: "none";
|
|
394
|
+
readonly fields: {
|
|
395
|
+
readonly role: {
|
|
396
|
+
readonly type: "select";
|
|
397
|
+
readonly label: "Role";
|
|
398
|
+
readonly required: true;
|
|
399
|
+
readonly options: readonly [{
|
|
400
|
+
readonly value: "decisionMaker";
|
|
401
|
+
readonly label: "Decision maker";
|
|
402
|
+
}, {
|
|
403
|
+
readonly value: "champion";
|
|
404
|
+
readonly label: "Champion";
|
|
405
|
+
}, {
|
|
406
|
+
readonly value: "influencer";
|
|
407
|
+
readonly label: "Influencer";
|
|
408
|
+
}, {
|
|
409
|
+
readonly value: "user";
|
|
410
|
+
readonly label: "User";
|
|
411
|
+
}, {
|
|
412
|
+
readonly value: "other";
|
|
413
|
+
readonly label: "Other";
|
|
414
|
+
}];
|
|
415
|
+
};
|
|
416
|
+
readonly deal: {
|
|
417
|
+
readonly type: "relation";
|
|
418
|
+
readonly label: "Deal";
|
|
419
|
+
readonly to: "deals.deal";
|
|
420
|
+
readonly required: true;
|
|
421
|
+
};
|
|
422
|
+
readonly person: {
|
|
423
|
+
readonly type: "relation";
|
|
424
|
+
readonly label: "Person";
|
|
425
|
+
readonly to: "person";
|
|
426
|
+
readonly required: true;
|
|
427
|
+
};
|
|
428
|
+
readonly note: {
|
|
429
|
+
readonly type: "text";
|
|
430
|
+
readonly label: "Note";
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
readonly indexes: readonly [readonly ["deal"], readonly ["person"]];
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readonly views: {
|
|
437
|
+
readonly myOpenDeals: {
|
|
438
|
+
readonly label: "My open deals";
|
|
439
|
+
readonly object: "deals.deal";
|
|
440
|
+
readonly filter: {
|
|
441
|
+
readonly and: [{
|
|
442
|
+
readonly field: "status";
|
|
443
|
+
readonly op: "eq";
|
|
444
|
+
readonly value: "open";
|
|
445
|
+
}, {
|
|
446
|
+
readonly field: "owner";
|
|
447
|
+
readonly op: "eq";
|
|
448
|
+
readonly value: {
|
|
449
|
+
readonly $relative: "me";
|
|
450
|
+
};
|
|
451
|
+
}];
|
|
452
|
+
};
|
|
453
|
+
readonly sort: {
|
|
454
|
+
readonly field: "expectedClose";
|
|
455
|
+
readonly direction: "asc";
|
|
456
|
+
};
|
|
457
|
+
readonly columns: string[];
|
|
458
|
+
};
|
|
459
|
+
readonly closingThisMonth: {
|
|
460
|
+
readonly label: "Closing this month";
|
|
461
|
+
readonly object: "deals.deal";
|
|
462
|
+
readonly filter: {
|
|
463
|
+
readonly and: [{
|
|
464
|
+
readonly field: "status";
|
|
465
|
+
readonly op: "eq";
|
|
466
|
+
readonly value: "open";
|
|
467
|
+
}, {
|
|
468
|
+
readonly field: "expectedClose";
|
|
469
|
+
readonly op: "gte";
|
|
470
|
+
readonly value: {
|
|
471
|
+
readonly $relative: "startOfMonth";
|
|
472
|
+
};
|
|
473
|
+
}, {
|
|
474
|
+
readonly field: "expectedClose";
|
|
475
|
+
readonly op: "lt";
|
|
476
|
+
readonly value: {
|
|
477
|
+
readonly $relative: "startOfNextMonth";
|
|
478
|
+
};
|
|
479
|
+
}];
|
|
480
|
+
};
|
|
481
|
+
readonly sort: {
|
|
482
|
+
readonly field: "expectedClose";
|
|
483
|
+
readonly direction: "asc";
|
|
484
|
+
};
|
|
485
|
+
readonly columns: string[];
|
|
486
|
+
};
|
|
487
|
+
readonly wonThisQuarter: {
|
|
488
|
+
readonly label: "Won this quarter";
|
|
489
|
+
readonly object: "deals.deal";
|
|
490
|
+
readonly filter: {
|
|
491
|
+
readonly and: [{
|
|
492
|
+
readonly field: "status";
|
|
493
|
+
readonly op: "eq";
|
|
494
|
+
readonly value: "won";
|
|
495
|
+
}, {
|
|
496
|
+
readonly field: "closedAt";
|
|
497
|
+
readonly op: "gte";
|
|
498
|
+
readonly value: {
|
|
499
|
+
readonly $relative: "startOfQuarter";
|
|
500
|
+
};
|
|
501
|
+
}, {
|
|
502
|
+
readonly field: "closedAt";
|
|
503
|
+
readonly op: "lt";
|
|
504
|
+
readonly value: {
|
|
505
|
+
readonly $relative: "startOfNextQuarter";
|
|
506
|
+
};
|
|
507
|
+
}];
|
|
508
|
+
};
|
|
509
|
+
readonly sort: {
|
|
510
|
+
readonly field: "closedAt";
|
|
511
|
+
readonly direction: "desc";
|
|
512
|
+
};
|
|
513
|
+
readonly columns: ["name", "value", "closedAt", "owner", "organisation", "pipeline"];
|
|
514
|
+
};
|
|
515
|
+
readonly pipelineBoard: {
|
|
516
|
+
readonly label: "Pipeline board";
|
|
517
|
+
readonly type: "board";
|
|
518
|
+
readonly object: "deals.deal";
|
|
519
|
+
readonly groupBy: "stage";
|
|
520
|
+
readonly sumField: "value";
|
|
521
|
+
readonly cardFields: ["value", "organisation", "expectedClose", "owner"];
|
|
522
|
+
readonly sort: {
|
|
523
|
+
readonly field: "expectedClose";
|
|
524
|
+
readonly direction: "asc";
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
readonly recordTabs: {
|
|
529
|
+
readonly organisationDeals: {
|
|
530
|
+
readonly label: "Deals";
|
|
531
|
+
readonly on: "organisation";
|
|
532
|
+
readonly view: {
|
|
533
|
+
readonly type: "table";
|
|
534
|
+
readonly object: "deals.deal";
|
|
535
|
+
readonly relation: "organisation";
|
|
536
|
+
readonly columns: ["name", "stage", "value", "expectedClose", "owner", "status"];
|
|
537
|
+
readonly sort: {
|
|
538
|
+
readonly field: "expectedClose";
|
|
539
|
+
readonly direction: "desc";
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
readonly order: 20;
|
|
543
|
+
};
|
|
544
|
+
readonly personDeals: {
|
|
545
|
+
readonly label: "Deals";
|
|
546
|
+
readonly on: "person";
|
|
547
|
+
readonly view: {
|
|
548
|
+
readonly type: "table";
|
|
549
|
+
readonly object: "deals.participant";
|
|
550
|
+
readonly relation: "person";
|
|
551
|
+
readonly columns: ["deal", "role", "note"];
|
|
552
|
+
};
|
|
553
|
+
readonly order: 20;
|
|
554
|
+
};
|
|
555
|
+
readonly dealPeople: {
|
|
556
|
+
readonly label: "People";
|
|
557
|
+
readonly on: "deals.deal";
|
|
558
|
+
readonly view: {
|
|
559
|
+
readonly type: "table";
|
|
560
|
+
readonly object: "deals.participant";
|
|
561
|
+
readonly relation: "deal";
|
|
562
|
+
readonly columns: ["person", "role", "note"];
|
|
563
|
+
};
|
|
564
|
+
readonly order: 10;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
readonly recordPanels: {
|
|
568
|
+
readonly organisationOpenDeals: {
|
|
569
|
+
readonly label: "Open deals";
|
|
570
|
+
readonly on: "organisation";
|
|
571
|
+
readonly view: {
|
|
572
|
+
readonly type: "table";
|
|
573
|
+
readonly object: "deals.deal";
|
|
574
|
+
readonly relation: "organisation";
|
|
575
|
+
readonly filter: {
|
|
576
|
+
readonly field: "status";
|
|
577
|
+
readonly op: "eq";
|
|
578
|
+
readonly value: "open";
|
|
579
|
+
};
|
|
580
|
+
readonly columns: ["name", "stage", "value"];
|
|
581
|
+
readonly sort: {
|
|
582
|
+
readonly field: "expectedClose";
|
|
583
|
+
readonly direction: "asc";
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
readonly settings: {
|
|
589
|
+
readonly defaultPipeline: {
|
|
590
|
+
readonly type: "text";
|
|
591
|
+
readonly label: "Default pipeline";
|
|
592
|
+
readonly description: "The pipeline (by name or id) a new deal goes in when none is chosen.";
|
|
593
|
+
readonly default: "New business";
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
readonly dashboards: {
|
|
597
|
+
readonly salesOverview: import("@composable-os/sdk").DashboardDeclaration;
|
|
598
|
+
readonly pipelineHealth: import("@composable-os/sdk").DashboardDeclaration;
|
|
599
|
+
};
|
|
600
|
+
readonly tools: {
|
|
601
|
+
readonly stageMetrics: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
|
|
602
|
+
pipelineId: import("zod").ZodString;
|
|
603
|
+
since: import("zod").ZodOptional<import("zod").ZodString>;
|
|
604
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
605
|
+
pipelineId: import("zod").ZodString;
|
|
606
|
+
stages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
607
|
+
stageId: import("zod").ZodString;
|
|
608
|
+
stage: import("zod").ZodString;
|
|
609
|
+
type: import("zod").ZodString;
|
|
610
|
+
entered: import("zod").ZodNumber;
|
|
611
|
+
current: import("zod").ZodNumber;
|
|
612
|
+
avgDaysInStage: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
613
|
+
avgDaysBeforeMovingOn: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
614
|
+
}, import("zod/v4/core").$strip>>;
|
|
615
|
+
velocity: import("zod").ZodObject<{
|
|
616
|
+
won: import("zod").ZodNumber;
|
|
617
|
+
avgDaysToWin: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
618
|
+
wonValue: import("zod").ZodNumber;
|
|
619
|
+
}, import("zod/v4/core").$strip>;
|
|
620
|
+
}, import("zod/v4/core").$strip>>;
|
|
621
|
+
};
|
|
622
|
+
readonly automations: {
|
|
623
|
+
stalledDeal: import("@composable-os/sdk").AutomationSpec<{
|
|
624
|
+
readonly type: "schedule";
|
|
625
|
+
readonly cron: "0 8 * * *";
|
|
626
|
+
}>;
|
|
627
|
+
wonOnboarding: import("@composable-os/sdk").AutomationSpec<{
|
|
628
|
+
readonly type: "fieldChanged";
|
|
629
|
+
readonly object: "deals.deal";
|
|
630
|
+
readonly field: "stage";
|
|
631
|
+
readonly to: {
|
|
632
|
+
readonly stageType: "won";
|
|
633
|
+
};
|
|
634
|
+
}>;
|
|
635
|
+
closeDatePassed: import("@composable-os/sdk").AutomationSpec<{
|
|
636
|
+
readonly type: "dateRelative";
|
|
637
|
+
readonly object: "deals.deal";
|
|
638
|
+
readonly field: "expectedClose";
|
|
639
|
+
readonly offsetDays: 1;
|
|
640
|
+
}>;
|
|
641
|
+
};
|
|
642
|
+
}>;
|
|
643
|
+
export default _default;
|