@agenus-io/webhook-centralizer 1.0.17 → 1.0.18

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.
@@ -2,6 +2,7 @@ export declare const WebhookCentralizerCreatePlatformSchema: import("zod").ZodOb
2
2
  title: import("zod").ZodString;
3
3
  platformToken: import("zod").ZodOptional<import("zod").ZodString>;
4
4
  dispatchType: import("zod").ZodDefault<import("zod").ZodNativeEnum<Record<import("../types").webhookCentralizerDispatchType, import("../types").webhookCentralizerDispatchType>>>;
5
+ role: import("zod").ZodDefault<import("zod").ZodNativeEnum<Record<import("../types").webhookPlatformRole, import("../types").webhookPlatformRole>>>;
5
6
  type: import("zod").ZodNativeEnum<Record<import("../types").webhookCentralizerPlatform, import("../types").webhookCentralizerPlatform>>;
6
7
  apiToken: import("zod").ZodOptional<import("zod").ZodString>;
7
8
  slug: import("zod").ZodOptional<import("zod").ZodString>;
@@ -9,6 +10,7 @@ export declare const WebhookCentralizerCreatePlatformSchema: import("zod").ZodOb
9
10
  title: string;
10
11
  dispatchType: import("../types").webhookCentralizerDispatchType;
11
12
  type: import("../types").webhookCentralizerPlatform;
13
+ role: import("../types").webhookPlatformRole;
12
14
  platformToken?: string | undefined;
13
15
  apiToken?: string | undefined;
14
16
  slug?: string | undefined;
@@ -19,11 +21,13 @@ export declare const WebhookCentralizerCreatePlatformSchema: import("zod").ZodOb
19
21
  dispatchType?: import("../types").webhookCentralizerDispatchType | undefined;
20
22
  apiToken?: string | undefined;
21
23
  slug?: string | undefined;
24
+ role?: import("../types").webhookPlatformRole | undefined;
22
25
  }>;
23
26
  export declare const WebhookCentralizerUpdatePlatformSchema: import("zod").ZodObject<{
24
27
  title: import("zod").ZodOptional<import("zod").ZodString>;
25
28
  platformToken: import("zod").ZodOptional<import("zod").ZodString>;
26
29
  dispatchType: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNativeEnum<Record<import("../types").webhookCentralizerDispatchType, import("../types").webhookCentralizerDispatchType>>>>;
30
+ role: import("zod").ZodOptional<import("zod").ZodNativeEnum<Record<import("../types").webhookPlatformRole, import("../types").webhookPlatformRole>>>;
27
31
  type: import("zod").ZodOptional<import("zod").ZodNativeEnum<Record<import("../types").webhookCentralizerPlatform, import("../types").webhookCentralizerPlatform>>>;
28
32
  apiToken: import("zod").ZodOptional<import("zod").ZodString>;
29
33
  slug: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
@@ -34,6 +38,7 @@ export declare const WebhookCentralizerUpdatePlatformSchema: import("zod").ZodOb
34
38
  type?: import("../types").webhookCentralizerPlatform | undefined;
35
39
  apiToken?: string | undefined;
36
40
  slug?: string | undefined;
41
+ role?: import("../types").webhookPlatformRole | undefined;
37
42
  }, {
38
43
  title?: string | undefined;
39
44
  platformToken?: string | undefined;
@@ -41,6 +46,7 @@ export declare const WebhookCentralizerUpdatePlatformSchema: import("zod").ZodOb
41
46
  type?: import("../types").webhookCentralizerPlatform | undefined;
42
47
  apiToken?: string | undefined;
43
48
  slug?: string | undefined;
49
+ role?: import("../types").webhookPlatformRole | undefined;
44
50
  }>;
