@juhuu/sdk-ts 1.2.143 → 1.2.145
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 +74 -3
- package/dist/index.d.ts +74 -3
- package/dist/index.js +75 -1
- package/dist/index.mjs +75 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -12,6 +12,8 @@ type ExtractType<T> = T extends {
|
|
12
12
|
} ? U : never;
|
13
13
|
type UserGroup = "retailer" | "engineer" | "operator" | "user";
|
14
14
|
type Frontend = "dashboard" | "app";
|
15
|
+
type ApiKeyStatus = "enabled" | "disabled";
|
16
|
+
type ApiKeyScope = "device:parameter:update";
|
15
17
|
type Capability = {
|
16
18
|
type: "predictiveMaintenance";
|
17
19
|
stripePriceId: string | null;
|
@@ -846,6 +848,14 @@ declare class DeviceParameterHistoriesService extends Service {
|
|
846
848
|
retrieve(DeviceParameterHistoryRetrieveParams: JUHUU.DeviceParameterHistory.Retrieve.Params, DeviceParameterHistoryRetrieveOptions?: JUHUU.DeviceParameterHistory.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.DeviceParameterHistory.Retrieve.Response>>;
|
847
849
|
}
|
848
850
|
|
851
|
+
declare class ApiKeysService extends Service {
|
852
|
+
constructor(config: JUHUU.SetupConfig);
|
853
|
+
create(ApiKeyCreateParams: JUHUU.ApiKey.Create.Params, ApiKeyCreateOptions?: JUHUU.ApiKey.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.Create.Response>>;
|
854
|
+
list(ApiKeyListParams: JUHUU.ApiKey.List.Params, ApiKeyListOptions?: JUHUU.ApiKey.List.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.List.Response>>;
|
855
|
+
retrieve(ApiKeyRetrieveParams: JUHUU.ApiKey.Retrieve.Params, ApiKeyRetrieveOptions?: JUHUU.ApiKey.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.Retrieve.Response>>;
|
856
|
+
update(ApiKeyUpdateParams: JUHUU.ApiKey.Update.Params, ApiKeyUpdateOptions?: JUHUU.ApiKey.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.Update.Response>>;
|
857
|
+
}
|
858
|
+
|
849
859
|
declare class Juhuu {
|
850
860
|
constructor(config: JUHUU.SetupConfig);
|
851
861
|
/**
|
@@ -879,6 +889,7 @@ declare class Juhuu {
|
|
879
889
|
readonly tapkey: TapkeyService;
|
880
890
|
readonly articleGroups: ArticleGroupGroupsService;
|
881
891
|
readonly deviceParameterHistories: DeviceParameterHistoriesService;
|
892
|
+
readonly apiKeys: ApiKeysService;
|
882
893
|
}
|
883
894
|
declare namespace JUHUU {
|
884
895
|
interface SetupConfig {
|
@@ -892,12 +903,12 @@ declare namespace JUHUU {
|
|
892
903
|
}
|
893
904
|
interface HttpResponse<T> {
|
894
905
|
ok: boolean;
|
895
|
-
data:
|
906
|
+
data: T & {
|
896
907
|
/**
|
897
908
|
* Might be defined if the request failed
|
898
909
|
*/
|
899
910
|
message?: string | LocaleString;
|
900
|
-
}
|
911
|
+
};
|
901
912
|
statusText?: string;
|
902
913
|
status?: number;
|
903
914
|
}
|
@@ -1462,6 +1473,66 @@ declare namespace JUHUU {
|
|
1462
1473
|
type Response = JUHUU.AccountingArea.Object;
|
1463
1474
|
}
|
1464
1475
|
}
|
1476
|
+
namespace ApiKey {
|
1477
|
+
type Object = {
|
1478
|
+
id: string;
|
1479
|
+
readonly object: "apiKey";
|
1480
|
+
name: string;
|
1481
|
+
status: ApiKeyStatus;
|
1482
|
+
scopeArray: ApiKeyScope[];
|
1483
|
+
propertyId: string;
|
1484
|
+
expiresAt: Date | null;
|
1485
|
+
createdAt: Date;
|
1486
|
+
hash: string;
|
1487
|
+
};
|
1488
|
+
namespace Create {
|
1489
|
+
type Params = {
|
1490
|
+
propertyId: string;
|
1491
|
+
};
|
1492
|
+
type Options = JUHUU.RequestOptions;
|
1493
|
+
type Response = {
|
1494
|
+
apiKey: JUHUU.ApiKey.Object;
|
1495
|
+
clearText: string;
|
1496
|
+
};
|
1497
|
+
}
|
1498
|
+
namespace Retrieve {
|
1499
|
+
type Params = {
|
1500
|
+
apiKeyId: string;
|
1501
|
+
};
|
1502
|
+
type Options = {
|
1503
|
+
expand?: Array<"property">;
|
1504
|
+
} & JUHUU.RequestOptions;
|
1505
|
+
type Response = {
|
1506
|
+
apiKey: JUHUU.ApiKey.Object;
|
1507
|
+
property?: JUHUU.Property.Object;
|
1508
|
+
};
|
1509
|
+
}
|
1510
|
+
namespace List {
|
1511
|
+
type Params = {
|
1512
|
+
propertyId?: string;
|
1513
|
+
statusArray?: JUHUU.Article.Object["status"][];
|
1514
|
+
};
|
1515
|
+
type Options = {
|
1516
|
+
limit?: number;
|
1517
|
+
skip?: number;
|
1518
|
+
} & JUHUU.RequestOptions;
|
1519
|
+
type Response = {
|
1520
|
+
apiKeyArray: JUHUU.ApiKey.Object[];
|
1521
|
+
count: number;
|
1522
|
+
hasMore: boolean;
|
1523
|
+
};
|
1524
|
+
}
|
1525
|
+
namespace Update {
|
1526
|
+
type Params = {
|
1527
|
+
apiKeyId: string;
|
1528
|
+
status?: ApiKeyStatus;
|
1529
|
+
};
|
1530
|
+
type Options = JUHUU.RequestOptions;
|
1531
|
+
type Response = {
|
1532
|
+
apiKey: JUHUU.ApiKey.Object;
|
1533
|
+
};
|
1534
|
+
}
|
1535
|
+
}
|
1465
1536
|
namespace ArticleEmbedding {
|
1466
1537
|
type Object = {
|
1467
1538
|
id: string;
|
@@ -3317,4 +3388,4 @@ declare namespace JUHUU {
|
|
3317
3388
|
}
|
3318
3389
|
}
|
3319
3390
|
|
3320
|
-
export { type AccessControlListElement, type Address, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type FuelType, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Parameter, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
3391
|
+
export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type FuelType, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Parameter, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
package/dist/index.d.ts
CHANGED
@@ -12,6 +12,8 @@ type ExtractType<T> = T extends {
|
|
12
12
|
} ? U : never;
|
13
13
|
type UserGroup = "retailer" | "engineer" | "operator" | "user";
|
14
14
|
type Frontend = "dashboard" | "app";
|
15
|
+
type ApiKeyStatus = "enabled" | "disabled";
|
16
|
+
type ApiKeyScope = "device:parameter:update";
|
15
17
|
type Capability = {
|
16
18
|
type: "predictiveMaintenance";
|
17
19
|
stripePriceId: string | null;
|
@@ -846,6 +848,14 @@ declare class DeviceParameterHistoriesService extends Service {
|
|
846
848
|
retrieve(DeviceParameterHistoryRetrieveParams: JUHUU.DeviceParameterHistory.Retrieve.Params, DeviceParameterHistoryRetrieveOptions?: JUHUU.DeviceParameterHistory.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.DeviceParameterHistory.Retrieve.Response>>;
|
847
849
|
}
|
848
850
|
|
851
|
+
declare class ApiKeysService extends Service {
|
852
|
+
constructor(config: JUHUU.SetupConfig);
|
853
|
+
create(ApiKeyCreateParams: JUHUU.ApiKey.Create.Params, ApiKeyCreateOptions?: JUHUU.ApiKey.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.Create.Response>>;
|
854
|
+
list(ApiKeyListParams: JUHUU.ApiKey.List.Params, ApiKeyListOptions?: JUHUU.ApiKey.List.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.List.Response>>;
|
855
|
+
retrieve(ApiKeyRetrieveParams: JUHUU.ApiKey.Retrieve.Params, ApiKeyRetrieveOptions?: JUHUU.ApiKey.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.Retrieve.Response>>;
|
856
|
+
update(ApiKeyUpdateParams: JUHUU.ApiKey.Update.Params, ApiKeyUpdateOptions?: JUHUU.ApiKey.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.ApiKey.Update.Response>>;
|
857
|
+
}
|
858
|
+
|
849
859
|
declare class Juhuu {
|
850
860
|
constructor(config: JUHUU.SetupConfig);
|
851
861
|
/**
|
@@ -879,6 +889,7 @@ declare class Juhuu {
|
|
879
889
|
readonly tapkey: TapkeyService;
|
880
890
|
readonly articleGroups: ArticleGroupGroupsService;
|
881
891
|
readonly deviceParameterHistories: DeviceParameterHistoriesService;
|
892
|
+
readonly apiKeys: ApiKeysService;
|
882
893
|
}
|
883
894
|
declare namespace JUHUU {
|
884
895
|
interface SetupConfig {
|
@@ -892,12 +903,12 @@ declare namespace JUHUU {
|
|
892
903
|
}
|
893
904
|
interface HttpResponse<T> {
|
894
905
|
ok: boolean;
|
895
|
-
data:
|
906
|
+
data: T & {
|
896
907
|
/**
|
897
908
|
* Might be defined if the request failed
|
898
909
|
*/
|
899
910
|
message?: string | LocaleString;
|
900
|
-
}
|
911
|
+
};
|
901
912
|
statusText?: string;
|
902
913
|
status?: number;
|
903
914
|
}
|
@@ -1462,6 +1473,66 @@ declare namespace JUHUU {
|
|
1462
1473
|
type Response = JUHUU.AccountingArea.Object;
|
1463
1474
|
}
|
1464
1475
|
}
|
1476
|
+
namespace ApiKey {
|
1477
|
+
type Object = {
|
1478
|
+
id: string;
|
1479
|
+
readonly object: "apiKey";
|
1480
|
+
name: string;
|
1481
|
+
status: ApiKeyStatus;
|
1482
|
+
scopeArray: ApiKeyScope[];
|
1483
|
+
propertyId: string;
|
1484
|
+
expiresAt: Date | null;
|
1485
|
+
createdAt: Date;
|
1486
|
+
hash: string;
|
1487
|
+
};
|
1488
|
+
namespace Create {
|
1489
|
+
type Params = {
|
1490
|
+
propertyId: string;
|
1491
|
+
};
|
1492
|
+
type Options = JUHUU.RequestOptions;
|
1493
|
+
type Response = {
|
1494
|
+
apiKey: JUHUU.ApiKey.Object;
|
1495
|
+
clearText: string;
|
1496
|
+
};
|
1497
|
+
}
|
1498
|
+
namespace Retrieve {
|
1499
|
+
type Params = {
|
1500
|
+
apiKeyId: string;
|
1501
|
+
};
|
1502
|
+
type Options = {
|
1503
|
+
expand?: Array<"property">;
|
1504
|
+
} & JUHUU.RequestOptions;
|
1505
|
+
type Response = {
|
1506
|
+
apiKey: JUHUU.ApiKey.Object;
|
1507
|
+
property?: JUHUU.Property.Object;
|
1508
|
+
};
|
1509
|
+
}
|
1510
|
+
namespace List {
|
1511
|
+
type Params = {
|
1512
|
+
propertyId?: string;
|
1513
|
+
statusArray?: JUHUU.Article.Object["status"][];
|
1514
|
+
};
|
1515
|
+
type Options = {
|
1516
|
+
limit?: number;
|
1517
|
+
skip?: number;
|
1518
|
+
} & JUHUU.RequestOptions;
|
1519
|
+
type Response = {
|
1520
|
+
apiKeyArray: JUHUU.ApiKey.Object[];
|
1521
|
+
count: number;
|
1522
|
+
hasMore: boolean;
|
1523
|
+
};
|
1524
|
+
}
|
1525
|
+
namespace Update {
|
1526
|
+
type Params = {
|
1527
|
+
apiKeyId: string;
|
1528
|
+
status?: ApiKeyStatus;
|
1529
|
+
};
|
1530
|
+
type Options = JUHUU.RequestOptions;
|
1531
|
+
type Response = {
|
1532
|
+
apiKey: JUHUU.ApiKey.Object;
|
1533
|
+
};
|
1534
|
+
}
|
1535
|
+
}
|
1465
1536
|
namespace ArticleEmbedding {
|
1466
1537
|
type Object = {
|
1467
1538
|
id: string;
|
@@ -3317,4 +3388,4 @@ declare namespace JUHUU {
|
|
3317
3388
|
}
|
3318
3389
|
}
|
3319
3390
|
|
3320
|
-
export { type AccessControlListElement, type Address, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type FuelType, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Parameter, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
3391
|
+
export { type AccessControlListElement, type Address, type ApiKeyScope, type ApiKeyStatus, type AutoRenewMode, type BusinessType, type Capability, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DevicePermission, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type Frontend, type FuelType, type GeneralSettings, type GeoPoint, type GraphNode, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Offer, type OfferTime, type Parameter, type Party, type PaymentMethod, type PaymentReason, type PaymentRefundReason, type PaymentRefundStatus, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformString, type PostingRow, type Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundStatus, type Sector, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, Settings, type SimStatus, type StarRating, type TarifType, type TimeZone, type Unit, type UserGroup, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type VisualPriority, type hexColor };
|
package/dist/index.js
CHANGED
@@ -101,7 +101,7 @@ var Service = class {
|
|
101
101
|
);
|
102
102
|
return {
|
103
103
|
ok: false,
|
104
|
-
data:
|
104
|
+
data: {}
|
105
105
|
};
|
106
106
|
}
|
107
107
|
const uri = this.httpBaseUrl + url;
|
@@ -2749,6 +2749,78 @@ var DeviceParameterHistoriesService = class extends Service {
|
|
2749
2749
|
}
|
2750
2750
|
};
|
2751
2751
|
|
2752
|
+
// src/apiKeys/apiKeys.service.ts
|
2753
|
+
var ApiKeysService = class extends Service {
|
2754
|
+
constructor(config) {
|
2755
|
+
super(config);
|
2756
|
+
}
|
2757
|
+
async create(ApiKeyCreateParams, ApiKeyCreateOptions) {
|
2758
|
+
return await super.sendRequest(
|
2759
|
+
{
|
2760
|
+
method: "POST",
|
2761
|
+
url: "apiKeys",
|
2762
|
+
body: {
|
2763
|
+
propertyId: ApiKeyCreateParams.propertyId
|
2764
|
+
},
|
2765
|
+
authenticationNotOptional: true
|
2766
|
+
},
|
2767
|
+
ApiKeyCreateOptions
|
2768
|
+
);
|
2769
|
+
}
|
2770
|
+
async list(ApiKeyListParams, ApiKeyListOptions) {
|
2771
|
+
const queryArray = [];
|
2772
|
+
if (ApiKeyListOptions?.limit !== void 0) {
|
2773
|
+
queryArray.push("limit=" + ApiKeyListOptions.limit);
|
2774
|
+
}
|
2775
|
+
if (ApiKeyListParams?.propertyId !== void 0) {
|
2776
|
+
queryArray.push("propertyId=" + ApiKeyListParams.propertyId);
|
2777
|
+
}
|
2778
|
+
if (ApiKeyListParams?.statusArray !== void 0) {
|
2779
|
+
queryArray.push("statusArray=" + ApiKeyListParams.statusArray.join(","));
|
2780
|
+
}
|
2781
|
+
if (ApiKeyListOptions?.skip !== void 0) {
|
2782
|
+
queryArray.push("skip=" + ApiKeyListOptions.skip);
|
2783
|
+
}
|
2784
|
+
return await super.sendRequest(
|
2785
|
+
{
|
2786
|
+
method: "GET",
|
2787
|
+
url: "apiKeys?" + queryArray.join("&"),
|
2788
|
+
body: void 0,
|
2789
|
+
authenticationNotOptional: false
|
2790
|
+
},
|
2791
|
+
ApiKeyListOptions
|
2792
|
+
);
|
2793
|
+
}
|
2794
|
+
async retrieve(ApiKeyRetrieveParams, ApiKeyRetrieveOptions) {
|
2795
|
+
const queryArray = [];
|
2796
|
+
if (ApiKeyRetrieveOptions?.expand !== void 0) {
|
2797
|
+
queryArray.push("expand=" + ApiKeyRetrieveOptions.expand.join(","));
|
2798
|
+
}
|
2799
|
+
return await super.sendRequest(
|
2800
|
+
{
|
2801
|
+
method: "GET",
|
2802
|
+
url: "apiKeys/" + ApiKeyRetrieveParams.apiKeyId + "?" + queryArray.join("&"),
|
2803
|
+
body: void 0,
|
2804
|
+
authenticationNotOptional: false
|
2805
|
+
},
|
2806
|
+
ApiKeyRetrieveOptions
|
2807
|
+
);
|
2808
|
+
}
|
2809
|
+
async update(ApiKeyUpdateParams, ApiKeyUpdateOptions) {
|
2810
|
+
return await super.sendRequest(
|
2811
|
+
{
|
2812
|
+
method: "PATCH",
|
2813
|
+
url: "apiKeys/" + ApiKeyUpdateParams.apiKeyId,
|
2814
|
+
body: {
|
2815
|
+
status: ApiKeyUpdateParams.status
|
2816
|
+
},
|
2817
|
+
authenticationNotOptional: true
|
2818
|
+
},
|
2819
|
+
ApiKeyUpdateOptions
|
2820
|
+
);
|
2821
|
+
}
|
2822
|
+
};
|
2823
|
+
|
2752
2824
|
// src/types/types.ts
|
2753
2825
|
var LanguageCodeArray = [
|
2754
2826
|
"en",
|
@@ -2926,6 +2998,7 @@ var Juhuu = class {
|
|
2926
2998
|
this.tapkey = new TapkeyService(config);
|
2927
2999
|
this.articleGroups = new ArticleGroupGroupsService(config);
|
2928
3000
|
this.deviceParameterHistories = new DeviceParameterHistoriesService(config);
|
3001
|
+
this.apiKeys = new ApiKeysService(config);
|
2929
3002
|
}
|
2930
3003
|
/**
|
2931
3004
|
* Top Level Resources
|
@@ -2958,6 +3031,7 @@ var Juhuu = class {
|
|
2958
3031
|
tapkey;
|
2959
3032
|
articleGroups;
|
2960
3033
|
deviceParameterHistories;
|
3034
|
+
apiKeys;
|
2961
3035
|
};
|
2962
3036
|
var JUHUU;
|
2963
3037
|
((JUHUU2) => {
|
package/dist/index.mjs
CHANGED
@@ -57,7 +57,7 @@ var Service = class {
|
|
57
57
|
);
|
58
58
|
return {
|
59
59
|
ok: false,
|
60
|
-
data:
|
60
|
+
data: {}
|
61
61
|
};
|
62
62
|
}
|
63
63
|
const uri = this.httpBaseUrl + url;
|
@@ -2705,6 +2705,78 @@ var DeviceParameterHistoriesService = class extends Service {
|
|
2705
2705
|
}
|
2706
2706
|
};
|
2707
2707
|
|
2708
|
+
// src/apiKeys/apiKeys.service.ts
|
2709
|
+
var ApiKeysService = class extends Service {
|
2710
|
+
constructor(config) {
|
2711
|
+
super(config);
|
2712
|
+
}
|
2713
|
+
async create(ApiKeyCreateParams, ApiKeyCreateOptions) {
|
2714
|
+
return await super.sendRequest(
|
2715
|
+
{
|
2716
|
+
method: "POST",
|
2717
|
+
url: "apiKeys",
|
2718
|
+
body: {
|
2719
|
+
propertyId: ApiKeyCreateParams.propertyId
|
2720
|
+
},
|
2721
|
+
authenticationNotOptional: true
|
2722
|
+
},
|
2723
|
+
ApiKeyCreateOptions
|
2724
|
+
);
|
2725
|
+
}
|
2726
|
+
async list(ApiKeyListParams, ApiKeyListOptions) {
|
2727
|
+
const queryArray = [];
|
2728
|
+
if (ApiKeyListOptions?.limit !== void 0) {
|
2729
|
+
queryArray.push("limit=" + ApiKeyListOptions.limit);
|
2730
|
+
}
|
2731
|
+
if (ApiKeyListParams?.propertyId !== void 0) {
|
2732
|
+
queryArray.push("propertyId=" + ApiKeyListParams.propertyId);
|
2733
|
+
}
|
2734
|
+
if (ApiKeyListParams?.statusArray !== void 0) {
|
2735
|
+
queryArray.push("statusArray=" + ApiKeyListParams.statusArray.join(","));
|
2736
|
+
}
|
2737
|
+
if (ApiKeyListOptions?.skip !== void 0) {
|
2738
|
+
queryArray.push("skip=" + ApiKeyListOptions.skip);
|
2739
|
+
}
|
2740
|
+
return await super.sendRequest(
|
2741
|
+
{
|
2742
|
+
method: "GET",
|
2743
|
+
url: "apiKeys?" + queryArray.join("&"),
|
2744
|
+
body: void 0,
|
2745
|
+
authenticationNotOptional: false
|
2746
|
+
},
|
2747
|
+
ApiKeyListOptions
|
2748
|
+
);
|
2749
|
+
}
|
2750
|
+
async retrieve(ApiKeyRetrieveParams, ApiKeyRetrieveOptions) {
|
2751
|
+
const queryArray = [];
|
2752
|
+
if (ApiKeyRetrieveOptions?.expand !== void 0) {
|
2753
|
+
queryArray.push("expand=" + ApiKeyRetrieveOptions.expand.join(","));
|
2754
|
+
}
|
2755
|
+
return await super.sendRequest(
|
2756
|
+
{
|
2757
|
+
method: "GET",
|
2758
|
+
url: "apiKeys/" + ApiKeyRetrieveParams.apiKeyId + "?" + queryArray.join("&"),
|
2759
|
+
body: void 0,
|
2760
|
+
authenticationNotOptional: false
|
2761
|
+
},
|
2762
|
+
ApiKeyRetrieveOptions
|
2763
|
+
);
|
2764
|
+
}
|
2765
|
+
async update(ApiKeyUpdateParams, ApiKeyUpdateOptions) {
|
2766
|
+
return await super.sendRequest(
|
2767
|
+
{
|
2768
|
+
method: "PATCH",
|
2769
|
+
url: "apiKeys/" + ApiKeyUpdateParams.apiKeyId,
|
2770
|
+
body: {
|
2771
|
+
status: ApiKeyUpdateParams.status
|
2772
|
+
},
|
2773
|
+
authenticationNotOptional: true
|
2774
|
+
},
|
2775
|
+
ApiKeyUpdateOptions
|
2776
|
+
);
|
2777
|
+
}
|
2778
|
+
};
|
2779
|
+
|
2708
2780
|
// src/types/types.ts
|
2709
2781
|
var LanguageCodeArray = [
|
2710
2782
|
"en",
|
@@ -2882,6 +2954,7 @@ var Juhuu = class {
|
|
2882
2954
|
this.tapkey = new TapkeyService(config);
|
2883
2955
|
this.articleGroups = new ArticleGroupGroupsService(config);
|
2884
2956
|
this.deviceParameterHistories = new DeviceParameterHistoriesService(config);
|
2957
|
+
this.apiKeys = new ApiKeysService(config);
|
2885
2958
|
}
|
2886
2959
|
/**
|
2887
2960
|
* Top Level Resources
|
@@ -2914,6 +2987,7 @@ var Juhuu = class {
|
|
2914
2987
|
tapkey;
|
2915
2988
|
articleGroups;
|
2916
2989
|
deviceParameterHistories;
|
2990
|
+
apiKeys;
|
2917
2991
|
};
|
2918
2992
|
var JUHUU;
|
2919
2993
|
((JUHUU2) => {
|