loop-client 0.0.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/CHANGELOG.md +0 -0
- package/README.md +3 -0
- package/build/const.d.ts +31 -0
- package/build/const.d.ts.map +1 -0
- package/build/const.js +40 -0
- package/build/const.js.map +1 -0
- package/build/errors.d.ts +621 -0
- package/build/errors.d.ts.map +1 -0
- package/build/errors.js +665 -0
- package/build/errors.js.map +1 -0
- package/build/index.d.ts +6 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +27 -0
- package/build/index.js.map +1 -0
- package/build/instrument.d.ts +14 -0
- package/build/instrument.d.ts.map +1 -0
- package/build/instrument.js +75 -0
- package/build/instrument.js.map +1 -0
- package/build/logger.d.ts +6 -0
- package/build/logger.d.ts.map +1 -0
- package/build/logger.js +24 -0
- package/build/logger.js.map +1 -0
- package/build/methods.d.ts +1101 -0
- package/build/methods.d.ts.map +1 -0
- package/build/methods.js +2080 -0
- package/build/methods.js.map +1 -0
- package/build/types/admin.d.ts +56 -0
- package/build/types/admin.d.ts.map +1 -0
- package/build/types/admin.js +18 -0
- package/build/types/admin.js.map +1 -0
- package/build/types/apps.d.ts +214 -0
- package/build/types/apps.d.ts.map +1 -0
- package/build/types/apps.js +81 -0
- package/build/types/apps.js.map +1 -0
- package/build/types/audits.d.ts +10 -0
- package/build/types/audits.d.ts.map +1 -0
- package/build/types/audits.js +3 -0
- package/build/types/audits.js.map +1 -0
- package/build/types/autocomplete.d.ts +13 -0
- package/build/types/autocomplete.d.ts.map +1 -0
- package/build/types/autocomplete.js +3 -0
- package/build/types/autocomplete.js.map +1 -0
- package/build/types/boards.d.ts +57 -0
- package/build/types/boards.d.ts.map +1 -0
- package/build/types/boards.js +28 -0
- package/build/types/boards.js.map +1 -0
- package/build/types/bots.d.ts +16 -0
- package/build/types/bots.d.ts.map +1 -0
- package/build/types/bots.js +3 -0
- package/build/types/bots.js.map +1 -0
- package/build/types/channels.d.ts +279 -0
- package/build/types/channels.d.ts.map +1 -0
- package/build/types/channels.js +62 -0
- package/build/types/channels.js.map +1 -0
- package/build/types/cloud.d.ts +155 -0
- package/build/types/cloud.d.ts.map +1 -0
- package/build/types/cloud.js +12 -0
- package/build/types/cloud.js.map +1 -0
- package/build/types/common.d.ts +5 -0
- package/build/types/common.d.ts.map +1 -0
- package/build/types/common.js +3 -0
- package/build/types/common.js.map +1 -0
- package/build/types/compliance.d.ts +14 -0
- package/build/types/compliance.d.ts.map +1 -0
- package/build/types/compliance.js +3 -0
- package/build/types/compliance.js.map +1 -0
- package/build/types/config.d.ts +966 -0
- package/build/types/config.d.ts.map +1 -0
- package/build/types/config.js +17 -0
- package/build/types/config.js.map +1 -0
- package/build/types/data-retention.d.ts +31 -0
- package/build/types/data-retention.d.ts.map +1 -0
- package/build/types/data-retention.js +3 -0
- package/build/types/data-retention.js.map +1 -0
- package/build/types/dialog.d.ts +63 -0
- package/build/types/dialog.d.ts.map +1 -0
- package/build/types/dialog.js +26 -0
- package/build/types/dialog.js.map +1 -0
- package/build/types/drafts.d.ts +15 -0
- package/build/types/drafts.d.ts.map +1 -0
- package/build/types/drafts.js +3 -0
- package/build/types/drafts.js.map +1 -0
- package/build/types/emojis.d.ts +52 -0
- package/build/types/emojis.d.ts.map +1 -0
- package/build/types/emojis.js +19 -0
- package/build/types/emojis.js.map +1 -0
- package/build/types/files.d.ts +53 -0
- package/build/types/files.d.ts.map +1 -0
- package/build/types/files.js +3 -0
- package/build/types/files.js.map +1 -0
- package/build/types/groups.d.ts +143 -0
- package/build/types/groups.d.ts.map +1 -0
- package/build/types/groups.js +14 -0
- package/build/types/groups.js.map +1 -0
- package/build/types/index.d.ts +46 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/index.js +62 -0
- package/build/types/index.js.map +1 -0
- package/build/types/integrations.d.ts +108 -0
- package/build/types/integrations.d.ts.map +1 -0
- package/build/types/integrations.js +15 -0
- package/build/types/integrations.js.map +1 -0
- package/build/types/jobs.d.ts +28 -0
- package/build/types/jobs.d.ts.map +1 -0
- package/build/types/jobs.js +22 -0
- package/build/types/jobs.js.map +1 -0
- package/build/types/limits.d.ts +5 -0
- package/build/types/limits.d.ts.map +1 -0
- package/build/types/limits.js +3 -0
- package/build/types/limits.js.map +1 -0
- package/build/types/marketplace.d.ts +43 -0
- package/build/types/marketplace.d.ts.map +1 -0
- package/build/types/marketplace.js +21 -0
- package/build/types/marketplace.js.map +1 -0
- package/build/types/metadata.d.ts +16 -0
- package/build/types/metadata.d.ts.map +1 -0
- package/build/types/metadata.js +3 -0
- package/build/types/metadata.js.map +1 -0
- package/build/types/methods/bots.methods.d.ts +77 -0
- package/build/types/methods/bots.methods.d.ts.map +1 -0
- package/build/types/methods/bots.methods.js +3 -0
- package/build/types/methods/bots.methods.js.map +1 -0
- package/build/types/methods/brand.methods.d.ts +15 -0
- package/build/types/methods/brand.methods.d.ts.map +1 -0
- package/build/types/methods/brand.methods.js +3 -0
- package/build/types/methods/brand.methods.js.map +1 -0
- package/build/types/methods/channels.methods.d.ts +473 -0
- package/build/types/methods/channels.methods.d.ts.map +1 -0
- package/build/types/methods/channels.methods.js +3 -0
- package/build/types/methods/channels.methods.js.map +1 -0
- package/build/types/methods/cloud.methods.d.ts +14 -0
- package/build/types/methods/cloud.methods.d.ts.map +1 -0
- package/build/types/methods/cloud.methods.js +3 -0
- package/build/types/methods/cloud.methods.js.map +1 -0
- package/build/types/methods/common.methods.d.ts +87 -0
- package/build/types/methods/common.methods.d.ts.map +1 -0
- package/build/types/methods/common.methods.js +4 -0
- package/build/types/methods/common.methods.js.map +1 -0
- package/build/types/methods/compliance.methods.d.ts +32 -0
- package/build/types/methods/compliance.methods.d.ts.map +1 -0
- package/build/types/methods/compliance.methods.js +3 -0
- package/build/types/methods/compliance.methods.js.map +1 -0
- package/build/types/methods/data-retention.methods.d.ts +67 -0
- package/build/types/methods/data-retention.methods.d.ts.map +1 -0
- package/build/types/methods/data-retention.methods.js +3 -0
- package/build/types/methods/data-retention.methods.js.map +1 -0
- package/build/types/methods/emojis.methods.d.ts +32 -0
- package/build/types/methods/emojis.methods.d.ts.map +1 -0
- package/build/types/methods/emojis.methods.js +3 -0
- package/build/types/methods/emojis.methods.js.map +1 -0
- package/build/types/methods/files.methods.d.ts +139 -0
- package/build/types/methods/files.methods.d.ts.map +1 -0
- package/build/types/methods/files.methods.js +3 -0
- package/build/types/methods/files.methods.js.map +1 -0
- package/build/types/methods/groups.methods.d.ts +113 -0
- package/build/types/methods/groups.methods.d.ts.map +1 -0
- package/build/types/methods/groups.methods.js +3 -0
- package/build/types/methods/groups.methods.js.map +1 -0
- package/build/types/methods/index.d.ts +28 -0
- package/build/types/methods/index.d.ts.map +1 -0
- package/build/types/methods/index.js +44 -0
- package/build/types/methods/index.js.map +1 -0
- package/build/types/methods/integrations.methods.d.ts +191 -0
- package/build/types/methods/integrations.methods.d.ts.map +1 -0
- package/build/types/methods/integrations.methods.js +3 -0
- package/build/types/methods/integrations.methods.js.map +1 -0
- package/build/types/methods/interactive.methods.d.ts +38 -0
- package/build/types/methods/interactive.methods.d.ts.map +1 -0
- package/build/types/methods/interactive.methods.js +3 -0
- package/build/types/methods/interactive.methods.js.map +1 -0
- package/build/types/methods/jobs.methods.d.ts +20 -0
- package/build/types/methods/jobs.methods.d.ts.map +1 -0
- package/build/types/methods/jobs.methods.js +3 -0
- package/build/types/methods/jobs.methods.js.map +1 -0
- package/build/types/methods/playbook-runs.methods.d.ts +89 -0
- package/build/types/methods/playbook-runs.methods.d.ts.map +1 -0
- package/build/types/methods/playbook-runs.methods.js +3 -0
- package/build/types/methods/playbook-runs.methods.js.map +1 -0
- package/build/types/methods/playbooks.methods.d.ts +156 -0
- package/build/types/methods/playbooks.methods.d.ts.map +1 -0
- package/build/types/methods/playbooks.methods.js +3 -0
- package/build/types/methods/playbooks.methods.js.map +1 -0
- package/build/types/methods/plugins.methods.d.ts +31 -0
- package/build/types/methods/plugins.methods.d.ts.map +1 -0
- package/build/types/methods/plugins.methods.js +3 -0
- package/build/types/methods/plugins.methods.js.map +1 -0
- package/build/types/methods/posts.methods.d.ts +216 -0
- package/build/types/methods/posts.methods.d.ts.map +1 -0
- package/build/types/methods/posts.methods.js +3 -0
- package/build/types/methods/posts.methods.js.map +1 -0
- package/build/types/methods/preferences.methods.d.ts +12 -0
- package/build/types/methods/preferences.methods.d.ts.map +1 -0
- package/build/types/methods/preferences.methods.js +3 -0
- package/build/types/methods/preferences.methods.js.map +1 -0
- package/build/types/methods/reactions.methods.d.ts +15 -0
- package/build/types/methods/reactions.methods.d.ts.map +1 -0
- package/build/types/methods/reactions.methods.js +3 -0
- package/build/types/methods/reactions.methods.js.map +1 -0
- package/build/types/methods/reports.methods.d.ts +4 -0
- package/build/types/methods/reports.methods.d.ts.map +1 -0
- package/build/types/methods/reports.methods.js +3 -0
- package/build/types/methods/reports.methods.js.map +1 -0
- package/build/types/methods/roles.methods.d.ts +14 -0
- package/build/types/methods/roles.methods.d.ts.map +1 -0
- package/build/types/methods/roles.methods.js +3 -0
- package/build/types/methods/roles.methods.js.map +1 -0
- package/build/types/methods/schemes.methods.d.ts +30 -0
- package/build/types/methods/schemes.methods.d.ts.map +1 -0
- package/build/types/methods/schemes.methods.js +3 -0
- package/build/types/methods/schemes.methods.js.map +1 -0
- package/build/types/methods/system.methods.d.ts +107 -0
- package/build/types/methods/system.methods.d.ts.map +1 -0
- package/build/types/methods/system.methods.js +3 -0
- package/build/types/methods/system.methods.js.map +1 -0
- package/build/types/methods/teams.methods.d.ts +161 -0
- package/build/types/methods/teams.methods.d.ts.map +1 -0
- package/build/types/methods/teams.methods.js +3 -0
- package/build/types/methods/teams.methods.js.map +1 -0
- package/build/types/methods/terms-of-service.methods.d.ts +24 -0
- package/build/types/methods/terms-of-service.methods.d.ts.map +1 -0
- package/build/types/methods/terms-of-service.methods.js +3 -0
- package/build/types/methods/terms-of-service.methods.js.map +1 -0
- package/build/types/methods/uploads.methods.d.ts +13 -0
- package/build/types/methods/uploads.methods.d.ts.map +1 -0
- package/build/types/methods/uploads.methods.js +3 -0
- package/build/types/methods/uploads.methods.js.map +1 -0
- package/build/types/methods/users.methods.d.ts +257 -0
- package/build/types/methods/users.methods.d.ts.map +1 -0
- package/build/types/methods/users.methods.js +3 -0
- package/build/types/methods/users.methods.js.map +1 -0
- package/build/types/mfa.d.ts +5 -0
- package/build/types/mfa.d.ts.map +1 -0
- package/build/types/mfa.js +3 -0
- package/build/types/mfa.js.map +1 -0
- package/build/types/playbooks.d.ts +221 -0
- package/build/types/playbooks.d.ts.map +1 -0
- package/build/types/playbooks.js +3 -0
- package/build/types/playbooks.js.map +1 -0
- package/build/types/plugins.d.ts +101 -0
- package/build/types/plugins.d.ts.map +1 -0
- package/build/types/plugins.js +3 -0
- package/build/types/plugins.js.map +1 -0
- package/build/types/posts.d.ts +290 -0
- package/build/types/posts.d.ts.map +1 -0
- package/build/types/posts.js +88 -0
- package/build/types/posts.js.map +1 -0
- package/build/types/preferences.d.ts +7 -0
- package/build/types/preferences.d.ts.map +1 -0
- package/build/types/preferences.js +3 -0
- package/build/types/preferences.js.map +1 -0
- package/build/types/product-notices.d.ts +27 -0
- package/build/types/product-notices.d.ts.map +1 -0
- package/build/types/product-notices.js +8 -0
- package/build/types/product-notices.js.map +1 -0
- package/build/types/products.d.ts +8 -0
- package/build/types/products.d.ts.map +1 -0
- package/build/types/products.js +3 -0
- package/build/types/products.js.map +1 -0
- package/build/types/reactions.d.ts +7 -0
- package/build/types/reactions.d.ts.map +1 -0
- package/build/types/reactions.js +3 -0
- package/build/types/reactions.js.map +1 -0
- package/build/types/reports.d.ts +66 -0
- package/build/types/reports.d.ts.map +1 -0
- package/build/types/reports.js +30 -0
- package/build/types/reports.js.map +1 -0
- package/build/types/requests.d.ts +61 -0
- package/build/types/requests.d.ts.map +1 -0
- package/build/types/requests.js +12 -0
- package/build/types/requests.js.map +1 -0
- package/build/types/responses/common.responses.d.ts +23 -0
- package/build/types/responses/common.responses.d.ts.map +1 -0
- package/build/types/responses/common.responses.js +3 -0
- package/build/types/responses/common.responses.js.map +1 -0
- package/build/types/responses/index.d.ts +5 -0
- package/build/types/responses/index.d.ts.map +1 -0
- package/build/types/responses/index.js +21 -0
- package/build/types/responses/index.js.map +1 -0
- package/build/types/responses/playbooks.responses.d.ts +19 -0
- package/build/types/responses/playbooks.responses.d.ts.map +1 -0
- package/build/types/responses/playbooks.responses.js +3 -0
- package/build/types/responses/playbooks.responses.js.map +1 -0
- package/build/types/responses/posts.responses.d.ts +32 -0
- package/build/types/responses/posts.responses.d.ts.map +1 -0
- package/build/types/responses/posts.responses.js +8 -0
- package/build/types/responses/posts.responses.js.map +1 -0
- package/build/types/responses/system.responses.d.ts +87 -0
- package/build/types/responses/system.responses.d.ts.map +1 -0
- package/build/types/responses/system.responses.js +3 -0
- package/build/types/responses/system.responses.js.map +1 -0
- package/build/types/roles.d.ts +41 -0
- package/build/types/roles.d.ts.map +1 -0
- package/build/types/roles.js +33 -0
- package/build/types/roles.js.map +1 -0
- package/build/types/saml.d.ts +11 -0
- package/build/types/saml.d.ts.map +1 -0
- package/build/types/saml.js +3 -0
- package/build/types/saml.js.map +1 -0
- package/build/types/schemes.d.ts +28 -0
- package/build/types/schemes.d.ts.map +1 -0
- package/build/types/schemes.js +9 -0
- package/build/types/schemes.js.map +1 -0
- package/build/types/search.d.ts +13 -0
- package/build/types/search.d.ts.map +1 -0
- package/build/types/search.js +3 -0
- package/build/types/search.js.map +1 -0
- package/build/types/setup.d.ts +5 -0
- package/build/types/setup.d.ts.map +1 -0
- package/build/types/setup.js +3 -0
- package/build/types/setup.js.map +1 -0
- package/build/types/state.d.ts +464 -0
- package/build/types/state.d.ts.map +1 -0
- package/build/types/state.js +3 -0
- package/build/types/state.js.map +1 -0
- package/build/types/store.d.ts +65 -0
- package/build/types/store.d.ts.map +1 -0
- package/build/types/store.js +3 -0
- package/build/types/store.js.map +1 -0
- package/build/types/teams.d.ts +94 -0
- package/build/types/teams.d.ts.map +1 -0
- package/build/types/teams.js +9 -0
- package/build/types/teams.js.map +1 -0
- package/build/types/terms-of-service.d.ts +7 -0
- package/build/types/terms-of-service.d.ts.map +1 -0
- package/build/types/terms-of-service.js +3 -0
- package/build/types/terms-of-service.js.map +1 -0
- package/build/types/threads.d.ts +40 -0
- package/build/types/threads.d.ts.map +1 -0
- package/build/types/threads.js +8 -0
- package/build/types/threads.js.map +1 -0
- package/build/types/typing.d.ts +6 -0
- package/build/types/typing.d.ts.map +1 -0
- package/build/types/typing.js +3 -0
- package/build/types/typing.js.map +1 -0
- package/build/types/users.d.ts +281 -0
- package/build/types/users.d.ts.map +1 -0
- package/build/types/users.js +42 -0
- package/build/types/users.js.map +1 -0
- package/build/types/web-client.d.ts +82 -0
- package/build/types/web-client.d.ts.map +1 -0
- package/build/types/web-client.js +17 -0
- package/build/types/web-client.js.map +1 -0
- package/build/utils.d.ts +24 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +136 -0
- package/build/utils.js.map +1 -0
- package/build/web-client.d.ts +117 -0
- package/build/web-client.d.ts.map +1 -0
- package/build/web-client.js +421 -0
- package/build/web-client.js.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeamType = void 0;
|
|
4
|
+
var TeamType;
|
|
5
|
+
(function (TeamType) {
|
|
6
|
+
TeamType["O"] = "O";
|
|
7
|
+
TeamType["I"] = "I";
|
|
8
|
+
})(TeamType || (exports.TeamType = TeamType = {}));
|
|
9
|
+
//# sourceMappingURL=teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams.js","sourceRoot":"","sources":["../../src/types/teams.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAGX;AAHD,WAAY,QAAQ;IACnB,mBAAO,CAAA;IACP,mBAAO,CAAA;AACR,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms-of-service.d.ts","sourceRoot":"","sources":["../../src/types/terms-of-service.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms-of-service.js","sourceRoot":"","sources":["../../src/types/terms-of-service.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Channel } from "./channels";
|
|
2
|
+
import type { Post } from "./posts";
|
|
3
|
+
import type { UserProfile } from "./users";
|
|
4
|
+
type SyntheticMissingKeys = "unread_replies" | "unread_mentions" | "last_viewed_at";
|
|
5
|
+
export declare enum UserThreadType {
|
|
6
|
+
Synthetic = "S"
|
|
7
|
+
}
|
|
8
|
+
export type UserThread = {
|
|
9
|
+
id: string;
|
|
10
|
+
reply_count: number;
|
|
11
|
+
last_reply_at: number;
|
|
12
|
+
last_viewed_at: number;
|
|
13
|
+
participants: Array<{
|
|
14
|
+
id: UserProfile["id"];
|
|
15
|
+
} | UserProfile>;
|
|
16
|
+
unread_replies: number;
|
|
17
|
+
unread_mentions: number;
|
|
18
|
+
is_following: boolean;
|
|
19
|
+
is_urgent?: boolean;
|
|
20
|
+
type?: UserThreadType;
|
|
21
|
+
post: {
|
|
22
|
+
channel_id: Channel["id"];
|
|
23
|
+
user_id: UserProfile["id"];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type UserThreadSynthetic = Omit<UserThread, SyntheticMissingKeys> & {
|
|
27
|
+
type: UserThreadType.Synthetic;
|
|
28
|
+
};
|
|
29
|
+
export type UserThreadWithPost = UserThread & {
|
|
30
|
+
post: Post;
|
|
31
|
+
};
|
|
32
|
+
export type UserThreadList = {
|
|
33
|
+
total: number;
|
|
34
|
+
total_unread_threads: number;
|
|
35
|
+
total_unread_mentions: number;
|
|
36
|
+
total_unread_urgent_mentions?: number;
|
|
37
|
+
threads: UserThreadWithPost[];
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=threads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../src/types/threads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,KAAK,oBAAoB,GACtB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,CAAC;AAEpB,oBAAY,cAAc;IACzB,SAAS,MAAM;CACf;AAED,MAAM,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CAAA;KAAE,GAAG,WAAW,CAAC,CAAC;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE;QACL,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KAC3B,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,oBAAoB,CAAC,GAAG;IAC1E,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserThreadType = void 0;
|
|
4
|
+
var UserThreadType;
|
|
5
|
+
(function (UserThreadType) {
|
|
6
|
+
UserThreadType["Synthetic"] = "S"; // derived from post
|
|
7
|
+
})(UserThreadType || (exports.UserThreadType = UserThreadType = {}));
|
|
8
|
+
//# sourceMappingURL=threads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../src/types/threads.ts"],"names":[],"mappings":";;;AASA,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,iCAAe,CAAA,CAAC,oBAAoB;AACrC,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../src/types/typing.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACpB,CAAC,CAAC,EAAE,MAAM,GAAG;QACZ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACpB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typing.js","sourceRoot":"","sources":["../../src/types/typing.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import type { TeamMembership } from "./teams";
|
|
2
|
+
/**
|
|
3
|
+
* ===============================================
|
|
4
|
+
* @description Users UserProfile object
|
|
5
|
+
* ===============================================
|
|
6
|
+
*/
|
|
7
|
+
export interface UserProfile {
|
|
8
|
+
id: string;
|
|
9
|
+
/** @default "" */
|
|
10
|
+
username: string | "";
|
|
11
|
+
/** @default "" */
|
|
12
|
+
auth_data: string | "";
|
|
13
|
+
/** @default "" */
|
|
14
|
+
auth_service: string | "";
|
|
15
|
+
email: string;
|
|
16
|
+
/** @version Loop only */
|
|
17
|
+
email_verified?: boolean;
|
|
18
|
+
/** @default "" */
|
|
19
|
+
nickname: string;
|
|
20
|
+
/** @default "" */
|
|
21
|
+
first_name: string;
|
|
22
|
+
/** @default "" */
|
|
23
|
+
last_name: string;
|
|
24
|
+
/** @default "" */
|
|
25
|
+
position: string;
|
|
26
|
+
/** @description excluded from responses */
|
|
27
|
+
password?: string;
|
|
28
|
+
/**
|
|
29
|
+
* @description Creation date unix timestamp
|
|
30
|
+
*/
|
|
31
|
+
create_at: number;
|
|
32
|
+
/**
|
|
33
|
+
* @description Update date unix timestamp
|
|
34
|
+
*/
|
|
35
|
+
update_at: number;
|
|
36
|
+
/**
|
|
37
|
+
* @description Deletion date unix timestamp
|
|
38
|
+
* Will be zero if user is active
|
|
39
|
+
*
|
|
40
|
+
* @default 0
|
|
41
|
+
*/
|
|
42
|
+
delete_at?: number | 0;
|
|
43
|
+
/**
|
|
44
|
+
* @description User roles in string format
|
|
45
|
+
*
|
|
46
|
+
* @example "system_admin system_user"
|
|
47
|
+
*/
|
|
48
|
+
roles: string;
|
|
49
|
+
/**
|
|
50
|
+
* @description User profile props
|
|
51
|
+
|
|
52
|
+
* @todo verify possible props
|
|
53
|
+
*/
|
|
54
|
+
props?: {
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
/**
|
|
57
|
+
* @description User custom status in stringified format
|
|
58
|
+
* @see UserCustomStatus
|
|
59
|
+
*/
|
|
60
|
+
customStatus?: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @description Notification settings
|
|
64
|
+
*/
|
|
65
|
+
notify_props: NotifyProps;
|
|
66
|
+
/**
|
|
67
|
+
* @description Last password update timestamp
|
|
68
|
+
*/
|
|
69
|
+
last_password_update?: number;
|
|
70
|
+
/**
|
|
71
|
+
* @description Will be undefined if no picture was set
|
|
72
|
+
*/
|
|
73
|
+
last_picture_update?: number;
|
|
74
|
+
/**
|
|
75
|
+
* @version Loop @default 'ru'
|
|
76
|
+
* @version Mattermost @default 'en'
|
|
77
|
+
*/
|
|
78
|
+
locale: string;
|
|
79
|
+
timezone?: UserTimezone;
|
|
80
|
+
/** @default "" */
|
|
81
|
+
remote_id?: string | "";
|
|
82
|
+
/** @version Loop only */
|
|
83
|
+
disable_welcome_email?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated
|
|
86
|
+
* @version Mattermost only
|
|
87
|
+
* @todo verify
|
|
88
|
+
*/ status?: string;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated
|
|
91
|
+
* @version Mattermost only
|
|
92
|
+
*/ mfa_active?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated
|
|
95
|
+
* @version Mattermost only
|
|
96
|
+
*/ last_activity_at?: number;
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated
|
|
99
|
+
* @version Mattermost only
|
|
100
|
+
*/ is_bot?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated
|
|
103
|
+
* @version Mattermost only
|
|
104
|
+
*/ bot_description?: string;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated
|
|
107
|
+
* @version Mattermost only
|
|
108
|
+
*/ terms_of_service_id?: string;
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated
|
|
111
|
+
* @version Mattermost only
|
|
112
|
+
*/ terms_of_service_create_at?: number;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* ===============================================
|
|
116
|
+
* @description Users enums
|
|
117
|
+
* ===============================================
|
|
118
|
+
*/
|
|
119
|
+
export declare enum UserNotify {
|
|
120
|
+
DEFAULT = "default",
|
|
121
|
+
ALL = "all",
|
|
122
|
+
MENTION = "mention",
|
|
123
|
+
NONE = "none"
|
|
124
|
+
}
|
|
125
|
+
export declare enum UserCallSound {
|
|
126
|
+
DYNAMIC = "Dynamic",
|
|
127
|
+
CALM = "Calm",
|
|
128
|
+
URGENT = "Urgent",
|
|
129
|
+
CHEERFUL = "Cheerful",
|
|
130
|
+
NULL = ""
|
|
131
|
+
}
|
|
132
|
+
export declare enum UserStatusValue {
|
|
133
|
+
ONLINE = "online",
|
|
134
|
+
AWAY = "away",
|
|
135
|
+
OFFLINE = "offline",
|
|
136
|
+
DND = "dnd"
|
|
137
|
+
}
|
|
138
|
+
export declare enum CustomStatusDuration {
|
|
139
|
+
DONT_CLEAR = "",
|
|
140
|
+
THIRTY_MINUTES = "thirty_minutes",
|
|
141
|
+
ONE_HOUR = "one_hour",
|
|
142
|
+
FOUR_HOURS = "four_hours",
|
|
143
|
+
TODAY = "today",
|
|
144
|
+
THIS_WEEK = "this_week",
|
|
145
|
+
DATE_AND_TIME = "date_and_time",
|
|
146
|
+
CUSTOM_DATE_TIME = "custom_date_time"
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* ===============================================
|
|
150
|
+
* @description User notification props
|
|
151
|
+
* ===============================================
|
|
152
|
+
*/
|
|
153
|
+
export interface NotifyProps {
|
|
154
|
+
channel: "true" | "false";
|
|
155
|
+
comments: "never" | "root" | "any";
|
|
156
|
+
desktop: UserNotify;
|
|
157
|
+
desktop_sound: "true" | "false";
|
|
158
|
+
desktop_threads?: UserNotify;
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated
|
|
161
|
+
* @version Mattermost only
|
|
162
|
+
* @todo verify
|
|
163
|
+
*/
|
|
164
|
+
desktop_notification_sound?: "Bing" | "Crackle" | "Down" | "Hello" | "Ripple" | "Upstairs";
|
|
165
|
+
email: "true" | "false";
|
|
166
|
+
email_threads?: UserNotify;
|
|
167
|
+
first_name: "true" | "false";
|
|
168
|
+
/** @version Loop only */
|
|
169
|
+
loop_mobile_push_reactions?: UserNotify;
|
|
170
|
+
/** @version Loop only */
|
|
171
|
+
loop_mobile_push_reactions_sound?: "true" | "false";
|
|
172
|
+
/** @version Loop only */
|
|
173
|
+
loop_push_reactions?: UserNotify;
|
|
174
|
+
/** @version Loop only */
|
|
175
|
+
loop_push_reactions_sound?: "true" | "false";
|
|
176
|
+
mention_keys: string;
|
|
177
|
+
push: UserNotify;
|
|
178
|
+
push_status: "ooo" | "offline" | "away" | "dnd" | "online";
|
|
179
|
+
push_threads?: UserNotify;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated
|
|
182
|
+
* @version Mattermost only
|
|
183
|
+
* @todo verify
|
|
184
|
+
*/
|
|
185
|
+
auto_responder_active?: "true" | "false";
|
|
186
|
+
/**
|
|
187
|
+
* @deprecated
|
|
188
|
+
* @version Mattermost only
|
|
189
|
+
* @todo verify
|
|
190
|
+
*/
|
|
191
|
+
auto_responder_message?: string;
|
|
192
|
+
/**
|
|
193
|
+
* @deprecated
|
|
194
|
+
* @version Mattermost only
|
|
195
|
+
* @todo verify
|
|
196
|
+
*/
|
|
197
|
+
calls_notification_sound?: UserCallSound;
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated
|
|
200
|
+
* @version Mattermost only
|
|
201
|
+
* @todo verify
|
|
202
|
+
*/
|
|
203
|
+
calls_desktop_sound?: "true" | "false";
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated
|
|
206
|
+
* @version Mattermost only
|
|
207
|
+
* @todo verify
|
|
208
|
+
*/
|
|
209
|
+
calls_mobile_sound?: "true" | "false" | "";
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated
|
|
212
|
+
* @version Mattermost only
|
|
213
|
+
* @todo verify
|
|
214
|
+
*/
|
|
215
|
+
calls_mobile_notification_sound?: UserCallSound;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* ===============================================
|
|
219
|
+
* @description Users other types
|
|
220
|
+
* ===============================================
|
|
221
|
+
*/
|
|
222
|
+
export interface UserProfileWithLastViewedAt extends UserProfile {
|
|
223
|
+
last_viewed_at: number;
|
|
224
|
+
}
|
|
225
|
+
export interface UserSession {
|
|
226
|
+
id: string;
|
|
227
|
+
token: string;
|
|
228
|
+
create_at: number;
|
|
229
|
+
expires_at: number;
|
|
230
|
+
last_activity_at: number;
|
|
231
|
+
user_id: string;
|
|
232
|
+
device_id: string;
|
|
233
|
+
roles: string;
|
|
234
|
+
is_oauth: boolean;
|
|
235
|
+
props: Record<string, unknown>;
|
|
236
|
+
team_members: TeamMembership[];
|
|
237
|
+
local: boolean;
|
|
238
|
+
}
|
|
239
|
+
export interface UserTimezone {
|
|
240
|
+
useAutomaticTimezone: boolean | "true" | "false";
|
|
241
|
+
automaticTimezone: string;
|
|
242
|
+
manualTimezone: string;
|
|
243
|
+
}
|
|
244
|
+
export interface UserStatus {
|
|
245
|
+
user_id: string;
|
|
246
|
+
status: UserStatusValue;
|
|
247
|
+
manual?: boolean;
|
|
248
|
+
last_activity_at?: number;
|
|
249
|
+
active_channel?: string;
|
|
250
|
+
dnd_end_time?: number;
|
|
251
|
+
}
|
|
252
|
+
export interface UserCustomStatus {
|
|
253
|
+
emoji: string;
|
|
254
|
+
text: string;
|
|
255
|
+
duration: CustomStatusDuration;
|
|
256
|
+
expires_at?: string;
|
|
257
|
+
}
|
|
258
|
+
export interface UserAccessToken {
|
|
259
|
+
id: string;
|
|
260
|
+
token?: string;
|
|
261
|
+
user_id: string;
|
|
262
|
+
description: string;
|
|
263
|
+
is_active: boolean;
|
|
264
|
+
}
|
|
265
|
+
export interface UsersStats {
|
|
266
|
+
total_users_count: number;
|
|
267
|
+
}
|
|
268
|
+
export interface GetFilteredUsersStatsOpts {
|
|
269
|
+
in_team?: string;
|
|
270
|
+
in_channel?: string;
|
|
271
|
+
include_deleted?: boolean;
|
|
272
|
+
include_bots?: boolean;
|
|
273
|
+
include_remote_users?: boolean;
|
|
274
|
+
roles?: string[];
|
|
275
|
+
channel_roles?: string[];
|
|
276
|
+
team_roles?: string[];
|
|
277
|
+
}
|
|
278
|
+
export interface AuthChangeResponse {
|
|
279
|
+
follow_link: string;
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B,EAAE,EAAE,MAAM,CAAC;IAEX,kBAAkB;IAClB,QAAQ,EAAE,MAAM,GAAG,EAAE,CAAC;IAEtB,kBAAkB;IAClB,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC;IAEvB,kBAAkB;IAClB,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEd,yBAAyB;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,kBAAkB;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IAEnB,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB,kBAAkB;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAEvB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,KAAK,CAAC,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAEvB;;;WAG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ACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomStatusDuration = exports.UserStatusValue = exports.UserCallSound = exports.UserNotify = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* ===============================================
|
|
6
|
+
* @description Users enums
|
|
7
|
+
* ===============================================
|
|
8
|
+
*/
|
|
9
|
+
var UserNotify;
|
|
10
|
+
(function (UserNotify) {
|
|
11
|
+
UserNotify["DEFAULT"] = "default";
|
|
12
|
+
UserNotify["ALL"] = "all";
|
|
13
|
+
UserNotify["MENTION"] = "mention";
|
|
14
|
+
UserNotify["NONE"] = "none";
|
|
15
|
+
})(UserNotify || (exports.UserNotify = UserNotify = {}));
|
|
16
|
+
var UserCallSound;
|
|
17
|
+
(function (UserCallSound) {
|
|
18
|
+
UserCallSound["DYNAMIC"] = "Dynamic";
|
|
19
|
+
UserCallSound["CALM"] = "Calm";
|
|
20
|
+
UserCallSound["URGENT"] = "Urgent";
|
|
21
|
+
UserCallSound["CHEERFUL"] = "Cheerful";
|
|
22
|
+
UserCallSound["NULL"] = "";
|
|
23
|
+
})(UserCallSound || (exports.UserCallSound = UserCallSound = {}));
|
|
24
|
+
var UserStatusValue;
|
|
25
|
+
(function (UserStatusValue) {
|
|
26
|
+
UserStatusValue["ONLINE"] = "online";
|
|
27
|
+
UserStatusValue["AWAY"] = "away";
|
|
28
|
+
UserStatusValue["OFFLINE"] = "offline";
|
|
29
|
+
UserStatusValue["DND"] = "dnd";
|
|
30
|
+
})(UserStatusValue || (exports.UserStatusValue = UserStatusValue = {}));
|
|
31
|
+
var CustomStatusDuration;
|
|
32
|
+
(function (CustomStatusDuration) {
|
|
33
|
+
CustomStatusDuration["DONT_CLEAR"] = "";
|
|
34
|
+
CustomStatusDuration["THIRTY_MINUTES"] = "thirty_minutes";
|
|
35
|
+
CustomStatusDuration["ONE_HOUR"] = "one_hour";
|
|
36
|
+
CustomStatusDuration["FOUR_HOURS"] = "four_hours";
|
|
37
|
+
CustomStatusDuration["TODAY"] = "today";
|
|
38
|
+
CustomStatusDuration["THIS_WEEK"] = "this_week";
|
|
39
|
+
CustomStatusDuration["DATE_AND_TIME"] = "date_and_time";
|
|
40
|
+
CustomStatusDuration["CUSTOM_DATE_TIME"] = "custom_date_time";
|
|
41
|
+
})(CustomStatusDuration || (exports.CustomStatusDuration = CustomStatusDuration = {}));
|
|
42
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":";;;AAiJA;;;;GAIG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,iCAAmB,CAAA;IACnB,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,2BAAa,CAAA;AACd,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,aAMX;AAND,WAAY,aAAa;IACxB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,0BAAS,CAAA;AACV,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,8BAAW,CAAA;AACZ,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,uCAAe,CAAA;IACf,yDAAiC,CAAA;IACjC,6CAAqB,CAAA;IACrB,iDAAyB,CAAA;IACzB,uCAAe,CAAA;IACf,+CAAuB,CAAA;IACvB,uDAA+B,CAAA;IAC/B,6DAAqC,CAAA;AACtC,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Agent } from "node:http";
|
|
2
|
+
import type { SecureContextOptions } from "node:tls";
|
|
3
|
+
import type { Logger, LogLevel } from "@triple-sun/logger";
|
|
4
|
+
import type { RetryContext, RetryOptions } from "again-ts";
|
|
5
|
+
import type { AxiosAdapter, InternalAxiosRequestConfig, Method, RawAxiosRequestHeaders, RawAxiosResponseHeaders } from "axios";
|
|
6
|
+
export declare enum ContentType {
|
|
7
|
+
FormData = "multipart/form-data",
|
|
8
|
+
JSON = "application/json",
|
|
9
|
+
URLEncoded = "application/x-www-form-urlencoded"
|
|
10
|
+
}
|
|
11
|
+
export type FileUploadData = {
|
|
12
|
+
file: unknown;
|
|
13
|
+
channel_id: string;
|
|
14
|
+
filename: string;
|
|
15
|
+
};
|
|
16
|
+
export type WebApiCallConfig = {
|
|
17
|
+
/**
|
|
18
|
+
* @description http request method
|
|
19
|
+
*/
|
|
20
|
+
path: string;
|
|
21
|
+
/**
|
|
22
|
+
* @description A path for api call
|
|
23
|
+
* Params (:param) get filled from api call options
|
|
24
|
+
* @example users/:user_id
|
|
25
|
+
*/
|
|
26
|
+
method: Method;
|
|
27
|
+
/**
|
|
28
|
+
* @description Content type for options handling
|
|
29
|
+
* Sets Content-Type header
|
|
30
|
+
* FormData - creates new FormData() and fills it from options
|
|
31
|
+
* URLEncoded options get passed to request config params instead of data
|
|
32
|
+
* JSON passes options as request config data
|
|
33
|
+
*/
|
|
34
|
+
type: ContentType;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* An alias to {@link https://github.com/axios/axios/blob/v1.x/index.d.ts#L367 Axios' `InternalAxiosRequestConfig`} object,
|
|
38
|
+
* which is the main parameter type provided to Axios interceptors and adapters.
|
|
39
|
+
* */
|
|
40
|
+
export type RequestConfig = InternalAxiosRequestConfig;
|
|
41
|
+
/**
|
|
42
|
+
* An alias to {@link https://github.com/axios/axios/blob/v1.x/index.d.ts#L489 Axios' `AxiosInterceptorManager<InternalAxiosRequestConfig>` onFufilled} method,
|
|
43
|
+
* which controls the custom request interceptor logic
|
|
44
|
+
* */
|
|
45
|
+
export type RequestInterceptor = (config: RequestConfig) => RequestConfig | Promise<RequestConfig>;
|
|
46
|
+
/**
|
|
47
|
+
* An alias to {@link https://github.com/axios/axios/blob/v1.x/index.d.ts#L112 Axios' `AxiosAdapter`} interface,
|
|
48
|
+
* which is the contract required to specify an adapter
|
|
49
|
+
* */
|
|
50
|
+
export type AdapterConfig = AxiosAdapter;
|
|
51
|
+
export interface WebAPICallContext extends RetryContext {
|
|
52
|
+
errors: Error[];
|
|
53
|
+
headers?: RawAxiosResponseHeaders;
|
|
54
|
+
url: string;
|
|
55
|
+
}
|
|
56
|
+
export interface WebAPICallResult<DATA_TYPE = unknown> {
|
|
57
|
+
data: DATA_TYPE;
|
|
58
|
+
ctx?: WebAPICallContext;
|
|
59
|
+
}
|
|
60
|
+
export interface WebClientOptions {
|
|
61
|
+
readonly token?: Readonly<string>;
|
|
62
|
+
readonly logger?: Logger;
|
|
63
|
+
readonly logLevel?: LogLevel;
|
|
64
|
+
readonly maxRequestConcurrency?: number;
|
|
65
|
+
readonly retryConfig?: RetryOptions;
|
|
66
|
+
readonly agent?: Agent;
|
|
67
|
+
readonly tls?: TLSOptions;
|
|
68
|
+
readonly timeout?: number;
|
|
69
|
+
readonly headers?: RawAxiosRequestHeaders;
|
|
70
|
+
readonly requestInterceptor?: RequestInterceptor;
|
|
71
|
+
readonly adapter?: AdapterConfig;
|
|
72
|
+
readonly userID?: string | undefined;
|
|
73
|
+
readonly useCurrentUserForDirectChannels?: boolean;
|
|
74
|
+
readonly useCurrentUserForPostCreation?: boolean;
|
|
75
|
+
readonly saveFetchedUserID?: boolean;
|
|
76
|
+
readonly testConnectionOnInit?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export type TLSOptions = Pick<SecureContextOptions, "pfx" | "key" | "passphrase" | "cert" | "ca">;
|
|
79
|
+
export declare enum WebClientEvent {
|
|
80
|
+
RateLimited = "rate_limited"
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=web-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-client.d.ts","sourceRoot":"","sources":["../../src/types/web-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EACX,YAAY,EACZ,0BAA0B,EAC1B,MAAM,EACN,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,OAAO,CAAC;AAMf,oBAAY,WAAW;IACtB,QAAQ,wBAAwB;IAChC,IAAI,qBAAqB;IACzB,UAAU,sCAAsC;CAChD;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB,C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BAAkB,CAAC;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,+BAA+B,CAAC,EAAE,OAAO,CAAC;IACnD,QAAQ,CAAC,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACjD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,MAAM,UAAU,GAAG,IAAI,CAC5B,oBAAoB,EACpB,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,CAC5C,CAAC;AAEF,oBAAY,cAAc;IACzB,WAAW,iBAAiB;CAC5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebClientEvent = exports.ContentType = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Exported types
|
|
6
|
+
*/
|
|
7
|
+
var ContentType;
|
|
8
|
+
(function (ContentType) {
|
|
9
|
+
ContentType["FormData"] = "multipart/form-data";
|
|
10
|
+
ContentType["JSON"] = "application/json";
|
|
11
|
+
ContentType["URLEncoded"] = "application/x-www-form-urlencoded";
|
|
12
|
+
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
13
|
+
var WebClientEvent;
|
|
14
|
+
(function (WebClientEvent) {
|
|
15
|
+
WebClientEvent["RateLimited"] = "rate_limited";
|
|
16
|
+
})(WebClientEvent || (exports.WebClientEvent = WebClientEvent = {}));
|
|
17
|
+
//# sourceMappingURL=web-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-client.js","sourceRoot":"","sources":["../../src/types/web-client.ts"],"names":[],"mappings":";;;AAYA;;GAEG;AAEH,IAAY,WAIX;AAJD,WAAY,WAAW;IACtB,+CAAgC,CAAA;IAChC,wCAAyB,CAAA;IACzB,+DAAgD,CAAA;AACjD,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAoFD,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,8CAA4B,CAAA;AAC7B,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB"}
|
package/build/utils.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Logger } from "@triple-sun/logger";
|
|
2
|
+
import type { AxiosHeaders, InternalAxiosRequestConfig } from "axios";
|
|
3
|
+
import { type CloudCustomerAddress, type UserThread, type UserThreadSynthetic } from "./types";
|
|
4
|
+
export declare const wait: (ms: number) => Promise<unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Checks request data for binary data
|
|
7
|
+
*/
|
|
8
|
+
export declare const checkForBinaryData: (data: unknown) => boolean;
|
|
9
|
+
export declare const getFormDataConfig: (data: Record<string, unknown>, headers: AxiosHeaders) => InternalAxiosRequestConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Takes an object and redacts specific items
|
|
12
|
+
* @param data
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const redact: (data: unknown) => string;
|
|
16
|
+
/**
|
|
17
|
+
* @param path api method being called
|
|
18
|
+
* @param logger instance of we clients logger
|
|
19
|
+
* @param options arguments for the Web API method
|
|
20
|
+
*/
|
|
21
|
+
export declare const warnIfFallbackIsMissing: (path: string, logger: Logger, options?: Record<string, unknown> | unknown[]) => void;
|
|
22
|
+
export declare const areShippingDetailsValid: (address: CloudCustomerAddress | null | undefined) => boolean;
|
|
23
|
+
export declare const threadIsSynthetic: (thread: UserThread | UserThreadSynthetic) => thread is UserThreadSynthetic;
|
|
24
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAItE,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,mBAAmB,EAExB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,IAAI,GAAI,IAAI,MAAM,qBAE9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,OAAO,KAAG,OAQlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC7B,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,SAAS,YAAY,KACnB,0BAyCF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,MAAM,OAAO,KAAG,MA0CtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GACnC,MAAM,MAAM,EACZ,QAAQ,MAAM,EACd,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,KAC3C,IAcF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GACnC,SAAS,oBAAoB,GAAG,IAAI,GAAG,SAAS,KAC9C,OAUF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC7B,QAAQ,UAAU,GAAG,mBAAmB,KACtC,MAAM,IAAI,mBAA+D,CAAC"}
|