@versori/run 0.2.0-alpha.8 → 0.2.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/{script/deps/jsr.io/@std/bytes/1.0.5 → esm/deps/jsr.io/@std/bytes/1.0.6}/_types.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/bytes/1.0.5 → esm/deps/jsr.io/@std/bytes/1.0.6}/concat.d.ts +1 -1
- package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/copy.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/fmt/{1.0.7 → 1.0.8}/colors.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/io/0.225.2/buffer.js +1 -1
- package/esm/deps/jsr.io/@std/io/0.225.2/read_all.js +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/esm/src/context/Context.d.ts +5 -1
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/Context.js +15 -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 +5 -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/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 +3 -0
- package/esm/src/dsl/http/versori/credentials/client.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/credentials/client.js +11 -3
- 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/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 -4
- package/esm/src/dsl/http/versori/roundtripper.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/roundtripper.js +83 -16
- package/esm/src/dsl/tasks/HttpTask.d.ts.map +1 -1
- package/esm/src/dsl/tasks/HttpTask.js +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +11 -3
- package/esm/src/observability/logging/ConsoleLogger.d.ts +1 -0
- package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/esm/src/observability/logging/ConsoleLogger.js +124 -30
- package/package.json +2 -1
- package/{esm/deps/jsr.io/@std/bytes/1.0.5 → script/deps/jsr.io/@std/bytes/1.0.6}/_types.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/bytes/1.0.5 → script/deps/jsr.io/@std/bytes/1.0.6}/concat.d.ts +1 -1
- package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/copy.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/fmt/{1.0.7 → 1.0.8}/colors.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/io/0.225.2/buffer.js +1 -1
- package/script/deps/jsr.io/@std/io/0.225.2/read_all.js +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/script/src/context/Context.d.ts +5 -1
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/Context.js +15 -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 +5 -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/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 +3 -0
- package/script/src/dsl/http/versori/credentials/client.d.ts.map +1 -1
- package/script/src/dsl/http/versori/credentials/client.js +10 -0
- 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/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 -4
- package/script/src/dsl/http/versori/roundtripper.d.ts.map +1 -1
- package/script/src/dsl/http/versori/roundtripper.js +85 -18
- package/script/src/dsl/tasks/HttpTask.d.ts.map +1 -1
- package/script/src/dsl/tasks/HttpTask.js +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +10 -2
- package/script/src/observability/logging/ConsoleLogger.d.ts +1 -0
- package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/script/src/observability/logging/ConsoleLogger.js +124 -30
- /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.js +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/copy.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/copy.js +0 -0
- /package/esm/deps/jsr.io/@std/fmt/{1.0.7 → 1.0.8}/colors.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fmt/{1.0.7 → 1.0.8}/colors.js +0 -0
- /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.d.ts +0 -0
- /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/_types.js +0 -0
- /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/concat.js +0 -0
- /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/copy.d.ts +0 -0
- /package/script/deps/jsr.io/@std/bytes/{1.0.5 → 1.0.6}/copy.js +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.7 → 1.0.8}/colors.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.7 → 1.0.8}/colors.js +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivationImpl = void 0;
|
|
4
|
+
class ActivationImpl {
|
|
5
|
+
constructor(id, user, connectionProvider, log, variables) {
|
|
6
|
+
Object.defineProperty(this, "id", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: void 0
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "user", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "variables", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: void 0
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "connectionProvider", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: void 0
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "log", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
36
|
+
this.id = id;
|
|
37
|
+
this.user = user;
|
|
38
|
+
this.connectionProvider = connectionProvider;
|
|
39
|
+
this.variables = variables;
|
|
40
|
+
this.log = log.child({
|
|
41
|
+
activationId: id,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getVariable(name) {
|
|
45
|
+
if (!this.variables) {
|
|
46
|
+
this.log.error(`No variables found for activation`);
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
return this.variables[name];
|
|
50
|
+
}
|
|
51
|
+
async setVariable(name, value) {
|
|
52
|
+
if (!this.variables) {
|
|
53
|
+
this.log.error(`No variables found for activation`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
await this.connectionProvider.updateDynamicVariable(this.id, name, value);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
this.log.error(`Failed to set variable`, {
|
|
61
|
+
error: err,
|
|
62
|
+
variableName: name,
|
|
63
|
+
});
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.variables[name] = value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.ActivationImpl = ActivationImpl;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Token = {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
tokenType: string;
|
|
4
|
+
expiry?: Date;
|
|
5
|
+
};
|
|
6
|
+
export interface Credentials {
|
|
7
|
+
getRaw(name: string): Promise<ArrayBuffer>;
|
|
8
|
+
getAccessToken(name: string): Promise<Token>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=contextcredentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextcredentials.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/contextcredentials.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,IAAI,CAAC;CACjB,CAAA;AAED,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3C,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CAChD"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { GetTokenResponse } from './tokens/v1/token_service_pb.js';
|
|
2
|
+
import { GetCredentialResponse } from './v1alpha1/credential_service_pb.js';
|
|
2
3
|
export declare class VersoriCredentialClient {
|
|
3
4
|
private TokenService;
|
|
5
|
+
private credentialsClient;
|
|
4
6
|
constructor(credsBaseUrl: string);
|
|
5
7
|
getToken(credId: string, forceRefresh?: boolean): Promise<GetTokenResponse>;
|
|
8
|
+
getRaw(credId: string): Promise<GetCredentialResponse>;
|
|
6
9
|
}
|
|
7
10
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/src/dsl/http/versori/credentials/client.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,YAAY,CAAc;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/src/dsl/http/versori/credentials/client.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,iBAAiB,CAAoB;gBAEjC,YAAY,EAAE,MAAM;IAKhC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,GAAE,OAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIlF,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAGzD"}
|
|
@@ -10,10 +10,20 @@ class VersoriCredentialClient {
|
|
|
10
10
|
writable: true,
|
|
11
11
|
value: void 0
|
|
12
12
|
});
|
|
13
|
+
Object.defineProperty(this, "credentialsClient", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
13
19
|
this.TokenService = (0, credentials_js_1.createTokenClient)(credsBaseUrl);
|
|
20
|
+
this.credentialsClient = (0, credentials_js_1.createCredentialsClient)(credsBaseUrl);
|
|
14
21
|
}
|
|
15
22
|
getToken(credId, forceRefresh = false) {
|
|
16
23
|
return this.TokenService.getToken({ credentialId: credId, forceRefresh });
|
|
17
24
|
}
|
|
25
|
+
getRaw(credId) {
|
|
26
|
+
return this.credentialsClient.get({ id: credId, showRedacted: true });
|
|
27
|
+
}
|
|
18
28
|
}
|
|
19
29
|
exports.VersoriCredentialClient = VersoriCredentialClient;
|
|
@@ -39,4 +39,42 @@ export declare function createOAuth2TokenService(baseUrl?: string): import("@con
|
|
|
39
39
|
};
|
|
40
40
|
}>>;
|
|
41
41
|
export type OAuth2TokenClient = ReturnType<typeof createOAuth2TokenService>;
|
|
42
|
+
export declare function createCredentialsClient(baseUrl?: string): import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
43
|
+
create: {
|
|
44
|
+
methodKind: "unary";
|
|
45
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").CreateCredentialRequestSchema;
|
|
46
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").CreateCredentialResponseSchema;
|
|
47
|
+
};
|
|
48
|
+
get: {
|
|
49
|
+
methodKind: "unary";
|
|
50
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").GetCredentialRequestSchema;
|
|
51
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").GetCredentialResponseSchema;
|
|
52
|
+
};
|
|
53
|
+
getMany: {
|
|
54
|
+
methodKind: "unary";
|
|
55
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").GetManyCredentialsRequestSchema;
|
|
56
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").GetManyCredentialsResponseSchema;
|
|
57
|
+
};
|
|
58
|
+
list: {
|
|
59
|
+
methodKind: "unary";
|
|
60
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").ListCredentialsRequestSchema;
|
|
61
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").ListCredentialsResponseSchema;
|
|
62
|
+
};
|
|
63
|
+
update: {
|
|
64
|
+
methodKind: "unary";
|
|
65
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").UpdateCredentialRequestSchema;
|
|
66
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").UpdateCredentialResponseSchema;
|
|
67
|
+
};
|
|
68
|
+
delete: {
|
|
69
|
+
methodKind: "unary";
|
|
70
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").DeleteCredentialRequestSchema;
|
|
71
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").DeleteCredentialResponseSchema;
|
|
72
|
+
};
|
|
73
|
+
validate: {
|
|
74
|
+
methodKind: "unary";
|
|
75
|
+
input: typeof import("./v1alpha1/credential_service_pb.js").ValidateCredentialRequestSchema;
|
|
76
|
+
output: typeof import("./v1alpha1/credential_service_pb.js").ValidateCredentialResponseSchema;
|
|
77
|
+
};
|
|
78
|
+
}>>;
|
|
79
|
+
export type CredentialsClient = ReturnType<typeof createCredentialsClient>;
|
|
42
80
|
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../../src/src/dsl/http/versori/credentials/credentials.ts"],"names":[],"mappings":"AAeA,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,MAAgC;;;;;;;;;;;IAK1E;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,MAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;IAKjF;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../../../src/src/dsl/http/versori/credentials/credentials.ts"],"names":[],"mappings":"AAeA,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,MAAgC;;;;;;;;;;;IAK1E;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,MAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;IAKjF;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE5E,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,MAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhF;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTokenClient = createTokenClient;
|
|
4
4
|
exports.createOAuth2TokenService = createOAuth2TokenService;
|
|
5
|
+
exports.createCredentialsClient = createCredentialsClient;
|
|
5
6
|
const connect_1 = require("@connectrpc/connect");
|
|
6
7
|
const connect_node_1 = require("@connectrpc/connect-node");
|
|
7
8
|
const token_service_pb_js_1 = require("./tokens/v1/token_service_pb.js");
|
|
8
9
|
const token_service_pb_js_2 = require("./oauth2/v1/token_service_pb.js");
|
|
9
10
|
// // @deno-types="./v1alpha1/credential_service_pb.d.ts"
|
|
10
|
-
|
|
11
|
+
const credential_service_pb_js_1 = require("./v1alpha1/credential_service_pb.js");
|
|
11
12
|
// // @deno-types="./customauth/v1/customauth_service_pb.d.ts"
|
|
12
13
|
// import { CustomAuthenticationService } from './customauth/v1/customauth_service_pb.d.ts';
|
|
13
14
|
function createTokenClient(baseUrl = 'http://localhost:9000') {
|
|
@@ -22,13 +23,12 @@ function createOAuth2TokenService(baseUrl = 'http://localhost:9000') {
|
|
|
22
23
|
});
|
|
23
24
|
return (0, connect_1.createClient)(token_service_pb_js_2.OAuth2TokenService, transport);
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// export type CredentialService = ReturnType<typeof createCredentialService>;
|
|
26
|
+
function createCredentialsClient(baseUrl = 'http://localhost:9000') {
|
|
27
|
+
const transport = (0, connect_node_1.createGrpcTransport)({
|
|
28
|
+
baseUrl,
|
|
29
|
+
});
|
|
30
|
+
return (0, connect_1.createClient)(credential_service_pb_js_1.CredentialService, transport);
|
|
31
|
+
}
|
|
32
32
|
// export function createCustomAuthService(baseUrl: string = 'http://localhost:9000') {
|
|
33
33
|
// const transport = createGrpcTransport({
|
|
34
34
|
// baseUrl,
|
|
@@ -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,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-es v2.2.3
|
|
3
|
+
// @generated from file versori/credential/v1alpha1/common.proto (package versori.credential.v1alpha1, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PageInfoSchema = exports.Sort_Order = exports.Sort_OrderSchema = exports.SortSchema = exports.PageParamsSchema = exports.file_versori_credential_v1alpha1_common = void 0;
|
|
7
|
+
const codegenv1_1 = require("@bufbuild/protobuf/codegenv1");
|
|
8
|
+
/**
|
|
9
|
+
* Describes the file versori/credential/v1alpha1/common.proto.
|
|
10
|
+
*/
|
|
11
|
+
exports.file_versori_credential_v1alpha1_common = (0, codegenv1_1.fileDesc)("Cih2ZXJzb3JpL2NyZWRlbnRpYWwvdjFhbHBoYTEvY29tbW9uLnByb3RvEht2ZXJzb3JpLmNyZWRlbnRpYWwudjFhbHBoYTEiawoKUGFnZVBhcmFtcxINCgVmaXJzdBgBIAEoBRINCgVhZnRlchgCIAEoCRIOCgZiZWZvcmUYAyABKAkSLwoEc29ydBgEIAMoCzIhLnZlcnNvcmkuY3JlZGVudGlhbC52MWFscGhhMS5Tb3J0ImoKBFNvcnQSDgoGY29sdW1uGAEgASgJEjYKBW9yZGVyGAIgASgOMicudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLlNvcnQuT3JkZXIiGgoFT3JkZXISBwoDQVNDEAASCAoEREVTQxABIkkKCFBhZ2VJbmZvEhMKC3RvdGFsX2NvdW50GAEgASgDEhMKC25leHRfY3Vyc29yGAIgASgJEhMKC3ByZXZfY3Vyc29yGAMgASgJQiZaJHZlcnNvcmkuZGV2L2NyZWRlbnRpYWxzL2FwaS92MWFscGhhMWIGcHJvdG8z");
|
|
12
|
+
/**
|
|
13
|
+
* Describes the message versori.credential.v1alpha1.PageParams.
|
|
14
|
+
* Use `create(PageParamsSchema)` to create a new message.
|
|
15
|
+
*/
|
|
16
|
+
exports.PageParamsSchema = (0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_common, 0);
|
|
17
|
+
/**
|
|
18
|
+
* Describes the message versori.credential.v1alpha1.Sort.
|
|
19
|
+
* Use `create(SortSchema)` to create a new message.
|
|
20
|
+
*/
|
|
21
|
+
exports.SortSchema = (0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_common, 1);
|
|
22
|
+
/**
|
|
23
|
+
* Describes the enum versori.credential.v1alpha1.Sort.Order.
|
|
24
|
+
*/
|
|
25
|
+
exports.Sort_OrderSchema = (0, codegenv1_1.enumDesc)(exports.file_versori_credential_v1alpha1_common, 1, 0);
|
|
26
|
+
/**
|
|
27
|
+
* @generated from enum versori.credential.v1alpha1.Sort.Order
|
|
28
|
+
*/
|
|
29
|
+
exports.Sort_Order = (0, codegenv1_1.tsEnum)(exports.Sort_OrderSchema);
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message versori.credential.v1alpha1.PageInfo.
|
|
32
|
+
* Use `create(PageInfoSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
exports.PageInfoSchema = (0, codegenv1_1.messageDesc)(exports.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,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-es v2.2.3
|
|
3
|
+
// @generated from file versori/credential/v1alpha1/credential_service.proto (package versori.credential.v1alpha1, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CredentialService = exports.ValidateCredentialResponse_ValidationErrorSchema = exports.ValidateCredentialResponseSchema = exports.ValidateCredentialRequestSchema = exports.DeleteCredentialResponseSchema = exports.DeleteCredentialRequestSchema = exports.UpdateCredentialResponseSchema = exports.UpdateCredentialRequestSchema = exports.ListCredentialsResponseSchema = exports.ListCredentialsRequestSchema = exports.GetManyCredentialsResponseSchema = exports.GetManyCredentialsRequestSchema = exports.GetCredentialResponseSchema = exports.GetCredentialRequestSchema = exports.CreateCredentialResponseSchema = exports.CreateCredentialRequestSchema = exports.file_versori_credential_v1alpha1_credential_service = void 0;
|
|
7
|
+
const codegenv1_1 = require("@bufbuild/protobuf/codegenv1");
|
|
8
|
+
const wkt_1 = require("@bufbuild/protobuf/wkt");
|
|
9
|
+
const common_pb_js_1 = require("./common_pb.js");
|
|
10
|
+
const credential_pb_js_1 = require("./credential_pb.js");
|
|
11
|
+
/**
|
|
12
|
+
* Describes the file versori/credential/v1alpha1/credential_service.proto.
|
|
13
|
+
*/
|
|
14
|
+
exports.file_versori_credential_v1alpha1_credential_service =
|
|
15
|
+
/*@__PURE__*/
|
|
16
|
+
(0, codegenv1_1.fileDesc)('CjR2ZXJzb3JpL2NyZWRlbnRpYWwvdjFhbHBoYTEvY3JlZGVudGlhbF9zZXJ2aWNlLnByb3RvEht2ZXJzb3JpLmNyZWRlbnRpYWwudjFhbHBoYTEivgIKF0NyZWF0ZUNyZWRlbnRpYWxSZXF1ZXN0EhcKD29yZ2FuaXNhdGlvbl9pZBgBIAEoCRIMCgRuYW1lGAIgASgJEkwKBGRhdGEYAyADKAsyPi52ZX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yc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLkRlbGV0ZUNyZWRlbnRpYWxSZXF1ZXN0GjUudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLkRlbGV0ZUNyZWRlbnRpYWxSZXNwb25zZRJ7CghWYWxpZGF0ZRI2LnZlcnNvcmkuY3JlZGVudGlhbC52MWFscGhhMS5WYWxpZGF0ZUNyZWRlbnRpYWxSZXF1ZXN0GjcudmVyc29yaS5jcmVkZW50aWFsLnYxYWxwaGExLlZhbGlkYXRlQ3JlZGVudGlhbFJlc3BvbnNlQiZaJHZlcnNvcmkuZGV2L2NyZWRlbnRpYWxzL2FwaS92MWFscGhhMWIGcHJvdG8z', [
|
|
17
|
+
wkt_1.file_google_protobuf_timestamp,
|
|
18
|
+
common_pb_js_1.file_versori_credential_v1alpha1_common,
|
|
19
|
+
credential_pb_js_1.file_versori_credential_v1alpha1_credential,
|
|
20
|
+
]);
|
|
21
|
+
/**
|
|
22
|
+
* Describes the message versori.credential.v1alpha1.CreateCredentialRequest.
|
|
23
|
+
* Use `create(CreateCredentialRequestSchema)` to create a new message.
|
|
24
|
+
*/
|
|
25
|
+
exports.CreateCredentialRequestSchema =
|
|
26
|
+
/*@__PURE__*/
|
|
27
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 0);
|
|
28
|
+
/**
|
|
29
|
+
* Describes the message versori.credential.v1alpha1.CreateCredentialResponse.
|
|
30
|
+
* Use `create(CreateCredentialResponseSchema)` to create a new message.
|
|
31
|
+
*/
|
|
32
|
+
exports.CreateCredentialResponseSchema =
|
|
33
|
+
/*@__PURE__*/
|
|
34
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 1);
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message versori.credential.v1alpha1.GetCredentialRequest.
|
|
37
|
+
* Use `create(GetCredentialRequestSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
exports.GetCredentialRequestSchema =
|
|
40
|
+
/*@__PURE__*/
|
|
41
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 2);
|
|
42
|
+
/**
|
|
43
|
+
* Describes the message versori.credential.v1alpha1.GetCredentialResponse.
|
|
44
|
+
* Use `create(GetCredentialResponseSchema)` to create a new message.
|
|
45
|
+
*/
|
|
46
|
+
exports.GetCredentialResponseSchema =
|
|
47
|
+
/*@__PURE__*/
|
|
48
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 3);
|
|
49
|
+
/**
|
|
50
|
+
* Describes the message versori.credential.v1alpha1.GetManyCredentialsRequest.
|
|
51
|
+
* Use `create(GetManyCredentialsRequestSchema)` to create a new message.
|
|
52
|
+
*/
|
|
53
|
+
exports.GetManyCredentialsRequestSchema =
|
|
54
|
+
/*@__PURE__*/
|
|
55
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 4);
|
|
56
|
+
/**
|
|
57
|
+
* Describes the message versori.credential.v1alpha1.GetManyCredentialsResponse.
|
|
58
|
+
* Use `create(GetManyCredentialsResponseSchema)` to create a new message.
|
|
59
|
+
*/
|
|
60
|
+
exports.GetManyCredentialsResponseSchema =
|
|
61
|
+
/*@__PURE__*/
|
|
62
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 5);
|
|
63
|
+
/**
|
|
64
|
+
* Describes the message versori.credential.v1alpha1.ListCredentialsRequest.
|
|
65
|
+
* Use `create(ListCredentialsRequestSchema)` to create a new message.
|
|
66
|
+
*/
|
|
67
|
+
exports.ListCredentialsRequestSchema =
|
|
68
|
+
/*@__PURE__*/
|
|
69
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 6);
|
|
70
|
+
/**
|
|
71
|
+
* Describes the message versori.credential.v1alpha1.ListCredentialsResponse.
|
|
72
|
+
* Use `create(ListCredentialsResponseSchema)` to create a new message.
|
|
73
|
+
*/
|
|
74
|
+
exports.ListCredentialsResponseSchema =
|
|
75
|
+
/*@__PURE__*/
|
|
76
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 7);
|
|
77
|
+
/**
|
|
78
|
+
* Describes the message versori.credential.v1alpha1.UpdateCredentialRequest.
|
|
79
|
+
* Use `create(UpdateCredentialRequestSchema)` to create a new message.
|
|
80
|
+
*/
|
|
81
|
+
exports.UpdateCredentialRequestSchema =
|
|
82
|
+
/*@__PURE__*/
|
|
83
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 8);
|
|
84
|
+
/**
|
|
85
|
+
* Describes the message versori.credential.v1alpha1.UpdateCredentialResponse.
|
|
86
|
+
* Use `create(UpdateCredentialResponseSchema)` to create a new message.
|
|
87
|
+
*/
|
|
88
|
+
exports.UpdateCredentialResponseSchema =
|
|
89
|
+
/*@__PURE__*/
|
|
90
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 9);
|
|
91
|
+
/**
|
|
92
|
+
* Describes the message versori.credential.v1alpha1.DeleteCredentialRequest.
|
|
93
|
+
* Use `create(DeleteCredentialRequestSchema)` to create a new message.
|
|
94
|
+
*/
|
|
95
|
+
exports.DeleteCredentialRequestSchema =
|
|
96
|
+
/*@__PURE__*/
|
|
97
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 10);
|
|
98
|
+
/**
|
|
99
|
+
* Describes the message versori.credential.v1alpha1.DeleteCredentialResponse.
|
|
100
|
+
* Use `create(DeleteCredentialResponseSchema)` to create a new message.
|
|
101
|
+
*/
|
|
102
|
+
exports.DeleteCredentialResponseSchema =
|
|
103
|
+
/*@__PURE__*/
|
|
104
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 11);
|
|
105
|
+
/**
|
|
106
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialRequest.
|
|
107
|
+
* Use `create(ValidateCredentialRequestSchema)` to create a new message.
|
|
108
|
+
*/
|
|
109
|
+
exports.ValidateCredentialRequestSchema =
|
|
110
|
+
/*@__PURE__*/
|
|
111
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 12);
|
|
112
|
+
/**
|
|
113
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialResponse.
|
|
114
|
+
* Use `create(ValidateCredentialResponseSchema)` to create a new message.
|
|
115
|
+
*/
|
|
116
|
+
exports.ValidateCredentialResponseSchema =
|
|
117
|
+
/*@__PURE__*/
|
|
118
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 13);
|
|
119
|
+
/**
|
|
120
|
+
* Describes the message versori.credential.v1alpha1.ValidateCredentialResponse.ValidationError.
|
|
121
|
+
* Use `create(ValidateCredentialResponse_ValidationErrorSchema)` to create a new message.
|
|
122
|
+
*/
|
|
123
|
+
exports.ValidateCredentialResponse_ValidationErrorSchema =
|
|
124
|
+
/*@__PURE__*/
|
|
125
|
+
(0, codegenv1_1.messageDesc)(exports.file_versori_credential_v1alpha1_credential_service, 13, 0);
|
|
126
|
+
/**
|
|
127
|
+
* @generated from service versori.credential.v1alpha1.CredentialService
|
|
128
|
+
*/
|
|
129
|
+
exports.CredentialService =
|
|
130
|
+
/*@__PURE__*/
|
|
131
|
+
(0, codegenv1_1.serviceDesc)(exports.file_versori_credential_v1alpha1_credential_service, 0);
|
|
@@ -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"}
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlatformAPIClient = void 0;
|
|
4
4
|
const constants_js_1 = require("./constants.js");
|
|
5
5
|
const internalauth_js_1 = require("./internalauth.js");
|
|
6
|
+
const mod_js_1 = require("../../../mod.js");
|
|
7
|
+
const activation_js_1 = require("./activation.js");
|
|
6
8
|
class PlatformAPIClient {
|
|
7
|
-
constructor(baseUrl, orgId, envId) {
|
|
9
|
+
constructor(baseUrl, orgId, envId, log) {
|
|
8
10
|
Object.defineProperty(this, "baseUrl", {
|
|
9
11
|
enumerable: true,
|
|
10
12
|
configurable: true,
|
|
@@ -29,19 +31,27 @@ class PlatformAPIClient {
|
|
|
29
31
|
writable: true,
|
|
30
32
|
value: void 0
|
|
31
33
|
});
|
|
34
|
+
Object.defineProperty(this, "log", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: void 0
|
|
39
|
+
});
|
|
32
40
|
this.baseUrl = baseUrl;
|
|
33
41
|
this.orgId = orgId;
|
|
34
42
|
this.envId = envId;
|
|
35
43
|
this.internalAuth = new internalauth_js_1.InternalAuth();
|
|
44
|
+
this.log = log;
|
|
36
45
|
}
|
|
37
46
|
static fromEnv() {
|
|
38
47
|
const baseUrl = Deno.env.get(constants_js_1.envVarPlatformApiBaseURL);
|
|
39
48
|
const orgId = Deno.env.get(constants_js_1.envVarOrgId);
|
|
40
49
|
const envId = Deno.env.get(constants_js_1.envVarEnvId);
|
|
50
|
+
const log = new mod_js_1.ConsoleLogger('debug');
|
|
41
51
|
if (!baseUrl || !orgId || !envId) {
|
|
42
52
|
throw new Error('Missing required environment variables');
|
|
43
53
|
}
|
|
44
|
-
return new PlatformAPIClient(baseUrl, orgId, envId);
|
|
54
|
+
return new PlatformAPIClient(baseUrl, orgId, envId, log);
|
|
45
55
|
}
|
|
46
56
|
async getStaticConnection(cnxId) {
|
|
47
57
|
const resp = await fetch(`${this.baseUrl}/o/${this.orgId}/connections/${cnxId}`, {
|
|
@@ -64,7 +74,10 @@ class PlatformAPIClient {
|
|
|
64
74
|
if (!resp.ok) {
|
|
65
75
|
return [];
|
|
66
76
|
}
|
|
67
|
-
const
|
|
77
|
+
const activations = (await resp.json());
|
|
78
|
+
const result = activations.map((act) => {
|
|
79
|
+
return new activation_js_1.ActivationImpl(act.id, act.user, this, this.log, act.dynamicVariables);
|
|
80
|
+
});
|
|
68
81
|
return result;
|
|
69
82
|
}
|
|
70
83
|
async getActivation(activationId) {
|
|
@@ -76,8 +89,8 @@ class PlatformAPIClient {
|
|
|
76
89
|
if (!resp.ok) {
|
|
77
90
|
return undefined;
|
|
78
91
|
}
|
|
79
|
-
const
|
|
80
|
-
return
|
|
92
|
+
const act = (await resp.json());
|
|
93
|
+
return new activation_js_1.ActivationImpl(act.id, act.user, this, this.log, act.dynamicVariables);
|
|
81
94
|
}
|
|
82
95
|
async getActivationConnection(templateId, activationId) {
|
|
83
96
|
const resp = await fetch(`${this.baseUrl}/o/${this.orgId}/environment-systems/${templateId}/activations/${activationId}`, {
|
|
@@ -100,8 +113,27 @@ class PlatformAPIClient {
|
|
|
100
113
|
if (!resp.ok) {
|
|
101
114
|
return [];
|
|
102
115
|
}
|
|
103
|
-
const
|
|
116
|
+
const activations = (await resp.json());
|
|
117
|
+
const result = activations.map((act) => {
|
|
118
|
+
return new activation_js_1.ActivationImpl(act.id, act.user, this, this.log, act.dynamicVariables);
|
|
119
|
+
});
|
|
104
120
|
return result;
|
|
105
121
|
}
|
|
122
|
+
async updateDynamicVariable(activationId, name, value) {
|
|
123
|
+
this.log.debug(`value is ${JSON.stringify(value)}`);
|
|
124
|
+
const resp = await fetch(`${this.baseUrl}/o/${this.orgId}/environments/${this.envId}/activations/${activationId}/variables/${name}`, {
|
|
125
|
+
method: 'PUT',
|
|
126
|
+
headers: {
|
|
127
|
+
'x-versori-internal-token': await this.internalAuth.getToken(),
|
|
128
|
+
'Content-Type': 'application/json',
|
|
129
|
+
},
|
|
130
|
+
body: JSON.stringify({
|
|
131
|
+
value,
|
|
132
|
+
}),
|
|
133
|
+
});
|
|
134
|
+
if (!resp.ok) {
|
|
135
|
+
throw new Error(`Failed to update dynamic variable ${name}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
106
138
|
}
|
|
107
139
|
exports.PlatformAPIClient = PlatformAPIClient;
|