n8n-nodes-roapp 1.0.7

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 (190) hide show
  1. package/README.md +117 -0
  2. package/dist/credentials/RoappApi.credentials.d.ts +10 -0
  3. package/dist/credentials/RoappApi.credentials.js +37 -0
  4. package/dist/credentials/RoappApi.credentials.js.map +1 -0
  5. package/dist/nodes/Roapp/Roapp.node.d.ts +18 -0
  6. package/dist/nodes/Roapp/Roapp.node.js +237 -0
  7. package/dist/nodes/Roapp/Roapp.node.js.map +1 -0
  8. package/dist/nodes/Roapp/Roapp.node.json +18 -0
  9. package/dist/nodes/Roapp/resources/assets/create.d.ts +2 -0
  10. package/dist/nodes/Roapp/resources/assets/create.js +113 -0
  11. package/dist/nodes/Roapp/resources/assets/create.js.map +1 -0
  12. package/dist/nodes/Roapp/resources/assets/getAll.d.ts +2 -0
  13. package/dist/nodes/Roapp/resources/assets/getAll.js +62 -0
  14. package/dist/nodes/Roapp/resources/assets/getAll.js.map +1 -0
  15. package/dist/nodes/Roapp/resources/assets/index.d.ts +3 -0
  16. package/dist/nodes/Roapp/resources/assets/index.js +69 -0
  17. package/dist/nodes/Roapp/resources/assets/index.js.map +1 -0
  18. package/dist/nodes/Roapp/resources/bookings/create.d.ts +2 -0
  19. package/dist/nodes/Roapp/resources/bookings/create.js +70 -0
  20. package/dist/nodes/Roapp/resources/bookings/create.js.map +1 -0
  21. package/dist/nodes/Roapp/resources/bookings/createItem.d.ts +2 -0
  22. package/dist/nodes/Roapp/resources/bookings/createItem.js +86 -0
  23. package/dist/nodes/Roapp/resources/bookings/createItem.js.map +1 -0
  24. package/dist/nodes/Roapp/resources/bookings/deleteItem.d.ts +2 -0
  25. package/dist/nodes/Roapp/resources/bookings/deleteItem.js +32 -0
  26. package/dist/nodes/Roapp/resources/bookings/deleteItem.js.map +1 -0
  27. package/dist/nodes/Roapp/resources/bookings/getAll.d.ts +2 -0
  28. package/dist/nodes/Roapp/resources/bookings/getAll.js +201 -0
  29. package/dist/nodes/Roapp/resources/bookings/getAll.js.map +1 -0
  30. package/dist/nodes/Roapp/resources/bookings/index.d.ts +3 -0
  31. package/dist/nodes/Roapp/resources/bookings/index.js +122 -0
  32. package/dist/nodes/Roapp/resources/bookings/index.js.map +1 -0
  33. package/dist/nodes/Roapp/resources/bookings/update.d.ts +2 -0
  34. package/dist/nodes/Roapp/resources/bookings/update.js +50 -0
  35. package/dist/nodes/Roapp/resources/bookings/update.js.map +1 -0
  36. package/dist/nodes/Roapp/resources/bookings/updateItem.d.ts +2 -0
  37. package/dist/nodes/Roapp/resources/bookings/updateItem.js +95 -0
  38. package/dist/nodes/Roapp/resources/bookings/updateItem.js.map +1 -0
  39. package/dist/nodes/Roapp/resources/catalog/getAll.d.ts +2 -0
  40. package/dist/nodes/Roapp/resources/catalog/getAll.js +63 -0
  41. package/dist/nodes/Roapp/resources/catalog/getAll.js.map +1 -0
  42. package/dist/nodes/Roapp/resources/catalog/index.d.ts +3 -0
  43. package/dist/nodes/Roapp/resources/catalog/index.js +117 -0
  44. package/dist/nodes/Roapp/resources/catalog/index.js.map +1 -0
  45. package/dist/nodes/Roapp/resources/company/index.d.ts +3 -0
  46. package/dist/nodes/Roapp/resources/company/index.js +101 -0
  47. package/dist/nodes/Roapp/resources/company/index.js.map +1 -0
  48. package/dist/nodes/Roapp/resources/estimates/create.d.ts +2 -0
  49. package/dist/nodes/Roapp/resources/estimates/create.js +80 -0
  50. package/dist/nodes/Roapp/resources/estimates/create.js.map +1 -0
  51. package/dist/nodes/Roapp/resources/estimates/createComment.d.ts +2 -0
  52. package/dist/nodes/Roapp/resources/estimates/createComment.js +43 -0
  53. package/dist/nodes/Roapp/resources/estimates/createComment.js.map +1 -0
  54. package/dist/nodes/Roapp/resources/estimates/createItem.d.ts +2 -0
  55. package/dist/nodes/Roapp/resources/estimates/createItem.js +86 -0
  56. package/dist/nodes/Roapp/resources/estimates/createItem.js.map +1 -0
  57. package/dist/nodes/Roapp/resources/estimates/deleteItem.d.ts +2 -0
  58. package/dist/nodes/Roapp/resources/estimates/deleteItem.js +32 -0
  59. package/dist/nodes/Roapp/resources/estimates/deleteItem.js.map +1 -0
  60. package/dist/nodes/Roapp/resources/estimates/getAll.d.ts +2 -0
  61. package/dist/nodes/Roapp/resources/estimates/getAll.js +63 -0
  62. package/dist/nodes/Roapp/resources/estimates/getAll.js.map +1 -0
  63. package/dist/nodes/Roapp/resources/estimates/getPublicUrl.d.ts +2 -0
  64. package/dist/nodes/Roapp/resources/estimates/getPublicUrl.js +20 -0
  65. package/dist/nodes/Roapp/resources/estimates/getPublicUrl.js.map +1 -0
  66. package/dist/nodes/Roapp/resources/estimates/index.d.ts +3 -0
  67. package/dist/nodes/Roapp/resources/estimates/index.js +183 -0
  68. package/dist/nodes/Roapp/resources/estimates/index.js.map +1 -0
  69. package/dist/nodes/Roapp/resources/estimates/updateItem.d.ts +2 -0
  70. package/dist/nodes/Roapp/resources/estimates/updateItem.js +97 -0
  71. package/dist/nodes/Roapp/resources/estimates/updateItem.js.map +1 -0
  72. package/dist/nodes/Roapp/resources/estimates/updateStatus.d.ts +2 -0
  73. package/dist/nodes/Roapp/resources/estimates/updateStatus.js +38 -0
  74. package/dist/nodes/Roapp/resources/estimates/updateStatus.js.map +1 -0
  75. package/dist/nodes/Roapp/resources/invoices/create.d.ts +2 -0
  76. package/dist/nodes/Roapp/resources/invoices/create.js +401 -0
  77. package/dist/nodes/Roapp/resources/invoices/create.js.map +1 -0
  78. package/dist/nodes/Roapp/resources/invoices/createComment.d.ts +2 -0
  79. package/dist/nodes/Roapp/resources/invoices/createComment.js +43 -0
  80. package/dist/nodes/Roapp/resources/invoices/createComment.js.map +1 -0
  81. package/dist/nodes/Roapp/resources/invoices/createItem.d.ts +2 -0
  82. package/dist/nodes/Roapp/resources/invoices/createItem.js +90 -0
  83. package/dist/nodes/Roapp/resources/invoices/createItem.js.map +1 -0
  84. package/dist/nodes/Roapp/resources/invoices/deleteItem.d.ts +2 -0
  85. package/dist/nodes/Roapp/resources/invoices/deleteItem.js +32 -0
  86. package/dist/nodes/Roapp/resources/invoices/deleteItem.js.map +1 -0
  87. package/dist/nodes/Roapp/resources/invoices/getAll.d.ts +2 -0
  88. package/dist/nodes/Roapp/resources/invoices/getAll.js +99 -0
  89. package/dist/nodes/Roapp/resources/invoices/getAll.js.map +1 -0
  90. package/dist/nodes/Roapp/resources/invoices/index.d.ts +3 -0
  91. package/dist/nodes/Roapp/resources/invoices/index.js +147 -0
  92. package/dist/nodes/Roapp/resources/invoices/index.js.map +1 -0
  93. package/dist/nodes/Roapp/resources/invoices/update.d.ts +2 -0
  94. package/dist/nodes/Roapp/resources/invoices/update.js +79 -0
  95. package/dist/nodes/Roapp/resources/invoices/update.js.map +1 -0
  96. package/dist/nodes/Roapp/resources/invoices/updateItem.d.ts +2 -0
  97. package/dist/nodes/Roapp/resources/invoices/updateItem.js +98 -0
  98. package/dist/nodes/Roapp/resources/invoices/updateItem.js.map +1 -0
  99. package/dist/nodes/Roapp/resources/invoices/updateStatus.d.ts +2 -0
  100. package/dist/nodes/Roapp/resources/invoices/updateStatus.js +38 -0
  101. package/dist/nodes/Roapp/resources/invoices/updateStatus.js.map +1 -0
  102. package/dist/nodes/Roapp/resources/lead/create.d.ts +2 -0
  103. package/dist/nodes/Roapp/resources/lead/create.js +176 -0
  104. package/dist/nodes/Roapp/resources/lead/create.js.map +1 -0
  105. package/dist/nodes/Roapp/resources/lead/createComment.d.ts +2 -0
  106. package/dist/nodes/Roapp/resources/lead/createComment.js +40 -0
  107. package/dist/nodes/Roapp/resources/lead/createComment.js.map +1 -0
  108. package/dist/nodes/Roapp/resources/lead/getAll.d.ts +2 -0
  109. package/dist/nodes/Roapp/resources/lead/getAll.js +92 -0
  110. package/dist/nodes/Roapp/resources/lead/getAll.js.map +1 -0
  111. package/dist/nodes/Roapp/resources/lead/index.d.ts +3 -0
  112. package/dist/nodes/Roapp/resources/lead/index.js +82 -0
  113. package/dist/nodes/Roapp/resources/lead/index.js.map +1 -0
  114. package/dist/nodes/Roapp/resources/lead/updateStatus.d.ts +2 -0
  115. package/dist/nodes/Roapp/resources/lead/updateStatus.js +38 -0
  116. package/dist/nodes/Roapp/resources/lead/updateStatus.js.map +1 -0
  117. package/dist/nodes/Roapp/resources/marketing/index.d.ts +3 -0
  118. package/dist/nodes/Roapp/resources/marketing/index.js +46 -0
  119. package/dist/nodes/Roapp/resources/marketing/index.js.map +1 -0
  120. package/dist/nodes/Roapp/resources/orders/create.d.ts +2 -0
  121. package/dist/nodes/Roapp/resources/orders/create.js +80 -0
  122. package/dist/nodes/Roapp/resources/orders/create.js.map +1 -0
  123. package/dist/nodes/Roapp/resources/orders/createComment.d.ts +2 -0
  124. package/dist/nodes/Roapp/resources/orders/createComment.js +43 -0
  125. package/dist/nodes/Roapp/resources/orders/createComment.js.map +1 -0
  126. package/dist/nodes/Roapp/resources/orders/createItem.d.ts +2 -0
  127. package/dist/nodes/Roapp/resources/orders/createItem.js +86 -0
  128. package/dist/nodes/Roapp/resources/orders/createItem.js.map +1 -0
  129. package/dist/nodes/Roapp/resources/orders/deleteItem.d.ts +2 -0
  130. package/dist/nodes/Roapp/resources/orders/deleteItem.js +32 -0
  131. package/dist/nodes/Roapp/resources/orders/deleteItem.js.map +1 -0
  132. package/dist/nodes/Roapp/resources/orders/getAll.d.ts +2 -0
  133. package/dist/nodes/Roapp/resources/orders/getAll.js +63 -0
  134. package/dist/nodes/Roapp/resources/orders/getAll.js.map +1 -0
  135. package/dist/nodes/Roapp/resources/orders/getPublicUrl.d.ts +2 -0
  136. package/dist/nodes/Roapp/resources/orders/getPublicUrl.js +20 -0
  137. package/dist/nodes/Roapp/resources/orders/getPublicUrl.js.map +1 -0
  138. package/dist/nodes/Roapp/resources/orders/index.d.ts +3 -0
  139. package/dist/nodes/Roapp/resources/orders/index.js +183 -0
  140. package/dist/nodes/Roapp/resources/orders/index.js.map +1 -0
  141. package/dist/nodes/Roapp/resources/orders/updateItem.d.ts +2 -0
  142. package/dist/nodes/Roapp/resources/orders/updateItem.js +97 -0
  143. package/dist/nodes/Roapp/resources/orders/updateItem.js.map +1 -0
  144. package/dist/nodes/Roapp/resources/orders/updateStatus.d.ts +2 -0
  145. package/dist/nodes/Roapp/resources/orders/updateStatus.js +38 -0
  146. package/dist/nodes/Roapp/resources/orders/updateStatus.js.map +1 -0
  147. package/dist/nodes/Roapp/resources/organization/create.d.ts +2 -0
  148. package/dist/nodes/Roapp/resources/organization/create.js +55 -0
  149. package/dist/nodes/Roapp/resources/organization/create.js.map +1 -0
  150. package/dist/nodes/Roapp/resources/organization/getAll.d.ts +2 -0
  151. package/dist/nodes/Roapp/resources/organization/getAll.js +5 -0
  152. package/dist/nodes/Roapp/resources/organization/getAll.js.map +1 -0
  153. package/dist/nodes/Roapp/resources/organization/index.d.ts +3 -0
  154. package/dist/nodes/Roapp/resources/organization/index.js +84 -0
  155. package/dist/nodes/Roapp/resources/organization/index.js.map +1 -0
  156. package/dist/nodes/Roapp/resources/person/create.d.ts +2 -0
  157. package/dist/nodes/Roapp/resources/person/create.js +78 -0
  158. package/dist/nodes/Roapp/resources/person/create.js.map +1 -0
  159. package/dist/nodes/Roapp/resources/person/getAll.d.ts +2 -0
  160. package/dist/nodes/Roapp/resources/person/getAll.js +5 -0
  161. package/dist/nodes/Roapp/resources/person/getAll.js.map +1 -0
  162. package/dist/nodes/Roapp/resources/person/index.d.ts +3 -0
  163. package/dist/nodes/Roapp/resources/person/index.js +83 -0
  164. package/dist/nodes/Roapp/resources/person/index.js.map +1 -0
  165. package/dist/nodes/Roapp/resources/sale/getAll.d.ts +2 -0
  166. package/dist/nodes/Roapp/resources/sale/getAll.js +5 -0
  167. package/dist/nodes/Roapp/resources/sale/getAll.js.map +1 -0
  168. package/dist/nodes/Roapp/resources/sale/index.d.ts +3 -0
  169. package/dist/nodes/Roapp/resources/sale/index.js +46 -0
  170. package/dist/nodes/Roapp/resources/sale/index.js.map +1 -0
  171. package/dist/nodes/Roapp/resources/warehouse/getStock.d.ts +2 -0
  172. package/dist/nodes/Roapp/resources/warehouse/getStock.js +92 -0
  173. package/dist/nodes/Roapp/resources/warehouse/getStock.js.map +1 -0
  174. package/dist/nodes/Roapp/resources/warehouse/getWarehouses.d.ts +2 -0
  175. package/dist/nodes/Roapp/resources/warehouse/getWarehouses.js +43 -0
  176. package/dist/nodes/Roapp/resources/warehouse/getWarehouses.js.map +1 -0
  177. package/dist/nodes/Roapp/resources/warehouse/index.d.ts +3 -0
  178. package/dist/nodes/Roapp/resources/warehouse/index.js +47 -0
  179. package/dist/nodes/Roapp/resources/warehouse/index.js.map +1 -0
  180. package/dist/nodes/Roapp/roapp.svg +26 -0
  181. package/dist/nodes/Roapp/roapp_dark.svg +29 -0
  182. package/dist/nodes/Roapp/shared/methods.d.ts +27 -0
  183. package/dist/nodes/Roapp/shared/methods.js +576 -0
  184. package/dist/nodes/Roapp/shared/methods.js.map +1 -0
  185. package/dist/nodes/Roapp/shared/sharedFields.d.ts +2 -0
  186. package/dist/nodes/Roapp/shared/sharedFields.js +640 -0
  187. package/dist/nodes/Roapp/shared/sharedFields.js.map +1 -0
  188. package/dist/package.json +52 -0
  189. package/dist/tsconfig.tsbuildinfo +1 -0
  190. package/package.json +52 -0
