@fossa-app/bridge 0.1.16 → 0.1.18
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/dist/Models/ApiModels/EnvelopeModels.js.map +1 -1
- package/dist/Models/ApiModels/EnvelopeModels.ts +42 -0
- package/dist/Models/ApiModels/PayloadModels.js.map +1 -1
- package/dist/Models/ApiModels/PayloadModels.ts +326 -0
- package/dist/Models/ApiModels/SharedModels.js.map +1 -1
- package/dist/Models/ApiModels/SharedModels.ts +91 -0
- package/dist/Services/Clients/BranchClient.js.map +1 -1
- package/dist/Services/Clients/BranchClient.ts +78 -0
- package/dist/Services/Clients/CompanyClient.js.map +1 -1
- package/dist/Services/Clients/CompanyClient.ts +56 -0
- package/dist/Services/Clients/CompanyLicenseClient.js.map +1 -1
- package/dist/Services/Clients/CompanyLicenseClient.ts +41 -0
- package/dist/Services/Clients/CompanySettingsClient.js.map +1 -1
- package/dist/Services/Clients/CompanySettingsClient.ts +56 -0
- package/dist/Services/Clients/DepartmentClient.js.map +1 -1
- package/dist/Services/Clients/DepartmentClient.ts +78 -0
- package/dist/Services/Clients/EmployeeClient.js.map +1 -1
- package/dist/Services/Clients/EmployeeClient.ts +123 -0
- package/dist/Services/Clients/IBranchClient.js.map +1 -1
- package/dist/Services/Clients/IBranchClient.ts +12 -0
- package/dist/Services/Clients/ICompanyClient.js.map +1 -1
- package/dist/Services/Clients/ICompanyClient.ts +10 -0
- package/dist/Services/Clients/ICompanyLicenseClient.js.map +1 -1
- package/dist/Services/Clients/ICompanyLicenseClient.ts +7 -0
- package/dist/Services/Clients/ICompanySettingsClient.js.map +1 -1
- package/dist/Services/Clients/ICompanySettingsClient.ts +10 -0
- package/dist/Services/Clients/IDepartmentClient.js.map +1 -1
- package/dist/Services/Clients/IDepartmentClient.ts +12 -0
- package/dist/Services/Clients/IEmployeeClient.js.map +1 -1
- package/dist/Services/Clients/IEmployeeClient.ts +17 -0
- package/dist/Services/Clients/IIdentityClient.js.map +1 -1
- package/dist/Services/Clients/IIdentityClient.ts +6 -0
- package/dist/Services/Clients/ISystemLicenseClient.js.map +1 -1
- package/dist/Services/Clients/ISystemLicenseClient.ts +6 -0
- package/dist/Services/Clients/IdentityClient.js.map +1 -1
- package/dist/Services/Clients/IdentityClient.ts +32 -0
- package/dist/Services/Clients/SystemLicenseClient.js.map +1 -1
- package/dist/Services/Clients/SystemLicenseClient.ts +33 -0
- package/dist/Services/Endpoints.js.map +1 -1
- package/dist/Services/Endpoints.ts +22 -0
- package/dist/Services/IHttpTransport.js.map +1 -1
- package/dist/Services/IHttpTransport.ts +10 -0
- package/dist/Services/UrlHelpers.js.map +1 -1
- package/dist/Services/UrlHelpers.ts +107 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
import { IHttpTransport } from "../IHttpTransport.ts";
|
|
3
|
+
import { IIdentityClient } from "./IIdentityClient.ts";
|
|
4
|
+
import { class_type, TypeInfo } from "@fable-org/fable-library-ts/Reflection.ts";
|
|
5
|
+
import { UrlPart, UrlPart_op_Implicit_Z721C83C5, composeRelativeUrl } from "../UrlHelpers.ts";
|
|
6
|
+
import { Client } from "../Endpoints.ts";
|
|
7
|
+
import { singleton } from "@fable-org/fable-library-ts/List.ts";
|
|
8
|
+
import { IdentityClientRetrievalModel } from "../../Models/ApiModels/PayloadModels.ts";
|
|
9
|
+
|
|
10
|
+
export class IdentityClient implements IIdentityClient {
|
|
11
|
+
readonly transport: IHttpTransport;
|
|
12
|
+
constructor(transport: IHttpTransport) {
|
|
13
|
+
this.transport = transport;
|
|
14
|
+
}
|
|
15
|
+
GetClientAsync(origin: string, cancellationToken: any): any {
|
|
16
|
+
const this$: IdentityClient = this;
|
|
17
|
+
return IdentityClient__GetClientAsync_Z6B4EADA7(this$, origin, cancellationToken);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function IdentityClient_$reflection(): TypeInfo {
|
|
22
|
+
return class_type("Fossa.Bridge.Services.Clients.IdentityClient", undefined, IdentityClient);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function IdentityClient_$ctor_Z7C557C0(transport: IHttpTransport): IdentityClient {
|
|
26
|
+
return new IdentityClient(transport);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function IdentityClient__GetClientAsync_Z6B4EADA7(_: IdentityClient, origin: string, cancellationToken: any): any {
|
|
30
|
+
return _.transport.GetAsync<IdentityClientRetrievalModel>(composeRelativeUrl(singleton(UrlPart_op_Implicit_Z721C83C5(Client)), singleton(["origin", UrlPart_op_Implicit_Z721C83C5(origin)] as [string, UrlPart])), cancellationToken);
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SystemLicenseClient.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"SystemLicenseClient.js","sourceRoot":"","sources":["SystemLicenseClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAY,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAW,6BAA6B,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAIvE,MAAM,OAAO,mBAAmB;IACnB,SAAS,CAAiB;IACnC,YAAY,SAAyB;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IACD,eAAe,CAAC,iBAAsB;QAClC,MAAM,KAAK,GAAwB,IAAI,CAAC;QACxC,OAAO,8CAA8C,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;IACpF,CAAC;CACJ;AAED,MAAM,UAAU,+BAA+B;IAC3C,OAAO,UAAU,CAAC,mDAAmD,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAC3G,CAAC;AAED,MAAM,UAAU,kCAAkC,CAAC,SAAyB;IACxE,OAAO,IAAI,mBAAmB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,8CAA8C,CAAC,CAAsB,EAAE,iBAAsB;IACzG,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAkD,kBAAkB,CAAC,SAAS,CAAC,6BAA6B,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,EAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAC7M,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
import { IHttpTransport } from "../IHttpTransport.ts";
|
|
3
|
+
import { ISystemLicenseClient } from "./ISystemLicenseClient.ts";
|
|
4
|
+
import { class_type, TypeInfo } from "@fable-org/fable-library-ts/Reflection.ts";
|
|
5
|
+
import { UrlPart, UrlPart_op_Implicit_Z721C83C5, composeRelativeUrl } from "../UrlHelpers.ts";
|
|
6
|
+
import { SystemLicense } from "../Endpoints.ts";
|
|
7
|
+
import { empty, singleton } from "@fable-org/fable-library-ts/List.ts";
|
|
8
|
+
import { LicenseResponseModel$1 } from "../../Models/ApiModels/EnvelopeModels.ts";
|
|
9
|
+
import { SystemEntitlementsModel } from "../../Models/ApiModels/PayloadModels.ts";
|
|
10
|
+
|
|
11
|
+
export class SystemLicenseClient implements ISystemLicenseClient {
|
|
12
|
+
readonly transport: IHttpTransport;
|
|
13
|
+
constructor(transport: IHttpTransport) {
|
|
14
|
+
this.transport = transport;
|
|
15
|
+
}
|
|
16
|
+
GetLicenseAsync(cancellationToken: any): any {
|
|
17
|
+
const this$: SystemLicenseClient = this;
|
|
18
|
+
return SystemLicenseClient__GetLicenseAsync_Z211DAE3E(this$, cancellationToken);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function SystemLicenseClient_$reflection(): TypeInfo {
|
|
23
|
+
return class_type("Fossa.Bridge.Services.Clients.SystemLicenseClient", undefined, SystemLicenseClient);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function SystemLicenseClient_$ctor_Z7C557C0(transport: IHttpTransport): SystemLicenseClient {
|
|
27
|
+
return new SystemLicenseClient(transport);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function SystemLicenseClient__GetLicenseAsync_Z211DAE3E(_: SystemLicenseClient, cancellationToken: any): any {
|
|
31
|
+
return _.transport.GetAsync<LicenseResponseModel$1<SystemEntitlementsModel>>(composeRelativeUrl(singleton(UrlPart_op_Implicit_Z721C83C5(SystemLicense)), empty<[string, UrlPart]>()), cancellationToken);
|
|
32
|
+
}
|
|
33
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Endpoints.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"Endpoints.js","sourceRoot":"","sources":["Endpoints.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,iBAAiB,CAAC;AAExC,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AAEjC,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEjD,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export const BasePath = "api/1.0";
|
|
4
|
+
|
|
5
|
+
export const Client = "Identity/Client";
|
|
6
|
+
|
|
7
|
+
export const SystemLicense = "License/System";
|
|
8
|
+
|
|
9
|
+
export const CompanyLicense = "License/Company";
|
|
10
|
+
|
|
11
|
+
export const Company = "Company";
|
|
12
|
+
|
|
13
|
+
export const CompanySettings = "CompanySettings";
|
|
14
|
+
|
|
15
|
+
export const Branches = "Branches";
|
|
16
|
+
|
|
17
|
+
export const Departments = "Departments";
|
|
18
|
+
|
|
19
|
+
export const Employee = "Employee";
|
|
20
|
+
|
|
21
|
+
export const Employees = "Employees";
|
|
22
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IHttpTransport.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"IHttpTransport.js","sourceRoot":"","sources":["IHttpTransport.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export interface IHttpTransport {
|
|
4
|
+
DeleteAsync(requestUri: string, cancellationToken: any): any,
|
|
5
|
+
GetAsync<TResponse>(requestUri: string, cancellationToken: any): any,
|
|
6
|
+
PatchAsync<TRequest>(requestUri: string, request: TRequest, cancellationToken: any): any,
|
|
7
|
+
PostAsync<TRequest>(requestUri: string, request: TRequest, cancellationToken: any): any,
|
|
8
|
+
PutAsync<TRequest>(requestUri: string, request: TRequest, cancellationToken: any): any
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UrlHelpers.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"UrlHelpers.js","sourceRoot":"","sources":["UrlHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAc,OAAO,EAAE,MAAM,qCAAqC,CAAC;AACvG,OAAO,EAAE,KAAK,IAAI,OAAO,EAAU,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAyB,MAAM,uCAAuC,CAA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AC,GAAG,EAAE,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAQ,CAAC,CAAqB,CAAC;QAC9E,CAAC;aACI,CAAC;YACF,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAW,CAAqB,CAAC;QACvE,CAAC;IACL,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
|
|
2
|
+
import { isEmpty, cons, map, tryFind, FSharpList, ofArray } from "@fable-org/fable-library-ts/List.ts";
|
|
3
|
+
import { value as value_2, Option } from "@fable-org/fable-library-ts/Option.ts";
|
|
4
|
+
import { join, substring } from "@fable-org/fable-library-ts/String.ts";
|
|
5
|
+
import { FSharpChoice$2_Choice2Of2, FSharpChoice$2_Choice1Of2, FSharpChoice$2_$union } from "@fable-org/fable-library-ts/Choice.ts";
|
|
6
|
+
import { class_type, TypeInfo } from "@fable-org/fable-library-ts/Reflection.ts";
|
|
7
|
+
import { float64, int32 } from "@fable-org/fable-library-ts/Int32.ts";
|
|
8
|
+
import { int64 } from "@fable-org/fable-library-ts/BigInt.ts";
|
|
9
|
+
import { decimal } from "@fable-org/fable-library-ts/Decimal.ts";
|
|
10
|
+
import { BasePath } from "./Endpoints.ts";
|
|
11
|
+
import { escapeDataString } from "@fable-org/fable-library-ts/Util.ts";
|
|
12
|
+
import { toString } from "@fable-org/fable-library-ts/Types.ts";
|
|
13
|
+
|
|
14
|
+
const suffixMappings: FSharpList<[string, string]> = ofArray([[".dev.localhost:4211", ".dev.localhost:5210"] as [string, string], [".test.localhost:4210", ".test.localhost:5211"] as [string, string], [".test.localhost:4211", ".test.localhost:5211"] as [string, string], [".localhost:4210", ".localhost:5210"] as [string, string]]);
|
|
15
|
+
|
|
16
|
+
export function getBackendOrigin(frontendOrigin: string): string {
|
|
17
|
+
const mapping: Option<[string, string]> = tryFind<[string, string]>((tupledArg: [string, string]): boolean => frontendOrigin.endsWith(tupledArg[0]), suffixMappings);
|
|
18
|
+
if (mapping == null) {
|
|
19
|
+
return frontendOrigin;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const frontendSuffix_1: string = value_2(mapping)[0];
|
|
23
|
+
const backendSuffix: string = value_2(mapping)[1];
|
|
24
|
+
return substring(frontendOrigin, 0, frontendOrigin.length - frontendSuffix_1.length) + backendSuffix;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class UrlPart {
|
|
29
|
+
readonly value: FSharpChoice$2_$union<string, any>;
|
|
30
|
+
constructor(value: FSharpChoice$2_$union<string, any>) {
|
|
31
|
+
this.value = value;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function UrlPart_$reflection(): TypeInfo {
|
|
36
|
+
return class_type("Fossa.Bridge.Services.UrlHelpers.UrlPart", undefined, UrlPart);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function UrlPart_$ctor_Z19415666(value: FSharpChoice$2_$union<string, any>): UrlPart {
|
|
40
|
+
return new UrlPart(value);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function UrlPart__get_Value(_: UrlPart): FSharpChoice$2_$union<string, any> {
|
|
44
|
+
return _.value;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function UrlPart_op_Implicit_Z721C83C5(s: string): UrlPart {
|
|
48
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice1Of2<string, any>(s));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function UrlPart_op_Implicit_Z6CAC3EAA(f: any): UrlPart {
|
|
52
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(f));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function UrlPart_op_Implicit_Z1FBCCD16(b: boolean): UrlPart {
|
|
56
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice1Of2<string, any>(b ? "true" : "false"));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function UrlPart_op_Implicit_Z524259A4(i: int32): UrlPart {
|
|
60
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(i));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function UrlPart_op_Implicit_Z524259C1(i: int64): UrlPart {
|
|
64
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(i));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function UrlPart_op_Implicit_5E38073B(f: float64): UrlPart {
|
|
68
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(f));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function UrlPart_op_Implicit_32C73145(d: decimal): UrlPart {
|
|
72
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(d));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function UrlPart_op_Implicit_244AC511(g: string): UrlPart {
|
|
76
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(g));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function UrlPart_op_Implicit_7F9DDECF(dt: Date): UrlPart {
|
|
80
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(dt));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function UrlPart_op_Implicit_Z53C0511E(dto: Date): UrlPart {
|
|
84
|
+
return UrlPart_$ctor_Z19415666(FSharpChoice$2_Choice2Of2<string, any>(dto));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function composeRelativeUrl(relativePathSections: FSharpList<UrlPart>, queryParameters: FSharpList<[string, UrlPart]>): string {
|
|
88
|
+
return join("/", cons(BasePath, map<string, string>(escapeDataString, map<UrlPart, string>((section: UrlPart): string => {
|
|
89
|
+
const matchValue: FSharpChoice$2_$union<string, any> = UrlPart__get_Value(section);
|
|
90
|
+
if ((matchValue.tag as int32) === /* Choice2Of2 */ 1) {
|
|
91
|
+
return toString(matchValue.fields[0] as any);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return matchValue.fields[0] as string;
|
|
95
|
+
}
|
|
96
|
+
}, relativePathSections)))) + (isEmpty(queryParameters) ? "" : ("?" + join("&", map<[string, string], string>((tupledArg_1: [string, string]): string => ((escapeDataString(tupledArg_1[0]) + "=") + escapeDataString(tupledArg_1[1])), map<[string, UrlPart], [string, string]>((tupledArg: [string, UrlPart]): [string, string] => {
|
|
97
|
+
const key: string = tupledArg[0];
|
|
98
|
+
const matchValue_1: FSharpChoice$2_$union<string, any> = UrlPart__get_Value(tupledArg[1]);
|
|
99
|
+
if ((matchValue_1.tag as int32) === /* Choice2Of2 */ 1) {
|
|
100
|
+
return [key, toString(matchValue_1.fields[0] as any)] as [string, string];
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return [key, matchValue_1.fields[0] as string] as [string, string];
|
|
104
|
+
}
|
|
105
|
+
}, queryParameters)))));
|
|
106
|
+
}
|
|
107
|
+
|