phx-node 1.0.133 → 1.0.134
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpService } from "@nestjs/axios";
|
|
2
2
|
import { QueryOrPersistedId, SchemaGroup } from "./types";
|
|
3
|
+
import { GrpcRequestDataCenterType } from "./grpc-client-system.service";
|
|
3
4
|
export type GrpcRequestTypeV5 = QueryOrPersistedId & {
|
|
4
5
|
hostname: string;
|
|
5
6
|
variables?: Record<string, any> | null | undefined;
|
|
@@ -13,4 +14,5 @@ export declare class PHXGrpcClientSystemServiceV5 {
|
|
|
13
14
|
debug(hostname: string): void;
|
|
14
15
|
query({ query, variables, hostname, persistedId, schemaGroup, }: GrpcRequestTypeV5): Promise<any>;
|
|
15
16
|
mutation({ query, variables, hostname, persistedId, schemaGroup }: GrpcRequestTypeV5): Promise<any>;
|
|
17
|
+
querySchoolConfig({ query, variables, persistedId, }: GrpcRequestDataCenterType): Promise<any>;
|
|
16
18
|
}
|
|
@@ -65,6 +65,21 @@ let PHXGrpcClientSystemServiceV5 = PHXGrpcClientSystemServiceV5_1 = class PHXGrp
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
+
querySchoolConfig(_a) {
|
|
69
|
+
return __awaiter(this, arguments, void 0, function* ({ query, variables, persistedId, }) {
|
|
70
|
+
try {
|
|
71
|
+
const hostnameConfig = "school-config";
|
|
72
|
+
const response = yield this.httpService
|
|
73
|
+
.post(`${this.internalGrpcGateway}/query`, Object.assign(Object.assign({}, (variables && { variables })), { source: this.projectSource, query, persisted_id: persistedId }), { headers: { hostname: hostnameConfig } })
|
|
74
|
+
.toPromise();
|
|
75
|
+
return response.data;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.log("error", error);
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
68
83
|
};
|
|
69
84
|
exports.PHXGrpcClientSystemServiceV5 = PHXGrpcClientSystemServiceV5;
|
|
70
85
|
exports.PHXGrpcClientSystemServiceV5 = PHXGrpcClientSystemServiceV5 = PHXGrpcClientSystemServiceV5_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grpc-client-system-v5.service.js","sourceRoot":"","sources":["../../../src/module/grpc-client/grpc-client-system-v5.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yCAA4C;
|
|
1
|
+
{"version":3,"file":"grpc-client-system-v5.service.js","sourceRoot":"","sources":["../../../src/module/grpc-client/grpc-client-system-v5.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yCAA4C;AAWrC,IAAM,4BAA4B,oCAAlC,MAAM,4BAA4B;IAKvC,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QAJpC,WAAM,GAAG,IAAI,eAAM,CAAC,8BAA4B,CAAC,IAAI,CAAC,CAAC;QAKtE,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;QAC7D,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAClD,CAAC;IAEM,KAAK,CAAC,QAAgB;QAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC9C,CAAC;IAEY,KAAK;6DAAC,EACjB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,GACO;YAClB,IAAI,CAAC,QAAQ;gBAAE,OAAO;YACtB,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW;qBACpC,IAAI,CAAC,GAAG,IAAI,CAAC,mBAAmB,QA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