d5-api-initializer 1.0.1 → 1.0.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/package.json
CHANGED
|
@@ -802,17 +802,12 @@ var EngineInitializer = class {
|
|
|
802
802
|
this.engine.putJSWapiOper(operationName, (jsWapiRequest, jsWapiResponse) => {
|
|
803
803
|
const request = new ApiRequest(jsWapiRequest, this.engine.getName());
|
|
804
804
|
const apiCore = new ApiCore({ http: this.engine, request });
|
|
805
|
-
return this._operations[operationName](
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
objectName: this.engine.getName(),
|
|
812
|
-
externalObject: this.engine.getExternalName(),
|
|
813
|
-
externalFieldsMap: this.engine.getExternalObjectFields()
|
|
814
|
-
}
|
|
815
|
-
);
|
|
805
|
+
return this._operations[operationName](apiCore, request, new ApiResponse(jsWapiResponse, this.engine.getName()), {
|
|
806
|
+
parameters: this.engine.getExternalSystemParameters(),
|
|
807
|
+
objectName: this.engine.getName(),
|
|
808
|
+
externalObject: this.engine.getExternalName(),
|
|
809
|
+
externalFieldsMap: this.engine.getExternalObjectFields()
|
|
810
|
+
});
|
|
816
811
|
});
|
|
817
812
|
}
|
|
818
813
|
/**
|
|
@@ -829,13 +824,14 @@ var EngineInitializer = class {
|
|
|
829
824
|
initTranslation(translations) {
|
|
830
825
|
UserMessages_default.appendDictionary(translations);
|
|
831
826
|
}
|
|
832
|
-
call({
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
827
|
+
call({
|
|
828
|
+
apiCore,
|
|
829
|
+
apiRequest,
|
|
830
|
+
apiResponse,
|
|
831
|
+
operation,
|
|
832
|
+
meta
|
|
833
|
+
}) {
|
|
834
|
+
return this._operations[operation](apiCore, apiRequest, apiResponse, meta);
|
|
839
835
|
}
|
|
840
836
|
};
|
|
841
837
|
|
|
@@ -93,6 +93,12 @@ declare namespace jsWapi {
|
|
|
93
93
|
putJSWapiOper(operation: string, callback: (jsWapiRequest: JSWapiRequest, jsWapiResponse: JSWapiResponse) => void): void;
|
|
94
94
|
}
|
|
95
95
|
function setJSWapiEngine(init: (object: JSWapiEngine) => void): void;
|
|
96
|
+
interface JSWapiApplication {
|
|
97
|
+
getName(): string;
|
|
98
|
+
newJSWapiHttp(url: string): JSWapiHttp;
|
|
99
|
+
putJSWapiOper(operation: string, callback: (request: JSWapiRequest, response: JSWapiResponse) => void): void;
|
|
100
|
+
}
|
|
101
|
+
function setJSWapiObject(init: (object: JSWapiApplication) => void): void;
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
declare class ApiHttpResponse {
|
|
@@ -767,17 +767,12 @@ var EngineInitializer = class {
|
|
|
767
767
|
this.engine.putJSWapiOper(operationName, (jsWapiRequest, jsWapiResponse) => {
|
|
768
768
|
const request = new ApiRequest(jsWapiRequest, this.engine.getName());
|
|
769
769
|
const apiCore = new ApiCore({ http: this.engine, request });
|
|
770
|
-
return this._operations[operationName](
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
objectName: this.engine.getName(),
|
|
777
|
-
externalObject: this.engine.getExternalName(),
|
|
778
|
-
externalFieldsMap: this.engine.getExternalObjectFields()
|
|
779
|
-
}
|
|
780
|
-
);
|
|
770
|
+
return this._operations[operationName](apiCore, request, new ApiResponse(jsWapiResponse, this.engine.getName()), {
|
|
771
|
+
parameters: this.engine.getExternalSystemParameters(),
|
|
772
|
+
objectName: this.engine.getName(),
|
|
773
|
+
externalObject: this.engine.getExternalName(),
|
|
774
|
+
externalFieldsMap: this.engine.getExternalObjectFields()
|
|
775
|
+
});
|
|
781
776
|
});
|
|
782
777
|
}
|
|
783
778
|
/**
|
|
@@ -794,13 +789,14 @@ var EngineInitializer = class {
|
|
|
794
789
|
initTranslation(translations) {
|
|
795
790
|
UserMessages_default.appendDictionary(translations);
|
|
796
791
|
}
|
|
797
|
-
call({
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
792
|
+
call({
|
|
793
|
+
apiCore,
|
|
794
|
+
apiRequest,
|
|
795
|
+
apiResponse,
|
|
796
|
+
operation,
|
|
797
|
+
meta
|
|
798
|
+
}) {
|
|
799
|
+
return this._operations[operation](apiCore, apiRequest, apiResponse, meta);
|
|
804
800
|
}
|
|
805
801
|
};
|
|
806
802
|
|
|
@@ -767,17 +767,12 @@ var EngineInitializer = class {
|
|
|
767
767
|
this.engine.putJSWapiOper(operationName, (jsWapiRequest, jsWapiResponse) => {
|
|
768
768
|
const request = new ApiRequest(jsWapiRequest, this.engine.getName());
|
|
769
769
|
const apiCore = new ApiCore({ http: this.engine, request });
|
|
770
|
-
return this._operations[operationName](
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
objectName: this.engine.getName(),
|
|
777
|
-
externalObject: this.engine.getExternalName(),
|
|
778
|
-
externalFieldsMap: this.engine.getExternalObjectFields()
|
|
779
|
-
}
|
|
780
|
-
);
|
|
770
|
+
return this._operations[operationName](apiCore, request, new ApiResponse(jsWapiResponse, this.engine.getName()), {
|
|
771
|
+
parameters: this.engine.getExternalSystemParameters(),
|
|
772
|
+
objectName: this.engine.getName(),
|
|
773
|
+
externalObject: this.engine.getExternalName(),
|
|
774
|
+
externalFieldsMap: this.engine.getExternalObjectFields()
|
|
775
|
+
});
|
|
781
776
|
});
|
|
782
777
|
}
|
|
783
778
|
/**
|
|
@@ -794,13 +789,14 @@ var EngineInitializer = class {
|
|
|
794
789
|
initTranslation(translations) {
|
|
795
790
|
UserMessages_default.appendDictionary(translations);
|
|
796
791
|
}
|
|
797
|
-
call({
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
792
|
+
call({
|
|
793
|
+
apiCore,
|
|
794
|
+
apiRequest,
|
|
795
|
+
apiResponse,
|
|
796
|
+
operation,
|
|
797
|
+
meta
|
|
798
|
+
}) {
|
|
799
|
+
return this._operations[operation](apiCore, apiRequest, apiResponse, meta);
|
|
804
800
|
}
|
|
805
801
|
};
|
|
806
802
|
|