@activepieces/piece-freshservice 0.0.1 → 0.1.0

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.
Files changed (53) hide show
  1. package/package.json +5 -5
  2. package/src/i18n/translation.json +104 -0
  3. package/src/index.d.ts.map +1 -1
  4. package/src/index.js +19 -1
  5. package/src/index.js.map +1 -1
  6. package/src/lib/actions/add-note-to-change.d.ts +15 -0
  7. package/src/lib/actions/add-note-to-change.d.ts.map +1 -0
  8. package/src/lib/actions/add-note-to-change.js +45 -0
  9. package/src/lib/actions/add-note-to-change.js.map +1 -0
  10. package/src/lib/actions/create-change-task.d.ts +32 -0
  11. package/src/lib/actions/create-change-task.d.ts.map +1 -0
  12. package/src/lib/actions/create-change-task.js +70 -0
  13. package/src/lib/actions/create-change-task.js.map +1 -0
  14. package/src/lib/actions/create-change.d.ts +47 -0
  15. package/src/lib/actions/create-change.d.ts.map +1 -0
  16. package/src/lib/actions/create-change.js +113 -0
  17. package/src/lib/actions/create-change.js.map +1 -0
  18. package/src/lib/actions/delete-change-task.d.ts +14 -0
  19. package/src/lib/actions/delete-change-task.d.ts.map +1 -0
  20. package/src/lib/actions/delete-change-task.js +34 -0
  21. package/src/lib/actions/delete-change-task.js.map +1 -0
  22. package/src/lib/actions/delete-change.d.ts +13 -0
  23. package/src/lib/actions/delete-change.d.ts.map +1 -0
  24. package/src/lib/actions/delete-change.js +29 -0
  25. package/src/lib/actions/delete-change.js.map +1 -0
  26. package/src/lib/actions/update-change-task.d.ts +33 -0
  27. package/src/lib/actions/update-change-task.d.ts.map +1 -0
  28. package/src/lib/actions/update-change-task.js +78 -0
  29. package/src/lib/actions/update-change-task.js.map +1 -0
  30. package/src/lib/actions/update-change.d.ts +54 -0
  31. package/src/lib/actions/update-change.d.ts.map +1 -0
  32. package/src/lib/actions/update-change.js +118 -0
  33. package/src/lib/actions/update-change.js.map +1 -0
  34. package/src/lib/common/props.d.ts +41 -0
  35. package/src/lib/common/props.d.ts.map +1 -1
  36. package/src/lib/common/props.js +77 -0
  37. package/src/lib/common/props.js.map +1 -1
  38. package/src/lib/triggers/new-change-task.d.ts +47 -0
  39. package/src/lib/triggers/new-change-task.d.ts.map +1 -0
  40. package/src/lib/triggers/new-change-task.js +83 -0
  41. package/src/lib/triggers/new-change-task.js.map +1 -0
  42. package/src/lib/triggers/new-change.d.ts +15 -0
  43. package/src/lib/triggers/new-change.d.ts.map +1 -0
  44. package/src/lib/triggers/new-change.js +84 -0
  45. package/src/lib/triggers/new-change.js.map +1 -0
  46. package/src/lib/triggers/updated-change-task.d.ts +47 -0
  47. package/src/lib/triggers/updated-change-task.d.ts.map +1 -0
  48. package/src/lib/triggers/updated-change-task.js +83 -0
  49. package/src/lib/triggers/updated-change-task.js.map +1 -0
  50. package/src/lib/triggers/updated-change.d.ts +15 -0
  51. package/src/lib/triggers/updated-change.d.ts.map +1 -0
  52. package/src/lib/triggers/updated-change.js +84 -0
  53. package/src/lib/triggers/updated-change.js.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-freshservice",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "scripts": {
@@ -8,9 +8,9 @@
8
8
  "lint": "eslint 'src/**/*.ts'"
9
9
  },
10
10
  "dependencies": {
11
- "tslib": "2.6.2",
12
- "@activepieces/pieces-common": "0.12.1",
13
- "@activepieces/pieces-framework": "0.26.2",
14
- "@activepieces/shared": "0.58.0"
11
+ "@activepieces/pieces-common": "0.12.3",
12
+ "@activepieces/pieces-framework": "0.28.1",
13
+ "@activepieces/shared": "0.75.0",
14
+ "tslib": "2.6.2"
15
15
  }
