deliveryapi 0.1.2 → 0.1.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/dist/index.cjs +4 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,9 @@ var HttpClient = class {
|
|
|
44
44
|
async post(path, body) {
|
|
45
45
|
return this.request("POST", `${this.baseUrl}${path}`, body);
|
|
46
46
|
}
|
|
47
|
+
async put(path, body) {
|
|
48
|
+
return this.request("PUT", `${this.baseUrl}${path}`, body);
|
|
49
|
+
}
|
|
47
50
|
async patch(path, body) {
|
|
48
51
|
return this.request("PATCH", `${this.baseUrl}${path}`, body);
|
|
49
52
|
}
|
|
@@ -174,7 +177,7 @@ var WebhooksResource = class {
|
|
|
174
177
|
* 웹훅 엔드포인트 이름 수정
|
|
175
178
|
*/
|
|
176
179
|
async update(endpointId, data) {
|
|
177
|
-
await this.http.
|
|
180
|
+
await this.http.put(`/v1/webhook-v2/endpoints/${endpointId}`, data);
|
|
178
181
|
}
|
|
179
182
|
/**
|
|
180
183
|
* 웹훅 엔드포인트 삭제
|
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ declare class HttpClient {
|
|
|
6
6
|
constructor(apiKey: string, secretKey: string, baseUrl: string);
|
|
7
7
|
get<T>(path: string, params?: Record<string, string>): Promise<T>;
|
|
8
8
|
post<T>(path: string, body?: unknown): Promise<T>;
|
|
9
|
+
put<T>(path: string, body?: unknown): Promise<T>;
|
|
9
10
|
patch<T>(path: string, body?: unknown): Promise<T>;
|
|
10
11
|
delete<T>(path: string): Promise<T>;
|
|
11
12
|
private request;
|
|
@@ -308,6 +309,13 @@ export interface WebhookCreateInput {
|
|
|
308
309
|
url: string;
|
|
309
310
|
name?: string;
|
|
310
311
|
}
|
|
312
|
+
export interface WebhookCreateResult {
|
|
313
|
+
endpointId: string;
|
|
314
|
+
url: string;
|
|
315
|
+
name?: string;
|
|
316
|
+
webhookSecret: string;
|
|
317
|
+
dateCreated: string;
|
|
318
|
+
}
|
|
311
319
|
export interface WebhookUpdateInput {
|
|
312
320
|
name: string;
|
|
313
321
|
}
|
|
@@ -379,7 +387,7 @@ declare class WebhooksResource {
|
|
|
379
387
|
/**
|
|
380
388
|
* 웹훅 엔드포인트 등록
|
|
381
389
|
*/
|
|
382
|
-
create(data: WebhookCreateInput): Promise<
|
|
390
|
+
create(data: WebhookCreateInput): Promise<WebhookCreateResult>;
|
|
383
391
|
/**
|
|
384
392
|
* 웹훅 엔드포인트 목록 조회
|
|
385
393
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare class HttpClient {
|
|
|
6
6
|
constructor(apiKey: string, secretKey: string, baseUrl: string);
|
|
7
7
|
get<T>(path: string, params?: Record<string, string>): Promise<T>;
|
|
8
8
|
post<T>(path: string, body?: unknown): Promise<T>;
|
|
9
|
+
put<T>(path: string, body?: unknown): Promise<T>;
|
|
9
10
|
patch<T>(path: string, body?: unknown): Promise<T>;
|
|
10
11
|
delete<T>(path: string): Promise<T>;
|
|
11
12
|
private request;
|
|
@@ -308,6 +309,13 @@ export interface WebhookCreateInput {
|
|
|
308
309
|
url: string;
|
|
309
310
|
name?: string;
|
|
310
311
|
}
|
|
312
|
+
export interface WebhookCreateResult {
|
|
313
|
+
endpointId: string;
|
|
314
|
+
url: string;
|
|
315
|
+
name?: string;
|
|
316
|
+
webhookSecret: string;
|
|
317
|
+
dateCreated: string;
|
|
318
|
+
}
|
|
311
319
|
export interface WebhookUpdateInput {
|
|
312
320
|
name: string;
|
|
313
321
|
}
|
|
@@ -379,7 +387,7 @@ declare class WebhooksResource {
|
|
|
379
387
|
/**
|
|
380
388
|
* 웹훅 엔드포인트 등록
|
|
381
389
|
*/
|
|
382
|
-
create(data: WebhookCreateInput): Promise<
|
|
390
|
+
create(data: WebhookCreateInput): Promise<WebhookCreateResult>;
|
|
383
391
|
/**
|
|
384
392
|
* 웹훅 엔드포인트 목록 조회
|
|
385
393
|
*/
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,9 @@ var HttpClient = class {
|
|
|
42
42
|
async post(path, body) {
|
|
43
43
|
return this.request("POST", `${this.baseUrl}${path}`, body);
|
|
44
44
|
}
|
|
45
|
+
async put(path, body) {
|
|
46
|
+
return this.request("PUT", `${this.baseUrl}${path}`, body);
|
|
47
|
+
}
|
|
45
48
|
async patch(path, body) {
|
|
46
49
|
return this.request("PATCH", `${this.baseUrl}${path}`, body);
|
|
47
50
|
}
|
|
@@ -172,7 +175,7 @@ var WebhooksResource = class {
|
|
|
172
175
|
* 웹훅 엔드포인트 이름 수정
|
|
173
176
|
*/
|
|
174
177
|
async update(endpointId, data) {
|
|
175
|
-
await this.http.
|
|
178
|
+
await this.http.put(`/v1/webhook-v2/endpoints/${endpointId}`, data);
|
|
176
179
|
}
|
|
177
180
|
/**
|
|
178
181
|
* 웹훅 엔드포인트 삭제
|