@abyss-project/main 1.0.109 → 1.0.111
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/dist/api/billing-account.admin.api.d.ts +10 -0
- package/dist/api/billing-account.admin.api.js +38 -0
- package/dist/api/billing-addon-template.admin.api.d.ts +7 -0
- package/dist/api/billing-addon-template.admin.api.js +26 -0
- package/dist/api/billing-plan.admin.api.d.ts +6 -0
- package/dist/api/billing-plan.admin.api.js +20 -0
- package/dist/api/billing-plan.api.d.ts +4 -0
- package/dist/api/billing-plan.api.js +12 -0
- package/dist/api/index.d.ts +10 -4
- package/dist/api/index.js +10 -4
- package/dist/api/organization-billing.api.d.ts +17 -0
- package/dist/api/organization-billing.api.js +64 -0
- package/dist/api/organization-member.api.d.ts +12 -0
- package/dist/api/organization-member.api.js +44 -0
- package/dist/api/organization.api.d.ts +3 -2
- package/dist/api/organization.api.js +5 -1
- package/dist/api/project-access.admin.api.d.ts +1 -3
- package/dist/api/project-access.admin.api.js +1 -9
- package/dist/api/project-access.api.d.ts +5 -3
- package/dist/api/project-access.api.js +17 -9
- package/dist/api/project-api-key.api.d.ts +8 -0
- package/dist/api/project-api-key.api.js +29 -0
- package/dist/api/project.api.d.ts +1 -5
- package/dist/api/project.api.js +1 -17
- package/dist/api/team.api.d.ts +14 -0
- package/dist/api/team.api.js +52 -0
- package/dist/api/user-billing.api.d.ts +11 -0
- package/dist/api/user-billing.api.js +40 -0
- package/dist/api/user.api.d.ts +1 -4
- package/dist/api/user.api.js +1 -16
- package/dist/index.d.ts +1 -37
- package/dist/index.js +1 -37
- package/dist/permissions/ability.d.ts +12 -0
- package/dist/permissions/ability.js +134 -0
- package/dist/permissions/index.d.ts +1 -0
- package/dist/{workflow → permissions}/index.js +1 -1
- package/dist/types/enum/abyss-application-event.enum.d.ts +18 -1
- package/dist/types/enum/abyss-application-event.enum.js +17 -0
- package/dist/types/enum/index.d.ts +2 -4
- package/dist/types/enum/index.js +2 -4
- package/dist/types/enum/onboarding-steps.enum.d.ts +5 -3
- package/dist/types/enum/onboarding-steps.enum.js +5 -3
- package/dist/types/enum/organization-billing.enum.d.ts +70 -0
- package/dist/types/enum/organization-billing.enum.js +82 -0
- package/dist/types/enum/organization-permission.enum.d.ts +13 -1
- package/dist/types/enum/organization-permission.enum.js +40 -2
- package/dist/types/enum/user-type.enum.d.ts +1 -0
- package/dist/types/enum/user-type.enum.js +1 -0
- package/dist/types/interface/api/index.d.ts +17 -8
- package/dist/types/interface/api/index.js +17 -8
- package/dist/types/interface/api/requests/billing-account.admin.request.d.ts +53 -0
- package/dist/types/interface/api/requests/billing-addon-template.request.d.ts +32 -0
- package/dist/types/interface/api/requests/billing-plan.request.d.ts +37 -0
- package/dist/types/interface/api/requests/organization-billing.request.d.ts +95 -0
- package/dist/types/interface/api/requests/organization-member.request.d.ts +38 -0
- package/dist/types/interface/api/requests/organization.request.d.ts +10 -0
- package/dist/types/interface/api/requests/project-access.admin.request.d.ts +1 -20
- package/dist/types/interface/api/requests/project-access.request.d.ts +16 -20
- package/dist/types/interface/api/requests/project-api-key.request.d.ts +39 -0
- package/dist/types/interface/api/requests/project.request.d.ts +2 -23
- package/dist/types/interface/api/requests/team.request.d.ts +72 -0
- package/dist/types/interface/api/requests/user-billing.request.d.ts +23 -0
- package/dist/types/interface/api/requests/user.request.d.ts +2 -8
- package/dist/types/interface/api/responses/billing-account.admin.response.d.ts +38 -0
- package/dist/types/interface/api/responses/billing-addon-template.response.d.ts +22 -0
- package/dist/types/interface/api/responses/billing-plan.response.d.ts +26 -0
- package/dist/types/interface/api/responses/gift-code.admin.response.d.ts +0 -1
- package/dist/types/interface/api/responses/gift-code.response.d.ts +0 -1
- package/dist/types/interface/api/responses/organization-billing.response.d.ts +82 -0
- package/dist/types/interface/api/responses/organization-member.response.d.ts +42 -0
- package/dist/types/interface/api/responses/organization-member.response.js +2 -0
- package/dist/types/interface/api/responses/project-access.admin.response.d.ts +0 -8
- package/dist/types/interface/api/responses/project-access.response.d.ts +16 -8
- package/dist/types/interface/api/responses/project-api-key.response.d.ts +26 -0
- package/dist/types/interface/api/responses/project-api-key.response.js +2 -0
- package/dist/types/interface/api/responses/project.response.d.ts +0 -14
- package/dist/types/interface/api/responses/report.public.response.d.ts +0 -1
- package/dist/types/interface/api/responses/team.response.d.ts +52 -0
- package/dist/types/interface/api/responses/team.response.js +2 -0
- package/dist/types/interface/api/responses/user-billing.response.d.ts +45 -0
- package/dist/types/interface/api/responses/user-billing.response.js +2 -0
- package/dist/types/interface/index.d.ts +17 -3
- package/dist/types/interface/index.js +17 -3
- package/dist/types/interface/models/application.model.d.ts +1 -1
- package/dist/types/interface/models/atlas-group.model.d.ts +2 -2
- package/dist/types/interface/models/atlas-page.model.d.ts +2 -2
- package/dist/types/interface/models/atlas.model.d.ts +8 -5
- package/dist/types/interface/models/billing-account.model.d.ts +40 -0
- package/dist/types/interface/models/billing-account.model.js +2 -0
- package/dist/types/interface/models/billing-addon-template.model.d.ts +15 -0
- package/dist/types/interface/models/billing-addon-template.model.js +2 -0
- package/dist/types/interface/models/board-card-checklist.model.d.ts +1 -1
- package/dist/types/interface/models/board-card.model.d.ts +6 -6
- package/dist/types/interface/models/board-column.model.d.ts +1 -1
- package/dist/types/interface/models/board.model.d.ts +7 -4
- package/dist/types/interface/models/credit-transaction.model.d.ts +22 -0
- package/dist/types/interface/models/credit-transaction.model.js +2 -0
- package/dist/types/interface/models/draw.model.d.ts +3 -0
- package/dist/types/interface/models/gift-code-activation.model.d.ts +4 -3
- package/dist/types/interface/models/gift-code.model.d.ts +1 -1
- package/dist/types/interface/models/invoice.model.d.ts +26 -0
- package/dist/types/interface/models/invoice.model.js +2 -0
- package/dist/types/interface/models/memo.model.d.ts +3 -0
- package/dist/types/interface/models/organization-billing.model.d.ts +37 -0
- package/dist/types/interface/models/organization-billing.model.js +2 -0
- package/dist/types/interface/models/organization-member.model.d.ts +5 -4
- package/dist/types/interface/models/organization-project-quota.model.d.ts +15 -0
- package/dist/types/interface/models/organization-project-quota.model.js +2 -0
- package/dist/types/interface/models/organization-quota-alert.model.d.ts +11 -0
- package/dist/types/interface/models/organization-quota-alert.model.js +2 -0
- package/dist/types/interface/models/organization-service-quota.model.d.ts +13 -0
- package/dist/types/interface/models/organization-service-quota.model.js +2 -0
- package/dist/types/interface/models/organization.model.d.ts +13 -0
- package/dist/types/interface/models/plan-template.model.d.ts +29 -0
- package/dist/types/interface/models/plan-template.model.js +2 -0
- package/dist/types/interface/models/project-access.model.d.ts +5 -6
- package/dist/types/interface/models/project-api-key-application-access.model.d.ts +13 -0
- package/dist/types/interface/models/project-api-key-application-access.model.js +2 -0
- package/dist/types/interface/models/project-api-key.model.d.ts +15 -0
- package/dist/types/interface/models/project-api-key.model.js +2 -0
- package/dist/types/interface/models/project.model.d.ts +8 -12
- package/dist/types/interface/models/quota-grant.model.d.ts +20 -0
- package/dist/types/interface/models/quota-grant.model.js +2 -0
- package/dist/types/interface/models/retrospective.model.d.ts +6 -3
- package/dist/types/interface/models/short-link.model.d.ts +4 -1
- package/dist/types/interface/models/team-member.model.d.ts +11 -0
- package/dist/types/interface/models/team-member.model.js +2 -0
- package/dist/types/interface/models/team-project-access.model.d.ts +15 -0
- package/dist/types/interface/models/team-project-access.model.js +2 -0
- package/dist/types/interface/models/team-project-application-access.model.d.ts +13 -0
- package/dist/types/interface/models/team-project-application-access.model.js +2 -0
- package/dist/types/interface/models/team.model.d.ts +19 -0
- package/dist/types/interface/models/team.model.js +2 -0
- package/dist/types/interface/models/token-history.model.d.ts +9 -1
- package/dist/types/interface/models/usage-record.model.d.ts +24 -0
- package/dist/types/interface/models/usage-record.model.js +2 -0
- package/dist/types/interface/models/user-ticket-message.model.d.ts +1 -1
- package/dist/types/interface/models/user-ticket.model.d.ts +1 -1
- package/dist/types/interface/models/user.model.d.ts +16 -18
- package/dist/types/utils/onboarding.utils.d.ts +1 -6
- package/dist/types/utils/onboarding.utils.js +9 -5
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/package.json +2 -1
- package/dist/api/user-credit-purchase.admin.api.d.ts +0 -7
- package/dist/api/user-credit-purchase.admin.api.js +0 -28
- package/dist/api/user-credit-purchase.api.d.ts +0 -3
- package/dist/api/user-credit-purchase.api.js +0 -14
- package/dist/api/user-transaction.admin.api.d.ts +0 -5
- package/dist/api/user-transaction.admin.api.js +0 -20
- package/dist/api/user-transaction.api.d.ts +0 -3
- package/dist/api/user-transaction.api.js +0 -14
- package/dist/expressions/index.d.ts +0 -5
- package/dist/expressions/index.js +0 -16
- package/dist/expressions/mapper.d.ts +0 -9
- package/dist/expressions/mapper.js +0 -90
- package/dist/expressions/parser.d.ts +0 -3
- package/dist/expressions/parser.js +0 -97
- package/dist/expressions/resolver.d.ts +0 -12
- package/dist/expressions/resolver.js +0 -88
- package/dist/expressions/types.d.ts +0 -36
- package/dist/types/enum/integration-type.enum.d.ts +0 -4
- package/dist/types/enum/integration-type.enum.js +0 -8
- package/dist/types/enum/invoice-status.enum.d.ts +0 -7
- package/dist/types/enum/invoice-status.enum.js +0 -11
- package/dist/types/enum/organization-role.enum.d.ts +0 -6
- package/dist/types/enum/organization-role.enum.js +0 -10
- package/dist/types/enum/organization-subscription-status.enum.d.ts +0 -7
- package/dist/types/enum/organization-subscription-status.enum.js +0 -11
- package/dist/types/enum/plan-billing-period.enum.d.ts +0 -4
- package/dist/types/enum/plan-billing-period.enum.js +0 -8
- package/dist/types/enum/plan-status.enum.d.ts +0 -4
- package/dist/types/enum/plan-status.enum.js +0 -8
- package/dist/types/enum/subscription-level.enum.d.ts +0 -72
- package/dist/types/enum/subscription-level.enum.js +0 -179
- package/dist/types/enum/usage-record-type.enum.d.ts +0 -8
- package/dist/types/enum/usage-record-type.enum.js +0 -12
- package/dist/types/enum/user-credit-purchase-payment-method.enum.d.ts +0 -3
- package/dist/types/enum/user-credit-purchase-payment-method.enum.js +0 -7
- package/dist/types/enum/user-credit-purchase-platform.enum.d.ts +0 -8
- package/dist/types/enum/user-credit-purchase-platform.enum.js +0 -12
- package/dist/types/enum/user-transaction-type.enum.d.ts +0 -14
- package/dist/types/enum/user-transaction-type.enum.js +0 -18
- package/dist/types/interface/api/requests/user-credit-purchase.admin.request.d.ts +0 -42
- package/dist/types/interface/api/requests/user-credit-purchase.request.d.ts +0 -9
- package/dist/types/interface/api/requests/user-transaction.admin.request.d.ts +0 -30
- package/dist/types/interface/api/requests/user-transaction.request.d.ts +0 -8
- package/dist/types/interface/api/responses/user-credit-purchase.admin.response.d.ts +0 -22
- package/dist/types/interface/api/responses/user-credit-purchase.response.d.ts +0 -8
- package/dist/types/interface/api/responses/user-transaction.admin.response.d.ts +0 -13
- package/dist/types/interface/api/responses/user-transaction.response.d.ts +0 -11
- package/dist/types/interface/models/subscription.model.d.ts +0 -16
- package/dist/types/interface/models/user-credit-purchase.model.d.ts +0 -22
- package/dist/types/interface/models/user-transaction.model.d.ts +0 -19
- package/dist/utils/organization-permission.utils.d.ts +0 -3
- package/dist/utils/organization-permission.utils.js +0 -36
- package/dist/utils/subscription.utils.d.ts +0 -6
- package/dist/utils/subscription.utils.js +0 -41
- package/dist/workflow/expression/expression-functions.utils.d.ts +0 -6
- package/dist/workflow/expression/expression-functions.utils.js +0 -61
- package/dist/workflow/expression/expression-mapper.d.ts +0 -11
- package/dist/workflow/expression/expression-mapper.js +0 -32
- package/dist/workflow/expression/expression-mapping.utils.d.ts +0 -4
- package/dist/workflow/expression/expression-mapping.utils.js +0 -43
- package/dist/workflow/expression/expression-resolver.utils.d.ts +0 -3
- package/dist/workflow/expression/expression-resolver.utils.js +0 -54
- package/dist/workflow/expression/expression-tokenizer.utils.d.ts +0 -4
- package/dist/workflow/expression/expression-tokenizer.utils.js +0 -123
- package/dist/workflow/expression/expression.types.d.ts +0 -33
- package/dist/workflow/expression/expression.types.js +0 -17
- package/dist/workflow/expression/index.d.ts +0 -10
- package/dist/workflow/expression/index.js +0 -40
- package/dist/workflow/expression/workflow-resolver.d.ts +0 -9
- package/dist/workflow/expression/workflow-resolver.js +0 -102
- package/dist/workflow/expressions/functions/array.d.ts +0 -2
- package/dist/workflow/expressions/functions/array.js +0 -252
- package/dist/workflow/expressions/functions/crypto.d.ts +0 -2
- package/dist/workflow/expressions/functions/crypto.js +0 -101
- package/dist/workflow/expressions/functions/datetime.d.ts +0 -2
- package/dist/workflow/expressions/functions/datetime.js +0 -256
- package/dist/workflow/expressions/functions/index.d.ts +0 -7
- package/dist/workflow/expressions/functions/index.js +0 -46
- package/dist/workflow/expressions/functions/math.d.ts +0 -2
- package/dist/workflow/expressions/functions/math.js +0 -174
- package/dist/workflow/expressions/functions/string.d.ts +0 -2
- package/dist/workflow/expressions/functions/string.js +0 -301
- package/dist/workflow/expressions/functions/utility.d.ts +0 -2
- package/dist/workflow/expressions/functions/utility.js +0 -230
- package/dist/workflow/expressions/helpers.d.ts +0 -26
- package/dist/workflow/expressions/helpers.js +0 -132
- package/dist/workflow/expressions/index.d.ts +0 -15
- package/dist/workflow/expressions/index.js +0 -61
- package/dist/workflow/expressions/parser.d.ts +0 -8
- package/dist/workflow/expressions/parser.js +0 -436
- package/dist/workflow/expressions/pipes/array-pipes.d.ts +0 -2
- package/dist/workflow/expressions/pipes/array-pipes.js +0 -248
- package/dist/workflow/expressions/pipes/index.d.ts +0 -8
- package/dist/workflow/expressions/pipes/index.js +0 -40
- package/dist/workflow/expressions/pipes/object-pipes.d.ts +0 -2
- package/dist/workflow/expressions/pipes/object-pipes.js +0 -243
- package/dist/workflow/expressions/pipes/string-pipes.d.ts +0 -9
- package/dist/workflow/expressions/pipes/string-pipes.js +0 -178
- package/dist/workflow/expressions/resolver.d.ts +0 -8
- package/dist/workflow/expressions/resolver.js +0 -263
- package/dist/workflow/expressions/types.d.ts +0 -144
- package/dist/workflow/expressions/types.js +0 -33
- package/dist/workflow/index.d.ts +0 -1
- /package/dist/{expressions/types.js → types/interface/api/requests/billing-account.admin.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-credit-purchase.admin.request.js → billing-addon-template.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-credit-purchase.request.js → billing-plan.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-transaction.admin.request.js → organization-billing.request.js} +0 -0
- /package/dist/types/interface/api/requests/{user-transaction.request.js → organization-member.request.js} +0 -0
- /package/dist/types/interface/api/{responses/user-credit-purchase.admin.response.js → requests/project-api-key.request.js} +0 -0
- /package/dist/types/interface/api/{responses/user-credit-purchase.response.js → requests/team.request.js} +0 -0
- /package/dist/types/interface/api/{responses/user-transaction.admin.response.js → requests/user-billing.request.js} +0 -0
- /package/dist/types/interface/api/responses/{user-transaction.response.js → billing-account.admin.response.js} +0 -0
- /package/dist/types/interface/{models/subscription.model.js → api/responses/billing-addon-template.response.js} +0 -0
- /package/dist/types/interface/{models/user-credit-purchase.model.js → api/responses/billing-plan.response.js} +0 -0
- /package/dist/types/interface/{models/user-transaction.model.js → api/responses/organization-billing.response.js} +0 -0
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.utilityFunctions = void 0;
|
|
4
|
-
const uuid_1 = require("uuid");
|
|
5
|
-
exports.utilityFunctions = {
|
|
6
|
-
uuid: {
|
|
7
|
-
name: 'uuid',
|
|
8
|
-
description: 'Generates a random UUID v4',
|
|
9
|
-
category: 'utility',
|
|
10
|
-
signature: 'uuid()',
|
|
11
|
-
args: [],
|
|
12
|
-
returnType: 'string',
|
|
13
|
-
examples: ['{{fn.uuid()}}', '{{uuid()}}'],
|
|
14
|
-
execute: () => (0, uuid_1.v4)(),
|
|
15
|
-
},
|
|
16
|
-
coalesce: {
|
|
17
|
-
name: 'coalesce',
|
|
18
|
-
description: 'Returns the first non-null/undefined value',
|
|
19
|
-
category: 'utility',
|
|
20
|
-
signature: 'coalesce(value1, value2, ...)',
|
|
21
|
-
args: [
|
|
22
|
-
{
|
|
23
|
-
name: 'values',
|
|
24
|
-
type: 'any',
|
|
25
|
-
required: true,
|
|
26
|
-
description: 'Values to check',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
returnType: 'any',
|
|
30
|
-
examples: ['{{fn.coalesce(trigger.name, "Anonymous")}}'],
|
|
31
|
-
execute: (...args) => {
|
|
32
|
-
for (const arg of args) {
|
|
33
|
-
if (arg !== null && arg !== undefined) {
|
|
34
|
-
return arg;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
typeOf: {
|
|
41
|
-
name: 'typeOf',
|
|
42
|
-
description: 'Returns the type of a value',
|
|
43
|
-
category: 'utility',
|
|
44
|
-
signature: 'typeOf(value)',
|
|
45
|
-
args: [
|
|
46
|
-
{
|
|
47
|
-
name: 'value',
|
|
48
|
-
type: 'any',
|
|
49
|
-
required: true,
|
|
50
|
-
description: 'Value to check',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
returnType: 'string',
|
|
54
|
-
examples: ['{{fn.typeOf(trigger.data)}}'],
|
|
55
|
-
execute: (value) => {
|
|
56
|
-
if (value === null)
|
|
57
|
-
return 'null';
|
|
58
|
-
if (Array.isArray(value))
|
|
59
|
-
return 'array';
|
|
60
|
-
return typeof value;
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
isNull: {
|
|
64
|
-
name: 'isNull',
|
|
65
|
-
description: 'Checks if a value is null or undefined',
|
|
66
|
-
category: 'utility',
|
|
67
|
-
signature: 'isNull(value)',
|
|
68
|
-
args: [
|
|
69
|
-
{
|
|
70
|
-
name: 'value',
|
|
71
|
-
type: 'any',
|
|
72
|
-
required: true,
|
|
73
|
-
description: 'Value to check',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
returnType: 'boolean',
|
|
77
|
-
examples: ['{{fn.isNull(trigger.optional)}}'],
|
|
78
|
-
execute: (value) => value === null || value === undefined,
|
|
79
|
-
},
|
|
80
|
-
isEmpty: {
|
|
81
|
-
name: 'isEmpty',
|
|
82
|
-
description: 'Checks if a value is empty (null, undefined, empty string, empty array, or empty object)',
|
|
83
|
-
category: 'utility',
|
|
84
|
-
signature: 'isEmpty(value)',
|
|
85
|
-
args: [
|
|
86
|
-
{
|
|
87
|
-
name: 'value',
|
|
88
|
-
type: 'any',
|
|
89
|
-
required: true,
|
|
90
|
-
description: 'Value to check',
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
returnType: 'boolean',
|
|
94
|
-
examples: ['{{fn.isEmpty(trigger.description)}}'],
|
|
95
|
-
execute: (value) => {
|
|
96
|
-
if (value === null || value === undefined)
|
|
97
|
-
return true;
|
|
98
|
-
if (typeof value === 'string')
|
|
99
|
-
return value.length === 0;
|
|
100
|
-
if (Array.isArray(value))
|
|
101
|
-
return value.length === 0;
|
|
102
|
-
if (typeof value === 'object')
|
|
103
|
-
return Object.keys(value).length === 0;
|
|
104
|
-
return false;
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
default: {
|
|
108
|
-
name: 'default',
|
|
109
|
-
description: 'Returns a default value if the input is null, undefined, or empty',
|
|
110
|
-
category: 'utility',
|
|
111
|
-
signature: 'default(value, defaultValue)',
|
|
112
|
-
args: [
|
|
113
|
-
{
|
|
114
|
-
name: 'value',
|
|
115
|
-
type: 'any',
|
|
116
|
-
required: true,
|
|
117
|
-
description: 'Input value',
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
name: 'defaultValue',
|
|
121
|
-
type: 'any',
|
|
122
|
-
required: true,
|
|
123
|
-
description: 'Default value',
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
returnType: 'any',
|
|
127
|
-
examples: ['{{fn.default(trigger.name, "Unknown")}}'],
|
|
128
|
-
execute: (value, defaultValue) => {
|
|
129
|
-
if (value === null || value === undefined)
|
|
130
|
-
return defaultValue;
|
|
131
|
-
if (typeof value === 'string' && value.length === 0)
|
|
132
|
-
return defaultValue;
|
|
133
|
-
if (Array.isArray(value) && value.length === 0)
|
|
134
|
-
return defaultValue;
|
|
135
|
-
return value;
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
toNumber: {
|
|
139
|
-
name: 'toNumber',
|
|
140
|
-
description: 'Converts a value to a number',
|
|
141
|
-
category: 'utility',
|
|
142
|
-
signature: 'toNumber(value)',
|
|
143
|
-
args: [
|
|
144
|
-
{
|
|
145
|
-
name: 'value',
|
|
146
|
-
type: 'any',
|
|
147
|
-
required: true,
|
|
148
|
-
description: 'Value to convert',
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
returnType: 'number',
|
|
152
|
-
examples: ['{{fn.toNumber(trigger.stringNum)}}'],
|
|
153
|
-
execute: (value) => Number(value),
|
|
154
|
-
},
|
|
155
|
-
toString: {
|
|
156
|
-
name: 'toString',
|
|
157
|
-
description: 'Converts a value to a string',
|
|
158
|
-
category: 'utility',
|
|
159
|
-
signature: 'toString(value)',
|
|
160
|
-
args: [
|
|
161
|
-
{
|
|
162
|
-
name: 'value',
|
|
163
|
-
type: 'any',
|
|
164
|
-
required: true,
|
|
165
|
-
description: 'Value to convert',
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
returnType: 'string',
|
|
169
|
-
examples: ['{{fn.toString(trigger.number)}}'],
|
|
170
|
-
execute: (value) => String(value),
|
|
171
|
-
},
|
|
172
|
-
toBoolean: {
|
|
173
|
-
name: 'toBoolean',
|
|
174
|
-
description: 'Converts a value to a boolean',
|
|
175
|
-
category: 'utility',
|
|
176
|
-
signature: 'toBoolean(value)',
|
|
177
|
-
args: [
|
|
178
|
-
{
|
|
179
|
-
name: 'value',
|
|
180
|
-
type: 'any',
|
|
181
|
-
required: true,
|
|
182
|
-
description: 'Value to convert',
|
|
183
|
-
},
|
|
184
|
-
],
|
|
185
|
-
returnType: 'boolean',
|
|
186
|
-
examples: ['{{fn.toBoolean(trigger.flag)}}'],
|
|
187
|
-
execute: (value) => Boolean(value),
|
|
188
|
-
},
|
|
189
|
-
parseJSON: {
|
|
190
|
-
name: 'parseJSON',
|
|
191
|
-
description: 'Parses a JSON string',
|
|
192
|
-
category: 'utility',
|
|
193
|
-
signature: 'parseJSON(str)',
|
|
194
|
-
args: [
|
|
195
|
-
{
|
|
196
|
-
name: 'str',
|
|
197
|
-
type: 'string',
|
|
198
|
-
required: true,
|
|
199
|
-
description: 'JSON string',
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
returnType: 'any',
|
|
203
|
-
examples: ['{{fn.parseJSON(trigger.jsonData)}}'],
|
|
204
|
-
execute: (str) => {
|
|
205
|
-
try {
|
|
206
|
-
return JSON.parse(String(str));
|
|
207
|
-
}
|
|
208
|
-
catch {
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
toJSON: {
|
|
214
|
-
name: 'toJSON',
|
|
215
|
-
description: 'Converts a value to a JSON string',
|
|
216
|
-
category: 'utility',
|
|
217
|
-
signature: 'toJSON(value)',
|
|
218
|
-
args: [
|
|
219
|
-
{
|
|
220
|
-
name: 'value',
|
|
221
|
-
type: 'any',
|
|
222
|
-
required: true,
|
|
223
|
-
description: 'Value to convert',
|
|
224
|
-
},
|
|
225
|
-
],
|
|
226
|
-
returnType: 'string',
|
|
227
|
-
examples: ['{{fn.toJSON(trigger.data)}}'],
|
|
228
|
-
execute: (value) => JSON.stringify(value),
|
|
229
|
-
},
|
|
230
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare function buildExpressionString(path: string, operations?: Array<{
|
|
2
|
-
name: string;
|
|
3
|
-
args: unknown[];
|
|
4
|
-
}>): string;
|
|
5
|
-
export declare function buildReferenceString(type: string, id: string): string;
|
|
6
|
-
export declare function hasExpressions(str: string): boolean;
|
|
7
|
-
export declare function hasReferences(str: string): boolean;
|
|
8
|
-
export declare function isInsideExpression(text: string, cursorPos: number): boolean;
|
|
9
|
-
export declare function extractPaths(str: string): string[];
|
|
10
|
-
export declare function parseOperations(opsStr: string): Array<{
|
|
11
|
-
name: string;
|
|
12
|
-
args: unknown[];
|
|
13
|
-
}>;
|
|
14
|
-
export declare function getCurrentExpressionContext(text: string, cursorPos: number): {
|
|
15
|
-
isInExpression: boolean;
|
|
16
|
-
expressionStart: number;
|
|
17
|
-
expressionContent: string;
|
|
18
|
-
cursorOffsetInExpression: number;
|
|
19
|
-
currentPath: string;
|
|
20
|
-
expression: string;
|
|
21
|
-
start: number;
|
|
22
|
-
end: number;
|
|
23
|
-
path: string;
|
|
24
|
-
} | null;
|
|
25
|
-
export declare function getValueType(value: unknown): string;
|
|
26
|
-
export {};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getValueType = exports.getCurrentExpressionContext = exports.parseOperations = exports.extractPaths = exports.isInsideExpression = exports.hasReferences = exports.hasExpressions = exports.buildReferenceString = exports.buildExpressionString = void 0;
|
|
4
|
-
function buildExpressionString(path, operations) {
|
|
5
|
-
let expr = `{{${path}`;
|
|
6
|
-
if (operations && operations.length > 0) {
|
|
7
|
-
const opsStr = operations
|
|
8
|
-
.map((op) => {
|
|
9
|
-
if (op.args.length === 0) {
|
|
10
|
-
return op.name;
|
|
11
|
-
}
|
|
12
|
-
const argsStr = op.args
|
|
13
|
-
.map((arg) => (typeof arg === 'string' ? `"${arg}"` : String(arg)))
|
|
14
|
-
.join(', ');
|
|
15
|
-
return `${op.name}(${argsStr})`;
|
|
16
|
-
})
|
|
17
|
-
.join(' | ');
|
|
18
|
-
expr += ` | ${opsStr}`;
|
|
19
|
-
}
|
|
20
|
-
expr += '}}';
|
|
21
|
-
return expr;
|
|
22
|
-
}
|
|
23
|
-
exports.buildExpressionString = buildExpressionString;
|
|
24
|
-
function buildReferenceString(type, id) {
|
|
25
|
-
return `@${type}:${id}`;
|
|
26
|
-
}
|
|
27
|
-
exports.buildReferenceString = buildReferenceString;
|
|
28
|
-
function hasExpressions(str) {
|
|
29
|
-
return /\{\{.+?\}\}/.test(str);
|
|
30
|
-
}
|
|
31
|
-
exports.hasExpressions = hasExpressions;
|
|
32
|
-
function hasReferences(str) {
|
|
33
|
-
return /@\w+:[a-zA-Z0-9-_]+/.test(str);
|
|
34
|
-
}
|
|
35
|
-
exports.hasReferences = hasReferences;
|
|
36
|
-
function isInsideExpression(text, cursorPos) {
|
|
37
|
-
const beforeCursor = text.substring(0, cursorPos);
|
|
38
|
-
const lastOpenBrace = beforeCursor.lastIndexOf('{{');
|
|
39
|
-
const lastCloseBrace = beforeCursor.lastIndexOf('}}');
|
|
40
|
-
return lastOpenBrace > lastCloseBrace && lastOpenBrace !== -1;
|
|
41
|
-
}
|
|
42
|
-
exports.isInsideExpression = isInsideExpression;
|
|
43
|
-
function extractPaths(str) {
|
|
44
|
-
const matches = str.matchAll(/\{\{(.+?)\}\}/g);
|
|
45
|
-
return Array.from(matches, (m) => {
|
|
46
|
-
const expr = m[1].trim();
|
|
47
|
-
const [path] = expr.split('|');
|
|
48
|
-
return path.trim();
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
exports.extractPaths = extractPaths;
|
|
52
|
-
function parseOperations(opsStr) {
|
|
53
|
-
if (!opsStr || !opsStr.trim()) {
|
|
54
|
-
return [];
|
|
55
|
-
}
|
|
56
|
-
const operations = [];
|
|
57
|
-
const parts = opsStr.split('|').map((p) => p.trim());
|
|
58
|
-
for (const part of parts) {
|
|
59
|
-
if (!part) {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
const match = part.match(/^(\w+)(?:\(([^)]*)\))?$/);
|
|
63
|
-
if (match) {
|
|
64
|
-
const [, name, argsStr] = match;
|
|
65
|
-
const args = [];
|
|
66
|
-
if (argsStr) {
|
|
67
|
-
const argParts = argsStr.split(',').map((a) => a.trim());
|
|
68
|
-
for (const arg of argParts) {
|
|
69
|
-
if (arg.startsWith('"') || arg.startsWith("'")) {
|
|
70
|
-
args.push(arg.slice(1, -1));
|
|
71
|
-
}
|
|
72
|
-
else if (!isNaN(Number(arg))) {
|
|
73
|
-
args.push(Number(arg));
|
|
74
|
-
}
|
|
75
|
-
else if (arg === 'true' || arg === 'false') {
|
|
76
|
-
args.push(arg === 'true');
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
args.push(arg);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
operations.push({ name, args });
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return operations;
|
|
87
|
-
}
|
|
88
|
-
exports.parseOperations = parseOperations;
|
|
89
|
-
function getCurrentExpressionContext(text, cursorPos) {
|
|
90
|
-
if (!isInsideExpression(text, cursorPos)) {
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
const beforeCursor = text.substring(0, cursorPos);
|
|
94
|
-
const afterCursor = text.substring(cursorPos);
|
|
95
|
-
const start = beforeCursor.lastIndexOf('{{') + 2;
|
|
96
|
-
const endMatch = afterCursor.match(/\}\}/);
|
|
97
|
-
const end = endMatch && endMatch.index !== undefined
|
|
98
|
-
? cursorPos + endMatch.index
|
|
99
|
-
: text.length;
|
|
100
|
-
const expression = text.substring(start, end);
|
|
101
|
-
const [path] = expression.split('|');
|
|
102
|
-
const expressionContent = expression.trim();
|
|
103
|
-
const cursorOffsetInExpression = cursorPos - start;
|
|
104
|
-
const contentUpToCursor = expression.substring(0, cursorOffsetInExpression);
|
|
105
|
-
const match = contentUpToCursor.match(/([a-zA-Z_][a-zA-Z0-9_]*(?:\["[^"]*"\]|\['[^']*'\]|\[[^\]]*\]|\.(?:[a-zA-Z_][a-zA-Z0-9_]*))*\.?[a-zA-Z0-9_]*)$/);
|
|
106
|
-
const currentPath = match && match[1] ? match[1] : '';
|
|
107
|
-
return {
|
|
108
|
-
isInExpression: true,
|
|
109
|
-
expressionStart: start,
|
|
110
|
-
expressionContent,
|
|
111
|
-
cursorOffsetInExpression,
|
|
112
|
-
currentPath,
|
|
113
|
-
expression: expression.trim(),
|
|
114
|
-
start,
|
|
115
|
-
end,
|
|
116
|
-
path: path.trim(),
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
exports.getCurrentExpressionContext = getCurrentExpressionContext;
|
|
120
|
-
function getValueType(value) {
|
|
121
|
-
if (value === null) {
|
|
122
|
-
return 'null';
|
|
123
|
-
}
|
|
124
|
-
if (value === undefined) {
|
|
125
|
-
return 'undefined';
|
|
126
|
-
}
|
|
127
|
-
if (Array.isArray(value)) {
|
|
128
|
-
return 'array';
|
|
129
|
-
}
|
|
130
|
-
return typeof value;
|
|
131
|
-
}
|
|
132
|
-
exports.getValueType = getValueType;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { DataSourceType, OPERATOR_PRECEDENCE } from './types';
|
|
2
|
-
export type { ParsedExpression, PathExpression, FunctionExpression, BinaryExpression, UnaryExpression, TernaryExpression, LiteralExpression, GroupExpression, BuiltInFunction, FunctionCategory, FunctionArg, PipeOperation, OperationCategory, WorkflowContext, StepExecution, WorkflowStep, ValidationResult, ValidationError, ValidationWarning, ExpressionToken, WorkflowResourceMapping, } from './types';
|
|
3
|
-
export { parseExpression, detectDataSource, parsePathSegments, tokenizeTemplate, } from './parser';
|
|
4
|
-
export { buildResolverContext, resolvePathValue, evaluateExpression, interpolateString, resolveExpression, } from './resolver';
|
|
5
|
-
export { BUILT_IN_FUNCTIONS, executeFunction, getFunctionsByCategory, getFunctionNames, hasFunction, getFunction, } from './functions';
|
|
6
|
-
export { PIPE_OPERATIONS, executePipeOperation, getPipesByCategory, getPipeNames, hasPipe, getPipe, } from './pipes';
|
|
7
|
-
export type { PipeDefinition } from './pipes/string-pipes';
|
|
8
|
-
import type { WorkflowContext } from './types';
|
|
9
|
-
export { buildExpressionString, buildReferenceString, hasExpressions, hasReferences, isInsideExpression, extractPaths, parseOperations, getCurrentExpressionContext, getValueType, } from './helpers';
|
|
10
|
-
export declare function evaluate(expression: string, workflowContext: WorkflowContext, secretsMap?: Map<string, string>): unknown;
|
|
11
|
-
export declare function interpolate(template: string, workflowContext: WorkflowContext, secretsMap?: Map<string, string>, options?: {
|
|
12
|
-
maskSecrets?: boolean;
|
|
13
|
-
}): string;
|
|
14
|
-
export declare function hasDynamicContent(str: string): boolean;
|
|
15
|
-
export declare function extractReferences(str: string): string[];
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractReferences = exports.hasDynamicContent = exports.interpolate = exports.evaluate = exports.getValueType = exports.getCurrentExpressionContext = exports.parseOperations = exports.extractPaths = exports.isInsideExpression = exports.hasReferences = exports.hasExpressions = exports.buildReferenceString = exports.buildExpressionString = exports.getPipe = exports.hasPipe = exports.getPipeNames = exports.getPipesByCategory = exports.executePipeOperation = exports.PIPE_OPERATIONS = exports.getFunction = exports.hasFunction = exports.getFunctionNames = exports.getFunctionsByCategory = exports.executeFunction = exports.BUILT_IN_FUNCTIONS = exports.resolveExpression = exports.interpolateString = exports.evaluateExpression = exports.resolvePathValue = exports.buildResolverContext = exports.tokenizeTemplate = exports.parsePathSegments = exports.detectDataSource = exports.parseExpression = exports.OPERATOR_PRECEDENCE = exports.DataSourceType = void 0;
|
|
4
|
-
var types_1 = require("./types");
|
|
5
|
-
Object.defineProperty(exports, "DataSourceType", { enumerable: true, get: function () { return types_1.DataSourceType; } });
|
|
6
|
-
Object.defineProperty(exports, "OPERATOR_PRECEDENCE", { enumerable: true, get: function () { return types_1.OPERATOR_PRECEDENCE; } });
|
|
7
|
-
var parser_1 = require("./parser");
|
|
8
|
-
Object.defineProperty(exports, "parseExpression", { enumerable: true, get: function () { return parser_1.parseExpression; } });
|
|
9
|
-
Object.defineProperty(exports, "detectDataSource", { enumerable: true, get: function () { return parser_1.detectDataSource; } });
|
|
10
|
-
Object.defineProperty(exports, "parsePathSegments", { enumerable: true, get: function () { return parser_1.parsePathSegments; } });
|
|
11
|
-
Object.defineProperty(exports, "tokenizeTemplate", { enumerable: true, get: function () { return parser_1.tokenizeTemplate; } });
|
|
12
|
-
var resolver_1 = require("./resolver");
|
|
13
|
-
Object.defineProperty(exports, "buildResolverContext", { enumerable: true, get: function () { return resolver_1.buildResolverContext; } });
|
|
14
|
-
Object.defineProperty(exports, "resolvePathValue", { enumerable: true, get: function () { return resolver_1.resolvePathValue; } });
|
|
15
|
-
Object.defineProperty(exports, "evaluateExpression", { enumerable: true, get: function () { return resolver_1.evaluateExpression; } });
|
|
16
|
-
Object.defineProperty(exports, "interpolateString", { enumerable: true, get: function () { return resolver_1.interpolateString; } });
|
|
17
|
-
Object.defineProperty(exports, "resolveExpression", { enumerable: true, get: function () { return resolver_1.resolveExpression; } });
|
|
18
|
-
var functions_1 = require("./functions");
|
|
19
|
-
Object.defineProperty(exports, "BUILT_IN_FUNCTIONS", { enumerable: true, get: function () { return functions_1.BUILT_IN_FUNCTIONS; } });
|
|
20
|
-
Object.defineProperty(exports, "executeFunction", { enumerable: true, get: function () { return functions_1.executeFunction; } });
|
|
21
|
-
Object.defineProperty(exports, "getFunctionsByCategory", { enumerable: true, get: function () { return functions_1.getFunctionsByCategory; } });
|
|
22
|
-
Object.defineProperty(exports, "getFunctionNames", { enumerable: true, get: function () { return functions_1.getFunctionNames; } });
|
|
23
|
-
Object.defineProperty(exports, "hasFunction", { enumerable: true, get: function () { return functions_1.hasFunction; } });
|
|
24
|
-
Object.defineProperty(exports, "getFunction", { enumerable: true, get: function () { return functions_1.getFunction; } });
|
|
25
|
-
var pipes_1 = require("./pipes");
|
|
26
|
-
Object.defineProperty(exports, "PIPE_OPERATIONS", { enumerable: true, get: function () { return pipes_1.PIPE_OPERATIONS; } });
|
|
27
|
-
Object.defineProperty(exports, "executePipeOperation", { enumerable: true, get: function () { return pipes_1.executePipeOperation; } });
|
|
28
|
-
Object.defineProperty(exports, "getPipesByCategory", { enumerable: true, get: function () { return pipes_1.getPipesByCategory; } });
|
|
29
|
-
Object.defineProperty(exports, "getPipeNames", { enumerable: true, get: function () { return pipes_1.getPipeNames; } });
|
|
30
|
-
Object.defineProperty(exports, "hasPipe", { enumerable: true, get: function () { return pipes_1.hasPipe; } });
|
|
31
|
-
Object.defineProperty(exports, "getPipe", { enumerable: true, get: function () { return pipes_1.getPipe; } });
|
|
32
|
-
const resolver_2 = require("./resolver");
|
|
33
|
-
var helpers_1 = require("./helpers");
|
|
34
|
-
Object.defineProperty(exports, "buildExpressionString", { enumerable: true, get: function () { return helpers_1.buildExpressionString; } });
|
|
35
|
-
Object.defineProperty(exports, "buildReferenceString", { enumerable: true, get: function () { return helpers_1.buildReferenceString; } });
|
|
36
|
-
Object.defineProperty(exports, "hasExpressions", { enumerable: true, get: function () { return helpers_1.hasExpressions; } });
|
|
37
|
-
Object.defineProperty(exports, "hasReferences", { enumerable: true, get: function () { return helpers_1.hasReferences; } });
|
|
38
|
-
Object.defineProperty(exports, "isInsideExpression", { enumerable: true, get: function () { return helpers_1.isInsideExpression; } });
|
|
39
|
-
Object.defineProperty(exports, "extractPaths", { enumerable: true, get: function () { return helpers_1.extractPaths; } });
|
|
40
|
-
Object.defineProperty(exports, "parseOperations", { enumerable: true, get: function () { return helpers_1.parseOperations; } });
|
|
41
|
-
Object.defineProperty(exports, "getCurrentExpressionContext", { enumerable: true, get: function () { return helpers_1.getCurrentExpressionContext; } });
|
|
42
|
-
Object.defineProperty(exports, "getValueType", { enumerable: true, get: function () { return helpers_1.getValueType; } });
|
|
43
|
-
function evaluate(expression, workflowContext, secretsMap) {
|
|
44
|
-
const context = (0, resolver_2.buildResolverContext)(workflowContext);
|
|
45
|
-
return (0, resolver_2.resolveExpression)(expression, context, secretsMap);
|
|
46
|
-
}
|
|
47
|
-
exports.evaluate = evaluate;
|
|
48
|
-
function interpolate(template, workflowContext, secretsMap, options) {
|
|
49
|
-
const context = (0, resolver_2.buildResolverContext)(workflowContext);
|
|
50
|
-
return (0, resolver_2.interpolateString)(template, context, secretsMap, options);
|
|
51
|
-
}
|
|
52
|
-
exports.interpolate = interpolate;
|
|
53
|
-
function hasDynamicContent(str) {
|
|
54
|
-
return /\{\{.+?\}\}/.test(str);
|
|
55
|
-
}
|
|
56
|
-
exports.hasDynamicContent = hasDynamicContent;
|
|
57
|
-
function extractReferences(str) {
|
|
58
|
-
const matches = str.matchAll(/\{\{(.+?)\}\}/g);
|
|
59
|
-
return Array.from(matches, (m) => m[1].trim());
|
|
60
|
-
}
|
|
61
|
-
exports.extractReferences = extractReferences;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ParsedExpression, DataSourceType } from './types';
|
|
2
|
-
export declare function detectDataSource(path: string): DataSourceType | null;
|
|
3
|
-
export declare function parsePathSegments(path: string): string[];
|
|
4
|
-
export declare function parseExpression(expression: string): ParsedExpression;
|
|
5
|
-
export declare function tokenizeTemplate(template: string): Array<{
|
|
6
|
-
type: 'text' | 'expression';
|
|
7
|
-
value: string;
|
|
8
|
-
}>;
|