zoom-api-js 1.3.2 → 3.0.2
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 +15 -0
- package/README.md +15 -3
- package/dist/{components-ofy4w3vb.js → components-lqucvmze.d.ts} +1934 -3691
- package/dist/components-lqucvmze.d.ts.map +1 -0
- package/dist/{components-hg878s5j.cjs → components-mhg1g1oz.d.ts} +1934 -3880
- package/dist/components-mhg1g1oz.d.ts.map +1 -0
- package/dist/components.cjs +5735 -190
- package/dist/components.d.cts +2 -0
- package/dist/components.d.cts.map +1 -0
- package/dist/components.d.mts +1 -4310
- package/dist/components.d.mts.map +1 -1
- package/dist/components.mjs +5550 -1
- package/dist/effect.cjs +131 -24
- package/dist/effect.d.cts +493 -0
- package/dist/effect.d.cts.map +1 -0
- package/dist/effect.d.mts +75 -5
- package/dist/effect.d.mts.map +1 -1
- package/dist/effect.mjs +125 -4
- package/dist/index.cjs +259 -26
- package/dist/index.d.cts +243 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +243 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +7268 -3386
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +35 -29
- package/dist/{schemas-k0vlcve8.cjs → schemas-l0isvuz8.cjs} +3390 -271
- package/dist/{schemas-ku36knzu.js → schemas-mag10jlc.js} +3169 -272
- package/dist/schemas.cjs +223 -1
- package/dist/schemas.d.cts +10541 -0
- package/dist/schemas.d.cts.map +1 -0
- package/dist/schemas.d.mts +1353 -261
- package/dist/schemas.d.mts.map +1 -1
- package/dist/schemas.mjs +1 -1
- package/dist/types.cjs +43 -4
- package/dist/types.d.cts +35118 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +5529 -2143
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +39 -5
- package/package.json +57 -29
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) SferaDev
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
CHANGED
|
@@ -27,6 +27,14 @@ const files = await client.api.archiving.listArchivedFiles({});
|
|
|
27
27
|
|
|
28
28
|
Operations are grouped by tag: `client.api.<tag>.<operation>(params)`.
|
|
29
29
|
|
|
30
|
+
Every operation can also be called by method and path:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const files = await client.request("GET /archive_files");
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Path parameters are percent-encoded. A meeting or webinar UUID that begins with `/` or contains `//` is encoded twice, as Zoom requires, so pass the UUID as Zoom returns it.
|
|
37
|
+
|
|
30
38
|
### Custom fetch
|
|
31
39
|
|
|
32
40
|
```ts
|
|
@@ -36,22 +44,26 @@ const client = new ZoomApi({
|
|
|
36
44
|
});
|
|
37
45
|
```
|
|
38
46
|
|
|
47
|
+
## Errors
|
|
48
|
+
|
|
49
|
+
A call that gets an HTTP error response rejects with `{ status, payload }`: `status` is the HTTP status code and `payload` is the parsed JSON error body, or the raw body text, up to 1000 characters, when it is not JSON. A request that gets no response at all, for example because the network failed, rejects with an `Error` whose message names the method, the path and the reason, and whose `cause` is the original exception. A request cancelled through `signal` rejects with what the signal was aborted with, as is: the `AbortError`, or the `TimeoutError` of `AbortSignal.timeout()`.
|
|
50
|
+
|
|
39
51
|
## Effect
|
|
40
52
|
|
|
41
|
-
The `effect` entrypoint exposes every operation as an `Effect`. It requires `effect` as a peer dependency.
|
|
53
|
+
The `effect` entrypoint exposes every operation as an `Effect`. It requires `effect` 4 as a peer dependency.
|
|
42
54
|
|
|
43
55
|
```ts
|
|
44
56
|
import { Effect } from "effect";
|
|
45
57
|
import { ApiService, makeApiLayer } from "zoom-api-js/effect";
|
|
46
58
|
|
|
47
|
-
const program = ApiService.archiving.listArchivedFiles(
|
|
59
|
+
const program = ApiService.archiving.listArchivedFiles();
|
|
48
60
|
|
|
49
61
|
await Effect.runPromise(
|
|
50
62
|
program.pipe(Effect.provide(makeApiLayer({ token: process.env.ZOOM_TOKEN })))
|
|
51
63
|
);
|
|
52
64
|
```
|
|
53
65
|
|
|
54
|
-
Errors are typed as `ApiError`, `NetworkError` and `ValidationError`.
|
|
66
|
+
Errors are typed as `ApiError`, `NetworkError` and `ValidationError`. An HTTP error response fails with `ApiError`, which carries the HTTP `status`; a request that never gets a response fails with `NetworkError`.
|
|
55
67
|
|
|
56
68
|
## Entrypoints
|
|
57
69
|
|