intercom-client 3.1.4 → 3.2.0
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 +72 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/admin/admin.types.d.ts +0 -15
- package/dist/admin/admin.types.d.ts.map +0 -1
- package/dist/admin/admin.types.js +0 -3
- package/dist/admin/admin.types.js.map +0 -1
- package/dist/admin.d.ts +0 -48
- package/dist/admin.d.ts.map +0 -1
- package/dist/admin.js +0 -42
- package/dist/admin.js.map +0 -1
- package/dist/article/article.types.d.ts +0 -87
- package/dist/article/article.types.d.ts.map +0 -1
- package/dist/article/article.types.js +0 -45
- package/dist/article/article.types.js.map +0 -1
- package/dist/article.d.ts +0 -34
- package/dist/article.d.ts.map +0 -1
- package/dist/article.js +0 -69
- package/dist/article.js.map +0 -1
- package/dist/client.d.ts +0 -76
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -319
- package/dist/client.js.map +0 -1
- package/dist/common/common.types.d.ts +0 -69
- package/dist/common/common.types.d.ts.map +0 -1
- package/dist/common/common.types.js +0 -29
- package/dist/common/common.types.js.map +0 -1
- package/dist/company/company.types.d.ts +0 -37
- package/dist/company/company.types.d.ts.map +0 -1
- package/dist/company/company.types.js +0 -3
- package/dist/company/company.types.js.map +0 -1
- package/dist/company.d.ts +0 -63
- package/dist/company.d.ts.map +0 -1
- package/dist/company.js +0 -114
- package/dist/company.js.map +0 -1
- package/dist/contact/contact.types.d.ts +0 -80
- package/dist/contact/contact.types.d.ts.map +0 -1
- package/dist/contact/contact.types.js +0 -3
- package/dist/contact/contact.types.js.map +0 -1
- package/dist/contact.d.ts +0 -120
- package/dist/contact.d.ts.map +0 -1
- package/dist/contact.js +0 -158
- package/dist/contact.js.map +0 -1
- package/dist/conversation/conversation.types.d.ts +0 -144
- package/dist/conversation/conversation.types.d.ts.map +0 -1
- package/dist/conversation/conversation.types.js +0 -50
- package/dist/conversation/conversation.types.js.map +0 -1
- package/dist/conversation.d.ts +0 -178
- package/dist/conversation.d.ts.map +0 -1
- package/dist/conversation.js +0 -289
- package/dist/conversation.js.map +0 -1
- package/dist/count/count.types.d.ts +0 -89
- package/dist/count/count.types.d.ts.map +0 -1
- package/dist/count/count.types.js +0 -17
- package/dist/count/count.types.js.map +0 -1
- package/dist/count.d.ts +0 -18
- package/dist/count.d.ts.map +0 -1
- package/dist/count.js +0 -72
- package/dist/count.js.map +0 -1
- package/dist/dataAttribute/dataAttribute.types.d.ts +0 -32
- package/dist/dataAttribute/dataAttribute.types.d.ts.map +0 -1
- package/dist/dataAttribute/dataAttribute.types.js +0 -18
- package/dist/dataAttribute/dataAttribute.types.js.map +0 -1
- package/dist/dataAttribute.d.ts +0 -33
- package/dist/dataAttribute.d.ts.map +0 -1
- package/dist/dataAttribute.js +0 -49
- package/dist/dataAttribute.js.map +0 -1
- package/dist/errors/badResponse.error.d.ts +0 -9
- package/dist/errors/badResponse.error.d.ts.map +0 -1
- package/dist/errors/badResponse.error.js +0 -35
- package/dist/errors/badResponse.error.js.map +0 -1
- package/dist/event/event.types.d.ts +0 -29
- package/dist/event/event.types.d.ts.map +0 -1
- package/dist/event/event.types.js +0 -3
- package/dist/event/event.types.js.map +0 -1
- package/dist/event.d.ts +0 -41
- package/dist/event.d.ts.map +0 -1
- package/dist/event.js +0 -44
- package/dist/event.js.map +0 -1
- package/dist/helpCenter/helpCenter.types.d.ts +0 -23
- package/dist/helpCenter/helpCenter.types.d.ts.map +0 -1
- package/dist/helpCenter/helpCenter.types.js +0 -3
- package/dist/helpCenter/helpCenter.types.js.map +0 -1
- package/dist/helpCenter.d.ts +0 -58
- package/dist/helpCenter.d.ts.map +0 -1
- package/dist/helpCenter.js +0 -121
- package/dist/helpCenter.js.map +0 -1
- package/dist/index.d.ts +0 -29
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -74
- package/dist/index.js.map +0 -1
- package/dist/message/message.types.d.ts +0 -17
- package/dist/message/message.types.d.ts.map +0 -1
- package/dist/message/message.types.js +0 -11
- package/dist/message/message.types.js.map +0 -1
- package/dist/message.d.ts +0 -30
- package/dist/message.d.ts.map +0 -1
- package/dist/message.js +0 -34
- package/dist/message.js.map +0 -1
- package/dist/note/note.types.d.ts +0 -13
- package/dist/note/note.types.d.ts.map +0 -1
- package/dist/note/note.types.js +0 -3
- package/dist/note/note.types.js.map +0 -1
- package/dist/note.d.ts +0 -24
- package/dist/note.d.ts.map +0 -1
- package/dist/note.js +0 -40
- package/dist/note.js.map +0 -1
- package/dist/scroll.d.ts +0 -24
- package/dist/scroll.d.ts.map +0 -1
- package/dist/scroll.js +0 -131
- package/dist/scroll.js.map +0 -1
- package/dist/segment/segment.types.d.ts +0 -11
- package/dist/segment/segment.types.d.ts.map +0 -1
- package/dist/segment/segment.types.js +0 -3
- package/dist/segment/segment.types.js.map +0 -1
- package/dist/segment.d.ts +0 -22
- package/dist/segment.d.ts.map +0 -1
- package/dist/segment.js +0 -28
- package/dist/segment.js.map +0 -1
- package/dist/subscription/subscription.types.d.ts +0 -19
- package/dist/subscription/subscription.types.d.ts.map +0 -1
- package/dist/subscription/subscription.types.js +0 -10
- package/dist/subscription/subscription.types.js.map +0 -1
- package/dist/tag/tag.types.d.ts +0 -6
- package/dist/tag/tag.types.d.ts.map +0 -1
- package/dist/tag/tag.types.js +0 -3
- package/dist/tag/tag.types.js.map +0 -1
- package/dist/tag.d.ts +0 -52
- package/dist/tag.d.ts.map +0 -1
- package/dist/tag.js +0 -95
- package/dist/tag.js.map +0 -1
- package/dist/team/team.types.d.ts +0 -7
- package/dist/team/team.types.d.ts.map +0 -1
- package/dist/team/team.types.js +0 -3
- package/dist/team/team.types.js.map +0 -1
- package/dist/team.d.ts +0 -18
- package/dist/team.d.ts.map +0 -1
- package/dist/team.js +0 -23
- package/dist/team.js.map +0 -1
- package/dist/util/time.d.ts +0 -3
- package/dist/util/time.d.ts.map +0 -1
- package/dist/util/time.js +0 -6
- package/dist/util/time.js.map +0 -1
- package/dist/util/url.d.ts +0 -3
- package/dist/util/url.d.ts.map +0 -1
- package/dist/util/url.js +0 -9
- package/dist/util/url.js.map +0 -1
- package/dist/visitor/visitor.types.d.ts +0 -20
- package/dist/visitor/visitor.types.d.ts.map +0 -1
- package/dist/visitor/visitor.types.js +0 -3
- package/dist/visitor/visitor.types.js.map +0 -1
- package/dist/visitor.d.ts +0 -50
- package/dist/visitor.d.ts.map +0 -1
- package/dist/visitor.js +0 -60
- package/dist/visitor.js.map +0 -1
package/dist/helpCenter.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var HelpCenter = /** @class */ (function () {
|
|
4
|
-
function HelpCenter(client) {
|
|
5
|
-
this.collections = new Collection(client);
|
|
6
|
-
this.sections = new Section(client);
|
|
7
|
-
}
|
|
8
|
-
return HelpCenter;
|
|
9
|
-
}());
|
|
10
|
-
exports.default = HelpCenter;
|
|
11
|
-
var Collection = /** @class */ (function () {
|
|
12
|
-
function Collection(client) {
|
|
13
|
-
this.client = client;
|
|
14
|
-
this.baseUrl = 'help_center/collections';
|
|
15
|
-
this.client = client;
|
|
16
|
-
}
|
|
17
|
-
Collection.prototype.create = function (_a) {
|
|
18
|
-
var name = _a.name, description = _a.description, translatedContent = _a.translatedContent;
|
|
19
|
-
var data = {
|
|
20
|
-
name: name,
|
|
21
|
-
description: description,
|
|
22
|
-
translated_content: translatedContent,
|
|
23
|
-
};
|
|
24
|
-
return this.client.post({
|
|
25
|
-
url: "/".concat(this.baseUrl),
|
|
26
|
-
data: data,
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
Collection.prototype.find = function (_a) {
|
|
30
|
-
var id = _a.id;
|
|
31
|
-
return this.client.get({
|
|
32
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
Collection.prototype.update = function (_a) {
|
|
36
|
-
var id = _a.id, name = _a.name, description = _a.description, translatedContent = _a.translatedContent;
|
|
37
|
-
var data = {
|
|
38
|
-
name: name,
|
|
39
|
-
description: description,
|
|
40
|
-
translated_content: translatedContent,
|
|
41
|
-
};
|
|
42
|
-
return this.client.put({
|
|
43
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
44
|
-
data: data,
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
Collection.prototype.delete = function (_a) {
|
|
48
|
-
var id = _a.id;
|
|
49
|
-
return this.client.delete({
|
|
50
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
Collection.prototype.list = function (_a) {
|
|
54
|
-
var page = _a.page, per_page = _a.perPage;
|
|
55
|
-
var params = {
|
|
56
|
-
page: page,
|
|
57
|
-
per_page: per_page,
|
|
58
|
-
};
|
|
59
|
-
return this.client.get({
|
|
60
|
-
url: "/".concat(this.baseUrl),
|
|
61
|
-
params: params,
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
return Collection;
|
|
65
|
-
}());
|
|
66
|
-
var Section = /** @class */ (function () {
|
|
67
|
-
function Section(client) {
|
|
68
|
-
this.client = client;
|
|
69
|
-
this.baseUrl = 'help_center/sections';
|
|
70
|
-
this.client = client;
|
|
71
|
-
}
|
|
72
|
-
Section.prototype.create = function (_a) {
|
|
73
|
-
var name = _a.name, parentId = _a.parentId, translatedContent = _a.translatedContent;
|
|
74
|
-
var data = {
|
|
75
|
-
name: name,
|
|
76
|
-
parent_id: parentId,
|
|
77
|
-
translated_content: translatedContent,
|
|
78
|
-
};
|
|
79
|
-
return this.client.post({
|
|
80
|
-
url: "/".concat(this.baseUrl),
|
|
81
|
-
data: data,
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
Section.prototype.find = function (_a) {
|
|
85
|
-
var id = _a.id;
|
|
86
|
-
return this.client.get({
|
|
87
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
Section.prototype.update = function (_a) {
|
|
91
|
-
var id = _a.id, name = _a.name, parentId = _a.parentId, translatedContent = _a.translatedContent;
|
|
92
|
-
var data = {
|
|
93
|
-
name: name,
|
|
94
|
-
parent_id: parentId,
|
|
95
|
-
translated_content: translatedContent,
|
|
96
|
-
};
|
|
97
|
-
return this.client.put({
|
|
98
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
99
|
-
data: data,
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
Section.prototype.delete = function (_a) {
|
|
103
|
-
var id = _a.id;
|
|
104
|
-
return this.client.delete({
|
|
105
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
Section.prototype.list = function (_a) {
|
|
109
|
-
var page = _a.page, per_page = _a.perPage;
|
|
110
|
-
var params = {
|
|
111
|
-
page: page,
|
|
112
|
-
per_page: per_page,
|
|
113
|
-
};
|
|
114
|
-
return this.client.get({
|
|
115
|
-
url: "/".concat(this.baseUrl),
|
|
116
|
-
params: params,
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
return Section;
|
|
120
|
-
}());
|
|
121
|
-
//# sourceMappingURL=helpCenter.js.map
|
package/dist/helpCenter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpCenter.js","sourceRoot":"","sources":["../../lib/helpCenter.ts"],"names":[],"mappings":";;AAYA;IAII,oBAAY,MAAc;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IACL,iBAAC;AAAD,CAAC,AARD,IAQC;;AAED;IAGI,oBAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAF3B,YAAO,GAAG,yBAAyB,CAAC;QAGhD,IAAI,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AA;SACP,CAAC,CAAC;IACP,CAAC;IACD,wBAAM,GAAN,UAAO,EAA6B;YAA3B,EAAE,QAAA;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAA4B;YACjD,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,cAAI,EAAE,CAAE;SAChC,CAAC,CAAC;IACP,CAAC;IACD,sBAAI,GAAJ,UAAK,EAA4C;YAA1C,IAAI,UAAA,EAAW,QAAQ,aAAA;QAC1B,IAAM,MAAM,GAAG;YACX,IAAI,MAAA;YACJ,QAAQ,UAAA;SACX,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAsB;YACxC,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;YACvB,MAAM,QAAA;SACT,CAAC,CAAC;IACP,CAAC;IACL,cAAC;AAAD,CAAC,AApDD,IAoDC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare class IdentityVerification {
|
|
2
|
-
static userHash({ secretKey, identifier, }: {
|
|
3
|
-
secretKey?: string;
|
|
4
|
-
identifier?: string;
|
|
5
|
-
}): string;
|
|
6
|
-
}
|
|
7
|
-
export { default as Client } from './client';
|
|
8
|
-
export * from './admin/admin.types';
|
|
9
|
-
export * from './article/article.types';
|
|
10
|
-
export * from './common/common.types';
|
|
11
|
-
export * from './company/company.types';
|
|
12
|
-
export * from './contact/contact.types';
|
|
13
|
-
export * from './conversation/conversation.types';
|
|
14
|
-
export * from './count/count.types';
|
|
15
|
-
export * from './dataAttribute/dataAttribute.types';
|
|
16
|
-
export * from './event/event.types';
|
|
17
|
-
export * from './helpCenter/helpCenter.types';
|
|
18
|
-
export * from './message/message.types';
|
|
19
|
-
export * from './note/note.types';
|
|
20
|
-
export * from './segment/segment.types';
|
|
21
|
-
export * from './subscription/subscription.types';
|
|
22
|
-
export * from './tag/tag.types';
|
|
23
|
-
export * from './team/team.types';
|
|
24
|
-
export * from './visitor/visitor.types';
|
|
25
|
-
export { SearchContactOrderBy } from './contact';
|
|
26
|
-
export { ReplyToConversationMessageType, ReplyToConversationUserType, AssignToConversationMessageType, AssignToConversationUserType, SnoozeConversationMessageType, CloseConversationMessageType, CloseConversationType, OpenConversationMessageType, SearchConversationOrderBy, SortBy, RedactConversationPartType, } from './conversation';
|
|
27
|
-
export { RecepientType } from './message';
|
|
28
|
-
export { ContactObjectForMerge, MergeVisitorToContactData, VisitorObjectForMerge, IdentificationForVisitor, } from './visitor';
|
|
29
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAEA,qBAAa,oBAAoB;IAC7B,MAAM,CAAC,QAAQ,CAAC,EACZ,SAAS,EACT,UAAU,GACb,EAAE;QACC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB;CAYJ;AAED,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAG7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AAGxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACH,8BAA8B,EAC9B,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,EACN,0BAA0B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACH,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,GAC3B,MAAM,WAAW,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.RecepientType = exports.RedactConversationPartType = exports.SortBy = exports.SearchConversationOrderBy = exports.OpenConversationMessageType = exports.CloseConversationType = exports.CloseConversationMessageType = exports.SnoozeConversationMessageType = exports.AssignToConversationUserType = exports.AssignToConversationMessageType = exports.ReplyToConversationUserType = exports.ReplyToConversationMessageType = exports.SearchContactOrderBy = exports.Client = exports.IdentityVerification = void 0;
|
|
17
|
-
var crypto_1 = __importDefault(require("crypto"));
|
|
18
|
-
var IdentityVerification = /** @class */ (function () {
|
|
19
|
-
function IdentityVerification() {
|
|
20
|
-
}
|
|
21
|
-
IdentityVerification.userHash = function (_a) {
|
|
22
|
-
var secretKey = _a.secretKey, identifier = _a.identifier;
|
|
23
|
-
if (!secretKey) {
|
|
24
|
-
throw new Error('secretKey must be provided');
|
|
25
|
-
}
|
|
26
|
-
if (!identifier) {
|
|
27
|
-
throw new Error('identifier must be provided');
|
|
28
|
-
}
|
|
29
|
-
return crypto_1.default
|
|
30
|
-
.createHmac('sha256', secretKey)
|
|
31
|
-
.update(identifier)
|
|
32
|
-
.digest('hex');
|
|
33
|
-
};
|
|
34
|
-
return IdentityVerification;
|
|
35
|
-
}());
|
|
36
|
-
exports.IdentityVerification = IdentityVerification;
|
|
37
|
-
var client_1 = require("./client");
|
|
38
|
-
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return __importDefault(client_1).default; } });
|
|
39
|
-
// Export model types
|
|
40
|
-
__exportStar(require("./admin/admin.types"), exports);
|
|
41
|
-
__exportStar(require("./article/article.types"), exports);
|
|
42
|
-
__exportStar(require("./common/common.types"), exports);
|
|
43
|
-
__exportStar(require("./company/company.types"), exports);
|
|
44
|
-
__exportStar(require("./contact/contact.types"), exports);
|
|
45
|
-
__exportStar(require("./conversation/conversation.types"), exports);
|
|
46
|
-
__exportStar(require("./count/count.types"), exports);
|
|
47
|
-
__exportStar(require("./dataAttribute/dataAttribute.types"), exports);
|
|
48
|
-
__exportStar(require("./event/event.types"), exports);
|
|
49
|
-
__exportStar(require("./helpCenter/helpCenter.types"), exports);
|
|
50
|
-
__exportStar(require("./message/message.types"), exports);
|
|
51
|
-
__exportStar(require("./note/note.types"), exports);
|
|
52
|
-
__exportStar(require("./segment/segment.types"), exports);
|
|
53
|
-
__exportStar(require("./subscription/subscription.types"), exports);
|
|
54
|
-
__exportStar(require("./tag/tag.types"), exports);
|
|
55
|
-
__exportStar(require("./team/team.types"), exports);
|
|
56
|
-
__exportStar(require("./visitor/visitor.types"), exports);
|
|
57
|
-
// Export enums needed for requests
|
|
58
|
-
var contact_1 = require("./contact");
|
|
59
|
-
Object.defineProperty(exports, "SearchContactOrderBy", { enumerable: true, get: function () { return contact_1.SearchContactOrderBy; } });
|
|
60
|
-
var conversation_1 = require("./conversation");
|
|
61
|
-
Object.defineProperty(exports, "ReplyToConversationMessageType", { enumerable: true, get: function () { return conversation_1.ReplyToConversationMessageType; } });
|
|
62
|
-
Object.defineProperty(exports, "ReplyToConversationUserType", { enumerable: true, get: function () { return conversation_1.ReplyToConversationUserType; } });
|
|
63
|
-
Object.defineProperty(exports, "AssignToConversationMessageType", { enumerable: true, get: function () { return conversation_1.AssignToConversationMessageType; } });
|
|
64
|
-
Object.defineProperty(exports, "AssignToConversationUserType", { enumerable: true, get: function () { return conversation_1.AssignToConversationUserType; } });
|
|
65
|
-
Object.defineProperty(exports, "SnoozeConversationMessageType", { enumerable: true, get: function () { return conversation_1.SnoozeConversationMessageType; } });
|
|
66
|
-
Object.defineProperty(exports, "CloseConversationMessageType", { enumerable: true, get: function () { return conversation_1.CloseConversationMessageType; } });
|
|
67
|
-
Object.defineProperty(exports, "CloseConversationType", { enumerable: true, get: function () { return conversation_1.CloseConversationType; } });
|
|
68
|
-
Object.defineProperty(exports, "OpenConversationMessageType", { enumerable: true, get: function () { return conversation_1.OpenConversationMessageType; } });
|
|
69
|
-
Object.defineProperty(exports, "SearchConversationOrderBy", { enumerable: true, get: function () { return conversation_1.SearchConversationOrderBy; } });
|
|
70
|
-
Object.defineProperty(exports, "SortBy", { enumerable: true, get: function () { return conversation_1.SortBy; } });
|
|
71
|
-
Object.defineProperty(exports, "RedactConversationPartType", { enumerable: true, get: function () { return conversation_1.RedactConversationPartType; } });
|
|
72
|
-
var message_1 = require("./message");
|
|
73
|
-
Object.defineProperty(exports, "RecepientType", { enumerable: true, get: function () { return message_1.RecepientType; } });
|
|
74
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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A;AAE9B,qCAA0C;AAAjC,wGAAA,aAAa,OAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Timestamp } from '../common/common.types';
|
|
2
|
-
export interface MessageObject {
|
|
3
|
-
type: string;
|
|
4
|
-
id: string;
|
|
5
|
-
created_at: Timestamp;
|
|
6
|
-
subject?: string;
|
|
7
|
-
body: string;
|
|
8
|
-
message_type: MessageType;
|
|
9
|
-
conversation_id?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare enum MessageType {
|
|
12
|
-
EMAIL = "email",
|
|
13
|
-
INAPP = "inapp",
|
|
14
|
-
FACEBOOK = "facebook",
|
|
15
|
-
TWITTER = "twitter"
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=message.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.types.d.ts","sourceRoot":"","sources":["../../../lib/message/message.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,oBAAY,WAAW;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;CACtB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageType = void 0;
|
|
4
|
-
var MessageType;
|
|
5
|
-
(function (MessageType) {
|
|
6
|
-
MessageType["EMAIL"] = "email";
|
|
7
|
-
MessageType["INAPP"] = "inapp";
|
|
8
|
-
MessageType["FACEBOOK"] = "facebook";
|
|
9
|
-
MessageType["TWITTER"] = "twitter";
|
|
10
|
-
})(MessageType = exports.MessageType || (exports.MessageType = {}));
|
|
11
|
-
//# sourceMappingURL=message.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.types.js","sourceRoot":"","sources":["../../../lib/message/message.types.ts"],"names":[],"mappings":";;;AAYA,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACvB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB"}
|
package/dist/message.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Client } from '.';
|
|
2
|
-
import { MessageObject, MessageType } from './message/message.types';
|
|
3
|
-
export default class Message {
|
|
4
|
-
private readonly client;
|
|
5
|
-
private messagesBaseUrl;
|
|
6
|
-
constructor(client: Client);
|
|
7
|
-
create({ messageType: message_type, subject, body, template, from, to, }: CreateMessageBody): Promise<MessageObject>;
|
|
8
|
-
}
|
|
9
|
-
interface CreateMessageRequest {
|
|
10
|
-
message_type: MessageType;
|
|
11
|
-
body: string;
|
|
12
|
-
from: Recepient;
|
|
13
|
-
to: Recepient;
|
|
14
|
-
subject?: string;
|
|
15
|
-
template?: string;
|
|
16
|
-
}
|
|
17
|
-
interface CreateMessageBody extends Omit<CreateMessageRequest, 'message_type'> {
|
|
18
|
-
messageType: MessageType;
|
|
19
|
-
}
|
|
20
|
-
declare type Recepient = {
|
|
21
|
-
id: string;
|
|
22
|
-
type: RecepientType;
|
|
23
|
-
};
|
|
24
|
-
export declare enum RecepientType {
|
|
25
|
-
ADMIN = "admin",
|
|
26
|
-
USER = "user",
|
|
27
|
-
LEAD = "lead"
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=message.d.ts.map
|
package/dist/message.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../lib/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,CAAC,OAAO,OAAO,OAAO;IAGZ,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,eAAe,CAAc;gBAER,MAAM,EAAE,MAAM;IAI3C,MAAM,CAAC,EACH,WAAW,EAAE,YAAY,EACzB,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,EAAE,GACL,EAAE,iBAAiB;CAevB;AAED,UAAU,oBAAoB;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,EAAE,EAAE,SAAS,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,iBAAkB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAC;IAC1E,WAAW,EAAE,WAAW,CAAC;CAC5B;AAED,aAAK,SAAS,GAAG;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,oBAAY,aAAa;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;CAChB"}
|
package/dist/message.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RecepientType = void 0;
|
|
4
|
-
var Message = /** @class */ (function () {
|
|
5
|
-
function Message(client) {
|
|
6
|
-
this.client = client;
|
|
7
|
-
this.messagesBaseUrl = 'messages';
|
|
8
|
-
this.client = client;
|
|
9
|
-
}
|
|
10
|
-
Message.prototype.create = function (_a) {
|
|
11
|
-
var message_type = _a.messageType, subject = _a.subject, body = _a.body, template = _a.template, from = _a.from, to = _a.to;
|
|
12
|
-
var data = {
|
|
13
|
-
message_type: message_type,
|
|
14
|
-
subject: subject,
|
|
15
|
-
body: body,
|
|
16
|
-
template: template,
|
|
17
|
-
from: from,
|
|
18
|
-
to: to,
|
|
19
|
-
};
|
|
20
|
-
return this.client.post({
|
|
21
|
-
url: "/".concat(this.messagesBaseUrl),
|
|
22
|
-
data: data,
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
return Message;
|
|
26
|
-
}());
|
|
27
|
-
exports.default = Message;
|
|
28
|
-
var RecepientType;
|
|
29
|
-
(function (RecepientType) {
|
|
30
|
-
RecepientType["ADMIN"] = "admin";
|
|
31
|
-
RecepientType["USER"] = "user";
|
|
32
|
-
RecepientType["LEAD"] = "lead";
|
|
33
|
-
})(RecepientType = exports.RecepientType || (exports.RecepientType = {}));
|
|
34
|
-
//# sourceMappingURL=message.js.map
|
package/dist/message.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../lib/message.ts"],"names":[],"mappings":";;;AAGA;IAGI,iBAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAFnC,oBAAe,GAAG,UAAU,CAAC;QAGjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,wBAAM,GAAN,UAAO,EAOa;YANH,YAAY,iBAAA,EACzB,OAAO,aAAA,EACP,IAAI,UAAA,EACJ,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,EAAE,QAAA;QAEF,IAAM,IAAI,GAAyB;YAC/B,YAAY,cAAA;YACZ,OAAO,SAAA;YACP,IAAI,MAAA;YACJ,QAAQ,UAAA;YACR,IAAI,MAAA;YACJ,EAAE,IAAA;SACL,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAgB;YACnC,GAAG,EAAE,WAAI,IAAI,CAAC,eAAe,CAAE;YAC/B,IAAI,MAAA;SACP,CAAC,CAAC;IACP,CAAC;IACL,cAAC;AAAD,CAAC,AA7BD,IA6BC;;AAoBD,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,8BAAa,CAAA;AACjB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AdminObject, Timestamp } from '..';
|
|
2
|
-
export declare type NoteObject = {
|
|
3
|
-
type: 'note';
|
|
4
|
-
id: string;
|
|
5
|
-
created_at: Timestamp;
|
|
6
|
-
contact: {
|
|
7
|
-
type: 'contact';
|
|
8
|
-
id: string;
|
|
9
|
-
};
|
|
10
|
-
author?: Pick<AdminObject, 'type' | 'id' | 'name' | 'email' | 'away_mode_enabled' | 'away_mode_reassign' | 'avatar'>;
|
|
11
|
-
body: string;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=note.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.types.d.ts","sourceRoot":"","sources":["../../../lib/note/note.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE5C,oBAAY,UAAU,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE;QACL,IAAI,EAAE,SAAS,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,CAAC,EAAE,IAAI,CACT,WAAW,EACT,MAAM,GACN,IAAI,GACJ,MAAM,GACN,OAAO,GACP,mBAAmB,GACnB,oBAAoB,GACpB,QAAQ,CACb,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
package/dist/note/note.types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.types.js","sourceRoot":"","sources":["../../../lib/note/note.types.ts"],"names":[],"mappings":""}
|
package/dist/note.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Client, NoteObject } from '.';
|
|
2
|
-
import { OperationById, Paginated } from './common/common.types';
|
|
3
|
-
export default class Note {
|
|
4
|
-
private readonly client;
|
|
5
|
-
readonly baseUrl = "notes";
|
|
6
|
-
constructor(client: Client);
|
|
7
|
-
create({ adminId, body, contactId }: CreateNoteData): Promise<NoteObject>;
|
|
8
|
-
find({ id }: FindNoteByIdData): Promise<NoteObject>;
|
|
9
|
-
list({ contactId, page, perPage: per_page }: ListNotesData): Promise<ListNotesResponse>;
|
|
10
|
-
}
|
|
11
|
-
interface CreateNoteData {
|
|
12
|
-
adminId: string;
|
|
13
|
-
body: string;
|
|
14
|
-
contactId: string;
|
|
15
|
-
}
|
|
16
|
-
declare type FindNoteByIdData = OperationById;
|
|
17
|
-
declare type ListNotesData = {
|
|
18
|
-
contactId: string;
|
|
19
|
-
page?: number;
|
|
20
|
-
perPage?: number;
|
|
21
|
-
};
|
|
22
|
-
declare type ListNotesResponse = Paginated<NoteObject>;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=note.d.ts.map
|
package/dist/note.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../lib/note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,IAAI;IAGT,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAgB,OAAO,WAAW;gBAEL,MAAM,EAAE,MAAM;IAI3C,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,cAAc;IAWnD,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,gBAAgB;IAK7B,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,aAAa;CAW7D;AAED,UAAU,cAAc;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,aAAK,gBAAgB,GAAG,aAAa,CAAC;AAEtC,aAAK,aAAa,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,aAAK,iBAAiB,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/note.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var Note = /** @class */ (function () {
|
|
4
|
-
function Note(client) {
|
|
5
|
-
this.client = client;
|
|
6
|
-
this.baseUrl = 'notes';
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
Note.prototype.create = function (_a) {
|
|
10
|
-
var adminId = _a.adminId, body = _a.body, contactId = _a.contactId;
|
|
11
|
-
var data = {
|
|
12
|
-
admin_id: adminId,
|
|
13
|
-
body: body,
|
|
14
|
-
};
|
|
15
|
-
return this.client.post({
|
|
16
|
-
url: "/".concat(this.client.contacts.baseUrl, "/").concat(contactId, "/").concat(this.baseUrl),
|
|
17
|
-
data: data,
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Note.prototype.find = function (_a) {
|
|
21
|
-
var id = _a.id;
|
|
22
|
-
return this.client.get({
|
|
23
|
-
url: "/".concat(this.baseUrl, "/").concat(id),
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
Note.prototype.list = function (_a) {
|
|
27
|
-
var contactId = _a.contactId, page = _a.page, per_page = _a.perPage;
|
|
28
|
-
var params = {
|
|
29
|
-
page: page,
|
|
30
|
-
per_page: per_page,
|
|
31
|
-
};
|
|
32
|
-
return this.client.get({
|
|
33
|
-
url: "/".concat(this.client.contacts.baseUrl, "/").concat(contactId, "/").concat(this.baseUrl),
|
|
34
|
-
params: params,
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
return Note;
|
|
38
|
-
}());
|
|
39
|
-
exports.default = Note;
|
|
40
|
-
//# sourceMappingURL=note.js.map
|
package/dist/note.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../lib/note.ts"],"names":[],"mappings":";;AAGA;IAGI,cAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAF3B,YAAO,GAAG,OAAO,CAAC;QAG9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,qBAAM,GAAN,UAAO,EAA4C;YAA1C,OAAO,aAAA,EAAE,IAAI,UAAA,EAAE,SAAS,eAAA;QAC7B,IAAM,IAAI,GAAG;YACT,QAAQ,EAAE,OAAO;YACjB,IAAI,MAAA;SACP,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAa;YAChC,GAAG,EAAE,WAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,cAAI,SAAS,cAAI,IAAI,CAAC,OAAO,CAAE;YACpE,IAAI,MAAA;SACP,CAAC,CAAC;IACP,CAAC;IACD,mBAAI,GAAJ,UAAK,EAAwB;YAAtB,EAAE,QAAA;QACL,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa;YAC/B,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,cAAI,EAAE,CAAE;SAChC,CAAC,CAAC;IACP,CAAC;IACD,mBAAI,GAAJ,UAAK,EAAqD;YAAnD,SAAS,eAAA,EAAE,IAAI,UAAA,EAAW,QAAQ,aAAA;QACrC,IAAM,MAAM,GAAG;YACX,IAAI,MAAA;YACJ,QAAQ,UAAA;SACX,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAoB;YACtC,GAAG,EAAE,WAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,cAAI,SAAS,cAAI,IAAI,CAAC,OAAO,CAAE;YACpE,MAAM,QAAA;SACT,CAAC,CAAC;IACP,CAAC;IACL,WAAC;AAAD,CAAC,AAlCD,IAkCC"}
|
package/dist/scroll.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Client } from '.';
|
|
2
|
-
export default class Scroll<EntityType> {
|
|
3
|
-
private readonly client;
|
|
4
|
-
private readonly scrollUrlDataType;
|
|
5
|
-
private scrollParam?;
|
|
6
|
-
constructor(client: Client, scrollUrlDataType: string, scrollParam?: string | undefined);
|
|
7
|
-
each(params: EachData): Promise<EntityType[]>;
|
|
8
|
-
eachInternal(storedData?: EntityType[]): Promise<EntityType[]>;
|
|
9
|
-
next({ scrollParam, }: NextData): Promise<ScrollableResponse<EntityType>>;
|
|
10
|
-
scrollUrl(): string;
|
|
11
|
-
}
|
|
12
|
-
interface ScrollableResponse<EntityType> {
|
|
13
|
-
type: 'list';
|
|
14
|
-
data: EntityType[];
|
|
15
|
-
pages: number | null;
|
|
16
|
-
total_count: number | null;
|
|
17
|
-
scroll_param?: string;
|
|
18
|
-
}
|
|
19
|
-
interface EachData {
|
|
20
|
-
scrollParam?: string;
|
|
21
|
-
}
|
|
22
|
-
declare type NextData = EachData;
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=scroll.d.ts.map
|
package/dist/scroll.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../lib/scroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAE3B,MAAM,CAAC,OAAO,OAAO,MAAM,CAAC,UAAU;IAE9B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,WAAW,CAAC;gBAFH,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,MAAM,EAClC,WAAW,CAAC,oBAAQ;IAO1B,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAM7C,YAAY,CAAC,UAAU,GAAE,UAAU,EAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAelE,IAAI,CAAC,EACP,WAAW,GACd,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAUrD,SAAS;CAOZ;AAED,UAAU,kBAAkB,CAAC,UAAU;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,QAAQ;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,aAAK,QAAQ,GAAG,QAAQ,CAAC"}
|
package/dist/scroll.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
-
if (!m) return o;
|
|
41
|
-
var i = m.call(o), r, ar = [], e;
|
|
42
|
-
try {
|
|
43
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
-
}
|
|
45
|
-
catch (error) { e = { error: error }; }
|
|
46
|
-
finally {
|
|
47
|
-
try {
|
|
48
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
-
}
|
|
50
|
-
finally { if (e) throw e.error; }
|
|
51
|
-
}
|
|
52
|
-
return ar;
|
|
53
|
-
};
|
|
54
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
55
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
56
|
-
if (ar || !(i in from)) {
|
|
57
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
58
|
-
ar[i] = from[i];
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
62
|
-
};
|
|
63
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
|
-
var Scroll = /** @class */ (function () {
|
|
65
|
-
function Scroll(client, scrollUrlDataType, scrollParam) {
|
|
66
|
-
this.client = client;
|
|
67
|
-
this.scrollUrlDataType = scrollUrlDataType;
|
|
68
|
-
this.scrollParam = scrollParam;
|
|
69
|
-
this.client = client;
|
|
70
|
-
this.scrollParam = scrollParam;
|
|
71
|
-
}
|
|
72
|
-
// eslint-disable-next-line require-await
|
|
73
|
-
Scroll.prototype.each = function (params) {
|
|
74
|
-
var _a;
|
|
75
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
-
return __generator(this, function (_b) {
|
|
77
|
-
this.scrollParam = (_a = params.scrollParam) !== null && _a !== void 0 ? _a : undefined;
|
|
78
|
-
return [2 /*return*/, this.eachInternal()];
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
Scroll.prototype.eachInternal = function (storedData) {
|
|
83
|
-
if (storedData === void 0) { storedData = []; }
|
|
84
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
var response, dataFromResponse, combinedData;
|
|
86
|
-
return __generator(this, function (_a) {
|
|
87
|
-
switch (_a.label) {
|
|
88
|
-
case 0: return [4 /*yield*/, this.client.get({
|
|
89
|
-
url: this.scrollUrl(),
|
|
90
|
-
})];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
dataFromResponse = response.data;
|
|
94
|
-
combinedData = __spreadArray(__spreadArray([], __read(dataFromResponse), false), __read(storedData), false);
|
|
95
|
-
if (dataFromResponse.length > 0) {
|
|
96
|
-
this.scrollParam = response.scroll_param;
|
|
97
|
-
return [2 /*return*/, this.eachInternal(combinedData)];
|
|
98
|
-
}
|
|
99
|
-
return [2 /*return*/, combinedData];
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
Scroll.prototype.next = function (_a) {
|
|
105
|
-
var scrollParam = _a.scrollParam;
|
|
106
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
var response;
|
|
108
|
-
return __generator(this, function (_b) {
|
|
109
|
-
switch (_b.label) {
|
|
110
|
-
case 0:
|
|
111
|
-
this.scrollParam = scrollParam;
|
|
112
|
-
return [4 /*yield*/, this.client.get({
|
|
113
|
-
url: this.scrollUrl(),
|
|
114
|
-
})];
|
|
115
|
-
case 1:
|
|
116
|
-
response = _b.sent();
|
|
117
|
-
return [2 /*return*/, response];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
Scroll.prototype.scrollUrl = function () {
|
|
123
|
-
var baseScrollUrl = "/".concat(this.scrollUrlDataType, "/scroll");
|
|
124
|
-
return this.scrollParam && this.scrollParam.length > 0
|
|
125
|
-
? "".concat(baseScrollUrl, "?scroll_param=").concat(this.scrollParam)
|
|
126
|
-
: baseScrollUrl;
|
|
127
|
-
};
|
|
128
|
-
return Scroll;
|
|
129
|
-
}());
|
|
130
|
-
exports.default = Scroll;
|
|
131
|
-
//# sourceMappingURL=scroll.js.map
|
package/dist/scroll.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.js","sourceRoot":"","sources":["../../lib/scroll.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;IACI,gBACqB,MAAc,EACd,iBAAyB,EAClC,WAAoB;QAFX,WAAM,GAAN,MAAM,CAAQ;QACd,sBAAiB,GAAjB,iBAAiB,CAAQ;QAClC,gBAAW,GAAX,WAAW,CAAS;QAE5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IAED,yCAAyC;IACnC,qBAAI,GAAV,UAAW,MAAgB;;;;gBACvB,IAAI,CAAC,WAAW,GAAG,MAAA,MAAM,CAAC,WAAW,mCAAI,SAAS,CAAC;gBAEnD,sBAAO,IAAI,CAAC,YAAY,EAAE,EAAC;;;KAC9B;IAEK,6BAAY,GAAlB,UAAmB,UAA6B;QAA7B,2BAAA,EAAA,eAA6B;;;;;4BAC3B,qBAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiC;4BACnE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE;yBACxB,CAAC,EAAA;;wBAFI,QAAQ,GAAG,SAEf;wBACI,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC;wBACjC,YAAY,0CAAO,gBAAgB,kBAAK,UAAU,SAAC,CAAC;wBAE1D,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;4BAC7B,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC;4BACzC,sBAAO,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,EAAC;yBAC1C;wBAED,sBAAO,YAAY,EAAC;;;;KACvB;IAEK,qBAAI,GAAV,UAAW,EAEA;YADP,WAAW,iBAAA;;;;;;wBAEX,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;wBAEd,qBAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiC;gCACnE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE;6BACxB,CAAC,EAAA;;wBAFI,QAAQ,GAAG,SAEf;wBAEF,sBAAO,QAAQ,EAAC;;;;KACnB;IAED,0BAAS,GAAT;QACI,IAAM,aAAa,GAAG,WAAI,IAAI,CAAC,iBAAiB,YAAS,CAAC;QAE1D,OAAO,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YAClD,CAAC,CAAC,UAAG,aAAa,2BAAiB,IAAI,CAAC,WAAW,CAAE;YACrD,CAAC,CAAC,aAAa,CAAC;IACxB,CAAC;IACL,aAAC;AAAD,CAAC,AAnDD,IAmDC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Role, Timestamp } from '../common/common.types';
|
|
2
|
-
export declare type SegmentObject = {
|
|
3
|
-
type: 'segment';
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
created_at: Timestamp;
|
|
7
|
-
updated_at: Timestamp;
|
|
8
|
-
person_type: Role;
|
|
9
|
-
count?: number;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=segment.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"segment.types.d.ts","sourceRoot":"","sources":["../../../lib/segment/segment.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEzD,oBAAY,aAAa,GAAG;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,IAAI,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|