@knocklabs/node 0.4.15 → 0.4.17
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/README.md +22 -22
- package/dist/package.json +4 -2
- package/dist/src/common/exceptions.d.ts +5 -0
- package/dist/src/common/exceptions.js +12 -1
- package/dist/src/common/interfaces.d.ts +10 -2
- package/dist/src/knock.d.ts +10 -1
- package/dist/src/knock.js +35 -0
- package/dist/src/resources/messages/index.d.ts +4 -4
- package/dist/src/resources/objects/index.d.ts +4 -4
- package/dist/src/resources/tenants/index.d.ts +2 -2
- package/dist/src/resources/users/index.d.ts +4 -4
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -16,13 +16,16 @@ npm install @knocklabs/node
|
|
|
16
16
|
|
|
17
17
|
To use the library you must provide a secret API key, provided in the Knock dashboard.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
If you are using [enhanced security mode](https://docs.knock.app/client-integration/authenticating-users) you will also need to provide your signing key.
|
|
20
|
+
|
|
21
|
+
You can set both as environment variables:
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
24
|
KNOCK_API_KEY="sk_12345"
|
|
25
|
+
KNOCK_SIGNING_KEY="S25vY2sga25vY2sh..."
|
|
23
26
|
```
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
You can also pass the Knock API key in the constructor. The signing key is passed separately to the `signUserToken` method (see below):
|
|
26
29
|
|
|
27
30
|
```javascript
|
|
28
31
|
const { Knock } = require("@knocklabs/node");
|
|
@@ -135,27 +138,24 @@ await knockClient.users.getChannelData("jhammond", KNOCK_APNS_CHANNEL_ID);
|
|
|
135
138
|
|
|
136
139
|
### Signing JWTs
|
|
137
140
|
|
|
138
|
-
|
|
139
|
-
You will need to generate an environment specific signing key, which you can find in the Knock dashboard.
|
|
141
|
+
When using [enhanced security mode](https://docs.knock.app/client-integration/authenticating-users) (recommended in production), you will need to sign JWTs server-side to authenticate your users.
|
|
140
142
|
|
|
141
|
-
|
|
142
|
-
You can read more about [client-side authentication here](https://docs.knock.app/client-integration/authenticating-users).
|
|
143
|
+
You will need to generate an environment specific signing key in the Knock dashboard under "API Keys", and then enable enhanced security mode for your environment.
|
|
143
144
|
|
|
144
145
|
```javascript
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
);
|
|
146
|
+
const { Knock } = require("@knocklabs/node");
|
|
147
|
+
|
|
148
|
+
// When signing user tokens, you do not need to instantiate a Knock client.
|
|
149
|
+
|
|
150
|
+
// jhammond is the user id for which to sign this token
|
|
151
|
+
const token = Knock.signUserToken("jhammond", {
|
|
152
|
+
// The signing key from the Knock Dashboard in base-64 or PEM-encoded format.
|
|
153
|
+
// If not provided, the key will be read from the KNOCK_SIGNING_KEY environment variable.
|
|
154
|
+
signingKey: "S25vY2sga25vY2sh...",
|
|
155
|
+
// Optional: How long the token should be valid for, in seconds (default 1 hour)
|
|
156
|
+
// For long-lived connections, you will need to refresh the token before it expires.
|
|
157
|
+
expiresIn: 60 * 60,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// This token can now be safely passed to your client e.g. in a cookie or API response.
|
|
161
161
|
```
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knocklabs/node",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.17",
|
|
4
4
|
"description": "Library for interacting with the Knock API",
|
|
5
5
|
"homepage": "https://github.com/knocklabs/knock-node",
|
|
6
6
|
"author": "@knocklabs",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/jest": "26.0.23",
|
|
35
|
+
"@types/jsonwebtoken": "^9.0.1",
|
|
35
36
|
"@types/node": "^15.0.1",
|
|
36
37
|
"@types/pluralize": "0.0.29",
|
|
37
38
|
"axios-mock-adapter": "1.19.0",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"typescript": "4.2.4"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"axios": "^0.21.1"
|
|
47
|
+
"axios": "^0.21.1",
|
|
48
|
+
"jsonwebtoken": "^9.0.0"
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -4,6 +4,11 @@ export declare class NoApiKeyProvidedException extends Error {
|
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly message: string;
|
|
6
6
|
}
|
|
7
|
+
export declare class NoSigningKeyProvidedException extends Error {
|
|
8
|
+
readonly status: number;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly message: string;
|
|
11
|
+
}
|
|
7
12
|
export declare class GenericServerException implements HttpException {
|
|
8
13
|
readonly status: number;
|
|
9
14
|
readonly requestID: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BadRequestException = exports.UnprocessableEntityException = exports.NotFoundException = exports.UnauthorizedException = exports.GenericServerException = exports.NoApiKeyProvidedException = void 0;
|
|
3
|
+
exports.BadRequestException = exports.UnprocessableEntityException = exports.NotFoundException = exports.UnauthorizedException = exports.GenericServerException = exports.NoSigningKeyProvidedException = exports.NoApiKeyProvidedException = void 0;
|
|
4
4
|
class NoApiKeyProvidedException extends Error {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
@@ -11,6 +11,17 @@ class NoApiKeyProvidedException extends Error {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.NoApiKeyProvidedException = NoApiKeyProvidedException;
|
|
14
|
+
class NoSigningKeyProvidedException extends Error {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.status = 500;
|
|
18
|
+
this.name = "NoSigningKeyProvidedException";
|
|
19
|
+
this.message = `Missing or invalid signing key key. Pass it as an option to Knock.signUserToken(userId, {signingKey: "S25vY2sga25vY2sh..."}) ` +
|
|
20
|
+
`or define it in the KNOCK_SIGNING_KEY environment variable. The signing key can either be a Base-64 encoded string ` +
|
|
21
|
+
`or a PEM-encoded certificate. For more information, see https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.NoSigningKeyProvidedException = NoSigningKeyProvidedException;
|
|
14
25
|
class GenericServerException {
|
|
15
26
|
constructor(status, message, requestID) {
|
|
16
27
|
this.status = status;
|
|
@@ -28,11 +28,11 @@ declare type PageInfo = {
|
|
|
28
28
|
after: string;
|
|
29
29
|
page_size: number;
|
|
30
30
|
};
|
|
31
|
-
export interface
|
|
31
|
+
export interface PaginatedEntriesResponse<T> {
|
|
32
32
|
entries: T[];
|
|
33
33
|
page_info: PageInfo;
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface PaginatedItemsResponse<T> {
|
|
36
36
|
items: T[];
|
|
37
37
|
page_info: PageInfo;
|
|
38
38
|
}
|
|
@@ -46,4 +46,12 @@ export interface Condition {
|
|
|
46
46
|
variable: string;
|
|
47
47
|
operator: string;
|
|
48
48
|
}
|
|
49
|
+
export interface SignUserTokenOptions {
|
|
50
|
+
/**
|
|
51
|
+
* The signing key to use to sign the token. If not provided, the KNOCK_SIGNING_KEY environment variable will be used.
|
|
52
|
+
*/
|
|
53
|
+
signingKey?: string;
|
|
54
|
+
/** The expiration time of the token in seconds. Defaults to 1 hour. */
|
|
55
|
+
expiresInSeconds?: number;
|
|
56
|
+
}
|
|
49
57
|
export {};
|
package/dist/src/knock.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosResponse } from "axios";
|
|
2
|
-
import { KnockOptions, PostAndPutOptions } from "./common/interfaces";
|
|
2
|
+
import { KnockOptions, PostAndPutOptions, SignUserTokenOptions } from "./common/interfaces";
|
|
3
3
|
import { Users } from "./resources/users";
|
|
4
4
|
import { Preferences } from "./resources/preferences";
|
|
5
5
|
import { Workflows } from "./resources/workflows";
|
|
@@ -22,6 +22,15 @@ declare class Knock {
|
|
|
22
22
|
readonly tenants: Tenants;
|
|
23
23
|
constructor(key?: string | undefined, options?: KnockOptions);
|
|
24
24
|
notify(workflowKey: string, properties: TriggerWorkflowProperties): Promise<import("./resources/workflows/interfaces").WorkflowRun>;
|
|
25
|
+
/**
|
|
26
|
+
* Generate JWT for authenticating client-side requests (e.g. in-app feeds)
|
|
27
|
+
* For more information, visit https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled
|
|
28
|
+
*
|
|
29
|
+
* @param userId {string} The ID of the user that needs a token, e.g. the user viewing an in-app feed.
|
|
30
|
+
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format), and how long the token should be valid for in seconds
|
|
31
|
+
* @returns {string} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the <KnockFeedProvider /> component)
|
|
32
|
+
*/
|
|
33
|
+
static signUserToken(userId: string, options: SignUserTokenOptions): string;
|
|
25
34
|
post(path: string, entity: any, options?: PostAndPutOptions): Promise<AxiosResponse>;
|
|
26
35
|
put(path: string, entity: any, options?: PostAndPutOptions): Promise<AxiosResponse>;
|
|
27
36
|
delete(path: string, entity?: any): Promise<AxiosResponse>;
|
package/dist/src/knock.js
CHANGED
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.Knock = void 0;
|
|
16
16
|
const axios_1 = __importDefault(require("axios"));
|
|
17
|
+
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
17
18
|
const package_json_1 = require("../package.json");
|
|
18
19
|
const exceptions_1 = require("./common/exceptions");
|
|
19
20
|
const users_1 = require("./resources/users");
|
|
@@ -57,6 +58,29 @@ class Knock {
|
|
|
57
58
|
return this.workflows.trigger(workflowKey, properties);
|
|
58
59
|
});
|
|
59
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Generate JWT for authenticating client-side requests (e.g. in-app feeds)
|
|
63
|
+
* For more information, visit https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled
|
|
64
|
+
*
|
|
65
|
+
* @param userId {string} The ID of the user that needs a token, e.g. the user viewing an in-app feed.
|
|
66
|
+
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format), and how long the token should be valid for in seconds
|
|
67
|
+
* @returns {string} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the <KnockFeedProvider /> component)
|
|
68
|
+
*/
|
|
69
|
+
static signUserToken(userId, options) {
|
|
70
|
+
var _a;
|
|
71
|
+
const signingKey = prepareSigningKey(options.signingKey);
|
|
72
|
+
// JWT NumericDates specified in seconds:
|
|
73
|
+
const currentTime = Math.floor(Date.now() / 1000);
|
|
74
|
+
// Default to 1 hour from now
|
|
75
|
+
const expireInSeconds = (_a = options.expiresInSeconds) !== null && _a !== void 0 ? _a : 60 * 60;
|
|
76
|
+
return jsonwebtoken_1.default.sign({
|
|
77
|
+
sub: userId,
|
|
78
|
+
iat: currentTime,
|
|
79
|
+
exp: currentTime + expireInSeconds,
|
|
80
|
+
}, signingKey, {
|
|
81
|
+
algorithm: "RS256",
|
|
82
|
+
});
|
|
83
|
+
}
|
|
60
84
|
post(path, entity, options = {}) {
|
|
61
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
86
|
try {
|
|
@@ -144,3 +168,14 @@ class Knock {
|
|
|
144
168
|
}
|
|
145
169
|
}
|
|
146
170
|
exports.Knock = Knock;
|
|
171
|
+
function prepareSigningKey(key) {
|
|
172
|
+
const maybeSigningKey = key !== null && key !== void 0 ? key : process.env.KNOCK_SIGNING_KEY;
|
|
173
|
+
if (!maybeSigningKey)
|
|
174
|
+
throw new exceptions_1.NoSigningKeyProvidedException();
|
|
175
|
+
if (maybeSigningKey.startsWith("-----BEGIN"))
|
|
176
|
+
return maybeSigningKey;
|
|
177
|
+
// LS0tLS1CRUdJTi is the base64 encoded version of "-----BEGIN"
|
|
178
|
+
if (maybeSigningKey.startsWith("LS0tLS1CRUdJTi"))
|
|
179
|
+
return Buffer.from(maybeSigningKey, "base64").toString("utf-8");
|
|
180
|
+
throw new exceptions_1.NoSigningKeyProvidedException();
|
|
181
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaginatedItemsResponse, PaginationOptions } from "../../common/interfaces";
|
|
2
2
|
import { Message, MessageContent, MessageEvent, ListMessageActivitiesOptions, ListMessagesOptions, MessageEngagementStatus } from "./interfaces";
|
|
3
3
|
import { Activity } from "../activities/interfaces";
|
|
4
4
|
import { Knock } from "../../knock";
|
|
5
5
|
export declare class Messages {
|
|
6
6
|
readonly knock: Knock;
|
|
7
7
|
constructor(knock: Knock);
|
|
8
|
-
list(filteringOptions?: ListMessagesOptions): Promise<
|
|
8
|
+
list(filteringOptions?: ListMessagesOptions): Promise<PaginatedItemsResponse<Message>>;
|
|
9
9
|
get(messageId: string): Promise<Message>;
|
|
10
10
|
getContent(messageId: string): Promise<MessageContent>;
|
|
11
|
-
getEvents(messageId: string, paginationOptions?: PaginationOptions): Promise<
|
|
12
|
-
getActivities(messageId: string, filteringOptions?: ListMessageActivitiesOptions): Promise<
|
|
11
|
+
getEvents(messageId: string, paginationOptions?: PaginationOptions): Promise<PaginatedItemsResponse<MessageEvent>>;
|
|
12
|
+
getActivities(messageId: string, filteringOptions?: ListMessageActivitiesOptions): Promise<PaginatedItemsResponse<Activity>>;
|
|
13
13
|
setStatus(messageId: string, status: MessageEngagementStatus): Promise<Message>;
|
|
14
14
|
deleteStatus(messageId: string, status: MessageEngagementStatus): Promise<Message>;
|
|
15
15
|
batchSetStatus(messageIds: string[], status: MessageEngagementStatus | "unseen" | "unread" | "unarchived"): Promise<Message[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChannelData, CommonMetadata, SetChannelDataProperties,
|
|
1
|
+
import { ChannelData, CommonMetadata, SetChannelDataProperties, PaginatedEntriesResponse, ChannelType, PaginatedItemsResponse } from "../../common/interfaces";
|
|
2
2
|
import { Knock } from "../../knock";
|
|
3
3
|
import { AddObjectSubscriptionProperties, BulkSetObjectOption, DeleteObjectSubscriptionProperties, ListObjectOptions, ListObjectSubscriptionsOptions, Object, ObjectSubscription, SetObjectProperties } from "./interfaces";
|
|
4
4
|
import { BulkOperation } from "../bulk_operations/interfaces";
|
|
@@ -9,14 +9,14 @@ export declare class Objects {
|
|
|
9
9
|
constructor(knock: Knock);
|
|
10
10
|
get<T = CommonMetadata>(collection: string, id: string): Promise<Object<T>>;
|
|
11
11
|
set<T = CommonMetadata>(collection: string, id: string, properties: SetObjectProperties): Promise<Object<T>>;
|
|
12
|
-
list<T = CommonMetadata>(collection: string, filteringOptions?: ListObjectOptions): Promise<
|
|
12
|
+
list<T = CommonMetadata>(collection: string, filteringOptions?: ListObjectOptions): Promise<PaginatedEntriesResponse<Object<T>>>;
|
|
13
13
|
bulkSet(collection: string, objects: BulkSetObjectOption[]): Promise<BulkOperation>;
|
|
14
14
|
delete(collection: string, id: string): Promise<null>;
|
|
15
15
|
bulkDelete(collection: string, objectIds: string[]): Promise<BulkOperation>;
|
|
16
16
|
getChannelData<T = CommonMetadata>(collection: string, id: string, channelId: string): Promise<ChannelData<T>>;
|
|
17
17
|
setChannelData<T = CommonMetadata>(collection: string, id: string, channelId: string, channelData: SetChannelDataProperties): Promise<ChannelData<T>>;
|
|
18
18
|
unsetChannelData(collection: string, id: string, channelId: string): Promise<any>;
|
|
19
|
-
getMessages(collection: string, objectId: string, filteringOptions?: ListMessagesOptions): Promise<
|
|
19
|
+
getMessages(collection: string, objectId: string, filteringOptions?: ListMessagesOptions): Promise<PaginatedItemsResponse<Message>>;
|
|
20
20
|
getAllPreferences(collection: string, objectId: string): Promise<PreferenceSet[]>;
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Use `objects.getPreferences` instead
|
|
@@ -30,7 +30,7 @@ export declare class Objects {
|
|
|
30
30
|
setWorkflowPreferences(collection: string, objectId: string, workflowKey: string, setting: WorkflowPreferenceSetting, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
31
31
|
setCategoriesPreferences(collection: string, objectId: string, categoryPreferences: WorkflowPreferences, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
32
32
|
setCategoryPreferences(collection: string, objectId: string, categoryKey: string, setting: WorkflowPreferenceSetting, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
33
|
-
listSubscriptions(collection: string, objectId: string, options?: ListObjectSubscriptionsOptions): Promise<
|
|
33
|
+
listSubscriptions(collection: string, objectId: string, options?: ListObjectSubscriptionsOptions): Promise<PaginatedEntriesResponse<ObjectSubscription>>;
|
|
34
34
|
addSubscriptions(collection: string, objectId: string, properties?: AddObjectSubscriptionProperties): Promise<ObjectSubscription[]>;
|
|
35
35
|
deleteSubscriptions(collection: string, objectId: string, properties?: DeleteObjectSubscriptionProperties): Promise<ObjectSubscription[]>;
|
|
36
36
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CommonMetadata,
|
|
1
|
+
import { CommonMetadata, PaginatedEntriesResponse } from "../../common/interfaces";
|
|
2
2
|
import { Knock } from "../../knock";
|
|
3
3
|
import { Tenant, SetTenant, ListTenantsOptions } from "./interfaces";
|
|
4
4
|
export declare class Tenants {
|
|
5
5
|
readonly knock: Knock;
|
|
6
6
|
constructor(knock: Knock);
|
|
7
|
-
list(filteringOptions?: ListTenantsOptions): Promise<
|
|
7
|
+
list(filteringOptions?: ListTenantsOptions): Promise<PaginatedEntriesResponse<Tenant>>;
|
|
8
8
|
get<T = CommonMetadata>(id: string): Promise<Tenant<T>>;
|
|
9
9
|
set<T = CommonMetadata>(id: string, tenantData: SetTenant): Promise<Tenant<T>>;
|
|
10
10
|
delete(id: string): Promise<null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChannelData, ChannelType, CommonMetadata,
|
|
1
|
+
import { ChannelData, ChannelType, CommonMetadata, PaginatedItemsResponse, PaginatedEntriesResponse } from "../../common/interfaces";
|
|
2
2
|
import { BulkOperation } from "../bulk_operations/interfaces";
|
|
3
3
|
import { ChannelTypePreferences, PreferenceOptions, PreferenceSet, SetPreferencesProperties, WorkflowPreferences, WorkflowPreferenceSetting } from "../preferences/interfaces";
|
|
4
4
|
import { ListMessagesOptions, Message } from "../messages/interfaces";
|
|
@@ -10,11 +10,11 @@ export declare class Users {
|
|
|
10
10
|
identify(userId: string, properties?: IdentifyProperties): Promise<User>;
|
|
11
11
|
bulkIdentify(users: BulkIdentifyUser[]): Promise<BulkOperation>;
|
|
12
12
|
get(userId: string): Promise<User>;
|
|
13
|
-
list(filteringOptions?: ListUserOptions): Promise<
|
|
13
|
+
list(filteringOptions?: ListUserOptions): Promise<PaginatedEntriesResponse<User>>;
|
|
14
14
|
delete(userId: string): Promise<null>;
|
|
15
15
|
bulkDelete(userIds: string[]): Promise<BulkOperation>;
|
|
16
16
|
merge(toUserId: string, fromUserId: string): Promise<User>;
|
|
17
|
-
getFeed(userId: string, channelId: string, feedOptions?: UserFeedOptions): Promise<
|
|
17
|
+
getFeed(userId: string, channelId: string, feedOptions?: UserFeedOptions): Promise<PaginatedEntriesResponse<any>>;
|
|
18
18
|
getAllPreferences(userId: string): Promise<any>;
|
|
19
19
|
/**
|
|
20
20
|
* @deprecated Use `users.getPreferences` instead
|
|
@@ -32,5 +32,5 @@ export declare class Users {
|
|
|
32
32
|
getChannelData<T = CommonMetadata>(userId: string, channelId: string): Promise<ChannelData<T>>;
|
|
33
33
|
setChannelData<T = CommonMetadata>(userId: string, channelId: string, channelData: Record<string, any>): Promise<ChannelData<T>>;
|
|
34
34
|
unsetChannelData(userId: string, channelId: string): Promise<any>;
|
|
35
|
-
getMessages(userId: string, filteringOptions?: ListMessagesOptions): Promise<
|
|
35
|
+
getMessages(userId: string, filteringOptions?: ListMessagesOptions): Promise<PaginatedItemsResponse<Message>>;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knocklabs/node",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.17",
|
|
4
4
|
"description": "Library for interacting with the Knock API",
|
|
5
5
|
"homepage": "https://github.com/knocklabs/knock-node",
|
|
6
6
|
"author": "@knocklabs",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/jest": "26.0.23",
|
|
35
|
+
"@types/jsonwebtoken": "^9.0.1",
|
|
35
36
|
"@types/node": "^15.0.1",
|
|
36
37
|
"@types/pluralize": "0.0.29",
|
|
37
38
|
"axios-mock-adapter": "1.19.0",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"typescript": "4.2.4"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"axios": "^0.21.1"
|
|
47
|
+
"axios": "^0.21.1",
|
|
48
|
+
"jsonwebtoken": "^9.0.0"
|
|
47
49
|
}
|
|
48
50
|
}
|