File tree Expand file tree Collapse file tree 7 files changed +1154
-2
lines changed Expand file tree Collapse file tree 7 files changed +1154
-2
lines changed Original file line number Diff line number Diff line change 1+ import invoice_ninja from "../../invoice_ninja.app.mjs" ;
2+ import { axios } from "@pipedream/platform" ;
3+
4+ export default {
5+ key : "invoice_ninja-create-client" ,
6+ name : "Create Client" ,
7+ description : "Creates a new client in Invoice Ninja. [See the documentation]()" ,
8+ version : "0.0.{{ts}}" ,
9+ type : "action" ,
10+ props : {
11+ invoice_ninja,
12+ contacts : {
13+ propDefinition : [
14+ invoice_ninja ,
15+ "contacts" ,
16+ ] ,
17+ } ,
18+ countryId : {
19+ propDefinition : [
20+ invoice_ninja ,
21+ "countryId" ,
22+ ] ,
23+ } ,
24+ name : {
25+ propDefinition : [
26+ invoice_ninja ,
27+ "name" ,
28+ ] ,
29+ optional : true ,
30+ } ,
31+ website : {
32+ propDefinition : [
33+ invoice_ninja ,
34+ "website" ,
35+ ] ,
36+ optional : true ,
37+ } ,
38+ privateNotes : {
39+ propDefinition : [
40+ invoice_ninja ,
41+ "privateNotes" ,
42+ ] ,
43+ optional : true ,
44+ } ,
45+ industryId : {
46+ propDefinition : [
47+ invoice_ninja ,
48+ "industryId" ,
49+ ] ,
50+ optional : true ,
51+ } ,
52+ sizeId : {
53+ propDefinition : [
54+ invoice_ninja ,
55+ "sizeId" ,
56+ ] ,
57+ optional : true ,
58+ } ,
59+ address1 : {
60+ propDefinition : [
61+ invoice_ninja ,
62+ "address1" ,
63+ ] ,
64+ optional : true ,
65+ } ,
66+ address2 : {
67+ propDefinition : [
68+ invoice_ninja ,
69+ "address2" ,
70+ ] ,
71+ optional : true ,
72+ } ,
73+ city : {
74+ propDefinition : [
75+ invoice_ninja ,
76+ "city" ,
77+ ] ,
78+ optional : true ,
79+ } ,
80+ state : {
81+ propDefinition : [
82+ invoice_ninja ,
83+ "state" ,
84+ ] ,
85+ optional : true ,
86+ } ,
87+ postalCode : {
88+ propDefinition : [
89+ invoice_ninja ,
90+ "postalCode" ,
91+ ] ,
92+ optional : true ,
93+ } ,
94+ phone : {
95+ propDefinition : [
96+ invoice_ninja ,
97+ "phone" ,
98+ ] ,
99+ optional : true ,
100+ } ,
101+ vatNumber : {
102+ propDefinition : [
103+ invoice_ninja ,
104+ "vatNumber" ,
105+ ] ,
106+ optional : true ,
107+ } ,
108+ idNumber : {
109+ propDefinition : [
110+ invoice_ninja ,
111+ "idNumber" ,
112+ ] ,
113+ optional : true ,
114+ } ,
115+ groupSettingsId : {
116+ propDefinition : [
117+ invoice_ninja ,
118+ "groupSettingsId" ,
119+ ] ,
120+ optional : true ,
121+ } ,
122+ classification : {
123+ propDefinition : [
124+ invoice_ninja ,
125+ "classification" ,
126+ ] ,
127+ optional : true ,
128+ } ,
129+ } ,
130+ async run ( { $ } ) {
131+ const client = await this . invoice_ninja . createNewClient ( {
132+ contacts : this . contacts . map ( JSON . parse ) ,
133+ country_id : this . countryId ,
134+ name : this . name ,
135+ website : this . website ,
136+ private_notes : this . privateNotes ,
137+ industry_id : this . industryId ,
138+ size_id : this . sizeId ,
139+ address1 : this . address1 ,
140+ address2 : this . address2 ,
141+ city : this . city ,
142+ state : this . state ,
143+ postal_code : this . postalCode ,
144+ phone : this . phone ,
145+ vat_number : this . vatNumber ,
146+ id_number : this . idNumber ,
147+ group_settings_id : this . groupSettingsId ,
148+ classification : this . classification ,
149+ } ) ;
150+ $ . export ( "$summary" , `Created client ${ client . name } ` ) ;
151+ return client ;
152+ } ,
153+ } ;
Original file line number Diff line number Diff line change 1+ import invoice_ninja from "../../invoice_ninja.app.mjs" ;
2+ import { axios } from "@pipedream/platform" ;
3+
4+ export default {
5+ key : "invoice_ninja-create-invoice" ,
6+ name : "Create Invoice" ,
7+ description : "Creates a new invoice. [See the documentation]()." ,
8+ version : "0.0.{{ts}}" ,
9+ type : "action" ,
10+ props : {
11+ invoice_ninja : {
12+ type : "app" ,
13+ app : "invoice_ninja" ,
14+ } ,
15+ clientId : {
16+ propDefinition : [
17+ invoice_ninja ,
18+ "clientId" ,
19+ ] ,
20+ } ,
21+ userId : {
22+ propDefinition : [
23+ invoice_ninja ,
24+ "userId" ,
25+ ] ,
26+ optional : true ,
27+ } ,
28+ assignedUserId : {
29+ propDefinition : [
30+ invoice_ninja ,
31+ "assignedUserId" ,
32+ ] ,
33+ optional : true ,
34+ } ,
35+ statusId : {
36+ propDefinition : [
37+ invoice_ninja ,
38+ "statusId" ,
39+ ] ,
40+ optional : true ,
41+ } ,
42+ number : {
43+ propDefinition : [
44+ invoice_ninja ,
45+ "number" ,
46+ ] ,
47+ optional : true ,
48+ } ,
49+ poNumber : {
50+ propDefinition : [
51+ invoice_ninja ,
52+ "poNumber" ,
53+ ] ,
54+ optional : true ,
55+ } ,
56+ terms : {
57+ propDefinition : [
58+ invoice_ninja ,
59+ "terms" ,
60+ ] ,
61+ optional : true ,
62+ } ,
63+ publicNotes : {
64+ propDefinition : [
65+ invoice_ninja ,
66+ "publicNotes" ,
67+ ] ,
68+ optional : true ,
69+ } ,
70+ privateNotes : {
71+ propDefinition : [
72+ invoice_ninja ,
73+ "privateNotes" ,
74+ ] ,
75+ optional : true ,
76+ } ,
77+ footer : {
78+ propDefinition : [
79+ invoice_ninja ,
80+ "footer" ,
81+ ] ,
82+ optional : true ,
83+ } ,
84+ customValue1 : {
85+ propDefinition : [
86+ invoice_ninja ,
87+ "customValue1" ,
88+ ] ,
89+ optional : true ,
90+ } ,
91+ customValue2 : {
92+ propDefinition : [
93+ invoice_ninja ,
94+ "customValue2" ,
95+ ] ,
96+ optional : true ,
97+ } ,
98+ customValue3 : {
99+ propDefinition : [
100+ invoice_ninja ,
101+ "customValue3" ,
102+ ] ,
103+ optional : true ,
104+ } ,
105+ customValue4 : {
106+ propDefinition : [
107+ invoice_ninja ,
108+ "customValue4" ,
109+ ] ,
110+ optional : true ,
111+ } ,
112+ totalTaxes : {
113+ propDefinition : [
114+ invoice_ninja ,
115+ "totalTaxes" ,
116+ ] ,
117+ optional : true ,
118+ } ,
119+ lineItems : {
120+ propDefinition : [
121+ invoice_ninja ,
122+ "lineItems" ,
123+ ] ,
124+ optional : true ,
125+ } ,
126+ amount : {
127+ propDefinition : [
128+ invoice_ninja ,
129+ "amount" ,
130+ ] ,
131+ optional : true ,
132+ } ,
133+ balance : {
134+ propDefinition : [
135+ invoice_ninja ,
136+ "balance" ,
137+ ] ,
138+ optional : true ,
139+ } ,
140+ paidToDate : {
141+ propDefinition : [
142+ invoice_ninja ,
143+ "paidToDate" ,
144+ ] ,
145+ optional : true ,
146+ } ,
147+ discount : {
148+ propDefinition : [
149+ invoice_ninja ,
150+ "discount" ,
151+ ] ,
152+ optional : true ,
153+ } ,
154+ date : {
155+ propDefinition : [
156+ invoice_ninja ,
157+ "date" ,
158+ ] ,
159+ optional : true ,
160+ } ,
161+ dueDate : {
162+ propDefinition : [
163+ invoice_ninja ,
164+ "dueDate" ,
165+ ] ,
166+ optional : true ,
167+ } ,
168+ } ,
169+ async run ( { $ } ) {
170+ const invoice = await this . invoice_ninja . createNewInvoice ( ) ;
171+ $ . export ( "$summary" , `Created invoice with ID: ${ invoice . id } ` ) ;
172+ return invoice ;
173+ } ,
174+ } ;
You can’t perform that action at this time.
0 commit comments