@novu/api 0.0.1-alpha.145 → 0.0.1-alpha.146

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/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "1.0";
30
- readonly sdkVersion: "0.0.1-alpha.145";
30
+ readonly sdkVersion: "0.0.1-alpha.146";
31
31
  readonly genVersion: "2.481.0";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.145 2.481.0 1.0 @novu/api";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.146 2.481.0 1.0 @novu/api";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -30,8 +30,8 @@ exports.serverURLFromOptions = serverURLFromOptions;
30
30
  exports.SDK_METADATA = {
31
31
  language: "typescript",
32
32
  openapiDocVersion: "1.0",
33
- sdkVersion: "0.0.1-alpha.145",
33
+ sdkVersion: "0.0.1-alpha.146",
34
34
  genVersion: "2.481.0",
35
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.145 2.481.0 1.0 @novu/api",
35
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.146 2.481.0 1.0 @novu/api",
36
36
  };
37
37
  //# sourceMappingURL=config.js.map
@@ -1,58 +1,18 @@
1
1
  import * as z from "zod";
2
- import { ClosedEnum } from "../../types/enums.js";
3
2
  import { Result as SafeParseResult } from "../../types/fp.js";
4
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- /**
6
- * The type of channel that is enabled or not
7
- */
8
- export declare const ChannelPreferenceType: {
9
- readonly InApp: "in_app";
10
- readonly Email: "email";
11
- readonly Sms: "sms";
12
- readonly Chat: "chat";
13
- readonly Push: "push";
14
- };
15
- /**
16
- * The type of channel that is enabled or not
17
- */
18
- export type ChannelPreferenceType = ClosedEnum<typeof ChannelPreferenceType>;
4
+ import { ChannelTypeEnum } from "./channeltypeenum.js";
19
5
  export type ChannelPreference = {
20
6
  /**
21
- * The type of channel that is enabled or not
7
+ * Channel type through which the message is sent
22
8
  */
23
- type: ChannelPreferenceType;
9
+ type: ChannelTypeEnum;
24
10
  /**
25
11
  * If channel is enabled or not
26
12
  */
27
13
  enabled: boolean;
28
14
  };
29
15
  /** @internal */
30
- export declare const ChannelPreferenceType$inboundSchema: z.ZodNativeEnum<typeof ChannelPreferenceType>;
31
- /** @internal */
32
- export declare const ChannelPreferenceType$outboundSchema: z.ZodNativeEnum<typeof ChannelPreferenceType>;
33
- /**
34
- * @internal
35
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
36
- */
37
- export declare namespace ChannelPreferenceType$ {
38
- /** @deprecated use `ChannelPreferenceType$inboundSchema` instead. */
39
- const inboundSchema: z.ZodNativeEnum<{
40
- readonly InApp: "in_app";
41
- readonly Email: "email";
42
- readonly Sms: "sms";
43
- readonly Chat: "chat";
44
- readonly Push: "push";
45
- }>;
46
- /** @deprecated use `ChannelPreferenceType$outboundSchema` instead. */
47
- const outboundSchema: z.ZodNativeEnum<{
48
- readonly InApp: "in_app";
49
- readonly Email: "email";
50
- readonly Sms: "sms";
51
- readonly Chat: "chat";
52
- readonly Push: "push";
53
- }>;
54
- }
55
- /** @internal */
56
16
  export declare const ChannelPreference$inboundSchema: z.ZodType<ChannelPreference, z.ZodTypeDef, unknown>;
57
17
  /** @internal */
