open-index/open-npm huggingface dataset:
npm package: @pgqty/cli
Description: Interactive codegen for PGQty
Author: PabloSzx
Latest version: 5.0.0

<p align="center">
  <a href="https://github.com/kleberbaum/pgqty">
    <img src="internal/images/logo.png" height="150" alt="pgqty" />
  </a>
</p>

<h2 align="center">
  The No-GraphQL Client for TypeScript

[![Repository](https://img.shields.io/badge/github-kleberbaum%2Fpgqty-blue)](https://github.com/kleberbaum/pgqty)
[![NPM](https://img.shields.io/badge/npm-pgqty-red)](https://www.npmjs.com/package/pgqty)

</h2>

[![PGQty Hero Section](internal/images/hero.png)](https://github.com/kleberbaum/pgqty)

Data requirements within your application are picked up automatically, freeing
you from having to maintain GraphQL queries by-hand. It offers a first-class
TypeScript experience. See API documentation at all times within autocomplete.

Make breaking changes to your API, and see type-errors exactly where things are
breaking, in realtime. No more running a separate validation step.

This repository is the **PGQty** fork of
[GQty](https://github.com/gqty-dev/gqty), published under the new `pgqty` and
`@pgqty/*` npm names for the [`pgqty`](https://www.npmjs.com/org/pgqty)
organization. It keeps the original developer experience while enabling tailored
workflows for Pylon and other server-side environments.

### Packages

- Core client: [`pgqty`](https://www.npmjs.com/package/pgqty)
- CLI codegen: [`@pgqty/cli`](https://www.npmjs.com/package/@pgqty/cli)
- React bindings: [`@pgqty/react`](https://www.npmjs.com/package/@pgqty/react)
- Solid bindings: [`@pgqty/solid`](https://www.npmjs.com/package/@pgqty/solid)
- Logger helpers: [`@pgqty/logger`](https://www.npmjs.com/package/@pgqty/logger)
- Subscriptions:
  [`@pgqty/subscriptions`](https://www.npmjs.com/package/@pgqty/subscriptions)

Documentation for the original project remains a great starting point while
PGQty-specific guides are assembled. Refer to package READMEs in this repo for
the most up-to-date installation commands.

## Get involved

Documentation, bug reports, pull requests, and other contributions are welcomed!
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information.
npm package: @pgqty/logger
Description: A debug logger for GQty
Author: PabloSzx
Latest version: 4.0.0

<p align="center">
  <a href="https://gqty.dev">
    <img src="https://github.com/gqty-dev/gqty/raw/main/internal/images/logo.png" height="150" alt="gqty" />
  </a>
</p>

<h2 align="center">
  The No-GraphQL Client for TypeScript

[![Documentation](https://img.shields.io/badge/documentation-documentation?color=C00B84)](https://gqty.dev)
[![Discord](https://img.shields.io/discord/874477141834739762?color=7289d9&label=discord)](https://discord.gg/U967mp5qbQ)

</h2>

[![GQty Hero Section](https://github.com/gqty-dev/gqty/raw/main/internal/images/hero.png)](https://gqty.dev)

Data requirements within your application are picked up automatically, freeing
you from having to maintain GraphQL queries by-hand. It offers a first-class
TypeScript experience. See API documentation at all times within autocomplete.

Make breaking changes to your API, and see type-errors exactly where things are
breaking, in realtime. No more running a separate validation step.

**Head over to [gqty.dev](https://gqty.dev) to explore features and
documentations!**

## Get involved

Documentation, bug reports, pull requests, and other contributions are welcomed!
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information.
npm package: @pgqty/react
Description: The No-GraphQL Client for React
Author: PabloSzx
Latest version: 4.0.0

<p align="center">
  <a href="https://gqty.dev">
    <img src="https://github.com/gqty-dev/gqty/raw/main/internal/images/logo.png" height="150" alt="gqty" />
  </a>
</p>

<h2 align="center">
  The No-GraphQL Client for TypeScript

[![Documentation](https://img.shields.io/badge/documentation-documentation?color=C00B84)](https://gqty.dev)
[![Discord](https://img.shields.io/discord/874477141834739762?color=7289d9&label=discord)](https://discord.gg/U967mp5qbQ)

</h2>

[![GQty Hero Section](https://github.com/gqty-dev/gqty/raw/main/internal/images/hero.png)](https://gqty.dev)

Data requirements within your application are picked up automatically, freeing
you from having to maintain GraphQL queries by-hand. It offers a first-class
TypeScript experience. See API documentation at all times within autocomplete.

Make breaking changes to your API, and see type-errors exactly where things are
breaking, in realtime. No more running a separate validation step.

**Head over to [gqty.dev](https://gqty.dev) to explore features and
documentations!**

## Get involved

Documentation, bug reports, pull requests, and other contributions are welcomed!
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information.
npm package: @pgqty/solid
Description: The No-GraphQL Client for React
Author: Vicary Archangel
Latest version: 1.0.0

<p align="center">
  <a href="https://github.com/kleberbaum/pgqty">
    <img src="internal/images/logo.png" height="150" alt="pgqty" />
  </a>
</p>

<h2 align="center">
  The No-GraphQL Client for TypeScript

[![Repository](https://img.shields.io/badge/github-kleberbaum%2Fpgqty-blue)](https://github.com/kleberbaum/pgqty)
[![NPM](https://img.shields.io/badge/npm-pgqty-red)](https://www.npmjs.com/package/pgqty)

</h2>

[![PGQty Hero Section](internal/images/hero.png)](https://github.com/kleberbaum/pgqty)

Data requirements within your application are picked up automatically, freeing
you from having to maintain GraphQL queries by-hand. It offers a first-class
TypeScript experience. See API documentation at all times within autocomplete.

Make breaking changes to your API, and see type-errors exactly where things are
breaking, in realtime. No more running a separate validation step.

This repository is the **PGQty** fork of
[GQty](https://github.com/gqty-dev/gqty), published under the new `pgqty` and
`@pgqty/*` npm names for the [`pgqty`](https://www.npmjs.com/org/pgqty)
organization. It keeps the original developer experience while enabling tailored
workflows for Pylon and other server-side environments.

### Packages

- Core client: [`pgqty`](https://www.npmjs.com/package/pgqty)
- CLI codegen: [`@pgqty/cli`](https://www.npmjs.com/package/@pgqty/cli)
- React bindings: [`@pgqty/react`](https://www.npmjs.com/package/@pgqty/react)
- Solid bindings: [`@pgqty/solid`](https://www.npmjs.com/package/@pgqty/solid)
- Logger helpers: [`@pgqty/logger`](https://www.npmjs.com/package/@pgqty/logger)
- Subscriptions:
  [`@pgqty/subscriptions`](https://www.npmjs.com/package/@pgqty/subscriptions)

Documentation for the original project remains a great starting point while
PGQty-specific guides are assembled. Refer to package READMEs in this repo for
the most up-to-date installation commands.

## Get involved

Documentation, bug reports, pull requests, and other contributions are welcomed!
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information.
npm package: @pgrabovets/json-view
Description: This is a javascript library for displaying json data into a DOM
Author: pavel grabovets
Latest version: 2.8.1

# json-view

This is a JavaScript library for displaying JSON data in the DOM.
[Demo link](http://pgrabovets.github.io/json-view/)

## Installation

```javascript
  npm install '@pgrabovets/json-view'
```

## How to use

Import the jsonview library from the npm package:

```javascript
import jsonview from "@pgrabovets/json-view";
```

Or include jsonview.umd.cjs and jsonview.css from the dist directory in your HTML page:

```html
<link href="jsonview.css" rel="stylesheet" />
<script src="jsonview.umd.cjs"></script>
```

Get JSON data and render the tree into the DOM:

```javascript
// get json data
const data = '{"name": "json-view","version": "1.0.0"}';

// create json tree object
const tree = jsonview.create(data);

// render tree into dom element
jsonview.render(tree, document.querySelector(".tree"));

// you can render JSON data without creating a tree manually
const tree = jsonview.renderJSON(data, document.querySelector(".tree"));
```

Control methods:

```javascript
// expand tree
jsonview.expand(tree);

// collapse tree
jsonview.collapse(tree);

// traverse tree object
jsonview.traverse(tree, function (node) {
  console.log(node);
});

// toggle between show and hide
jsonview.toggleNode(tree);

// destroy and unmount JSON tree from the DOM
jsonview.destroy(tree);
```

## Example 1

```html
<!DOCTYPE html>
<html>
  <head>
    <link href="dist/jsonview.css" rel="stylesheet" />
    <title>JSON VIEW</title>
  </head>
  <body>
    <div class="root"></div>

    <script type="text/javascript" src="dist/jsonview.umd.cjs"></script>
    <script type="text/javascript">
      fetch("dist/example2.json")
        .then((res) => {
          return res.text();
        })
        .then((data) => {
          const tree = jsonview.create(data);
          jsonview.render(tree, document.querySelector("#root"));
          jsonview.expand(tree);
        })
        .catch((err) => {
          console.log(err);
        });
    </script>
  </body>
</html>
```

## Example 2

```javascript
import "@pgrabovets/json-view/style.css";
import jsonview from "@pgrabovets/json-view";

fetch("example2.json")
  .then((res) => {
    return res.text();
  })
  .then((data) => {
    const tree = jsonview.create(data);
    jsonview.render(tree, document.querySelector(".root"));
    jsonview.expand(tree);
  })
  .catch((err) => {
    console.log(err);
  });
```

## Development

### Clone the repository and install dependencies:

```
$ npm install

$ npm run dev
$ npm run build

open http://localhost:5173/
```
npm package: @pgswe/ics.js
Description: A browser friendly .ics/.vcs file generator written entirely in javascript
Latest version: 0.1.3

ics.js
============

A browser firendly .ics/.vcs file generator written entirely in javascript!!!!!!

Now you can make calendar friendly files client-side.  It outputs .ics files, so the files are compatible with all modern calendar software (Outlook, Apple Calendar, Google, etc.)

How To Use
----------
Simply use invoke the object and use the functions...

	var cal = ics();
	cal.addEvent(subject, description, location, begin, end);
	cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-)
    cal.download(filename);

`begin` and `end` need to be formatted in a way that is friendly to `Date()`


Example
-------
* **[Demo](http://htmlpreview.github.io/?https://github.com/nwcell/ics.js/blob/master/demo/demo.html)**

```
<script>
	var cal = ics();
	cal.addEvent('Demo Event', 'This is an all day event', 'Nome, AK', '8/7/2013', '8/7/2013');
	cal.addEvent('Demo Event', 'This is thirty minut event', 'Nome, AK', '8/7/2013 5:30 pm', '8/9/2013 6:00 pm');
</script>
<a href="javascript:cal.download()">Demo</a>
```


Dependencies
------------
The tool uses 2 libraries from the following projects:
* [FileSaver.js](https://github.com/eligrey/FileSaver.js)
* [Blob.js](https://github.com/eligrey/Blob.js)

I've compressed them and included them into the source for the normal file.  Other variations are available in the repo.

If you want IE to allow for either opening documents as well as saving documents, you can use my fork of FileSaver.js (https://github.com/nwcell/FileSaver.js)...  Though you honestly are probebly best off using their main.

Supported Browsers
------------------

| Browser        | Dependancies |
| -------------- | ------------ |
| Firefox 20+    | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Firefox ≤ 19   | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |
| Chrome         | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Chrome for Android v28+ | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| IE 10+         | [FileSaver.js](https://github.com/eligrey/FileSaver.js)         |
| Opera Next     | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Opera < 15     | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |
| Safari ≤ 6     | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |


Credits
------------------
* [Travis Krause](https://github.com/nwcell): Me
* [Kyle Hornberg](https://github.com/khornberg): Added multi event functionality and made everything a package firendly
npm package: @pgswe/icsjs
Description: A browser friendly .ics/.vcs file generator written entirely in javascript
Latest version: 0.1.3

ics.js
============

A browser firendly .ics/.vcs file generator written entirely in javascript!!!!!!

Now you can make calendar friendly files client-side.  It outputs .ics files, so the files are compatible with all modern calendar software (Outlook, Apple Calendar, Google, etc.)

How To Use
----------
Simply use invoke the object and use the functions...

	var cal = ics();
	cal.addEvent(subject, description, location, begin, end);
	cal.addEvent(subject, description, location, begin, end); // yes, you can have multiple events :-)
    cal.download(filename);

`begin` and `end` need to be formatted in a way that is friendly to `Date()`


Example
-------
* **[Demo](http://htmlpreview.github.io/?https://github.com/nwcell/ics.js/blob/master/demo/demo.html)**

```
<script>
	var cal = ics();
	cal.addEvent('Demo Event', 'This is an all day event', 'Nome, AK', '8/7/2013', '8/7/2013');
	cal.addEvent('Demo Event', 'This is thirty minut event', 'Nome, AK', '8/7/2013 5:30 pm', '8/9/2013 6:00 pm');
</script>
<a href="javascript:cal.download()">Demo</a>
```


Dependencies
------------
The tool uses 2 libraries from the following projects:
* [FileSaver.js](https://github.com/eligrey/FileSaver.js)
* [Blob.js](https://github.com/eligrey/Blob.js)

I've compressed them and included them into the source for the normal file.  Other variations are available in the repo.

If you want IE to allow for either opening documents as well as saving documents, you can use my fork of FileSaver.js (https://github.com/nwcell/FileSaver.js)...  Though you honestly are probebly best off using their main.

Supported Browsers
------------------

| Browser        | Dependancies |
| -------------- | ------------ |
| Firefox 20+    | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Firefox ≤ 19   | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |
| Chrome         | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Chrome for Android v28+ | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| IE 10+         | [FileSaver.js](https://github.com/eligrey/FileSaver.js)         |
| Opera Next     | [FileSaver.js](https://github.com/eligrey/FileSaver.js) |
| Opera < 15     | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |
| Safari ≤ 6     | [FileSaver.js](https://github.com/eligrey/FileSaver.js), [Blob.js](https://github.com/eligrey/Blob.js) |


Credits
------------------
* [Travis Krause](https://github.com/nwcell): Me
* [Kyle Hornberg](https://github.com/khornberg): Added multi event functionality and made everything a package firendly
npm package: @pgtyped-curly/cli
Description: This package provides the `pgtyped` CLI.   The `pgtyped` CLI can work in build and watch mode.
Latest version: 2.3.3

## @pgtyped-curly/cli

This package provides the `pgtyped` CLI.  
The `pgtyped` CLI can work in build and watch mode.

### Flags:

The CLI supports two flags:

- `-c config_file_path.json` to pass the config file path.
- `-w` to start in watch mode.

Running the CLI:

```
npx pgtyped -w -c config.json
```

### Env variables:

PgTyped supports common PostgreSQL environment variables:

- `PGHOST`
- `PGUSER`
- `PGPASSWORD`
- `PGDATABASE`
- `PGPORT`

These variables will override values provided in `config.json`.

### Config file:

Config file format (`config.json`):

```js
{
  // You can specify as many transforms as you want
  // Only TS and SQL files (modes) are supported at the moment
  "transforms": [
    {
      "mode": "sql", // SQL mode
      "include": "**/*.sql", // SQL files pattern to scan for queries
      "emitTemplate": "{{dir}}/{{name}}.queries.ts" // File name template to save generated files
    },
    {
      "mode": "ts", // TS mode
      "include": "**/action.ts", // TS file pattern to scan for queries
      "emitTemplate": "{{dir}}/{{name}}.types.ts" // File name template to save generated files
    }
  ],
  "srcDir": "./src/", // Directory to scan or watch for query files
  "failOnError": false, // Whether to fail on a file processing error and abort generation (can be omitted - default is false)
  "camelCaseColumnNames": false, // convert to camelCase column names of result interface
  "db": {
    "dbName": "testdb", // DB name
    "user": "user", // DB username
    "password": "password", // DB password (optional)
    "host": "127.0.0.1" // DB host (optional)
  }
}
```

### Generated files

By default, PgTyped saves generated files in the same folder as the source files it parses.  
This behavior can be customized using the `emitTemplate` config parameter.  
In that template, following parameters are available for interpolation: `root`, `dir`, `dir_base`, `base`, `name` and `ext`.  
For example, when parsing source/query file `/home/user/dir/file.sql`, these parameters are assigned the following values:

```
┌───────────────────────────┬────────────┐
│          dir              │    base    │
├──────┬─────────┬──────────├──────┬─────┤
│ root │         │ dir_base │ name │ ext │
"  /    home/user/    dir   / file  .sql "
└──────┴────────────────────┴──────┴─────┘
(All spaces in the "" line should be ignored. They are purely for formatting.)
```

---

This package is part of the PgTyped project.  
Refer to root [README](https://github.com/adelsz/pgtyped) for details.
npm package: @pgtyped-curly/runtime
Description: This package provides the `sql` tagged template.   The `sql` tagged template requires a generic parameter: `<TQueryType>`. For each query PgTyped generates an interface that can be used in this parameter to type your query.
Latest version: 2.3.3

## @pgtyped-curly/runtime

This package provides the `sql` tagged template.  
The `sql` tagged template requires a generic parameter: `<TQueryType>`.
For each query PgTyped generates an interface that can be used in this parameter to type your query.

To run a query defined with the `sql` tagged template, call the `sql.run` method.  
The `sql.run` method automatically enforces correct input `TParams` and output `TResult` types.

```js
public run: (
  params: TParams,
  dbConnection: IDatabaseConnection,
) => Promise<TResult[]>;
```

Here `dbConnection` is any object that satisifies the `IDatabaseConnection` interface. It is used to actually send the query to the DB for execution.

```
interface IDatabaseConnection {
  query: (query: string, bindings: any[]) => Promise<{ rows: any[] }>;
}
```

This is usually the `client` object created with [node-postgres](https://github.com/brianc/node-postgres), but can be any other connection of your choice.

This package is part of the pgtyped project.  
Refer to [README](https://github.com/adelsz/pgtyped) for details.
npm package: @pgtyped-curly/wire
Description: This package implements most of the Postgres protocol for pgTyped internal use.   Refer to root [README](https://github.com/adelsz/pgtyped) for details.
Latest version: 2.3.3

### PgTyped Wire

This package implements most of the Postgres protocol for pgTyped internal use.  
Refer to root [README](https://github.com/adelsz/pgtyped) for details.
npm package: @pgtyped-pydantic/cli
Description: Forked from pgtyped, please go visit them for the original package! I take no credit for much of this work
Latest version: 1.1.19

## @pgtyped/cli

This package provides the `pgtyped` CLI.  
The `pgtyped` CLI can work in build and watch mode.

### Flags:

The CLI supports two flags:

- `-c config_file_path.json` to pass the config file path.
- `-w` to start in watch mode.

Running the CLI:

```
npx pgtyped -w -c config.json
```

### Env variables:

PgTyped supports common PostgreSQL environment variables:

- `PGHOST`
- `PGUSER`
- `PGPASSWORD`
- `PGDATABASE`
- `PGPORT`

These variables will override values provided in `config.json`.

### Config file:

Config file format (`config.json`):

```js
{
  // You can specify as many transforms as you want
  // Only TS and SQL files (modes) are supported at the moment
  "transforms": [
    {
      "mode": "sql", // SQL mode
      "include": "**/*.sql", // SQL files pattern to scan for queries
      "emitTemplate": "{{dir}}/{{name}}.queries.ts" // File name template to save generated files
    },
    {
      "mode": "ts", // TS mode
      "include": "**/action.ts", // TS file pattern to scan for queries
      "emitTemplate": "{{dir}}/{{name}}.types.ts" // File name template to save generated files
    }
  ],
  "srcDir": "./src/", // Directory to scan or watch for query files
  "failOnError": false, // Whether to fail on a file processing error and abort generation (can be omitted - default is false)
  "camelCaseColumnNames": false, // convert to camelCase column names of result interface
  "db": {
    "dbName": "testdb", // DB name
    "user": "user", // DB username
    "password": "password", // DB password (optional)
    "host": "127.0.0.1" // DB host (optional)
  }
}
```

### Generated files

By default, PgTyped saves generated files in the same folder as the source files it parses.  
This behavior can be customized using the `emitTemplate` config parameter.  
In that template, following parameters are available for interpolation: `root`, `dir`, `dir_base`, `base`, `name` and `ext`.  
For example, when parsing source/query file `/home/user/dir/file.sql`, these parameters are assigned the following values:

```
┌───────────────────────────┬────────────┐
│          dir              │    base    │
├──────┬─────────┬──────────├──────┬─────┤
│ root │         │ dir_base │ name │ ext │
"  /    home/user/    dir   / file  .sql "
└──────┴────────────────────┴──────┴─────┘
(All spaces in the "" line should be ignored. They are purely for formatting.)
```

---

This package is part of the PgTyped project.  
Refer to root [README](https://github.com/adelsz/pgtyped) for details.
npm package: @pgtyped-pydantic/runtime
Description: This package provides the `sql` tagged template.   The `sql` tagged template requires a generic parameter: `<TQueryType>`. For each query PgTyped generates an interface that can be used in this parameter to type your query.
Latest version: 1.0.0

## @pgtyped/runtime

This package provides the `sql` tagged template.  
The `sql` tagged template requires a generic parameter: `<TQueryType>`.
For each query PgTyped generates an interface that can be used in this parameter to type your query.

To run a query defined with the `sql` tagged template, call the `sql.run` method.  
The `sql.run` method automatically enforces correct input `TParams` and output `TResult` types.

```js
public run: (
  params: TParams,
  dbConnection: IDatabaseConnection,
) => Promise<TResult[]>;
```

Here `dbConnection` is any object that satisifies the `IDatabaseConnection` interface. It is used to actually send the query to the DB for execution.

```
interface IDatabaseConnection {
  query: (query: string, bindings: any[]) => Promise<{ rows: any[] }>;
}
```

This is usually the `client` object created with [node-postgres](https://github.com/brianc/node-postgres), but can be any other connection of your choice.

This package is part of the pgtyped project.  
Refer to [README](https://github.com/adelsz/pgtyped) for details.
npm package: @pgtyped-pydantic/wire
Description: This package implements most of the Postgres protocol for pgTyped internal use.   Refer to root [README](https://github.com/adelsz/pgtyped) for details.
Latest version: 1.0.0

### PgTyped Wire

This package implements most of the Postgres protocol for pgTyped internal use.  
Refer to root [README](https://github.com/adelsz/pgtyped) for details.
npm package: @pgvn/illus
Description: Illustration of Property Guru
Author: Hieu Nguyen
Latest version: 1.0.8

# Mochi

## Roadmap

| component    | description             | status         | estimate time |
| ------------ | ----------------------- | -------------- | ------------- |
| formatNumber | Format number, currency | ` in progress` | 6 JAN         |
| Button       |                         |                |               |
| Avatar       |                         |                |               |
| Badge        |                         |                |               |
| Checkbox     |                         |                |               |
| Dialog       |                         |                |               |
| Form         |                         |                |               |
| Menu         |                         |                |               |
| Tabs         |                         |                |               |
| Tag          |                         |                |               |
| Toast        |                         |                |               |
| Tooltip      |                         |                |               |
| Dropdown     |                         |                |               |
| Panel        |                         |                |               |
npm package: @pgvn/preset
Description: A preset of Property Guru base on tailwindcss
Author: Property Guru
Latest version: 1.0.4

# Installation

```sh
yarn add @pgvn/preset
```

# Usage

In your `tailwind.config.js`, add `presets` property:

```js
module.exports = {
  presets: [require("@pgvn/preset")],
}
```
npm package: @ph-cms/api-contract
Description: Shared Zod schemas and types for PH-CMS
Latest version: 0.1.8

# @ph-cms/api-contract

Shared Zod schemas and TypeScript types for PH-CMS.

This package is intended to be published to npm and consumed by servers, clients, and tooling that need a single source of truth for request and response contracts.

## Installation

```bash
npm install @ph-cms/api-contract zod
```

## Usage

```ts
import { CreateContentSchema, type CreateContentRequest } from '@ph-cms/api-contract';
import { UpdateUserProfileSchema, type UpdateUserProfileRequest } from '@ph-cms/api-contract';

// Create Content
const contentPayload: CreateContentRequest = {
  title: 'Hello',
  channelUid: 'news',
  type: 'ARTICLE',
  status: 'DRAFT',
};

const parsedContent = CreateContentSchema.parse(contentPayload);

// Update User Profile
const userPayload: UpdateUserProfileRequest = {
  display_name: 'Updated Name',
  avatar_url: 'https://example.com/avatar.jpg',
  profile_data: { bio: 'New bio' }
};

const parsedUser = UpdateUserProfileSchema.parse(userPayload);
```

## Exports

- Auth, content, channel, user, hierarchy, policy, terms, geo, and common schemas
- Inferred TypeScript types derived from the shared Zod schemas

## License

MIT
npm package: @ph-cms/client-sdk-admin
Description: Admin-only PH-CMS Client SDK
Latest version: 0.1.2

# @ph-cms/client-sdk-admin

Admin-only PH-CMS Client SDK.

This package provides:

- A typed API client for administrative endpoints
- React context and hooks for consuming the admin client in UI code
- **Integrated React Query support** (from v0.1.1)

## Installation

```bash
npm install @ph-cms/client-sdk-admin
```

> **Note:** `@tanstack/react-query` is a direct dependency from v0.1.1. You no longer need to install it manually unless you use it in your own application code.

## Usage (Core SDK)

```ts
import { PHCMSAdminClient } from '@ph-cms/client-sdk-admin';

const client = new PHCMSAdminClient({
  baseURL: 'https://api.example.com',
  apiKey: 'your-admin-api-key', // if using API key auth
});

// Use the modules directly
const users = await client.user.list({
  page: 1,
  limit: 20,
});
```

## React Usage (v0.1.1+)

From version 0.1.1, `PHCMSAdminProvider` automatically includes a `QueryClientProvider`. You don't need to wrap your app with `QueryClientProvider` manually to use admin-sdk hooks.

### Basic Setup

```tsx
import { PHCMSAdminProvider } from '@ph-cms/client-sdk-admin';
import { adminClient } from './lib/sdk'; // Your pre-configured admin client

export function App() {
  return (
    <PHCMSAdminProvider client={adminClient}>
      <YourAdminComponents />
    </PHCMSAdminProvider>
  );
}
```

### Using Hooks

```tsx
import { useUserList, usePolicy } from '@ph-cms/client-sdk-admin';

function UserManagement() {
  const { data: users, isLoading } = useUserList();

  if (isLoading) return <div>Loading users...</div>;

  return (
    <div>
      <h1>User Management</h1>
      <ul>
        {users?.items.map(user => (
          <li key={user.uid}>{user.email} ({user.role})</li>
        ))}
      </ul>
    </div>
  );
}
```

### Custom QueryClient (Optional)

If your application already uses React Query and you want to share the cache/settings:

```tsx
import { QueryClient } from '@tanstack/react-query';
import { PHCMSAdminProvider } from '@ph-cms/client-sdk-admin';

const queryClient = new QueryClient();
const adminClient = new PHCMSAdminClient({ baseURL: '...' });

export function App() {
  return (
    <PHCMSAdminProvider client={adminClient} queryClient={queryClient}>
      {/* Both your app and Admin SDK hooks will use the same queryClient */}
      <YourAdminComponents />
    </PHCMSAdminProvider>
  );
}
```

## License

MIT
npm package: @ph-gomes/pdf-signer
Description: A JavaScript PDF signer for node.
Latest version: 1.1.6

# PDF signer

A JavaScript PDF signer for node. 

This package is based on [vbuch](https://www.npmjs.com/~vbuch) work: [node-signpdf](https://www.npmjs.com/package/node-signpdf).

## PDF versions
Pdf-signer cant handle pdf stream in the moment. It only can works with pdf which built on XREF tables. 

For more information look at the  NoahCardoza's [issue](https://github.com/vizicsaba89/pdf-signer/issues/16)

## Installation

Installation uses the npm package manager. Just type the following command after installing npm.

```bash
npm install pdf-signer
```

## Usage

single signing example:
```javascript
import { sign } from 'pdf-signer'

const p12Buffer = fs.readFileSync(`./assets/pdf-signer.p12`)
const pdfBuffer = fs.readFileSync(`./assets/example.pdf`)

const signedPdf = sign(pdfBuffer, p12Buffer, 'pdfsigner', {
  reason: '2',
  email: 'test@email.com',
  location: 'Location, LO',
  signerName: 'Test User',
  annotationAppearanceOptions: {
    signatureCoordinates: { left: 0, bottom: 700, right: 190, top: 860 },
    signatureDetails: [
      {
        value: 'Signed by: Kiss Béla',
        fontSize: 7,
        transformOptions: { rotate: 0, space: 1, tilt: 0, xPos: 20, yPos: 20 },
      },
      {
        value: 'Date: 2019-10-11',
        fontSize: 7,
        transformOptions: { rotate: 0, space: 1, tilt: 0, xPos: 20, yPos: 30 },
      },
    ],
  },
})

fs.writeFileSync('./assets/results/signed.pdf', signedPdf)
```
More examples can be found in spec file [spec](https://github.com/vizicsaba89/pdf-signer/blob/master/src/sign.spec.ts).

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)