@abyss-project/reflex 3.0.0 → 4.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.
Files changed (107) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +1 -1
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/service-configuration.api.d.ts +2 -0
  5. package/dist/api/service-configuration.api.js +7 -0
  6. package/dist/api/service-configuration.api.js.map +1 -0
  7. package/dist/index.d.ts +3 -6
  8. package/dist/index.js +3 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/types/enum/configuration-read-as.enum.d.ts +4 -0
  11. package/dist/types/enum/configuration-read-as.enum.js +9 -0
  12. package/dist/types/enum/configuration-read-as.enum.js.map +1 -0
  13. package/dist/types/enum/index.d.ts +3 -1
  14. package/dist/types/enum/index.js +3 -1
  15. package/dist/types/enum/index.js.map +1 -1
  16. package/dist/types/enum/vault-value-source.enum.d.ts +6 -0
  17. package/dist/types/enum/vault-value-source.enum.js +11 -0
  18. package/dist/types/enum/vault-value-source.enum.js.map +1 -0
  19. package/dist/types/enum/vault-visibility.enum.d.ts +4 -0
  20. package/dist/types/enum/vault-visibility.enum.js +9 -0
  21. package/dist/types/enum/vault-visibility.enum.js.map +1 -0
  22. package/dist/types/interface/api/requests/index.d.ts +1 -1
  23. package/dist/types/interface/api/requests/index.js +1 -1
  24. package/dist/types/interface/api/requests/index.js.map +1 -1
  25. package/dist/types/interface/api/requests/service-configuration.request.d.ts +4 -0
  26. package/dist/types/interface/api/requests/{service-variable.request.js → service-configuration.request.js} +1 -1
  27. package/dist/types/interface/api/requests/service-configuration.request.js.map +1 -0
  28. package/dist/types/interface/api/responses/index.d.ts +1 -1
  29. package/dist/types/interface/api/responses/index.js +1 -1
  30. package/dist/types/interface/api/responses/index.js.map +1 -1
  31. package/dist/types/interface/api/responses/service-configuration.response.d.ts +6 -0
  32. package/dist/types/interface/api/responses/{service-variable.response.js → service-configuration.response.js} +1 -1
  33. package/dist/types/interface/api/responses/service-configuration.response.js.map +1 -0
  34. package/dist/types/interface/models/index.d.ts +1 -1
  35. package/dist/types/interface/models/index.js +1 -1
  36. package/dist/types/interface/models/index.js.map +1 -1
  37. package/dist/types/interface/models/reflex-service-configuration.model.d.ts +9 -0
  38. package/dist/types/interface/models/{reflex-service-variable.model.js → reflex-service-configuration.model.js} +1 -1
  39. package/dist/types/interface/models/reflex-service-configuration.model.js.map +1 -0
  40. package/dist/types/interface/models/reflex-service.model.d.ts +0 -2
  41. package/dist/types/interface/models/reflex-service.model.js +0 -2
  42. package/dist/types/interface/models/reflex-service.model.js.map +1 -1
  43. package/package.json +1 -1
  44. package/src/api/function-run.api.ts +38 -38
  45. package/src/api/function-version.api.ts +48 -48
  46. package/src/api/function.api.test.ts +249 -249
  47. package/src/api/index.ts +1 -1
  48. package/src/api/service-configuration.api.ts +16 -0
  49. package/src/api/service-deployment.api.ts +79 -79
  50. package/src/api/service-route.api.ts +72 -72
  51. package/src/api/service-version.api.ts +39 -39
  52. package/src/api/service.api.test.ts +209 -234
  53. package/src/api/service.api.ts +55 -55
  54. package/src/index.ts +190 -196
  55. package/src/types/enum/configuration-read-as.enum.ts +5 -0
  56. package/src/types/enum/execution-mode.enum.ts +9 -9
  57. package/src/types/enum/index.ts +3 -1
  58. package/src/types/enum/reflex-error-code.enum.ts +25 -25
  59. package/src/types/enum/route-method.enum.ts +9 -9
  60. package/src/types/enum/service-deployment-action.enum.ts +11 -11
  61. package/src/types/enum/service-deployment-status.enum.ts +5 -5
  62. package/src/types/enum/service-type.enum.ts +7 -7
  63. package/src/types/enum/service-version-change-kind.enum.ts +6 -6
  64. package/src/types/enum/trigger-access-mode.enum.ts +12 -12
  65. package/src/types/enum/vault-value-source.enum.ts +12 -0
  66. package/src/types/enum/vault-visibility.enum.ts +5 -0
  67. package/src/types/interface/api/requests/function-run.request.ts +26 -26
  68. package/src/types/interface/api/requests/function-version.request.ts +20 -20
  69. package/src/types/interface/api/requests/function.request.ts +36 -36
  70. package/src/types/interface/api/requests/index.ts +1 -1
  71. package/src/types/interface/api/requests/service-configuration.request.ts +4 -0
  72. package/src/types/interface/api/requests/service-deployment.request.ts +49 -49
  73. package/src/types/interface/api/requests/service-route.request.ts +44 -44
  74. package/src/types/interface/api/requests/service-version.request.ts +19 -19
  75. package/src/types/interface/api/requests/service.request.ts +39 -39
  76. package/src/types/interface/api/responses/function-version.response.ts +31 -31
  77. package/src/types/interface/api/responses/index.ts +1 -1
  78. package/src/types/interface/api/responses/service-configuration.response.ts +8 -0
  79. package/src/types/interface/api/responses/service-deployment.response.ts +32 -32
  80. package/src/types/interface/api/responses/service-route.response.ts +31 -31
  81. package/src/types/interface/api/responses/service-version.response.ts +33 -33
  82. package/src/types/interface/api/responses/service.response.ts +31 -31
  83. package/src/types/interface/models/index.ts +1 -1
  84. package/src/types/interface/models/reflex-function.model.ts +16 -16
  85. package/src/types/interface/models/reflex-route.model.ts +19 -19
  86. package/src/types/interface/models/reflex-run.model.ts +164 -164
  87. package/src/types/interface/models/reflex-service-configuration.model.ts +22 -0
  88. package/src/types/interface/models/reflex-service-deployment.model.ts +29 -29
  89. package/src/types/interface/models/reflex-service-version.model.ts +43 -43
  90. package/src/types/interface/models/reflex-service.model.ts +43 -46
  91. package/dist/api/service-variable.api.d.ts +0 -5
  92. package/dist/api/service-variable.api.js +0 -16
  93. package/dist/api/service-variable.api.js.map +0 -1
  94. package/dist/types/enum/secret-source.enum.d.ts +0 -5
  95. package/dist/types/enum/secret-source.enum.js +0 -10
  96. package/dist/types/enum/secret-source.enum.js.map +0 -1
  97. package/dist/types/interface/api/requests/service-variable.request.d.ts +0 -23
  98. package/dist/types/interface/api/requests/service-variable.request.js.map +0 -1
  99. package/dist/types/interface/api/responses/service-variable.response.d.ts +0 -22
  100. package/dist/types/interface/api/responses/service-variable.response.js.map +0 -1
  101. package/dist/types/interface/models/reflex-service-variable.model.d.ts +0 -10
  102. package/dist/types/interface/models/reflex-service-variable.model.js.map +0 -1
  103. package/src/api/service-variable.api.ts +0 -58
  104. package/src/types/enum/secret-source.enum.ts +0 -9
  105. package/src/types/interface/api/requests/service-variable.request.ts +0 -29
  106. package/src/types/interface/api/responses/service-variable.response.ts +0 -31
  107. package/src/types/interface/models/reflex-service-variable.model.ts +0 -16
