@activepieces/piece-katana 0.1.5 → 0.1.6

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 (41) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +20 -37
  3. package/src/index.d.ts +0 -2
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-customer.d.ts +0 -15
  7. package/src/lib/actions/create-customer.d.ts.map +0 -1
  8. package/src/lib/actions/create-customer.js +0 -201
  9. package/src/lib/actions/create-customer.js.map +0 -1
  10. package/src/lib/actions/create-sales-order.d.ts +0 -24
  11. package/src/lib/actions/create-sales-order.d.ts.map +0 -1
  12. package/src/lib/actions/create-sales-order.js +0 -280
  13. package/src/lib/actions/create-sales-order.js.map +0 -1
  14. package/src/lib/actions/find-customer.d.ts +0 -15
  15. package/src/lib/actions/find-customer.d.ts.map +0 -1
  16. package/src/lib/actions/find-customer.js +0 -122
  17. package/src/lib/actions/find-customer.js.map +0 -1
  18. package/src/lib/actions/index.d.ts +0 -4
  19. package/src/lib/actions/index.d.ts.map +0 -1
  20. package/src/lib/actions/index.js +0 -7
  21. package/src/lib/actions/index.js.map +0 -1
  22. package/src/lib/common/auth.d.ts +0 -2
  23. package/src/lib/common/auth.d.ts.map +0 -1
  24. package/src/lib/common/auth.js +0 -41
  25. package/src/lib/common/auth.js.map +0 -1
  26. package/src/lib/common/client.d.ts +0 -3
  27. package/src/lib/common/client.d.ts.map +0 -1
  28. package/src/lib/common/client.js +0 -22
  29. package/src/lib/common/client.js.map +0 -1
  30. package/src/lib/common/constants.d.ts +0 -2
  31. package/src/lib/common/constants.d.ts.map +0 -1
  32. package/src/lib/common/constants.js +0 -5
  33. package/src/lib/common/constants.js.map +0 -1
  34. package/src/lib/common/index.d.ts +0 -5
  35. package/src/lib/common/index.d.ts.map +0 -1
  36. package/src/lib/common/index.js +0 -8
  37. package/src/lib/common/index.js.map +0 -1
  38. package/src/lib/common/props.d.ts +0 -6
  39. package/src/lib/common/props.d.ts.map +0 -1
  40. package/src/lib/common/props.js +0 -212
  41. package/src/lib/common/props.js.map +0 -1
