@logto/api 1.35.0 → 1.37.0
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/README.md +21 -0
- package/lib/generated-types/management.d.ts +1216 -91
- package/lib/management.d.ts +39 -0
- package/lib/management.js +42 -10
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -51,6 +51,27 @@ const { apiClient } = createManagementApi('default', {
|
|
|
51
51
|
});
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
#### Custom authentication
|
|
55
|
+
|
|
56
|
+
For advanced use cases where you need full control over the authentication logic, use `createApiClient`:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { createApiClient } from '@logto/api/management';
|
|
60
|
+
|
|
61
|
+
const client = createApiClient({
|
|
62
|
+
baseUrl: 'https://your-logto-instance.com',
|
|
63
|
+
getToken: async () => {
|
|
64
|
+
// Your custom token retrieval logic
|
|
65
|
+
return getYourToken();
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Type-safe API calls
|
|
70
|
+
const response = await client.GET('/api/applications/{id}', {
|
|
71
|
+
params: { path: { id: 'your-app-id' } },
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
54
75
|
### API documentation
|
|
55
76
|
|
|
56
77
|
For detailed API documentation, refer to the [Logto Management API documentation](https://openapi.logto.io/).
|