@@ -9,4 +9,4 @@ export * from './service.api';
9
9
  export * from './service-route.api';
10
10
  export * from './service-version.api';
11
11
  export * from './service-deployment.api';
12
- export * from './service-variable.api';
12
+ export * from './service-configuration.api';
package/dist/api/index.js CHANGED
@@ -25,5 +25,5 @@ __exportStar(require("./service.api"), exports);
25
25
  __exportStar(require("./service-route.api"), exports);
26
26
  __exportStar(require("./service-version.api"), exports);
27
27
  __exportStar(require("./service-deployment.api"), exports);
28
- __exportStar(require("./service-variable.api"), exports);
28
+ __exportStar(require("./service-configuration.api"), exports);
29
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC;AACvC,qDAAmC;AACnC,0DAAwC;AACxC,gDAA8B;AAC9B,sDAAoC;AACpC,wDAAsC;AACtC,2DAAyC;AACzC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,iDAA+B;AAC/B,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC;AACvC,qDAAmC;AACnC,0DAAwC;AACxC,gDAA8B;AAC9B,sDAAoC;AACpC,wDAAsC;AACtC,2DAAyC;AACzC,8DAA4C"}
@@ -0,0 +1,2 @@
1
+ import type { IListServiceConfigurationParams, IListServiceConfigurationResponse } from '../types';
2
+ export declare const listServiceConfiguration: (params: IListServiceConfigurationParams) => Promise<IListServiceConfigurationResponse>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listServiceConfiguration = void 0;
4
+ const __1 = require("..");
5
+ const listServiceConfiguration = async (params) => (await __1.AbyssReflexCore.axios.get(`api/service/${params.applicationId}/${params.serviceId}/configuration`)).data;
6
+ exports.listServiceConfiguration = listServiceConfiguration;
7
+ //# sourceMappingURL=service-configuration.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-configuration.api.js","sourceRoot":"","sources":["../../src/api/service-configuration.api.ts"],"names":[],"mappings":";;;AAAA,0BAAqC;AAQ9B,MAAM,wBAAwB,GAAG,KAAK,EAC3C,MAAuC,EACK,EAAE,CAC9C,CACE,MAAM,mBAAe,CAAC,KAAK,CAAC,GAAG,CAC7B,eAAe,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,SAAS,gBAAgB,CACxE,CACF,CAAC,IAAI,CAAC;AAPI,QAAA,wBAAwB,4BAO5B"}
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import * as serviceApi from './api/service.api';
9
9
  import * as serviceRouteApi from './api/service-route.api';
