@versori/run 0.0.1-alpha.1 → 0.0.1-alpha.2
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/esm/src/dsl/http/default.d.ts +23 -0
- package/esm/src/dsl/http/default.d.ts.map +1 -0
- package/esm/src/dsl/http/default.js +25 -0
- package/esm/src/dsl/http/types.d.ts +53 -0
- package/esm/src/dsl/http/types.d.ts.map +1 -0
- package/esm/src/dsl/http/types.js +2 -0
- package/esm/src/dsl/http/versori/configloader.d.ts +12 -0
- package/esm/src/dsl/http/versori/configloader.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/configloader.js +14 -0
- package/esm/src/dsl/http/versori/connectapi.d.ts +11 -0
- package/esm/src/dsl/http/versori/connectapi.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/connectapi.js +57 -0
- package/esm/src/dsl/http/versori/credentials/client.d.ts +10 -0
- package/esm/src/dsl/http/versori/credentials/client.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/client.js +30 -0
- package/esm/src/dsl/http/versori/credentials/credentials.d.ts +42 -0
- package/esm/src/dsl/http/versori/credentials/credentials.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/credentials.js +34 -0
- package/esm/src/dsl/http/versori/credentials/mod.d.ts +2 -0
- package/esm/src/dsl/http/versori/credentials/mod.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/mod.js +1 -0
- package/esm/src/dsl/http/versori/credentials/oauth2/v1/token_pb.d.ts +10 -0
- package/esm/src/dsl/http/versori/credentials/oauth2/v1/token_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/oauth2/v1/token_pb.js +14 -0
- package/esm/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.d.ts +69 -0
- package/esm/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.js +76 -0
- package/esm/src/dsl/http/versori/credentials/tokens/v1/token_pb.d.ts +10 -0
- package/esm/src/dsl/http/versori/credentials/tokens/v1/token_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/tokens/v1/token_pb.js +14 -0
- package/esm/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.d.ts +34 -0
- package/esm/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.js +40 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/credential_pb.d.ts +165 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/credential_pb.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/credentials/v1alpha1/credential_pb.js +155 -0
- package/esm/src/dsl/http/versori/internalauth.d.ts +10 -0
- package/esm/src/dsl/http/versori/internalauth.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/internalauth.js +67 -0
- package/esm/src/dsl/http/versori/roundtripper.d.ts +31 -0
- package/esm/src/dsl/http/versori/roundtripper.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/roundtripper.js +218 -0
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +2 -0
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +10 -0
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts +2 -0
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/http.js +3 -1
- package/package.json +4 -1
- package/script/src/dsl/http/default.d.ts +23 -0
- package/script/src/dsl/http/default.d.ts.map +1 -0
- package/script/src/dsl/http/default.js +29 -0
- package/script/src/dsl/http/types.d.ts +53 -0
- package/script/src/dsl/http/types.d.ts.map +1 -0
- package/script/src/dsl/http/types.js +3 -0
- package/script/src/dsl/http/versori/configloader.d.ts +12 -0
- package/script/src/dsl/http/versori/configloader.d.ts.map +1 -0
- package/script/src/dsl/http/versori/configloader.js +40 -0
- package/script/src/dsl/http/versori/connectapi.d.ts +11 -0
- package/script/src/dsl/http/versori/connectapi.d.ts.map +1 -0
- package/script/src/dsl/http/versori/connectapi.js +61 -0
- package/script/src/dsl/http/versori/credentials/client.d.ts +10 -0
- package/script/src/dsl/http/versori/credentials/client.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/client.js +32 -0
- package/script/src/dsl/http/versori/credentials/credentials.d.ts +42 -0
- package/script/src/dsl/http/versori/credentials/credentials.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/credentials.js +38 -0
- package/script/src/dsl/http/versori/credentials/mod.d.ts +2 -0
- package/script/src/dsl/http/versori/credentials/mod.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/mod.js +5 -0
- package/script/src/dsl/http/versori/credentials/oauth2/v1/token_pb.d.ts +10 -0
- package/script/src/dsl/http/versori/credentials/oauth2/v1/token_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/oauth2/v1/token_pb.js +17 -0
- package/script/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.d.ts +69 -0
- package/script/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.js +79 -0
- package/script/src/dsl/http/versori/credentials/tokens/v1/token_pb.d.ts +10 -0
- package/script/src/dsl/http/versori/credentials/tokens/v1/token_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/tokens/v1/token_pb.js +17 -0
- package/script/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.d.ts +34 -0
- package/script/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.js +43 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/credential_pb.d.ts +165 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/credential_pb.d.ts.map +1 -0
- package/script/src/dsl/http/versori/credentials/v1alpha1/credential_pb.js +158 -0
- package/script/src/dsl/http/versori/internalauth.d.ts +10 -0
- package/script/src/dsl/http/versori/internalauth.d.ts.map +1 -0
- package/script/src/dsl/http/versori/internalauth.js +94 -0
- package/script/src/dsl/http/versori/roundtripper.d.ts +31 -0
- package/script/src/dsl/http/versori/roundtripper.d.ts.map +1 -0
- package/script/src/dsl/http/versori/roundtripper.js +246 -0
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +2 -0
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +10 -0
- package/script/src/interpreter/memory/ObservableCompiler.d.ts +2 -0
- package/script/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/http.js +3 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DynamicFetcher, RoundTripperFactory } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A factory class for creating a default round tripper.
|
|
4
|
+
* This class is used to provide a default implementation for initializing
|
|
5
|
+
* if no round tripper factory is given.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DefaultRoundTripperFactory implements RoundTripperFactory {
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a new instance of the DefaultRoundTripperFactory.
|
|
10
|
+
*/
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Creates a round tripper function.
|
|
14
|
+
* This implementation simply returns the fetch function passed to it.
|
|
15
|
+
*
|
|
16
|
+
* @param connName - The name of the connection.
|
|
17
|
+
* @param fn - The fetch function to be used. Defaults to the global fetch function.
|
|
18
|
+
* @returns A promise that resolves to the fetch function.
|
|
19
|
+
*/
|
|
20
|
+
create(connName: string, fn?: typeof fetch): Promise<typeof fetch>;
|
|
21
|
+
createDynamic(templateName: string, fn: typeof fetch): Promise<DynamicFetcher>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/src/dsl/http/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjE;;;;GAIG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;IAClE;;OAEG;;IAGH;;;;;;;OAOG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAE,OAAO,KAAa,GAAG,OAAO,CAAC,OAAO,KAAK,CAAC;IAIzE,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC;CAGvF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A factory class for creating a default round tripper.
|
|
3
|
+
* This class is used to provide a default implementation for initializing
|
|
4
|
+
* if no round tripper factory is given.
|
|
5
|
+
*/
|
|
6
|
+
export class DefaultRoundTripperFactory {
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new instance of the DefaultRoundTripperFactory.
|
|
9
|
+
*/
|
|
10
|
+
constructor() { }
|
|
11
|
+
/**
|
|
12
|
+
* Creates a round tripper function.
|
|
13
|
+
* This implementation simply returns the fetch function passed to it.
|
|
14
|
+
*
|
|
15
|
+
* @param connName - The name of the connection.
|
|
16
|
+
* @param fn - The fetch function to be used. Defaults to the global fetch function.
|
|
17
|
+
* @returns A promise that resolves to the fetch function.
|
|
18
|
+
*/
|
|
19
|
+
async create(connName, fn = fetch) {
|
|
20
|
+
return fn;
|
|
21
|
+
}
|
|
22
|
+
async createDynamic(templateName, fn) {
|
|
23
|
+
throw new Error('Method not implemented.');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface DynamicContext {
|
|
2
|
+
getUserId(): string | undefined;
|
|
3
|
+
}
|
|
4
|
+
export type DynamicFetcher = (ctx: DynamicContext, input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
5
|
+
export interface RoundTripperFactory {
|
|
6
|
+
create(connName: string, fn: typeof fetch): Promise<typeof fetch>;
|
|
7
|
+
createDynamic(templateName: string, fn: typeof fetch): Promise<DynamicFetcher>;
|
|
8
|
+
}
|
|
9
|
+
export type AuthSchemeConfig = {
|
|
10
|
+
schemeType: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
export type Credential = {
|
|
14
|
+
data: Record<string, string>;
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
organisationId: string;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
export type ConnectionCredential = {
|
|
21
|
+
authSchemeConfig: AuthSchemeConfig;
|
|
22
|
+
credential: Credential;
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
export type Connection = {
|
|
26
|
+
createdAt: string;
|
|
27
|
+
credentials: {
|
|
28
|
+
action: ConnectionCredential[];
|
|
29
|
+
trigger: ConnectionCredential[];
|
|
30
|
+
};
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
variables: Record<string, string>[];
|
|
35
|
+
};
|
|
36
|
+
export type System = {
|
|
37
|
+
documentationUrl: string;
|
|
38
|
+
name: string;
|
|
39
|
+
protocol: string;
|
|
40
|
+
variablesSchema: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type ConfigConnection = {
|
|
45
|
+
id?: string;
|
|
46
|
+
name: string;
|
|
47
|
+
authSchemeConfig: AuthSchemeConfig;
|
|
48
|
+
};
|
|
49
|
+
export type VersoriSDKConfig = {
|
|
50
|
+
systems: System[];
|
|
51
|
+
connections: Connection[];
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@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F,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACtB,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,gBAAgB,CAAC;CACtC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VersoriSDKConfig } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Loads the Versori SDK configuration from a JSON file.
|
|
4
|
+
*
|
|
5
|
+
* This function reads the 'versori.json' file synchronously and parses its content
|
|
6
|
+
* into a `VersoriSDKConfig` object. This assumes the config file is in the root where
|
|
7
|
+
* the application is run.
|
|
8
|
+
*
|
|
9
|
+
* @returns {VersoriSDKConfig} The parsed configuration object.
|
|
10
|
+
*/
|
|
11
|
+
export declare function LoadConfigFromJSON(): VersoriSDKConfig;
|
|
12
|
+
//# sourceMappingURL=configloader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configloader.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/configloader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CAIrD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as dntShim from "../../../../_dnt.shims.js";
|
|
2
|
+
/**
|
|
3
|
+
* Loads the Versori SDK configuration from a JSON file.
|
|
4
|
+
*
|
|
5
|
+
* This function reads the 'versori.json' file synchronously and parses its content
|
|
6
|
+
* into a `VersoriSDKConfig` object. This assumes the config file is in the root where
|
|
7
|
+
* the application is run.
|
|
8
|
+
*
|
|
9
|
+
* @returns {VersoriSDKConfig} The parsed configuration object.
|
|
10
|
+
*/
|
|
11
|
+
export function LoadConfigFromJSON() {
|
|
12
|
+
const cfg = JSON.parse(dntShim.Deno.readTextFileSync('versori.json'));
|
|
13
|
+
return cfg;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Connection } from '../types.js';
|
|
2
|
+
export declare class ConnectAPIClient {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private orgId;
|
|
5
|
+
private serviceConnId;
|
|
6
|
+
private internalAuth;
|
|
7
|
+
private cache;
|
|
8
|
+
constructor(baseUrl: string, orgId: string, serviceConnId: string, cache?: Record<string, Connection>);
|
|
9
|
+
getConnection(cnxId: string): Promise<Connection | undefined>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=connectapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectapi.d.ts","sourceRoot":"","sources":["../../../../../src/src/dsl/http/versori/connectapi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,qBAAa,gBAAgB;IACzB,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,YAAY,CAAe;IAEnC,OAAO,CAAC,KAAK,CAA6B;gBAGtC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAM;IASpC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;CAwBtE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { InternalAuth } from './internalauth.js';
|
|
2
|
+
export class ConnectAPIClient {
|
|
3
|
+
constructor(baseUrl, orgId, serviceConnId, cache = {} // for now this is an in-memory cache
|
|
4
|
+
) {
|
|
5
|
+
Object.defineProperty(this, "baseUrl", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true,
|
|
9
|
+
value: void 0
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(this, "orgId", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "serviceConnId", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: void 0
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "internalAuth", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "cache", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: void 0
|
|
34
|
+
});
|
|
35
|
+
this.baseUrl = baseUrl;
|
|
36
|
+
this.orgId = orgId;
|
|
37
|
+
this.cache = cache;
|
|
38
|
+
this.serviceConnId = serviceConnId;
|
|
39
|
+
this.internalAuth = new InternalAuth();
|
|
40
|
+
}
|
|
41
|
+
async getConnection(cnxId) {
|
|
42
|
+
if (this.cache[cnxId]) {
|
|
43
|
+
return this.cache[cnxId];
|
|
44
|
+
}
|
|
45
|
+
const resp = await fetch(`${this.baseUrl}/connect/v1/o/${this.orgId}/connectors/${this.serviceConnId}/connections/${cnxId}`, {
|
|
46
|
+
headers: {
|
|
47
|
+
'x-versori-internal-token': await this.internalAuth.getToken(),
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
if (!resp.ok) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
const result = (await resp.json());
|
|
54
|
+
this.cache[cnxId] = result;
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GetAccessTokenResponse } from './oauth2/v1/token_service_pb.js';
|
|
2
|
+
import { GetTokenResponse } from './tokens/v1/token_service_pb.js';
|
|
3
|
+
export declare class VersoriCredentialClient {
|
|
4
|
+
private oauth2Client;
|
|
5
|
+
private TokenService;
|
|
6
|
+
constructor(credsBaseUrl: string);
|
|
7
|
+
getToken(credId: string): Promise<GetTokenResponse>;
|
|
8
|
+
getOAuth2Token(credId: string): Promise<GetAccessTokenResponse>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/src/dsl/http/versori/credentials/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,qBAAa,uBAAuB;IAChC,OAAO,CAAC,YAAY,CAAoB;IAExC,OAAO,CAAC,YAAY,CAAc;gBAMtB,YAAY,EAAE,MAAM;IAMhC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAInD,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAGlE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createOAuth2TokenService, createTokenClient,
|
|
2
|
+
// createCredentialService,
|
|
3
|
+
} from './credentials.js';
|
|
4
|
+
export class VersoriCredentialClient {
|
|
5
|
+
// private CredentialService: CredentialService;
|
|
6
|
+
// need to add custom function service
|
|
7
|
+
constructor(credsBaseUrl) {
|
|
8
|
+
Object.defineProperty(this, "oauth2Client", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
configurable: true,
|
|
11
|
+
writable: true,
|
|
12
|
+
value: void 0
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(this, "TokenService", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: void 0
|
|
19
|
+
});
|
|
20
|
+
this.oauth2Client = createOAuth2TokenService(credsBaseUrl);
|
|
21
|
+
this.TokenService = createTokenClient(credsBaseUrl);
|
|
22
|
+
// this.CredentialService = createCredentialService(credsBaseUrl);
|
|
23
|
+
}
|
|
24
|
+
getToken(credId) {
|
|
25
|
+
return this.TokenService.getToken({ credentialId: credId });
|
|
26
|
+
}
|
|
27
|
+
getOAuth2Token(credId) {
|
|
28
|
+
return this.oauth2Client.getAccessToken({ credentialId: credId });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare function createTokenClient(baseUrl?: string): import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
2
|
+
getToken: {
|
|
3
|
+
methodKind: "unary";
|
|
4
|
+
input: typeof import("./tokens/v1/token_service_pb.js").GetTokenRequestSchema;
|
|
5
|
+
output: typeof import("./tokens/v1/token_service_pb.js").GetTokenResponseSchema;
|
|
6
|
+
};
|
|
7
|
+
checkExpiry: {
|
|
8
|
+
methodKind: "unary";
|
|
9
|
+
input: typeof import("./tokens/v1/token_service_pb.js").CheckExpiryRequestSchema;
|
|
10
|
+
output: typeof import("./tokens/v1/token_service_pb.js").CheckExpiryResponseSchema;
|
|
11
|
+
};
|
|
12
|
+
}>>;
|
|
13
|
+
export type TokenClient = ReturnType<typeof createTokenClient>;
|
|
14
|
+
export declare function createOAuth2TokenService(baseUrl?: string): import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
15
|
+
getAccessToken: {
|
|
16
|
+
methodKind: "unary";
|
|
17
|
+
input: typeof import("./oauth2/v1/token_service_pb.js").GetAccessTokenRequestSchema;
|
|
18
|
+
output: typeof import("./oauth2/v1/token_service_pb.js").GetAccessTokenResponseSchema;
|
|
19
|
+
};
|
|
20
|
+
handleAuthorizationCallback: {
|
|
21
|
+
methodKind: "unary";
|
|
22
|
+
input: typeof import("./oauth2/v1/token_service_pb.js").HandleAuthorizationCallbackRequestSchema;
|
|
23
|
+
output: typeof import("./oauth2/v1/token_service_pb.js").HandleAuthorizationCallbackResponseSchema;
|
|
24
|
+
};
|
|
25
|
+
checkExpiry: {
|
|
26
|
+
methodKind: "unary";
|
|
27
|
+
input: typeof import("./oauth2/v1/token_service_pb.js").CheckExpiryRequestSchema;
|
|
28
|
+
output: typeof import("./oauth2/v1/token_service_pb.js").CheckExpiryResponseSchema;
|
|
29
|
+
};
|
|
30
|
+
createClientCredentialToken: {
|
|
31
|
+
methodKind: "unary";
|
|
32
|
+
input: typeof import("./oauth2/v1/token_service_pb.js").CreateClientCredentialTokenRequestSchema;
|
|
33
|
+
output: typeof import("./oauth2/v1/token_service_pb.js").CreateClientCredentialTokenResponseSchema;
|
|
34
|
+
};
|
|
35
|
+
createResourceOwnerCredential: {
|
|
36
|
+
methodKind: "unary";
|
|
37
|
+
input: typeof import("./oauth2/v1/token_service_pb.js").CreateResourceOwnerCredentialRequestSchema;
|
|
38
|
+
output: typeof import("./oauth2/v1/token_service_pb.js").CreateResourceOwnerCredentialResponseSchema;
|
|
39
|
+
};
|
|
40
|
+
}>>;
|
|
41
|
+
export type OAuth2TokenClient = ReturnType<typeof createOAuth2TokenService>;
|
|
42
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createClient } from '@connectrpc/connect';
|
|
2
|
+
import { createGrpcTransport } from '@connectrpc/connect-node';
|
|
3
|
+
import { TokenService } from './tokens/v1/token_service_pb.js';
|
|
4
|
+
import { OAuth2TokenService } from './oauth2/v1/token_service_pb.js';
|
|
5
|
+
// // @deno-types="./v1alpha1/credential_service_pb.d.ts"
|
|
6
|
+
// import { CredentialService } from './v1alpha1/credential_service_pb.js';
|
|
7
|
+
// // @deno-types="./customauth/v1/customauth_service_pb.d.ts"
|
|
8
|
+
// import { CustomAuthenticationService } from './customauth/v1/customauth_service_pb.d.ts';
|
|
9
|
+
export function createTokenClient(baseUrl = 'http://localhost:9000') {
|
|
10
|
+
const transport = createGrpcTransport({
|
|
11
|
+
baseUrl,
|
|
12
|
+
});
|
|
13
|
+
return createClient(TokenService, transport);
|
|
14
|
+
}
|
|
15
|
+
export function createOAuth2TokenService(baseUrl = 'http://localhost:9000') {
|
|
16
|
+
const transport = createGrpcTransport({
|
|
17
|
+
baseUrl,
|
|
18
|
+
});
|
|
19
|
+
return createClient(OAuth2TokenService, transport);
|
|
20
|
+
}
|
|
21
|
+
// export function createCredentialService(baseUrl: string = 'http://localhost:9000') {
|
|
22
|
+
// const transport = createGrpcTransport({
|
|
23
|
+
// baseUrl,
|
|
24
|
+
// });
|
|
25
|
+
// return createClient(CredentialService, transport);
|
|
26
|
+
// }
|
|
27
|
+
// export type CredentialService = ReturnType<typeof createCredentialService>;
|
|
28
|
+
// export function createCustomAuthService(baseUrl: string = 'http://localhost:9000') {
|
|
29
|
+
// const transport = createGrpcTransport({
|
|
30
|
+
// baseUrl,
|
|
31
|
+
// });
|
|
32
|
+
// return createClient(CustomAuthenticationService, transport);
|
|
33
|
+
// }
|
|
34
|
+
// export type CustomAuthClient = ReturnType<typeof createCustomAuthService>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/src/dsl/http/versori/credentials/mod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VersoriCredentialClient } from './client.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the file versori/credential/oauth2/v1/token.proto.
|
|
3
|
+
*/
|
|
4
|
+
export const file_versori_credential_oauth2_v1_token: import("@bufbuild/protobuf").DescFile;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the message versori.credential.oauth2.v1.Token.
|
|
7
|
+
* Use `create(TokenSchema)` to create a new message.
|
|
8
|
+
*/
|
|
9
|
+
export const TokenSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
10
|
+
//# sourceMappingURL=token_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token_pb.d.ts","sourceRoot":"","sources":["../../../../../../../../src/src/dsl/http/versori/credentials/oauth2/v1/token_pb.js"],"names":[],"mappings":"AAOA;;GAEG;AACH,4FACiV;AAEjV;;;GAGG;AACH,0JAC0D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.2.3
|
|
2
|
+
// @generated from file versori/credential/oauth2/v1/token.proto (package versori.credential.oauth2.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
|
|
5
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
/**
|
|
7
|
+
* Describes the file versori/credential/oauth2/v1/token.proto.
|
|
8
|
+
*/
|
|
9
|
+
export const file_versori_credential_oauth2_v1_token = /*@__PURE__*/ fileDesc("Cih2ZXJzb3JpL2NyZWRlbnRpYWwvb2F1dGgyL3YxL3Rva2VuLnByb3RvEhx2ZXJzb3JpLmNyZWRlbnRpYWwub2F1dGgyLnYxIl0KBVRva2VuEhQKDGFjY2Vzc190b2tlbhgBIAEoCRISCgp0b2tlbl90eXBlGAIgASgJEioKBmV4cGlyeRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCJ1oldmVyc29yaS5kZXYvY3JlZGVudGlhbHMvYXBpL29hdXRoMi92MWIGcHJvdG8z", [file_google_protobuf_timestamp]);
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message versori.credential.oauth2.v1.Token.
|
|
12
|
+
* Use `create(TokenSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const TokenSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token, 0);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the file versori/credential/oauth2/v1/token_service.proto.
|
|
3
|
+
*/
|
|
4
|
+
export const file_versori_credential_oauth2_v1_token_service: import("@bufbuild/protobuf").DescFile;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the message versori.credential.oauth2.v1.GetAccessTokenRequest.
|
|
7
|
+
* Use `create(GetAccessTokenRequestSchema)` to create a new message.
|
|
8
|
+
*/
|
|
9
|
+
export const GetAccessTokenRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message versori.credential.oauth2.v1.GetAccessTokenResponse.
|
|
12
|
+
* Use `create(GetAccessTokenResponseSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const GetAccessTokenResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message versori.credential.oauth2.v1.HandleAuthorizationCallbackRequest.
|
|
17
|
+
* Use `create(HandleAuthorizationCallbackRequestSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
export const HandleAuthorizationCallbackRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message versori.credential.oauth2.v1.HandleAuthorizationCallbackResponse.
|
|
22
|
+
* Use `create(HandleAuthorizationCallbackResponseSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const HandleAuthorizationCallbackResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message versori.credential.oauth2.v1.CheckExpiryRequest.
|
|
27
|
+
* Use `create(CheckExpiryRequestSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const CheckExpiryRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message versori.credential.oauth2.v1.CheckExpiryResponse.
|
|
32
|
+
* Use `create(CheckExpiryResponseSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const CheckExpiryResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message versori.credential.oauth2.v1.CreateClientCredentialTokenRequest.
|
|
37
|
+
* Use `create(CreateClientCredentialTokenRequestSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
export const CreateClientCredentialTokenRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message versori.credential.oauth2.v1.CreateClientCredentialTokenRequest.ClientConfig.
|
|
42
|
+
* Use `create(CreateClientCredentialTokenRequest_ClientConfigSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export const CreateClientCredentialTokenRequest_ClientConfigSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
45
|
+
/**
|
|
46
|
+
* Describes the message versori.credential.oauth2.v1.CreateClientCredentialTokenResponse.
|
|
47
|
+
* Use `create(CreateClientCredentialTokenResponseSchema)` to create a new message.
|
|
48
|
+
*/
|
|
49
|
+
export const CreateClientCredentialTokenResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
50
|
+
/**
|
|
51
|
+
* Describes the message versori.credential.oauth2.v1.CreateResourceOwnerCredentialRequest.
|
|
52
|
+
* Use `create(CreateResourceOwnerCredentialRequestSchema)` to create a new message.
|
|
53
|
+
*/
|
|
54
|
+
export const CreateResourceOwnerCredentialRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message versori.credential.oauth2.v1.CreateResourceOwnerCredentialResponse.
|
|
57
|
+
* Use `create(CreateResourceOwnerCredentialResponseSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export const CreateResourceOwnerCredentialResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
60
|
+
/**
|
|
61
|
+
* OAuth2TokenService wraps the CredentialService and provides capability specifically around OAuth 2.0.
|
|
62
|
+
*
|
|
63
|
+
* This service should never be exposed to the outside world and is only for internal use of configuring new connections
|
|
64
|
+
* between Apps and organisations, and the execution of boards on behalf of organisations.
|
|
65
|
+
*
|
|
66
|
+
* @generated from service versori.credential.oauth2.v1.OAuth2TokenService
|
|
67
|
+
*/
|
|
68
|
+
export const OAuth2TokenService: import("@bufbuild/protobuf/codegenv1").GenService<import("@bufbuild/protobuf/codegenv1").GenServiceMethods>;
|
|
69
|
+
//# sourceMappingURL=token_service_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../../../src/src/dsl/http/versori/credentials/oauth2/v1/token_service_pb.js"],"names":[],"mappings":"AAWA;;GAEG;AACH,oGAC8rH;AAE9rH;;;GAGG;AACH,0KACkE;AAElE;;;GAGG;AACH,2KACkE;AAElE;;;GAGG;AACH,uLACkE;AAElE;;;GAGG;AACH,wLACkE;AAElE;;;GAGG;AACH,uKACkE;AAElE;;;GAGG;AACH,wKACkE;AAElE;;;GAGG;AACH,uLACkE;AAElE;;;GAGG;AACH,oMACqE;AAErE;;;GAGG;AACH,wLACkE;AAElE;;;GAGG;AACH,yLACkE;AAElE;;;GAGG;AACH,0LACkE;AAElE;;;;;;;GAOG;AACH,6IACkE"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.2.3
|
|
2
|
+
// @generated from file versori/credential/oauth2/v1/token_service.proto (package versori.credential.oauth2.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
|
5
|
+
import { file_google_protobuf_duration, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
// import { file_validate_validate } from "../../../../validate/validate_pb.js";
|
|
7
|
+
import { file_versori_credential_oauth2_v1_token } from "./token_pb.js";
|
|
8
|
+
import { file_versori_credential_v1alpha1_credential } from "../../v1alpha1/credential_pb.js";
|
|
9
|
+
/**
|
|
10
|
+
* Describes the file versori/credential/oauth2/v1/token_service.proto.
|
|
11
|
+
*/
|
|
12
|
+
export const file_versori_credential_oauth2_v1_token_service = /*@__PURE__*/ fileDesc("CjB2ZXJzb3JpL2NyZWRlbnRpYWwvb2F1dGgyL3YxL3Rva2VuX3NlcnZpY2UucHJvdG8SHHZlcnNvcmkuY3JlZGVudGlhbC5vYXV0aDIudjEiLgoVR2V0QWNjZXNzVG9rZW5SZXF1ZXN0EhUKDWNyZWRlbnRpYWxfaWQYASABKAkiTAoWR2V0QWNjZXNzVG9rZW5SZXNwb25zZRIyCgV0b2tlbhgBIAEoCzIjLnZlcnNvcmkuY3JlZGVudGlhbC5vYXV0aDIudjEuVG9rZW4i+AEKIkhhbmRsZUF1dGhvcml6YXRpb25DYWxsYmFja1JlcXVlc3QSHAoUY2xpZW50X2NyZWRlbnRpYWxfaWQYASABKAkSHQoVcmVmcmVzaF9jcmVkZW50aWFsX2lkGAIgASgJEhcKD29yZ2FuaXNhdGlvbl9pZBgDIAEoCRIMCgRjb2RlGAQgASgJEgwKBG5hbWUYBSABKAkSFAoMcmVkaXJlY3RfdXJpGAYgASgJEhkKEWFkZGl0aW9uYWxfcGFyYW1zGAcgASgJEhQKDHNraXBfc3RvcmFnZRgIIAEoCBIZChFyZXR1cm5fdW5yZWRhY3RlZBgJIAEoCCLgAQojSGFuZGxlQXV0aG9yaXphdGlvbkNhbGxiYWNrUmVzcG9uc2USQQoQdG9rZW5fY3JlZGVudGlhbBgBIAEoCzInLnZlcnNvcmkuY3JlZGVudGlhbC52MWFscG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mRsZUF1dGhvcml6YXRpb25DYWxsYmFja1Jlc3BvbnNlEnIKC0NoZWNrRXhwaXJ5EjAudmVyc29yaS5jcmVkZW50aWFsLm9hdXRoMi52MS5DaGVja0V4cGlyeVJlcXVlc3QaMS52ZXJzb3JpLmNyZWRlbnRpYWwub2F1dGgyLnYxLkNoZWNrRXhwaXJ5UmVzcG9uc2USogEKG0NyZWF0ZUNsaWVudENyZWRlbnRpYWxUb2tlbhJALnZlcnNvcmkuY3JlZGVudGlhbC5vYXV0aDIudjEuQ3JlYXRlQ2xpZW50Q3JlZGVudGlhbFRva2VuUmVxdWVzdBpBLnZlcnNvcmkuY3JlZGVudGlhbC5vYXV0aDIudjEuQ3JlYXRlQ2xpZW50Q3JlZGVudGlhbFRva2VuUmVzcG9uc2USqAEKHUNyZWF0ZVJlc291cmNlT3duZXJDcmVkZW50aWFsEkIudmVyc29yaS5jcmVkZW50aWFsLm9hdXRoMi52MS5DcmVhdGVSZXNvdXJjZU93bmVyQ3JlZGVudGlhbFJlcXVlc3QaQy52ZXJzb3JpLmNyZWRlbnRpYWwub2F1dGgyLnYxLkNyZWF0ZVJlc291cmNlT3duZXJDcmVkZW50aWFsUmVzcG9uc2VCJ1oldmVyc29yaS5kZXYvY3JlZGVudGlhbHMvYXBpL29hdXRoMi92MWIGcHJvdG8z", [file_google_protobuf_timestamp, file_google_protobuf_duration, file_versori_credential_oauth2_v1_token, file_versori_credential_v1alpha1_credential]);
|
|
13
|
+
/**
|
|
14
|
+
* Describes the message versori.credential.oauth2.v1.GetAccessTokenRequest.
|
|
15
|
+
* Use `create(GetAccessTokenRequestSchema)` to create a new message.
|
|
16
|
+
*/
|
|
17
|
+
export const GetAccessTokenRequestSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 0);
|
|
18
|
+
/**
|
|
19
|
+
* Describes the message versori.credential.oauth2.v1.GetAccessTokenResponse.
|
|
20
|
+
* Use `create(GetAccessTokenResponseSchema)` to create a new message.
|
|
21
|
+
*/
|
|
22
|
+
export const GetAccessTokenResponseSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 1);
|
|
23
|
+
/**
|
|
24
|
+
* Describes the message versori.credential.oauth2.v1.HandleAuthorizationCallbackRequest.
|
|
25
|
+
* Use `create(HandleAuthorizationCallbackRequestSchema)` to create a new message.
|
|
26
|
+
*/
|
|
27
|
+
export const HandleAuthorizationCallbackRequestSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 2);
|
|
28
|
+
/**
|
|
29
|
+
* Describes the message versori.credential.oauth2.v1.HandleAuthorizationCallbackResponse.
|
|
30
|
+
* Use `create(HandleAuthorizationCallbackResponseSchema)` to create a new message.
|
|
31
|
+
*/
|
|
32
|
+
export const HandleAuthorizationCallbackResponseSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 3);
|
|
33
|
+
/**
|
|
34
|
+
* Describes the message versori.credential.oauth2.v1.CheckExpiryRequest.
|
|
35
|
+
* Use `create(CheckExpiryRequestSchema)` to create a new message.
|
|
36
|
+
*/
|
|
37
|
+
export const CheckExpiryRequestSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 4);
|
|
38
|
+
/**
|
|
39
|
+
* Describes the message versori.credential.oauth2.v1.CheckExpiryResponse.
|
|
40
|
+
* Use `create(CheckExpiryResponseSchema)` to create a new message.
|
|
41
|
+
*/
|
|
42
|
+
export const CheckExpiryResponseSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 5);
|
|
43
|
+
/**
|
|
44
|
+
* Describes the message versori.credential.oauth2.v1.CreateClientCredentialTokenRequest.
|
|
45
|
+
* Use `create(CreateClientCredentialTokenRequestSchema)` to create a new message.
|
|
46
|
+
*/
|
|
47
|
+
export const CreateClientCredentialTokenRequestSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 6);
|
|
48
|
+
/**
|
|
49
|
+
* Describes the message versori.credential.oauth2.v1.CreateClientCredentialTokenRequest.ClientConfig.
|
|
50
|
+
* Use `create(CreateClientCredentialTokenRequest_ClientConfigSchema)` to create a new message.
|
|
51
|
+
*/
|
|
52
|
+
export const CreateClientCredentialTokenRequest_ClientConfigSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 6, 0);
|
|
53
|
+
/**
|
|
54
|
+
* Describes the message versori.credential.oauth2.v1.CreateClientCredentialTokenResponse.
|
|
55
|
+
* Use `create(CreateClientCredentialTokenResponseSchema)` to create a new message.
|
|
56
|
+
*/
|
|
57
|
+
export const CreateClientCredentialTokenResponseSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 7);
|
|
58
|
+
/**
|
|
59
|
+
* Describes the message versori.credential.oauth2.v1.CreateResourceOwnerCredentialRequest.
|
|
60
|
+
* Use `create(CreateResourceOwnerCredentialRequestSchema)` to create a new message.
|
|
61
|
+
*/
|
|
62
|
+
export const CreateResourceOwnerCredentialRequestSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 8);
|
|
63
|
+
/**
|
|
64
|
+
* Describes the message versori.credential.oauth2.v1.CreateResourceOwnerCredentialResponse.
|
|
65
|
+
* Use `create(CreateResourceOwnerCredentialResponseSchema)` to create a new message.
|
|
66
|
+
*/
|
|
67
|
+
export const CreateResourceOwnerCredentialResponseSchema = /*@__PURE__*/ messageDesc(file_versori_credential_oauth2_v1_token_service, 9);
|
|
68
|
+
/**
|
|
69
|
+
* OAuth2TokenService wraps the CredentialService and provides capability specifically around OAuth 2.0.
|
|
70
|
+
*
|
|
71
|
+
* This service should never be exposed to the outside world and is only for internal use of configuring new connections
|
|
72
|
+
* between Apps and organisations, and the execution of boards on behalf of organisations.
|
|
73
|
+
*
|
|
74
|
+
* @generated from service versori.credential.oauth2.v1.OAuth2TokenService
|
|
75
|
+
*/
|
|
76
|
+
export const OAuth2TokenService = /*@__PURE__*/ serviceDesc(file_versori_credential_oauth2_v1_token_service, 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the file versori/credential/tokens/v1/token.proto.
|
|
3
|
+
*/
|
|
4
|
+
export const file_versori_credential_tokens_v1_token: import("@bufbuild/protobuf").DescFile;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the message versori.credential.tokens.v1.Token.
|
|
7
|
+
* Use `create(TokenSchema)` to create a new message.
|
|
8
|
+
*/
|
|
9
|
+
export const TokenSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
10
|
+
//# sourceMappingURL=token_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token_pb.d.ts","sourceRoot":"","sources":["../../../../../../../../src/src/dsl/http/versori/credentials/tokens/v1/token_pb.js"],"names":[],"mappings":"AAOA;;GAEG;AACH,4FACiV;AAEjV;;;GAGG;AACH,0JAC0D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.2.3
|
|
2
|
+
// @generated from file versori/credential/tokens/v1/token.proto (package versori.credential.tokens.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
|
|
5
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
/**
|
|
7
|
+
* Describes the file versori/credential/tokens/v1/token.proto.
|
|
8
|
+
*/
|
|
9
|
+
export const file_versori_credential_tokens_v1_token = /*@__PURE__*/ fileDesc("Cih2ZXJzb3JpL2NyZWRlbnRpYWwvdG9rZW5zL3YxL3Rva2VuLnByb3RvEhx2ZXJzb3JpLmNyZWRlbnRpYWwudG9rZW5zLnYxIl0KBVRva2VuEhQKDGFjY2Vzc190b2tlbhgBIAEoCRISCgp0b2tlbl90eXBlGAIgASgJEioKBmV4cGlyeRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCJ1oldmVyc29yaS5kZXYvY3JlZGVudGlhbHMvYXBpL3Rva2Vucy92MWIGcHJvdG8z", [file_google_protobuf_timestamp]);
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message versori.credential.tokens.v1.Token.
|
|
12
|
+
* Use `create(TokenSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const TokenSchema = /*@__PURE__*/ messageDesc(file_versori_credential_tokens_v1_token, 0);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the file versori/credential/tokens/v1/token_service.proto.
|
|
3
|
+
*/
|
|
4
|
+
export const file_versori_credential_tokens_v1_token_service: import("@bufbuild/protobuf").DescFile;
|
|
5
|
+
/**
|
|
6
|
+
* Describes the message versori.credential.tokens.v1.GetTokenRequest.
|
|
7
|
+
* Use `create(GetTokenRequestSchema)` to create a new message.
|
|
8
|
+
*/
|
|
9
|
+
export const GetTokenRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Describes the message versori.credential.tokens.v1.GetTokenResponse.
|
|
12
|
+
* Use `create(GetTokenResponseSchema)` to create a new message.
|
|
13
|
+
*/
|
|
14
|
+
export const GetTokenResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message versori.credential.tokens.v1.CheckExpiryRequest.
|
|
17
|
+
* Use `create(CheckExpiryRequestSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
export const CheckExpiryRequestSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message versori.credential.tokens.v1.CheckExpiryResponse.
|
|
22
|
+
* Use `create(CheckExpiryResponseSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const CheckExpiryResponseSchema: import("@bufbuild/protobuf/codegenv1").GenMessage<import("@bufbuild/protobuf").Message, import("@bufbuild/protobuf").JsonValue>;
|
|
25
|
+
/**
|
|
26
|
+
* TokenService wraps the CredentialService and provides capability specifically around OAuth 2.0.
|
|
27
|
+
*
|
|
28
|
+
* This service should never be exposed to the outside world and is only for internal use of configuring new connections
|
|
29
|
+
* between Apps and organisations, and the execution of boards on behalf of organisations.
|
|
30
|
+
*
|
|
31
|
+
* @generated from service versori.credential.tokens.v1.TokenService
|
|
32
|
+
*/
|
|
33
|
+
export const TokenService: import("@bufbuild/protobuf/codegenv1").GenService<import("@bufbuild/protobuf/codegenv1").GenServiceMethods>;
|
|
34
|
+
//# sourceMappingURL=token_service_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token_service_pb.d.ts","sourceRoot":"","sources":["../../../../../../../../src/src/dsl/http/versori/credentials/tokens/v1/token_service_pb.js"],"names":[],"mappings":"AASA;;GAEG;AACH,oGAC6lC;AAE7lC;;;GAGG;AACH,oKACkE;AAElE;;;GAGG;AACH,qKACkE;AAElE;;;GAGG;AACH,uKACkE;AAElE;;;GAGG;AACH,wKACkE;AAElE;;;;;;;GAOG;AACH,uIACkE"}
|