@composable-os/pack-leads 0.1.0-beta.11 → 0.1.0-beta.13
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/automations.d.ts +0 -2
- package/dist/automations.js +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.js +1 -1
- package/dist/tools.d.ts +0 -4
- package/dist/tools.js +3 -11
- package/package.json +2 -2
package/dist/automations.d.ts
CHANGED
package/dist/automations.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// them on under Automations. They declare their steps, so the host renders the summary from them.
|
|
3
3
|
import { defineAutomation } from "@composable-os/sdk";
|
|
4
4
|
/** Days a lead may stay New before its owner is reminded. */
|
|
5
|
-
|
|
5
|
+
const NEW_LEAD_REMINDER_DAYS = 2;
|
|
6
6
|
export const notifyNewLead = defineAutomation({
|
|
7
7
|
label: "Notify the owner of a new lead",
|
|
8
8
|
description: "When a lead is created with an owner, tells the owner about it.",
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { defineExtension } from "@composable-os/sdk";
|
|
|
8
8
|
import { leadAutomations } from "./automations.js";
|
|
9
9
|
import { leadsDashboard } from "./dashboards.js";
|
|
10
10
|
import { convert, disqualify, UNQUALIFIED_REASONS } from "./tools.js";
|
|
11
|
-
|
|
11
|
+
const SOURCES = [
|
|
12
12
|
{ value: "website", label: "Website" },
|
|
13
13
|
{ value: "referral", label: "Referral" },
|
|
14
14
|
{ value: "event", label: "Event" },
|
package/dist/tools.d.ts
CHANGED
|
@@ -22,10 +22,6 @@ export declare const UNQUALIFIED_REASONS: readonly [{
|
|
|
22
22
|
readonly value: "other";
|
|
23
23
|
readonly label: "Other";
|
|
24
24
|
}];
|
|
25
|
-
/** The deal field Leads adds (`fields["deals.deal"].lead`), by its registry name. */
|
|
26
|
-
export declare const DEAL_LEAD_FIELD = "leads.lead";
|
|
27
|
-
/** The lifecycle extension's person field, when that extension is installed. */
|
|
28
|
-
export declare const LIFECYCLE_FIELD = "lifecycle.lifecycleStage";
|
|
29
25
|
export declare const convert: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
|
|
30
26
|
leadId: z.ZodString;
|
|
31
27
|
dealName: z.ZodOptional<z.ZodString>;
|
package/dist/tools.js
CHANGED
|
@@ -14,9 +14,9 @@ export const UNQUALIFIED_REASONS = [
|
|
|
14
14
|
{ value: "other", label: "Other" },
|
|
15
15
|
];
|
|
16
16
|
/** The deal field Leads adds (`fields["deals.deal"].lead`), by its registry name. */
|
|
17
|
-
|
|
17
|
+
const DEAL_LEAD_FIELD = "leads.lead";
|
|
18
18
|
/** The lifecycle extension's person field, when that extension is installed. */
|
|
19
|
-
|
|
19
|
+
const LIFECYCLE_FIELD = "lifecycle.lifecycleStage";
|
|
20
20
|
/** Lifecycle stages conversion moves forward to opportunity (later ones are left alone). */
|
|
21
21
|
const BEFORE_OPPORTUNITY = new Set([
|
|
22
22
|
null,
|
|
@@ -172,15 +172,7 @@ export const disqualify = defineTool({
|
|
|
172
172
|
},
|
|
173
173
|
input: z.object({
|
|
174
174
|
leadId: z.string().min(1).describe("The lead (leads.lead record id)"),
|
|
175
|
-
reason: z.enum(
|
|
176
|
-
"noBudget",
|
|
177
|
-
"noNeed",
|
|
178
|
-
"noAuthority",
|
|
179
|
-
"badTiming",
|
|
180
|
-
"competitor",
|
|
181
|
-
"unresponsive",
|
|
182
|
-
"other",
|
|
183
|
-
]),
|
|
175
|
+
reason: z.enum(UNQUALIFIED_REASONS.map((r) => r.value)),
|
|
184
176
|
}),
|
|
185
177
|
output: z.object({ leadId: z.string(), status: z.string(), reason: z.string() }),
|
|
186
178
|
async handler(input, ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composable-os/pack-leads",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.13",
|
|
4
4
|
"license": "FSL-1.1-ALv2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
"description": "Inbound interest worked from a leads inbox, qualified or disqualified, and converted into deals. Requires Deals."
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@composable-os/sdk": "0.1.0-beta.
|
|
30
|
+
"@composable-os/sdk": "0.1.0-beta.13"
|
|
31
31
|
}
|
|
32
32
|
}
|