package/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # n8n-nodes-roapp
2
+
3
+ This is an n8n community node. It lets you use [ROapp.io API](https://roapp.readme.io/) in your n8n workflows.
4
+
5
+ ROapp.io is a comprehensive business management platform that helps companies manage their operations including orders, invoices, bookings, customers, inventory, and more.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Credentials](#credentials)
12
+ [Compatibility](#compatibility)
13
+ [Usage](#usage)
14
+ [Resources](#resources)
15
+ [Version history](#version-history)
16
+
17
+ ## Installation
18
+
19
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
20
+
21
+ ## Credentials
22
+
23
+ To use this node, you need to create [ROapp.io API](https://roapp.readme.io/) credentials:
24
+
25
+ 1. Sign up for a ROapp.io account at https://roapp.io/
26
+ 2. Get an API access token from your ROapp.io account settings
27
+ 3. In n8n, create new credentials of type "Roapp Roapp API"
28
+ 4. Enter your Access Token in the credentials form
29
+
30
+ The node uses Bearer token authentication, automatically adding the `Authorization: Bearer <your_token>` header to all API requests.
31
+
32
+ ## Operations
33
+
34
+ The Roapp node supports the following resources and operations:
35
+
36
+ ### Core Operations (available for most resources)
37
+ - **Get All**: Retrieve multiple records with filtering and pagination
38
+ - **Get**: Retrieve a single record by ID
39
+ - **Create**: Create a new record
40
+ - **Update**: Update an existing record
41
+ - **Delete**: Delete a record
42
+
43
+ ### Specialized Operations
44
+ - **Item Management**: For resources that support line items (Orders, Invoices, Bookings):
45
+ - Create Item: Add an item to a parent record
46
+ - Update Item: Modify an existing item
47
+ - Delete Item: Remove an item from a parent record
48
+ - **Status Updates**: Update the status of records (e.g., order status, invoice status)
49
+ - **Comments**: Add comments to records
50
+ - **Additional Operations**: Specific to certain resources (e.g., Get Public URL for orders, Get Types, Get Statuses)
51
+
52
+ ## Compatibility
53
+
54
+ - **Minimum n8n version**: 2.16.1
55
+ - **Tested against**: n8n 2.16.1+
56
+ - **Known incompatibilities**: None reported
57
+
58
+ ## Usage
59
+
60
+ ### Basic Workflow Example
61
+ 1. Set up your ROapp credentials as described above
62
+ 2. Add the Roapp node to your workflow
63
+ 3. Select the desired resource (e.g., "Invoice")
64
+ 4. Choose the operation (e.g., "Create")
65
+ 5. Configure the required fields for the operation
66
+ 6. Connect the node to other nodes in your workflow as needed
67
+
68
+ ### Handling Pagination
69
+ When using "Get All" operations, you can:
70
+ - Set "Return All" to automatically paginate through all results
71
+ - Or set a specific "Limit" to control how many records are returned
72
+
73
+ ### Working with Custom Fields
74
+ The node automatically handles custom fields for supported resources through the resource mapping feature.
75
+
76
+ ## Resources
77
+
78
+ The Roapp node provides access to the following [ROapp.io API](https://roapp.readme.io/) resources:
79
+
80
+ ### Business Operations
81
+ - **Orders**: Manage customer orders, including items, status, payments
82
+ - **Invoices**: Create and manage invoices, invoice items, and payment tracking
83
+ - **Bookings**: Handle service bookings, appointments, and reservations
84
+ - **Sales**: Track sales opportunities and pipeline management
85
+
86
+ ### Customer & Contact Management
87
+ - **Persons**: Manage individual customer/contact records
88
+ - **Organizations**: Manage business accounts and company contacts
89
+ - **Leads**: Track potential sales leads and prospects
90
+
91
+ ### Product & Inventory
92
+ - **Catalog**: Manage products and services
93
+ - **Assets**: Track company assets and equipment
94
+ - **Warehouse**: Manage inventory and warehouse operations
95
+
96
+ ### Company & Configuration
97
+ - **Company**: Access company information and settings
98
+ - **Marketing**: Access marketing campaign data and analytics
99
+ - **Deduplication**: Manage duplicate detection and merging rules
100
+
101
+ ### Common Fields Across Resources
102
+ Most resources support standard fields like:
103
+ - ID, creation/update timestamps
104
+ - Status and type classifications
105
+ - Monetary values (prices, amounts, taxes)
106
+ - References to related resources (customer IDs, product IDs, etc.)
107
+ - Custom fields (configured in your ROapp.io account)
108
+
109
+ ## Version history
110
+
111
+ ### Version 1.0.0
112
+ - Initial release
113
+ - Support for all major [ROapp.io API](https://roapp.readme.io/) resources
114
+ - Full CRUD operations for each resource
115
+ - Specialized operations for line items, status updates, and comments
116
+ - Custom field handling and resource mapping
117
+ - Secure authentication via Access Token
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
2
+ export declare class RoappApi implements ICredentialType {
3
+ name: string;
4
+ icon: Icon;
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoappApi = void 0;
4
+ class RoappApi {
5
+ constructor() {
6
+ this.name = 'roappApi';
7
+ this.icon = 'file:../nodes/ROapp/roapp.svg';
8
+ this.displayName = 'RoappApi API';
9
+ this.documentationUrl = 'https://github.com/vasyl-d/vasyl-d/ro-app-n8n/@roapp/-roapp?tab=readme-ov-file#credentials';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Access Token',
13
+ name: 'accessToken',
14
+ type: 'string',
15
+ typeOptions: { password: true },
16
+ required: true,
17
+ default: '',
18
+ },
19
+ ];
20
+ this.authenticate = {
21
+ type: 'generic',
22
+ properties: {
23
+ headers: {
24
+ Authorization: '=Bearer {{$credentials.accessToken}}',
25
+ },
26
+ },
27
+ };
28
+ this.test = {
29
+ request: {
30
+ baseURL: 'https://api.roapp.io/',
31
+ url: 'v2/company/locations',
32
+ },
33
+ };
34
+ }
35
+ }
36
+ exports.RoappApi = RoappApi;
37
+ //# sourceMappingURL=RoappApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoappApi.credentials.js","sourceRoot":"","sources":["../../credentials/RoappApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,QAAQ;IAArB;QACC,SAAI,GAAG,UAAU,CAAC;QAClB,SAAI,GAAS,+BAA+B,CAAC;QAE7C,gBAAW,GAAG,cAAc,CAAC;QAG7B,qBAAgB,GAAG,4FAA4F,CAAC;QAEhH,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;iBACrD;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,uBAAuB;gBAChC,GAAG,EAAE,sBAAsB;aAC3B;SACD,CAAC;IACH,CAAC;CAAA;AApCD,4BAoCC"}
@@ -0,0 +1,18 @@
1
+ import { type INodeType, type INodeTypeDescription, type IExecuteFunctions, type INodeExecutionData, ResourceMapperFields, INodePropertyOptions, ILoadOptionsFunctions } from 'n8n-workflow';
2
+ export declare class Roapp implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getStatuses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ getTypes(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ getAdCampaigns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
+ getEmployees(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
10
+ getLocations(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
11
+ getLocationResources(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
12
+ };
13
+ resourceMapping: {
14
+ getCustomFields(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
15
+ };
16
+ };
17
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
18
+ }
@@ -0,0 +1,237 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Roapp = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const sharedFields_1 = require("./shared/sharedFields");
6
+ const person_1 = require("./resources/person");
7
+ const organization_1 = require("./resources/organization");
8
+ const orders_1 = require("./resources/orders");
9
+ const sale_1 = require("./resources/sale");
10
+ const invoices_1 = require("./resources/invoices");
11
+ const company_1 = require("./resources/company");
12
+ const marketing_1 = require("./resources/marketing");
13
+ const assets_1 = require("./resources/assets");
14
+ const warehouse_1 = require("./resources/warehouse");
15
+ const lead_1 = require("./resources/lead");
16
+ const estimates_1 = require("./resources/estimates");
17
+ const catalog_1 = require("./resources/catalog");
18
+ const bookings_1 = require("./resources/bookings");
19
+ const methods_1 = require("./shared/methods");
20
+ class Roapp {
21
+ constructor() {
22
+ this.description = {
23
+ displayName: 'Roapp',
24
+ name: 'roapp',
25
+ icon: { light: 'file:./roapp.svg', dark: 'file:./roapp_dark.svg' },
26
+ group: ['transform'],
27
+ version: 1,
28
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
29
+ description: 'Interact with the Roapp.io API',
30
+ defaults: {
31
+ name: 'Roapp',
32
+ },
33
+ usableAsTool: true,
34
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
35
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
36
+ credentials: [{ name: 'roappApi', required: true }],
37
+ requestDefaults: {
38
+ baseURL: 'https://api.roapp.io/',
39
+ headers: {
40
+ Accept: 'application/json',
41
+ 'Content-Type': 'application/json',
42
+ },
43
+ },
44
+ properties: [
45
+ {
46
+ displayName: 'Resource',
47
+ name: 'resource',
48
+ type: 'options',
49
+ noDataExpression: true,
50
+ options: [
51
+ {
52
+ name: 'Asset',
53
+ value: 'asset',
54
+ },
55
+ {
56
+ name: 'Booking',
57
+ value: 'booking',
58
+ },
59
+ {
60
+ name: 'Catalog',
61
+ value: 'catalog',
62
+ },
63
+ {
64
+ name: 'Company',
65
+ value: 'company',
66
+ },
67
+ {
68
+ name: 'Estimate',
69
+ value: 'estimate',
70
+ },
71
+ {
72
+ name: 'Invoice',
73
+ value: 'invoice',
74
+ },
75
+ {
76
+ name: 'Lead',
77
+ value: 'lead',
78
+ },
79
+ {
80
+ name: 'Marketing',
81
+ value: 'marketing',
82
+ },
83
+ {
84
+ name: 'Order',
85
+ value: 'order',
86
+ },
87
+ {
88
+ name: 'Organization',
89
+ value: 'organization',
90
+ },
91
+ {
92
+ name: 'Person',
93
+ value: 'person',
94
+ },
95
+ {
96
+ name: 'Sale',
97
+ value: 'sale',
98
+ },
99
+ {
100
+ name: 'Warehouse',
101
+ value: 'warehouse',
102
+ },
103
+ ],
104
+ default: 'catalog',
105
+ },
106
+ ...company_1.companyDescription,
107
+ ...marketing_1.marketingDescription,
108
+ ...person_1.personDescription,
109
+ ...orders_1.ordersDescription,
110
+ ...lead_1.leadDescription,
111
+ ...organization_1.organizationDescription,
112
+ ...sale_1.saleDescription,
113
+ ...invoices_1.invoiceDescription,
114
+ ...assets_1.assetDescription,
115
+ ...bookings_1.bookingsDescription,
116
+ ...estimates_1.estimatesDescription,
117
+ ...warehouse_1.warehouseDescription,
118
+ ...catalog_1.catalogDescription,
119
+ ...sharedFields_1.globalFields,
120
+ ],
121
+ };
122
+ this.methods = {
123
+ loadOptions: {
124
+ async getStatuses() {
125
+ const resource = this.getCurrentNodeParameter('resource');
126
+ const fields = await methods_1.getResourceStatuses.call(this, resource);
127
+ return fields;
128
+ },
129
+ async getTypes() {
130
+ const resource = this.getCurrentNodeParameter('resource');
131
+ const fields = await methods_1.getResourceTypes.call(this, resource);
132
+ return fields;
133
+ },
134
+ async getAdCampaigns() {
135
+ return await methods_1.getAdCampaigns.call(this);
136
+ },
137
+ async getEmployees() {
138
+ const fields = await methods_1.getEmployees.call(this);
139
+ return fields;
140
+ },
141
+ async getLocations() {
142
+ const fields = await methods_1.getLocations.call(this);
143
+ return fields;
144
+ },
145
+ async getLocationResources() {
146
+ const branch_id = this.getCurrentNodeParameter('branch_id');
147
+ if (!branch_id) {
148
+ return [];
149
+ }
150
+ ;
151
+ const fields = await methods_1.getLocationResources.call(this, branch_id);
152
+ return fields;
153
+ },
154
+ },
155
+ resourceMapping: {
156
+ async getCustomFields() {
157
+ const resource = this.getCurrentNodeParameter('resource');
158
+ return await methods_1.fetchCustomFieldsData.call(this, resource);
159
+ }
160
+ }
161
+ };
162
+ }
163
+ async execute() {
164
+ const items = this.getInputData();
165
+ const returnData = [];
166
+ for (let i = 0; i < items.length; i++) {
167
+ const resource = this.getNodeParameter('resource', i);
168
+ const operation = this.getNodeParameter('operation', i);
169
+ let response;
170
+ try {
171
+ switch (resource) {
172
+ case 'order':
173
+ response = await orders_1.executeOrderOperation.call(this, operation, i);
174
+ break;
175
+ case 'person':
176
+ response = await person_1.executePersonOperation.call(this, operation, i);
177
+ break;
178
+ case 'invoice':
179
+ response = await invoices_1.executeInvoiceOperation.call(this, operation, i);
180
+ break;
181
+ case 'organization':
182
+ response = await organization_1.executeOrganizationOperation.call(this, operation, i);
183
+ break;
184
+ case 'sale':
185
+ response = await sale_1.executeSaleOperation.call(this, operation, i);
186
+ break;
187
+ case 'company':
188
+ response = await company_1.executeCompanyOperations.call(this, operation, i);
189
+ break;
190
+ case 'catalog':
191
+ response = await catalog_1.executeCatalogOperation.call(this, operation, i);
192
+ break;
193
+ case 'booking':
194
+ response = await bookings_1.executeBookingOperation.call(this, operation, i);
195
+ break;
196
+ case 'marketing':
197
+ response = await marketing_1.executeGetMarketing.call(this, operation, i);
198
+ break;
199
+ case 'asset':
200
+ response = await assets_1.executeAssetOperation.call(this, operation, i);
201
+ break;
202
+ case 'warehouse':
203
+ response = await warehouse_1.executeWarehouseOperation.call(this, operation, i);
204
+ break;
205
+ case 'estimate':
206
+ response = await estimates_1.executeEstimateOperation.call(this, operation, i);
207
+ break;
208
+ case 'lead':
209
+ response = await lead_1.executeLeadOperation.call(this, operation, i);
210
+ break;
211
+ default:
212
+ response = [[{ json: {},
213
+ pairedItem: {
214
+ item: i,
215
+ } }]];
216
+ }
217
+ }
218
+ catch (error) {
219
+ if (this.continueOnFail()) {
220
+ returnData.push([{ json: { error: error.message },
221
+ pairedItem: {
222
+ item: i,
223
+ } }]);
224
+ continue;
225
+ }
226
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
227
+ message: error.message,
228
+ itemIndex: i
229
+ });
230
+ }
231
+ returnData.push(...response);
232
+ }
233
+ return returnData;
234
+ }
235
+ }
236
+ exports.Roapp = Roapp;
237
+ //# sourceMappingURL=Roapp.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Roapp.node.js","sourceRoot":"","sources":["../../../nodes/Roapp/Roapp.node.ts"],"names":[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AM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE;oBAC1C,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,SAAS,EAAE,CAAC;iBACZ,CAAC,CAAC;YACN,CAAC;YAED,UAAU,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAK9B,CAAC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD;AAnOD,sBAmOC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "@roapp/n8n-nodes-roapp",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Development", "Developer Tools"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://github.com/org/repo?tab=readme-ov-file#credentials"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://github.com/org/repo?tab=readme-ov-file"
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const assetCreateDescription: INodeProperties[];
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assetCreateDescription = void 0;
4
+ const showOnlyForAssetCreate = {
5
+ operation: ['create', 'update'],
6
+ resource: ['asset'],
7
+ };
8
+ exports.assetCreateDescription = [
9
+ {
10
+ displayName: 'Asset ID',
11
+ name: 'asset_id',
12
+ type: 'string',
13
+ default: '',
14
+ required: true,
15
+ displayOptions: {
16
+ show: {
17
+ operation: ['update'],
18
+ resource: ['asset'],
19
+ },
20
+ },
21
+ },
22
+ {
23
+ displayName: 'UID/Serial',
24
+ name: 'uid',
25
+ type: 'string',
26
+ default: '',
27
+ required: true,
28
+ displayOptions: {
29
+ show: showOnlyForAssetCreate,
30
+ },
31
+ },
32
+ {
33
+ displayName: 'Reg Number',
34
+ name: 'reg_number',
35
+ type: 'string',
36
+ default: '',
37
+ displayOptions: {
38
+ show: showOnlyForAssetCreate,
39
+ },
40
+ },
41
+ {
42
+ displayName: 'Group',
43
+ name: 'group',
44
+ type: 'string',
45
+ default: '',
46
+ required: true,
47
+ displayOptions: {
48
+ show: showOnlyForAssetCreate,
49
+ },
50
+ },
51
+ {
52
+ displayName: 'Brand',
53
+ name: 'brand',
54
+ type: 'string',
55
+ default: '',
56
+ displayOptions: {
57
+ show: showOnlyForAssetCreate,
58
+ },
59
+ },
60
+ {
61
+ displayName: 'Model',
62
+ name: 'model',
63
+ type: 'string',
64
+ default: '',
65
+ displayOptions: {
66
+ show: showOnlyForAssetCreate,
67
+ },
68
+ },
69
+ {
70
+ displayName: 'Owner ID',
71
+ name: 'owner_id',
72
+ type: 'string',
73
+ default: '',
74
+ displayOptions: {
75
+ show: {
76
+ operation: ['create', 'update'],
77
+ resource: ['asset'],
78
+ warehouse_id: ['', undefined]
79
+ }
80
+ },
81
+ },
82
+ {
83
+ displayName: 'Warehouse ID',
84
+ name: 'warehouse_id',
85
+ type: 'string',
86
+ default: '',
87
+ displayOptions: {
88
+ show: {
89
+ operation: ['create', 'update'],
90
+ resource: ['asset'],
91
+ }
92
+ },
93
+ },
94
+ {
95
+ displayName: 'Year',
96
+ name: 'year',
97
+ type: 'string',
98
+ default: '',
99
+ displayOptions: {
100
+ show: showOnlyForAssetCreate,
101
+ },
102
+ },
103
+ {
104
+ displayName: 'Cost',
105
+ name: 'cost',
106
+ type: 'string',
107
+ default: '',
108
+ displayOptions: {
109
+ show: showOnlyForAssetCreate,
110
+ },
111
+ },
112
+ ];
113
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/assets/create.ts"],"names":[],"mappings":";;;AAEA,MAAM,sBAAsB,GAAG;IAC3B,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,CAAC;CACtB,CAAC;AAEW,QA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;gBACF,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;gBAC/B,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,YAAY,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC;aAChC;SACJ;KACJ;IACD;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;gBAC/B,QAAQ,EAAE,CAAC,OAAO,CAAC;aAEtB;SACJ;KACJ;IACD;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE,sBAAsB;SAC/B;KACJ;IACD;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE,sBAAsB;SAC/B;KACJ;CAuBJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const assetGetManyDescription: INodeProperties[];
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assetGetManyDescription = void 0;
4
+ const showOnlyForAssetGetMany = {
5
+ operation: ['getAll'],
6
+ resource: ['asset'],
7
+ };
8
+ exports.assetGetManyDescription = [
9
+ {
10
+ displayName: 'IDs',
11
+ name: 'ids',
12
+ type: 'string',
13
+ typeOptions: {
14
+ multipleValues: true,
15
+ },
16
+ default: [],
17
+ description: 'Filter by asset ID Specify one or more IDs using an <a href="https://n8n.io">expression</a>',
18
+ displayOptions: {
19
+ show: showOnlyForAssetGetMany,
20
+ },
21
+ },
22
+ {
23
+ displayName: 'Uids',
24
+ name: 'uid',
25
+ type: 'string',
26
+ typeOptions: {
27
+ multipleValues: true,
28
+ },
29
+ default: [],
30
+ description: 'Filter by asset uid/serial number. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
31
+ displayOptions: {
32
+ show: showOnlyForAssetGetMany,
33
+ },
34
+ },
35
+ {
36
+ displayName: 'Owner IDs',
37
+ name: 'owner_id',
38
+ type: 'string',
39
+ typeOptions: {
40
+ multipleValues: true,
41
+ },
42
+ default: [],
43
+ description: 'Filter by customer ID. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
44
+ displayOptions: {
45
+ show: showOnlyForAssetGetMany,
46
+ },
47
+ },
48
+ {
49
+ displayName: 'Warehouse IDs',
50
+ name: 'warehouse_id[]',
51
+ type: 'string',
52
+ typeOptions: {
53
+ multipleValues: true,
54
+ },
55
+ default: [],
56
+ description: 'Filter by warehouse ID. Specify one or more IDs using an <a href="https://n8n.io">expression</a>.',
57
+ displayOptions: {
58
+ show: showOnlyForAssetGetMany,
59
+ },
60
+ },
61
+ ];
62
+ //# sourceMappingURL=getAll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Roapp/resources/assets/getAll.ts"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;IAC/B,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,QAAQ,EAAE,CAAC,OAAO,CAAC;CACnB,CAAC;AAEW,QAAA,uBAAuB,GAAsB;IACzD;QACC,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAC,EAAE;QACV,WAAW,EAAE,6FAA6F;QAC1G,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;KACD;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAC,EAAE;QACV,WAAW,EAAE,8GAA8G;QAC3H,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;KACD;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAC,EAAE;QACV,WAAW,EAAE,kGAAkG;QAC/G,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;KACD;IACD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;SACpB;QACD,OAAO,EAAC,EAAE;QACV,WAAW,EAAE,mGAAmG;QAChH,cAAc,EAAE;YACf,IAAI,EAAE,uBAAuB;SAC7B;KACD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare const assetDescription: INodeProperties[];
3
+ export declare function executeAssetOperation(this: IExecuteFunctions, operation: string, index: number): Promise<INodeExecutionData[][]>;