@novu/api 0.1.0 → 0.1.1
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/FUNCTIONS.md +15 -8
- package/README.md +161 -73
- package/docs/sdks/credentials/README.md +44 -0
- package/docs/sdks/messages/README.md +8 -2
- package/docs/sdks/notifications/README.md +2 -32
- package/docs/sdks/novu/README.md +277 -47
- package/docs/sdks/novumessages/README.md +4 -4
- package/docs/sdks/novunotifications/README.md +4 -2
- package/docs/sdks/preferences/README.md +4 -4
- package/docs/sdks/properties/README.md +2 -2
- package/docs/sdks/subscribers/README.md +2 -4
- package/funcs/create.d.ts +9 -0
- package/funcs/create.d.ts.map +1 -0
- package/funcs/create.js +110 -0
- package/funcs/create.js.map +1 -0
- package/funcs/supportControllerFetchUserOrganizations.d.ts +10 -0
- package/funcs/supportControllerFetchUserOrganizations.d.ts.map +1 -0
- package/funcs/supportControllerFetchUserOrganizations.js +111 -0
- package/funcs/supportControllerFetchUserOrganizations.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/schemas.d.ts +1 -1
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +4 -1
- package/lib/schemas.js.map +1 -1
- package/models/components/createsupportthreaddto.d.ts +29 -0
- package/models/components/createsupportthreaddto.d.ts.map +1 -0
- package/models/components/createsupportthreaddto.js +59 -0
- package/models/components/createsupportthreaddto.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/plaincardrequestdto.d.ts +100 -0
- package/models/components/plaincardrequestdto.d.ts.map +1 -0
- package/models/components/plaincardrequestdto.js +139 -0
- package/models/components/plaincardrequestdto.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/supportcontrollercreatethread.d.ts +35 -0
- package/models/operations/supportcontrollercreatethread.d.ts.map +1 -0
- package/models/operations/supportcontrollercreatethread.js +73 -0
- package/models/operations/supportcontrollercreatethread.js.map +1 -0
- package/models/operations/supportcontrollerfetchuserorganizations.d.ts +56 -0
- package/models/operations/supportcontrollerfetchuserorganizations.d.ts.map +1 -0
- package/models/operations/supportcontrollerfetchuserorganizations.js +96 -0
- package/models/operations/supportcontrollerfetchuserorganizations.js.map +1 -0
- package/package.json +5 -1
- package/sdk/sdk.d.ts +8 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +14 -0
- package/sdk/sdk.js.map +1 -1
- package/sources/json-development.json +116 -0
- package/src/funcs/create.ts +148 -0
- package/src/funcs/supportControllerFetchUserOrganizations.ts +150 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/schemas.ts +5 -0
- package/src/models/components/createsupportthreaddto.ts +66 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/plaincardrequestdto.ts +223 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/supportcontrollercreatethread.ts +90 -0
- package/src/models/operations/supportcontrollerfetchuserorganizations.ts +163 -0
- package/src/sdk/sdk.ts +34 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type SupportControllerCreateThreadRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* A header for idempotency purposes
|
|
15
|
+
*/
|
|
16
|
+
idempotencyKey?: string | undefined;
|
|
17
|
+
createSupportThreadDto: components.CreateSupportThreadDto;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const SupportControllerCreateThreadRequest$inboundSchema: z.ZodType<
|
|
22
|
+
SupportControllerCreateThreadRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
"idempotency-key": z.string().optional(),
|
|
27
|
+
CreateSupportThreadDto: components.CreateSupportThreadDto$inboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"idempotency-key": "idempotencyKey",
|
|
31
|
+
"CreateSupportThreadDto": "createSupportThreadDto",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type SupportControllerCreateThreadRequest$Outbound = {
|
|
37
|
+
"idempotency-key"?: string | undefined;
|
|
38
|
+
CreateSupportThreadDto: components.CreateSupportThreadDto$Outbound;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const SupportControllerCreateThreadRequest$outboundSchema: z.ZodType<
|
|
43
|
+
SupportControllerCreateThreadRequest$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
SupportControllerCreateThreadRequest
|
|
46
|
+
> = z.object({
|
|
47
|
+
idempotencyKey: z.string().optional(),
|
|
48
|
+
createSupportThreadDto: components.CreateSupportThreadDto$outboundSchema,
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
idempotencyKey: "idempotency-key",
|
|
52
|
+
createSupportThreadDto: "CreateSupportThreadDto",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace SupportControllerCreateThreadRequest$ {
|
|
61
|
+
/** @deprecated use `SupportControllerCreateThreadRequest$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema =
|
|
63
|
+
SupportControllerCreateThreadRequest$inboundSchema;
|
|
64
|
+
/** @deprecated use `SupportControllerCreateThreadRequest$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema =
|
|
66
|
+
SupportControllerCreateThreadRequest$outboundSchema;
|
|
67
|
+
/** @deprecated use `SupportControllerCreateThreadRequest$Outbound` instead. */
|
|
68
|
+
export type Outbound = SupportControllerCreateThreadRequest$Outbound;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function supportControllerCreateThreadRequestToJSON(
|
|
72
|
+
supportControllerCreateThreadRequest: SupportControllerCreateThreadRequest,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
SupportControllerCreateThreadRequest$outboundSchema.parse(
|
|
76
|
+
supportControllerCreateThreadRequest,
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function supportControllerCreateThreadRequestFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<SupportControllerCreateThreadRequest, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) =>
|
|
87
|
+
SupportControllerCreateThreadRequest$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'SupportControllerCreateThreadRequest' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type SupportControllerFetchUserOrganizationsRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* A header for idempotency purposes
|
|
15
|
+
*/
|
|
16
|
+
idempotencyKey?: string | undefined;
|
|
17
|
+
plainCardRequestDto: components.PlainCardRequestDto;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type SupportControllerFetchUserOrganizationsResponseBody = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const SupportControllerFetchUserOrganizationsRequest$inboundSchema:
|
|
24
|
+
z.ZodType<
|
|
25
|
+
SupportControllerFetchUserOrganizationsRequest,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
"idempotency-key": z.string().optional(),
|
|
30
|
+
PlainCardRequestDto: components.PlainCardRequestDto$inboundSchema,
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"idempotency-key": "idempotencyKey",
|
|
34
|
+
"PlainCardRequestDto": "plainCardRequestDto",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type SupportControllerFetchUserOrganizationsRequest$Outbound = {
|
|
40
|
+
"idempotency-key"?: string | undefined;
|
|
41
|
+
PlainCardRequestDto: components.PlainCardRequestDto$Outbound;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const SupportControllerFetchUserOrganizationsRequest$outboundSchema:
|
|
46
|
+
z.ZodType<
|
|
47
|
+
SupportControllerFetchUserOrganizationsRequest$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
SupportControllerFetchUserOrganizationsRequest
|
|
50
|
+
> = z.object({
|
|
51
|
+
idempotencyKey: z.string().optional(),
|
|
52
|
+
plainCardRequestDto: components.PlainCardRequestDto$outboundSchema,
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
idempotencyKey: "idempotency-key",
|
|
56
|
+
plainCardRequestDto: "PlainCardRequestDto",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace SupportControllerFetchUserOrganizationsRequest$ {
|
|
65
|
+
/** @deprecated use `SupportControllerFetchUserOrganizationsRequest$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema =
|
|
67
|
+
SupportControllerFetchUserOrganizationsRequest$inboundSchema;
|
|
68
|
+
/** @deprecated use `SupportControllerFetchUserOrganizationsRequest$outboundSchema` instead. */
|
|
69
|
+
export const outboundSchema =
|
|
70
|
+
SupportControllerFetchUserOrganizationsRequest$outboundSchema;
|
|
71
|
+
/** @deprecated use `SupportControllerFetchUserOrganizationsRequest$Outbound` instead. */
|
|
72
|
+
export type Outbound =
|
|
73
|
+
SupportControllerFetchUserOrganizationsRequest$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function supportControllerFetchUserOrganizationsRequestToJSON(
|
|
77
|
+
supportControllerFetchUserOrganizationsRequest:
|
|
78
|
+
SupportControllerFetchUserOrganizationsRequest,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
SupportControllerFetchUserOrganizationsRequest$outboundSchema.parse(
|
|
82
|
+
supportControllerFetchUserOrganizationsRequest,
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function supportControllerFetchUserOrganizationsRequestFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<
|
|
90
|
+
SupportControllerFetchUserOrganizationsRequest,
|
|
91
|
+
SDKValidationError
|
|
92
|
+
> {
|
|
93
|
+
return safeParse(
|
|
94
|
+
jsonString,
|
|
95
|
+
(x) =>
|
|
96
|
+
SupportControllerFetchUserOrganizationsRequest$inboundSchema.parse(
|
|
97
|
+
JSON.parse(x),
|
|
98
|
+
),
|
|
99
|
+
`Failed to parse 'SupportControllerFetchUserOrganizationsRequest' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const SupportControllerFetchUserOrganizationsResponseBody$inboundSchema:
|
|
105
|
+
z.ZodType<
|
|
106
|
+
SupportControllerFetchUserOrganizationsResponseBody,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
unknown
|
|
109
|
+
> = z.object({});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type SupportControllerFetchUserOrganizationsResponseBody$Outbound = {};
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const SupportControllerFetchUserOrganizationsResponseBody$outboundSchema:
|
|
116
|
+
z.ZodType<
|
|
117
|
+
SupportControllerFetchUserOrganizationsResponseBody$Outbound,
|
|
118
|
+
z.ZodTypeDef,
|
|
119
|
+
SupportControllerFetchUserOrganizationsResponseBody
|
|
120
|
+
> = z.object({});
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
+
*/
|
|
126
|
+
export namespace SupportControllerFetchUserOrganizationsResponseBody$ {
|
|
127
|
+
/** @deprecated use `SupportControllerFetchUserOrganizationsResponseBody$inboundSchema` instead. */
|
|
128
|
+
export const inboundSchema =
|
|
129
|
+
SupportControllerFetchUserOrganizationsResponseBody$inboundSchema;
|
|
130
|
+
/** @deprecated use `SupportControllerFetchUserOrganizationsResponseBody$outboundSchema` instead. */
|
|
131
|
+
export const outboundSchema =
|
|
132
|
+
SupportControllerFetchUserOrganizationsResponseBody$outboundSchema;
|
|
133
|
+
/** @deprecated use `SupportControllerFetchUserOrganizationsResponseBody$Outbound` instead. */
|
|
134
|
+
export type Outbound =
|
|
135
|
+
SupportControllerFetchUserOrganizationsResponseBody$Outbound;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function supportControllerFetchUserOrganizationsResponseBodyToJSON(
|
|
139
|
+
supportControllerFetchUserOrganizationsResponseBody:
|
|
140
|
+
SupportControllerFetchUserOrganizationsResponseBody,
|
|
141
|
+
): string {
|
|
142
|
+
return JSON.stringify(
|
|
143
|
+
SupportControllerFetchUserOrganizationsResponseBody$outboundSchema.parse(
|
|
144
|
+
supportControllerFetchUserOrganizationsResponseBody,
|
|
145
|
+
),
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function supportControllerFetchUserOrganizationsResponseBodyFromJSON(
|
|
150
|
+
jsonString: string,
|
|
151
|
+
): SafeParseResult<
|
|
152
|
+
SupportControllerFetchUserOrganizationsResponseBody,
|
|
153
|
+
SDKValidationError
|
|
154
|
+
> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) =>
|
|
158
|
+
SupportControllerFetchUserOrganizationsResponseBody$inboundSchema.parse(
|
|
159
|
+
JSON.parse(x),
|
|
160
|
+
),
|
|
161
|
+
`Failed to parse 'SupportControllerFetchUserOrganizationsResponseBody' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { cancel } from "../funcs/cancel.js";
|
|
6
|
+
import { create } from "../funcs/create.js";
|
|
7
|
+
import { supportControllerFetchUserOrganizations } from "../funcs/supportControllerFetchUserOrganizations.js";
|
|
6
8
|
import { trigger } from "../funcs/trigger.js";
|
|
7
9
|
import { triggerBroadcast } from "../funcs/triggerBroadcast.js";
|
|
8
10
|
import { triggerBulk } from "../funcs/triggerBulk.js";
|
|
@@ -125,4 +127,36 @@ export class Novu extends ClientSDK {
|
|
|
125
127
|
options,
|
|
126
128
|
));
|
|
127
129
|
}
|
|
130
|
+
|
|
131
|
+
async supportControllerFetchUserOrganizations(
|
|
132
|
+
plainCardRequestDto: components.PlainCardRequestDto,
|
|
133
|
+
idempotencyKey?: string | undefined,
|
|
134
|
+
options?: RequestOptions,
|
|
135
|
+
): Promise<operations.SupportControllerFetchUserOrganizationsResponseBody> {
|
|
136
|
+
return unwrapAsync(supportControllerFetchUserOrganizations(
|
|
137
|
+
this,
|
|
138
|
+
plainCardRequestDto,
|
|
139
|
+
idempotencyKey,
|
|
140
|
+
options,
|
|
141
|
+
));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Topic creation
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* Create a topic
|
|
149
|
+
*/
|
|
150
|
+
async create(
|
|
151
|
+
createSupportThreadDto: components.CreateSupportThreadDto,
|
|
152
|
+
idempotencyKey?: string | undefined,
|
|
153
|
+
options?: RequestOptions,
|
|
154
|
+
): Promise<void> {
|
|
155
|
+
return unwrapAsync(create(
|
|
156
|
+
this,
|
|
157
|
+
createSupportThreadDto,
|
|
158
|
+
idempotencyKey,
|
|
159
|
+
options,
|
|
160
|
+
));
|
|
161
|
+
}
|
|
128
162
|
}
|