16
16
  }
@@ -0,0 +1,104 @@
1
+ {
2
+ "IT service management software for ticketing, asset management, and IT operations.": "IT service management software for ticketing, asset management, and IT operations.",
3
+ "Freshservice Domain": "Freshservice Domain",
4
+ "API Key": "API Key",
5
+ "Your Freshservice subdomain (e.g., \"mycompany\" from mycompany.freshservice.com).": "Your Freshservice subdomain (e.g., \"mycompany\" from mycompany.freshservice.com).",
6
+ "Your Freshservice API key from Profile Settings.": "Your Freshservice API key from Profile Settings.",
7
+ "\nTo get your API key:\n1. Log in to your **Freshservice** account as an agent.\n2. Click your **profile picture** in the top-right corner.\n3. Go to **Profile Settings**.\n4. Your API key is displayed on the right side of the page.\n\nFor the domain, enter only the subdomain. For example, if your URL is **mycompany.freshservice.com**, enter **mycompany**.\n ": "\nTo get your API key:\n1. Log in to your **Freshservice** account as an agent.\n2. Click your **profile picture** in the top-right corner.\n3. Go to **Profile Settings**.\n4. Your API key is displayed on the right side of the page.\n\nFor the domain, enter only the subdomain. For example, if your URL is **mycompany.freshservice.com**, enter **mycompany**.\n ",
8
+ "Create Ticket": "Create Ticket",
9
+ "Add Note to Ticket": "Add Note to Ticket",
10
+ "Create Requester": "Create Requester",
11
+ "Request Ticket Approval": "Request Ticket Approval",
12
+ "Custom API Call": "Custom API Call",
13
+ "Creates a new ticket in Freshservice.": "Creates a new ticket in Freshservice.",
14
+ "Adds a private or public note to an existing ticket.": "Adds a private or public note to an existing ticket.",
15
+ "Creates a new requester (end user) in Freshservice.": "Creates a new requester (end user) in Freshservice.",
16
+ "Requests approval for a ticket from a specified agent.": "Requests approval for a ticket from a specified agent.",
17
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
18
+ "Subject": "Subject",
19
+ "Description": "Description",
20
+ "Requester": "Requester",
21
+ "Status": "Status",
22
+ "Priority": "Priority",
23
+ "Source": "Source",
24
+ "Urgency": "Urgency",
25
+ "Impact": "Impact",
26
+ "Type": "Type",
27
+ "Agent": "Agent",
28
+ "Department": "Department",
29
+ "Group": "Group",
30
+ "Category": "Category",
31
+ "Sub Category": "Sub Category",
32
+ "Tags": "Tags",
33
+ "Custom Fields": "Custom Fields",
34
+ "Ticket": "Ticket",
35
+ "Note Content": "Note Content",
36
+ "Private Note": "Private Note",
37
+ "First Name": "First Name",
38
+ "Email": "Email",
39
+ "Last Name": "Last Name",
40
+ "Job Title": "Job Title",
41
+ "Work Phone": "Work Phone",
42
+ "Mobile Phone": "Mobile Phone",
43
+ "Approval Type": "Approval Type",
44
+ "Method": "Method",
45
+ "Headers": "Headers",
46
+ "Query Parameters": "Query Parameters",
47
+ "Body Type": "Body Type",
48
+ "Body": "Body",
49
+ "Response is Binary ?": "Response is Binary ?",
50
+ "No Error on Failure": "No Error on Failure",
51
+ "Timeout (in seconds)": "Timeout (in seconds)",
52
+ "Follow redirects": "Follow redirects",
53
+ "The subject of the ticket.": "The subject of the ticket.",
54
+ "HTML content of the ticket. You can use basic HTML tags for formatting.": "HTML content of the ticket. You can use basic HTML tags for formatting.",
55
+ "The type of ticket (e.g., Incident, Service Request).": "The type of ticket (e.g., Incident, Service Request).",
56
+ "The category of the ticket.": "The category of the ticket.",
57
+ "The sub-category of the ticket.": "The sub-category of the ticket.",
58
+ "Tags to add to the ticket.": "Tags to add to the ticket.",
59
+ "A JSON object of custom field names and values.": "A JSON object of custom field names and values.",
60
+ "The content of the note. HTML is supported.": "The content of the note. HTML is supported.",
61
+ "If checked, the note is only visible to agents. If unchecked, the requester can also see it.": "If checked, the note is only visible to agents. If unchecked, the requester can also see it.",
62
+ "The first name of the requester.": "The first name of the requester.",
63
+ "The primary email address of the requester.": "The primary email address of the requester.",
64
+ "The last name of the requester.": "The last name of the requester.",
65
+ "The job title of the requester.": "The job title of the requester.",
66
+ "The work phone number of the requester.": "The work phone number of the requester.",
67
+ "The mobile phone number of the requester.": "The mobile phone number of the requester.",
68
+ "How approval is determined when there are multiple approvers.": "How approval is determined when there are multiple approvers.",
69
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
70
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
71
+ "Open": "Open",
72
+ "Pending": "Pending",
73
+ "Resolved": "Resolved",
74
+ "Closed": "Closed",
75
+ "Low": "Low",
76
+ "Medium": "Medium",
77
+ "High": "High",
78
+ "Urgent": "Urgent",
79
+ "Portal": "Portal",
80
+ "Phone": "Phone",
81
+ "Chat": "Chat",
82
+ "Feedback Widget": "Feedback Widget",
83
+ "Outbound Email": "Outbound Email",
84
+ "All must approve": "All must approve",
85
+ "Any one can approve": "Any one can approve",
86
+ "GET": "GET",
87
+ "POST": "POST",
88
+ "PATCH": "PATCH",
89
+ "PUT": "PUT",
90
+ "DELETE": "DELETE",
91
+ "HEAD": "HEAD",
92
+ "None": "None",
93
+ "JSON": "JSON",
94
+ "Form Data": "Form Data",
95
+ "Raw": "Raw",
96
+ "New Ticket": "New Ticket",
97
+ "Updated Ticket": "Updated Ticket",
98
+ "New Requester": "New Requester",
99
+ "Updated Requester": "Updated Requester",
100
+ "Triggers when a new ticket is created in Freshservice.": "Triggers when a new ticket is created in Freshservice.",
101
+ "Triggers when an existing ticket is updated in Freshservice.": "Triggers when an existing ticket is updated in Freshservice.",
102
+ "Triggers when a new requester (user) is created in Freshservice.": "Triggers when a new requester (user) is created in Freshservice.",
103
+ "Triggers when an existing requester is updated in Freshservice.": "Triggers when an existing requester is updated in Freshservice."
104
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,gBAAgB;;;EA2C3B,CAAC;AAEH,eAAO,MAAM,YAAY;;;GA4BvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,gBAAgB;;;EA2C3B,CAAC;AAEH,eAAO,MAAM,YAAY;;;GAmCvB,CAAC"}
package/src/index.js CHANGED
@@ -10,10 +10,21 @@ const create_ticket_1 = require("./lib/actions/create-ticket");
10
10
  const add_note_to_ticket_1 = require("./lib/actions/add-note-to-ticket");
11
11
  const create_requester_1 = require("./lib/actions/create-requester");
12
12
  const request_ticket_approval_1 = require("./lib/actions/request-ticket-approval");
13
+ const create_change_1 = require("./lib/actions/create-change");
14
+ const update_change_1 = require("./lib/actions/update-change");
15
+ const delete_change_1 = require("./lib/actions/delete-change");
16
+ const add_note_to_change_1 = require("./lib/actions/add-note-to-change");
17
+ const create_change_task_1 = require("./lib/actions/create-change-task");
18
+ const update_change_task_1 = require("./lib/actions/update-change-task");
19
+ const delete_change_task_1 = require("./lib/actions/delete-change-task");
13
20
  const new_ticket_1 = require("./lib/triggers/new-ticket");
14
21
  const updated_ticket_1 = require("./lib/triggers/updated-ticket");
15
22
  const new_requester_1 = require("./lib/triggers/new-requester");
16
23
  const updated_requester_1 = require("./lib/triggers/updated-requester");
24
+ const new_change_1 = require("./lib/triggers/new-change");
25
+ const updated_change_1 = require("./lib/triggers/updated-change");
26
+ const new_change_task_1 = require("./lib/triggers/new-change-task");
27
+ const updated_change_task_1 = require("./lib/triggers/updated-change-task");
17
28
  const pieces_common_2 = require("@activepieces/pieces-common");
18
29
  exports.freshserviceAuth = pieces_framework_1.PieceAuth.CustomAuth({
19
30
  description: `
@@ -72,6 +83,13 @@ exports.freshservice = (0, pieces_framework_1.createPiece)({
72
83
  add_note_to_ticket_1.addNoteToTicket,
73
84
  create_requester_1.createRequester,
74
85
  request_ticket_approval_1.requestTicketApproval,
86
+ create_change_1.createChange,
87
+ update_change_1.updateChange,
88
+ delete_change_1.deleteChange,
89
+ add_note_to_change_1.addNoteToChange,
90
+ create_change_task_1.createChangeTask,
91
+ update_change_task_1.updateChangeTask,
92
+ delete_change_task_1.deleteChangeTask,
75
93
  (0, pieces_common_1.createCustomApiCallAction)({
76
94
  baseUrl: (auth) => { var _a; return `https://${(_a = auth === null || auth === void 0 ? void 0 : auth.props.domain) !== null && _a !== void 0 ? _a : ''}.freshservice.com/api/v2`; },
77
95
  auth: exports.freshserviceAuth,
@@ -83,6 +101,6 @@ exports.freshservice = (0, pieces_framework_1.createPiece)({
83
101
  }),
84
102
  }),
85
103
  ],