10
10
  import * as serviceVersionApi from './api/service-version.api';
11
11
  import * as serviceDeploymentApi from './api/service-deployment.api';
12
- import * as serviceVariableApi from './api/service-variable.api';
12
+ import * as serviceConfigurationApi from './api/service-configuration.api';
13
13
  export * from './api';
14
14
  export * from './types';
15
15
  type CoreConfig = {
@@ -75,12 +75,9 @@ type AbyssReflexCoreSDK = {
75
75
  pause: typeof serviceDeploymentApi.pauseService;
76
76
  resume: typeof serviceDeploymentApi.resumeService;
77
77
  };
78
- variable: {
79
- list: typeof serviceVariableApi.listServiceVariable;
80
- set: typeof serviceVariableApi.setServiceVariable;
81
- delete: typeof serviceVariableApi.deleteServiceVariable;
78
+ configuration: {
79
+ list: typeof serviceConfigurationApi.listServiceConfiguration;
82
80
  };
83
- secretStatus: typeof serviceVariableApi.getServiceSecretStatus;
84
81
  };
85
82
  };
86
83
  export declare class AbyssReflexCore {
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ const serviceApi = __importStar(require("./api/service.api"));
52
52
  const serviceRouteApi = __importStar(require("./api/service-route.api"));
53
53
  const serviceVersionApi = __importStar(require("./api/service-version.api"));
54
54
  const serviceDeploymentApi = __importStar(require("./api/service-deployment.api"));
55
- const serviceVariableApi = __importStar(require("./api/service-variable.api"));
55
+ const serviceConfigurationApi = __importStar(require("./api/service-configuration.api"));
56
56
  __exportStar(require("./api"), exports);
57
57
  __exportStar(require("./types"), exports);
58
58
  const DEFAULT_BASE_URL = 'https://reflex-api.abyss-project.fr/';
@@ -118,12 +118,9 @@ class AbyssReflexCore {
118
118
  pause: serviceDeploymentApi.pauseService,
119
119
  resume: serviceDeploymentApi.resumeService,
120
120
  },
121
- variable: {
122
- list: serviceVariableApi.listServiceVariable,
123
- set: serviceVariableApi.setServiceVariable,
124
- delete: serviceVariableApi.deleteServiceVariable,
121
+ configuration: {
122
+ list: serviceConfigurationApi.listServiceConfiguration,
125
123
  },
126
- secretStatus: serviceVariableApi.getServiceSecretStatus,
127
124
  },
128
125
  };
