@jphil/bookwhen-client 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ ISC License
2
+
3
+ Copyright 2024 Justin Philpott
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # `@jphil/bookwhen-client`
2
+
3
+ \[wip\]!
4
+
5
+ An API client library for the [Bookwhen](www.bookwhen.com) booking platform [API (v2)](https://api.bookwhen.com/v2), written in Typescript for NodeJS. Intended for server-side environments.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview](#overview)
10
+ - [Features](#features)
11
+ - [Installation](#installation)
12
+ - [Usage](#usage)
13
+ - [Configuration](#configuration)
14
+ - [Contributing](#contributing)
15
+ - [Roadmap](#roadmap)
16
+ - [License](#license)
17
+
18
+ ## Overview
19
+
20
+ You'll likely be at least somewhat familiar with the [Bookwhen](www.bookwhen.com) booking platform if you've landed here. But if not, you'll want to have a look at their [API (v2) documentation](https://api.bookwhen.com/v2). There's also a nice [Swagger style layout of the Bookwhen API v2 docs](https://petstore.swagger.io/?url=https://api.bookwhen.com/v2/openapi.yaml)
21
+
22
+ ## Features
23
+
24
+ - Lightweight and easy to integrate
25
+ - Fully typed for TypeScript support
26
+
27
+ ## Installation
28
+
29
+ Install via pnpm:
30
+
31
+ ```bash
32
+ pnpm add @jphil/bookwhen-client
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```typescript
38
+ // ... todo
39
+ ```
40
+
41
+ ## Configuration
42
+
43
+ Required configuration options:
44
+
45
+ - **apiKey**: Your Bookwhen API key (required)
46
+
47
+ API requests to the Bookwhen API are authenticated using Basic Authentication with the API Key as the username and a blank password.
48
+
49
+ API keys can be generated in the [https://YOUR-ACCOUNT-NAME.bookwhen.com/settings/api_access_permission_sets](API tokens setup area of your Bookwhen account).
50
+
51
+ ## Contributing
52
+
53
+ Contributions are welcome! (proper guidelines to be written)
54
+
55
+ ### Setting Up Husky for Contributions
56
+
57
+ This project uses Husky for Git hooks and Commitlint to enforce commit message standards.
58
+
59
+ Install Dependencies: First, clone the repository and install the project dependencies, which include Husky:
60
+
61
+ ```bash
62
+ git clone <repository-url>
63
+ cd <repository-directory>
64
+ pnpm install
65
+ ```
66
+
67
+ Activate Husky Hooks: After installing dependencies, you need to initialize Husky's Git hooks. Run the following command:
68
+
69
+ ```bash
70
+ pnpm husky install
71
+ ```
72
+
73
+ This command sets up a .husky/ directory in the project, linking the necessary scripts to Git’s hook system. Once activated, Husky will automatically enforce commit message standards during commits.
74
+
75
+ Thank you for helping maintain commit quality and consistency!
76
+
77
+ ## Roadmap
78
+
79
+ - Keep up with any future changes or additions to the [Bookwhen API](https://api.bookwhen.com/v2).
80
+
81
+ ## License
82
+
83
+ ISC License. See [LICENSE](LICENSE) for more information.
84
+
85
+ ## Notice
86
+
87
+ This software is "unofficial" - its development is not affiliated with or funded by Bookwhen.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE;IACvB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAC5B,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ describe('something', () => {
3
+ it('should pass CI', () => {
4
+ expect(1).toBe(1);
5
+ });
6
+ });
7
+ //# sourceMappingURL=index.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACxB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,16 +1,35 @@
1
1
  {
2
2
  "name": "@jphil/bookwhen-client",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "main": "/dist/index.js",
7
7
  "module": "/dist/index.mjs",
8
8
  "types": "/dist/index.d.ts",
9
- "keywords": [],
9
+ "keywords": [
10
+ "bookwhen",
11
+ "booking",
12
+ "api client"
13
+ ],
10
14
  "type": "module",
11
- "author": "Justin Philpott",
15
+ "author": {
16
+ "name": "Justin Philpott",
17
+ "email": "justin@jphil.dev"
18
+ },
19
+ "homepage": "https://github.com/justinphilpott/bookwhen-client",
20
+ "bugs": {
21
+ "url": "https://github.com/justinphilpott/bookwhen-client/issues"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/justinphilpott/bookwhen-client.git"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
12
30
  "license": "ISC",
13
31
  "devDependencies": {
32
+ "@arethetypeswrong/cli": "^0.16.4",
14
33
  "@changesets/cli": "^2.27.9",
15
34
  "@commitlint/cli": "^19.5.0",
16
35
  "@commitlint/config-conventional": "^19.5.0",
@@ -36,14 +55,16 @@
36
55
  },
37
56
  "scripts": {
38
57
  "dev": "vitest",
39
- "build": "tsup src/index.ts --format cjs,esm --dts",
58
+ "build": "tsup src/index.ts --format esm --dts",
40
59
  "lint": "tsc",
41
60
  "test": "vitest run",
42
61
  "ci": "pnpm lint && pnpm test && pnpm build",
43
62
  "release": "pnpm lint && pnpm test && pnpm build && changeset publish",
44
63
  "commit": "cz",
45
64
  "type-check": "tsc --noEmit",
46
- "pre-commit": "pnpm lint",
47
- "prepush": "pnpm test"
65
+ "pre-commit": "pnpm lint && pnpm build",
66
+ "prepush": "pnpm test",
67
+ "prettier": "prettier --check 'src/**/*.ts'",
68
+ "format": "prettier --write 'src/**/*.ts' README.md"
48
69
  }
49
70
  }
@@ -1,8 +0,0 @@
1
- # Changesets
2
-
3
- Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
- with multi-package repos, or single-package repos to help you version and publish your code. You can
5
- find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
-
7
- We have a quick list of common questions to get you started engaging with this project in
8
- [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
3
- "changelog": "@changesets/cli/changelog",
4
- "commit": false,
5
- "fixed": [],
6
- "linked": [],
7
- "access": "public",
8
- "baseBranch": "main",
9
- "updateInternalDependencies": "patch",
10
- "ignore": []
11
- }
package/.eslintrc.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es6": true,
5
- "node": true
6
- },
7
- "extends": ["eslint:recommended", "plugin:prettier/recommended"],
8
- "parserOptions": {
9
- "ecmaVersion": 2021
10
- },
11
- "rules": {
12
- // Add any custom rules here
13
- }
14
- }
@@ -1,29 +0,0 @@
1
- name: CI
2
- on:
3
- push:
4
- branches:
5
- - '**'
6
-
7
- jobs:
8
- build:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout code
12
- uses: actions/checkout@v4
13
-
14
- - name: Set up pnpm
15
- uses: pnpm/action-setup@v4
16
- with:
17
- version: 9
18
-
19
- - name: Set up Node.js
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: 20.x
23
- cache: 'pnpm'
24
-
25
- - name: Install dependencies
26
- run: pnpm install --frozen-lockfile
27
-
28
- - name: Run CI
29
- run: pnpm run ci
@@ -1,37 +0,0 @@
1
- name: Publish
2
- on:
3
- push:
4
- branches:
5
- - 'main'
6
-
7
- concurrency: ${{ github.workflow }}-${{ github.ref }}
8
-
9
- jobs:
10
- publish:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v4
15
-
16
- - name: Set up pnpm
17
- uses: pnpm/action-setup@v4
18
- with:
19
- version: 9
20
-
21
- - name: Set up Node.js
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version: 20.x
25
- cache: 'pnpm'
26
-
27
- - name: Install dependencies
28
- run: pnpm install --frozen-lockfile
29
-
30
- - name: Create Release Pull Request or Publish
31
- id: changesets
32
- uses: changesets/action@v1
33
- with:
34
- publish: pnpm release
35
- env:
36
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.husky/commit-msg DELETED
@@ -1 +0,0 @@
1
- pnpx commitlint --edit "$1"
package/.husky/pre-commit DELETED
@@ -1,2 +0,0 @@
1
- # .husky/pre-commit
2
- pnpm lint
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v18
package/.prettierrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "all",
4
- "printWidth": 80
5
- }
package/CHANGELOG.md DELETED
@@ -1,7 +0,0 @@
1
- # @jphil/bookwhen-client
2
-
3
- ## 0.0.2
4
-
5
- ### Patch Changes
6
-
7
- - 3dee093: Initial setup - changesets -> npm publishing (wip)
package/README DELETED
@@ -1,29 +0,0 @@
1
- # Bookwhen Client
2
-
3
- [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
4
-
5
- ## About this Repo
6
-
7
- bookwhen-client exist to provide an easy interface for pulling data from the bookwhen API (V2)
8
-
9
- ## Setting Up Husky for Contributions
10
-
11
- This project uses Husky for Git hooks and Commitlint to enforce commit message standards.
12
-
13
- Install Dependencies: First, clone the repository and install the project dependencies, which include Husky:
14
-
15
- bash
16
-
17
- git clone <repository-url>
18
- cd <repository-directory>
19
- pnpm install
20
-
21
- Activate Husky Hooks: After installing dependencies, you need to initialize Husky's Git hooks. Run the following command:
22
-
23
- bash
24
-
25
- pnpm husky install
26
-
27
- This command sets up a .husky/ directory in the project, linking the necessary scripts to Git’s hook system. Once activated, Husky will automatically enforce commit message standards during commits.
28
-
29
- Thank you for helping maintain commit quality and consistency!
@@ -1 +0,0 @@
1
- module.exports = { extends: ['@commitlint/config-conventional'] };
package/dist/index.cjs DELETED
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- test: () => test
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
- var test = () => {
27
- console.log("hello test");
28
- };
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
31
- test
32
- });
package/dist/index.d.cts DELETED
@@ -1,3 +0,0 @@
1
- declare const test: () => void;
2
-
3
- export { test };
package/eslint.config.js DELETED
@@ -1,26 +0,0 @@
1
- // eslint.config.js
2
- import eslintPluginPrettier from "eslint-plugin-prettier";
3
- import eslintConfigPrettier from "eslint-config-prettier";
4
-
5
- export default [
6
- {
7
- files: ["**/*.js", "**/*.ts", "**/*.tsx"],
8
- languageOptions: {
9
- ecmaVersion: 2021,
10
- sourceType: "module",
11
- globals: {
12
- browser: true,
13
- es6: true,
14
- node: true,
15
- },
16
- },
17
- plugins: {
18
- prettier: eslintPluginPrettier,
19
- },
20
- rules: {
21
- ...eslintConfigPrettier.rules, // integrates Prettier rules
22
- // Add any custom rules here, e.g.:
23
- // "semi": ["error", "always"]
24
- },
25
- },
26
- ];
package/src/index.test.ts DELETED
@@ -1,7 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
-
3
- describe('something', () => {
4
- it('should pass CI', () => {
5
- expect(1).toBe(1);
6
- });
7
- });
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export const test = () => {
2
- console.log('hello test');
3
- };
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2021",
4
- "module": "nodenext",
5
- "moduleResolution": "nodenext",
6
- "noEmit": true,
7
- "esModuleInterop": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "strict": true,
10
- "skipLibCheck": true,
11
- "outDir": "./dist",
12
- "baseUrl": "./"
13
- },
14
- "include": ["src/**/*"], // Include your source files
15
- "exclude": ["node_modules", "dist"] // Exclude unnecessary directories
16
- }
package/vite.config.ts DELETED
@@ -1,5 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {},
5
- });