zoom-api-js 0.1.2 → 0.2.0

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,22 +1,14 @@
1
1
 
2
- > zoom-api-js@0.1.2 build /home/runner/work/openapi-clients/openapi-clients/packages/zoom-api-js
3
- > rimraf dist && tsup
2
+ > zoom-api-js@0.2.0 build /home/runner/work/openapi-clients/openapi-clients/packages/zoom-api-js
3
+ > unbuild
4
4
 
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.3.5
8
- CLI Using tsup config: /home/runner/work/openapi-clients/openapi-clients/packages/zoom-api-js/tsup.config.ts
9
- CLI Target: es2020
10
- CLI Cleaning output folder
11
- CJS Build start
12
- ESM Build start
13
- CJS dist/index.js 5.06 KB
14
- CJS dist/index.js.map 8.56 KB
15
- CJS ⚡️ Build success in 54ms
16
- ESM dist/index.mjs 4.07 KB
17
- ESM dist/index.mjs.map 8.33 KB
18
- ESM ⚡️ Build success in 55ms
19
- DTS Build start
20
- DTS ⚡️ Build success in 9607ms
21
- DTS dist/index.d.ts 480.45 KB
22
- DTS dist/index.d.mts 480.45 KB
5
+ [info] Automatically detected entries: src/index [esm] [cjs] [dts]
6
+ [info] Building zoom-api-js
7
+ [info] Cleaning dist directory: `./dist`
8
+ [success] Build succeeded for zoom-api-js
9
+ [log] dist/index.cjs (total size: 3.21 kB, chunk size: 3.21 kB, exports: ZoomApi)
10
+
11
+ [log] dist/index.mjs (total size: 3.19 kB, chunk size: 3.19 kB, exports: ZoomApi)
12
+
13
+ Σ Total dist size (byte size): 3.35 MB
14
+ [log]
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # zoom-api-js
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 35374e2: Update bundle mechanism
8
+
9
+ ## 0.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - c62c402: Update spec
14
+
3
15
  ## 0.1.2
4
16
 
5
17
  ### Patch Changes
@@ -1,37 +1,5 @@
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 __typeError = (msg) => {
7
- throw TypeError(msg);
8
- };
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
23
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
24
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
25
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
1
+ 'use strict';
26
2
 
27
- // src/index.ts
28
- var src_exports = {};
29
- __export(src_exports, {
30
- ZoomApi: () => ZoomApi
31
- });
32
- module.exports = __toCommonJS(src_exports);
33
-
34
- // src/utils/lang.ts
35
3
  function notEmpty(value) {
36
4
  return value !== null && value !== void 0;
37
5
  }
@@ -39,9 +7,8 @@ function compactObject(obj) {
39
7
  return Object.fromEntries(Object.entries(obj).filter(([, value]) => notEmpty(value)));
40
8
  }
41
9
 
42
- // src/meeting/fetcher.ts
43
- var baseUrl = "https://api.zoom.us/v2";
44
- async function fetch2({
10
+ const baseUrl = "https://api.zoom.us/v2";
11
+ async function fetch$1({
45
12
  url,
46
13
  method,
47
14
  body,
@@ -94,21 +61,19 @@ async function fetch2({
94
61
  throw errorObject;
95
62
  }
96
63
  }
97
- var resolveUrl = (url, queryParams = {}, pathParams = {}) => {
64
+ const resolveUrl = (url, queryParams = {}, pathParams = {}) => {
98
65
  let query = new URLSearchParams(queryParams).toString();
99
66
  if (query) query = `?${query}`;
100
67
  return url.replace(/\{\w*\}/g, (key) => pathParams[key.slice(1, -1)] ?? "") + query;
101
68
  };
102
69
 
103
- // src/client.ts
104
- var _token, _fetch;
105
- var ZoomApi = class {
70
+ class ZoomApi {
71
+ #token;
72
+ #fetch;
106
73
  constructor(options) {
107
- __privateAdd(this, _token);
108
- __privateAdd(this, _fetch);
109
- __privateSet(this, _token, options.token);
110
- __privateSet(this, _fetch, options.fetch || fetch);
111
- if (!__privateGet(this, _fetch)) throw new Error("Fetch is required");
74
+ this.#token = options.token;
75
+ this.#fetch = options.fetch || fetch;
76
+ if (!this.#fetch) throw new Error("Fetch is required");
112
77
  }
113
78
  get auth() {
114
79
  return {
@@ -117,7 +82,7 @@ var ZoomApi = class {
117
82
  clientId,
118
83
  clientSecret
119
84
  }) => {
120
- const response = await __privateGet(this, _fetch).call(this, "https://zoom.us/oauth/token", {
85
+ const response = await this.#fetch("https://zoom.us/oauth/token", {
121
86
  method: "POST",
122
87
  body: new URLSearchParams({
123
88
  grant_type: "refresh_token",
@@ -141,14 +106,9 @@ var ZoomApi = class {
141
106
  async request(endpoint, params) {
142
107
  const [method = "", url = ""] = endpoint.split(" ");
143
108
  const extraParams = params || {};
144
- const result = await fetch2({ ...extraParams, method, url, token: __privateGet(this, _token), fetchImpl: __privateGet(this, _fetch) });
109
+ const result = await fetch$1({ ...extraParams, method, url, token: this.#token, fetchImpl: this.#fetch });
145
110
  return result;
146
111
  }
147
- };
148
- _token = new WeakMap();
149
- _fetch = new WeakMap();
150
- // Annotate the CommonJS export names for ESM import in node:
151
- 0 && (module.exports = {
152
- ZoomApi
153
- });
154
- //# sourceMappingURL=index.js.map
112
+ }
113
+
114
+ exports.ZoomApi = ZoomApi;