129
126
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4DAA8C;AAC9C,gEAAkD;AAClD,6EAA+D;AAC/D,yEAA2D;AAC3D,+EAAiE;AACjE,uEAAyD;AACzD,iFAAmE;AACnE,8DAAgD;AAChD,yEAA2D;AAC3D,6EAA+D;AAC/D,mFAAqE;AACrE,+EAAiE;AAEjE,wCAAsB;AACtB,0CAAwB;AAExB,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;AA8EhE,MAAa,eAAe;IAUnB,MAAM,KAAK,GAAG;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;YAC1B,eAAe,CAAC,IAAI,GAAG;gBACrB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@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigurationReadAs = void 0;
4
+ var ConfigurationReadAs;
5
+ (function (ConfigurationReadAs) {
6
+ ConfigurationReadAs["CONFIG"] = "config";
7
+ ConfigurationReadAs["SECRETS"] = "secrets";
8
+ })(ConfigurationReadAs || (exports.ConfigurationReadAs = ConfigurationReadAs = {}));
9
+ //# sourceMappingURL=configuration-read-as.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration-read-as.enum.js","sourceRoot":"","sources":["../../../src/types/enum/configuration-read-as.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;AACrB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"}
@@ -15,5 +15,7 @@ export * from './service-type.enum';
15
15
  export * from './route-method.enum';
16
16
  export * from './service-deployment-action.enum';
17
17
  export * from './service-deployment-status.enum';
18
- export * from './secret-source.enum';
18
+ export * from './vault-value-source.enum';
19
+ export * from './vault-visibility.enum';
20
+ export * from './configuration-read-as.enum';
19
21
  export * from './service-version-change-kind.enum';
@@ -31,6 +31,8 @@ __exportStar(require("./service-type.enum"), exports);
31
31
  __exportStar(require("./route-method.enum"), exports);
32
32
  __exportStar(require("./service-deployment-action.enum"), exports);
33
33
  __exportStar(require("./service-deployment-status.enum"), exports);
34
- __exportStar(require("./secret-source.enum"), exports);
34
+ __exportStar(require("./vault-value-source.enum"), exports);
35
+ __exportStar(require("./vault-visibility.enum"), exports);
36
+ __exportStar(require("./configuration-read-as.enum"), exports);
35
37
  __exportStar(require("./service-version-change-kind.enum"), exports);
