Latest publish

This commit is contained in:
ci core model
2026-04-07 08:59:14 +00:00
parent 01fd89729e
commit 383bec2486
3 changed files with 55 additions and 2 deletions

2
.npmrc Normal file
View File

@@ -0,0 +1,2 @@
@reflex-platform:registry=https://git.dev.reflex-platform.com/api/packages/reflex-platform/npm/
//git.dev.reflex-platform.com/api/packages/reflex-platform/npm/:_authToken="11177f1f316afadeca69c5cabe3e273ea1b2ed3f"

View File

@@ -0,0 +1,51 @@
# Reflex Platform Core SDK
This is the official NPM Core SDK for **Reflex Platform**. It provides client stubs for interacting with Reflex Platform APIs through gRPC.
## Usage
Import the SDK in your JavaScript or TypeScript project and use it to communicate with **Reflex Platform** services.
```js
import { ProjectServiceClient, GetMyUIContextRequest } from '@reflex-platform/npm-core-sdk';
import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport'
import { type RpcOptions, type RpcInterceptor, UnaryCall } from "@protobuf-ts/runtime-rpc";
const authInterceptor : RpcInterceptor = {
interceptUnary(next, method, input, options: RpcOptions): UnaryCall {
options.meta["Authorization"] = "Bearer YOUR_TOKEN";
return next(method, input, options);
}
}
const coreTransportInstance = new GrpcWebFetchTransport({
baseUrl: "grpc.core.dev.reflex-platform.com:443",
interceptors: [authInterceptor]
});
const client = new ProjectServiceClient(coreTransportInstance);
const contexts = await client.GetMyUIContext(new GetMyUIContextRequest());
```
## gRPC Endpoint
The SDK connects to the following gRPC endpoint:
```
grpc.core.dev.reflex-platform.com
```
## Example Vue.js Application
A more complete Vue.js application that demonstrates how to integrate the **Reflex Platform NPM SDK** is available. This serves as a reference implementation for using the SDK in a frontend application.
Repository: [Vue RP Example](https://git.dev.reflex-platform.com/reflex-platform/vue-rp-example)
## Additional Resources
For more information on using the Reflex Platform SDK, please refer to the [documentation](https://docs.viz.dev.reflex-platform.com).
## License
This SDK is licensed under **MIT License**.

View File

@@ -2,11 +2,11 @@
"name": "@reflex-platform/npm-core-sdk", "name": "@reflex-platform/npm-core-sdk",
"version": "1.13.0-SNAPSHOT-260407085736", "version": "1.13.0-SNAPSHOT-260407085736",
"description": "npm libs from core model proto files", "description": "npm libs from core model proto files",
"homepage": "", "homepage": "https://git.dev.reflex-platform.com/reflex-platform",
"main": "index.ts", "main": "index.ts",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "" "url": "git+https://git.dev.reflex-platform.com/reflex-platform/npm-core-sdk.git"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"