@pc-nexus/event 0.5.0-next.9 → 0.8.0-next.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.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "./lib/app.js";
2
2
  export * from "./lib/webhook.js";
3
- export type { AppEventPayload, AppEventResult, EventPayload, LifecycleEventPayload, LifecycleInstallEventPayload, LifecycleUninstallEventPayload, LifecycleUpgradeEventPayload, SystemEventPayload, CreatedEventPayload, DeletedEventPayload, ViewedEventPayload, RestoredEventPayload, ArchivedEventPayload, ActivatedEventPayload, ChangedEventPayload, ScheduledEventPayload, WebhookPayload, } from "@pc-nexus/internal";
3
+ export type { AppEventPayload, AppEventResult, EventPayload, LifecycleEventPayload, SystemEventPayload, ScheduledEventPayload, WebhookEventPayload, } from "@pc-nexus/internal";
4
4
  export { SystemEventSource } from "@pc-nexus/internal";
5
5
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,YAAY,EACR,eAAe,EACf,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC9B,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,YAAY,EACR,eAAe,EACf,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
package/lib/webhook.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export interface WebHookQueryResult {
1
+ export interface WebhookQueryUrlResult {
2
2
  webTriggerKey: string;
3
3
  url: string;
4
4
  }
5
- export interface GetWebHookUrlOptions {
5
+ export interface WebhookGetUrlOptions {
6
6
  forceCreate?: boolean;
7
7
  }
8
- interface WebHookAPI {
9
- getUrl(webTriggerKey: string, options?: GetWebHookUrlOptions): Promise<string>;
10
- deleteUrl(webHookUrl: string): Promise<void>;
11
- queryUrls(webTriggerKey?: string): Promise<WebHookQueryResult[]>;
8
+ interface WebhookAPI {
9
+ getUrl(webTriggerKey: string, options?: WebhookGetUrlOptions): Promise<string>;
10
+ deleteUrl(webhookUrl: string): Promise<void>;
11
+ queryUrls(webTriggerKey?: string): Promise<WebhookQueryUrlResult[]>;
12
12
  }
13
- declare class WebHookEvent implements WebHookAPI {
14
- getUrl(webTriggerKey: string, options?: GetWebHookUrlOptions): Promise<string>;
15
- deleteUrl(webHookUrl: string): Promise<void>;
16
- queryUrls(webTriggerKey?: string): Promise<WebHookQueryResult[]>;
13
+ declare class WebhookEvent implements WebhookAPI {
14
+ getUrl(webTriggerKey: string, options?: WebhookGetUrlOptions): Promise<string>;
15
+ deleteUrl(webhookUrl: string): Promise<void>;
16
+ queryUrls(webTriggerKey?: string): Promise<WebhookQueryUrlResult[]>;
17
17
  }
18
- export declare const webhook: WebHookEvent;
18
+ export declare const webhook: WebhookEvent;
19
19
  export {};
20
20
  //# sourceMappingURL=webhook.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../src/lib/webhook.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IAC/B,aAAa,EAAE,MA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CAAC;CACvE;AAED,cAAM,YAAa,YAAW,UAAU;IACvB,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;IAS9E,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5C,SAAS,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;CAOnF;AAED,eAAO,MAAM,OAAO,cAAqB,CAAC"}
package/lib/webhook.js CHANGED
@@ -1,31 +1,25 @@
1
1
  import { invoke } from "@pc-nexus/internal";
2
- class WebHookEvent {
2
+ class WebhookEvent {
3
3
  async getUrl(webTriggerKey, options) {
4
4
  const response = await invoke("event", "webhook/get-url", {
5
- body: {
6
- web_trigger_key: webTriggerKey,
7
- force_create: options?.forceCreate,
8
- },
5
+ web_trigger_key: webTriggerKey,
6
+ force_create: options?.forceCreate,
9
7
  });
10
8
  const result = (await response.json());
11
9
  return result.value;
12
10
  }
13
- async deleteUrl(webHookUrl) {
11
+ async deleteUrl(webhookUrl) {
14
12
  const response = await invoke("event", "webhook/delete-url", {
15
- body: {
16
- web_hook_url: webHookUrl,
17
- },
13
+ web_hook_url: webhookUrl,
18
14
  });
19
15
  await response.json();
20
16
  }
21
17
  async queryUrls(webTriggerKey) {
22
18
  const response = await invoke("event", "webhook/query-urls", {
23
- body: {
24
- web_trigger_key: webTriggerKey,
25
- },
19
+ web_trigger_key: webTriggerKey,
26
20
  });
27
21
  const result = (await response.json());
28
22
  return result.value;
29
23
  }
30
24
  }
31
- export const webhook = new WebHookEvent();
25
+ export const webhook = new WebhookEvent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pc-nexus/event",
3
- "version": "0.5.0-next.9",
3
+ "version": "0.8.0-next.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "type": "module",
30
30
  "dependencies": {
31
- "@pc-nexus/internal": "0.5.0-next.9"
31
+ "@pc-nexus/internal": "0.8.0-next.0"
32
32
  },
33
33
  "devDependencies": {},
34
34
  "peerDependencies": {}