@activepieces/piece-moxie-crm 0.0.1
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/README.md +7 -0
- package/package.json +19 -0
- package/src/index.d.ts +8 -0
- package/src/index.js +45 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/create-client.d.ts +26 -0
- package/src/lib/actions/create-client.js +123 -0
- package/src/lib/actions/create-client.js.map +1 -0
- package/src/lib/actions/create-project.d.ts +16 -0
- package/src/lib/actions/create-project.js +154 -0
- package/src/lib/actions/create-project.js.map +1 -0
- package/src/lib/actions/create-task.d.ts +16 -0
- package/src/lib/actions/create-task.js +154 -0
- package/src/lib/actions/create-task.js.map +1 -0
- package/src/lib/common/client.d.ts +16 -0
- package/src/lib/common/client.js +68 -0
- package/src/lib/common/client.js.map +1 -0
- package/src/lib/common/index.d.ts +5 -0
- package/src/lib/common/index.js +19 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/common/models.d.ts +77 -0
- package/src/lib/common/models.js +3 -0
- package/src/lib/common/models.js.map +1 -0
- package/src/lib/triggers/index.d.ts +30 -0
- package/src/lib/triggers/index.js +828 -0
- package/src/lib/triggers/index.js.map +1 -0
- package/src/lib/triggers/register-trigger.d.ts +14 -0
- package/src/lib/triggers/register-trigger.js +48 -0
- package/src/lib/triggers/register-trigger.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-moxie-crm",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@sinclair/typebox": "0.26.8",
|
|
6
|
+
"axios": "^1.6.0",
|
|
7
|
+
"dayjs": "1.11.9",
|
|
8
|
+
"is-base64": "1.1.0",
|
|
9
|
+
"lodash": "4.17.21",
|
|
10
|
+
"nanoid": "3.3.6",
|
|
11
|
+
"semver": "7.5.4",
|
|
12
|
+
"@activepieces/pieces-common": "0.2.5",
|
|
13
|
+
"@activepieces/pieces-framework": "0.7.4",
|
|
14
|
+
"@activepieces/shared": "0.10.40",
|
|
15
|
+
"tslib": "2.6.1"
|
|
16
|
+
},
|
|
17
|
+
"main": "./src/index.js",
|
|
18
|
+
"type": "commonjs"
|
|
19
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const moxieCRMAuth: import("@activepieces/pieces-framework").CustomAuthProperty<true, {
|
|
2
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const moxieCrm: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<true, {
|
|
6
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
7
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moxieCrm = exports.moxieCRMAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
const triggers_1 = require("./lib/triggers");
|
|
6
|
+
const create_project_1 = require("./lib/actions/create-project");
|
|
7
|
+
const create_client_1 = require("./lib/actions/create-client");
|
|
8
|
+
const create_task_1 = require("./lib/actions/create-task");
|
|
9
|
+
exports.moxieCRMAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
10
|
+
required: true,
|
|
11
|
+
description: `
|
|
12
|
+
To obtain your Moxie CRM token, follow these steps:
|
|
13
|
+
|
|
14
|
+
1. Log in to your Moxie CRM account and click on **Workspace Settings** (Bottom left).
|
|
15
|
+
2. Click on **Connected Apps** and navigate to **Integrations** tab.
|
|
16
|
+
3. Now, under "Custom Integration", click on **Enable Custom Integration**.
|
|
17
|
+
4. Copy **API Key** and **Base URL** and click on Save button.
|
|
18
|
+
`,
|
|
19
|
+
props: {
|
|
20
|
+
apiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
21
|
+
displayName: 'API Key',
|
|
22
|
+
description: 'The API Key of the Moxie CRM account',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
baseUrl: pieces_framework_1.Property.ShortText({
|
|
26
|
+
displayName: 'Base URL',
|
|
27
|
+
description: 'The Base URL of the Moxie CRM account',
|
|
28
|
+
required: true,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
exports.moxieCrm = (0, pieces_framework_1.createPiece)({
|
|
33
|
+
displayName: 'Moxie CRM',
|
|
34
|
+
auth: exports.moxieCRMAuth,
|
|
35
|
+
minimumSupportedRelease: '0.9.0',
|
|
36
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/moxie-crm.png',
|
|
37
|
+
authors: ['kishanprmr'],
|
|
38
|
+
actions: [
|
|
39
|
+
create_client_1.moxieCreateClientAction,
|
|
40
|
+
create_task_1.moxieCreateTaskAction,
|
|
41
|
+
create_project_1.moxieCreateProjectAction,
|
|
42
|
+
],
|
|
43
|
+
triggers: triggers_1.moxieCRMTriggers,
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/moxie-crm/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAIwC;AACxC,6CAAkD;AAClD,iEAAwE;AACxE,+DAAsE;AACtE,2DAAkE;AACrD,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC/C,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE;;;;;;;GAOZ;IACD,KAAK,EAAE;QACL,MAAM,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC3B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;CACF,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,oBAAY;IAClB,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,CAAC,YAAY,CAAC;IACvB,OAAO,EAAE;QACP,uCAAuB;QACvB,mCAAqB;QACrB,yCAAwB;KACzB;IACD,QAAQ,EAAE,2BAAgB;CAC3B,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const moxieCreateClientAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<true, {
|
|
2
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
clientType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
|
+
initials: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
+
address1: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
address2: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
city: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
locality: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
postal: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
+
country: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
website: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
15
|
+
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
color: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
17
|
+
taxId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
18
|
+
leadSource: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
19
|
+
archive: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
20
|
+
payInstructions: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
21
|
+
hourlyAmount: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
22
|
+
roundingIncrement: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
23
|
+
currency: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
24
|
+
stripeClientId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
25
|
+
notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moxieCreateClientAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
exports.moxieCreateClientAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.moxieCRMAuth,
|
|
10
|
+
name: 'moxie_create_client',
|
|
11
|
+
displayName: 'Create a Client',
|
|
12
|
+
description: 'Create a new client record in moxie CRM.',
|
|
13
|
+
props: {
|
|
14
|
+
name: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Name',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
clientType: pieces_framework_1.Property.StaticDropdown({
|
|
19
|
+
displayName: 'Client Type',
|
|
20
|
+
required: true,
|
|
21
|
+
defaultValue: 'Client',
|
|
22
|
+
options: {
|
|
23
|
+
disabled: false,
|
|
24
|
+
options: [
|
|
25
|
+
{
|
|
26
|
+
label: 'Client',
|
|
27
|
+
value: 'Client',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Prospect',
|
|
31
|
+
value: 'Prospect',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
initials: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'Initials',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
address1: pieces_framework_1.Property.ShortText({
|
|
41
|
+
displayName: 'Address 1',
|
|
42
|
+
required: false,
|
|
43
|
+
}),
|
|
44
|
+
address2: pieces_framework_1.Property.ShortText({
|
|
45
|
+
displayName: 'Address 2',
|
|
46
|
+
required: false,
|
|
47
|
+
}),
|
|
48
|
+
city: pieces_framework_1.Property.ShortText({
|
|
49
|
+
displayName: 'City',
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
52
|
+
locality: pieces_framework_1.Property.ShortText({
|
|
53
|
+
displayName: 'Locality',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
postal: pieces_framework_1.Property.ShortText({
|
|
57
|
+
displayName: 'Postal',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
country: pieces_framework_1.Property.ShortText({
|
|
61
|
+
displayName: 'Country',
|
|
62
|
+
required: false,
|
|
63
|
+
description: 'ISO 3166-1 alpha-2 country code',
|
|
64
|
+
}),
|
|
65
|
+
website: pieces_framework_1.Property.ShortText({
|
|
66
|
+
displayName: 'Website',
|
|
67
|
+
required: false,
|
|
68
|
+
}),
|
|
69
|
+
phone: pieces_framework_1.Property.ShortText({
|
|
70
|
+
displayName: 'Phone',
|
|
71
|
+
required: false,
|
|
72
|
+
}),
|
|
73
|
+
color: pieces_framework_1.Property.ShortText({
|
|
74
|
+
displayName: 'Color',
|
|
75
|
+
required: false,
|
|
76
|
+
}),
|
|
77
|
+
taxId: pieces_framework_1.Property.ShortText({
|
|
78
|
+
displayName: 'Tax ID',
|
|
79
|
+
required: false,
|
|
80
|
+
}),
|
|
81
|
+
leadSource: pieces_framework_1.Property.ShortText({
|
|
82
|
+
displayName: 'Lead Source',
|
|
83
|
+
required: false,
|
|
84
|
+
}),
|
|
85
|
+
archive: pieces_framework_1.Property.Checkbox({
|
|
86
|
+
displayName: 'Archive ?',
|
|
87
|
+
required: true,
|
|
88
|
+
defaultValue: false,
|
|
89
|
+
}),
|
|
90
|
+
payInstructions: pieces_framework_1.Property.LongText({
|
|
91
|
+
displayName: 'Pay Instructions',
|
|
92
|
+
required: false,
|
|
93
|
+
}),
|
|
94
|
+
hourlyAmount: pieces_framework_1.Property.Number({
|
|
95
|
+
displayName: 'Hourly Amount',
|
|
96
|
+
required: false,
|
|
97
|
+
}),
|
|
98
|
+
roundingIncrement: pieces_framework_1.Property.Number({
|
|
99
|
+
displayName: 'Rounding Increment',
|
|
100
|
+
required: false,
|
|
101
|
+
}),
|
|
102
|
+
currency: pieces_framework_1.Property.ShortText({
|
|
103
|
+
displayName: 'Currency',
|
|
104
|
+
required: false,
|
|
105
|
+
description: 'Valid 3-Letter ISO 4217 currency code.',
|
|
106
|
+
}),
|
|
107
|
+
stripeClientId: pieces_framework_1.Property.ShortText({
|
|
108
|
+
displayName: 'Stripe Client ID',
|
|
109
|
+
required: false,
|
|
110
|
+
}),
|
|
111
|
+
notes: pieces_framework_1.Property.LongText({
|
|
112
|
+
displayName: 'Notes',
|
|
113
|
+
required: false,
|
|
114
|
+
}),
|
|
115
|
+
},
|
|
116
|
+
run({ auth, propsValue }) {
|
|
117
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
119
|
+
return yield client.createClient(propsValue);
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=create-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-client.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/moxie-crm/src/lib/actions/create-client.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAuC;AACvC,6BAAqC;AAExB,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,gBAAY;IAClB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAClC,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,QAAQ;wBACf,KAAK,EAAE,QAAQ;qBAChB;oBACD;wBACE,KAAK,EAAE,UAAU;wBACjB,KAAK,EAAE,UAAU;qBAClB;iBACF;aACF;SACF,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,E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,CAAC,MAAM,CAAC;YACjC,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,wCAAwC;SACtD,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;YACtC,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC/C,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const moxieCreateProjectAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<true, {
|
|
2
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
clientName: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
7
|
+
startDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
8
|
+
dueDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
9
|
+
portalAccess: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
|
+
showTimeWorkedInPortal: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
11
|
+
feeType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
12
|
+
amount: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
+
estimateMax: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
14
|
+
estimateMin: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
15
|
+
taxable: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moxieCreateProjectAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
exports.moxieCreateProjectAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.moxieCRMAuth,
|
|
10
|
+
name: 'moxie_create_project',
|
|
11
|
+
description: 'Creates a new project in moxie CRM.',
|
|
12
|
+
displayName: 'Create a Project',
|
|
13
|
+
props: {
|
|
14
|
+
name: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Project Name',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
clientName: pieces_framework_1.Property.Dropdown({
|
|
19
|
+
displayName: 'Client',
|
|
20
|
+
required: true,
|
|
21
|
+
refreshers: [],
|
|
22
|
+
options: ({ auth }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
if (!auth) {
|
|
24
|
+
return {
|
|
25
|
+
disabled: true,
|
|
26
|
+
placeholder: 'Connect your account first',
|
|
27
|
+
options: [],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
31
|
+
const clients = yield client.listClients();
|
|
32
|
+
return {
|
|
33
|
+
disabled: false,
|
|
34
|
+
options: clients.map((client) => {
|
|
35
|
+
return {
|
|
36
|
+
label: client.name,
|
|
37
|
+
value: client.name,
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
}),
|
|
42
|
+
}),
|
|
43
|
+
startDate: pieces_framework_1.Property.DateTime({
|
|
44
|
+
displayName: 'Start Date',
|
|
45
|
+
description: 'Please enter date in YYYY-MM-DD format.',
|
|
46
|
+
required: false,
|
|
47
|
+
}),
|
|
48
|
+
dueDate: pieces_framework_1.Property.DateTime({
|
|
49
|
+
displayName: 'Due Date',
|
|
50
|
+
description: 'Please enter date in YYYY-MM-DD format.',
|
|
51
|
+
required: false,
|
|
52
|
+
}),
|
|
53
|
+
portalAccess: pieces_framework_1.Property.StaticDropdown({
|
|
54
|
+
displayName: 'Client Portal Access',
|
|
55
|
+
description: 'One of: None, Overview, Full access, or Read only.',
|
|
56
|
+
required: true,
|
|
57
|
+
defaultValue: 'Read Only',
|
|
58
|
+
options: {
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
label: 'Not Visible',
|
|
62
|
+
value: 'None',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Overview only',
|
|
66
|
+
value: 'Overview',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: 'Read only project collaboration',
|
|
70
|
+
value: 'Read only',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'Full project collaboration',
|
|
74
|
+
value: 'Full access',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
showTimeWorkedInPortal: pieces_framework_1.Property.Checkbox({
|
|
80
|
+
displayName: 'Show time worked in portal ?',
|
|
81
|
+
required: false,
|
|
82
|
+
defaultValue: true,
|
|
83
|
+
}),
|
|
84
|
+
feeType: pieces_framework_1.Property.StaticDropdown({
|
|
85
|
+
displayName: 'Fee Type',
|
|
86
|
+
description: 'One of: Hourly, Fixed Price, Retainer, Per Item.',
|
|
87
|
+
required: true,
|
|
88
|
+
options: {
|
|
89
|
+
options: [
|
|
90
|
+
{
|
|
91
|
+
label: 'Hourly',
|
|
92
|
+
value: 'Hourly',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: 'Fixed Price',
|
|
96
|
+
value: 'Fixed Price',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: 'Retainer',
|
|
100
|
+
value: 'Retainer',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: 'Per Item',
|
|
104
|
+
value: 'Per Item',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
amount: pieces_framework_1.Property.Number({
|
|
110
|
+
displayName: 'Amount',
|
|
111
|
+
required: false,
|
|
112
|
+
defaultValue: 0,
|
|
113
|
+
}),
|
|
114
|
+
estimateMax: pieces_framework_1.Property.Number({
|
|
115
|
+
displayName: 'Estimate maximum Amount',
|
|
116
|
+
required: false,
|
|
117
|
+
defaultValue: 0,
|
|
118
|
+
}),
|
|
119
|
+
estimateMin: pieces_framework_1.Property.Number({
|
|
120
|
+
displayName: 'Estimate minimum Amount',
|
|
121
|
+
required: false,
|
|
122
|
+
defaultValue: 0,
|
|
123
|
+
}),
|
|
124
|
+
taxable: pieces_framework_1.Property.Checkbox({
|
|
125
|
+
displayName: 'Is amount taxable ?',
|
|
126
|
+
required: false,
|
|
127
|
+
defaultValue: false,
|
|
128
|
+
}),
|
|
129
|
+
},
|
|
130
|
+
run({ auth, propsValue }) {
|
|
131
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const { name, clientName, portalAccess, showTimeWorkedInPortal, feeType, amount, estimateMax, estimateMin, taxable, } = propsValue;
|
|
133
|
+
const dueDate = (0, common_1.reformatDate)(propsValue.dueDate);
|
|
134
|
+
const startDate = (0, common_1.reformatDate)(propsValue.startDate);
|
|
135
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
136
|
+
return yield client.createProject({
|
|
137
|
+
name,
|
|
138
|
+
clientName,
|
|
139
|
+
startDate,
|
|
140
|
+
dueDate,
|
|
141
|
+
portalAccess,
|
|
142
|
+
showTimeWorkedInPortal,
|
|
143
|
+
feeSchedule: {
|
|
144
|
+
feeType,
|
|
145
|
+
amount,
|
|
146
|
+
estimateMax,
|
|
147
|
+
estimateMin,
|
|
148
|
+
taxable,
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=create-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-project.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/moxie-crm/src/lib/actions/create-project.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,sCAAqD;AACrD,6BAAqC;AAExB,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,gBAAY;IAClB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,qCAAqC;IAClD,WAAW,EAAE,kBAAkB;IAC/B,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,QAAQ;YACrB,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,CAAO,EAAE,IAAI,EAAE,EAAE,EAAE;gBAC1B,IAAI,CAAC,IAAI,EAAE;oBACT,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;wBACzC,OAAO,EAAE,EAAE;qBACZ,CAAC;iBACH;gBAED,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,EAC7B,IAAiD,CAClD,CAAC;gBACF,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;gBAC3C,O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AAC,CAAC;YACtC,OAAO,MAAM,MAAM,CAAC,aAAa,CAAC;gBAChC,IAAI;gBACJ,UAAU;gBACV,SAAS;gBACT,OAAO;gBACP,YAAY;gBACZ,sBAAsB;gBACtB,WAAW,EAAE;oBACX,OAAO;oBACP,MAAM;oBACN,WAAW;oBACX,WAAW;oBACX,OAAO;iBACR;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const moxieCreateTaskAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<true, {
|
|
2
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
clientName: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
7
|
+
projectName: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
8
|
+
status: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
9
|
+
description: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
10
|
+
startDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
11
|
+
dueDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
12
|
+
priority: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
+
tasks: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
14
|
+
assignedTo: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
15
|
+
customValues: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moxieCreateTaskAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
exports.moxieCreateTaskAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.moxieCRMAuth,
|
|
10
|
+
name: 'moxie_create_task',
|
|
11
|
+
displayName: 'Create a Task',
|
|
12
|
+
description: 'Create a task in project.',
|
|
13
|
+
props: {
|
|
14
|
+
name: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Name',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
clientName: pieces_framework_1.Property.Dropdown({
|
|
19
|
+
displayName: 'Client Name',
|
|
20
|
+
description: 'Exact match of a client name in your CRM',
|
|
21
|
+
required: true,
|
|
22
|
+
refreshers: [],
|
|
23
|
+
options: ({ auth }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
if (!auth) {
|
|
25
|
+
return {
|
|
26
|
+
disabled: true,
|
|
27
|
+
placeholder: 'Connect your account first',
|
|
28
|
+
options: [],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
32
|
+
const clients = yield client.listClients();
|
|
33
|
+
return {
|
|
34
|
+
disabled: false,
|
|
35
|
+
options: clients.map((client) => {
|
|
36
|
+
return {
|
|
37
|
+
label: client.name,
|
|
38
|
+
value: client.name,
|
|
39
|
+
};
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
}),
|
|
43
|
+
}),
|
|
44
|
+
projectName: pieces_framework_1.Property.Dropdown({
|
|
45
|
+
displayName: 'Project Name',
|
|
46
|
+
description: 'Exact match of a project that is owned by the client.',
|
|
47
|
+
required: true,
|
|
48
|
+
refreshers: ['clientName'],
|
|
49
|
+
options: ({ auth, clientName }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
50
|
+
if (!auth || !clientName) {
|
|
51
|
+
return {
|
|
52
|
+
disabled: true,
|
|
53
|
+
placeholder: 'Connect your account first and select client',
|
|
54
|
+
options: [],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
58
|
+
const projects = yield client.searchProjects(clientName);
|
|
59
|
+
return {
|
|
60
|
+
disabled: false,
|
|
61
|
+
options: projects.map((project) => {
|
|
62
|
+
return {
|
|
63
|
+
label: project.name,
|
|
64
|
+
value: project.name,
|
|
65
|
+
};
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
}),
|
|
69
|
+
}),
|
|
70
|
+
status: pieces_framework_1.Property.Dropdown({
|
|
71
|
+
displayName: 'Status',
|
|
72
|
+
required: true,
|
|
73
|
+
defaultValue: 'Not Started',
|
|
74
|
+
refreshers: [],
|
|
75
|
+
options: ({ auth }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
+
if (!auth) {
|
|
77
|
+
return {
|
|
78
|
+
disabled: true,
|
|
79
|
+
placeholder: 'Connect your account first',
|
|
80
|
+
options: [],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
84
|
+
const stages = yield client.listProjectTaskStages();
|
|
85
|
+
return {
|
|
86
|
+
disabled: false,
|
|
87
|
+
options: stages.map((stage) => {
|
|
88
|
+
return {
|
|
89
|
+
label: stage.label,
|
|
90
|
+
value: stage.label,
|
|
91
|
+
};
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
}),
|
|
95
|
+
}),
|
|
96
|
+
description: pieces_framework_1.Property.LongText({
|
|
97
|
+
displayName: 'Description',
|
|
98
|
+
required: false,
|
|
99
|
+
}),
|
|
100
|
+
startDate: pieces_framework_1.Property.DateTime({
|
|
101
|
+
displayName: 'Start Date',
|
|
102
|
+
required: false,
|
|
103
|
+
description: 'ISO 8601 format date i.e. 2023-07-20',
|
|
104
|
+
}),
|
|
105
|
+
dueDate: pieces_framework_1.Property.DateTime({
|
|
106
|
+
displayName: 'Due Date',
|
|
107
|
+
required: false,
|
|
108
|
+
description: 'ISO 8601 format date i.e. 2023-07-20',
|
|
109
|
+
}),
|
|
110
|
+
priority: pieces_framework_1.Property.Number({
|
|
111
|
+
displayName: 'Priority',
|
|
112
|
+
required: false,
|
|
113
|
+
description: 'Numeric priority for sorting in kanban.',
|
|
114
|
+
}),
|
|
115
|
+
tasks: pieces_framework_1.Property.Array({
|
|
116
|
+
displayName: 'Subtasks',
|
|
117
|
+
required: false,
|
|
118
|
+
}),
|
|
119
|
+
assignedTo: pieces_framework_1.Property.Array({
|
|
120
|
+
displayName: 'Assigned To',
|
|
121
|
+
required: false,
|
|
122
|
+
description: 'email addresses of users in the workspace.',
|
|
123
|
+
}),
|
|
124
|
+
customValues: pieces_framework_1.Property.Object({
|
|
125
|
+
displayName: 'Custom Values',
|
|
126
|
+
required: false,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
run({ auth, propsValue }) {
|
|
130
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
const { name, clientName, projectName, status, description, priority } = propsValue;
|
|
132
|
+
const dueDate = (0, common_1.reformatDate)(propsValue.dueDate);
|
|
133
|
+
const startDate = (0, common_1.reformatDate)(propsValue.startDate);
|
|
134
|
+
const tasks = propsValue.tasks || [];
|
|
135
|
+
const assignedTo = propsValue.assignedTo || [];
|
|
136
|
+
const customValues = propsValue.customValues || {};
|
|
137
|
+
const client = yield (0, common_1.makeClient)(auth);
|
|
138
|
+
return yield client.createTask({
|
|
139
|
+
name,
|
|
140
|
+
clientName,
|
|
141
|
+
projectName,
|
|
142
|
+
status,
|
|
143
|
+
description,
|
|
144
|
+
dueDate,
|
|
145
|
+
startDate,
|
|
146
|
+
priority,
|
|
147
|
+
tasks,
|
|
148
|
+
assignedTo,
|
|
149
|
+
customValues,
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=create-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/moxie-crm/src/lib/actions/create-task.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,sCAAqD;AACrD,6BAAqC;AAExB,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,gBAAY;IAClB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,CAAO,EAAE,IAAI,EAAE,EAAE,EAAE;gBAC1B,IAAI,CAAC,IAAI,EAAE;oBACT,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;wBACzC,OAAO,EAAE,EAAE;qBACZ,CAAC;iBACH;gBAED,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,EAC7B,IAAiD,CAClD,CAAC;gBACF,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;gBAC3C,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;wBAC9B,OAAO;4BACL,KAAK,EAAE,MAAM,CAAC,IAAI;4BAClB,KAAK,EAAE,MAAM,CAAC,IAAI;yBACnB,CAAC;oBACJ,CAAC,CAAC;iBACH,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;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E,QAAQ,EAAE,GACpE,UAAU,CAAC;YACb,MAAM,OAAO,GAAG,IAAA,qBAAY,EAAC,UAAU,CAAC,OAAO,CAAW,CAAC;YAC3D,MAAM,SAAS,GAAG,IAAA,qBAAY,EAAC,UAAU,CAAC,SAAS,CAAW,CAAC;YAC/D,MAAM,KAAK,GAAI,UAAU,CAAC,KAAkB,IAAI,EAAE,CAAC;YACnD,MAAM,UAAU,GAAI,UAAU,CAAC,UAAuB,IAAI,EAAE,CAAC;YAC7D,MAAM,YAAY,GACf,UAAU,CAAC,YAAuC,IAAI,EAAE,CAAC;YAC5D,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;YACtC,OAAO,MAAM,MAAM,CAAC,UAAU,CAAC;gBAC7B,IAAI;gBACJ,UAAU;gBACV,WAAW;gBACX,MAAM;gBACN,WAAW;gBACX,OAAO;gBACP,SAAS;gBACT,QAAQ;gBACR,KAAK;gBACL,UAAU;gBACV,YAAY;aACb,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpMethod, HttpMessageBody, HttpResponse, QueryParams } from '@activepieces/pieces-common';
|
|
2
|
+
import { ContactCreateRequest, ClientCreateRequest, ClientListResponse, TaskCreateRequest, ProjectCreateRequest, ProjectSearchResponse, ProjectTaskStageListResponse } from './models';
|
|
3
|
+
export declare class MoxieCRMClient {
|
|
4
|
+
private baseUrl;
|
|
5
|
+
private apiKey;
|
|
6
|
+
constructor(baseUrl: string, apiKey: string);
|
|
7
|
+
makeRequest<T extends HttpMessageBody>(method: HttpMethod, resourceUri: string, body?: any | undefined, query?: QueryParams): Promise<HttpResponse<T>>;
|
|
8
|
+
createContact(request: ContactCreateRequest): Promise<HttpMessageBody>;
|
|
9
|
+
createClient(request: ClientCreateRequest): Promise<HttpMessageBody>;
|
|
10
|
+
listClients(): Promise<ClientListResponse[]>;
|
|
11
|
+
listInvoiceTemplates(): Promise<string[]>;
|
|
12
|
+
createProject(request: ProjectCreateRequest): Promise<HttpMessageBody>;
|
|
13
|
+
createTask(request: TaskCreateRequest): Promise<HttpMessageBody>;
|
|
14
|
+
searchProjects(clientName: string): Promise<ProjectSearchResponse[]>;
|
|
15
|
+
listProjectTaskStages(): Promise<ProjectTaskStageListResponse[]>;
|
|
16
|
+
}
|