@activepieces/piece-wayfront 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/package.json +17 -0
- package/src/index.d.ts +5 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +39 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/complete-activity.d.ts +14 -0
- package/src/lib/actions/complete-activity.d.ts.map +1 -0
- package/src/lib/actions/complete-activity.js +26 -0
- package/src/lib/actions/complete-activity.js.map +1 -0
- package/src/lib/actions/create-activity.d.ts +16 -0
- package/src/lib/actions/create-activity.d.ts.map +1 -0
- package/src/lib/actions/create-activity.js +41 -0
- package/src/lib/actions/create-activity.js.map +1 -0
- package/src/lib/actions/create-client.d.ts +25 -0
- package/src/lib/actions/create-client.d.ts.map +1 -0
- package/src/lib/actions/create-client.js +118 -0
- package/src/lib/actions/create-client.js.map +1 -0
- package/src/lib/actions/create-order.d.ts +23 -0
- package/src/lib/actions/create-order.d.ts.map +1 -0
- package/src/lib/actions/create-order.js +104 -0
- package/src/lib/actions/create-order.js.map +1 -0
- package/src/lib/actions/create-ticket.d.ts +17 -0
- package/src/lib/actions/create-ticket.d.ts.map +1 -0
- package/src/lib/actions/create-ticket.js +74 -0
- package/src/lib/actions/create-ticket.js.map +1 -0
- package/src/lib/actions/list-orders.d.ts +8 -0
- package/src/lib/actions/list-orders.d.ts.map +1 -0
- package/src/lib/actions/list-orders.js +40 -0
- package/src/lib/actions/list-orders.js.map +1 -0
- package/src/lib/actions/list-tickets.d.ts +8 -0
- package/src/lib/actions/list-tickets.d.ts.map +1 -0
- package/src/lib/actions/list-tickets.js +41 -0
- package/src/lib/actions/list-tickets.js.map +1 -0
- package/src/lib/actions/update-activity.d.ts +20 -0
- package/src/lib/actions/update-activity.d.ts.map +1 -0
- package/src/lib/actions/update-activity.js +42 -0
- package/src/lib/actions/update-activity.js.map +1 -0
- package/src/lib/actions/update-client.d.ts +30 -0
- package/src/lib/actions/update-client.d.ts.map +1 -0
- package/src/lib/actions/update-client.js +129 -0
- package/src/lib/actions/update-client.js.map +1 -0
- package/src/lib/actions/update-order.d.ts +22 -0
- package/src/lib/actions/update-order.d.ts.map +1 -0
- package/src/lib/actions/update-order.js +102 -0
- package/src/lib/actions/update-order.js.map +1 -0
- package/src/lib/actions/update-ticket.d.ts +16 -0
- package/src/lib/actions/update-ticket.d.ts.map +1 -0
- package/src/lib/actions/update-ticket.js +69 -0
- package/src/lib/actions/update-ticket.js.map +1 -0
- package/src/lib/auth.d.ts +5 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +27 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/index.d.ts +249 -0
- package/src/lib/common/index.d.ts.map +1 -0
- package/src/lib/common/index.js +330 -0
- package/src/lib/common/index.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-wayfront",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
9
|
+
"@activepieces/pieces-framework": "0.28.1",
|
|
10
|
+
"@activepieces/shared": "0.76.6",
|
|
11
|
+
"tslib": "2.6.2"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
15
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const wayfront: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>>;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,QAAQ;;;GAqBnB,CAAC"}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wayfront = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
const auth_1 = require("./lib/auth");
|
|
6
|
+
const create_client_1 = require("./lib/actions/create-client");
|
|
7
|
+
const update_client_1 = require("./lib/actions/update-client");
|
|
8
|
+
const create_activity_1 = require("./lib/actions/create-activity");
|
|
9
|
+
const update_activity_1 = require("./lib/actions/update-activity");
|
|
10
|
+
const complete_activity_1 = require("./lib/actions/complete-activity");
|
|
11
|
+
const create_ticket_1 = require("./lib/actions/create-ticket");
|
|
12
|
+
const list_tickets_1 = require("./lib/actions/list-tickets");
|
|
13
|
+
const update_ticket_1 = require("./lib/actions/update-ticket");
|
|
14
|
+
const list_orders_1 = require("./lib/actions/list-orders");
|
|
15
|
+
const create_order_1 = require("./lib/actions/create-order");
|
|
16
|
+
const update_order_1 = require("./lib/actions/update-order");
|
|
17
|
+
exports.wayfront = (0, pieces_framework_1.createPiece)({
|
|
18
|
+
displayName: 'Wayfront',
|
|
19
|
+
description: 'Unify your process, automate steps, and help clients find what they need.',
|
|
20
|
+
auth: auth_1.wayfrontAuth,
|
|
21
|
+
minimumSupportedRelease: '0.36.1',
|
|
22
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/wayfront.png',
|
|
23
|
+
authors: ['onyedikachi-david'],
|
|
24
|
+
actions: [
|
|
25
|
+
create_client_1.createClientAction,
|
|
26
|
+
update_client_1.updateClientAction,
|
|
27
|
+
create_activity_1.createActivityAction,
|
|
28
|
+
update_activity_1.updateActivityAction,
|
|
29
|
+
complete_activity_1.completeActivityAction,
|
|
30
|
+
create_ticket_1.createTicketAction,
|
|
31
|
+
list_tickets_1.listTicketsAction,
|
|
32
|
+
update_ticket_1.updateTicketAction,
|
|
33
|
+
list_orders_1.listOrdersAction,
|
|
34
|
+
create_order_1.createOrderAction,
|
|
35
|
+
update_order_1.updateOrderAction,
|
|
36
|
+
],
|
|
37
|
+
triggers: [],
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAC7D,qCAA0C;AAC1C,+DAAiE;AACjE,+DAAiE;AACjE,mEAAqE;AACrE,mEAAqE;AACrE,uEAAyE;AACzE,+DAAiE;AACjE,6DAA+D;AAC/D,+DAAiE;AACjE,2DAA6D;AAC7D,6DAA+D;AAC/D,6DAA+D;AAElD,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,2EAA2E;IACxF,IAAI,EAAE,mBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,CAAC,mBAAmB,CAAC;IAC9B,OAAO,EAAE;QACP,kCAAkB;QAClB,kCAAkB;QAClB,sCAAoB;QACpB,sCAAoB;QACpB,0CAAsB;QACtB,kCAAkB;QAClB,gCAAiB;QACjB,kCAAkB;QAClB,8BAAgB;QAChB,gCAAiB;QACjB,gCAAiB;KAClB;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const completeActivityAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
user_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
activity_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
10
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
12
|
+
}>>;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=complete-activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete-activity.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/complete-activity.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAmBjC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.completeActivityAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
exports.completeActivityAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: auth_1.wayfrontAuth,
|
|
10
|
+
name: 'complete_activity',
|
|
11
|
+
displayName: 'Complete Activity',
|
|
12
|
+
description: 'Marks a scheduled activity as complete for a client in Wayfront.',
|
|
13
|
+
props: {
|
|
14
|
+
user_id: common_1.clientsDropdown,
|
|
15
|
+
activity_id: common_1.activitiesDropdown,
|
|
16
|
+
},
|
|
17
|
+
run(context) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const auth = context.auth;
|
|
20
|
+
const p = context.propsValue;
|
|
21
|
+
const response = yield (0, common_1.wayfrontApiClient)(auth.workspaceUrl, auth.apiToken).post(`/clients/${p.user_id}/activities/${p.activity_id}/complete`);
|
|
22
|
+
return (0, common_1.flattenActivity)(response.body);
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=complete-activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete-activity.js","sourceRoot":"","sources":["../../../../src/lib/actions/complete-activity.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,kCAAuC;AACvC,sCAOmB;AAEN,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,kEAAkE;IAC/E,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe;QACxB,WAAW,EAAE,2BAAkB;KAChC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG,OAAO,CAAC,IAAmC,CAAC;YACzD,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;YAE7B,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC7E,YAAY,CAAC,CAAC,OAAO,eAAe,CAAC,CAAC,WAAW,WAAW,CAC7D,CAAC;YAEF,OAAO,IAAA,wBAAe,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const createActivityAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
user_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
content: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
10
|
+
scheduled_at: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
assigned_to: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
12
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=create-activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-activity.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-activity.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;EAmC/B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createActivityAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
exports.createActivityAction = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: auth_1.wayfrontAuth,
|
|
10
|
+
name: 'create_activity',
|
|
11
|
+
displayName: 'Create Activity',
|
|
12
|
+
description: 'Creates a new activity log entry for a client in Wayfront.',
|
|
13
|
+
props: {
|
|
14
|
+
user_id: common_1.clientsDropdown,
|
|
15
|
+
content: pieces_framework_1.Property.LongText({
|
|
16
|
+
displayName: 'Content',
|
|
17
|
+
description: 'The activity note or description (max 10,000 characters).',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
scheduled_at: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Scheduled At',
|
|
22
|
+
description: 'Schedule this activity for a future date and time. Format: 2026-04-15T14:00:00Z (ISO 8601). Leave empty to log it immediately.',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
assigned_to: common_1.teamMembersDropdown,
|
|
26
|
+
},
|
|
27
|
+
run(context) {
|
|
28
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const auth = context.auth;
|
|
30
|
+
const p = context.propsValue;
|
|
31
|
+
const body = { content: p.content };
|
|
32
|
+
if (p.scheduled_at)
|
|
33
|
+
body['scheduled_at'] = p.scheduled_at;
|
|
34
|
+
if (p.assigned_to)
|
|
35
|
+
body['assigned_to'] = p.assigned_to;
|
|
36
|
+
const response = yield (0, common_1.wayfrontApiClient)(auth.workspaceUrl, auth.apiToken).post(`/clients/${p.user_id}/activities`, body);
|
|
37
|
+
return (0, common_1.flattenActivity)(response.body);
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=create-activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-activity.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-activity.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,sCAOmB;AAEN,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,4DAA4D;IACzE,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe;QACxB,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,gIAAgI;YAClI,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,4BAAmB;KACjC;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG,OAAO,CAAC,IAAmC,CAAC;YACzD,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;YAE7B,MAAM,IAAI,GAA4B,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAC7D,IAAI,CAAC,CAAC,YAAY;gBAAE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC;YAC1D,IAAI,CAAC,CAAC,WAAW;gBAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;YAEvD,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC7E,YAAY,CAAC,CAAC,OAAO,aAAa,EAClC,IAAI,CACL,CAAC;YAEF,OAAO,IAAA,wBAAe,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const createClientAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
name_f: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
name_l: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
+
company: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
note: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
11
|
+
status_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
12
|
+
referrer_user_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
+
tax_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
balance: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
15
|
+
optin: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
stripe_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
17
|
+
created_at: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
18
|
+
address_line_1: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
19
|
+
address_city: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
|
+
address_state: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
21
|
+
address_postcode: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
22
|
+
address_country: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
23
|
+
custom_fields: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
24
|
+
}>;
|
|
25
|
+
//# sourceMappingURL=create-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-client.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-client.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;EAyI7B,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createClientAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const shared_1 = require("@activepieces/shared");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.createClientAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.wayfrontAuth,
|
|
11
|
+
name: 'create_client',
|
|
12
|
+
displayName: 'Create Client',
|
|
13
|
+
description: 'Creates a new client in your Wayfront workspace.',
|
|
14
|
+
props: {
|
|
15
|
+
email: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Email',
|
|
17
|
+
description: 'The email address of the client.',
|
|
18
|
+
required: false,
|
|
19
|
+
}),
|
|
20
|
+
name_f: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'First Name',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
name_l: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Last Name',
|
|
26
|
+
required: false,
|
|
27
|
+
}),
|
|
28
|
+
company: pieces_framework_1.Property.ShortText({
|
|
29
|
+
displayName: 'Company',
|
|
30
|
+
required: false,
|
|
31
|
+
}),
|
|
32
|
+
phone: pieces_framework_1.Property.ShortText({
|
|
33
|
+
displayName: 'Phone',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
note: pieces_framework_1.Property.LongText({
|
|
37
|
+
displayName: 'Note',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
status_id: pieces_framework_1.Property.Number({
|
|
41
|
+
displayName: 'Status ID',
|
|
42
|
+
description: 'Numeric ID of the client status. Find status IDs in your Wayfront workspace settings.',
|
|
43
|
+
required: false,
|
|
44
|
+
}),
|
|
45
|
+
referrer_user_id: pieces_framework_1.Property.Number({
|
|
46
|
+
displayName: 'Referrer Team Member ID',
|
|
47
|
+
description: 'ID of the team member who referred this client.',
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
50
|
+
tax_id: pieces_framework_1.Property.ShortText({
|
|
51
|
+
displayName: 'Tax ID',
|
|
52
|
+
required: false,
|
|
53
|
+
}),
|
|
54
|
+
balance: pieces_framework_1.Property.Number({
|
|
55
|
+
displayName: 'Balance',
|
|
56
|
+
description: 'Starting account balance for the client.',
|
|
57
|
+
required: false,
|
|
58
|
+
}),
|
|
59
|
+
optin: pieces_framework_1.Property.ShortText({
|
|
60
|
+
displayName: 'Opt-in',
|
|
61
|
+
description: 'Opt-in status for the client, e.g. "Yes" or "No".',
|
|
62
|
+
required: false,
|
|
63
|
+
}),
|
|
64
|
+
stripe_id: pieces_framework_1.Property.ShortText({
|
|
65
|
+
displayName: 'Stripe Customer ID',
|
|
66
|
+
description: 'The Stripe customer ID to link to this client.',
|
|
67
|
+
required: false,
|
|
68
|
+
}),
|
|
69
|
+
created_at: pieces_framework_1.Property.ShortText({
|
|
70
|
+
displayName: 'Created Date',
|
|
71
|
+
description: 'Override the creation date. Format: 2021-09-01T00:00:00+00:00. Leave empty to use the current date.',
|
|
72
|
+
required: false,
|
|
73
|
+
}),
|
|
74
|
+
address_line_1: pieces_framework_1.Property.ShortText({
|
|
75
|
+
displayName: 'Address Line 1',
|
|
76
|
+
required: false,
|
|
77
|
+
}),
|
|
78
|
+
address_city: pieces_framework_1.Property.ShortText({
|
|
79
|
+
displayName: 'City',
|
|
80
|
+
required: false,
|
|
81
|
+
}),
|
|
82
|
+
address_state: pieces_framework_1.Property.ShortText({
|
|
83
|
+
displayName: 'State / Province',
|
|
84
|
+
required: false,
|
|
85
|
+
}),
|
|
86
|
+
address_postcode: pieces_framework_1.Property.ShortText({
|
|
87
|
+
displayName: 'Postcode / ZIP',
|
|
88
|
+
required: false,
|
|
89
|
+
}),
|
|
90
|
+
address_country: pieces_framework_1.Property.ShortText({
|
|
91
|
+
displayName: 'Country',
|
|
92
|
+
description: 'Two-letter country code, e.g. US or GB.',
|
|
93
|
+
required: false,
|
|
94
|
+
}),
|
|
95
|
+
custom_fields: pieces_framework_1.Property.Object({
|
|
96
|
+
displayName: 'Custom Fields',
|
|
97
|
+
description: 'Additional custom fields as key-value pairs.',
|
|
98
|
+
required: false,
|
|
99
|
+
}),
|
|
100
|
+
},
|
|
101
|
+
run(context) {
|
|
102
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const auth = context.auth;
|
|
104
|
+
const p = context.propsValue;
|
|
105
|
+
const hasAddress = !(0, shared_1.isNil)(p.address_line_1) ||
|
|
106
|
+
!(0, shared_1.isNil)(p.address_city) ||
|
|
107
|
+
!(0, shared_1.isNil)(p.address_state) ||
|
|
108
|
+
!(0, shared_1.isNil)(p.address_postcode) ||
|
|
109
|
+
!(0, shared_1.isNil)(p.address_country);
|
|
110
|
+
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (!(0, shared_1.isNil)(p.email) && { email: p.email })), (!(0, shared_1.isNil)(p.name_f) && { name_f: p.name_f })), (!(0, shared_1.isNil)(p.name_l) && { name_l: p.name_l })), (!(0, shared_1.isNil)(p.company) && { company: p.company })), (!(0, shared_1.isNil)(p.phone) && { phone: p.phone })), (!(0, shared_1.isNil)(p.note) && { note: p.note })), (!(0, shared_1.isNil)(p.status_id) && { status_id: p.status_id })), (!(0, shared_1.isNil)(p.referrer_user_id) && { referrer_user_id: p.referrer_user_id })), (!(0, shared_1.isNil)(p.tax_id) && { tax_id: p.tax_id })), (!(0, shared_1.isNil)(p.balance) && { balance: p.balance })), (!(0, shared_1.isNil)(p.optin) && { optin: p.optin })), (!(0, shared_1.isNil)(p.stripe_id) && { stripe_id: p.stripe_id })), (!(0, shared_1.isNil)(p.created_at) && { created_at: p.created_at })), (!(0, shared_1.isNil)(p.custom_fields) && { custom_fields: p.custom_fields })), (hasAddress && {
|
|
111
|
+
address: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (!(0, shared_1.isNil)(p.address_line_1) && { line_1: p.address_line_1 })), (!(0, shared_1.isNil)(p.address_city) && { city: p.address_city })), (!(0, shared_1.isNil)(p.address_state) && { state: p.address_state })), (!(0, shared_1.isNil)(p.address_postcode) && { postcode: p.address_postcode })), (!(0, shared_1.isNil)(p.address_country) && { country: p.address_country })),
|
|
112
|
+
}));
|
|
113
|
+
const response = yield (0, common_1.wayfrontApiClient)(auth.workspaceUrl, auth.apiToken).post('/clients', body);
|
|
114
|
+
return (0, common_1.flattenUser)(response.body);
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
//# sourceMappingURL=create-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-client.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-client.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAA6C;AAC7C,kCAAuC;AACvC,sCAA2F;AAE9E,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,kDAAkD;IAC/D,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,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derAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
user_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
service: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
service_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
+
note: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
12
|
+
status: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
date_due: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
15
|
+
date_started: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
date_completed: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
17
|
+
created_at: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
18
|
+
employees: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
19
|
+
tags: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
20
|
+
linked_orders: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
21
|
+
metadata: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=create-order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-order.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;EAuH5B,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOrderAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const shared_1 = require("@activepieces/shared");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.createOrderAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.wayfrontAuth,
|
|
11
|
+
name: 'create_order',
|
|
12
|
+
displayName: 'Create Order',
|
|
13
|
+
description: 'Creates a new order for a client in Wayfront.',
|
|
14
|
+
props: {
|
|
15
|
+
user_id: common_1.clientsDropdown,
|
|
16
|
+
service: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Service / Order Title',
|
|
18
|
+
description: 'The name of the service or title for this order (e.g. "Instagram Followers"). Required if no Service ID is provided.',
|
|
19
|
+
required: false,
|
|
20
|
+
}),
|
|
21
|
+
service_id: pieces_framework_1.Property.Number({
|
|
22
|
+
displayName: 'Service ID',
|
|
23
|
+
description: 'ID of an existing service in Wayfront to attach to this order. Required if no Service / Order Title is provided.',
|
|
24
|
+
required: false,
|
|
25
|
+
}),
|
|
26
|
+
note: pieces_framework_1.Property.LongText({
|
|
27
|
+
displayName: 'Note',
|
|
28
|
+
description: 'An internal note to attach to the order.',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
status: pieces_framework_1.Property.Number({
|
|
32
|
+
displayName: 'Status ID',
|
|
33
|
+
description: 'Numeric ID of the order status. Find status IDs in your Wayfront workspace settings.',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
number: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'Order Number',
|
|
38
|
+
description: 'Custom order reference number (e.g. B1C2D3E4F5). Leave empty to auto-generate.',
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
date_due: pieces_framework_1.Property.ShortText({
|
|
42
|
+
displayName: 'Due Date',
|
|
43
|
+
description: 'Due date for the order. Format: 2021-09-01T00:00:00+00:00 (ISO 8601).',
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
date_started: pieces_framework_1.Property.ShortText({
|
|
47
|
+
displayName: 'Start Date',
|
|
48
|
+
description: 'Date the order was started. Format: 2021-09-01T00:00:00+00:00 (ISO 8601).',
|
|
49
|
+
required: false,
|
|
50
|
+
}),
|
|
51
|
+
date_completed: pieces_framework_1.Property.ShortText({
|
|
52
|
+
displayName: 'Completion Date',
|
|
53
|
+
description: 'Date the order was completed. Format: 2021-09-01T00:00:00+00:00 (ISO 8601).',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
created_at: pieces_framework_1.Property.ShortText({
|
|
57
|
+
displayName: 'Created Date',
|
|
58
|
+
description: 'Override the creation date. Format: 2021-09-01T00:00:00+00:00. Leave empty to use now.',
|
|
59
|
+
required: false,
|
|
60
|
+
}),
|
|
61
|
+
employees: pieces_framework_1.Property.ShortText({
|
|
62
|
+
displayName: 'Assigned Employee IDs',
|
|
63
|
+
description: 'Comma-separated IDs of employees to assign to this order (e.g. 1,2,3).',
|
|
64
|
+
required: false,
|
|
65
|
+
}),
|
|
66
|
+
tags: pieces_framework_1.Property.ShortText({
|
|
67
|
+
displayName: 'Tags',
|
|
68
|
+
description: 'Comma-separated list of tags to apply to the order (e.g. vip,rush).',
|
|
69
|
+
required: false,
|
|
70
|
+
}),
|
|
71
|
+
linked_orders: pieces_framework_1.Property.ShortText({
|
|
72
|
+
displayName: 'Linked Order Numbers',
|
|
73
|
+
description: 'Comma-separated order numbers to link to this order (e.g. B1C2D3,E4F5G6).',
|
|
74
|
+
required: false,
|
|
75
|
+
}),
|
|
76
|
+
metadata: pieces_framework_1.Property.ShortText({
|
|
77
|
+
displayName: 'Metadata',
|
|
78
|
+
description: 'Comma-separated metadata values to attach to the order.',
|
|
79
|
+
required: false,
|
|
80
|
+
}),
|
|
81
|
+
},
|
|
82
|
+
run(context) {
|
|
83
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const auth = context.auth;
|
|
85
|
+
const p = context.propsValue;
|
|
86
|
+
const employeeIds = p.employees
|
|
87
|
+
? p.employees.split(',').map((s) => parseInt(s.trim(), 10)).filter((n) => !isNaN(n))
|
|
88
|
+
: undefined;
|
|
89
|
+
const tags = p.tags
|
|
90
|
+
? p.tags.split(',').map((s) => s.trim()).filter(Boolean)
|
|
91
|
+
: undefined;
|
|
92
|
+
const linkedOrders = p.linked_orders
|
|
93
|
+
? p.linked_orders.split(',').map((s) => s.trim()).filter(Boolean)
|
|
94
|
+
: undefined;
|
|
95
|
+
const metadata = p.metadata
|
|
96
|
+
? p.metadata.split(',').map((s) => s.trim()).filter(Boolean)
|
|
97
|
+
: undefined;
|
|
98
|
+
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ user_id: p.user_id }, (!(0, shared_1.isNil)(p.service) && { service: p.service })), (!(0, shared_1.isNil)(p.service_id) && { service_id: p.service_id })), (!(0, shared_1.isNil)(p.note) && { note: p.note })), (!(0, shared_1.isNil)(p.status) && { status: p.status })), (!(0, shared_1.isNil)(p.number) && { number: p.number })), (!(0, shared_1.isNil)(p.date_due) && { date_due: p.date_due })), (!(0, shared_1.isNil)(p.date_started) && { date_started: p.date_started })), (!(0, shared_1.isNil)(p.date_completed) && { date_completed: p.date_completed })), (!(0, shared_1.isNil)(p.created_at) && { created_at: p.created_at })), (employeeIds !== undefined && { 'employees[]': employeeIds })), (tags !== undefined && { 'tags[]': tags })), (linkedOrders !== undefined && { 'linked_orders[]': linkedOrders })), (metadata !== undefined && { 'metadata[]': metadata }));
|
|
99
|
+
const response = yield (0, common_1.wayfrontApiClient)(auth.workspaceUrl, auth.apiToken).post('/orders', body);
|
|
100
|
+
return (0, common_1.flattenOrder)(response.body);
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=create-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-order.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAA6C;AAC7C,kCAAuC;AACvC,sCAMmB;AAEN,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE;QACL,OAAO,EAAE,wBAAe;QACxB,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,uBAAuB;YACpC,WAAW,EACT,sHAAsH;YACxH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,YAAY;YACzB,WAAW,EACT,kHAAkH;YACpH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,sFAAsF;YACnG,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,gFAAgF;YAC7F,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAA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I,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC7E,SAAS,EACT,IAAI,CACL,CAAC;YAEF,OAAO,IAAA,qBAAY,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const createTicketAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
user_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
subject: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
note: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
11
|
+
status: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
12
|
+
employees: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
+
tags: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
14
|
+
order: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
15
|
+
metadata: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=create-ticket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-ticket.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-ticket.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAgF7B,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTicketAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const shared_1 = require("@activepieces/shared");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.createTicketAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.wayfrontAuth,
|
|
11
|
+
name: 'create_ticket',
|
|
12
|
+
displayName: 'Create Ticket',
|
|
13
|
+
description: 'Creates a new support ticket for a client in Wayfront.',
|
|
14
|
+
props: {
|
|
15
|
+
user_id: common_1.clientsDropdown,
|
|
16
|
+
subject: pieces_framework_1.Property.ShortText({
|
|
17
|
+
displayName: 'Subject',
|
|
18
|
+
description: 'The subject line of the ticket.',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
21
|
+
note: pieces_framework_1.Property.LongText({
|
|
22
|
+
displayName: 'Note',
|
|
23
|
+
description: 'An internal note to attach to the ticket.',
|
|
24
|
+
required: false,
|
|
25
|
+
}),
|
|
26
|
+
status: pieces_framework_1.Property.Number({
|
|
27
|
+
displayName: 'Status ID',
|
|
28
|
+
description: 'Numeric ID of the ticket status. Find status IDs in your Wayfront workspace settings.',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
employees: pieces_framework_1.Property.ShortText({
|
|
32
|
+
displayName: 'Assigned Employee IDs',
|
|
33
|
+
description: 'Comma-separated IDs of employees to assign to this ticket (e.g. 1,2,3).',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
tags: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'Tags',
|
|
38
|
+
description: 'Comma-separated list of tags to apply to the ticket (e.g. billing,urgent).',
|
|
39
|
+
required: false,
|
|
40
|
+
}),
|
|
41
|
+
order: pieces_framework_1.Property.ShortText({
|
|
42
|
+
displayName: 'Order Reference',
|
|
43
|
+
description: 'The order number or reference to link to this ticket.',
|
|
44
|
+
required: false,
|
|
45
|
+
}),
|
|
46
|
+
metadata: pieces_framework_1.Property.ShortText({
|
|
47
|
+
displayName: 'Metadata',
|
|
48
|
+
description: 'Comma-separated metadata values to attach to the ticket.',
|
|
49
|
+
required: false,
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
run(context) {
|
|
53
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const auth = context.auth;
|
|
55
|
+
const p = context.propsValue;
|
|
56
|
+
const employeeIds = p.employees
|
|
57
|
+
? p.employees
|
|
58
|
+
.split(',')
|
|
59
|
+
.map((s) => parseInt(s.trim(), 10))
|
|
60
|
+
.filter((n) => !isNaN(n))
|
|
61
|
+
: undefined;
|
|
62
|
+
const tags = p.tags
|
|
63
|
+
? p.tags.split(',').map((s) => s.trim()).filter(Boolean)
|
|
64
|
+
: undefined;
|
|
65
|
+
const metadata = p.metadata
|
|
66
|
+
? p.metadata.split(',').map((s) => s.trim()).filter(Boolean)
|
|
67
|
+
: undefined;
|
|
68
|
+
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ user_id: p.user_id, subject: p.subject }, (!(0, shared_1.isNil)(p.note) && { note: p.note })), (!(0, shared_1.isNil)(p.status) && { status: p.status })), (employeeIds !== undefined && { 'employees[]': employeeIds })), (tags !== undefined && { 'tags[]': tags })), (!(0, shared_1.isNil)(p.order) && { order: p.order })), (metadata !== undefined && { 'metadata[]': metadata }));
|
|
69
|
+
const response = yield (0, common_1.wayfrontApiClient)(auth.workspaceUrl, auth.apiToken).post('/tickets', body);
|
|
70
|
+
return (0, common_1.flattenTicket)(response.body);
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=create-ticket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-ticket.js","s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AAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAC1C,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,GAC7D,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAC1C,CAAC,CAAC,IAAA,cAAK,EAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,GACvC,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAC1D,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC7E,UAAU,EACV,IAAI,CACL,CAAC;YAEF,OAAO,IAAA,sBAAa,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const listOrdersAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
workspaceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
6
|
+
page: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=list-orders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-orders.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-orders.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB;;;;;;EAgC3B,CAAC"}
|