@tonightpass/react 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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @tonightpass/react@0.0.2 build /home/runner/work/tonightpass/tonightpass/packages/react
2
+ > @tonightpass/react@0.0.4 build /home/runner/work/tonightpass/tonightpass/packages/react
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,12 +10,12 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
  CJS dist/index.js 438.00 B
13
- CJS dist/index.js.map 940.00 B
14
- CJS ⚡️ Build success in 62ms
13
+ CJS dist/index.js.map 948.00 B
14
+ CJS ⚡️ Build success in 47ms
15
15
  ESM dist/index.mjs 258.00 B
16
- ESM dist/index.mjs.map 940.00 B
17
- ESM ⚡️ Build success in 62ms
16
+ ESM dist/index.mjs.map 948.00 B
17
+ ESM ⚡️ Build success in 47ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 1362ms
20
- DTS dist/index.d.ts 2.70 KB
21
- DTS dist/index.d.mts 2.70 KB
19
+ DTS ⚡️ Build success in 1289ms
20
+ DTS dist/index.d.ts 2.71 KB
21
+ DTS dist/index.d.mts 2.71 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @tonightpass/react
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ef3cb97`](https://github.com/tonightpass/tonightpass/commit/ef3cb9700747e815bd9ec1757003e4eb1774865a) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Update api hook path types
8
+
9
+ ## 0.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`2166d44`](https://github.com/tonightpass/tonightpass/commit/2166d44417e5af6e1da86681330b4aa2892775e5)]:
14
+ - tonightpass@0.0.3
15
+
3
16
  ## 0.0.2
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import * as tonightpass from 'tonightpass';
3
3
  import { Client, Query, APIRequestOptions } from 'tonightpass';
4
4
 
5
5
  declare const client: Client;
6
- declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path: Path, query?: Query<Path>, options?: APIRequestOptions) => swr.SWRResponse<(Extract<tonightpass.Endpoint<"GET", "/careers/categories", tonightpass.CareersCategory[], {
6
+ declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path?: Path | null, query?: Query<Path>, options?: APIRequestOptions) => swr.SWRResponse<(Extract<tonightpass.Endpoint<"GET", "/careers/categories", tonightpass.CareersCategory[], {
7
7
  language?: string | undefined;
8
8
  }>, {
9
9
  path: Path;
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import * as tonightpass from 'tonightpass';
3
3
  import { Client, Query, APIRequestOptions } from 'tonightpass';
4
4
 
5
5
  declare const client: Client;
6
- declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path: Path, query?: Query<Path>, options?: APIRequestOptions) => swr.SWRResponse<(Extract<tonightpass.Endpoint<"GET", "/careers/categories", tonightpass.CareersCategory[], {
6
+ declare const useAPI: <Path extends "/careers/categories" | "/careers/employmentTypes" | "/careers/jobs" | "/careers/jobs/:id" | "/careers/offices" | "/health/database" | "/health/http" | "/profiles/:username" | "/users" | "/users/:id" | "/users/me" | "/check/:identifier">(path?: Path | null, query?: Query<Path>, options?: APIRequestOptions) => swr.SWRResponse<(Extract<tonightpass.Endpoint<"GET", "/careers/categories", tonightpass.CareersCategory[], {
7
7
  language?: string | undefined;
8
8
  }>, {
9
9
  path: Path;
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var s = require('swr');
3
+ var n = require('swr');
4
4
  var tonightpass = require('tonightpass');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
7
 
8
- var s__default = /*#__PURE__*/_interopDefault(s);
8
+ var n__default = /*#__PURE__*/_interopDefault(n);
9
9
 
10
- var a=new tonightpass.Client({baseURL:tonightpass.DEFAULT_API_URL}),E=(t,e,r)=>s__default.default(t,o=>a.get(o,e,r));
10
+ var a=new tonightpass.Client({baseURL:tonightpass.DEFAULT_API_URL}),E=(t,e,r)=>n__default.default(t,o=>a.get(o,e,r));
11
11
 
12
12
  exports.client = a;
13
13
  exports.useAPI = E;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path: Path,\n query?: Query<Path>,\n options?: APIRequestOptions,\n) => {\n const fetcher: Fetcher<any> = (key: Path) => client.get(key, query, options);\n\n return useSWR<Extract<Endpoints, { path: Path; method: \"GET\" }>[\"res\"]>(\n path,\n fetcher,\n );\n};\n"]}
1
+ {"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path?: Path | null,\n query?: Query<Path>,\n options?: APIRequestOptions,\n) => {\n const fetcher: Fetcher<any> = (key: Path) => client.get(key, query, options);\n\n return useSWR<Extract<Endpoints, { path: Path; method: \"GET\" }>[\"res\"]>(\n path,\n fetcher,\n );\n};\n"]}
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import s from 'swr';
1
+ import n from 'swr';
2
2
  import { Client, DEFAULT_API_URL } from 'tonightpass';
3
3
 
4
- var a=new Client({baseURL:DEFAULT_API_URL}),E=(t,e,r)=>s(t,o=>a.get(o,e,r));
4
+ var a=new Client({baseURL:DEFAULT_API_URL}),E=(t,e,r)=>n(t,o=>a.get(o,e,r));
5
5
 
6
6
  export { a as client, E as useAPI };
7
7
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path: Path,\n query?: Query<Path>,\n options?: APIRequestOptions,\n) => {\n const fetcher: Fetcher<any> = (key: Path) => client.get(key, query, options);\n\n return useSWR<Extract<Endpoints, { path: Path; method: \"GET\" }>[\"res\"]>(\n path,\n fetcher,\n );\n};\n"]}
1
+ {"version":3,"sources":["../src/hooks/useAPI.ts"],"names":["useSWR","Client","DEFAULT_API_URL","client","useAPI","path","query","options","key"],"mappings":"AAAA,OAAOA,MAAyB,MAChC,OAGE,UAAAC,EAGA,mBAAAC,MACK,cAEA,IAAMC,EAAS,IAAIF,EAAO,CAAE,QAASC,CAAgB,CAAC,EAEhDE,EAAS,CACpBC,EACAC,EACAC,IAIOP,EACLK,EAH6BG,GAAcL,EAAO,IAAIK,EAAKF,EAAOC,CAAO,CAK3E","sourcesContent":["import useSWR, { Fetcher } from \"swr\";\nimport {\n Endpoints,\n APIRequestOptions,\n Client,\n PathsFor,\n Query,\n DEFAULT_API_URL,\n} from \"tonightpass\";\n\nexport const client = new Client({ baseURL: DEFAULT_API_URL });\n\nexport const useAPI = <Path extends PathsFor<\"GET\">>(\n path?: Path | null,\n query?: Query<Path>,\n options?: APIRequestOptions,\n) => {\n const fetcher: Fetcher<any> = (key: Path) => client.get(key, query, options);\n\n return useSWR<Extract<Endpoints, { path: Path; method: \"GET\" }>[\"res\"]>(\n path,\n fetcher,\n );\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonightpass/react",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "@tonightpass react sdk.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,7 @@
15
15
  "types": "dist/index.d.ts",
16
16
  "dependencies": {
17
17
  "swr": "^2.2.5",
18
- "tonightpass": "^0.0.2"
18
+ "tonightpass": "^0.0.3"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": "*"
@@ -11,7 +11,7 @@ import {
11
11
  export const client = new Client({ baseURL: DEFAULT_API_URL });
12
12
 
13
13
  export const useAPI = <Path extends PathsFor<"GET">>(
14
- path: Path,
14
+ path?: Path | null,
15
15
  query?: Query<Path>,
16
16
  options?: APIRequestOptions,
17
17
  ) => {