36
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,kDAAgC;AAChC,oDAAkC;AAClC,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,2DAAyC;AACzC,wDAAsC;AACtC,mEAAiD;AACjD,yDAAuC;AACvC,uDAAqC;AACrC,sDAAoC;AACpC,sDAAoC;AACpC,mEAAiD;AACjD,mEAAiD;AACjD,uDAAqC;AACrC,qEAAmD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/enum/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,kDAAgC;AAChC,oDAAkC;AAClC,2DAAyC;AACzC,2DAAyC;AACzC,qDAAmC;AACnC,2DAAyC;AACzC,wDAAsC;AACtC,mEAAiD;AACjD,yDAAuC;AACvC,uDAAqC;AACrC,sDAAoC;AACpC,sDAAoC;AACpC,mEAAiD;AACjD,mEAAiD;AACjD,4DAA0C;AAC1C,0DAAwC;AACxC,+DAA6C;AAC7C,qEAAmD"}
@@ -0,0 +1,6 @@
1
+ export declare enum VaultValueSource {
2
+ ENVIRONMENT = "ENVIRONMENT",
3
+ DEFAULT = "DEFAULT",
4
+ DEFAULT_ENVIRONMENT = "DEFAULT_ENVIRONMENT",
5
+ ABSENT = "ABSENT"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultValueSource = void 0;
4
+ var VaultValueSource;
5
+ (function (VaultValueSource) {
6
+ VaultValueSource["ENVIRONMENT"] = "ENVIRONMENT";
7
+ VaultValueSource["DEFAULT"] = "DEFAULT";
8
+ VaultValueSource["DEFAULT_ENVIRONMENT"] = "DEFAULT_ENVIRONMENT";
9
+ VaultValueSource["ABSENT"] = "ABSENT";
10
+ })(VaultValueSource || (exports.VaultValueSource = VaultValueSource = {}));
11
+ //# sourceMappingURL=vault-value-source.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-value-source.enum.js","sourceRoot":"","sources":["../../../src/types/enum/vault-value-source.enum.ts"],"names":[],"mappings":";;;AAMA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,uCAAmB,CAAA;IACnB,+DAA2C,CAAA;IAC3C,qCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B"}
@@ -0,0 +1,4 @@
1
+ export declare enum VaultVisibility {
2
+ SECRET = "SECRET",
3
+ VISIBLE = "VISIBLE"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VaultVisibility = void 0;
4
+ var VaultVisibility;
5
+ (function (VaultVisibility) {
6
+ VaultVisibility["SECRET"] = "SECRET";
7
+ VaultVisibility["VISIBLE"] = "VISIBLE";
8
+ })(VaultVisibility || (exports.VaultVisibility = VaultVisibility = {}));
9
+ //# sourceMappingURL=vault-visibility.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-visibility.enum.js","sourceRoot":"","sources":["../../../src/types/enum/vault-visibility.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;AACrB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
@@ -8,4 +8,4 @@ export * from './service.request';
8
8
  export * from './service-route.request';
9
9
  export * from './service-version.request';
10
10
  export * from './service-deployment.request';
11
- export * from './service-variable.request';
11
+ export * from './service-configuration.request';
@@ -24,5 +24,5 @@ __exportStar(require("./service.request"), exports);
24
24
  __exportStar(require("./service-route.request"), exports);
25
25
  __exportStar(require("./service-version.request"), exports);
26
26
  __exportStar(require("./service-deployment.request"), exports);
27
- __exportStar(require("./service-variable.request"), exports);
27
+ __exportStar(require("./service-configuration.request"), exports);
28
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,4DAA0C;AAC1C,0DAAwC;AACxC,6DAA2C;AAC3C,yDAAuC;AACvC,8DAA4C;AAC5C,oDAAkC;AAClC,0DAAwC;AACxC,4DAA0C;AAC1C,+DAA6C;AAC7C,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,4DAA0C;AAC1C,0DAAwC;AACxC,6DAA2C;AAC3C,yDAAuC;AACvC,8DAA4C;AAC5C,oDAAkC;AAClC,0DAAwC;AACxC,4DAA0C;AAC1C,+DAA6C;AAC7C,kEAAgD"}
@@ -0,0 +1,4 @@
1
+ export interface IListServiceConfigurationParams {
2
+ applicationId: string;
3
+ serviceId: string;
4
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=service-variable.request.js.map
3
+ //# sourceMappingURL=service-configuration.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-configuration.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/service-configuration.request.ts"],"names":[],"mappings":""}
@@ -8,4 +8,4 @@ export * from './service.response';
8
8
  export * from './service-route.response';
9
9
  export * from './service-version.response';
10
10
  export * from './service-deployment.response';
11
- export * from './service-variable.response';
11
+ export * from './service-configuration.response';
@@ -24,5 +24,5 @@ __exportStar(require("./service.response"), exports);
24
24
  __exportStar(require("./service-route.response"), exports);
25
25
  __exportStar(require("./service-version.response"), exports);
26
26
  __exportStar(require("./service-deployment.response"), exports);
27
- __exportStar(require("./service-variable.response"), exports);
27
+ __exportStar(require("./service-configuration.response"), exports);
28
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,6DAA2C;AAC3C,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,+DAA6C;AAC7C,qDAAmC;AACnC,2DAAyC;AACzC,6DAA2C;AAC3C,gEAA8C;AAC9C,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,6DAA2C;AAC3C,2DAAyC;AACzC,8DAA4C;AAC5C,0DAAwC;AACxC,+DAA6C;AAC7C,qDAAmC;AACnC,2DAAyC;AACzC,6DAA2C;AAC3C,gEAA8C;AAC9C,mEAAiD"}
@@ -0,0 +1,6 @@
1
+ import type { IReflexServiceConfigurationEntry } from '../../models';
2
+ import type { IResponse } from '../response';
3
+ export interface IListServiceConfigurationData {
4
+ configuration: IReflexServiceConfigurationEntry[];
5
+ }
6
+ export type IListServiceConfigurationResponse = IResponse<IListServiceConfigurationData>;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=service-variable.response.js.map
3
+ //# sourceMappingURL=service-configuration.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-configuration.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/service-configuration.response.ts"],"names":[],"mappings":""}
@@ -10,4 +10,4 @@ export * from './reflex-service.model';
10
10
  export * from './reflex-route.model';
11
11
  export * from './reflex-service-version.model';
12
12
  export * from './reflex-service-deployment.model';
13
- export * from './reflex-service-variable.model';
13
+ export * from './reflex-service-configuration.model';
@@ -26,5 +26,5 @@ __exportStar(require("./reflex-service.model"), exports);
26
26
  __exportStar(require("./reflex-route.model"), exports);
27
27
  __exportStar(require("./reflex-service-version.model"), exports);
28
28
  __exportStar(require("./reflex-service-deployment.model"), exports);
29
- __exportStar(require("./reflex-service-variable.model"), exports);
29
+ __exportStar(require("./reflex-service-configuration.model"), exports);
30
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,0DAAwC;AACxC,kEAAgD;AAChD,8DAA4C;AAC5C,qDAAmC;AACnC,oEAAkD;AAClD,4DAA0C;AAC1C,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,oEAAkD;AAClD,kEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,0DAAwC;AACxC,kEAAgD;AAChD,8DAA4C;AAC5C,qDAAmC;AACnC,oEAAkD;AAClD,4DAA0C;AAC1C,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,oEAAkD;AAClD,uEAAqD"}
@@ -0,0 +1,9 @@
1
+ import type { ConfigurationReadAs, VaultValueSource, VaultVisibility } from '../../enum';
2
+ export interface IReflexServiceConfigurationEntry {
3
+ key: string;
4
+ readAs: ConfigurationReadAs;
5
+ secretId: string | null;
6
+ visibility: VaultVisibility | null;
7
+ mismatch: boolean;
8
+ sources: Record<string, VaultValueSource>;
9
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=reflex-service-variable.model.js.map
3
+ //# sourceMappingURL=reflex-service-configuration.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reflex-service-configuration.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-service-configuration.model.ts"],"names":[],"mappings":""}
@@ -11,8 +11,6 @@ export declare const REFLEX_SERVICE_LIMITS: {
11
11
  readonly routePathMaxSegments: 20;
12
12
  readonly routePathMaxLength: 255;
13
13
  readonly versionMessageMaxLength: 500;
14
- readonly variableNamePattern: RegExp;
15
- readonly variableValueMaxLength: 4096;
16
14
  };
17
15
  export interface IReflexServiceCors {
18
16
  allowedOrigins: string[];
@@ -9,7 +9,5 @@ exports.REFLEX_SERVICE_LIMITS = {
9
9
  routePathMaxSegments: 20,
10
10
  routePathMaxLength: 255,
11
11
  versionMessageMaxLength: 500,
12
- variableNamePattern: /^[A-Z][A-Z0-9_]{0,63}$/,
13
- variableValueMaxLength: 4096,
14
12
  };
15
13
  //# sourceMappingURL=reflex-service.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reflex-service.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-service.model.ts"],"names":[],"mappings":";;;AAGa,QAAA,qBAAqB,GAAG;IAEnC,WAAW,EAAE,2BAA2B;IACxC,aAAa,EAAE,GAAG;IAClB,qBAAqB,EAAE,EAAE;IACzB,uBAAuB,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAE3D,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,GAAG;IACvB,uBAAuB,EAAE,GAAG;IAE5B,mBAAmB,EAAE,wBAAwB;IAC7C,sBAAsB,EAAE,IAAI;CACpB,CAAC"}
1
+ {"version":3,"file":"reflex-service.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/reflex-service.model.ts"],"names":[],"mappings":";;;AAGa,QAAA,qBAAqB,GAAG;IAEnC,WAAW,EAAE,2BAA2B;IACxC,aAAa,EAAE,GAAG;IAClB,qBAAqB,EAAE,EAAE;IACzB,uBAAuB,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAE3D,oBAAoB,EAAE,EAAE;IACxB,kBAAkB,EAAE,GAAG;IACvB,uBAAuB,EAAE,GAAG;CACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/reflex",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Core package to interact with AbyssReflex",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,38 +1,38 @@
1
- import { AbyssReflexCore } from '..';
2
- import type {
3
- IGetFunctionRunParams,
4
- IGetFunctionRunResponse,
5
- IGetFunctionRunStateParams,
6
- IGetFunctionRunStateResponse,
7
- IListFunctionRunParams,
8
- IListFunctionRunQuery,
9
- IListFunctionRunResponse,
10
- } from '../types';
11
-
12
- const runUrl = (params: { applicationId: string; functionId: string }): string =>
13
- `api/function/${params.applicationId}/${params.functionId}/run`;
14
-
15
- /** `GET .../run`: the test runs (kept: the last 10, then 7 days) and the live executions of the edge (7 days), merged, newest first, paged by `limit`/`offset`. Needs REFLEX_LOG_READ. */
16
- export const listFunctionRun = async (
17
- params: IListFunctionRunParams,
18
- query: IListFunctionRunQuery = {},
19
- ): Promise<IListFunctionRunResponse> =>
20
- (await AbyssReflexCore.axios.get<IListFunctionRunResponse>(runUrl(params), { params: query }))
21
- .data;
22
-
23
- /** `GET .../run/:runId`: one run; a live one with its measures and its steps. Needs REFLEX_LOG_READ. */
24
- export const getFunctionRun = async (
25
- params: IGetFunctionRunParams,
26
- ): Promise<IGetFunctionRunResponse> =>
27
- (await AbyssReflexCore.axios.get<IGetFunctionRunResponse>(`${runUrl(params)}/${params.runId}`))
28
- .data;
29
-
30
- /** `GET .../run/:runId/state`: the state of a live execution, the one an async route answered with. Needs REFLEX_LOG_READ. */
31
- export const getFunctionRunState = async (
32
- params: IGetFunctionRunStateParams,
33
- ): Promise<IGetFunctionRunStateResponse> =>
34
- (
35
- await AbyssReflexCore.axios.get<IGetFunctionRunStateResponse>(
36
- `${runUrl(params)}/${params.runId}/state`,
37
- )
38
- ).data;
1
+ import { AbyssReflexCore } from '..';
2
+ import type {
3
+ IGetFunctionRunParams,
4
+ IGetFunctionRunResponse,
5
+ IGetFunctionRunStateParams,
6
+ IGetFunctionRunStateResponse,
7
+ IListFunctionRunParams,
8
+ IListFunctionRunQuery,
9
+ IListFunctionRunResponse,
10
+ } from '../types';
11
+
12
+ const runUrl = (params: { applicationId: string; functionId: string }): string =>
13
+ `api/function/${params.applicationId}/${params.functionId}/run`;
14
+
15
+ /** `GET .../run`: the test runs (kept: the last 10, then 7 days) and the live executions of the edge (7 days), merged, newest first, paged by `limit`/`offset`. Needs REFLEX_LOG_READ. */
16
+ export const listFunctionRun = async (
17
+ params: IListFunctionRunParams,
18
+ query: IListFunctionRunQuery = {},
19
+ ): Promise<IListFunctionRunResponse> =>
20
+ (await AbyssReflexCore.axios.get<IListFunctionRunResponse>(runUrl(params), { params: query }))
21
+ .data;
22
+
23
+ /** `GET .../run/:runId`: one run; a live one with its measures and its steps. Needs REFLEX_LOG_READ. */
24
+ export const getFunctionRun = async (
25
+ params: IGetFunctionRunParams,
26
+ ): Promise<IGetFunctionRunResponse> =>
27
+ (await AbyssReflexCore.axios.get<IGetFunctionRunResponse>(`${runUrl(params)}/${params.runId}`))
28
+ .data;
29
+
30
+ /** `GET .../run/:runId/state`: the state of a live execution, the one an async route answered with. Needs REFLEX_LOG_READ. */
31
+ export const getFunctionRunState = async (
32
+ params: IGetFunctionRunStateParams,
33
+ ): Promise<IGetFunctionRunStateResponse> =>
34
+ (
35
+ await AbyssReflexCore.axios.get<IGetFunctionRunStateResponse>(
36
+ `${runUrl(params)}/${params.runId}/state`,
37
+ )
38
+ ).data;
@@ -1,48 +1,48 @@
1
- import { AbyssReflexCore } from '..';
2
- import type {
3
- IGetFunctionVersionParams,
4
- IGetFunctionVersionResponse,
5
- IGetFunctionVersionStepStatsParams,
6
- IGetFunctionVersionStepStatsQuery,
7
- IGetFunctionVersionStepStatsResponse,
8
- IListFunctionVersionParams,
9
- IListFunctionVersionResponse,
10
- } from '../types';
11
-
12
- const versionUrl = (params: { applicationId: string; functionId: string }): string =>
13
- `api/function/${params.applicationId}/${params.functionId}/version`;
14
-
15
- /**
16
- * `GET .../version`: the frozen versions, newest first. Needs REFLEX_READ. A version of the function's
17
- * Service publishes its draft when it changed (`service.version.create`).
18
- */
19
- export const listFunctionVersion = async (
20
- params: IListFunctionVersionParams,
21
- ): Promise<IListFunctionVersionResponse> =>
22
- (await AbyssReflexCore.axios.get<IListFunctionVersionResponse>(versionUrl(params))).data;
23
-
24
- /** `GET .../version/:versionId`. Needs REFLEX_READ. */
25
- export const getFunctionVersion = async (
26
- params: IGetFunctionVersionParams,
27
- ): Promise<IGetFunctionVersionResponse> =>
28
- (
29
- await AbyssReflexCore.axios.get<IGetFunctionVersionResponse>(
30
- `${versionUrl(params)}/${params.versionId}`,
31
- )
32
- ).data;
33
-
34
- /**
35
- * `GET .../version/:versionId/step-stats`: per step, over the retention window, the executions, the median
36
- * and p95 of duration, CPU, heap peak and cost, and the share of the cost; interrupted executions left
37
- * out. With `environmentId`, also the p99 heap peak per step of the version running there. Needs REFLEX_LOG_READ.
38
- */
39
- export const getFunctionVersionStepStats = async (
40
- params: IGetFunctionVersionStepStatsParams,
41
- query: IGetFunctionVersionStepStatsQuery = {},
42
- ): Promise<IGetFunctionVersionStepStatsResponse> =>
43
- (
44
- await AbyssReflexCore.axios.get<IGetFunctionVersionStepStatsResponse>(
45
- `${versionUrl(params)}/${params.versionId}/step-stats`,
46
- { params: query },
47
- )
48
- ).data;
1
+ import { AbyssReflexCore } from '..';
2
+ import type {
3
+ IGetFunctionVersionParams,
4
+ IGetFunctionVersionResponse,
5
+ IGetFunctionVersionStepStatsParams,
6
+ IGetFunctionVersionStepStatsQuery,
7
+ IGetFunctionVersionStepStatsResponse,
8
+ IListFunctionVersionParams,
9
+ IListFunctionVersionResponse,
10
+ } from '../types';
11
+
12
+ const versionUrl = (params: { applicationId: string; functionId: string }): string =>
13
+ `api/function/${params.applicationId}/${params.functionId}/version`;
14
+
15
+ /**
16
+ * `GET .../version`: the frozen versions, newest first. Needs REFLEX_READ. A version of the function's
17
+ * Service publishes its draft when it changed (`service.version.create`).
18
+ */
19
+ export const listFunctionVersion = async (
20
+ params: IListFunctionVersionParams,
21
+ ): Promise<IListFunctionVersionResponse> =>
22
+ (await AbyssReflexCore.axios.get<IListFunctionVersionResponse>(versionUrl(params))).data;
23
+
24
+ /** `GET .../version/:versionId`. Needs REFLEX_READ. */
25
+ export const getFunctionVersion = async (
26
+ params: IGetFunctionVersionParams,
27
+ ): Promise<IGetFunctionVersionResponse> =>
28
+ (
29
+ await AbyssReflexCore.axios.get<IGetFunctionVersionResponse>(
30
+ `${versionUrl(params)}/${params.versionId}`,
31
+ )
32
+ ).data;
33
+
34
+ /**
35
+ * `GET .../version/:versionId/step-stats`: per step, over the retention window, the executions, the median
36
+ * and p95 of duration, CPU, heap peak and cost, and the share of the cost; interrupted executions left
37
+ * out. With `environmentId`, also the p99 heap peak per step of the version running there. Needs REFLEX_LOG_READ.
38
+ */
39
+ export const getFunctionVersionStepStats = async (
40
+ params: IGetFunctionVersionStepStatsParams,
41
+ query: IGetFunctionVersionStepStatsQuery = {},
42
+ ): Promise<IGetFunctionVersionStepStatsResponse> =>
43
+ (
44
+ await AbyssReflexCore.axios.get<IGetFunctionVersionStepStatsResponse>(
45
+ `${versionUrl(params)}/${params.versionId}/step-stats`,
46
+ { params: query },
47
+ )
48
+ ).data;