@versori/run 0.2.0-alpha.1 → 0.2.0-alpha.11
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/{script/deps/jsr.io/@std/fmt/1.0.6 → esm/deps/jsr.io/@std/fmt/1.0.7}/colors.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/fs/{1.0.16 → 1.0.17}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/esm/src/context/Context.d.ts +7 -1
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/Context.js +30 -4
- package/esm/src/context/ContextProvider.d.ts +3 -1
- package/esm/src/context/ContextProvider.d.ts.map +1 -1
- package/esm/src/context/ContextProvider.js +9 -2
- package/esm/src/dsl/http/default.d.ts +2 -0
- package/esm/src/dsl/http/default.d.ts.map +1 -1
- package/esm/src/dsl/http/default.js +10 -0
- package/esm/src/dsl/http/types.d.ts +13 -2
- package/esm/src/dsl/http/types.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/activation.d.ts +13 -0
- package/esm/src/dsl/http/versori/activation.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/activation.js +65 -0
- package/esm/src/dsl/http/versori/constants.d.ts +5 -0
- package/esm/src/dsl/http/versori/constants.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/constants.js +5 -0
- package/esm/src/dsl/http/versori/contextcredentials.d.ts +10 -0
- package/esm/src/dsl/http/versori/contextcredentials.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/contextcredentials.js +1 -0
- package/esm/src/dsl/http/versori/credentials/client.d.ts +4 -4
- package/esm/src/dsl/http/versori/credentials/client.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/credentials/client.js +8 -13
- package/esm/src/dsl/http/versori/credentials/credentials.d.ts +38 -0
- package/esm/src/dsl/http/versori/credentials/credentials.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/credentials/credentials.js +7 -8
- package/esm/src/dsl/http/versori/credentials/v1alpha1/common_pb.d.ts +31 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/common_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/common_pb.js +31 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.d.ts +84 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.js +128 -0
- package/esm/src/dsl/http/versori/cronapi.d.ts +10 -0
- package/esm/src/dsl/http/versori/cronapi.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/cronapi.js +51 -0
- package/esm/src/dsl/http/versori/platformapi.d.ts +4 -1
- package/esm/src/dsl/http/versori/platformapi.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/platformapi.js +38 -6
- package/esm/src/dsl/http/versori/roundtripper.d.ts +11 -5
- package/esm/src/dsl/http/versori/roundtripper.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/roundtripper.js +168 -75
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +4 -2
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +49 -10
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts +1 -0
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/schedule.js +18 -23
- package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/esm/src/observability/logging/ConsoleLogger.js +55 -10
- package/package.json +1 -1
- package/{esm/deps/jsr.io/@std/fmt/1.0.6 → script/deps/jsr.io/@std/fmt/1.0.7}/colors.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/fs/{1.0.16 → 1.0.17}/exists.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +1 -1
- package/script/src/context/Context.d.ts +7 -1
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/Context.js +30 -4
- package/script/src/context/ContextProvider.d.ts +3 -1
- package/script/src/context/ContextProvider.d.ts.map +1 -1
- package/script/src/context/ContextProvider.js +9 -2
- package/script/src/dsl/http/default.d.ts +2 -0
- package/script/src/dsl/http/default.d.ts.map +1 -1
- package/script/src/dsl/http/default.js +10 -0
- package/script/src/dsl/http/types.d.ts +13 -2
- package/script/src/dsl/http/types.d.ts.map +1 -1
- package/script/src/dsl/http/versori/activation.d.ts +13 -0
- package/script/src/dsl/http/versori/activation.d.ts.map +1 -0
- package/script/src/dsl/http/versori/activation.js +69 -0
- package/script/src/dsl/http/versori/constants.d.ts +5 -0
- package/script/src/dsl/http/versori/constants.d.ts.map +1 -1
- package/script/src/dsl/http/versori/constants.js +6 -1
- package/script/src/dsl/http/versori/contextcredentials.d.ts +10 -0
- package/script/src/dsl/http/versori/contextcredentials.d.ts.map +1 -0
- package/script/src/dsl/http/versori/contextcredentials.js +2 -0
- package/script/src/dsl/http/versori/credentials/client.d.ts +4 -4
- package/script/src/dsl/http/versori/credentials/client.d.ts.map +1 -1
- package/script/src/dsl/http/versori/credentials/client.js +7 -10
- package/script/src/dsl/http/versori/credentials/credentials.d.ts +38 -0
- package/script/src/dsl/http/versori/credentials/credentials.d.ts.map +1 -1
- package/script/src/dsl/http/versori/credentials/credentials.js +8 -8
- package/script/src/dsl/http/versori/credentials/v1alpha1/common_pb.d.ts +31 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/common_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/common_pb.js +34 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.d.ts +84 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.js +131 -0
- package/script/src/dsl/http/versori/cronapi.d.ts +10 -0
- package/script/src/dsl/http/versori/cronapi.d.ts.map +1 -0
- package/script/src/dsl/http/versori/cronapi.js +55 -0
- package/script/src/dsl/http/versori/platformapi.d.ts +4 -1
- package/script/src/dsl/http/versori/platformapi.d.ts.map +1 -1
- package/script/src/dsl/http/versori/platformapi.js +38 -6
- package/script/src/dsl/http/versori/roundtripper.d.ts +11 -5
- package/script/src/dsl/http/versori/roundtripper.d.ts.map +1 -1
- package/script/src/dsl/http/versori/roundtripper.js +170 -77
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +4 -2
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +48 -9
- package/script/src/interpreter/memory/ObservableCompiler.d.ts +1 -0
- package/script/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/schedule.js +18 -23
- package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/script/src/observability/logging/ConsoleLogger.js +55 -10
- /package/esm/deps/jsr.io/@std/fmt/{1.0.6 → 1.0.7}/colors.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fmt/{1.0.6 → 1.0.7}/colors.js +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.16 → 1.0.17}/exists.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fs/{1.0.16 → 1.0.17}/exists.js +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.6 → 1.0.7}/colors.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.6 → 1.0.7}/colors.js +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.16 → 1.0.17}/exists.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fs/{1.0.16 → 1.0.17}/exists.js +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the file versori/credential/v1alpha1/common.proto.
|
|
3
|
+
*/
|
|
4
|
+
export const file_versori_credential_v1alpha1_common: import("@bufbuild/protobuf").DescFile;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the message versori.credential.v1alpha1.PageParams.
|
|
7
|
+
* Use `create(PageParamsSchema)` to create a new message.
|
|
8
|
+
*/
|
|
9
|
+
export const PageParamsSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message versori.credential.v1alpha1.Sort.
|
|
12
|
+
* Use `create(SortSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const SortSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
15
|
+
/**
|
|
16
|
+
* Describes the enum versori.credential.v1alpha1.Sort.Order.
|
|
17
|
+
*/
|
|
18
|
+
export const Sort_OrderSchema: import("@bufbuild/protobuf/codegenv1").GenEnum<number, import("@bufbuild/protobuf").JsonValue>;
|
|
19
|
+
/**
|
|
20
|
+
* @generated from enum versori.credential.v1alpha1.Sort.Order
|
|
21
|
+
*/
|
|
22
|
+
export const Sort_Order: {
|
|
23
|
+
[key: number]: string;
|
|
24
|
+
[k: string]: string | number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message versori.credential.v1alpha1.PageInfo.
|
|
28
|
+
* Use `create(PageInfoSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export const PageInfoSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
31
|
+
//# sourceMappingURL=common_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common_pb.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/dsl/http/versori/credentials/v1alpha1/common_pb.js"],"names":[],"mappings":"AAMA;;GAEG;AACH,4FACmjB;AAEnjB;;;GAGG;AACH,+JAC0D;AAE1D;;;GAGG;AACH,yJAC0D;AAE1D;;GAEG;AACH,8HAC0D;AAE1D;;GAEG;AACH;;;EAC2B;AAE3B;;;GAGG;AACH,6JAC0D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.2.3
|
|
2
|
+
// @generated from file versori/credential/v1alpha1/common.proto (package versori.credential.v1alpha1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv1";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file versori/credential/v1alpha1/common.proto.
|
|
7
|
+
*/
|
|
8
|
+
export const file_versori_credential_v1alpha1_common = /*@__PURE__*/ fileDesc("Cih2ZXJzb3JpL2NyZWRlbnRpYWwvdjFhbHBoYTEvY29tbW9uLnByb3RvEht2ZXJzb3JpLmNyZWRlbnRpYWwudjFhbHBoYTEiawoKUGFnZVBhcmFtcxINCgVmaXJzdBgBIAEoBRINCgVhZnRlchgCIAEoCRIOCgZiZWZvcmUYAyABKAkSLwoEc29ydBgEIAMoCzIhLnZlcnNvcmkuY3JlZGVudGlhbC52MWFscGhhMS5Tb3J0ImoKBFNvcnQSDgoGY29sdW1uGAEgASgJEjYKBW9yZGVyGAIgASgOMicudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLlNvcnQuT3JkZXIiGgoFT3JkZXISBwoDQVNDEAASCAoEREVTQxABIkkKCFBhZ2VJbmZvEhMKC3RvdGFsX2NvdW50GAEgASgDEhMKC25leHRfY3Vyc29yGAIgASgJEhMKC3ByZXZfY3Vyc29yGAMgASgJQiZaJHZlcnNvcmkuZGV2L2NyZWRlbnRpYWxzL2FwaS92MWFscGhhMWIGcHJvdG8z");
|
|
9
|
+
/**
|
|
10
|
+
* Describes the message versori.credential.v1alpha1.PageParams.
|
|
11
|
+
* Use `create(PageParamsSchema)` to create a new message.
|
|
12
|
+
*/
|
|
13
|
+
export const PageParamsSchema = /*@__PURE__*/ messageDesc(file_versori_credential_v1alpha1_common, 0);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message versori.credential.v1alpha1.Sort.
|
|
16
|
+
* Use `create(SortSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
export const SortSchema = /*@__PURE__*/ messageDesc(file_versori_credential_v1alpha1_common, 1);
|
|
19
|
+
/**
|
|
20
|
+
* Describes the enum versori.credential.v1alpha1.Sort.Order.
|
|
21
|
+
*/
|
|
22
|
+
export const Sort_OrderSchema = /*@__PURE__*/ enumDesc(file_versori_credential_v1alpha1_common, 1, 0);
|
|
23
|
+
/**
|
|
24
|
+
* @generated from enum versori.credential.v1alpha1.Sort.Order
|
|
25
|
+
*/
|
|
26
|
+
export const Sort_Order = /*@__PURE__*/ tsEnum(Sort_OrderSchema);
|
|
27
|
+
/**
|
|
28
|
+
* Describes the message versori.credential.v1alpha1.PageInfo.
|
|
29
|
+
* Use `create(PageInfoSchema)` to create a new message.
|
|
30
|
+
*/
|
|
31
|
+
export const PageInfoSchema = /*@__PURE__*/ messageDesc(file_versori_credential_v1alpha1_common, 2);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the file versori/credential/v1alpha1/credential_service.proto.
|
|
3
|
+
*/
|
|
4
|
+
export const file_versori_credential_v1alpha1_credential_service: import("@bufbuild/protobuf").DescFile;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the message versori.credential.v1alpha1.CreateCredentialRequest.
|
|
7
|
+
* Use `create(CreateCredentialRequestSchema)` to create a new message.
|
|
8
|
+
*/
|
|
9
|
+
export const CreateCredentialRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message versori.credential.v1alpha1.CreateCredentialResponse.
|
|
12
|
+
* Use `create(CreateCredentialResponseSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const CreateCredentialResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message versori.credential.v1alpha1.GetCredentialRequest.
|
|
17
|
+
* Use `create(GetCredentialRequestSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
export const GetCredentialRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message versori.credential.v1alpha1.GetCredentialResponse.
|
|
22
|
+
* Use `create(GetCredentialResponseSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const GetCredentialResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message versori.credential.v1alpha1.GetManyCredentialsRequest.
|
|
27
|
+
* Use `create(GetManyCredentialsRequestSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const GetManyCredentialsRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message versori.credential.v1alpha1.GetManyCredentialsResponse.
|
|
32
|
+
* Use `create(GetManyCredentialsResponseSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const GetManyCredentialsResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message versori.credential.v1alpha1.ListCredentialsRequest.
|
|
37
|
+
* Use `create(ListCredentialsRequestSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
export const ListCredentialsRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message versori.credential.v1alpha1.ListCredentialsResponse.
|
|
42
|
+
* Use `create(ListCredentialsResponseSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export const ListCredentialsResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
45
|
+
/**
|
|
46
|
+
* Describes the message versori.credential.v1alpha1.UpdateCredentialRequest.
|
|
47
|
+
* Use `create(UpdateCredentialRequestSchema)` to create a new message.
|
|
48
|
+
*/
|
|
49
|
+
export const UpdateCredentialRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
50
|
+
/**
|
|
51
|
+
* Describes the message versori.credential.v1alpha1.UpdateCredentialResponse.
|
|
52
|
+
* Use `create(UpdateCredentialResponseSchema)` to create a new message.
|
|
53
|
+
*/
|
|
54
|
+
export const UpdateCredentialResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message versori.credential.v1alpha1.DeleteCredentialRequest.
|
|
57
|
+
* Use `create(DeleteCredentialRequestSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export const DeleteCredentialRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
60
|
+
/**
|
|
61
|
+
* Describes the message versori.credential.v1alpha1.DeleteCredentialResponse.
|
|
62
|
+
* Use `create(DeleteCredentialResponseSchema)` to create a new message.
|
|
63
|
+
*/
|
|
64
|
+
export const DeleteCredentialResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
65
|
+
/**
|
|
66
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialRequest.
|
|
67
|
+
* Use `create(ValidateCredentialRequestSchema)` to create a new message.
|
|
68
|
+
*/
|
|
69
|
+
export const ValidateCredentialRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
70
|
+
/**
|
|
71
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialResponse.
|
|
72
|
+
* Use `create(ValidateCredentialResponseSchema)` to create a new message.
|
|
73
|
+
*/
|
|
74
|
+
export const ValidateCredentialResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
75
|
+
/**
|
|
76
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialResponse.ValidationError.
|
|
77
|
+
* Use `create(ValidateCredentialResponse_ValidationErrorSchema)` to create a new message.
|
|
78
|
+
*/
|
|
79
|
+
export const ValidateCredentialResponse_ValidationErrorSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
80
|
+
/**
|
|
81
|
+
* @generated from service versori.credential.v1alpha1.CredentialService
|
|
82
|
+
*/
|
|
83
|
+
export const CredentialService: import("@bufbuild/protobuf/codegenv1").GenService<import("@bufbuild/protobuf/codegenv1").GenServiceMethods>;
|
|
84
|
+
//# sourceMappingURL=credential_service_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/dsl/http/versori/credentials/v1alpha1/credential_service_pb.js"],"names":[],"mappings":"AASA;;GAEG;AACH,wGASM;AAEN;;;GAGG;AACH,4KAEwE;AAExE;;;GAGG;AACH,6KAEwE;AAExE;;;GAGG;AACH,yKAEwE;AAExE;;;GAGG;AACH,0KAEwE;AAExE;;;GAGG;AACH,8KAEwE;AAExE;;;GAGG;AACH,+KAEwE;AAExE;;;GAGG;AACH,2KAEwE;AAExE;;;GAGG;AACH,4KAEwE;AAExE;;;GAGG;AACH,4KAEwE;AAExE;;;GAGG;AACH,6KAEwE;AAExE;;;GAGG;AACH,4KAEyE;AAEzE;;;GAGG;AACH,6KAEyE;AAEzE;;;GAGG;AACH,8KAEyE;AAEzE;;;GAGG;AACH,+KAEyE;AAEzE;;;GAGG;AACH,+LAE4E;AAE5E;;GAEG;AACH,4IAEwE"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.2.3
|
|
2
|
+
// @generated from file versori/credential/v1alpha1/credential_service.proto (package versori.credential.v1alpha1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv1';
|
|
5
|
+
import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt';
|
|
6
|
+
import { file_versori_credential_v1alpha1_common } from './common_pb.js';
|
|
7
|
+
import { file_versori_credential_v1alpha1_credential } from './credential_pb.js';
|
|
8
|
+
/**
|
|
9
|
+
* Describes the file versori/credential/v1alpha1/credential_service.proto.
|
|
10
|
+
*/
|
|
11
|
+
export const file_versori_credential_v1alpha1_credential_service =
|
|
12
|
+
/*@__PURE__*/
|
|
13
|
+
fileDesc('CjR2ZXJzb3JpL2NyZWRlbnRpYWwvdjFhbHBoYTEvY3JlZGVudGlhbF9zZXJ2aWNlLnByb3RvEht2ZXJzb3JpLmNyZWRlbnRpYWwudjFhbHBoYTEivgIKF0NyZWF0ZUNyZWRlbnRpYWxSZXF1ZXN0EhcKD29yZ2FuaXNhdGlvbl9pZ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S5VcGRhdGVDcmVkZW50aWFsUmVzcG9uc2USdQoGRGVsZXRlEjQudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLkRlbGV0ZUNyZWRlbnRpYWxSZXF1ZXN0GjUudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLkRlbGV0ZUNyZWRlbnRpYWxSZXNwb25zZRJ7CghWYWxpZGF0ZRI2LnZlcnNvcmkuY3JlZGVudGlhbC52MWFscGhhMS5WYWxpZGF0ZUNyZWRlbnRpYWxSZXF1ZXN0GjcudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLlZhbGlkYXRlQ3JlZGVudGlhbFJlc3BvbnNlQiZaJHZlcnNvcmkuZGV2L2NyZWRlbnRpYWxzL2FwaS92MWFscGhhMWIGcHJvdG8z', [
|
|
14
|
+
file_google_protobuf_timestamp,
|
|
15
|
+
file_versori_credential_v1alpha1_common,
|
|
16
|
+
file_versori_credential_v1alpha1_credential,
|
|
17
|
+
]);
|
|
18
|
+
/**
|
|
19
|
+
* Describes the message versori.credential.v1alpha1.CreateCredentialRequest.
|
|
20
|
+
* Use `create(CreateCredentialRequestSchema)` to create a new message.
|
|
21
|
+
*/
|
|
22
|
+
export const CreateCredentialRequestSchema =
|
|
23
|
+
/*@__PURE__*/
|
|
24
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 0);
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message versori.credential.v1alpha1.CreateCredentialResponse.
|
|
27
|
+
* Use `create(CreateCredentialResponseSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const CreateCredentialResponseSchema =
|
|
30
|
+
/*@__PURE__*/
|
|
31
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 1);
|
|
32
|
+
/**
|
|
33
|
+
* Describes the message versori.credential.v1alpha1.GetCredentialRequest.
|
|
34
|
+
* Use `create(GetCredentialRequestSchema)` to create a new message.
|
|
35
|
+
*/
|
|
36
|
+
export const GetCredentialRequestSchema =
|
|
37
|
+
/*@__PURE__*/
|
|
38
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 2);
|
|
39
|
+
/**
|
|
40
|
+
* Describes the message versori.credential.v1alpha1.GetCredentialResponse.
|
|
41
|
+
* Use `create(GetCredentialResponseSchema)` to create a new message.
|
|
42
|
+
*/
|
|
43
|
+
export const GetCredentialResponseSchema =
|
|
44
|
+
/*@__PURE__*/
|
|
45
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 3);
|
|
46
|
+
/**
|
|
47
|
+
* Describes the message versori.credential.v1alpha1.GetManyCredentialsRequest.
|
|
48
|
+
* Use `create(GetManyCredentialsRequestSchema)` to create a new message.
|
|
49
|
+
*/
|
|
50
|
+
export const GetManyCredentialsRequestSchema =
|
|
51
|
+
/*@__PURE__*/
|
|
52
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 4);
|
|
53
|
+
/**
|
|
54
|
+
* Describes the message versori.credential.v1alpha1.GetManyCredentialsResponse.
|
|
55
|
+
* Use `create(GetManyCredentialsResponseSchema)` to create a new message.
|
|
56
|
+
*/
|
|
57
|
+
export const GetManyCredentialsResponseSchema =
|
|
58
|
+
/*@__PURE__*/
|
|
59
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 5);
|
|
60
|
+
/**
|
|
61
|
+
* Describes the message versori.credential.v1alpha1.ListCredentialsRequest.
|
|
62
|
+
* Use `create(ListCredentialsRequestSchema)` to create a new message.
|
|
63
|
+
*/
|
|
64
|
+
export const ListCredentialsRequestSchema =
|
|
65
|
+
/*@__PURE__*/
|
|
66
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 6);
|
|
67
|
+
/**
|
|
68
|
+
* Describes the message versori.credential.v1alpha1.ListCredentialsResponse.
|
|
69
|
+
* Use `create(ListCredentialsResponseSchema)` to create a new message.
|
|
70
|
+
*/
|
|
71
|
+
export const ListCredentialsResponseSchema =
|
|
72
|
+
/*@__PURE__*/
|
|
73
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 7);
|
|
74
|
+
/**
|
|
75
|
+
* Describes the message versori.credential.v1alpha1.UpdateCredentialRequest.
|
|
76
|
+
* Use `create(UpdateCredentialRequestSchema)` to create a new message.
|
|
77
|
+
*/
|
|
78
|
+
export const UpdateCredentialRequestSchema =
|
|
79
|
+
/*@__PURE__*/
|
|
80
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 8);
|
|
81
|
+
/**
|
|
82
|
+
* Describes the message versori.credential.v1alpha1.UpdateCredentialResponse.
|
|
83
|
+
* Use `create(UpdateCredentialResponseSchema)` to create a new message.
|
|
84
|
+
*/
|
|
85
|
+
export const UpdateCredentialResponseSchema =
|
|
86
|
+
/*@__PURE__*/
|
|
87
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 9);
|
|
88
|
+
/**
|
|
89
|
+
* Describes the message versori.credential.v1alpha1.DeleteCredentialRequest.
|
|
90
|
+
* Use `create(DeleteCredentialRequestSchema)` to create a new message.
|
|
91
|
+
*/
|
|
92
|
+
export const DeleteCredentialRequestSchema =
|
|
93
|
+
/*@__PURE__*/
|
|
94
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 10);
|
|
95
|
+
/**
|
|
96
|
+
* Describes the message versori.credential.v1alpha1.DeleteCredentialResponse.
|
|
97
|
+
* Use `create(DeleteCredentialResponseSchema)` to create a new message.
|
|
98
|
+
*/
|
|
99
|
+
export const DeleteCredentialResponseSchema =
|
|
100
|
+
/*@__PURE__*/
|
|
101
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 11);
|
|
102
|
+
/**
|
|
103
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialRequest.
|
|
104
|
+
* Use `create(ValidateCredentialRequestSchema)` to create a new message.
|
|
105
|
+
*/
|
|
106
|
+
export const ValidateCredentialRequestSchema =
|
|
107
|
+
/*@__PURE__*/
|
|
108
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 12);
|
|
109
|
+
/**
|
|
110
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialResponse.
|
|
111
|
+
* Use `create(ValidateCredentialResponseSchema)` to create a new message.
|
|
112
|
+
*/
|
|
113
|
+
export const ValidateCredentialResponseSchema =
|
|
114
|
+
/*@__PURE__*/
|
|
115
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 13);
|
|
116
|
+
/**
|
|
117
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialResponse.ValidationError.
|
|
118
|
+
* Use `create(ValidateCredentialResponse_ValidationErrorSchema)` to create a new message.
|
|
119
|
+
*/
|
|
120
|
+
export const ValidateCredentialResponse_ValidationErrorSchema =
|
|
121
|
+
/*@__PURE__*/
|
|
122
|
+
messageDesc(file_versori_credential_v1alpha1_credential_service, 13, 0);
|
|
123
|
+
/**
|
|
124
|
+
* @generated from service versori.credential.v1alpha1.CredentialService
|
|
125
|
+
*/
|
|
126
|
+
export const CredentialService =
|
|
127
|
+
/*@__PURE__*/
|
|
128
|
+
serviceDesc(file_versori_credential_v1alpha1_credential_service, 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CronProvider } from '../types.js';
|
|
2
|
+
export declare class CronAPIClient implements CronProvider {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private envId;
|
|
5
|
+
private integrationUrl;
|
|
6
|
+
constructor(baseUrl: string, envId: string, integrationUrl: string);
|
|
7
|
+
static fromEnv(): CronAPIClient;
|
|
8
|
+
updateCrons(crons: Map<string, string>): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=cronapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cronapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/cronapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,qBAAa,aAAc,YAAW,YAAY;IAC9C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,cAAc,CAAS;gBAG3B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM;IAO1B,MAAM,CAAC,OAAO,IAAI,aAAa;IAgBzB,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAe/D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { envVarEnvId, envVarCronApiBaseURL, envVarProjectId, envVarOrgSlug, envVarEnvironmentName, envVarSelfRefURL } from './constants.js';
|
|
2
|
+
export class CronAPIClient {
|
|
3
|
+
constructor(baseUrl, envId, integrationUrl) {
|
|
4
|
+
Object.defineProperty(this, "baseUrl", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true,
|
|
8
|
+
value: void 0
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(this, "envId", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: void 0
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "integrationUrl", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
this.baseUrl = baseUrl;
|
|
23
|
+
this.envId = envId;
|
|
24
|
+
this.integrationUrl = integrationUrl;
|
|
25
|
+
}
|
|
26
|
+
static fromEnv() {
|
|
27
|
+
const baseUrl = Deno.env.get(envVarCronApiBaseURL) || 'http://cron-api.platform.svc.cluster.local';
|
|
28
|
+
const envId = Deno.env.get(envVarEnvId);
|
|
29
|
+
const projectId = Deno.env.get(envVarProjectId);
|
|
30
|
+
const orgSlug = Deno.env.get(envVarOrgSlug);
|
|
31
|
+
const envName = Deno.env.get(envVarEnvironmentName);
|
|
32
|
+
if (!baseUrl || !envId || !projectId || !orgSlug || !envName) {
|
|
33
|
+
throw new Error('Missing required environment variables');
|
|
34
|
+
}
|
|
35
|
+
const integrationUrl = Deno.env.get(envVarSelfRefURL) || `http://svc-${projectId.toLowerCase()}-${envName.toLowerCase()}.sb-${orgSlug.toLowerCase()}.svc.cluster.local`;
|
|
36
|
+
return new CronAPIClient(baseUrl, envId, integrationUrl);
|
|
37
|
+
}
|
|
38
|
+
async updateCrons(crons) {
|
|
39
|
+
const cronsArray = Array.from(crons.entries()).map(([name, schedule]) => ({ name, schedule, url: `${this.integrationUrl}/cron/${name}` }));
|
|
40
|
+
const resp = await fetch(`${this.baseUrl}/cron/environments/${this.envId}`, {
|
|
41
|
+
method: 'PUT',
|
|
42
|
+
headers: {
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
},
|
|
45
|
+
body: JSON.stringify({ crons: cronsArray }),
|
|
46
|
+
});
|
|
47
|
+
if (!resp.ok) {
|
|
48
|
+
throw new Error(`Failed to update crons: ${resp.statusText}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { Logger } from '../../../observability/mod.js';
|
|
1
2
|
import { Activation, Connection, ConnectionProvider } from '../types.js';
|
|
2
3
|
export declare class PlatformAPIClient implements ConnectionProvider {
|
|
3
4
|
private baseUrl;
|
|
4
5
|
private orgId;
|
|
5
6
|
private envId;
|
|
6
7
|
private internalAuth;
|
|
7
|
-
|
|
8
|
+
private log;
|
|
9
|
+
constructor(baseUrl: string, orgId: string, envId: string, log: Logger);
|
|
8
10
|
static fromEnv(): PlatformAPIClient;
|
|
9
11
|
getStaticConnection(cnxId: string): Promise<Connection | undefined>;
|
|
10
12
|
getUserActivations(userId: string): Promise<Activation[]>;
|
|
11
13
|
getActivation(activationId: string): Promise<Activation | undefined>;
|
|
12
14
|
getActivationConnection(templateId: string, activationId: string): Promise<Connection | undefined>;
|
|
13
15
|
listActivations(): Promise<Activation[]>;
|
|
16
|
+
updateDynamicVariable(activationId: string, name: string, value: unknown): Promise<void>;
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=platformapi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/platformapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"platformapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/platformapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAmBzE,qBAAa,iBAAkB,YAAW,kBAAkB;IACxD,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,YAAY,CAAe;IAEnC,OAAO,CAAC,GAAG,CAAS;gBAER,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAQtE,MAAM,CAAC,OAAO,IAAI,iBAAiB;IAa7B,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAgBnE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAuBzD,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAmBpE,uBAAuB,CACzB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACrB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAmB5B,eAAe,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAuBxC,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBjG"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { envVarEnvId, envVarOrgId, envVarPlatformApiBaseURL } from './constants.js';
|
|
2
2
|
import { InternalAuth } from './internalauth.js';
|
|
3
|
+
import { ConsoleLogger } from '../../../mod.js';
|
|
4
|
+
import { ActivationImpl } from './activation.js';
|
|
3
5
|
export class PlatformAPIClient {
|
|
4
|
-
constructor(baseUrl, orgId, envId) {
|
|
6
|
+
constructor(baseUrl, orgId, envId, log) {
|
|
5
7
|
Object.defineProperty(this, "baseUrl", {
|
|
6
8
|
enumerable: true,
|
|
7
9
|
configurable: true,
|
|
@@ -26,19 +28,27 @@ export class PlatformAPIClient {
|
|
|
26
28
|
writable: true,
|
|
27
29
|
value: void 0
|
|
28
30
|
});
|
|
31
|
+
Object.defineProperty(this, "log", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: void 0
|
|
36
|
+
});
|
|
29
37
|
this.baseUrl = baseUrl;
|
|
30
38
|
this.orgId = orgId;
|
|
31
39
|
this.envId = envId;
|
|
32
40
|
this.internalAuth = new InternalAuth();
|
|
41
|
+
this.log = log;
|
|
33
42
|
}
|
|
34
43
|
static fromEnv() {
|
|
35
44
|
const baseUrl = Deno.env.get(envVarPlatformApiBaseURL);
|
|
36
45
|
const orgId = Deno.env.get(envVarOrgId);
|
|
37
46
|
const envId = Deno.env.get(envVarEnvId);
|
|
47
|
+
const log = new ConsoleLogger('debug');
|
|
38
48
|
if (!baseUrl || !orgId || !envId) {
|
|
39
49
|
throw new Error('Missing required environment variables');
|
|
40
50
|
}
|
|
41
|
-
return new PlatformAPIClient(baseUrl, orgId, envId);
|
|
51
|
+
return new PlatformAPIClient(baseUrl, orgId, envId, log);
|
|
42
52
|
}
|
|
43
53
|
async getStaticConnection(cnxId) {
|
|
44
54
|
const resp = await fetch(`${this.baseUrl}/o/${this.orgId}/connections/${cnxId}`, {
|
|
@@ -61,7 +71,10 @@ export class PlatformAPIClient {
|
|
|
61
71
|
if (!resp.ok) {
|
|
62
72
|
return [];
|
|
63
73
|
}
|
|
64
|
-
const
|
|
74
|
+
const activations = (await resp.json());
|
|
75
|
+
const result = activations.map((act) => {
|
|
76
|
+
return new ActivationImpl(act.id, act.user, this, this.log, act.dynamicVariables);
|
|
77
|
+
});
|
|
65
78
|
return result;
|
|
66
79
|
}
|
|
67
80
|
async getActivation(activationId) {
|
|
@@ -73,8 +86,8 @@ export class PlatformAPIClient {
|
|
|
73
86
|
if (!resp.ok) {
|
|
74
87
|
return undefined;
|
|
75
88
|
}
|
|
76
|
-
const
|
|
77
|
-
return
|
|
89
|
+
const act = (await resp.json());
|
|
90
|
+
return new ActivationImpl(act.id, act.user, this, this.log, act.dynamicVariables);
|
|
78
91
|
}
|
|
79
92
|
async getActivationConnection(templateId, activationId) {
|
|
80
93
|
const resp = await fetch(`${this.baseUrl}/o/${this.orgId}/environment-systems/${templateId}/activations/${activationId}`, {
|
|
@@ -97,7 +110,26 @@ export class PlatformAPIClient {
|
|
|
97
110
|
if (!resp.ok) {
|
|
98
111
|
return [];
|
|
99
112
|
}
|
|
100
|
-
const
|
|
113
|
+
const activations = (await resp.json());
|
|
114
|
+
const result = activations.map((act) => {
|
|
115
|
+
return new ActivationImpl(act.id, act.user, this, this.log, act.dynamicVariables);
|
|
116
|
+
});
|
|
101
117
|
return result;
|
|
102
118
|
}
|
|
119
|
+
async updateDynamicVariable(activationId, name, value) {
|
|
120
|
+
this.log.debug(`value is ${JSON.stringify(value)}`);
|
|
121
|
+
const resp = await fetch(`${this.baseUrl}/o/${this.orgId}/environments/${this.envId}/activations/${activationId}/variables/${name}`, {
|
|
122
|
+
method: 'PUT',
|
|
123
|
+
headers: {
|
|
124
|
+
'x-versori-internal-token': await this.internalAuth.getToken(),
|
|
125
|
+
'Content-Type': 'application/json',
|
|
126
|
+
},
|
|
127
|
+
body: JSON.stringify({
|
|
128
|
+
value,
|
|
129
|
+
}),
|
|
130
|
+
});
|
|
131
|
+
if (!resp.ok) {
|
|
132
|
+
throw new Error(`Failed to update dynamic variable ${name}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
103
135
|
}
|
|
@@ -2,7 +2,7 @@ import { DynamicFetcher, RoundTripperFactory } from '../types.js';
|
|
|
2
2
|
import { VersoriCredentialClient } from './credentials/mod.js';
|
|
3
3
|
import { PlatformAPIClient } from './platformapi.js';
|
|
4
4
|
import { Logger } from '../../../observability/logging/Logger.js';
|
|
5
|
-
|
|
5
|
+
import { Credentials } from './contextcredentials.js';
|
|
6
6
|
/**
|
|
7
7
|
* VersoriRoundTripper is an implementation of the RoundTripperFactory interface for Versori connections.
|
|
8
8
|
* This is the intended implementation for when projects/services are hosted on Versori infrastructure.
|
|
@@ -10,28 +10,34 @@ export type RunningEnvironment = 'local' | 'versori' | 'staging';
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```typescript
|
|
13
|
-
* const factory = new
|
|
13
|
+
* const factory = new VersoriCredentialsFactory(connectAPIClient, tokenClient);
|
|
14
14
|
* const customFetch = await factory.create('connectionName');
|
|
15
15
|
* const response = await customFetch('https://api.example.com/data');
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class VersoriCredentialsFactory implements RoundTripperFactory {
|
|
19
19
|
private tokenClient;
|
|
20
|
+
private credsBaseURL;
|
|
20
21
|
private platformAPIClient;
|
|
21
22
|
private versoriCfg;
|
|
22
23
|
private log;
|
|
23
24
|
private readonly defaultDynamic;
|
|
24
|
-
constructor(credsClient: VersoriCredentialClient, platformAPIClient: PlatformAPIClient, logger: Logger);
|
|
25
|
-
static fromEnv(logger?: Logger):
|
|
25
|
+
constructor(credsClient: VersoriCredentialClient, credsBaseURL: string, platformAPIClient: PlatformAPIClient, logger: Logger);
|
|
26
|
+
static fromEnv(logger?: Logger): VersoriCredentialsFactory;
|
|
26
27
|
private changeRequestInit;
|
|
27
28
|
private changeBaseUrl;
|
|
28
29
|
create(connName: string, fn?: typeof fetch): Promise<typeof fetch | undefined>;
|
|
29
30
|
createDynamic(templateName: string, fn?: typeof fetch): Promise<DynamicFetcher | undefined>;
|
|
31
|
+
credentials(): Credentials;
|
|
32
|
+
private getTokenByName;
|
|
33
|
+
private getRawByName;
|
|
34
|
+
private getCredentialIDFromName;
|
|
30
35
|
private getConnectionID;
|
|
31
36
|
private getTemplateID;
|
|
32
37
|
private apiKeyFetcher;
|
|
33
38
|
private basicAuthFetcher;
|
|
34
39
|
private bearerTokenFetcher;
|
|
35
40
|
private oauth2Fetcher;
|
|
41
|
+
private getToken;
|
|
36
42
|
}
|
|
37
43
|
//# sourceMappingURL=roundtripper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roundtripper.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/roundtripper.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,cAAc,EACd,mBAAmB,EAEtB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"roundtripper.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/roundtripper.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,cAAc,EACd,mBAAmB,EAEtB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AAWlE,OAAO,EAAE,WAAW,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