deliveryapi 0.2.1 → 0.2.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/dist/index.cjs CHANGED
@@ -296,15 +296,16 @@ var PublicResource = class {
296
296
  };
297
297
 
298
298
  // src/client.ts
299
+ var BASE_URL = "https://api.deliveryapi.co.kr";
299
300
  var noToken = async () => null;
300
301
  var HomepageClient = class {
301
- constructor(options) {
302
- const { baseUrl, getToken = noToken } = options;
303
- this.auth = new AuthResource(baseUrl, getToken);
304
- this.dashboard = new DashboardResource(baseUrl, getToken);
305
- this.qna = new QnaResource(baseUrl, getToken);
306
- this.admin = new AdminResource(baseUrl, getToken);
307
- this.public = new PublicResource(baseUrl);
302
+ constructor(options = {}) {
303
+ const { getToken = noToken } = options;
304
+ this.auth = new AuthResource(BASE_URL, getToken);
305
+ this.dashboard = new DashboardResource(BASE_URL, getToken);
306
+ this.qna = new QnaResource(BASE_URL, getToken);
307
+ this.admin = new AdminResource(BASE_URL, getToken);
308
+ this.public = new PublicResource(BASE_URL);
308
309
  }
309
310
  };
310
311
 
package/dist/index.d.cts CHANGED
@@ -326,8 +326,6 @@ interface ListTrackingLogsResult {
326
326
  totalPages: number;
327
327
  }
328
328
  interface HomepageClientOptions {
329
- /** API base URL (e.g. 'https://api.deliveryapi.co.kr') */
330
- baseUrl: string;
331
329
  /** Returns Firebase ID Token for authenticated requests */
332
330
  getToken?: () => Promise<string | null>;
333
331
  }
@@ -432,7 +430,7 @@ declare class HomepageClient {
432
430
  readonly qna: QnaResource;
433
431
  readonly admin: AdminResource;
434
432
  readonly public: PublicResource;
435
- constructor(options: HomepageClientOptions);
433
+ constructor(options?: HomepageClientOptions);
436
434
  }
437
435
 
438
436
  declare class ApiError extends Error {
package/dist/index.d.ts CHANGED
@@ -326,8 +326,6 @@ interface ListTrackingLogsResult {
326
326
  totalPages: number;
327
327
  }
328
328
  interface HomepageClientOptions {
329
- /** API base URL (e.g. 'https://api.deliveryapi.co.kr') */
330
- baseUrl: string;
331
329
  /** Returns Firebase ID Token for authenticated requests */
332
330
  getToken?: () => Promise<string | null>;
333
331
  }
@@ -432,7 +430,7 @@ declare class HomepageClient {
432
430
  readonly qna: QnaResource;
433
431
  readonly admin: AdminResource;
434
432
  readonly public: PublicResource;
435
- constructor(options: HomepageClientOptions);
433
+ constructor(options?: HomepageClientOptions);
436
434
  }
437
435
 
438
436
  declare class ApiError extends Error {
package/dist/index.js CHANGED
@@ -294,15 +294,16 @@ var PublicResource = class {
294
294
  };
295
295
 
296
296
  // src/client.ts
297
+ var BASE_URL = "https://api.deliveryapi.co.kr";
297
298
  var noToken = async () => null;
298
299
  var HomepageClient = class {
299
- constructor(options) {
300
- const { baseUrl, getToken = noToken } = options;
301
- this.auth = new AuthResource(baseUrl, getToken);
302
- this.dashboard = new DashboardResource(baseUrl, getToken);
303
- this.qna = new QnaResource(baseUrl, getToken);
304
- this.admin = new AdminResource(baseUrl, getToken);
305
- this.public = new PublicResource(baseUrl);
300
+ constructor(options = {}) {
301
+ const { getToken = noToken } = options;
302
+ this.auth = new AuthResource(BASE_URL, getToken);
303
+ this.dashboard = new DashboardResource(BASE_URL, getToken);
304
+ this.qna = new QnaResource(BASE_URL, getToken);
305
+ this.admin = new AdminResource(BASE_URL, getToken);
306
+ this.public = new PublicResource(BASE_URL);
306
307
  }
307
308
  };
308
309
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deliveryapi",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Official JavaScript/TypeScript SDK for the DeliveryAPI",
5
5
  "keywords": [
6
6
  "delivery",