From 9cff1b32ed21c8982d3160d436cf6f0655363dcf Mon Sep 17 00:00:00 2001 From: ci viz model Date: Thu, 2 Apr 2026 08:31:27 +0000 Subject: [PATCH] Latest publish --- .npmrc | 2 ++ README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- package.json | 4 ++-- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..6ed97e0 --- /dev/null +++ b/.npmrc @@ -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" \ No newline at end of file diff --git a/README.md b/README.md index fe8b905..d4d4270 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,51 @@ +# Reflex Platform Core SDK -# npm libs from visibility model proto files +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.viz.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.viz.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**. diff --git a/package.json b/package.json index 98fd109..e16e796 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "@reflex-platform/npm-viz-sdk", "version": "1.13.0-SNAPSHOT-260402083005", "description": "npm libs from visibility model proto files", - "homepage": "", + "homepage": "https://git.dev.reflex-platform.com/reflex-platform", "main": "index.ts", "repository": { "type": "git", - "url": "" + "url": "git+https://git.dev.reflex-platform.com/reflex-platform/npm-viz-sdk.git" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1"