45
51
  export declare const WebhookCentralizerGetPlatformsSchema: import("zod").ZodObject<{
46
52
  page: import("zod").ZodDefault<import("zod").ZodNumber>;
@@ -8,6 +8,7 @@ exports.WebhookCentralizerCreatePlatformSchema = config_1.zod.object({
8
8
  title: (0, zod_1.stringField)().min(3),
9
9
  platformToken: (0, zod_1.stringField)().optional(),
10
10
  dispatchType: (0, zod_1.nativeEnumField)(types_1.WebhookCentralizerDispatchTypeEnum).default("WEBHOOK"),
11
+ role: (0, zod_1.nativeEnumField)(types_1.WebhookPlatformRoleEnum).default("PRODUCER"),
11
12
  type: (0, zod_1.nativeEnumField)(types_1.WebhookCentralizerPlatformEnum),
12
13
  apiToken: (0, zod_1.stringField)().optional(),
13
14
  slug: (0, zod_1.stringField)().optional(),
@@ -16,6 +17,7 @@ exports.WebhookCentralizerUpdatePlatformSchema = config_1.zod.object({
16
17
  title: (0, zod_1.stringField)().min(3).optional(),
17
18
  platformToken: (0, zod_1.stringField)().optional(),
18
19
  dispatchType: (0, zod_1.nativeEnumField)(types_1.WebhookCentralizerDispatchTypeEnum).default("WEBHOOK").optional(),
20
+ role: (0, zod_1.nativeEnumField)(types_1.WebhookPlatformRoleEnum).optional(),
19
21
  type: (0, zod_1.nativeEnumField)(types_1.WebhookCentralizerPlatformEnum).optional(),
20
22
  apiToken: (0, zod_1.stringField)().optional(),
21
23
  slug: (0, zod_1.stringField)().optional().optional(),
package/dist/types.d.ts CHANGED
@@ -3,6 +3,8 @@ export type webhookCentralizerDispatchType = "WEBHOOK" | "POST_BACK";
3
3
  export type webhookCentralizerPlatform = "BEMONY" | "B4YOU" | "BRAIP" | "CARTPANDA" | "NUTRALINK" | "HOTMART" | "KIRVANO" | "KIWIFY" | "LAST_LINK" | "PAYT" | "DIGISTORE";
4
4
  export type webhookCentralizerOrderStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED";
5
5
  export type webhookCentralizerEvent = "ABANDONED_CART" | "PURCHASE_UPSELL" | "PURCHASE_CONFIRMED" | "PURCHASE_PENDING" | "PURCHASE_EXPIRED" | "PURCHASE_CANCELED" | "PURCHASE_SHIPPED" | "PURCHASE_REFUND" | "PURCHASE_UPDATED" | "PURCHASE_CHARGEBACK" | "SUBSCRIPTION_INITIATED" | "SUBSCRIPTION_RENEWAL" | "SUBSCRIPTION_RENEWAL_PENDING" | "SUBSCRIPTION_UPDATED" | "SUBSCRIPTION_CANCELED" | "SUBSCRIPTION_EXPIRED" | "SUBSCRIPTION_RENEWAL_CANCELLED" | "SUBSCRIPTION_RENEWAL_RESUMED" | "REJECTED" | "UNKNOWN";
6
+ export type webhookPlatformRole = "PRODUCER" | "CO_PRODUCER" | "AFFILIATE";
7
+ export declare const WebhookPlatformRoleEnum: Record<webhookPlatformRole, webhookPlatformRole>;
6
8
  export declare const WebhookCentralizerDispatchTypeEnum: Record<webhookCentralizerDispatchType, webhookCentralizerDispatchType>;
7
9
  export declare const WebhookCentralizerPlatformEnum: Record<webhookCentralizerPlatform, webhookCentralizerPlatform>;
8
10
  export declare const WebhookCentralizerStatusEnum: Record<webhookCentralizerOrderStatus, webhookCentralizerOrderStatus>;
package/dist/types.js CHANGED
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebhookCentralizerEventEnum = exports.WebhookCentralizerStatusEnum = exports.WebhookCentralizerPlatformEnum = exports.WebhookCentralizerDispatchTypeEnum = void 0;
3
+ exports.WebhookCentralizerEventEnum = exports.WebhookCentralizerStatusEnum = exports.WebhookCentralizerPlatformEnum = exports.WebhookCentralizerDispatchTypeEnum = exports.WebhookPlatformRoleEnum = void 0;
4
+ exports.WebhookPlatformRoleEnum = {
5
+ PRODUCER: "PRODUCER",
6
+ CO_PRODUCER: "CO_PRODUCER",
7
+ AFFILIATE: "AFFILIATE",
8
+ };
4
9
  exports.WebhookCentralizerDispatchTypeEnum = {
5
10
  WEBHOOK: "WEBHOOK",
6
11
  POST_BACK: "POST_BACK",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenus-io/webhook-centralizer",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "SDK para centralização de webhooks focado atualmente em plataformas de pagamentos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",