open-index/open-npm huggingface dataset:
npm package: @oof.gg/protobuf-ts
Description: This repository contains the [Protocol Buffers](https://developers.google.com/protocol-buffers) for oof.gg SDK. The protobufs are used to define the messages that are passed between the SDK, servers, and clients. This will provide a common language for th
Author: Brian S.
Latest version: 1.0.110

# TypeScript Protocol Buffers
This repository contains the [Protocol Buffers](https://developers.google.com/protocol-buffers) for oof.gg SDK. The protobufs are used to define the messages that are passed between the SDK, servers, and clients. This will provide a common language for the SDK to communicate with the server, and ensure maintainability and consistency for the events being passed.

# Usage
To use the protos in your project, you can import @oof-gg/protobuf-ts from npm. The package contains the compiled TypeScript files for the protobufs.

```bash
npm install @oof.gg/protobuf-ts
```

# Development
To use the protos in your TypeScript project:
```
import { GlobalEvent, GlobalEvent_EventType, GlobalEvent_EventAttribute } from '@oof.gg/protobuf-ts/global/event';

const globalAttribute: GlobalEvent_EventAttribute = {
  stringValue: 'value'
}

const globalEvent: GlobalEvent = {
  id: 'event1',
  eventName: 'event1',
  timestamp: new Date().getTime(),
  gameId: 'game1',
  playerId: 'player1',
  teamId: 'red',
  attributes: {
    globalAttribute
  },
  type: GlobalEvent_EventType.CUSTOM
}

const encodedGlobalEvent = GlobalEvent.encode(globalEvent).finish();
```

# Documentation and Examples
For a full list of available messages, see the [protobufs](https://github.com/oof-gg/oof-protobufs/blob/main/generated/docs/docs.md) documentation on Github. You can also visit the [repository](https://github.com/oof-gg/oof-protobufs) for tests and examples on how to use the protobufs in your project.

Note: The protobufs are still in development and may change.
npm package: @oof.gg/protobuf-ts-web
Description: This repository contains the [Protocol Buffers](https://developers.google.com/protocol-buffers) for oof.gg SDK. The protobufs are used to define the messages that are passed between the SDK, servers, and clients. This will provide a common language for th
Author: Brian S.
Latest version: 1.0.109

# TypeScript Protocol Buffers
This repository contains the [Protocol Buffers](https://developers.google.com/protocol-buffers) for oof.gg SDK. The protobufs are used to define the messages that are passed between the SDK, servers, and clients. This will provide a common language for the SDK to communicate with the server, and ensure maintainability and consistency for the events being passed.

# Usage
To use the protos in your project, you can import @oof-gg/protobuf-ts from npm. The package contains the compiled TypeScript files for the protobufs.

```bash
npm install @oof.gg/protobuf-ts-web
```

# Documentation and Examples
For a full list of available messages, see the [protobufs](https://github.com/oof-gg/oof-protobufs/blob/main/generated/docs/docs.md) documentation on Github. You can also visit the [repository](https://github.com/oof-gg/oof-protobufs) for tests and examples on how to use the protobufs in your project.

Note: The protobufs are still in development and may change.
npm package: @oof.gg/sdk
Description: This is the official oof.gg SDK for TypeScript/JavaScript. It allows you to interact with the oof.gg WSS/APIs.
Author: Brian S.
Latest version: 0.1.25

# oof.gg SDK
This is the official oof.gg SDK for TypeScript/JavaScript. It allows you to interact with the oof.gg WSS/APIs.

## Installation
```npm i @oof.gg/sdk```

## Usage
```typescript
import { GameSDK, SDKConfig } from '@oof.gg/sdk';
export const main = async () => {
  const sdkConfig: SDKConfig = {
    authUrl: '/auth',
    socketUrl: 'ws://0.0.0.0:9090',
    apiUrl: '/api'
  }

  const oof = new GameSDK(sdkConfig);

  const token = 'your-jwt-token';
  await oof.connect(token);

  // Socket events
  oof.events.websocket.game.emit('REGISTER_PLAYER', payload);
  oof.events.websocket.game.on('INIT', (data) => {
    console.log(data);
  });

  // Local events
  oof.events.local.on('ABORT', (data) => {
    console.log('ABORT event received:', data);
  });
  
  oof.events.local.on('STOP', (data) => {
    console.log('STOP event received:', data);
  });

  // Requests to App
  oof.events.local.emit('ABORT', {
    reason: 'User closed the game'
  });
}
```


## TODO
- [ ] Add more examples
- [ ] Add more documentation
- [ ] Authenticated requests