@pax2pay/model-banking 0.1.248 → 0.1.250
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/Client/Organizations/Groups.ts +15 -0
- package/Client/Organizations/index.ts +3 -0
- package/Key/Roles.ts +10 -1
- package/dist/Client/Organizations/Groups.d.ts +8 -0
- package/dist/Client/Organizations/Groups.js +12 -0
- package/dist/Client/Organizations/Groups.js.map +1 -0
- package/dist/Client/Organizations/index.d.ts +2 -0
- package/dist/Client/Organizations/index.js +2 -0
- package/dist/Client/Organizations/index.js.map +1 -1
- package/dist/Key/Roles.d.ts +3 -3
- package/dist/Key/Roles.js +10 -1
- package/dist/Key/Roles.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { gracely } from "gracely"
|
|
2
|
+
import { http } from "cloudly-http"
|
|
3
|
+
import * as rest from "cloudly-rest"
|
|
4
|
+
import { Organization } from "../../Organization"
|
|
5
|
+
|
|
6
|
+
export class Groups extends rest.Collection<gracely.Error> {
|
|
7
|
+
constructor(client: http.Client) {
|
|
8
|
+
super(client)
|
|
9
|
+
}
|
|
10
|
+
async replace(organization: string, groups: string[]): Promise<Organization | gracely.Error> {
|
|
11
|
+
return this.client.put<Organization>(`/organization/group`, groups, {
|
|
12
|
+
organization,
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -2,10 +2,13 @@ import { gracely } from "gracely"
|
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
3
|
import * as rest from "cloudly-rest"
|
|
4
4
|
import { Organization } from "../../Organization"
|
|
5
|
+
import { Groups } from "./Groups"
|
|
5
6
|
import { Rules } from "./Rules"
|
|
6
7
|
|
|
7
8
|
export class Organizations extends rest.Collection<gracely.Error> {
|
|
8
9
|
readonly Rules = new Rules(this.client)
|
|
10
|
+
readonly groups = new Groups(this.client)
|
|
11
|
+
|
|
9
12
|
constructor(client: http.Client) {
|
|
10
13
|
super(client)
|
|
11
14
|
}
|
package/Key/Roles.ts
CHANGED
|
@@ -43,7 +43,7 @@ export namespace Roles {
|
|
|
43
43
|
export namespace Realm {
|
|
44
44
|
export type Roles = Partial<Record<Role, true>>
|
|
45
45
|
export type Role = typeof roles[number]
|
|
46
|
-
export const roles = ["admin", "fincrime-readonly", "fincrime", "finance", "support"] as const
|
|
46
|
+
export const roles = ["admin", "fincrime-readonly", "fincrime", "finance", "operations", "support"] as const
|
|
47
47
|
export const type = isly.string(roles)
|
|
48
48
|
export const is = type.is
|
|
49
49
|
export const definitions: Record<Role, Permissions.Realm | true> = {
|
|
@@ -72,6 +72,14 @@ export namespace Roles {
|
|
|
72
72
|
treasury: { rebalance: true, view: true },
|
|
73
73
|
settlements: { view: true },
|
|
74
74
|
},
|
|
75
|
+
operations: {
|
|
76
|
+
organizations: {
|
|
77
|
+
create: true,
|
|
78
|
+
update: true,
|
|
79
|
+
accounts: true,
|
|
80
|
+
rules: true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
75
83
|
support: {
|
|
76
84
|
organizations: {
|
|
77
85
|
create: true,
|
|
@@ -79,6 +87,7 @@ export namespace Roles {
|
|
|
79
87
|
accounts: true,
|
|
80
88
|
rules: {
|
|
81
89
|
view: true,
|
|
90
|
+
edit: true,
|
|
82
91
|
},
|
|
83
92
|
},
|
|
84
93
|
transactions: { view: true },
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { gracely } from "gracely";
|
|
2
|
+
import { http } from "cloudly-http";
|
|
3
|
+
import * as rest from "cloudly-rest";
|
|
4
|
+
import { Organization } from "../../Organization";
|
|
5
|
+
export declare class Groups extends rest.Collection<gracely.Error> {
|
|
6
|
+
constructor(client: http.Client);
|
|
7
|
+
replace(organization: string, groups: string[]): Promise<Organization | gracely.Error>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as rest from "cloudly-rest";
|
|
2
|
+
export class Groups extends rest.Collection {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
super(client);
|
|
5
|
+
}
|
|
6
|
+
async replace(organization, groups) {
|
|
7
|
+
return this.client.put(`/organization/group`, groups, {
|
|
8
|
+
organization,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Groups.js","sourceRoot":"../","sources":["Client/Organizations/Groups.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAGpC,MAAM,OAAO,MAAO,SAAQ,IAAI,CAAC,UAAyB;IACzD,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,YAAoB,EAAE,MAAgB;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,qBAAqB,EAAE,MAAM,EAAE;YACnE,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;CACD"}
|
|
@@ -2,9 +2,11 @@ import { gracely } from "gracely";
|
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
3
|
import * as rest from "cloudly-rest";
|
|
4
4
|
import { Organization } from "../../Organization";
|
|
5
|
+
import { Groups } from "./Groups";
|
|
5
6
|
import { Rules } from "./Rules";
|
|
6
7
|
export declare class Organizations extends rest.Collection<gracely.Error> {
|
|
7
8
|
readonly Rules: Rules;
|
|
9
|
+
readonly groups: Groups;
|
|
8
10
|
constructor(client: http.Client);
|
|
9
11
|
list(options?: {
|
|
10
12
|
limit?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as rest from "cloudly-rest";
|
|
2
|
+
import { Groups } from "./Groups";
|
|
2
3
|
import { Rules } from "./Rules";
|
|
3
4
|
export class Organizations extends rest.Collection {
|
|
4
5
|
constructor(client) {
|
|
5
6
|
super(client);
|
|
6
7
|
this.Rules = new Rules(this.client);
|
|
8
|
+
this.groups = new Groups(this.client);
|
|
7
9
|
}
|
|
8
10
|
async list(options) {
|
|
9
11
|
return this.client.get(`/organization`, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Organizations/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,aAAc,SAAQ,IAAI,CAAC,UAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Organizations/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,aAAc,SAAQ,IAAI,CAAC,UAAyB;IAIhE,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;QAJL,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,WAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAIzC,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;CACD"}
|
package/dist/Key/Roles.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export declare namespace Roles {
|
|
|
13
13
|
namespace Realm {
|
|
14
14
|
type Roles = Partial<Record<Role, true>>;
|
|
15
15
|
type Role = typeof roles[number];
|
|
16
|
-
const roles: readonly ["admin", "fincrime-readonly", "fincrime", "finance", "support"];
|
|
17
|
-
const type: isly.Type<"admin" | "fincrime-readonly" | "fincrime" | "finance" | "support">;
|
|
18
|
-
const is: isly.Type.IsFunction<"admin" | "fincrime-readonly" | "fincrime" | "finance" | "support">;
|
|
16
|
+
const roles: readonly ["admin", "fincrime-readonly", "fincrime", "finance", "operations", "support"];
|
|
17
|
+
const type: isly.Type<"operations" | "admin" | "fincrime-readonly" | "fincrime" | "finance" | "support">;
|
|
18
|
+
const is: isly.Type.IsFunction<"operations" | "admin" | "fincrime-readonly" | "fincrime" | "finance" | "support">;
|
|
19
19
|
const definitions: Record<Role, Permissions.Realm | true>;
|
|
20
20
|
}
|
|
21
21
|
namespace Organization {
|
package/dist/Key/Roles.js
CHANGED
|
@@ -33,7 +33,7 @@ export var Roles;
|
|
|
33
33
|
Roles.resolve = resolve;
|
|
34
34
|
let Realm;
|
|
35
35
|
(function (Realm) {
|
|
36
|
-
Realm.roles = ["admin", "fincrime-readonly", "fincrime", "finance", "support"];
|
|
36
|
+
Realm.roles = ["admin", "fincrime-readonly", "fincrime", "finance", "operations", "support"];
|
|
37
37
|
Realm.type = isly.string(Realm.roles);
|
|
38
38
|
Realm.is = Realm.type.is;
|
|
39
39
|
Realm.definitions = {
|
|
@@ -62,6 +62,14 @@ export var Roles;
|
|
|
62
62
|
treasury: { rebalance: true, view: true },
|
|
63
63
|
settlements: { view: true },
|
|
64
64
|
},
|
|
65
|
+
operations: {
|
|
66
|
+
organizations: {
|
|
67
|
+
create: true,
|
|
68
|
+
update: true,
|
|
69
|
+
accounts: true,
|
|
70
|
+
rules: true,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
65
73
|
support: {
|
|
66
74
|
organizations: {
|
|
67
75
|
create: true,
|
|
@@ -69,6 +77,7 @@ export var Roles;
|
|
|
69
77
|
accounts: true,
|
|
70
78
|
rules: {
|
|
71
79
|
view: true,
|
|
80
|
+
edit: true,
|
|
72
81
|
},
|
|
73
82
|
},
|
|
74
83
|
transactions: { view: true },
|
package/dist/Key/Roles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Roles.js","sourceRoot":"../","sources":["Key/Roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAM3C,MAAM,KAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"Roles.js","sourceRoot":"../","sources":["Key/Roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAM3C,MAAM,KAAW,KAAK,CAsGrB;AAtGD,WAAiB,KAAK;IAErB,SAAgB,GAAG,CAAC,iBAAyB;QAC5C,MAAM,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC5C,OAAO;YACN,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC5D,KAAK,EAAE,QAAQ,GAAG,IAAI;gBACtB,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;aACnE,CAAC,CAAC;YACH,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAA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