@@ -1,201 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createCustomer = 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 auth_1 = require("../common/auth");
8
- const constants_1 = require("../common/constants");
9
- exports.createCustomer = (0, pieces_framework_1.createAction)({
10
- auth: auth_1.katanaAuth,
11
- name: 'create_customer',
12
- displayName: 'Create Customer',
13
- description: 'Creates a new customer in Katana.',
14
- audience: 'both',
15
- aiMetadata: {
16
- description: 'Creates a new customer record in the Katana manufacturing ERP, optionally with billing/shipping addresses. Use when registering a new customer; only the display name is required. Not idempotent — each call creates a separate customer, so look the customer up first if you need to avoid duplicates.',
17
- idempotent: false,
18
- },
19
- props: {
20
- name: pieces_framework_1.Property.ShortText({
21
- displayName: 'Name',
22
- description: 'Customer display name.',
23
- required: true,
24
- }),
25
- first_name: pieces_framework_1.Property.ShortText({
26
- displayName: 'First Name',
27
- required: false,
28
- }),
29
- last_name: pieces_framework_1.Property.ShortText({
30
- displayName: 'Last Name',
31
- required: false,
32
- }),
33
- company: pieces_framework_1.Property.ShortText({
34
- displayName: 'Company',
35
- required: false,
36
- }),
37
- email: pieces_framework_1.Property.ShortText({
38
- displayName: 'Email',
39
- required: false,
40
- }),
41
- phone: pieces_framework_1.Property.ShortText({
42
- displayName: 'Phone',
43
- required: false,
44
- }),
45
- currency: pieces_framework_1.Property.ShortText({
46
- displayName: 'Currency',
47
- description: 'Currency code (ISO 4217), e.g. USD, EUR, GBP.',
48
- required: false,
49
- }),
50
- reference_id: pieces_framework_1.Property.ShortText({
51
- displayName: 'Reference ID',
52
- description: 'External reference ID (max 100 characters).',
53
- required: false,
54
- }),
55
- category: pieces_framework_1.Property.ShortText({
56
- displayName: 'Category',
57
- description: 'Customer category (max 100 characters).',
58
- required: false,
59
- }),
60
- comment: pieces_framework_1.Property.LongText({
61
- displayName: 'Comment',
62
- description: 'Additional notes about the customer.',
63
- required: false,
64
- }),
65
- discount_rate: pieces_framework_1.Property.Number({
66
- displayName: 'Discount Rate',
67
- description: 'Default discount rate for this customer.',
68
- required: false,
69
- }),
70
- addresses: pieces_framework_1.Property.Array({
71
- displayName: 'Addresses',
72
- required: false,
73
- properties: {
74
- entity_type: pieces_framework_1.Property.StaticDropdown({
75
- displayName: 'Address Type',
76
- required: true,
77
- options: {
78
- options: [
79
- { label: 'Billing', value: 'billing' },
80
- { label: 'Shipping', value: 'shipping' },
81
- ],
82
- },
83
- }),
84
- default: pieces_framework_1.Property.Checkbox({
85
- displayName: 'Set as Default',
86
- required: false,
87
- }),
88
- first_name: pieces_framework_1.Property.ShortText({
89
- displayName: 'First Name',
90
- required: false,
91
- }),
92
- last_name: pieces_framework_1.Property.ShortText({
93
- displayName: 'Last Name',
94
- required: false,
95
- }),
96
- company: pieces_framework_1.Property.ShortText({
97
- displayName: 'Company',
98
- required: false,
99
- }),
100
- phone: pieces_framework_1.Property.ShortText({
101
- displayName: 'Phone',
102
- required: false,
103
- }),
104
- line_1: pieces_framework_1.Property.ShortText({
105
- displayName: 'Address Line 1',
106
- required: false,
107
- }),
108
- line_2: pieces_framework_1.Property.ShortText({
109
- displayName: 'Address Line 2',
110
- required: false,
111
- }),
112
- city: pieces_framework_1.Property.ShortText({
113
- displayName: 'City',
114
- required: false,
115
- }),
116
- state: pieces_framework_1.Property.ShortText({
117
- displayName: 'State',
118
- required: false,
119
- }),
120
- zip: pieces_framework_1.Property.ShortText({
121
- displayName: 'Zip/Postal Code',
122
- required: false,
123
- }),
124
- country: pieces_framework_1.Property.ShortText({
125
- displayName: 'Country',
126
- required: false,
127
- }),
128
- },
129
- }),
130
- },
131
- run(context) {
132
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
133
- const { name, first_name, last_name, company, email, phone, currency, reference_id, category, comment, discount_rate, addresses, } = context.propsValue;
134
- const body = {
135
- name,
136
- };
137
- if (first_name)
138
- body['first_name'] = first_name;
139
- if (last_name)
140
- body['last_name'] = last_name;
141
- if (company)
142
- body['company'] = company;
143
- if (email)
144
- body['email'] = email;
145
- if (phone)
146
- body['phone'] = phone;
147
- if (currency)
148
- body['currency'] = currency;
149
- if (reference_id)
150
- body['reference_id'] = reference_id;
151
- if (category)
152
- body['category'] = category;
153
- if (comment)
154
- body['comment'] = comment;
155
- if (discount_rate !== undefined && discount_rate !== null) {
156
- body['discount_rate'] = discount_rate;
157
- }
158
- if (addresses && addresses.length > 0) {
159
- body['addresses'] = addresses.map((addr) => {
160
- const address = {
161
- entity_type: addr.entity_type,
162
- };
163
- if (addr.default !== undefined)
164
- address['default'] = addr.default;
165
- if (addr.first_name)
166
- address['first_name'] = addr.first_name;
167
- if (addr.last_name)
168
- address['last_name'] = addr.last_name;
169
- if (addr.company)
170
- address['company'] = addr.company;
171
- if (addr.phone)
172
- address['phone'] = addr.phone;
173
- if (addr.line_1)
174
- address['line_1'] = addr.line_1;
175
- if (addr.line_2)
176
- address['line_2'] = addr.line_2;
177
- if (addr.city)
178
- address['city'] = addr.city;
179
- if (addr.state)
180
- address['state'] = addr.state;
181
- if (addr.zip)
182
- address['zip'] = addr.zip;
183
- if (addr.country)
184
- address['country'] = addr.country;
185
- return address;
186
- });
187
- }
188
- const response = yield pieces_common_1.httpClient.sendRequest({
189
- method: pieces_common_1.HttpMethod.POST,
190
- url: `${constants_1.BASE_URL}/customers`,
191
- authentication: {
192
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
193
- token: context.auth,
194
- },
195
- body,
196
- });
197
- return response.body;
198
- });
199
- },
200
- });
201
- //# sourceMappingURL=create-customer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-customer.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACx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,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;oBAC9C,IAAI,IAAI,CAAC,MAAM;wBAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;oBACjD,IAAI,IAAI,CAAC,MAAM;wBAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;oBACjD,IAAI,IAAI,CAAC,IAAI;wBAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;oBAC3C,IAAI,IAAI,CAAC,KAAK;wBAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;oBAC9C,IAAI,IAAI,CAAC,GAAG;wBAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;oBACxC,IAAI,IAAI,CAAC,OAAO;wBAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;oBAEpD,OAAO,OAAO,CAAC;gBACjB,CAAC,CAAC,CAAC;YACL,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,oBAAQ,YAAY;gBAC5B,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAyB;iBACzC;gBACD,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- export declare const createSalesOrder: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- order_no: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- customer_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- variant_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
5
- quantity: import("@activepieces/pieces-framework").NumberProperty<true>;
6
- price_per_unit: import("@activepieces/pieces-framework").NumberProperty<false>;
7
- total_discount: import("@activepieces/pieces-framework").NumberProperty<false>;
8
- tax_rate_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
9
- additional_order_rows: import("@activepieces/pieces-framework").JsonProperty<false>;
10
- status: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
11
- location_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
12
- currency: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
- order_created_date: import("@activepieces/pieces-framework").DateTimeProperty<false>;
14
- delivery_date: import("@activepieces/pieces-framework").DateTimeProperty<false>;
15
- customer_ref: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- additional_info: import("@activepieces/pieces-framework").LongTextProperty<false>;
17
- tracking_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
- tracking_number_url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
19
- addresses: import("@activepieces/pieces-framework").ArrayProperty<true> | import("@activepieces/pieces-framework").ArrayProperty<false>;
20
- ecommerce_order_type: import("@activepieces/pieces-framework").ShortTextProperty<false>;
21
- ecommerce_store_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
22
- ecommerce_order_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
23
- }>;
24
- //# sourceMappingURL=create-sales-order.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-sales-order.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-sales-order.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;EAoR3B,CAAC"}
@@ -1,280 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createSalesOrder = 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 auth_1 = require("../common/auth");
8
- const constants_1 = require("../common/constants");
9
- const props_1 = require("../common/props");
10
- exports.createSalesOrder = (0, pieces_framework_1.createAction)({
11
- auth: auth_1.katanaAuth,
12
- name: 'create_sales_order',
13
- displayName: 'Create Sales Order',
14
- description: 'Creates a new sales order in Katana.',
15
- audience: 'both',
16
- aiMetadata: {
17
- description: 'Creates a sales order (or quote, when status is PENDING) in the Katana manufacturing ERP for an existing customer. Use when placing an order; it requires an order number, a customer ID, and at least one line item (the primary product variant plus quantity), with extra line items optionally passed as a JSON array. Not idempotent — each call creates a new order, so a repeated call yields a duplicate unless the order number is rejected as already used.',
18
- idempotent: false,
19
- },
20
- props: {
21
- order_no: pieces_framework_1.Property.ShortText({
22
- displayName: 'Order Number',
23
- description: 'Unique order number.',
24
- required: true,
25
- }),
26
- customer_id: props_1.customerDropdown,
27
- // Simple mode: single product variant
28
- variant_id: props_1.variantDropdown,
29
- quantity: pieces_framework_1.Property.Number({
30
- displayName: 'Quantity',
31
- description: 'Quantity for the product variant.',
32
- required: true,
33
- }),
34
- price_per_unit: pieces_framework_1.Property.Number({
35
- displayName: 'Price Per Unit',
36
- description: 'Override price per unit.',
37
- required: false,
38
- }),
39
- total_discount: pieces_framework_1.Property.Number({
40
- displayName: 'Total Discount',
41
- description: 'Discount amount for this line.',
42
- required: false,
43
- }),
44
- tax_rate_id: props_1.taxRateDropdown,
45
- additional_order_rows: pieces_framework_1.Property.Json({
46
- displayName: 'Additional Order Lines (JSON)',
47
- description: 'Add more line items as JSON array. Each object needs: variant_id, quantity. Optional: price_per_unit, total_discount, tax_rate_id, location_id.',
48
- required: false,
49
- }),
50
- status: pieces_framework_1.Property.StaticDropdown({
51
- displayName: 'Status',
52
- description: 'Order status. Use PENDING for quotes.',
53
- required: false,
54
- options: {
55
- options: [
56
- { label: 'Not Shipped', value: 'NOT_SHIPPED' },
57
- { label: 'Pending (Quote)', value: 'PENDING' },
58
- ],
59
- },
60
- }),
61
- location_id: props_1.locationDropdown,
62
- currency: pieces_framework_1.Property.ShortText({
63
- displayName: 'Currency',
64
- description: 'Currency code (ISO 4217), e.g. USD, EUR.',
65
- required: false,
66
- }),
67
- order_created_date: pieces_framework_1.Property.DateTime({
68
- displayName: 'Order Created Date',
69
- required: false,
70
- }),
71
- delivery_date: pieces_framework_1.Property.DateTime({
72
- displayName: 'Delivery Date',
73
- required: false,
74
- }),
75
- customer_ref: pieces_framework_1.Property.ShortText({
76
- displayName: 'Customer Reference',
77
- description: 'Customer reference number (max 255 characters).',
78
- required: false,
79
- }),
80
- additional_info: pieces_framework_1.Property.LongText({
81
- displayName: 'Additional Info',
82
- description: 'Additional notes for this order.',
83
- required: false,
84
- }),
85
- tracking_number: pieces_framework_1.Property.ShortText({
86
- displayName: 'Tracking Number',
87
- description: 'Shipping tracking number (max 256 characters).',
88
- required: false,
89
- }),
90
- tracking_number_url: pieces_framework_1.Property.ShortText({
91
- displayName: 'Tracking URL',
92
- description: 'URL to track the shipment.',
93
- required: false,
94
- }),
95
- addresses: pieces_framework_1.Property.Array({
96
- displayName: 'Addresses',
97
- required: false,
98
- properties: {
99
- entity_type: pieces_framework_1.Property.StaticDropdown({
100
- displayName: 'Address Type',
101
- required: true,
102
- options: {
103
- options: [
104
- { label: 'Billing', value: 'billing' },
105
- { label: 'Shipping', value: 'shipping' },
106
- ],
107
- },
108
- }),
109
- first_name: pieces_framework_1.Property.ShortText({
110
- displayName: 'First Name',
111
- required: false,
112
- }),
113
- last_name: pieces_framework_1.Property.ShortText({
114
- displayName: 'Last Name',
115
- required: false,
116
- }),
117
- company: pieces_framework_1.Property.ShortText({
118
- displayName: 'Company',
119
- required: false,
120
- }),
121
- phone: pieces_framework_1.Property.ShortText({
122
- displayName: 'Phone',
123
- required: false,
124
- }),
125
- line_1: pieces_framework_1.Property.ShortText({
126
- displayName: 'Address Line 1',
127
- required: false,
128
- }),
129
- line_2: pieces_framework_1.Property.ShortText({
130
- displayName: 'Address Line 2',
131
- required: false,
132
- }),
133
- city: pieces_framework_1.Property.ShortText({
134
- displayName: 'City',
135
- required: false,
136
- }),
137
- state: pieces_framework_1.Property.ShortText({
138
- displayName: 'State',
139
- required: false,
140
- }),
141
- zip: pieces_framework_1.Property.ShortText({
142
- displayName: 'Zip/Postal Code',
143
- required: false,
144
- }),
145
- country: pieces_framework_1.Property.ShortText({
146
- displayName: 'Country',
147
- required: false,
148
- }),
149
- },
150
- }),
151
- ecommerce_order_type: pieces_framework_1.Property.ShortText({
152
- displayName: 'E-commerce Order Type',
153
- description: 'Source platform (e.g. shopify).',
154
- required: false,
155
- }),
156
- ecommerce_store_name: pieces_framework_1.Property.ShortText({
157
- displayName: 'E-commerce Store Name',
158
- description: 'Store identifier.',
159
- required: false,
160
- }),
161
- ecommerce_order_id: pieces_framework_1.Property.ShortText({
162
- displayName: 'E-commerce Order ID',
163
- description: 'External order ID from the e-commerce platform.',
164
- required: false,
165
- }),
166
- },
167
- run(context) {
168
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
169
- const { order_no, customer_id, variant_id, quantity, price_per_unit, total_discount, tax_rate_id, additional_order_rows, status, location_id, currency, order_created_date, delivery_date, customer_ref, additional_info, tracking_number, tracking_number_url, addresses, ecommerce_order_type, ecommerce_store_name, ecommerce_order_id, } = context.propsValue;
170
- // Build the first order row
171
- const firstRow = {
172
- variant_id,
173
- quantity,
174
- };
175
- if (price_per_unit !== undefined && price_per_unit !== null) {
176
- firstRow['price_per_unit'] = price_per_unit;
177
- }
178
- if (total_discount !== undefined && total_discount !== null) {
179
- firstRow['total_discount'] = total_discount;
180
- }
181
- if (tax_rate_id)
182
- firstRow['tax_rate_id'] = tax_rate_id;
183
- if (location_id)
184
- firstRow['location_id'] = location_id;
185
- // Start with the first row
186
- const salesOrderRows = [firstRow];
187
- // Add additional rows if provided
188
- if (additional_order_rows) {
189
- const additionalRows = Array.isArray(additional_order_rows)
190
- ? additional_order_rows
191
- : [];
192
- for (const row of additionalRows) {
193
- const orderRow = {
194
- variant_id: row.variant_id,
195
- quantity: row.quantity,
196
- };
197
- if (row.price_per_unit !== undefined) {
198
- orderRow['price_per_unit'] = row.price_per_unit;
199
- }
200
- if (row.total_discount !== undefined) {
201
- orderRow['total_discount'] = row.total_discount;
202
- }
203
- if (row.tax_rate_id)
204
- orderRow['tax_rate_id'] = row.tax_rate_id;
205
- if (row.location_id)
206
- orderRow['location_id'] = row.location_id;
207
- salesOrderRows.push(orderRow);
208
- }
209
- }
210
- const body = {
211
- order_no,
212
- customer_id,
213
- sales_order_rows: salesOrderRows,
214
- };
215
- if (status)
216
- body['status'] = status;
217
- if (location_id)
218
- body['location_id'] = location_id;
219
- if (currency)
220
- body['currency'] = currency;
221
- if (order_created_date)
222
- body['order_created_date'] = order_created_date;
223
- if (delivery_date)
224
- body['delivery_date'] = delivery_date;
225
- if (customer_ref)
226
- body['customer_ref'] = customer_ref;
227
- if (additional_info)
228
- body['additional_info'] = additional_info;
229
- if (tracking_number)
230
- body['tracking_number'] = tracking_number;
231
- if (tracking_number_url)
232
- body['tracking_number_url'] = tracking_number_url;
233
- if (ecommerce_order_type)
234
- body['ecommerce_order_type'] = ecommerce_order_type;
235
- if (ecommerce_store_name)
236
- body['ecommerce_store_name'] = ecommerce_store_name;
237
- if (ecommerce_order_id)
238
- body['ecommerce_order_id'] = ecommerce_order_id;
239
- if (addresses && addresses.length > 0) {
240
- body['addresses'] = addresses.map((addr) => {
241
- const address = {
242
- entity_type: addr.entity_type,
243
- };
244
- if (addr.first_name)
245
- address['first_name'] = addr.first_name;
246
- if (addr.last_name)
247
- address['last_name'] = addr.last_name;
248
- if (addr.company)
249
- address['company'] = addr.company;
250
- if (addr.phone)
251
- address['phone'] = addr.phone;
252
- if (addr.line_1)
253
- address['line_1'] = addr.line_1;
254
- if (addr.line_2)
255
- address['line_2'] = addr.line_2;
256
- if (addr.city)
257
- address['city'] = addr.city;
258
- if (addr.state)
259
- address['state'] = addr.state;
260
- if (addr.zip)
261
- address['zip'] = addr.zip;
262
- if (addr.country)
263
- address['country'] = addr.country;
264
- return address;
265
- });
266
- }
267
- const response = yield pieces_common_1.httpClient.sendRequest({
268
- method: pieces_common_1.HttpMethod.POST,
269
- url: `${constants_1.BASE_URL}/sales_orders`,
270
- authentication: {
271
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
272
- token: context.auth.secret_text,
273
- },
274
- body,
275
- });
276
- return response.body;
277
- });
278
- },
279
- });
280
- //# sourceMappingURL=create-sales-order.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-sales-order.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-sales-order.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,yCAA4C;AAC5C,mDAA+C;AAC/C,2CAKyB;AAyBZ,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,ucAAuc;QACzc,UAAU,EAAE,KAAK;KAClB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,wBAAgB;QAC7B,sCAAsC;QACtC,UAAU,EAAE,uBAAe;QAC3B,QAAQ,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,MAA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,GAAG,IAAI,CAAC,OAAO,CAAC;oBAEpD,OAAO,OAAO,CAAC;gBACjB,CAAC,CAAC,CAAC;YACL,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,GAAG,oBAAQ,eAAe;gBAC/B,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;iBAChC;gBACD,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- export declare const findCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
3
- first_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
- last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
- company: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
- email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
- phone: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- currency: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
- reference_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
- category: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
- include_deleted: import("@activepieces/pieces-framework").CheckboxProperty<false>;
12
- limit: import("@activepieces/pieces-framework").NumberProperty<false>;
13
- page: import("@activepieces/pieces-framework").NumberProperty<false>;
14
- }>;
15
- //# sourceMappingURL=find-customer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-customer.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-customer.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;;;;;;;;;;;;;EAoHvB,CAAC"}