@abyss-project/console 14.1.0 → 15.0.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/CHANGELOG.md +20 -0
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -3
- package/dist/api/index.js.map +1 -1
- package/dist/index.d.ts +0 -38
- package/dist/index.js +1 -40
- package/dist/index.js.map +1 -1
- package/dist/types/enum/api-error.enum.d.ts +2 -2
- package/dist/types/enum/api-error.enum.js +2 -2
- package/dist/types/enum/api-error.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/vault.enum.d.ts +10 -0
- package/dist/types/enum/vault.enum.js +16 -0
- package/dist/types/enum/vault.enum.js.map +1 -0
- package/dist/types/enum/workflow.enum.d.ts +1 -2
- package/dist/types/enum/workflow.enum.js +1 -2
- package/dist/types/enum/workflow.enum.js.map +1 -1
- package/dist/types/interface/api/index.d.ts +0 -8
- package/dist/types/interface/api/index.js +0 -8
- package/dist/types/interface/api/index.js.map +1 -1
- package/dist/types/interface/api/requests/secret-access.request.d.ts +5 -2
- package/dist/types/interface/api/requests/secret.request.d.ts +3 -0
- package/dist/types/interface/api/responses/access-log.admin.response.d.ts +0 -1
- package/dist/types/interface/api/responses/report.admin.response.d.ts +0 -7
- package/dist/types/interface/api/responses/secret.response.d.ts +5 -1
- package/dist/types/interface/index.d.ts +1 -7
- package/dist/types/interface/index.js +1 -7
- package/dist/types/interface/index.js.map +1 -1
- package/dist/types/interface/models/{secret-access-ip-address.model.d.ts → secret-access-allowed-address.model.d.ts} +4 -4
- package/dist/types/interface/{api/requests/ip-address.request.js → models/secret-access-allowed-address.model.js} +1 -1
- package/dist/types/interface/models/secret-access-allowed-address.model.js.map +1 -0
- package/dist/types/interface/models/secret-access.model.d.ts +3 -2
- package/dist/types/interface/models/secret.model.d.ts +3 -0
- package/dist/utils/ip-address-validator.utils.d.ts +4 -5
- package/dist/utils/ip-address-validator.utils.js +9 -26
- package/dist/utils/ip-address-validator.utils.js.map +1 -1
- package/dist/utils/workflow-credit.utils.d.ts +8 -4
- package/dist/utils/workflow-credit.utils.js +33 -19
- package/dist/utils/workflow-credit.utils.js.map +1 -1
- package/dist/workflow-expressions/types.d.ts +3 -5
- package/dist/workflow-expressions/types.js +1 -2
- package/dist/workflow-expressions/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/ip-address.api.d.ts +0 -6
- package/dist/api/ip-address.api.js +0 -30
- package/dist/api/ip-address.api.js.map +0 -1
- package/dist/api/variable-access.api.d.ts +0 -9
- package/dist/api/variable-access.api.js +0 -45
- package/dist/api/variable-access.api.js.map +0 -1
- package/dist/api/variable-public.api.d.ts +0 -2
- package/dist/api/variable-public.api.js +0 -10
- package/dist/api/variable-public.api.js.map +0 -1
- package/dist/api/variable.api.d.ts +0 -7
- package/dist/api/variable.api.js +0 -35
- package/dist/api/variable.api.js.map +0 -1
- package/dist/types/interface/api/requests/ip-address.request.d.ts +0 -32
- package/dist/types/interface/api/requests/ip-address.request.js.map +0 -1
- package/dist/types/interface/api/requests/variable-access.request.d.ts +0 -51
- package/dist/types/interface/api/requests/variable-access.request.js +0 -3
- package/dist/types/interface/api/requests/variable-access.request.js.map +0 -1
- package/dist/types/interface/api/requests/variable-public.request.d.ts +0 -3
- package/dist/types/interface/api/requests/variable-public.request.js +0 -3
- package/dist/types/interface/api/requests/variable-public.request.js.map +0 -1
- package/dist/types/interface/api/requests/variable.request.d.ts +0 -38
- package/dist/types/interface/api/requests/variable.request.js +0 -3
- package/dist/types/interface/api/requests/variable.request.js.map +0 -1
- package/dist/types/interface/api/responses/ip-address.response.d.ts +0 -21
- package/dist/types/interface/api/responses/ip-address.response.js +0 -3
- package/dist/types/interface/api/responses/ip-address.response.js.map +0 -1
- package/dist/types/interface/api/responses/variable-access.response.d.ts +0 -27
- package/dist/types/interface/api/responses/variable-access.response.js +0 -3
- package/dist/types/interface/api/responses/variable-access.response.js.map +0 -1
- package/dist/types/interface/api/responses/variable-public.response.d.ts +0 -5
- package/dist/types/interface/api/responses/variable-public.response.js +0 -3
- package/dist/types/interface/api/responses/variable-public.response.js.map +0 -1
- package/dist/types/interface/api/responses/variable.response.d.ts +0 -23
- package/dist/types/interface/api/responses/variable.response.js +0 -3
- package/dist/types/interface/api/responses/variable.response.js.map +0 -1
- package/dist/types/interface/models/ip-address.model.d.ts +0 -17
- package/dist/types/interface/models/ip-address.model.js +0 -12
- package/dist/types/interface/models/ip-address.model.js.map +0 -1
- package/dist/types/interface/models/secret-access-ip-address.model.js +0 -3
- package/dist/types/interface/models/secret-access-ip-address.model.js.map +0 -1
- package/dist/types/interface/models/variable-access-ip-address.model.d.ts +0 -11
- package/dist/types/interface/models/variable-access-ip-address.model.js +0 -3
- package/dist/types/interface/models/variable-access-ip-address.model.js.map +0 -1
- package/dist/types/interface/models/variable-access-log.model.d.ts +0 -21
- package/dist/types/interface/models/variable-access-log.model.js +0 -3
- package/dist/types/interface/models/variable-access-log.model.js.map +0 -1
- package/dist/types/interface/models/variable-access-variable.model.d.ts +0 -11
- package/dist/types/interface/models/variable-access-variable.model.js +0 -3
- package/dist/types/interface/models/variable-access-variable.model.js.map +0 -1
- package/dist/types/interface/models/variable-access.model.d.ts +0 -18
- package/dist/types/interface/models/variable-access.model.js +0 -3
- package/dist/types/interface/models/variable-access.model.js.map +0 -1
- package/dist/types/interface/models/variable.model.d.ts +0 -13
- package/dist/types/interface/models/variable.model.js +0 -3
- package/dist/types/interface/models/variable.model.js.map +0 -1
|
@@ -8,18 +8,12 @@ export * from './models/workflow-execution.model';
|
|
|
8
8
|
export * from './models/workflow-step-execution.model';
|
|
9
9
|
export * from './models/workflow-webhook.model';
|
|
10
10
|
export * from './models/domain-verification.model';
|
|
11
|
-
export * from './models/ip-address.model';
|
|
12
11
|
export * from './models/secret.model';
|
|
13
12
|
export * from './models/secret-version.model';
|
|
14
13
|
export * from './models/secret-access-secret.model';
|
|
15
14
|
export * from './models/secret-access.model';
|
|
16
15
|
export * from './models/secret-access-log.model';
|
|
17
|
-
export * from './models/secret-access-
|
|
18
|
-
export * from './models/variable.model';
|
|
19
|
-
export * from './models/variable-access.model';
|
|
20
|
-
export * from './models/variable-access-variable.model';
|
|
21
|
-
export * from './models/variable-access-ip-address.model';
|
|
22
|
-
export * from './models/variable-access-log.model';
|
|
16
|
+
export * from './models/secret-access-allowed-address.model';
|
|
23
17
|
export * from './models/internal-ticket.model';
|
|
24
18
|
export * from './models/internal-ticket-category.model';
|
|
25
19
|
export * from './models/internal-ticket-priority.model';
|
|
@@ -24,18 +24,12 @@ __exportStar(require("./models/workflow-execution.model"), exports);
|
|
|
24
24
|
__exportStar(require("./models/workflow-step-execution.model"), exports);
|
|
25
25
|
__exportStar(require("./models/workflow-webhook.model"), exports);
|
|
26
26
|
__exportStar(require("./models/domain-verification.model"), exports);
|
|
27
|
-
__exportStar(require("./models/ip-address.model"), exports);
|
|
28
27
|
__exportStar(require("./models/secret.model"), exports);
|
|
29
28
|
__exportStar(require("./models/secret-version.model"), exports);
|
|
30
29
|
__exportStar(require("./models/secret-access-secret.model"), exports);
|
|
31
30
|
__exportStar(require("./models/secret-access.model"), exports);
|
|
32
31
|
__exportStar(require("./models/secret-access-log.model"), exports);
|
|
33
|
-
__exportStar(require("./models/secret-access-
|
|
34
|
-
__exportStar(require("./models/variable.model"), exports);
|
|
35
|
-
__exportStar(require("./models/variable-access.model"), exports);
|
|
36
|
-
__exportStar(require("./models/variable-access-variable.model"), exports);
|
|
37
|
-
__exportStar(require("./models/variable-access-ip-address.model"), exports);
|
|
38
|
-
__exportStar(require("./models/variable-access-log.model"), exports);
|
|
32
|
+
__exportStar(require("./models/secret-access-allowed-address.model"), exports);
|
|
39
33
|
__exportStar(require("./models/internal-ticket.model"), exports);
|
|
40
34
|
__exportStar(require("./models/internal-ticket-category.model"), exports);
|
|
41
35
|
__exportStar(require("./models/internal-ticket-priority.model"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wCAAsB;AAGtB,yDAAuC;AACvC,0DAAwC;AACxC,kEAAgD;AAChD,+DAA6C;AAC7C,0EAAwD;AACxD,oEAAkD;AAClD,yEAAuD;AACvD,kEAAgD;AAChD,qEAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wCAAsB;AAGtB,yDAAuC;AACvC,0DAAwC;AACxC,kEAAgD;AAChD,+DAA6C;AAC7C,0EAAwD;AACxD,oEAAkD;AAClD,yEAAuD;AACvD,kEAAgD;AAChD,qEAAmD;AACnD,wDAAsC;AACtC,gEAA8C;AAC9C,sEAAoD;AACpD,+DAA6C;AAC7C,mEAAiD;AACjD,+EAA6D;AAC7D,iEAA+C;AAC/C,0EAAwD;AACxD,0EAAwD;AACxD,yEAAuD;AACvD,kFAAgE;AAChE,4EAA0D;AAC1D,0EAAwD;AACxD,0EAAwD;AACxD,iFAA+D;AAC/D,4EAA0D;AAC1D,+EAA6D;AAC7D,yEAAuD;AACvD,0EAAwD;AACxD,qEAAmD;AACnD,4EAA0D;AAC1D,+EAA6D;AAC7D,0EAAwD;AACxD,+EAA6D;AAC7D,+EAA6D;AAC7D,0EAAwD;AACxD,4EAA0D"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { AllowedAddressType } from '../../enum/vault.enum';
|
|
1
2
|
import { ISecretAccess } from './secret-access.model';
|
|
2
|
-
|
|
3
|
-
export interface ISecretAccessIpAddress {
|
|
3
|
+
export interface IAllowedAddress {
|
|
4
4
|
id: string;
|
|
5
5
|
secretAccessId: string;
|
|
6
|
-
|
|
6
|
+
value: string;
|
|
7
|
+
type: AllowedAddressType;
|
|
7
8
|
createdAt?: Date;
|
|
8
9
|
updatedAt?: Date;
|
|
9
10
|
secretAccess?: ISecretAccess;
|
|
10
|
-
ipAddress?: IIpAddress;
|
|
11
11
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-access-allowed-address.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/secret-access-allowed-address.model.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IProject } from './project.model';
|
|
2
2
|
import { ISecretAccessSecret } from './secret-access-secret.model';
|
|
3
|
-
import { ISecretAccessIpAddress } from './secret-access-ip-address.model';
|
|
4
3
|
import { ISecretAccessLog } from './secret-access-log.model';
|
|
4
|
+
import { IAllowedAddress } from './secret-access-allowed-address.model';
|
|
5
5
|
export interface ISecretAccess {
|
|
6
6
|
id: string;
|
|
7
7
|
projectId: string;
|
|
@@ -9,10 +9,11 @@ export interface ISecretAccess {
|
|
|
9
9
|
description: string | null;
|
|
10
10
|
isActive: boolean;
|
|
11
11
|
expiresAt: Date | null;
|
|
12
|
+
tokenHint: string | null;
|
|
12
13
|
createdAt?: Date;
|
|
13
14
|
updatedAt?: Date;
|
|
14
15
|
project?: IProject;
|
|
15
16
|
secretAccessSecret?: ISecretAccessSecret[];
|
|
16
|
-
secretAccessIpAddress?: ISecretAccessIpAddress[];
|
|
17
17
|
secretAccessLog?: ISecretAccessLog[];
|
|
18
|
+
allowedAddresses: IAllowedAddress[];
|
|
18
19
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { SecretVisibility } from '../../enum/vault.enum';
|
|
1
2
|
import { IProject } from './project.model';
|
|
2
3
|
import { ISecretVersion } from './secret-version.model';
|
|
3
4
|
export interface ISecret {
|
|
4
5
|
id: string;
|
|
5
6
|
projectId: string;
|
|
7
|
+
organizationId: string | null;
|
|
6
8
|
name: string;
|
|
7
9
|
description: string | null;
|
|
8
10
|
key: string;
|
|
9
11
|
value: string;
|
|
12
|
+
visibility: SecretVisibility;
|
|
10
13
|
isActive: boolean;
|
|
11
14
|
createdAt?: Date;
|
|
12
15
|
updatedAt?: Date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type IpAddressErrorCode = Code.ipAddressValueRequired | Code.ipAddressInvalidIPv4Format | Code.ipAddressInvalidIPv6Format | Code.ipAddressInvalidIPv4CIDRFormat | Code.ipAddressInvalidIPv6CIDRFormat | Code.
|
|
1
|
+
import { AllowedAddressType, Code } from '../types';
|
|
2
|
+
export type IpAddressErrorCode = Code.ipAddressValueRequired | Code.ipAddressInvalidIPv4Format | Code.ipAddressInvalidIPv6Format | Code.ipAddressInvalidIPv4CIDRFormat | Code.ipAddressInvalidIPv6CIDRFormat | Code.ipAddressInvalidType;
|
|
3
3
|
export interface IpAddressValidationResult {
|
|
4
4
|
isValid: boolean;
|
|
5
5
|
errorCode?: IpAddressErrorCode;
|
|
@@ -9,6 +9,5 @@ export declare const isValidIPv4: (ip: string) => boolean;
|
|
|
9
9
|
export declare const isValidIPv6: (ip: string) => boolean;
|
|
10
10
|
export declare const isValidIPv4CIDR: (cidr: string) => boolean;
|
|
11
11
|
export declare const isValidIPv6CIDR: (cidr: string) => boolean;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const detectIpAddressType: (value: string) => IpAddressType | null;
|
|
12
|
+
export declare const validateIpAddressValue: (type: AllowedAddressType, value: string) => IpAddressValidationResult;
|
|
13
|
+
export declare const detectIpAddressType: (value: string) => AllowedAddressType | null;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.detectIpAddressType = exports.validateIpAddressValue = exports.
|
|
6
|
+
exports.detectIpAddressType = exports.validateIpAddressValue = exports.isValidIPv6CIDR = exports.isValidIPv4CIDR = exports.isValidIPv6 = exports.isValidIPv4 = void 0;
|
|
7
7
|
const ipaddr_js_1 = __importDefault(require("ipaddr.js"));
|
|
8
8
|
const types_1 = require("../types");
|
|
9
9
|
const isValidIPv4 = (ip) => ipaddr_js_1.default.IPv4.isValidFourPartDecimal(ip);
|
|
@@ -14,11 +14,6 @@ const isValidIPv4CIDR = (cidr) => ipaddr_js_1.default.IPv4.isValidCIDRFourPartDe
|
|
|
14
14
|
exports.isValidIPv4CIDR = isValidIPv4CIDR;
|
|
15
15
|
const isValidIPv6CIDR = (cidr) => ipaddr_js_1.default.IPv6.isValidCIDR(cidr);
|
|
16
16
|
exports.isValidIPv6CIDR = isValidIPv6CIDR;
|
|
17
|
-
const isValidDomain = (domain) => {
|
|
18
|
-
const domainRegex = /^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/;
|
|
19
|
-
return domainRegex.test(domain) && domain.length <= 253;
|
|
20
|
-
};
|
|
21
|
-
exports.isValidDomain = isValidDomain;
|
|
22
17
|
const validateIpAddressValue = (type, value) => {
|
|
23
18
|
if (!value || value.trim() === '') {
|
|
24
19
|
return {
|
|
@@ -29,7 +24,7 @@ const validateIpAddressValue = (type, value) => {
|
|
|
29
24
|
}
|
|
30
25
|
const trimmedValue = value.trim();
|
|
31
26
|
switch (type) {
|
|
32
|
-
case types_1.
|
|
27
|
+
case types_1.AllowedAddressType.IPV4:
|
|
33
28
|
if (!(0, exports.isValidIPv4)(trimmedValue)) {
|
|
34
29
|
return {
|
|
35
30
|
isValid: false,
|
|
@@ -38,7 +33,7 @@ const validateIpAddressValue = (type, value) => {
|
|
|
38
33
|
};
|
|
39
34
|
}
|
|
40
35
|
break;
|
|
41
|
-
case types_1.
|
|
36
|
+
case types_1.AllowedAddressType.IPV6:
|
|
42
37
|
if (!(0, exports.isValidIPv6)(trimmedValue)) {
|
|
43
38
|
return {
|
|
44
39
|
isValid: false,
|
|
@@ -47,7 +42,7 @@ const validateIpAddressValue = (type, value) => {
|
|
|
47
42
|
};
|
|
48
43
|
}
|
|
49
44
|
break;
|
|
50
|
-
case types_1.
|
|
45
|
+
case types_1.AllowedAddressType.IPV4_CIDR:
|
|
51
46
|
if (!(0, exports.isValidIPv4CIDR)(trimmedValue)) {
|
|
52
47
|
return {
|
|
53
48
|
isValid: false,
|
|
@@ -56,7 +51,7 @@ const validateIpAddressValue = (type, value) => {
|
|
|
56
51
|
};
|
|
57
52
|
}
|
|
58
53
|
break;
|
|
59
|
-
case types_1.
|
|
54
|
+
case types_1.AllowedAddressType.IPV6_CIDR:
|
|
60
55
|
if (!(0, exports.isValidIPv6CIDR)(trimmedValue)) {
|
|
61
56
|
return {
|
|
62
57
|
isValid: false,
|
|
@@ -65,15 +60,6 @@ const validateIpAddressValue = (type, value) => {
|
|
|
65
60
|
};
|
|
66
61
|
}
|
|
67
62
|
break;
|
|
68
|
-
case types_1.IpAddressType.DOMAIN:
|
|
69
|
-
if (!(0, exports.isValidDomain)(trimmedValue)) {
|
|
70
|
-
return {
|
|
71
|
-
isValid: false,
|
|
72
|
-
errorCode: types_1.Code.ipAddressInvalidDomainFormat,
|
|
73
|
-
errorMessage: 'Invalid domain format. Example: example.com',
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
break;
|
|
77
63
|
default:
|
|
78
64
|
return {
|
|
79
65
|
isValid: false,
|
|
@@ -87,19 +73,16 @@ exports.validateIpAddressValue = validateIpAddressValue;
|
|
|
87
73
|
const detectIpAddressType = (value) => {
|
|
88
74
|
const trimmedValue = value.trim();
|
|
89
75
|
if ((0, exports.isValidIPv4CIDR)(trimmedValue)) {
|
|
90
|
-
return types_1.
|
|
76
|
+
return types_1.AllowedAddressType.IPV4_CIDR;
|
|
91
77
|
}
|
|
92
78
|
if ((0, exports.isValidIPv6CIDR)(trimmedValue)) {
|
|
93
|
-
return types_1.
|
|
79
|
+
return types_1.AllowedAddressType.IPV6_CIDR;
|
|
94
80
|
}
|
|
95
81
|
if ((0, exports.isValidIPv4)(trimmedValue)) {
|
|
96
|
-
return types_1.
|
|
82
|
+
return types_1.AllowedAddressType.IPV4;
|
|
97
83
|
}
|
|
98
84
|
if ((0, exports.isValidIPv6)(trimmedValue)) {
|
|
99
|
-
return types_1.
|
|
100
|
-
}
|
|
101
|
-
if ((0, exports.isValidDomain)(trimmedValue)) {
|
|
102
|
-
return types_1.IpAddressType.DOMAIN;
|
|
85
|
+
return types_1.AllowedAddressType.IPV6;
|
|
103
86
|
}
|
|
104
87
|
return null;
|
|
105
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ip-address-validator.utils.js","sourceRoot":"","sources":["../../src/utils/ip-address-validator.utils.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"ip-address-validator.utils.js","sourceRoot":"","sources":["../../src/utils/ip-address-validator.utils.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA+B;AAC/B,oCAAoD;AAiC7C,MAAM,WAAW,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,mBAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;AAA9E,QAAA,WAAW,eAAmE;AASpF,MAAM,WAAW,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,mBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAA/D,QAAA,WAAW,eAAoD;AAQrE,MAAM,eAAe,GAAG,CAAC,IAAY,EAAW,EAAE,CACvD,mBAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;AADlC,QAAA,eAAe,mBACmB;AAQxC,MAAM,eAAe,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,mBAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAA3E,QAAA,eAAe,mBAA4D;AAMjF,MAAM,sBAAsB,GAAG,CACpC,IAAw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ACJ,CAAC;YACD,MAAM;QAER;YACE,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,YAAI,CAAC,oBAAoB;gBACpC,YAAY,EAAE,yBAAyB;aACxC,CAAC;IACN,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC,CAAC;AAhEW,QAAA,sBAAsB,0BAgEjC;AAOK,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAA6B,EAAE;IAC9E,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAElC,IAAI,IAAA,uBAAe,EAAC,YAAY,CAAC,EAAE,CAAC;QAClC,OAAO,0BAAkB,CAAC,SAAS,CAAC;IACtC,CAAC;IAED,IAAI,IAAA,uBAAe,EAAC,YAAY,CAAC,EAAE,CAAC;QAClC,OAAO,0BAAkB,CAAC,SAAS,CAAC;IACtC,CAAC;IAED,IAAI,IAAA,mBAAW,EAAC,YAAY,CAAC,EAAE,CAAC;QAC9B,OAAO,0BAAkB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAI,IAAA,mBAAW,EAAC,YAAY,CAAC,EAAE,CAAC;QAC9B,OAAO,0BAAkB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B"}
|
|
@@ -7,10 +7,14 @@ export interface IWorkflowCreditStructure {
|
|
|
7
7
|
steps: {
|
|
8
8
|
id: string;
|
|
9
9
|
type: WorkflowStepType;
|
|
10
|
+
isEnabled?: boolean;
|
|
10
11
|
}[];
|
|
11
|
-
connections:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
connections: IWorkflowCreditConnection[];
|
|
13
|
+
}
|
|
14
|
+
export interface IWorkflowCreditConnection {
|
|
15
|
+
fromStepId: string | null;
|
|
16
|
+
toStepId: string | null;
|
|
17
|
+
order?: number;
|
|
18
|
+
expression?: string | null;
|
|
15
19
|
}
|
|
16
20
|
export declare const computeWorkflowMaxCreditCost: (structure: IWorkflowCreditStructure) => number;
|
|
@@ -11,22 +11,35 @@ exports.WORKFLOW_STEP_CREDIT_COST = Object.freeze({
|
|
|
11
11
|
});
|
|
12
12
|
const computeWorkflowCreditCost = (steps) => steps.reduce((total, step) => total + exports.WORKFLOW_STEP_CREDIT_COST[step.type], 0);
|
|
13
13
|
exports.computeWorkflowCreditCost = computeWorkflowCreditCost;
|
|
14
|
+
const byOrder = (a, b) => (a.order ?? 0) - (b.order ?? 0);
|
|
15
|
+
const alwaysMatches = (connection) => connection.expression === null || connection.expression?.trim() === '';
|
|
14
16
|
const computeWorkflowMaxCreditCost = (structure) => {
|
|
15
17
|
const stepsById = new Map(structure.steps.map((step) => [step.id, step]));
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
+
const entryConnection = structure.connections
|
|
19
|
+
.filter((connection) => connection.fromStepId === null)
|
|
20
|
+
.sort(byOrder)[0];
|
|
21
|
+
if (!entryConnection || entryConnection.toStepId === null) {
|
|
22
|
+
return 0;
|
|
23
|
+
}
|
|
24
|
+
const outgoing = new Map();
|
|
18
25
|
for (const connection of structure.connections) {
|
|
19
|
-
if (connection.
|
|
20
|
-
|
|
26
|
+
if (connection.fromStepId !== null) {
|
|
27
|
+
outgoing.set(connection.fromStepId, [
|
|
28
|
+
...(outgoing.get(connection.fromStepId) ?? []),
|
|
29
|
+
connection,
|
|
30
|
+
]);
|
|
21
31
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
}
|
|
33
|
+
const candidatesByStepId = new Map();
|
|
34
|
+
for (const [stepId, connections] of outgoing) {
|
|
35
|
+
const candidates = [];
|
|
36
|
+
for (const connection of [...connections].sort(byOrder)) {
|
|
37
|
+
candidates.push(connection.toStepId);
|
|
38
|
+
if (alwaysMatches(connection)) {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
25
41
|
}
|
|
26
|
-
|
|
27
|
-
...(childrenByStepId.get(connection.fromStepId) ?? []),
|
|
28
|
-
connection.toStepId,
|
|
29
|
-
]);
|
|
42
|
+
candidatesByStepId.set(stepId, candidates);
|
|
30
43
|
}
|
|
31
44
|
const memo = new Map();
|
|
32
45
|
const visiting = new Set();
|
|
@@ -39,17 +52,18 @@ const computeWorkflowMaxCreditCost = (structure) => {
|
|
|
39
52
|
if (known !== undefined) {
|
|
40
53
|
return known;
|
|
41
54
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
const isEnabled = step.isEnabled !== false;
|
|
56
|
+
let total = 0;
|
|
57
|
+
if (isEnabled || step.type !== workflow_enum_1.WorkflowStepType.FILTER) {
|
|
58
|
+
visiting.add(stepId);
|
|
59
|
+
const downstream = Math.max(0, ...(candidatesByStepId.get(stepId) ?? []).map((toStepId) => toStepId === null ? 0 : costFrom(toStepId)));
|
|
60
|
+
visiting.delete(stepId);
|
|
61
|
+
total = (isEnabled ? exports.WORKFLOW_STEP_CREDIT_COST[step.type] : 0) + downstream;
|
|
62
|
+
}
|
|
49
63
|
memo.set(stepId, total);
|
|
50
64
|
return total;
|
|
51
65
|
};
|
|
52
|
-
return
|
|
66
|
+
return costFrom(entryConnection.toStepId);
|
|
53
67
|
};
|
|
54
68
|
exports.computeWorkflowMaxCreditCost = computeWorkflowMaxCreditCost;
|
|
55
69
|
//# sourceMappingURL=workflow-credit.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-credit.utils.js","sourceRoot":"","sources":["../../src/utils/workflow-credit.utils.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAMlD,QAAA,yBAAyB,GAA+C,MAAM,CAAC,MAAM,CAAC;IACjG,CAAC,gCAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,CAAC,gCAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,CAAC,gCAAgB,CAAC,KAAK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AAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACxB,KAAK,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,iCAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;QAC9E,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC,CAAC;AA7DW,QAAA,4BAA4B,gCA6DvC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IProject, IWorkflow, IWorkflowTrigger, IWorkflowStep, IWorkflowStepExecution, IWorkflowStepConnection, IWorkflowExecution,
|
|
1
|
+
import type { IProject, IWorkflow, IWorkflowTrigger, IWorkflowStep, IWorkflowStepExecution, IWorkflowStepConnection, IWorkflowExecution, IDomainVerification, ISecret, WorkflowTriggerDataMap } from '../types';
|
|
2
2
|
export declare enum ExpressionMode {
|
|
3
3
|
EXPRESSION = "EXPRESSION",
|
|
4
4
|
TEMPLATE = "TEMPLATE",
|
|
@@ -7,11 +7,10 @@ export declare enum ExpressionMode {
|
|
|
7
7
|
export declare enum DataSourceType {
|
|
8
8
|
WORKFLOW_TRIGGER = "trigger",
|
|
9
9
|
WORKFLOW_TRIGGERS = "triggers",
|
|
10
|
-
IP_ADDRESSES = "ipAddresses",
|
|
11
10
|
DOMAINS = "domains",
|
|
12
11
|
APPLICATIONS = "applications",
|
|
13
12
|
SECRETS = "secrets",
|
|
14
|
-
|
|
13
|
+
ENTRIES = "entries",
|
|
15
14
|
PROJECT = "project",
|
|
16
15
|
ORGANIZATION = "organization",
|
|
17
16
|
WORKFLOW = "workflow",
|
|
@@ -41,14 +40,13 @@ export interface WorkflowContext {
|
|
|
41
40
|
[DataSourceType.WORKFLOW_TRIGGERS]: Record<string, IWorkflowTrigger>;
|
|
42
41
|
[DataSourceType.STEP_EXECUTIONS]: Record<string, IWorkflowStepExecution>;
|
|
43
42
|
[DataSourceType.STEPS]: Record<string, IWorkflowStep>;
|
|
44
|
-
[DataSourceType.IP_ADDRESSES]: Record<string, IIpAddress>;
|
|
45
43
|
[DataSourceType.DOMAINS]: Record<string, IDomainVerification>;
|
|
46
44
|
[DataSourceType.APPLICATIONS]: Record<string, {
|
|
47
45
|
id: string;
|
|
48
46
|
name: string;
|
|
49
47
|
}>;
|
|
50
48
|
[DataSourceType.SECRETS]: Record<string, Pick<ISecret, 'id' | 'key' | 'name'>>;
|
|
51
|
-
[DataSourceType.
|
|
49
|
+
[DataSourceType.ENTRIES]: Record<string, string>;
|
|
52
50
|
[DataSourceType.CONNECTIONS]: Record<string, IWorkflowStepConnection>;
|
|
53
51
|
[DataSourceType.ABYSS]: Record<string, {
|
|
54
52
|
api: string;
|
|
@@ -11,11 +11,10 @@ var DataSourceType;
|
|
|
11
11
|
(function (DataSourceType) {
|
|
12
12
|
DataSourceType["WORKFLOW_TRIGGER"] = "trigger";
|
|
13
13
|
DataSourceType["WORKFLOW_TRIGGERS"] = "triggers";
|
|
14
|
-
DataSourceType["IP_ADDRESSES"] = "ipAddresses";
|
|
15
14
|
DataSourceType["DOMAINS"] = "domains";
|
|
16
15
|
DataSourceType["APPLICATIONS"] = "applications";
|
|
17
16
|
DataSourceType["SECRETS"] = "secrets";
|
|
18
|
-
DataSourceType["
|
|
17
|
+
DataSourceType["ENTRIES"] = "entries";
|
|
19
18
|
DataSourceType["PROJECT"] = "project";
|
|
20
19
|
DataSourceType["ORGANIZATION"] = "organization";
|
|
21
20
|
DataSourceType["WORKFLOW"] = "workflow";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workflow-expressions/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workflow-expressions/types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,cAOX;AAPD,WAAY,cAAc;IAExB,2CAAyB,CAAA;IAEzB,uCAAqB,CAAA;IAErB,+BAAa,CAAA;AACf,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAKD,IAAY,cAgBX;AAhBD,WAAY,cAAc;IACxB,8CAA4B,CAAA;IAC5B,gDAA8B,CAAA;IAC9B,qCAAmB,CAAA;IACnB,+CAA6B,CAAA;IAC7B,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,+CAA6B,CAAA;IAC7B,uCAAqB,CAAA;IACrB,2DAAyC,CAAA;IACzC,oDAAkC,CAAA;IAClC,iCAAe,CAAA;IACf,6CAA2B,CAAA;IAC3B,iCAAe,CAAA;IACf,qCAAmB,CAAA;AACrB,CAAC,EAhBW,cAAc,8BAAd,cAAc,QAgBzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ICreateIpAddressParams, ICreateIpAddressBody, IListIpAddressParams, IGetIpAddressParams, IUpdateIpAddressParams, IUpdateIpAddressBody, IDeleteIpAddressParams, ICreateIpAddressResponse, IListIpAddressResponse, IGetIpAddressResponse, IUpdateIpAddressResponse, IDeleteIpAddressResponse } from '../types';
|
|
2
|
-
export declare const createIpAddress: (params: ICreateIpAddressParams, body: ICreateIpAddressBody) => Promise<ICreateIpAddressResponse>;
|
|
3
|
-
export declare const listIpAddress: (params: IListIpAddressParams) => Promise<IListIpAddressResponse>;
|
|
4
|
-
export declare const getIpAddress: (params: IGetIpAddressParams) => Promise<IGetIpAddressResponse>;
|
|
5
|
-
export declare const updateIpAddress: (params: IUpdateIpAddressParams, body: IUpdateIpAddressBody) => Promise<IUpdateIpAddressResponse>;
|
|
6
|
-
export declare const deleteIpAddress: (params: IDeleteIpAddressParams) => Promise<IDeleteIpAddressResponse>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteIpAddress = exports.updateIpAddress = exports.getIpAddress = exports.listIpAddress = exports.createIpAddress = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const createIpAddress = async (params, body) => {
|
|
6
|
-
const response = await __1.AbyssConsoleCore.axios.post(`/ip-address/${params.projectId}`, body);
|
|
7
|
-
return response.data;
|
|
8
|
-
};
|
|
9
|
-
exports.createIpAddress = createIpAddress;
|
|
10
|
-
const listIpAddress = async (params) => {
|
|
11
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/ip-address/${params.projectId}`);
|
|
12
|
-
return response.data;
|
|
13
|
-
};
|
|
14
|
-
exports.listIpAddress = listIpAddress;
|
|
15
|
-
const getIpAddress = async (params) => {
|
|
16
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/ip-address/${params.projectId}/${params.ipAddressId}`);
|
|
17
|
-
return response.data;
|
|
18
|
-
};
|
|
19
|
-
exports.getIpAddress = getIpAddress;
|
|
20
|
-
const updateIpAddress = async (params, body) => {
|
|
21
|
-
const response = await __1.AbyssConsoleCore.axios.put(`/ip-address/${params.projectId}/${params.ipAddressId}`, body);
|
|
22
|
-
return response.data;
|
|
23
|
-
};
|
|
24
|
-
exports.updateIpAddress = updateIpAddress;
|
|
25
|
-
const deleteIpAddress = async (params) => {
|
|
26
|
-
const response = await __1.AbyssConsoleCore.axios.delete(`/ip-address/${params.projectId}/${params.ipAddressId}`);
|
|
27
|
-
return response.data;
|
|
28
|
-
};
|
|
29
|
-
exports.deleteIpAddress = deleteIpAddress;
|
|
30
|
-
//# sourceMappingURL=ip-address.api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ip-address.api.js","sourceRoot":"","sources":["../../src/api/ip-address.api.ts"],"names":[],"mappings":";;;AAAA,0BAAsC;AAkB/B,MAAM,eAAe,GAAG,KAAK,EAClC,MAA8B,EAC9B,IAA0B,EACS,EAAE;IACrC,MAAM,QAAQ,GAAG,MAAM,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AAPW,QAAA,eAAe,mBAO1B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ICreateVariableAccessParams, ICreateVariableAccessBody, IPaginateVariableAccessParams, IPaginateVariableAccessQuery, IGetVariableAccessParams, IUpdateVariableAccessParams, IUpdateVariableAccessBody, IDeleteVariableAccessParams, IRegenerateTokenVariableAccessParams, IGetVariablePublicParams, IPaginateLogVariableAccessParams, IPaginateLogVariableAccessQuery, ICreateVariableAccessResponse, IPaginateVariableAccessResponse, IGetVariableAccessResponse, IUpdateVariableAccessResponse, IDeleteVariableAccessResponse, IRegenerateTokenVariableAccessResponse, IGetVariablePublicResponse, IPaginateLogVariableAccessResponse } from '../types';
|
|
2
|
-
export declare const createVariableAccess: (params: ICreateVariableAccessParams, body: ICreateVariableAccessBody) => Promise<ICreateVariableAccessResponse>;
|
|
3
|
-
export declare const paginateVariableAccess: (params: IPaginateVariableAccessParams, query: IPaginateVariableAccessQuery) => Promise<IPaginateVariableAccessResponse>;
|
|
4
|
-
export declare const getVariableAccess: (params: IGetVariableAccessParams) => Promise<IGetVariableAccessResponse>;
|
|
5
|
-
export declare const updateVariableAccess: (params: IUpdateVariableAccessParams, body: IUpdateVariableAccessBody) => Promise<IUpdateVariableAccessResponse>;
|
|
6
|
-
export declare const deleteVariableAccess: (params: IDeleteVariableAccessParams) => Promise<IDeleteVariableAccessResponse>;
|
|
7
|
-
export declare const regenerateVariableAccessToken: (params: IRegenerateTokenVariableAccessParams) => Promise<IRegenerateTokenVariableAccessResponse>;
|
|
8
|
-
export declare const getPublicVariables: (params: IGetVariablePublicParams) => Promise<IGetVariablePublicResponse>;
|
|
9
|
-
export declare const paginateVariableAccessLogs: (params: IPaginateLogVariableAccessParams, query: IPaginateLogVariableAccessQuery) => Promise<IPaginateLogVariableAccessResponse>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateVariableAccessLogs = exports.getPublicVariables = exports.regenerateVariableAccessToken = exports.deleteVariableAccess = exports.updateVariableAccess = exports.getVariableAccess = exports.paginateVariableAccess = exports.createVariableAccess = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const createVariableAccess = async (params, body) => {
|
|
6
|
-
const response = await __1.AbyssConsoleCore.axios.post(`/variable-access/${params.projectId}`, body);
|
|
7
|
-
return response.data;
|
|
8
|
-
};
|
|
9
|
-
exports.createVariableAccess = createVariableAccess;
|
|
10
|
-
const paginateVariableAccess = async (params, query) => {
|
|
11
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/variable-access/${params.projectId}/paginate`, { params: query });
|
|
12
|
-
return response.data;
|
|
13
|
-
};
|
|
14
|
-
exports.paginateVariableAccess = paginateVariableAccess;
|
|
15
|
-
const getVariableAccess = async (params) => {
|
|
16
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/variable-access/${params.projectId}/${params.variableAccessId}`);
|
|
17
|
-
return response.data;
|
|
18
|
-
};
|
|
19
|
-
exports.getVariableAccess = getVariableAccess;
|
|
20
|
-
const updateVariableAccess = async (params, body) => {
|
|
21
|
-
const response = await __1.AbyssConsoleCore.axios.put(`/variable-access/${params.projectId}/${params.variableAccessId}`, body);
|
|
22
|
-
return response.data;
|
|
23
|
-
};
|
|
24
|
-
exports.updateVariableAccess = updateVariableAccess;
|
|
25
|
-
const deleteVariableAccess = async (params) => {
|
|
26
|
-
const response = await __1.AbyssConsoleCore.axios.delete(`/variable-access/${params.projectId}/${params.variableAccessId}`);
|
|
27
|
-
return response.data;
|
|
28
|
-
};
|
|
29
|
-
exports.deleteVariableAccess = deleteVariableAccess;
|
|
30
|
-
const regenerateVariableAccessToken = async (params) => {
|
|
31
|
-
const response = await __1.AbyssConsoleCore.axios.post(`/variable-access/${params.projectId}/${params.variableAccessId}/regenerate-token`);
|
|
32
|
-
return response.data;
|
|
33
|
-
};
|
|
34
|
-
exports.regenerateVariableAccessToken = regenerateVariableAccessToken;
|
|
35
|
-
const getPublicVariables = async (params) => {
|
|
36
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/public/variables/${params.token}`);
|
|
37
|
-
return response.data;
|
|
38
|
-
};
|
|
39
|
-
exports.getPublicVariables = getPublicVariables;
|
|
40
|
-
const paginateVariableAccessLogs = async (params, query) => {
|
|
41
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/variable-access/${params.projectId}/logs/paginate`, { params: query });
|
|
42
|
-
return response.data;
|
|
43
|
-
};
|
|
44
|
-
exports.paginateVariableAccessLogs = paginateVariableAccessLogs;
|
|
45
|
-
//# sourceMappingURL=variable-access.api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variable-access.api.js","sourceRoot":"","sources":["../../src/api/variable-access.api.ts"],"names":[],"mappings":";;;AAAA,0BAAsC;AA0B/B,MAAM,oBAAoB,GAAG,KAAK,EACvC,MAAmC,EACnC,IAA+B,EACS,EAAE;IAC1C,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,IAAI,CAChD,oBAAoB,MAAM,CAAC,SAAS,EAAE,EACtC,IAAI,CACL,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AATW,QAAA,oBAAoB,wBAS/B;AAEK,MAAM,sBAAsB,GAAG,KAAK,EACzC,MAAqC,EACrC,KAAmC,EACO,EAAE;IAC5C,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,GAAG,CAC/C,oBAAoB,MAAM,CAAC,SAAS,WAAW,EAC/C,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AATW,QAAA,sBAAsB,0BASjC;AAEK,MAAM,iBAAiB,GAAG,KAAK,EACpC,MAAgC,EACK,EAAE;IACvC,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,GAAG,CAC/C,oBAAo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CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B;AAEK,MAAM,0BAA0B,GAAG,KAAK,EAC7C,MAAwC,EACxC,KAAsC,EACO,EAAE;IAC/C,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,GAAG,CAC/C,oBAAoB,MAAM,CAAC,SAAS,gBAAgB,EACpD,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AATW,QAAA,0BAA0B,8BASrC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPublicVariables = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const getPublicVariables = async (params) => {
|
|
6
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/public/variables/${params.token}`);
|
|
7
|
-
return response.data;
|
|
8
|
-
};
|
|
9
|
-
exports.getPublicVariables = getPublicVariables;
|
|
10
|
-
//# sourceMappingURL=variable-public.api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variable-public.api.js","sourceRoot":"","sources":["../../src/api/variable-public.api.ts"],"names":[],"mappings":";;;AAAA,0BAAsC;AAG/B,MAAM,kBAAkB,GAAG,KAAK,EACrC,MAAgC,EACK,EAAE;IACvC,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,GAAG,CAC/C,qBAAqB,MAAM,CAAC,KAAK,EAAE,CACpC,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ICreateVariableParams, ICreateVariableBody, IListVariableParams, IPaginateVariableParams, IPaginateVariableQuery, IGetVariableParams, IUpdateVariableParams, IUpdateVariableBody, IDeleteVariableParams, ICreateVariableResponse, IListVariableResponse, IPaginateVariableResponse, IGetVariableResponse, IUpdateVariableResponse, IDeleteVariableResponse } from '../types';
|
|
2
|
-
export declare const createVariable: (params: ICreateVariableParams, body: ICreateVariableBody) => Promise<ICreateVariableResponse>;
|
|
3
|
-
export declare const listVariables: (params: IListVariableParams) => Promise<IListVariableResponse>;
|
|
4
|
-
export declare const paginateVariables: (params: IPaginateVariableParams, query: IPaginateVariableQuery) => Promise<IPaginateVariableResponse>;
|
|
5
|
-
export declare const getVariable: (params: IGetVariableParams) => Promise<IGetVariableResponse>;
|
|
6
|
-
export declare const updateVariable: (params: IUpdateVariableParams, body: IUpdateVariableBody) => Promise<IUpdateVariableResponse>;
|
|
7
|
-
export declare const deleteVariable: (params: IDeleteVariableParams) => Promise<IDeleteVariableResponse>;
|
package/dist/api/variable.api.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteVariable = exports.updateVariable = exports.getVariable = exports.paginateVariables = exports.listVariables = exports.createVariable = void 0;
|
|
4
|
-
const __1 = require("..");
|
|
5
|
-
const createVariable = async (params, body) => {
|
|
6
|
-
const response = await __1.AbyssConsoleCore.axios.post(`/variable/${params.projectId}`, body);
|
|
7
|
-
return response.data;
|
|
8
|
-
};
|
|
9
|
-
exports.createVariable = createVariable;
|
|
10
|
-
const listVariables = async (params) => {
|
|
11
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/variable/${params.projectId}`);
|
|
12
|
-
return response.data;
|
|
13
|
-
};
|
|
14
|
-
exports.listVariables = listVariables;
|
|
15
|
-
const paginateVariables = async (params, query) => {
|
|
16
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/variable/${params.projectId}/paginate`, { params: query });
|
|
17
|
-
return response.data;
|
|
18
|
-
};
|
|
19
|
-
exports.paginateVariables = paginateVariables;
|
|
20
|
-
const getVariable = async (params) => {
|
|
21
|
-
const response = await __1.AbyssConsoleCore.axios.get(`/variable/${params.projectId}/${params.variableId}`);
|
|
22
|
-
return response.data;
|
|
23
|
-
};
|
|
24
|
-
exports.getVariable = getVariable;
|
|
25
|
-
const updateVariable = async (params, body) => {
|
|
26
|
-
const response = await __1.AbyssConsoleCore.axios.put(`/variable/${params.projectId}/${params.variableId}`, body);
|
|
27
|
-
return response.data;
|
|
28
|
-
};
|
|
29
|
-
exports.updateVariable = updateVariable;
|
|
30
|
-
const deleteVariable = async (params) => {
|
|
31
|
-
const response = await __1.AbyssConsoleCore.axios.delete(`/variable/${params.projectId}/${params.variableId}`);
|
|
32
|
-
return response.data;
|
|
33
|
-
};
|
|
34
|
-
exports.deleteVariable = deleteVariable;
|
|
35
|
-
//# sourceMappingURL=variable.api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"variable.api.js","sourceRoot":"","sources":["../../src/api/variable.api.ts"],"names":[],"mappings":";;;AAAA,0BAAsC;AAqB/B,MAAM,cAAc,GAAG,KAAK,EACjC,MAA6B,EAC7B,IAAyB,EACS,EAAE;IACpC,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,IAAI,CAChD,aAAa,MAAM,CAAC,SAAS,EAAE,EAC/B,IAAI,CACL,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB;AAEK,MAAM,aAAa,GAAG,KAAK,EAChC,MAA2B,EACK,EAAE;IAClC,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,KAAK,CAAC,GAAG,CAC/C,aAAa,MAAM,CAAC,SAAS,EAAE,CAChC,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AAEK,MAAM,iBAAiB,GAAG,KAAK,EACpC,MAA+B,EAC/B,KAA6B,EACO,EAAE;IACtC,MAAM,QAAQ,GAAG,MAAM,oBAAgB,CAAC,K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