nuki-api-js 1.2.0 → 3.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/LICENSE +15 -0
- package/README.md +13 -3
- package/dist/components-b80s6chi.d.ts +1407 -0
- package/dist/components-b80s6chi.d.ts.map +1 -0
- package/dist/components-dzxfxa30.d.ts +1407 -0
- package/dist/components-dzxfxa30.d.ts.map +1 -0
- package/dist/components.cjs +2496 -108
- package/dist/components.d.cts +2 -0
- package/dist/components.d.cts.map +1 -0
- package/dist/components.d.mts +1 -1596
- package/dist/components.d.mts.map +1 -1
- package/dist/components.mjs +2393 -1
- package/dist/effect.cjs +131 -24
- package/dist/effect.d.cts +317 -0
- package/dist/effect.d.cts.map +1 -0
- package/dist/effect.d.mts +75 -5
- package/dist/effect.d.mts.map +1 -1
- package/dist/effect.mjs +125 -4
- package/dist/index.cjs +107 -22
- package/dist/index.d.cts +148 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +148 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +2092 -1923
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +29 -24
- package/dist/{schemas-geox71wk.js → schemas-eegfu8of.js} +560 -154
- package/dist/{schemas-fong721w.cjs → schemas-noervfwu.cjs} +639 -153
- package/dist/schemas.cjs +81 -1
- package/dist/schemas.d.cts +38740 -0
- package/dist/schemas.d.cts.map +1 -0
- package/dist/schemas.d.mts +1498 -1226
- package/dist/schemas.d.mts.map +1 -1
- package/dist/schemas.mjs +1 -1
- package/dist/types.d.cts +7238 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +256 -171
- package/dist/types.d.mts.map +1 -1
- package/package.json +74 -30
- package/dist/components-eiu9qz9x.js +0 -2351
- package/dist/components-iddduu87.cjs +0 -2458
package/dist/effect.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.d.mts","sources":["../src/effect.ts"],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+BAA4C;AACpG,iEAAiErB,uCAAoD;AACrH,0DAA0DsB,iCAA8C;AACxG,mEAAmErB,yCAAsD;AACzH,sDAAsDsB,6BAA0C;AAChG,4DAA4DC,mCAAgD;AAC5G,kEAAkEC,yCAAsD;AACxH,qEAAqEC,mCAAgD;AACrH,gDAAgDwB,yBAAsC;AACtF,gDAAgDC,yBAAsC;AACtF,oEAAoEC,sCAAmD;AACvH,qDAAqDC,wBAAqC;AAC1F,sDAAsDC,yBAAsC;AAC5F,wDAAwDC,2BAAwC;AAChG,mDAAmD5B,2BAAwC;AAC3F,+CAA+C8B,wBAAqC;AACpF,iDAAiD7B,yBAAsC;AACvF,uDAAuDC,8BAA2C;AAClG;;","names":["__components.getAccountsResource","__components.postAccountsResource","__components.deleteAccountsResource","__components.postAccountEmailChangeResource","__components.postAccountEmailVerifyResource","__components.getAccountIntegrationsResource","__components.deleteAccountIntegrationsResource","__components.postAccountOtpResource","__components.putAccountOtpResource","__components.deleteAccountOtpResource","__components.postAccountPasswordResetResource","__components.getAccountSettingResource","__components.putAccountSettingResource","__components.deleteAccountSettingResource","__components.getAccountSubsResource","__components.putAccountSubsResource","__components.getAccountSubResource","__components.postAccountSubResource","__components.deleteAccountSubResource","__components.getAccountUsersResource","__components.putAccountUsersResource","__components.getAccountUserResource","__components.postAccountUserResource","__components.deleteAccountUserResource","__components.getAddressesResource","__components.putAddressesResource","__components.postAddressResource","__components.deleteAddressResource","__components.getAddressUnitsResource","__components.putAddressUnitsResource","__components.deleteAddressUnitsResource","__components.deleteAddressUnitResource","__components.getAddressTokenResource","__components.getAddressTokenRedeemResource","__components.postAddressTokenRedeemResource","__components.getAddressTokensResource","__components.getAddressReservationsResource","__components.postAddressReservationIssueResource","__components.postAddressReservationRevokeResource","__components.postReservationAccessTimesUpdateResource","__components.getDecentralWebhooksResource","__components.putDecentralWebhooksResource","__components.deleteDecentralWebhookResource","__components.getWebhookLogsResource","__components.putSmartlockAuthsAdvancedResource","__components.postSmartlockActionAdvancedResource","__components.postSmartlockLockActionAdvancedResource","__components.postSmartlockUnlockActionAdvancedResource","__components.getApiKeysResource","__components.putApiKeysResource","__components.postApiKeyResource","__components.deleteApiKeyResource","__components.getApiKeyAdvancedResource","__components.postApiKeyAdvancedResource","__components.putApiKeyAdvancedResource","__components.deleteApiKeyAdvancedResource","__components.postApiKeyAdvancedReactivateResource","__components.getApiKeyTokensResource","__components.putApiKeyTokensResource","__components.postApiKeyTokenResource","__components.deleteApiKeyTokenResource","__components.postSmartlockBulkWebConfigResource","__components.getSmartlocksResource","__components.getSmartlockResource","__components.postSmartlockResource","__components.deleteSmartlockResource","__components.postSmartlockActionResource","__components.postSmartlockLockActionResource","__components.postSmartlockUnlockActionResource","__components.postSmartlockAdminPinResource","__components.postSmartlockAdvancedConfigResource","__components.postSmartlockOpenerAdvancedConfigResource","__components.postSmartdoorAdvancedConfigResource","__components.postSmartlockConfigResource","__components.postSmartlockSyncResource","__components.postSmartlockWebConfigResource","__components.getCompaniesResource","__components.getNotificationsResource","__components.putNotificationsResource","__components.getNotificationResource","__components.postNotificationResource","__components.deleteNotificationResource","__components.getOpenerBrandsResource","__components.getOpenerBrandResource","__components.getOpenerIntercomsResource","__components.getOpenerIntercomResource","__components.getServicesResource","__components.getServiceResource","__components.postServiceLinkResource","__components.postServiceSyncResource","__components.postServiceUnlinkResource","__components.getSmartlocksAuthsResource","__components.postSmartlocksAuthsResource","__components.putSmartlocksAuthsResource","__components.deleteSmartlocksAuthsResource","__components.getSmartlocksAuthsPaginatedResource","__components.getSmartlockAuthsResource","__components.putSmartlockAuthsResource","__components.postSmartlockAuthWithSharedKeyResource","__components.getSmartlockAuthResource","__components.postSmartlockAuthResource","__components.deleteSmartlockAuthResource","__components.getSmartlocksLogsResource","__components.getSmartlockLogsResource"]}
|
|
1
|
+
{"version":3,"file":"effect.d.mts","sources":["../../openapi-utils/dist/effect/index.d.mts","../src/effect.ts"],"mappings":";;;;;AAIA,cAAc,oBAAoB,iBAAiB,MAAM,0B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,yCAAsD;AACzH,sDAAsDsB,6BAA0C;AAChG,4DAA4DC,mCAAgD;AAC5G,kEAAkEC,yCAAsD;AACxH,qEAAqEC,mCAAgD;AACrH,gDAAgDwB,yBAAsC;AACtF,gDAAgDC,yBAAsC;AACtF,oEAAoEC,sCAAmD;AACvH,qDAAqDC,wBAAqC;AAC1F,sDAAsDC,yBAAsC;AAC5F,wDAAwDC,2BAAwC;AAChG,mDAAmD5B,2BAAwC;AAC3F,+CAA+C8B,wBAAqC;AACpF,iDAAiD7B,yBAAsC;AACvF,uDAAuDC,8BAA2C;AAClG","names":["_sferadev_openapi_utils_effect.EffectApi","__components.getAccountsResource","__components.postAccountsResource","__components.deleteAccountsResource","__components.postAccountEmailChangeResource","__components.postAccountEmailVerifyResource","__components.getAccountIntegrationsResource","__components.deleteAccountIntegrationsResource","__components.postAccountOtpResource","__components.putAccountOtpResource","__components.deleteAccountOtpResource","__components.postAccountPasswordResetResource","__components.getAccountSettingResource","__components.putAccountSettingResource","__components.deleteAccountSettingResource","__components.getAccountSubsResource","__components.putAccountSubsResource","__components.getAccountSubResource","__components.postAccountSubResource","__components.deleteAccountSubResource","__components.getAccountUsersResource","__components.putAccountUsersResource","__components.getAccountUserResource","__components.postAccountUserResource","__components.deleteAccountUserResource","__components.getAddressesResource","__components.putAddressesResource","__components.postAddressResource","__components.deleteAddressResource","__components.getAddressUnitsResource","__components.putAddressUnitsResource","__components.deleteAddressUnitsResource","__components.deleteAddressUnitResource","__components.getAddressTokenResource","__components.getAddressTokenRedeemResource","__components.postAddressTokenRedeemResource","__components.getAddressTokensResource","__components.getAddressReservationsResource","__components.postAddressReservationIssueResource","__components.postAddressReservationRevokeResource","__components.postReservationAccessTimesUpdateResource","__components.getDecentralWebhooksResource","__components.putDecentralWebhooksResource","__components.deleteDecentralWebhookResource","__components.getWebhookLogsResource","__components.putSmartlockAuthsAdvancedResource","__components.postSmartlockActionAdvancedResource","__components.postSmartlockLockActionAdvancedResource","__components.postSmartlockUnlockActionAdvancedResource","__components.getApiKeysResource","__components.putApiKeysResource","__components.postApiKeyResource","__components.deleteApiKeyResource","__components.getApiKeyAdvancedResource","__components.postApiKeyAdvancedResource","__components.putApiKeyAdvancedResource","__components.deleteApiKeyAdvancedResource","__components.postApiKeyAdvancedReactivateResource","__components.getApiKeyTokensResource","__components.putApiKeyTokensResource","__components.postApiKeyTokenResource","__components.deleteApiKeyTokenResource","__components.postSmartlockBulkWebConfigResource","__components.getSmartlocksResource","__components.getSmartlockResource","__components.postSmartlockResource","__components.deleteSmartlockResource","__components.postSmartlockActionResource","__components.postSmartlockLockActionResource","__components.postSmartlockUnlockActionResource","__components.postSmartlockAdminPinResource","__components.postSmartlockAdvancedConfigResource","__components.postSmartlockOpenerAdvancedConfigResource","__components.postSmartdoorAdvancedConfigResource","__components.postSmartlockConfigResource","__components.postSmartlockSyncResource","__components.postSmartlockWebConfigResource","__components.getCompaniesResource","__components.getNotificationsResource","__components.putNotificationsResource","__components.getNotificationResource","__components.postNotificationResource","__components.deleteNotificationResource","__components.getOpenerBrandsResource","__components.getOpenerBrandResource","__components.getOpenerIntercomsResource","__components.getOpenerIntercomResource","__components.getServicesResource","__components.getServiceResource","__components.postServiceLinkResource","__components.postServiceSyncResource","__components.postServiceUnlinkResource","__components.getSmartlocksAuthsResource","__components.postSmartlocksAuthsResource","__components.putSmartlocksAuthsResource","__components.deleteSmartlocksAuthsResource","__components.getSmartlocksAuthsPaginatedResource","__components.getSmartlockAuthsResource","__components.putSmartlockAuthsResource","__components.postSmartlockAuthWithSharedKeyResource","__components.getSmartlockAuthResource","__components.postSmartlockAuthResource","__components.deleteSmartlockAuthResource","__components.getSmartlocksLogsResource","__components.getSmartlockLogsResource","_sferadev_openapi_utils_effect.EffectByPath"]}
|
package/dist/effect.mjs
CHANGED
|
@@ -1,8 +1,129 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Data, Context, Effect, Layer } from 'effect';
|
|
2
|
+
import { operationsByPath, operationsByTag } from './components.mjs';
|
|
3
|
+
|
|
4
|
+
// ============================================================================
|
|
5
|
+
// Error Types
|
|
6
|
+
// ============================================================================
|
|
7
|
+
/**
|
|
8
|
+
* Validation error for client-side input validation failures.
|
|
9
|
+
* Use this for missing required parameters or invalid input formats.
|
|
10
|
+
*/ class ValidationError extends Data.TaggedError("ValidationError") {
|
|
11
|
+
get message() {
|
|
12
|
+
return `Validation error for '${this.field}': ${this.reason}`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* API error with status code and error payload.
|
|
17
|
+
* Uses Effect's Data.TaggedError for pattern matching support.
|
|
18
|
+
*/ class ApiError extends Data.TaggedError("ApiError") {
|
|
19
|
+
get message() {
|
|
20
|
+
const message = errorMessage(this.error);
|
|
21
|
+
return message ? `API error ${this.status}: ${message}` : `API Error: ${this.status}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Error bodies vary by API: `{ message }`, `{ error }`, `{ error: { message } }`, `{ errors: [{ message }] }` or text.
|
|
25
|
+
function errorMessage(value) {
|
|
26
|
+
if (isRecord(value) && "payload" in value) {
|
|
27
|
+
const fromPayload = errorMessage(value.payload);
|
|
28
|
+
if (fromPayload) return fromPayload;
|
|
29
|
+
}
|
|
30
|
+
if (typeof value === "string") return value.trim() || undefined;
|
|
31
|
+
if (!isRecord(value)) return undefined;
|
|
32
|
+
if (typeof value.message === "string" && value.message) return value.message;
|
|
33
|
+
if ("error" in value) {
|
|
34
|
+
const fromError = errorMessage(value.error);
|
|
35
|
+
if (fromError) return fromError;
|
|
36
|
+
}
|
|
37
|
+
if (Array.isArray(value.errors)) return errorMessage(value.errors[0]);
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
function isRecord(value) {
|
|
41
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Network error for fetch failures (timeouts, DNS errors, etc).
|
|
45
|
+
*/ class NetworkError extends Data.TaggedError("NetworkError") {
|
|
46
|
+
get message() {
|
|
47
|
+
if (this.cause instanceof Error) {
|
|
48
|
+
return `Network error: ${this.cause.message}`;
|
|
49
|
+
}
|
|
50
|
+
if (isRecord(this.cause) && typeof this.cause.message === "string" && this.cause.message) {
|
|
51
|
+
return `Network error: ${this.cause.message}`;
|
|
52
|
+
}
|
|
53
|
+
return "Network error";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
class ApiConfig extends Context.Service()("ApiConfig") {
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Create a Layer providing ApiConfig values.
|
|
60
|
+
*/ const makeApiLayer = (config)=>Layer.succeed(ApiConfig, config);
|
|
61
|
+
// ============================================================================
|
|
62
|
+
// Error Conversion
|
|
63
|
+
// ============================================================================
|
|
64
|
+
function convertError(error) {
|
|
65
|
+
if (error instanceof Error && error.message.includes("Missing required path parameter")) {
|
|
66
|
+
const field = error.message.replace("Missing required path parameter: ", "");
|
|
67
|
+
return new ValidationError({
|
|
68
|
+
field,
|
|
69
|
+
reason: "Missing required path parameter"
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (typeof error === "object" && error !== null && "status" in error) {
|
|
73
|
+
return new ApiError({
|
|
74
|
+
status: error.status,
|
|
75
|
+
error
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return new NetworkError({
|
|
79
|
+
cause: error
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// ============================================================================
|
|
83
|
+
// Proxy Factories
|
|
84
|
+
// ============================================================================
|
|
85
|
+
function ownValue(target, key) {
|
|
86
|
+
return Object.hasOwn(target, key) ? target[key] : undefined;
|
|
87
|
+
}
|
|
88
|
+
function toEffect(op) {
|
|
89
|
+
return (params)=>Effect.gen(function*() {
|
|
90
|
+
const config = yield* ApiConfig;
|
|
91
|
+
return yield* Effect.tryPromise({
|
|
92
|
+
try: (signal)=>op({
|
|
93
|
+
...params ?? {},
|
|
94
|
+
config: {
|
|
95
|
+
...config,
|
|
96
|
+
signal
|
|
97
|
+
}
|
|
98
|
+
}),
|
|
99
|
+
catch: convertError
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function createEffectApi(operationsByTag) {
|
|
104
|
+
return new Proxy({}, {
|
|
105
|
+
get: (_, tag)=>{
|
|
106
|
+
const tagOps = ownValue(operationsByTag, tag);
|
|
107
|
+
if (!tagOps) return undefined;
|
|
108
|
+
return new Proxy({}, {
|
|
109
|
+
get: (_, operation)=>{
|
|
110
|
+
const op = ownValue(tagOps, operation);
|
|
111
|
+
return op ? toEffect(op) : undefined;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function createEffectByPath(operationsByPath) {
|
|
118
|
+
return new Proxy({}, {
|
|
119
|
+
get: (_, endpoint)=>{
|
|
120
|
+
const op = ownValue(operationsByPath, endpoint);
|
|
121
|
+
return op ? toEffect(op) : undefined;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
4
125
|
|
|
5
126
|
const ApiService = createEffectApi(operationsByTag);
|
|
6
127
|
const effectByPath = createEffectByPath(operationsByPath);
|
|
7
128
|
|
|
8
|
-
export { ApiService, effectByPath };
|
|
129
|
+
export { ApiConfig, ApiError, ApiService, NetworkError, ValidationError, effectByPath, makeApiLayer };
|