@alvera-ai/platform-sdk 0.12.0 → 0.12.1-next.f64324d
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/.agent/AGENTS.md +3 -3
- package/.agent/cookbook/{custom-tables.md → generic-tables.md} +38 -35
- package/.agent/data_activation_clients.md +24 -0
- package/LICENSE +93 -0
- package/dist/index.d.mts +28 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +39 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2273,6 +2273,33 @@ const platformApiPingControllerPing = (options) => (options?.client ?? client).g
|
|
|
2273
2273
|
...options
|
|
2274
2274
|
});
|
|
2275
2275
|
/**
|
|
2276
|
+
* Reveal a connected app's publishable API key (admin)
|
|
2277
|
+
*
|
|
2278
|
+
* Returns the plaintext publishable (`public_api`) API key auto-provisioned for
|
|
2279
|
+
* a connected app — Alvera's analogue of a Stripe publishable key. The platform
|
|
2280
|
+
* stores the key Cloak-encrypted "for admin viewing"; this endpoint decrypts and
|
|
2281
|
+
* returns it.
|
|
2282
|
+
*
|
|
2283
|
+
* Wraps `Platform.ApiKeys.get_api_key_plaintext/1` over the connected app's api
|
|
2284
|
+
* key — the same primitive the API-keys UI uses to display a key. **Zero new
|
|
2285
|
+
* business logic.** Returns 404 when the app does not exist or its key was revoked.
|
|
2286
|
+
*
|
|
2287
|
+
* Powerful primitive: exposes a live credential. Every successful call is
|
|
2288
|
+
* structured-logged with `caller_user_id`, `connected_app_id`, and `api_key_id`
|
|
2289
|
+
* for a forensic trail.
|
|
2290
|
+
*
|
|
2291
|
+
* **Requires platform-admin authentication** (`User.role == :admin`).
|
|
2292
|
+
*
|
|
2293
|
+
*/
|
|
2294
|
+
const platformApiAdminControllerRevealConnectedAppApiKey = (options) => (options.client ?? client).get({
|
|
2295
|
+
security: [{
|
|
2296
|
+
scheme: "bearer",
|
|
2297
|
+
type: "http"
|
|
2298
|
+
}],
|
|
2299
|
+
url: "/api/v1/admin/connected-apps/{id}/api-key",
|
|
2300
|
+
...options
|
|
2301
|
+
});
|
|
2302
|
+
/**
|
|
2276
2303
|
* Sync routes
|
|
2277
2304
|
*
|
|
2278
2305
|
* Enqueues a background job to fetch routes from the connected app's `/.well-known/routes.json` endpoint and update the stored routes.
|
|
@@ -3053,11 +3080,18 @@ function _buildApi(myClient) {
|
|
|
3053
3080
|
client: myClient,
|
|
3054
3081
|
throwOnError: true
|
|
3055
3082
|
}) },
|
|
3056
|
-
admin: {
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3083
|
+
admin: {
|
|
3084
|
+
confirmUser: (id) => platformApiAdminControllerConfirmUser({
|
|
3085
|
+
path: { id },
|
|
3086
|
+
client: myClient,
|
|
3087
|
+
throwOnError: true
|
|
3088
|
+
}),
|
|
3089
|
+
revealConnectedAppApiKey: (id) => platformApiAdminControllerRevealConnectedAppApiKey({
|
|
3090
|
+
path: { id },
|
|
3091
|
+
client: myClient,
|
|
3092
|
+
throwOnError: true
|
|
3093
|
+
})
|
|
3094
|
+
},
|
|
3061
3095
|
tenants: {
|
|
3062
3096
|
list: () => platformApiTenantControllerIndex({
|
|
3063
3097
|
client: myClient,
|