@restorecommerce/facade 0.5.7 → 1.0.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/CHANGELOG.md +22 -0
- package/dist/gql/index.d.ts +0 -3
- package/dist/gql/index.js +0 -3
- package/dist/gql/protos/graphql.d.ts +1 -0
- package/dist/gql/protos/graphql.js +9 -3
- package/dist/gql/protos/index.d.ts +0 -1
- package/dist/gql/protos/index.js +0 -1
- package/dist/gql/protos/types.d.ts +3 -1
- package/dist/modules/access-control/grpc/index.d.ts +11 -12
- package/dist/modules/access-control/grpc/index.js +6 -7
- package/dist/modules/access-control/index.js +4 -1
- package/dist/modules/catalog/grpc/index.d.ts +13 -14
- package/dist/modules/catalog/grpc/index.js +7 -8
- package/dist/modules/catalog/index.js +4 -1
- package/dist/modules/fulfillment/grpc/index.d.ts +7 -8
- package/dist/modules/fulfillment/grpc/index.js +4 -5
- package/dist/modules/fulfillment/index.js +4 -1
- package/dist/modules/identity/grpc/index.d.ts +13 -14
- package/dist/modules/identity/grpc/index.js +7 -8
- package/dist/modules/identity/index.js +4 -1
- package/dist/modules/identity/oauth/oauth.js +3 -3
- package/dist/modules/identity/oidc/adapter.d.ts +1 -1
- package/dist/modules/identity/oidc/interfaces.d.ts +2 -2
- package/dist/modules/identity/oidc/password-grant.js +1 -1
- package/dist/modules/identity/oidc/user.d.ts +1 -1
- package/dist/modules/identity/oidc/user.js +1 -1
- package/dist/modules/indexing/grpc/index.d.ts +5 -6
- package/dist/modules/indexing/grpc/index.js +3 -4
- package/dist/modules/indexing/index.js +4 -1
- package/dist/modules/invoicing/grpc/index.d.ts +5 -6
- package/dist/modules/invoicing/grpc/index.js +3 -4
- package/dist/modules/invoicing/index.js +4 -1
- package/dist/modules/notification/grpc/index.d.ts +5 -6
- package/dist/modules/notification/grpc/index.js +3 -4
- package/dist/modules/notification/index.js +4 -1
- package/dist/modules/ordering/grpc/index.d.ts +5 -6
- package/dist/modules/ordering/grpc/index.js +3 -4
- package/dist/modules/ordering/index.js +4 -1
- package/dist/modules/ostorage/grpc/index.d.ts +5 -6
- package/dist/modules/ostorage/grpc/index.js +3 -4
- package/dist/modules/ostorage/index.js +4 -1
- package/dist/modules/payment/grpc/index.d.ts +5 -6
- package/dist/modules/payment/grpc/index.js +3 -4
- package/dist/modules/payment/index.js +4 -1
- package/dist/modules/resource/grpc/index.d.ts +25 -27
- package/dist/modules/resource/grpc/index.js +13 -16
- package/dist/modules/resource/index.js +4 -1
- package/dist/modules/scheduling/grpc/index.d.ts +5 -6
- package/dist/modules/scheduling/grpc/index.js +3 -4
- package/dist/modules/scheduling/index.js +4 -1
- package/package.json +7 -7
- package/dist/gql/helpers/index.d.ts +0 -1
- package/dist/gql/helpers/index.js +0 -2
- package/dist/gql/helpers/resolver.d.ts +0 -122
- package/dist/gql/helpers/resolver.js +0 -290
- package/dist/gql/helpers/schema.d.ts +0 -56
- package/dist/gql/helpers/schema.js +0 -126
- package/dist/gql/protos/protos.d.ts +0 -6
- package/dist/gql/protos/protos.js +0 -55
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OrderingSrvGrpcClient = void 0;
|
4
4
|
const rc_grpc_clients_1 = require("@restorecommerce/rc-grpc-clients");
|
5
5
|
const order_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/order");
|
6
|
-
const protos_1 = require("../../../gql/protos");
|
7
6
|
class OrderingSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
8
|
-
constructor(
|
9
|
-
super(
|
10
|
-
this.order =
|
7
|
+
constructor(address, cfg) {
|
8
|
+
super(address, cfg);
|
9
|
+
this.order = this.createClient(cfg, order_1.ServiceDefinition, this.channel);
|
11
10
|
}
|
12
11
|
}
|
13
12
|
exports.OrderingSrvGrpcClient = OrderingSrvGrpcClient;
|
@@ -7,7 +7,10 @@ const grpc_1 = require("./grpc");
|
|
7
7
|
const utils_1 = require("../../utils");
|
8
8
|
exports.orderingModule = (0, utils_1.createFacadeModuleFactory)(interfaces_1.namespace, (facade, config) => {
|
9
9
|
const ordering = {
|
10
|
-
client: new grpc_1.OrderingSrvGrpcClient(config.config.client,
|
10
|
+
client: new grpc_1.OrderingSrvGrpcClient(config.config.client.address, {
|
11
|
+
...config.config.client,
|
12
|
+
logger: facade.logger,
|
13
|
+
})
|
11
14
|
};
|
12
15
|
facade.addApolloService({
|
13
16
|
name: interfaces_1.namespace,
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { RestoreCommerceGrpcClient } from
|
2
|
-
import {
|
3
|
-
import { GrpcClientConfig } from
|
4
|
-
import { Logger } from "winston";
|
1
|
+
import { RestoreCommerceGrpcClient } from '@restorecommerce/rc-grpc-clients';
|
2
|
+
import { ServiceClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/ostorage';
|
3
|
+
import { GrpcClientConfig } from '@restorecommerce/grpc-client';
|
5
4
|
export declare class OstorageSrvGrpcClient extends RestoreCommerceGrpcClient {
|
6
|
-
|
7
|
-
|
5
|
+
readonly ostorage: ServiceClient;
|
6
|
+
constructor(address: string, cfg: GrpcClientConfig);
|
8
7
|
}
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OstorageSrvGrpcClient = void 0;
|
4
4
|
const rc_grpc_clients_1 = require("@restorecommerce/rc-grpc-clients");
|
5
5
|
const ostorage_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/ostorage");
|
6
|
-
const protos_1 = require("../../../gql/protos");
|
7
6
|
class OstorageSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
8
|
-
constructor(
|
9
|
-
super(
|
10
|
-
this.ostorage =
|
7
|
+
constructor(address, cfg) {
|
8
|
+
super(address, cfg);
|
9
|
+
this.ostorage = this.createClient(cfg, ostorage_1.ServiceDefinition, this.channel);
|
11
10
|
}
|
12
11
|
}
|
13
12
|
exports.OstorageSrvGrpcClient = OstorageSrvGrpcClient;
|
@@ -7,7 +7,10 @@ const grpc_1 = require("./grpc");
|
|
7
7
|
const utils_1 = require("../../utils");
|
8
8
|
exports.ostorageModule = (0, utils_1.createFacadeModuleFactory)(interfaces_1.namespace, (facade, config) => {
|
9
9
|
const ostorage = {
|
10
|
-
client: new grpc_1.OstorageSrvGrpcClient(config.config.client,
|
10
|
+
client: new grpc_1.OstorageSrvGrpcClient(config.config.client.address, {
|
11
|
+
...config.config.client,
|
12
|
+
logger: facade.logger,
|
13
|
+
})
|
11
14
|
};
|
12
15
|
facade.addApolloService({
|
13
16
|
name: interfaces_1.namespace,
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { RestoreCommerceGrpcClient } from
|
2
|
-
import {
|
3
|
-
import { GrpcClientConfig } from
|
4
|
-
import { Logger } from "winston";
|
1
|
+
import { RestoreCommerceGrpcClient } from '@restorecommerce/rc-grpc-clients';
|
2
|
+
import { ServiceClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/payment';
|
3
|
+
import { GrpcClientConfig } from '@restorecommerce/grpc-client';
|
5
4
|
export declare class PaymentSrvGrpcClient extends RestoreCommerceGrpcClient {
|
6
|
-
|
7
|
-
|
5
|
+
readonly service: ServiceClient;
|
6
|
+
constructor(address: string, cfg: GrpcClientConfig);
|
8
7
|
}
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PaymentSrvGrpcClient = void 0;
|
4
4
|
const rc_grpc_clients_1 = require("@restorecommerce/rc-grpc-clients");
|
5
5
|
const payment_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/payment");
|
6
|
-
const protos_1 = require("../../../gql/protos");
|
7
6
|
class PaymentSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
8
|
-
constructor(
|
9
|
-
super(
|
10
|
-
this.service =
|
7
|
+
constructor(address, cfg) {
|
8
|
+
super(address, cfg);
|
9
|
+
this.service = this.createClient(cfg, payment_1.ServiceDefinition, this.channel);
|
11
10
|
}
|
12
11
|
}
|
13
12
|
exports.PaymentSrvGrpcClient = PaymentSrvGrpcClient;
|
@@ -7,7 +7,10 @@ const grpc_1 = require("./grpc");
|
|
7
7
|
const utils_1 = require("../../utils");
|
8
8
|
exports.paymentModule = (0, utils_1.createFacadeModuleFactory)(interfaces_1.namespace, (facade, config) => {
|
9
9
|
const payment = {
|
10
|
-
client: new grpc_1.PaymentSrvGrpcClient(config.config.client,
|
10
|
+
client: new grpc_1.PaymentSrvGrpcClient(config.config.client.address, {
|
11
|
+
...config.config.client,
|
12
|
+
logger: facade.logger,
|
13
|
+
})
|
11
14
|
};
|
12
15
|
facade.addApolloService({
|
13
16
|
name: interfaces_1.namespace,
|
@@ -1,29 +1,27 @@
|
|
1
|
-
import { RestoreCommerceGrpcClient } from
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import { GrpcClientConfig } from
|
14
|
-
import { Logger } from "winston";
|
1
|
+
import { RestoreCommerceGrpcClient } from '@restorecommerce/rc-grpc-clients';
|
2
|
+
import { ServiceClient as addressClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/address';
|
3
|
+
import { ServiceClient as countryClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/country';
|
4
|
+
import { ServiceClient as timezoneClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/timezone';
|
5
|
+
import { ServiceClient as contact_point_typeClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/contact_point_type';
|
6
|
+
import { ServiceClient as customerClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/customer';
|
7
|
+
import { ServiceClient as contact_pointClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/contact_point';
|
8
|
+
import { ServiceClient as localeClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/locale';
|
9
|
+
import { ServiceClient as locationClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/location';
|
10
|
+
import { ServiceClient as organizationClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/organization';
|
11
|
+
import { ServiceClient as taxClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/tax';
|
12
|
+
import { ServiceClient as tax_typeClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/tax_type';
|
13
|
+
import { GrpcClientConfig } from '@restorecommerce/grpc-client';
|
15
14
|
export declare class ResourceSrvGrpcClient extends RestoreCommerceGrpcClient {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
command: any;
|
15
|
+
readonly address: addressClient;
|
16
|
+
readonly country: countryClient;
|
17
|
+
readonly timezone: timezoneClient;
|
18
|
+
readonly contact_point_type: contact_point_typeClient;
|
19
|
+
readonly customer: customerClient;
|
20
|
+
readonly contact_point: contact_pointClient;
|
21
|
+
readonly locale: localeClient;
|
22
|
+
readonly location: locationClient;
|
23
|
+
readonly organization: organizationClient;
|
24
|
+
readonly tax: taxClient;
|
25
|
+
readonly tax_type: tax_typeClient;
|
26
|
+
constructor(address: string, cfg: GrpcClientConfig);
|
29
27
|
}
|
@@ -13,23 +13,20 @@ const location_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/r
|
|
13
13
|
const organization_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/organization");
|
14
14
|
const tax_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/tax");
|
15
15
|
const tax_type_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/tax_type");
|
16
|
-
const command_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/command");
|
17
|
-
const protos_1 = require("../../../gql/protos");
|
18
16
|
class ResourceSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
19
|
-
constructor(
|
20
|
-
super(
|
21
|
-
this.address =
|
22
|
-
this.country =
|
23
|
-
this.timezone =
|
24
|
-
this.contact_point_type =
|
25
|
-
this.customer =
|
26
|
-
this.contact_point =
|
27
|
-
this.locale =
|
28
|
-
this.location =
|
29
|
-
this.organization =
|
30
|
-
this.tax =
|
31
|
-
this.tax_type =
|
32
|
-
this.command = (0, protos_1.getGRPCService)(this, command_1.protobufPackage, command_1.protoMetadata.fileDescriptor.service[0]);
|
17
|
+
constructor(address, cfg) {
|
18
|
+
super(address, cfg);
|
19
|
+
this.address = this.createClient(cfg, address_1.ServiceDefinition, this.channel);
|
20
|
+
this.country = this.createClient(cfg, country_1.ServiceDefinition, this.channel);
|
21
|
+
this.timezone = this.createClient(cfg, timezone_1.ServiceDefinition, this.channel);
|
22
|
+
this.contact_point_type = this.createClient(cfg, contact_point_type_1.ServiceDefinition, this.channel);
|
23
|
+
this.customer = this.createClient(cfg, customer_1.ServiceDefinition, this.channel);
|
24
|
+
this.contact_point = this.createClient(cfg, contact_point_1.ServiceDefinition, this.channel);
|
25
|
+
this.locale = this.createClient(cfg, locale_1.ServiceDefinition, this.channel);
|
26
|
+
this.location = this.createClient(cfg, location_1.ServiceDefinition, this.channel);
|
27
|
+
this.organization = this.createClient(cfg, organization_1.ServiceDefinition, this.channel);
|
28
|
+
this.tax = this.createClient(cfg, tax_1.ServiceDefinition, this.channel);
|
29
|
+
this.tax_type = this.createClient(cfg, tax_type_1.ServiceDefinition, this.channel);
|
33
30
|
}
|
34
31
|
}
|
35
32
|
exports.ResourceSrvGrpcClient = ResourceSrvGrpcClient;
|
@@ -7,7 +7,10 @@ const grpc_1 = require("./grpc");
|
|
7
7
|
const utils_1 = require("../../utils");
|
8
8
|
exports.resourceModule = (0, utils_1.createFacadeModuleFactory)(interfaces_1.namespace, (facade, config) => {
|
9
9
|
const resource = {
|
10
|
-
client: new grpc_1.ResourceSrvGrpcClient(config.config.client,
|
10
|
+
client: new grpc_1.ResourceSrvGrpcClient(config.config.client.address, {
|
11
|
+
...config.config.client,
|
12
|
+
logger: facade.logger,
|
13
|
+
})
|
11
14
|
};
|
12
15
|
facade.addApolloService({
|
13
16
|
name: interfaces_1.namespace,
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { RestoreCommerceGrpcClient } from
|
2
|
-
import {
|
3
|
-
import { GrpcClientConfig } from
|
4
|
-
import { Logger } from "winston";
|
1
|
+
import { RestoreCommerceGrpcClient } from '@restorecommerce/rc-grpc-clients';
|
2
|
+
import { ServiceClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/job';
|
3
|
+
import { GrpcClientConfig } from '@restorecommerce/grpc-client';
|
5
4
|
export declare class SchedulingSrvGrpcClient extends RestoreCommerceGrpcClient {
|
6
|
-
|
7
|
-
|
5
|
+
readonly job: ServiceClient;
|
6
|
+
constructor(address: string, cfg: GrpcClientConfig);
|
8
7
|
}
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SchedulingSrvGrpcClient = void 0;
|
4
4
|
const rc_grpc_clients_1 = require("@restorecommerce/rc-grpc-clients");
|
5
5
|
const job_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/job");
|
6
|
-
const protos_1 = require("../../../gql/protos");
|
7
6
|
class SchedulingSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
8
|
-
constructor(
|
9
|
-
super(
|
10
|
-
this.job =
|
7
|
+
constructor(address, cfg) {
|
8
|
+
super(address, cfg);
|
9
|
+
this.job = this.createClient(cfg, job_1.ServiceDefinition, this.channel);
|
11
10
|
}
|
12
11
|
}
|
13
12
|
exports.SchedulingSrvGrpcClient = SchedulingSrvGrpcClient;
|
@@ -7,7 +7,10 @@ const grpc_1 = require("./grpc");
|
|
7
7
|
const utils_1 = require("../../utils");
|
8
8
|
exports.schedulingModule = (0, utils_1.createFacadeModuleFactory)(interfaces_1.namespace, (facade, config) => {
|
9
9
|
const scheduling = {
|
10
|
-
client: new grpc_1.SchedulingSrvGrpcClient(config.config.client,
|
10
|
+
client: new grpc_1.SchedulingSrvGrpcClient(config.config.client.address, {
|
11
|
+
...config.config.client,
|
12
|
+
logger: facade.logger,
|
13
|
+
})
|
11
14
|
};
|
12
15
|
facade.addApolloService({
|
13
16
|
name: interfaces_1.namespace,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@restorecommerce/facade",
|
3
|
-
"version": "0.
|
3
|
+
"version": "1.0.0",
|
4
4
|
"description": "Facade for Restorecommerce microservices",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -24,11 +24,11 @@
|
|
24
24
|
"@cloudnative/health": "^2.1.2",
|
25
25
|
"@grpc/grpc-js": "^1.6.7",
|
26
26
|
"@grpc/proto-loader": "^0.6.12",
|
27
|
-
"@restorecommerce/grpc-client": "^0.
|
28
|
-
"@restorecommerce/kafka-client": "^0.
|
29
|
-
"@restorecommerce/logger": "^0.
|
30
|
-
"@restorecommerce/rc-grpc-clients": "^0.
|
31
|
-
"@restorecommerce/service-config": "^0.
|
27
|
+
"@restorecommerce/grpc-client": "^1.0.0",
|
28
|
+
"@restorecommerce/kafka-client": "^1.0.0",
|
29
|
+
"@restorecommerce/logger": "^1.0.0",
|
30
|
+
"@restorecommerce/rc-grpc-clients": "^1.0.0",
|
31
|
+
"@restorecommerce/service-config": "^1.0.0",
|
32
32
|
"apollo-server-core": "^3.7.0",
|
33
33
|
"apollo-server-koa": "^3.7.0",
|
34
34
|
"array.prototype.flat": "^1.3.0",
|
@@ -121,5 +121,5 @@
|
|
121
121
|
}
|
122
122
|
}
|
123
123
|
},
|
124
|
-
"gitHead": "
|
124
|
+
"gitHead": "2b25803ec9494c298f4f008a55485bc201c83bb8"
|
125
125
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,122 +0,0 @@
|
|
1
|
-
import { CRUDService, ReadRequest } from "@restorecommerce/rc-grpc-clients";
|
2
|
-
export declare type Maybe<T> = T | undefined;
|
3
|
-
export declare type RequireFields<T, K extends keyof T> = {
|
4
|
-
[X in Exclude<keyof T, K>]?: T[X];
|
5
|
-
} & {
|
6
|
-
[P in K]-?: NonNullable<T[P]>;
|
7
|
-
};
|
8
|
-
/** Filters the fields based on the operation specified */
|
9
|
-
export declare type FilterOperation = 'lt' | 'lte' | 'gt' | 'gte' | 'eq' | 'isEmpty';
|
10
|
-
export declare type FilterType = 'string' | 'boolean' | 'number' | 'date';
|
11
|
-
/** Filter options */
|
12
|
-
export interface FilterOptions {
|
13
|
-
/** Field names based on which the filtering needs to be done */
|
14
|
-
field: string;
|
15
|
-
/** Filter Operation options */
|
16
|
-
operation: FilterOperation;
|
17
|
-
/** Field value */
|
18
|
-
value: string;
|
19
|
-
/** Value type (optional, default is STRING) */
|
20
|
-
type?: Maybe<FilterType>;
|
21
|
-
}
|
22
|
-
/** Sorts the fields in either Ascending or Descending order */
|
23
|
-
export declare type SortOrder = 'asc' | 'desc';
|
24
|
-
/** For sorting based on fileds */
|
25
|
-
export interface SortOptions {
|
26
|
-
/** Field names to be sorted on */
|
27
|
-
field: string;
|
28
|
-
/** Sorting Options */
|
29
|
-
order?: Maybe<SortOrder>;
|
30
|
-
}
|
31
|
-
export declare enum OperatorType {
|
32
|
-
and = 0,
|
33
|
-
or = 1
|
34
|
-
}
|
35
|
-
export interface Filter {
|
36
|
-
field: string;
|
37
|
-
operation: FilterOperation;
|
38
|
-
value: string;
|
39
|
-
type?: FilterType;
|
40
|
-
filters?: FilterOp[];
|
41
|
-
}
|
42
|
-
export interface FilterOp {
|
43
|
-
filter?: Filter[];
|
44
|
-
operator?: OperatorType;
|
45
|
-
}
|
46
|
-
export declare type ReadResourcesInputType = {
|
47
|
-
limit?: Maybe<number>;
|
48
|
-
offset?: Maybe<number>;
|
49
|
-
filters?: Maybe<Array<FilterOp>>;
|
50
|
-
sort?: Maybe<SortOptions>;
|
51
|
-
/** A role scope */
|
52
|
-
scope?: Maybe<{
|
53
|
-
entity?: Maybe<string>;
|
54
|
-
instance?: Maybe<string>;
|
55
|
-
}>;
|
56
|
-
};
|
57
|
-
export declare type CreateResourcesInputType<T> = {
|
58
|
-
items: Array<T>;
|
59
|
-
};
|
60
|
-
export declare type UpdateResourcesInputType<T> = {
|
61
|
-
items: Array<T>;
|
62
|
-
};
|
63
|
-
export declare type DeleteResourcesInputType = {
|
64
|
-
ids: Array<string>;
|
65
|
-
collection?: boolean;
|
66
|
-
};
|
67
|
-
export declare type BaseOutputType<T> = {
|
68
|
-
details: {
|
69
|
-
items: Maybe<T>;
|
70
|
-
};
|
71
|
-
/** Objects with status returned for GraphQL operations */
|
72
|
-
operationStatus: {
|
73
|
-
/** Status code */
|
74
|
-
code: number;
|
75
|
-
/** Status message description */
|
76
|
-
message: Maybe<string>;
|
77
|
-
};
|
78
|
-
};
|
79
|
-
interface Status {
|
80
|
-
id: string;
|
81
|
-
code: number;
|
82
|
-
message: string;
|
83
|
-
}
|
84
|
-
export declare type DeleteOutputType = {
|
85
|
-
status: Status[];
|
86
|
-
/** Objects with status returned for GraphQL operations */
|
87
|
-
operationStatus: {
|
88
|
-
/** Status code */
|
89
|
-
code: number;
|
90
|
-
/** Status message description */
|
91
|
-
message: Maybe<string>;
|
92
|
-
};
|
93
|
-
};
|
94
|
-
export declare type ResolveCRUDReadResourcesArgsInput = Maybe<RequireFields<ReadResourcesInputType, never>> | undefined;
|
95
|
-
export interface ResolveCRUDReadResourcesArgs<TGqlType, TGrpcType> {
|
96
|
-
service: CRUDService<TGrpcType>;
|
97
|
-
input: ResolveCRUDReadResourcesArgsInput;
|
98
|
-
mapResponseItem?: (item: TGrpcType) => TGqlType;
|
99
|
-
}
|
100
|
-
export declare function resolveCRUDReadResources<TGqlType = unknown, TGrpcType = unknown>({ service, input, mapResponseItem }: ResolveCRUDReadResourcesArgs<TGqlType, TGrpcType>): Promise<BaseOutputType<Array<TGqlType>>>;
|
101
|
-
export declare function convertReadResouecesInputToReadRequest(input?: Maybe<ReadResourcesInputType>): ReadRequest;
|
102
|
-
export declare type ResolveCRUDCreateResourcesArgsInput<TGqlType> = CreateResourcesInputType<TGqlType>;
|
103
|
-
export interface ResolveCRUDCreateResourcesArgs<TGqlType, TGrpcType> {
|
104
|
-
service: CRUDService<TGrpcType>;
|
105
|
-
input: CreateResourcesInputType<TGqlType>;
|
106
|
-
mapRequestItem?: (item: TGqlType) => TGrpcType;
|
107
|
-
mapResponseItem?: (item: TGrpcType) => TGqlType;
|
108
|
-
}
|
109
|
-
export declare function resolveCRUDCreateResources<TGqlType, TGrpcType>({ service, input, mapRequestItem, mapResponseItem }: ResolveCRUDCreateResourcesArgs<TGqlType, TGrpcType>): Promise<BaseOutputType<Array<TGqlType>>>;
|
110
|
-
export interface ResolveCRUDDeleteResourcesArgs<TGrpcType> {
|
111
|
-
service: CRUDService<TGrpcType>;
|
112
|
-
input: DeleteResourcesInputType;
|
113
|
-
}
|
114
|
-
export declare function resolveCRUDDeleteResources<TGrpcType>({ service, input }: ResolveCRUDDeleteResourcesArgs<TGrpcType>): Promise<DeleteOutputType>;
|
115
|
-
export interface ResolveCRUDUpdateResourcesArgs<TGqlType, TGrpcType> {
|
116
|
-
service: CRUDService<TGrpcType>;
|
117
|
-
input: UpdateResourcesInputType<TGqlType>;
|
118
|
-
mapRequestItem?: (item: TGqlType) => TGrpcType;
|
119
|
-
mapResponseItem?: (item: TGrpcType) => TGqlType;
|
120
|
-
}
|
121
|
-
export declare function resolveCRUDUpdateResources<TGqlType, TGrpcType>({ service, input, mapRequestItem, mapResponseItem }: ResolveCRUDUpdateResourcesArgs<TGqlType, TGrpcType>): Promise<BaseOutputType<Array<TGqlType>>>;
|
122
|
-
export {};
|