Registry / devops / skyclick-grpc-client

skyclick-grpc-client

JSON →
library1.7.4jsnpmunverified

Skyclick gRPC Client is a Node.js library (v1.7.4, shiping TypeScript types) for interacting with Skyclick microservices via gRPC. It provides client methods for Campus, Activity, and H5P services. The library is actively maintained with frequent releases (multiple versions within a month). Key differentiators: opinionated wrapper around gRPC with protobuf message objects, includes pagination and notification services. It uses Protobuf-generated classes (e.g., CreateOrganizationRequest, getOrganization) and follows camelCase convention since v1.4.0. Requires @grpc/grpc-js and google-protobuf as peer dependencies.

npm install skyclick-grpc-client
INSTALL
IMPORT
SIG · SKYCLICK-GRPC-CLIE
S
skyclick-grpc-client
devopsjavascriptv1.7.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Campus
import { Campus } from 'skyclick-grpc-client'
const Campus = require('skyclick-grpc-client');
ESM default import for namespace containing all campus service clients.
Activity
import { Activity } from 'skyclick-grpc-client'
Named import for activity service clients. ESM-only since v1.4.0.
H5P
import { H5P } from 'skyclick-grpc-client'
const H5P = require('skyclick-grpc-client').H5P;
H5P namespace for new H5P interaction methods added in v1.7.4.
ClientOrganization
const organizationClient = Campus.ClientOrganization('localhost:50052');
const organizationClient = new Campus.ClientOrganization();
ClientOrganization is a factory function, not a constructor. Pass gRPC address as string.

Creates an organization using the Campus service client with protobuf message objects.

import { Campus } from 'skyclick-grpc-client'; const organizationClient = Campus.ClientOrganization('localhost:50052'); const args = new Campus.MessagesOrganization.CreateOrganizationRequest(); args.setContactId(1); args.setLocationId(1); args.setDescription('Example organization'); args.setLevel('Level 2'); args.setMission('BE THE BEST'); args.setName('ORG_1'); args.setType('Type A'); args.setVision('VISION'); organizationClient.createOrganization(args, (error: any, res: Campus.MessagesOrganization.CreateOrganizationResponse) => { if (error) { console.error(error); return; } const organization = res.getOrganization()?.toObject(); console.log(organization); });
Debug
Known issues
breakingCamelCase breaking change in v1.4.0: method names changed from snake_case to camelCase (e.g., create_organization -> createOrganization).
fix
Update all method calls to camelCase (e.g., args.setDescription instead of args.set_description).
affects: <1.4.0
breakingv1.7.3: Field 'type' renamed to 'unit_type' and new 'unit_number' added in Campus -> Unit service. This breaks existing code accessing field 'type'.
fix
Use args.setUnitType() and args.setUnitNumber() instead of args.setType().
affects: >=1.7.3
gotchaClient factory functions (e.g., Campus.ClientOrganization) expect a string address, not an object. Passing a URL object or missing port will throw a runtime error.
fix
Ensure address is a string like 'localhost:50052'.
affects: >=1.4.0
gotchaProtobuf message methods use set* and get* (e.g., setName, toObject). Direct property assignment does not work.
fix
Use setter methods: args.setName('test'). Use getter: res.getName() or res.toObject() for plain objects.
affects: >=1.0.0
deprecatedThe old snake_case methods (e.g., set_name) were removed in v1.4.0. They may still appear in older examples but are not supported.
fix
Use camelCase methods only.
affects: >=1.4.0
Errors
Common errors & fixes
TypeError: Campus.ClientOrganization is not a constructor
Using `new` keyword on factory function.
fix
Remove `new`: `const client = Campus.ClientOrganization('localhost:50052');`
Error: Cannot read properties of undefined (reading 'toObject')
Accessing toObject on a null/undefined returned object.
fix
Check response object: `res.getOrganization()?.toObject()`
Error: 14 UNAVAILABLE: failed to connect to all addresses
gRPC server not running or wrong address.
fix
Ensure server is running and address is correct (e.g., localhost:50052). Check firewall or network.
Upgrade
Version history
1.7.4latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredCore gRPC runtime for making RPC calls
google-protobufrequiredProtobuf message serialization/deserialization
Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
skyclick-grpc-client — npm install skyclick-grpc-client · libregistry