@juhuu/sdk-ts 1.0.0 → 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/dist/index.d.mts +338 -272
- package/dist/index.d.ts +338 -272
- package/dist/index.js +75 -3
- package/dist/index.mjs +70 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -30,7 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
30
30
|
// src/index.ts
|
31
31
|
var src_exports = {};
|
32
32
|
__export(src_exports, {
|
33
|
-
|
33
|
+
JUHUU: () => JUHUU,
|
34
|
+
Juhuu: () => Juhuu
|
34
35
|
});
|
35
36
|
module.exports = __toCommonJS(src_exports);
|
36
37
|
|
@@ -257,7 +258,6 @@ var SessionService = class extends Service {
|
|
257
258
|
autoRenew: SessionCreateParams.autoRenew,
|
258
259
|
type: SessionCreateParams.sessionType,
|
259
260
|
isOffSession: SessionCreateParams.isOffSession,
|
260
|
-
idempotencyKey: SessionCreateParams.idempotencyKey,
|
261
261
|
userId: SessionCreateParams.userId
|
262
262
|
},
|
263
263
|
useAuthentication: true
|
@@ -990,8 +990,60 @@ var TariffsService = class extends Service {
|
|
990
990
|
}
|
991
991
|
};
|
992
992
|
|
993
|
+
// src/products/products.service.ts
|
994
|
+
var ProductService = class extends Service {
|
995
|
+
constructor(config) {
|
996
|
+
super(config);
|
997
|
+
}
|
998
|
+
async list(ProductListParams, ProductListOptions) {
|
999
|
+
const queryArray = [];
|
1000
|
+
if (ProductListParams.categoryArray !== void 0) {
|
1001
|
+
queryArray.push(
|
1002
|
+
"categoryArray=" + ProductListParams.categoryArray.join(",")
|
1003
|
+
);
|
1004
|
+
}
|
1005
|
+
if (ProductListParams.modalityArray !== void 0) {
|
1006
|
+
queryArray.push(
|
1007
|
+
"modalityArray=" + ProductListParams.modalityArray.join(",")
|
1008
|
+
);
|
1009
|
+
}
|
1010
|
+
if (ProductListParams.sectorArray !== void 0) {
|
1011
|
+
queryArray.push("sectorArray=" + ProductListParams.sectorArray.join(","));
|
1012
|
+
}
|
1013
|
+
if (ProductListParams.technologyArray !== void 0) {
|
1014
|
+
queryArray.push(
|
1015
|
+
"technologyArray=" + ProductListParams.technologyArray.join(",")
|
1016
|
+
);
|
1017
|
+
}
|
1018
|
+
return await super.sendRequest(
|
1019
|
+
{
|
1020
|
+
method: "GET",
|
1021
|
+
url: "products?" + queryArray.join("&"),
|
1022
|
+
body: void 0,
|
1023
|
+
useAuthentication: false
|
1024
|
+
},
|
1025
|
+
ProductListOptions
|
1026
|
+
);
|
1027
|
+
}
|
1028
|
+
async retrieve(params, options) {
|
1029
|
+
const queryArray = [];
|
1030
|
+
if (options?.expand !== void 0) {
|
1031
|
+
queryArray.push("expand=" + options.expand.join(","));
|
1032
|
+
}
|
1033
|
+
return await super.sendRequest(
|
1034
|
+
{
|
1035
|
+
method: "GET",
|
1036
|
+
url: "products/" + params.productId + "?" + queryArray.join("&"),
|
1037
|
+
body: void 0,
|
1038
|
+
useAuthentication: false
|
1039
|
+
},
|
1040
|
+
options
|
1041
|
+
);
|
1042
|
+
}
|
1043
|
+
};
|
1044
|
+
|
993
1045
|
// src/index.ts
|
994
|
-
var
|
1046
|
+
var Juhuu = class {
|
995
1047
|
constructor(config) {
|
996
1048
|
this.sessions = new SessionService(config);
|
997
1049
|
this.links = new LinkService(config);
|
@@ -1004,6 +1056,7 @@ var JUHUU = class {
|
|
1004
1056
|
this.locations = new LocationsService(config);
|
1005
1057
|
this.terms = new TermsService(config);
|
1006
1058
|
this.tariffs = new TariffsService(config);
|
1059
|
+
this.products = new ProductService(config);
|
1007
1060
|
}
|
1008
1061
|
/**
|
1009
1062
|
* Top Level Resources
|
@@ -1019,4 +1072,23 @@ var JUHUU = class {
|
|
1019
1072
|
locations;
|
1020
1073
|
terms;
|
1021
1074
|
tariffs;
|
1075
|
+
products;
|
1022
1076
|
};
|
1077
|
+
var JUHUU;
|
1078
|
+
((JUHUU2) => {
|
1079
|
+
let Purpose;
|
1080
|
+
((Purpose3) => {
|
1081
|
+
Purpose3["Purpose1"] = "Purpose 1";
|
1082
|
+
Purpose3["Purpose2"] = "Purpose 2";
|
1083
|
+
})(Purpose = JUHUU2.Purpose || (JUHUU2.Purpose = {}));
|
1084
|
+
let Technology;
|
1085
|
+
((Technology2) => {
|
1086
|
+
Technology2["Tech1"] = "Technology 1";
|
1087
|
+
Technology2["Tech2"] = "Technology 2";
|
1088
|
+
})(Technology = JUHUU2.Technology || (JUHUU2.Technology = {}));
|
1089
|
+
})(JUHUU || (JUHUU = {}));
|
1090
|
+
// Annotate the CommonJS export names for ESM import in node:
|
1091
|
+
0 && (module.exports = {
|
1092
|
+
JUHUU,
|
1093
|
+
Juhuu
|
1094
|
+
});
|
package/dist/index.mjs
CHANGED
@@ -221,7 +221,6 @@ var SessionService = class extends Service {
|
|
221
221
|
autoRenew: SessionCreateParams.autoRenew,
|
222
222
|
type: SessionCreateParams.sessionType,
|
223
223
|
isOffSession: SessionCreateParams.isOffSession,
|
224
|
-
idempotencyKey: SessionCreateParams.idempotencyKey,
|
225
224
|
userId: SessionCreateParams.userId
|
226
225
|
},
|
227
226
|
useAuthentication: true
|
@@ -954,8 +953,60 @@ var TariffsService = class extends Service {
|
|
954
953
|
}
|
955
954
|
};
|
956
955
|
|
956
|
+
// src/products/products.service.ts
|
957
|
+
var ProductService = class extends Service {
|
958
|
+
constructor(config) {
|
959
|
+
super(config);
|
960
|
+
}
|
961
|
+
async list(ProductListParams, ProductListOptions) {
|
962
|
+
const queryArray = [];
|
963
|
+
if (ProductListParams.categoryArray !== void 0) {
|
964
|
+
queryArray.push(
|
965
|
+
"categoryArray=" + ProductListParams.categoryArray.join(",")
|
966
|
+
);
|
967
|
+
}
|
968
|
+
if (ProductListParams.modalityArray !== void 0) {
|
969
|
+
queryArray.push(
|
970
|
+
"modalityArray=" + ProductListParams.modalityArray.join(",")
|
971
|
+
);
|
972
|
+
}
|
973
|
+
if (ProductListParams.sectorArray !== void 0) {
|
974
|
+
queryArray.push("sectorArray=" + ProductListParams.sectorArray.join(","));
|
975
|
+
}
|
976
|
+
if (ProductListParams.technologyArray !== void 0) {
|
977
|
+
queryArray.push(
|
978
|
+
"technologyArray=" + ProductListParams.technologyArray.join(",")
|
979
|
+
);
|
980
|
+
}
|
981
|
+
return await super.sendRequest(
|
982
|
+
{
|
983
|
+
method: "GET",
|
984
|
+
url: "products?" + queryArray.join("&"),
|
985
|
+
body: void 0,
|
986
|
+
useAuthentication: false
|
987
|
+
},
|
988
|
+
ProductListOptions
|
989
|
+
);
|
990
|
+
}
|
991
|
+
async retrieve(params, options) {
|
992
|
+
const queryArray = [];
|
993
|
+
if (options?.expand !== void 0) {
|
994
|
+
queryArray.push("expand=" + options.expand.join(","));
|
995
|
+
}
|
996
|
+
return await super.sendRequest(
|
997
|
+
{
|
998
|
+
method: "GET",
|
999
|
+
url: "products/" + params.productId + "?" + queryArray.join("&"),
|
1000
|
+
body: void 0,
|
1001
|
+
useAuthentication: false
|
1002
|
+
},
|
1003
|
+
options
|
1004
|
+
);
|
1005
|
+
}
|
1006
|
+
};
|
1007
|
+
|
957
1008
|
// src/index.ts
|
958
|
-
var
|
1009
|
+
var Juhuu = class {
|
959
1010
|
constructor(config) {
|
960
1011
|
this.sessions = new SessionService(config);
|
961
1012
|
this.links = new LinkService(config);
|
@@ -968,6 +1019,7 @@ var JUHUU = class {
|
|
968
1019
|
this.locations = new LocationsService(config);
|
969
1020
|
this.terms = new TermsService(config);
|
970
1021
|
this.tariffs = new TariffsService(config);
|
1022
|
+
this.products = new ProductService(config);
|
971
1023
|
}
|
972
1024
|
/**
|
973
1025
|
* Top Level Resources
|
@@ -983,7 +1035,22 @@ var JUHUU = class {
|
|
983
1035
|
locations;
|
984
1036
|
terms;
|
985
1037
|
tariffs;
|
1038
|
+
products;
|
986
1039
|
};
|
1040
|
+
var JUHUU;
|
1041
|
+
((JUHUU2) => {
|
1042
|
+
let Purpose;
|
1043
|
+
((Purpose3) => {
|
1044
|
+
Purpose3["Purpose1"] = "Purpose 1";
|
1045
|
+
Purpose3["Purpose2"] = "Purpose 2";
|
1046
|
+
})(Purpose = JUHUU2.Purpose || (JUHUU2.Purpose = {}));
|
1047
|
+
let Technology;
|
1048
|
+
((Technology2) => {
|
1049
|
+
Technology2["Tech1"] = "Technology 1";
|
1050
|
+
Technology2["Tech2"] = "Technology 2";
|
1051
|
+
})(Technology = JUHUU2.Technology || (JUHUU2.Technology = {}));
|
1052
|
+
})(JUHUU || (JUHUU = {}));
|
987
1053
|
export {
|
988
|
-
JUHUU
|
1054
|
+
JUHUU,
|
1055
|
+
Juhuu
|
989
1056
|
};
|