n8n-nodes-lemonsqueezy 0.2.0 → 0.5.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.
- package/README.md +170 -6
- package/dist/nodes/LemonSqueezy/LemonSqueezy.node.js +37 -5
- package/dist/nodes/LemonSqueezy/LemonSqueezyTrigger.node.js +78 -33
- package/dist/nodes/LemonSqueezy/constants.js +11 -2
- package/dist/nodes/LemonSqueezy/helpers.d.ts +346 -7
- package/dist/nodes/LemonSqueezy/helpers.js +542 -16
- package/dist/nodes/LemonSqueezy/resources/discountRedemption.d.ts +3 -0
- package/dist/nodes/LemonSqueezy/resources/discountRedemption.js +109 -0
- package/dist/nodes/LemonSqueezy/resources/index.d.ts +7 -1
- package/dist/nodes/LemonSqueezy/resources/index.js +46 -1
- package/dist/nodes/LemonSqueezy/resources/licenseKeyInstance.d.ts +3 -0
- package/dist/nodes/LemonSqueezy/resources/licenseKeyInstance.js +102 -0
- package/dist/nodes/LemonSqueezy/resources/orderItem.d.ts +3 -0
- package/dist/nodes/LemonSqueezy/resources/orderItem.js +116 -0
- package/dist/nodes/LemonSqueezy/resources/shared.d.ts +64 -0
- package/dist/nodes/LemonSqueezy/resources/shared.js +196 -0
- package/dist/nodes/LemonSqueezy/resources/subscriptionInvoice.d.ts +3 -0
- package/dist/nodes/LemonSqueezy/resources/subscriptionInvoice.js +129 -0
- package/dist/nodes/LemonSqueezy/resources/usageRecord.d.ts +3 -0
- package/dist/nodes/LemonSqueezy/resources/usageRecord.js +102 -0
- package/dist/nodes/LemonSqueezy/resources/user.d.ts +3 -0
- package/dist/nodes/LemonSqueezy/resources/user.js +26 -0
- package/dist/nodes/LemonSqueezy/types.d.ts +63 -7
- package/package.json +1 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.discountRedemptionFields = exports.discountRedemptionOperations = void 0;
|
|
4
|
+
exports.discountRedemptionOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['discountRedemption'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get',
|
|
18
|
+
value: 'get',
|
|
19
|
+
description: 'Get a discount redemption by ID',
|
|
20
|
+
action: 'Get a discount redemption',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Many',
|
|
24
|
+
value: 'getAll',
|
|
25
|
+
description: 'Get many discount redemptions',
|
|
26
|
+
action: 'Get many discount redemptions',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
default: 'getAll',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
exports.discountRedemptionFields = [
|
|
33
|
+
// Get
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Discount Redemption ID',
|
|
36
|
+
name: 'discountRedemptionId',
|
|
37
|
+
type: 'string',
|
|
38
|
+
required: true,
|
|
39
|
+
default: '',
|
|
40
|
+
displayOptions: {
|
|
41
|
+
show: {
|
|
42
|
+
resource: ['discountRedemption'],
|
|
43
|
+
operation: ['get'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
description: 'The ID of the discount redemption to retrieve',
|
|
47
|
+
},
|
|
48
|
+
// Get All
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Return All',
|
|
51
|
+
name: 'returnAll',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
default: false,
|
|
54
|
+
displayOptions: {
|
|
55
|
+
show: {
|
|
56
|
+
resource: ['discountRedemption'],
|
|
57
|
+
operation: ['getAll'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Limit',
|
|
64
|
+
name: 'limit',
|
|
65
|
+
type: 'number',
|
|
66
|
+
default: 50,
|
|
67
|
+
typeOptions: {
|
|
68
|
+
minValue: 1,
|
|
69
|
+
maxValue: 100,
|
|
70
|
+
},
|
|
71
|
+
displayOptions: {
|
|
72
|
+
show: {
|
|
73
|
+
resource: ['discountRedemption'],
|
|
74
|
+
operation: ['getAll'],
|
|
75
|
+
returnAll: [false],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
description: 'Max number of results to return',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
displayName: 'Filters',
|
|
82
|
+
name: 'filters',
|
|
83
|
+
type: 'collection',
|
|
84
|
+
placeholder: 'Add Filter',
|
|
85
|
+
default: {},
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
resource: ['discountRedemption'],
|
|
89
|
+
operation: ['getAll'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
options: [
|
|
93
|
+
{
|
|
94
|
+
displayName: 'Discount ID',
|
|
95
|
+
name: 'discountId',
|
|
96
|
+
type: 'string',
|
|
97
|
+
default: '',
|
|
98
|
+
description: 'Filter by discount ID',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Order ID',
|
|
102
|
+
name: 'orderId',
|
|
103
|
+
type: 'string',
|
|
104
|
+
default: '',
|
|
105
|
+
description: 'Filter by order ID',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
];
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import type { INodeProperties } from 'n8n-workflow';
|
|
2
2
|
import { productOperations, productFields } from './product';
|
|
3
3
|
import { orderOperations, orderFields } from './order';
|
|
4
|
+
import { orderItemOperations, orderItemFields } from './orderItem';
|
|
4
5
|
import { subscriptionOperations, subscriptionFields } from './subscription';
|
|
6
|
+
import { subscriptionInvoiceOperations, subscriptionInvoiceFields } from './subscriptionInvoice';
|
|
5
7
|
import { customerOperations, customerFields } from './customer';
|
|
6
8
|
import { licenseKeyOperations, licenseKeyFields } from './licenseKey';
|
|
9
|
+
import { licenseKeyInstanceOperations, licenseKeyInstanceFields } from './licenseKeyInstance';
|
|
7
10
|
import { discountOperations, discountFields } from './discount';
|
|
11
|
+
import { discountRedemptionOperations, discountRedemptionFields } from './discountRedemption';
|
|
8
12
|
import { storeOperations, storeFields } from './store';
|
|
9
13
|
import { variantOperations, variantFields } from './variant';
|
|
10
14
|
import { checkoutOperations, checkoutFields } from './checkout';
|
|
11
15
|
import { webhookOperations, webhookFields } from './webhook';
|
|
16
|
+
import { usageRecordOperations, usageRecordFields } from './usageRecord';
|
|
17
|
+
import { userOperations, userFields } from './user';
|
|
12
18
|
export declare const resourceProperty: INodeProperties;
|
|
13
19
|
export declare const allOperations: INodeProperties[];
|
|
14
20
|
export declare const allFields: INodeProperties[];
|
|
15
|
-
export { productOperations, productFields, orderOperations, orderFields, subscriptionOperations, subscriptionFields, customerOperations, customerFields, licenseKeyOperations, licenseKeyFields, discountOperations, discountFields, storeOperations, storeFields, variantOperations, variantFields, checkoutOperations, checkoutFields, webhookOperations, webhookFields, };
|
|
21
|
+
export { productOperations, productFields, orderOperations, orderFields, orderItemOperations, orderItemFields, subscriptionOperations, subscriptionFields, subscriptionInvoiceOperations, subscriptionInvoiceFields, customerOperations, customerFields, licenseKeyOperations, licenseKeyFields, licenseKeyInstanceOperations, licenseKeyInstanceFields, discountOperations, discountFields, discountRedemptionOperations, discountRedemptionFields, storeOperations, storeFields, variantOperations, variantFields, checkoutOperations, checkoutFields, webhookOperations, webhookFields, usageRecordOperations, usageRecordFields, userOperations, userFields, };
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webhookFields = exports.webhookOperations = exports.checkoutFields = exports.checkoutOperations = exports.variantFields = exports.variantOperations = exports.storeFields = exports.storeOperations = exports.discountFields = exports.discountOperations = exports.licenseKeyFields = exports.licenseKeyOperations = exports.customerFields = exports.customerOperations = exports.subscriptionFields = exports.subscriptionOperations = exports.orderFields = exports.orderOperations = exports.productFields = exports.productOperations = exports.allFields = exports.allOperations = exports.resourceProperty = void 0;
|
|
3
|
+
exports.userFields = exports.userOperations = exports.usageRecordFields = exports.usageRecordOperations = exports.webhookFields = exports.webhookOperations = exports.checkoutFields = exports.checkoutOperations = exports.variantFields = exports.variantOperations = exports.storeFields = exports.storeOperations = exports.discountRedemptionFields = exports.discountRedemptionOperations = exports.discountFields = exports.discountOperations = exports.licenseKeyInstanceFields = exports.licenseKeyInstanceOperations = exports.licenseKeyFields = exports.licenseKeyOperations = exports.customerFields = exports.customerOperations = exports.subscriptionInvoiceFields = exports.subscriptionInvoiceOperations = exports.subscriptionFields = exports.subscriptionOperations = exports.orderItemFields = exports.orderItemOperations = exports.orderFields = exports.orderOperations = exports.productFields = exports.productOperations = exports.allFields = exports.allOperations = exports.resourceProperty = void 0;
|
|
4
4
|
const product_1 = require("./product");
|
|
5
5
|
Object.defineProperty(exports, "productOperations", { enumerable: true, get: function () { return product_1.productOperations; } });
|
|
6
6
|
Object.defineProperty(exports, "productFields", { enumerable: true, get: function () { return product_1.productFields; } });
|
|
7
7
|
const order_1 = require("./order");
|
|
8
8
|
Object.defineProperty(exports, "orderOperations", { enumerable: true, get: function () { return order_1.orderOperations; } });
|
|
9
9
|
Object.defineProperty(exports, "orderFields", { enumerable: true, get: function () { return order_1.orderFields; } });
|
|
10
|
+
const orderItem_1 = require("./orderItem");
|
|
11
|
+
Object.defineProperty(exports, "orderItemOperations", { enumerable: true, get: function () { return orderItem_1.orderItemOperations; } });
|
|
12
|
+
Object.defineProperty(exports, "orderItemFields", { enumerable: true, get: function () { return orderItem_1.orderItemFields; } });
|
|
10
13
|
const subscription_1 = require("./subscription");
|
|
11
14
|
Object.defineProperty(exports, "subscriptionOperations", { enumerable: true, get: function () { return subscription_1.subscriptionOperations; } });
|
|
12
15
|
Object.defineProperty(exports, "subscriptionFields", { enumerable: true, get: function () { return subscription_1.subscriptionFields; } });
|
|
16
|
+
const subscriptionInvoice_1 = require("./subscriptionInvoice");
|
|
17
|
+
Object.defineProperty(exports, "subscriptionInvoiceOperations", { enumerable: true, get: function () { return subscriptionInvoice_1.subscriptionInvoiceOperations; } });
|
|
18
|
+
Object.defineProperty(exports, "subscriptionInvoiceFields", { enumerable: true, get: function () { return subscriptionInvoice_1.subscriptionInvoiceFields; } });
|
|
13
19
|
const customer_1 = require("./customer");
|
|
14
20
|
Object.defineProperty(exports, "customerOperations", { enumerable: true, get: function () { return customer_1.customerOperations; } });
|
|
15
21
|
Object.defineProperty(exports, "customerFields", { enumerable: true, get: function () { return customer_1.customerFields; } });
|
|
16
22
|
const licenseKey_1 = require("./licenseKey");
|
|
17
23
|
Object.defineProperty(exports, "licenseKeyOperations", { enumerable: true, get: function () { return licenseKey_1.licenseKeyOperations; } });
|
|
18
24
|
Object.defineProperty(exports, "licenseKeyFields", { enumerable: true, get: function () { return licenseKey_1.licenseKeyFields; } });
|
|
25
|
+
const licenseKeyInstance_1 = require("./licenseKeyInstance");
|
|
26
|
+
Object.defineProperty(exports, "licenseKeyInstanceOperations", { enumerable: true, get: function () { return licenseKeyInstance_1.licenseKeyInstanceOperations; } });
|
|
27
|
+
Object.defineProperty(exports, "licenseKeyInstanceFields", { enumerable: true, get: function () { return licenseKeyInstance_1.licenseKeyInstanceFields; } });
|
|
19
28
|
const discount_1 = require("./discount");
|
|
20
29
|
Object.defineProperty(exports, "discountOperations", { enumerable: true, get: function () { return discount_1.discountOperations; } });
|
|
21
30
|
Object.defineProperty(exports, "discountFields", { enumerable: true, get: function () { return discount_1.discountFields; } });
|
|
31
|
+
const discountRedemption_1 = require("./discountRedemption");
|
|
32
|
+
Object.defineProperty(exports, "discountRedemptionOperations", { enumerable: true, get: function () { return discountRedemption_1.discountRedemptionOperations; } });
|
|
33
|
+
Object.defineProperty(exports, "discountRedemptionFields", { enumerable: true, get: function () { return discountRedemption_1.discountRedemptionFields; } });
|
|
22
34
|
const store_1 = require("./store");
|
|
23
35
|
Object.defineProperty(exports, "storeOperations", { enumerable: true, get: function () { return store_1.storeOperations; } });
|
|
24
36
|
Object.defineProperty(exports, "storeFields", { enumerable: true, get: function () { return store_1.storeFields; } });
|
|
@@ -31,6 +43,13 @@ Object.defineProperty(exports, "checkoutFields", { enumerable: true, get: functi
|
|
|
31
43
|
const webhook_1 = require("./webhook");
|
|
32
44
|
Object.defineProperty(exports, "webhookOperations", { enumerable: true, get: function () { return webhook_1.webhookOperations; } });
|
|
33
45
|
Object.defineProperty(exports, "webhookFields", { enumerable: true, get: function () { return webhook_1.webhookFields; } });
|
|
46
|
+
const usageRecord_1 = require("./usageRecord");
|
|
47
|
+
Object.defineProperty(exports, "usageRecordOperations", { enumerable: true, get: function () { return usageRecord_1.usageRecordOperations; } });
|
|
48
|
+
Object.defineProperty(exports, "usageRecordFields", { enumerable: true, get: function () { return usageRecord_1.usageRecordFields; } });
|
|
49
|
+
const user_1 = require("./user");
|
|
50
|
+
Object.defineProperty(exports, "userOperations", { enumerable: true, get: function () { return user_1.userOperations; } });
|
|
51
|
+
Object.defineProperty(exports, "userFields", { enumerable: true, get: function () { return user_1.userFields; } });
|
|
52
|
+
const shared_1 = require("./shared");
|
|
34
53
|
exports.resourceProperty = {
|
|
35
54
|
displayName: 'Resource',
|
|
36
55
|
name: 'resource',
|
|
@@ -40,11 +59,17 @@ exports.resourceProperty = {
|
|
|
40
59
|
{ name: 'Checkout', value: 'checkout' },
|
|
41
60
|
{ name: 'Customer', value: 'customer' },
|
|
42
61
|
{ name: 'Discount', value: 'discount' },
|
|
62
|
+
{ name: 'Discount Redemption', value: 'discountRedemption' },
|
|
43
63
|
{ name: 'License Key', value: 'licenseKey' },
|
|
64
|
+
{ name: 'License Key Instance', value: 'licenseKeyInstance' },
|
|
44
65
|
{ name: 'Order', value: 'order' },
|
|
66
|
+
{ name: 'Order Item', value: 'orderItem' },
|
|
45
67
|
{ name: 'Product', value: 'product' },
|
|
46
68
|
{ name: 'Store', value: 'store' },
|
|
47
69
|
{ name: 'Subscription', value: 'subscription' },
|
|
70
|
+
{ name: 'Subscription Invoice', value: 'subscriptionInvoice' },
|
|
71
|
+
{ name: 'Usage Record', value: 'usageRecord' },
|
|
72
|
+
{ name: 'User', value: 'user' },
|
|
48
73
|
{ name: 'Variant', value: 'variant' },
|
|
49
74
|
{ name: 'Webhook', value: 'webhook' },
|
|
50
75
|
],
|
|
@@ -53,24 +78,44 @@ exports.resourceProperty = {
|
|
|
53
78
|
exports.allOperations = [
|
|
54
79
|
product_1.productOperations,
|
|
55
80
|
order_1.orderOperations,
|
|
81
|
+
...orderItem_1.orderItemOperations,
|
|
56
82
|
subscription_1.subscriptionOperations,
|
|
83
|
+
...subscriptionInvoice_1.subscriptionInvoiceOperations,
|
|
57
84
|
customer_1.customerOperations,
|
|
58
85
|
licenseKey_1.licenseKeyOperations,
|
|
86
|
+
...licenseKeyInstance_1.licenseKeyInstanceOperations,
|
|
59
87
|
discount_1.discountOperations,
|
|
88
|
+
...discountRedemption_1.discountRedemptionOperations,
|
|
60
89
|
store_1.storeOperations,
|
|
61
90
|
variant_1.variantOperations,
|
|
62
91
|
checkout_1.checkoutOperations,
|
|
63
92
|
webhook_1.webhookOperations,
|
|
93
|
+
...usageRecord_1.usageRecordOperations,
|
|
94
|
+
...user_1.userOperations,
|
|
64
95
|
];
|
|
65
96
|
exports.allFields = [
|
|
66
97
|
...product_1.productFields,
|
|
98
|
+
shared_1.productAdvancedOptions,
|
|
67
99
|
...order_1.orderFields,
|
|
100
|
+
shared_1.orderAdvancedOptions,
|
|
101
|
+
...orderItem_1.orderItemFields,
|
|
68
102
|
...subscription_1.subscriptionFields,
|
|
103
|
+
shared_1.subscriptionAdvancedOptions,
|
|
104
|
+
...subscriptionInvoice_1.subscriptionInvoiceFields,
|
|
69
105
|
...customer_1.customerFields,
|
|
106
|
+
shared_1.customerAdvancedOptions,
|
|
70
107
|
...licenseKey_1.licenseKeyFields,
|
|
108
|
+
shared_1.licenseKeyAdvancedOptions,
|
|
109
|
+
...licenseKeyInstance_1.licenseKeyInstanceFields,
|
|
71
110
|
...discount_1.discountFields,
|
|
111
|
+
shared_1.discountAdvancedOptions,
|
|
112
|
+
...discountRedemption_1.discountRedemptionFields,
|
|
72
113
|
...store_1.storeFields,
|
|
73
114
|
...variant_1.variantFields,
|
|
115
|
+
shared_1.variantAdvancedOptions,
|
|
74
116
|
...checkout_1.checkoutFields,
|
|
117
|
+
shared_1.checkoutAdvancedOptions,
|
|
75
118
|
...webhook_1.webhookFields,
|
|
119
|
+
...usageRecord_1.usageRecordFields,
|
|
120
|
+
...user_1.userFields,
|
|
76
121
|
];
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.licenseKeyInstanceFields = exports.licenseKeyInstanceOperations = void 0;
|
|
4
|
+
exports.licenseKeyInstanceOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['licenseKeyInstance'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get',
|
|
18
|
+
value: 'get',
|
|
19
|
+
description: 'Get a license key instance by ID',
|
|
20
|
+
action: 'Get a license key instance',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Many',
|
|
24
|
+
value: 'getAll',
|
|
25
|
+
description: 'Get many license key instances',
|
|
26
|
+
action: 'Get many license key instances',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
default: 'getAll',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
exports.licenseKeyInstanceFields = [
|
|
33
|
+
// Get
|
|
34
|
+
{
|
|
35
|
+
displayName: 'License Key Instance ID',
|
|
36
|
+
name: 'licenseKeyInstanceId',
|
|
37
|
+
type: 'string',
|
|
38
|
+
required: true,
|
|
39
|
+
default: '',
|
|
40
|
+
displayOptions: {
|
|
41
|
+
show: {
|
|
42
|
+
resource: ['licenseKeyInstance'],
|
|
43
|
+
operation: ['get'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
description: 'The ID of the license key instance to retrieve',
|
|
47
|
+
},
|
|
48
|
+
// Get All
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Return All',
|
|
51
|
+
name: 'returnAll',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
default: false,
|
|
54
|
+
displayOptions: {
|
|
55
|
+
show: {
|
|
56
|
+
resource: ['licenseKeyInstance'],
|
|
57
|
+
operation: ['getAll'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Limit',
|
|
64
|
+
name: 'limit',
|
|
65
|
+
type: 'number',
|
|
66
|
+
default: 50,
|
|
67
|
+
typeOptions: {
|
|
68
|
+
minValue: 1,
|
|
69
|
+
maxValue: 100,
|
|
70
|
+
},
|
|
71
|
+
displayOptions: {
|
|
72
|
+
show: {
|
|
73
|
+
resource: ['licenseKeyInstance'],
|
|
74
|
+
operation: ['getAll'],
|
|
75
|
+
returnAll: [false],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
description: 'Max number of results to return',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
displayName: 'Filters',
|
|
82
|
+
name: 'filters',
|
|
83
|
+
type: 'collection',
|
|
84
|
+
placeholder: 'Add Filter',
|
|
85
|
+
default: {},
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
resource: ['licenseKeyInstance'],
|
|
89
|
+
operation: ['getAll'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
options: [
|
|
93
|
+
{
|
|
94
|
+
displayName: 'License Key ID',
|
|
95
|
+
name: 'licenseKeyId',
|
|
96
|
+
type: 'string',
|
|
97
|
+
default: '',
|
|
98
|
+
description: 'Filter by license key ID',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
];
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.orderItemFields = exports.orderItemOperations = void 0;
|
|
4
|
+
exports.orderItemOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['orderItem'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get',
|
|
18
|
+
value: 'get',
|
|
19
|
+
description: 'Get an order item by ID',
|
|
20
|
+
action: 'Get an order item',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Many',
|
|
24
|
+
value: 'getAll',
|
|
25
|
+
description: 'Get many order items',
|
|
26
|
+
action: 'Get many order items',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
default: 'getAll',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
exports.orderItemFields = [
|
|
33
|
+
// Get
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Order Item ID',
|
|
36
|
+
name: 'orderItemId',
|
|
37
|
+
type: 'string',
|
|
38
|
+
required: true,
|
|
39
|
+
default: '',
|
|
40
|
+
displayOptions: {
|
|
41
|
+
show: {
|
|
42
|
+
resource: ['orderItem'],
|
|
43
|
+
operation: ['get'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
description: 'The ID of the order item to retrieve',
|
|
47
|
+
},
|
|
48
|
+
// Get All
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Return All',
|
|
51
|
+
name: 'returnAll',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
default: false,
|
|
54
|
+
displayOptions: {
|
|
55
|
+
show: {
|
|
56
|
+
resource: ['orderItem'],
|
|
57
|
+
operation: ['getAll'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Limit',
|
|
64
|
+
name: 'limit',
|
|
65
|
+
type: 'number',
|
|
66
|
+
default: 50,
|
|
67
|
+
typeOptions: {
|
|
68
|
+
minValue: 1,
|
|
69
|
+
maxValue: 100,
|
|
70
|
+
},
|
|
71
|
+
displayOptions: {
|
|
72
|
+
show: {
|
|
73
|
+
resource: ['orderItem'],
|
|
74
|
+
operation: ['getAll'],
|
|
75
|
+
returnAll: [false],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
description: 'Max number of results to return',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
displayName: 'Filters',
|
|
82
|
+
name: 'filters',
|
|
83
|
+
type: 'collection',
|
|
84
|
+
placeholder: 'Add Filter',
|
|
85
|
+
default: {},
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
resource: ['orderItem'],
|
|
89
|
+
operation: ['getAll'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
options: [
|
|
93
|
+
{
|
|
94
|
+
displayName: 'Order ID',
|
|
95
|
+
name: 'orderId',
|
|
96
|
+
type: 'string',
|
|
97
|
+
default: '',
|
|
98
|
+
description: 'Filter by order ID',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Product ID',
|
|
102
|
+
name: 'productId',
|
|
103
|
+
type: 'string',
|
|
104
|
+
default: '',
|
|
105
|
+
description: 'Filter by product ID',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
displayName: 'Variant ID',
|
|
109
|
+
name: 'variantId',
|
|
110
|
+
type: 'string',
|
|
111
|
+
default: '',
|
|
112
|
+
description: 'Filter by variant ID',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Shared field definitions for advanced query options
|
|
4
|
+
* Used across multiple resources for consistent sorting and relationship expansion
|
|
5
|
+
*
|
|
6
|
+
* This module reduces code duplication by providing reusable field definitions
|
|
7
|
+
* for common patterns like pagination (returnAll, limit), sorting, and filtering.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Creates a 'Return All' toggle field for a resource
|
|
11
|
+
* @param resource - The resource name (e.g., 'product', 'order')
|
|
12
|
+
* @param operations - Operations where this field applies (default: ['getAll'])
|
|
13
|
+
*/
|
|
14
|
+
export declare function createReturnAllField(resource: string, operations?: string[]): INodeProperties;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a 'Limit' number field for a resource
|
|
17
|
+
* @param resource - The resource name
|
|
18
|
+
* @param operations - Operations where this field applies
|
|
19
|
+
*/
|
|
20
|
+
export declare function createLimitField(resource: string, operations?: string[]): INodeProperties;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a resource ID field
|
|
23
|
+
* @param resource - The resource name
|
|
24
|
+
* @param idName - The parameter name for the ID (e.g., 'productId')
|
|
25
|
+
* @param displayName - Display name shown in UI
|
|
26
|
+
* @param operations - Operations where this field applies
|
|
27
|
+
*/
|
|
28
|
+
export declare function createIdField(resource: string, idName: string, displayName: string, operations?: string[]): INodeProperties;
|
|
29
|
+
/**
|
|
30
|
+
* Sort direction options for API queries
|
|
31
|
+
*/
|
|
32
|
+
export declare const SORT_DIRECTIONS: {
|
|
33
|
+
name: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[];
|
|
36
|
+
/**
|
|
37
|
+
* Common sortable fields across resources
|
|
38
|
+
*/
|
|
39
|
+
export declare const COMMON_SORT_FIELDS: {
|
|
40
|
+
name: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
/**
|
|
44
|
+
* Resource-specific includable relationships
|
|
45
|
+
*/
|
|
46
|
+
export declare const RESOURCE_INCLUDES: Record<string, Array<{
|
|
47
|
+
name: string;
|
|
48
|
+
value: string;
|
|
49
|
+
}>>;
|
|
50
|
+
/**
|
|
51
|
+
* Generate advanced options field for a specific resource
|
|
52
|
+
*/
|
|
53
|
+
export declare function createAdvancedOptionsField(resource: string, operations?: string[]): INodeProperties;
|
|
54
|
+
/**
|
|
55
|
+
* Pre-built advanced options fields for each resource
|
|
56
|
+
*/
|
|
57
|
+
export declare const orderAdvancedOptions: INodeProperties;
|
|
58
|
+
export declare const subscriptionAdvancedOptions: INodeProperties;
|
|
59
|
+
export declare const customerAdvancedOptions: INodeProperties;
|
|
60
|
+
export declare const licenseKeyAdvancedOptions: INodeProperties;
|
|
61
|
+
export declare const productAdvancedOptions: INodeProperties;
|
|
62
|
+
export declare const variantAdvancedOptions: INodeProperties;
|
|
63
|
+
export declare const checkoutAdvancedOptions: INodeProperties;
|
|
64
|
+
export declare const discountAdvancedOptions: INodeProperties;
|