86
- triggers: [new_ticket_1.newTicket, updated_ticket_1.updatedTicket, new_requester_1.newRequester, updated_requester_1.updatedRequester],
104
+ triggers: [new_ticket_1.newTicket, updated_ticket_1.updatedTicket, new_requester_1.newRequester, updated_requester_1.updatedRequester, new_change_1.newChange, updated_change_1.updatedChange, new_change_task_1.newChangeTask, updated_change_task_1.updatedChangeTask],
87
105
  });
88
106
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAkF;AAClF,+DAAwE;AACxE,iDAAqD;AACrD,mCAAgC;AAChC,+DAA2D;AAC3D,yEAAmE;AACnE,qEAAiE;AACjE,mFAA8E;AAC9E,0DAAsD;AACtD,kEAA8D;AAC9D,gEAA4D;AAC5D,wEAAoE;AACpE,+DAAyF;AAE5E,QAAA,gBAAgB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACnD,WAAW,EAAE;;;;;;;;GAQZ;IACD,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,qBAAqB;YAClC,WAAW,EACT,kFAAkF;YACpF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC5B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,WAAW,IAAI,CAAC,MAAM,oCAAoC;gBAC/D,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,KAAK;oBAC9B,QAAQ,EAAE,IAAI,CAAC,OAAO;oBACtB,QAAQ,E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,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,IAAA,8BAAW,EAAC;IACtC,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,oFAAoF;IACjG,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,sDAAsD;IAC/D,UAAU,EAAE,CAAC,sBAAa,CAAC,gBAAgB,CAAC;IAC5C,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,IAAI,EAAE,wBAAgB;IACtB,OAAO,EAAE;QACP,4BAAY;QACZ,oCAAe;QACf,kCAAe;QACf,+CAAqB;QACrB,4BAAY;QACZ,4BAAY;QACZ,4BAAY;QACZ,oCAAe;QACf,qCAAgB;QAChB,qCAAgB;QAChB,qCAAgB;QAChB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,WAChB,OAAA,WAAW,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,MAAM,mCAAI,EAAE,0BAA0B,CAAA,EAAA;YAC/D,IAAI,EAAE,wBAAgB;YACtB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,MAAM,OAAO,GAAG,eAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAC7D,QAAQ,CACT,CAAC;gBACF,OAAO;oBACL,aAAa,EAAE,SAAS,OAAO,EAAE;iBAClC,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,sBAAS,EAAE,8BAAa,EAAE,4BAAY,EAAE,oCAAgB,EAAE,sBAAS,EAAE,8BAAa,EAAE,+BAAa,EAAE,uCAAiB,CAAC;CACjI,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const addNoteToChange: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ body: import("@activepieces/pieces-framework").LongTextProperty<true>;
13
+ private: import("@activepieces/pieces-framework").CheckboxProperty<false>;
14
+ }>;
15
+ //# sourceMappingURL=add-note-to-change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-note-to-change.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-note-to-change.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;;;;;;;;;;;EAgC1B,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addNoteToChange = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../../");
8
+ const client_1 = require("../common/client");
9
+ const props_1 = require("../common/props");
10
+ exports.addNoteToChange = (0, pieces_framework_1.createAction)({
11
+ auth: __1.freshserviceAuth,
12
+ name: 'add_note_to_change',
13
+ displayName: 'Add Note to Change',
14
+ description: 'Adds a private or public note to an existing change request.',
15
+ props: {
16
+ change_id: props_1.freshserviceCommon.change(true),
17
+ body: pieces_framework_1.Property.LongText({
18
+ displayName: 'Note Content',
19
+ description: 'The content of the note. HTML is supported.',
20
+ required: true,
21
+ }),
22
+ private: pieces_framework_1.Property.Checkbox({
23
+ displayName: 'Private Note',
24
+ description: 'If checked, the note is only visible to agents. If unchecked, the requester can also see it.',
25
+ required: false,
26
+ defaultValue: true,
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ var _a;
32
+ const response = yield (0, client_1.freshserviceApiCall)({
33
+ method: pieces_common_1.HttpMethod.POST,
34
+ endpoint: `changes/${context.propsValue.change_id}/notes`,
35
+ auth: context.auth,
36
+ body: {
37
+ body: context.propsValue.body,
38
+ private: (_a = context.propsValue.private) !== null && _a !== void 0 ? _a : true,
39
+ },
40
+ });
41
+ return response.body.note;
42
+ });
43
+ },
44
+ });
45
+ //# sourceMappingURL=add-note-to-change.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-note-to-change.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-note-to-change.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,8DAA8D;IAC3E,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,8FAA8F;YAC3G,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAoC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,SAAS,QAAQ;gBACzD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;oBAC7B,OAAO,EAAE,MAAA,OAAO,CAAC,UAAU,CAAC,OAAO,mCAAI,IAAI;iBAC5C;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ export declare const createChangeTask: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ title: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
+ description: import("@activepieces/pieces-framework").LongTextProperty<false>;
14
+ agent_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
15
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
16
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
17
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
+ }>>;
21
+ group_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
22
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
23
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
24
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
25
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
27
+ }>>;
28
+ status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
29
+ due_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
30
+ notify_before: import("@activepieces/pieces-framework").NumberProperty<false>;
31
+ }>;
32
+ //# sourceMappingURL=create-change-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-change-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-change-task.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwD3B,CAAC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createChangeTask = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../../");
8
+ const client_1 = require("../common/client");
9
+ const props_1 = require("../common/props");
10
+ exports.createChangeTask = (0, pieces_framework_1.createAction)({
11
+ auth: __1.freshserviceAuth,
12
+ name: 'create_change_task',
13
+ displayName: 'Create Change Task',
14
+ description: 'Creates a new task on a change request in Freshservice.',
15
+ props: {
16
+ change_id: props_1.freshserviceCommon.change(true),
17
+ title: pieces_framework_1.Property.ShortText({
18
+ displayName: 'Title',
19
+ description: 'The title of the task.',
20
+ required: true,
21
+ }),
22
+ description: pieces_framework_1.Property.LongText({
23
+ displayName: 'Description',
24
+ description: 'Description of the task.',
25
+ required: false,
26
+ }),
27
+ agent_id: props_1.freshserviceCommon.agent(false),
28
+ group_id: props_1.freshserviceCommon.group(false),
29
+ status: props_1.freshserviceCommon.taskStatus,
30
+ due_date: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Due Date',
32
+ description: 'Task due date and time (ISO 8601, e.g. 2025-01-15T17:00:00Z).',
33
+ required: false,
34
+ }),
35
+ notify_before: pieces_framework_1.Property.Number({
36
+ displayName: 'Notify Before (seconds)',
37
+ description: 'Time in seconds before the due date to send a reminder notification.',
38
+ required: false,
39
+ }),
40
+ },
41
+ run(context) {
42
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
43
+ const props = context.propsValue;
44
+ const body = {
45
+ title: props.title,
46
+ };
47
+ if (props.description)
48
+ body['description'] = props.description;
49
+ if (props.agent_id)
50
+ body['agent_id'] = props.agent_id;
51
+ if (props.group_id)
52
+ body['group_id'] = props.group_id;
53
+ if (props.status)
54
+ body['status'] = props.status;
55
+ if (props.due_date)
56
+ body['due_date'] = props.due_date;
57
+ if (props.notify_before !== null && props.notify_before !== undefined) {
58
+ body['notify_before'] = props.notify_before;
59
+ }
60
+ const response = yield (0, client_1.freshserviceApiCall)({
61
+ method: pieces_common_1.HttpMethod.POST,
62
+ endpoint: `changes/${props.change_id}/tasks`,
63
+ auth: context.auth,
64
+ body,
65
+ });
66
+ return response.body.task;
67
+ });
68
+ },
69
+ });
70
+ //# sourceMappingURL=create-change-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-change-task.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-change-task.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,gBAAgB,GAAG,IAAA,+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I,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtD,IAAI,KAAK,CAAC,MAAM;gBAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;YAChD,IAAI,KAAK,CAAC,QAAQ;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC;YACtD,IAAI,KAAK,CAAC,aAAa,KAAK,IAAI,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;gBACtE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAC9C,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAoC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,WAAW,KAAK,CAAC,SAAS,QAAQ;gBAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ export declare const createChange: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ subject: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ requester_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
+ }>>;
13
+ description: import("@activepieces/pieces-framework").LongTextProperty<false>;
14
+ agent_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
15
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
16
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
17
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
+ }>>;
21
+ group_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
22
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
23
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
24
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
25
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
27
+ }>>;
28
+ department_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
29
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
30
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
31
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
32
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
33
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
34
+ }>>;
35
+ priority: import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
36
+ impact: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
37
+ status: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
38
+ risk: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
39
+ change_type: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false>;
40
+ planned_start_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
41
+ planned_end_date: import("@activepieces/pieces-framework").ShortTextProperty<false>;
42
+ category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
43
+ sub_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
44
+ item_category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
45
+ custom_fields: import("@activepieces/pieces-framework").JsonProperty<false>;
46
+ }>;
47
+ //# sourceMappingURL=create-change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-change.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-change.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyFvB,CAAC"}
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createChange = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../../");
8
+ const client_1 = require("../common/client");
9
+ const props_1 = require("../common/props");
10
+ exports.createChange = (0, pieces_framework_1.createAction)({
11
+ auth: __1.freshserviceAuth,
12
+ name: 'create_change',
13
+ displayName: 'Create Change',
14
+ description: 'Creates a new change request in Freshservice.',
15
+ props: {
16
+ subject: pieces_framework_1.Property.ShortText({
17
+ displayName: 'Subject',
18
+ description: 'The subject of the change.',
19
+ required: true,
20
+ }),
21
+ requester_id: props_1.freshserviceCommon.requester(true),
22
+ description: pieces_framework_1.Property.LongText({
23
+ displayName: 'Description',
24
+ description: 'HTML content describing the change.',
25
+ required: false,
26
+ }),
27
+ agent_id: props_1.freshserviceCommon.agent(false),
28
+ group_id: props_1.freshserviceCommon.group(false),
29
+ department_id: props_1.freshserviceCommon.department(false),
30
+ priority: props_1.freshserviceCommon.priority,
31
+ impact: props_1.freshserviceCommon.impact,
32
+ status: props_1.freshserviceCommon.changeStatus,
33
+ risk: props_1.freshserviceCommon.changeRisk,
34
+ change_type: props_1.freshserviceCommon.changeType,
35
+ planned_start_date: pieces_framework_1.Property.ShortText({
36
+ displayName: 'Planned Start Date',
37
+ description: 'Planned start date and time (ISO 8601, e.g. 2025-01-15T09:00:00Z).',
38
+ required: false,
39
+ }),
40
+ planned_end_date: pieces_framework_1.Property.ShortText({
41
+ displayName: 'Planned End Date',
42
+ description: 'Planned end date and time (ISO 8601, e.g. 2025-01-15T17:00:00Z).',
43
+ required: false,
44
+ }),
45
+ category: pieces_framework_1.Property.ShortText({
46
+ displayName: 'Category',
47
+ description: 'Category of the change.',
48
+ required: false,
49
+ }),
50
+ sub_category: pieces_framework_1.Property.ShortText({
51
+ displayName: 'Sub Category',
52
+ description: 'Sub-category of the change.',
53
+ required: false,
54
+ }),
55
+ item_category: pieces_framework_1.Property.ShortText({
56
+ displayName: 'Item Category',
57
+ description: 'Item category of the change.',
58
+ required: false,
59
+ }),
60
+ custom_fields: pieces_framework_1.Property.Json({
61
+ displayName: 'Custom Fields',
62
+ description: 'A JSON object of custom field names and values.',
63
+ required: false,
64
+ }),
65
+ },
66
+ run(context) {
67
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
68
+ const props = context.propsValue;
69
+ const body = {
70
+ subject: props.subject,
71
+ requester_id: props.requester_id,
72
+ };
73
+ if (props.description)
74
+ body['description'] = props.description;
75
+ if (props.agent_id)
76
+ body['agent_id'] = props.agent_id;
77
+ if (props.group_id)
78
+ body['group_id'] = props.group_id;
79
+ if (props.department_id)
80
+ body['department_id'] = props.department_id;
81
+ if (props.priority)
82
+ body['priority'] = props.priority;
83
+ if (props.impact)
84
+ body['impact'] = props.impact;
85
+ if (props.status)
86
+ body['status'] = props.status;
87
+ if (props.risk)
88
+ body['risk'] = props.risk;
89
+ if (props.change_type)
90
+ body['change_type'] = props.change_type;
91
+ if (props.planned_start_date)
92
+ body['planned_start_date'] = props.planned_start_date;
93
+ if (props.planned_end_date)
94
+ body['planned_end_date'] = props.planned_end_date;
95
+ if (props.category)
96
+ body['category'] = props.category;
97
+ if (props.sub_category)
98
+ body['sub_category'] = props.sub_category;
99
+ if (props.item_category)
100
+ body['item_category'] = props.item_category;
101
+ if (props.custom_fields)
102
+ body['custom_fields'] = props.custom_fields;
103
+ const response = yield (0, client_1.freshserviceApiCall)({
104
+ method: pieces_common_1.HttpMethod.POST,
105
+ endpoint: 'changes',
106
+ auth: context.auth,
107
+ body,
108
+ });
109
+ return response.body.change;
110
+ });
111
+ },
112
+ });
113
+ //# sourceMappingURL=create-change.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-change.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-change.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,0BAAkB,CAAC,SAAS,CAAC,IAAI,CAAC;QAChD,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,0BAAkB,CAAC,KAAK,CAAC,KAAK,CAAC;QACzC,QAAQ,EAAE,0BAAkB,CAAC,KA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,GAAG,KAAK,CAAC,YAAY,CAAC;YAClE,IAAI,KAAK,CAAC,aAAa;gBAAE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YACrE,IAAI,KAAK,CAAC,aAAa;gBAAE,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC;YAErE,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAmB,EAAsC;gBAC9E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;QAC9B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const deleteChangeTask: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ task_id: import("@activepieces/pieces-framework").NumberProperty<true>;
13
+ }>;
14
+ //# sourceMappingURL=delete-change-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-change-task.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-change-task.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAsB3B,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteChangeTask = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ const __1 = require("../../");
8
+ const client_1 = require("../common/client");
9
+ const props_1 = require("../common/props");
10
+ exports.deleteChangeTask = (0, pieces_framework_1.createAction)({
11
+ auth: __1.freshserviceAuth,
12
+ name: 'delete_change_task',
13
+ displayName: 'Delete Change Task',
14
+ description: 'Deletes a task from a change request in Freshservice.',
15
+ props: {
16
+ change_id: props_1.freshserviceCommon.change(true),
17
+ task_id: pieces_framework_1.Property.Number({
18
+ displayName: 'Task ID',
19
+ description: 'The ID of the task to delete.',
20
+ required: true,
21
+ }),
22
+ },
23
+ run(context) {
24
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
+ yield (0, client_1.freshserviceApiCall)({
26
+ method: pieces_common_1.HttpMethod.DELETE,
27
+ endpoint: `changes/${context.propsValue.change_id}/tasks/${context.propsValue.task_id}`,
28
+ auth: context.auth,
29
+ });
30
+ return { success: true };
31
+ });
32
+ },
33
+ });
34
+ //# sourceMappingURL=delete-change-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-change-task.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-change-task.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,8BAA0C;AAC1C,6CAAuD;AACvD,2CAAqD;AAExC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAgB;IACtB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,SAAS,EAAE,0BAAkB,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1C,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACvB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAA,4BAAmB,EAAC;gBACxB,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,QAAQ,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,SAAS,UAAU,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE;gBACvF,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const deleteChange: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ change_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ domain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ api_key: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ }>;
13
+ //# sourceMappingURL=delete-change.d.ts.map