58
18
  export type ChannelPreference$Outbound = {
@@ -1 +1 @@
1
- {"version":3,"file":"channelpreference.d.ts","sourceRoot":"","sources":["../../src/models/components/channelpreference.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA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0BAA0B,CAAC;CACnD;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAMxD"}
1
+ {"version":3,"file":"channelpreference.d.ts","sourceRoot":"","sources":["../../src/models/components/channelpreference.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,eAAe,EAGhB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CACrD,iBAAiB,EACjB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CAIjB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,kBAAkB,CAAC;IAClC,iEAAiE;IAC1D,MAAM,aAAa,qDAAkC,CAAC;IAC7D,kEAAkE;IAC3D,MAAM,cAAc,wEAAmC,CAAC;IAC/D,4DAA4D;IAC5D,KAAY,QAAQ,GAAG,0BAA0B,CAAC;CACnD;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAMxD"}
@@ -26,42 +26,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.channelPreferenceFromJSON = exports.channelPreferenceToJSON = exports.ChannelPreference$ = exports.ChannelPreference$outboundSchema = exports.ChannelPreference$inboundSchema = exports.ChannelPreferenceType$ = exports.ChannelPreferenceType$outboundSchema = exports.ChannelPreferenceType$inboundSchema = exports.ChannelPreferenceType = void 0;
29
+ exports.channelPreferenceFromJSON = exports.channelPreferenceToJSON = exports.ChannelPreference$ = exports.ChannelPreference$outboundSchema = exports.ChannelPreference$inboundSchema = void 0;
30
30
  const z = __importStar(require("zod"));
31
31
  const schemas_js_1 = require("../../lib/schemas.js");
32
- /**
33
- * The type of channel that is enabled or not
34
- */
35
- exports.ChannelPreferenceType = {
36
- InApp: "in_app",
37
- Email: "email",
38
- Sms: "sms",
39
- Chat: "chat",
40
- Push: "push",
41
- };
42
- /** @internal */
43
- exports.ChannelPreferenceType$inboundSchema = z.nativeEnum(exports.ChannelPreferenceType);
44
- /** @internal */
45
- exports.ChannelPreferenceType$outboundSchema = exports.ChannelPreferenceType$inboundSchema;
46
- /**
47
- * @internal
48
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
- */
50
- var ChannelPreferenceType$;
51
- (function (ChannelPreferenceType$) {
52
- /** @deprecated use `ChannelPreferenceType$inboundSchema` instead. */
53
- ChannelPreferenceType$.inboundSchema = exports.ChannelPreferenceType$inboundSchema;
54
- /** @deprecated use `ChannelPreferenceType$outboundSchema` instead. */
55
- ChannelPreferenceType$.outboundSchema = exports.ChannelPreferenceType$outboundSchema;
56
- })(ChannelPreferenceType$ || (exports.ChannelPreferenceType$ = ChannelPreferenceType$ = {}));
32
+ const channeltypeenum_js_1 = require("./channeltypeenum.js");
57
33
  /** @internal */
58
34
  exports.ChannelPreference$inboundSchema = z.object({
59
- type: exports.ChannelPreferenceType$inboundSchema,
35
+ type: channeltypeenum_js_1.ChannelTypeEnum$inboundSchema,
60
36
  enabled: z.boolean(),
61
37
  });
62
38
  /** @internal */
63
39
  exports.ChannelPreference$outboundSchema = z.object({
64
- type: exports.ChannelPreferenceType$outboundSchema,
40
+ type: channeltypeenum_js_1.ChannelTypeEnum$outboundSchema,
65
41
  enabled: z.boolean(),
66
42
  });
67
43
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"channelpreference.js","sourceRoot":"","sources":["../../src/models/components/channelpreference.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,qDAAiD;AAKjD;;GAEG;AACU,QAAA,qBAAqB,GAAG;IACnC,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAiBX,gBAAgB;AACH,QAAA,mCAAmC,GAE5C,CAAC,CAAC,UAAU,CAAC,6BAAqB,CAAC,CAAC;AAExC,gBAAgB;AACH,QAAA,oCAAoC,GAE7C,2CAAmC,CAAC;AAExC;;;GAGG;AACH,IAAiB,sBAAsB,CAKtC;AALD,WAAiB,sBAAsB;IACrC,qEAAqE;IACxD,oCAAa,GAAG,2CAAmC,CAAC;IACjE,sEAAsE;IACzD,qCAAc,GAAG,4CAAoC,CAAC;AACrE,CAAC,EALgB,sBAAsB,sCAAtB,sBAAsB,QAKtC;AAED,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,2CAAmC;IACzC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,4CAAoC;IAC1C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kBAAkB,CAOlC;AAPD,WAAiB,kBAAkB;IACjC,iEAAiE;IACpD,gCAAa,GAAG,uCAA+B,CAAC;IAC7D,kEAAkE;IACrD,iCAAc,GAAG,wCAAgC,CAAC;AAGjE,CAAC,EAPgB,kBAAkB,kCAAlB,kBAAkB,QAOlC;AAED,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAND,0DAMC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC;AARD,8DAQC"}
1
+ {"version":3,"file":"channelpreference.js","sourceRoot":"","sources":["../../src/models/components/channelpreference.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,qDAAiD;AAGjD,6DAI8B;AAa9B,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,kDAA6B;IACnC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,mDAA8B;IACpC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kBAAkB,CAOlC;AAPD,WAAiB,kBAAkB;IACjC,iEAAiE;IACpD,gCAAa,GAAG,uCAA+B,CAAC;IAC7D,kEAAkE;IACrD,iCAAc,GAAG,wCAAgC,CAAC;AAGjE,CAAC,EAPgB,kBAAkB,kCAAlB,kBAAkB,QAOlC;AAED,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAND,0DAMC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC;AARD,8DAQC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novu/api",
3
- "version": "0.0.1-alpha.145",
3
+ "version": "0.0.1-alpha.146",
4
4
  "author": "Novu",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0",
58
- sdkVersion: "0.0.1-alpha.145",
58
+ sdkVersion: "0.0.1-alpha.146",
59
59
  genVersion: "2.481.0",
60
- userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.145 2.481.0 1.0 @novu/api",
60
+ userAgent: "speakeasy-sdk/typescript 0.0.1-alpha.146 2.481.0 1.0 @novu/api",
61
61
  } as const;
@@ -4,64 +4,32 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * The type of channel that is enabled or not
13
- */
14
- export const ChannelPreferenceType = {
15
- InApp: "in_app",
16
- Email: "email",
17
- Sms: "sms",
18
- Chat: "chat",
19
- Push: "push",
20
- } as const;
21
- /**
22
- * The type of channel that is enabled or not
23
- */
24
- export type ChannelPreferenceType = ClosedEnum<typeof ChannelPreferenceType>;
9
+ import {
10
+ ChannelTypeEnum,
11
+ ChannelTypeEnum$inboundSchema,
12
+ ChannelTypeEnum$outboundSchema,
13
+ } from "./channeltypeenum.js";
25
14
 
26
15
  export type ChannelPreference = {
27
16
  /**
28
- * The type of channel that is enabled or not
17
+ * Channel type through which the message is sent
29
18
  */
30
- type: ChannelPreferenceType;
19
+ type: ChannelTypeEnum;
31
20
  /**
32
21
  * If channel is enabled or not
33
22
  */
34
23
  enabled: boolean;
35
24
  };
36
25
 
37
- /** @internal */
38
- export const ChannelPreferenceType$inboundSchema: z.ZodNativeEnum<
39
- typeof ChannelPreferenceType
40
- > = z.nativeEnum(ChannelPreferenceType);
41
-
42
- /** @internal */
43
- export const ChannelPreferenceType$outboundSchema: z.ZodNativeEnum<
44
- typeof ChannelPreferenceType
45
- > = ChannelPreferenceType$inboundSchema;
46
-
47
- /**
48
- * @internal
49
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
- */
51
- export namespace ChannelPreferenceType$ {
52
- /** @deprecated use `ChannelPreferenceType$inboundSchema` instead. */
53
- export const inboundSchema = ChannelPreferenceType$inboundSchema;
54
- /** @deprecated use `ChannelPreferenceType$outboundSchema` instead. */
55
- export const outboundSchema = ChannelPreferenceType$outboundSchema;
56
- }
57
-
58
26
  /** @internal */
59
27
  export const ChannelPreference$inboundSchema: z.ZodType<
60
28
  ChannelPreference,
61
29
  z.ZodTypeDef,
62
30
  unknown
63
31
  > = z.object({
64
- type: ChannelPreferenceType$inboundSchema,
32
+ type: ChannelTypeEnum$inboundSchema,
65
33
  enabled: z.boolean(),
66
34
  });
67
35
 
@@ -77,7 +45,7 @@ export const ChannelPreference$outboundSchema: z.ZodType<
77
45
  z.ZodTypeDef,
78
46
  ChannelPreference
79
47
  > = z.object({
80
- type: ChannelPreferenceType$outboundSchema,
48
+ type: ChannelTypeEnum$outboundSchema,
81
49
  enabled: z.boolean(),
82
50
  });
83
51