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.
Files changed (155) hide show
  1. package/README.md +72 -2
  2. package/dist/package.json +1 -1
  3. package/package.json +1 -1
  4. package/dist/admin/admin.types.d.ts +0 -15
  5. package/dist/admin/admin.types.d.ts.map +0 -1
  6. package/dist/admin/admin.types.js +0 -3
  7. package/dist/admin/admin.types.js.map +0 -1
  8. package/dist/admin.d.ts +0 -48
  9. package/dist/admin.d.ts.map +0 -1
  10. package/dist/admin.js +0 -42
  11. package/dist/admin.js.map +0 -1
  12. package/dist/article/article.types.d.ts +0 -87
  13. package/dist/article/article.types.d.ts.map +0 -1
  14. package/dist/article/article.types.js +0 -45
  15. package/dist/article/article.types.js.map +0 -1
  16. package/dist/article.d.ts +0 -34
  17. package/dist/article.d.ts.map +0 -1
  18. package/dist/article.js +0 -69
  19. package/dist/article.js.map +0 -1
  20. package/dist/client.d.ts +0 -76
  21. package/dist/client.d.ts.map +0 -1
  22. package/dist/client.js +0 -319
  23. package/dist/client.js.map +0 -1
  24. package/dist/common/common.types.d.ts +0 -69
  25. package/dist/common/common.types.d.ts.map +0 -1
  26. package/dist/common/common.types.js +0 -29
  27. package/dist/common/common.types.js.map +0 -1
  28. package/dist/company/company.types.d.ts +0 -37
  29. package/dist/company/company.types.d.ts.map +0 -1
  30. package/dist/company/company.types.js +0 -3
  31. package/dist/company/company.types.js.map +0 -1
  32. package/dist/company.d.ts +0 -63
  33. package/dist/company.d.ts.map +0 -1
  34. package/dist/company.js +0 -114
  35. package/dist/company.js.map +0 -1
  36. package/dist/contact/contact.types.d.ts +0 -80
  37. package/dist/contact/contact.types.d.ts.map +0 -1
  38. package/dist/contact/contact.types.js +0 -3
  39. package/dist/contact/contact.types.js.map +0 -1
  40. package/dist/contact.d.ts +0 -120
  41. package/dist/contact.d.ts.map +0 -1
  42. package/dist/contact.js +0 -158
  43. package/dist/contact.js.map +0 -1
  44. package/dist/conversation/conversation.types.d.ts +0 -144
  45. package/dist/conversation/conversation.types.d.ts.map +0 -1
  46. package/dist/conversation/conversation.types.js +0 -50
  47. package/dist/conversation/conversation.types.js.map +0 -1
  48. package/dist/conversation.d.ts +0 -178
  49. package/dist/conversation.d.ts.map +0 -1
  50. package/dist/conversation.js +0 -289
  51. package/dist/conversation.js.map +0 -1
  52. package/dist/count/count.types.d.ts +0 -89
  53. package/dist/count/count.types.d.ts.map +0 -1
  54. package/dist/count/count.types.js +0 -17
  55. package/dist/count/count.types.js.map +0 -1
  56. package/dist/count.d.ts +0 -18
  57. package/dist/count.d.ts.map +0 -1
  58. package/dist/count.js +0 -72
  59. package/dist/count.js.map +0 -1
  60. package/dist/dataAttribute/dataAttribute.types.d.ts +0 -32
  61. package/dist/dataAttribute/dataAttribute.types.d.ts.map +0 -1
  62. package/dist/dataAttribute/dataAttribute.types.js +0 -18
  63. package/dist/dataAttribute/dataAttribute.types.js.map +0 -1
  64. package/dist/dataAttribute.d.ts +0 -33
  65. package/dist/dataAttribute.d.ts.map +0 -1
  66. package/dist/dataAttribute.js +0 -49
  67. package/dist/dataAttribute.js.map +0 -1
  68. package/dist/errors/badResponse.error.d.ts +0 -9
  69. package/dist/errors/badResponse.error.d.ts.map +0 -1
  70. package/dist/errors/badResponse.error.js +0 -35
  71. package/dist/errors/badResponse.error.js.map +0 -1
  72. package/dist/event/event.types.d.ts +0 -29
  73. package/dist/event/event.types.d.ts.map +0 -1
  74. package/dist/event/event.types.js +0 -3
  75. package/dist/event/event.types.js.map +0 -1
  76. package/dist/event.d.ts +0 -41
  77. package/dist/event.d.ts.map +0 -1
  78. package/dist/event.js +0 -44
  79. package/dist/event.js.map +0 -1
  80. package/dist/helpCenter/helpCenter.types.d.ts +0 -23
  81. package/dist/helpCenter/helpCenter.types.d.ts.map +0 -1
  82. package/dist/helpCenter/helpCenter.types.js +0 -3
  83. package/dist/helpCenter/helpCenter.types.js.map +0 -1
  84. package/dist/helpCenter.d.ts +0 -58
  85. package/dist/helpCenter.d.ts.map +0 -1
  86. package/dist/helpCenter.js +0 -121
  87. package/dist/helpCenter.js.map +0 -1
  88. package/dist/index.d.ts +0 -29
  89. package/dist/index.d.ts.map +0 -1
  90. package/dist/index.js +0 -74
  91. package/dist/index.js.map +0 -1
  92. package/dist/message/message.types.d.ts +0 -17
  93. package/dist/message/message.types.d.ts.map +0 -1
  94. package/dist/message/message.types.js +0 -11
  95. package/dist/message/message.types.js.map +0 -1
  96. package/dist/message.d.ts +0 -30
  97. package/dist/message.d.ts.map +0 -1
  98. package/dist/message.js +0 -34
  99. package/dist/message.js.map +0 -1
  100. package/dist/note/note.types.d.ts +0 -13
  101. package/dist/note/note.types.d.ts.map +0 -1
  102. package/dist/note/note.types.js +0 -3
  103. package/dist/note/note.types.js.map +0 -1
  104. package/dist/note.d.ts +0 -24
  105. package/dist/note.d.ts.map +0 -1
  106. package/dist/note.js +0 -40
  107. package/dist/note.js.map +0 -1
  108. package/dist/scroll.d.ts +0 -24
  109. package/dist/scroll.d.ts.map +0 -1
  110. package/dist/scroll.js +0 -131
  111. package/dist/scroll.js.map +0 -1
  112. package/dist/segment/segment.types.d.ts +0 -11
  113. package/dist/segment/segment.types.d.ts.map +0 -1
  114. package/dist/segment/segment.types.js +0 -3
  115. package/dist/segment/segment.types.js.map +0 -1
  116. package/dist/segment.d.ts +0 -22
  117. package/dist/segment.d.ts.map +0 -1
  118. package/dist/segment.js +0 -28
  119. package/dist/segment.js.map +0 -1
  120. package/dist/subscription/subscription.types.d.ts +0 -19
  121. package/dist/subscription/subscription.types.d.ts.map +0 -1
  122. package/dist/subscription/subscription.types.js +0 -10
  123. package/dist/subscription/subscription.types.js.map +0 -1
  124. package/dist/tag/tag.types.d.ts +0 -6
  125. package/dist/tag/tag.types.d.ts.map +0 -1
  126. package/dist/tag/tag.types.js +0 -3
  127. package/dist/tag/tag.types.js.map +0 -1
  128. package/dist/tag.d.ts +0 -52
  129. package/dist/tag.d.ts.map +0 -1
  130. package/dist/tag.js +0 -95
  131. package/dist/tag.js.map +0 -1
  132. package/dist/team/team.types.d.ts +0 -7
  133. package/dist/team/team.types.d.ts.map +0 -1
  134. package/dist/team/team.types.js +0 -3
  135. package/dist/team/team.types.js.map +0 -1
  136. package/dist/team.d.ts +0 -18
  137. package/dist/team.d.ts.map +0 -1
  138. package/dist/team.js +0 -23
  139. package/dist/team.js.map +0 -1
  140. package/dist/util/time.d.ts +0 -3
  141. package/dist/util/time.d.ts.map +0 -1
  142. package/dist/util/time.js +0 -6
  143. package/dist/util/time.js.map +0 -1
  144. package/dist/util/url.d.ts +0 -3
  145. package/dist/util/url.d.ts.map +0 -1
  146. package/dist/util/url.js +0 -9
  147. package/dist/util/url.js.map +0 -1
  148. package/dist/visitor/visitor.types.d.ts +0 -20
  149. package/dist/visitor/visitor.types.d.ts.map +0 -1
  150. package/dist/visitor/visitor.types.js +0 -3
  151. package/dist/visitor/visitor.types.js.map +0 -1
  152. package/dist/visitor.d.ts +0 -50
  153. package/dist/visitor.d.ts.map +0 -1
  154. package/dist/visitor.js +0 -60
  155. package/dist/visitor.js.map +0 -1
package/dist/count.d.ts DELETED
@@ -1,18 +0,0 @@
1
- import { Client, CompanySegmentCountResponse, CompanyTagCountResponse, CompanyUserCountResponse, UserCountResponse, UserSegmentCountResponse, UserTagCountResponse } from '.';
2
- import { AdminConversationCountResponse, AppTotalCountResponse, CompanyCountResponse, ConversationCountResponse } from './count/count.types';
3
- export default class Count {
4
- private readonly client;
5
- readonly baseUrl = "counts";
6
- constructor(client: Client);
7
- forApp(): Promise<AppTotalCountResponse>;
8
- countCompany(): Promise<CompanyCountResponse>;
9
- countCompanySegment(): Promise<CompanySegmentCountResponse>;
10
- countCompanyTag(): Promise<CompanyTagCountResponse>;
11
- countCompanyUser(): Promise<CompanyUserCountResponse>;
12
- countConversation(): Promise<ConversationCountResponse>;
13
- countAdminConversation(): Promise<AdminConversationCountResponse>;
14
- countUser(): Promise<UserCountResponse>;
15
- countUserSegment(): Promise<UserSegmentCountResponse>;
16
- countUserTag(): Promise<UserTagCountResponse>;
17
- }
18
- //# sourceMappingURL=count.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../lib/count.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EACN,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACvB,MAAM,GAAG,CAAC;AACX,OAAO,EACH,8BAA8B,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EAG5B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,OAAO,OAAO,KAAK;IAGV,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAgB,OAAO,YAAY;gBAEN,MAAM,EAAE,MAAM;IAI3C,MAAM;IAMN,YAAY;IAMZ,mBAAmB;IAMnB,eAAe;IAMf,gBAAgB;IAMhB,iBAAiB;IAMjB,sBAAsB;IAMtB,SAAS;IAMT,gBAAgB;IAMhB,YAAY;CAMf"}
package/dist/count.js DELETED
@@ -1,72 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var count_types_1 = require("./count/count.types");
4
- var Count = /** @class */ (function () {
5
- function Count(client) {
6
- this.client = client;
7
- this.baseUrl = 'counts';
8
- this.client = client;
9
- }
10
- Count.prototype.forApp = function () {
11
- return this.client.get({
12
- url: "/".concat(this.baseUrl),
13
- });
14
- };
15
- Count.prototype.countCompany = function () {
16
- return this.client.get({
17
- url: "/".concat(this.baseUrl),
18
- params: { type: count_types_1.CountType.COMPANY },
19
- });
20
- };
21
- Count.prototype.countCompanySegment = function () {
22
- return this.client.get({
23
- url: "/".concat(this.baseUrl),
24
- params: { type: count_types_1.CountType.COMPANY, count: count_types_1.CountEntity.SEGMENT },
25
- });
26
- };
27
- Count.prototype.countCompanyTag = function () {
28
- return this.client.get({
29
- url: "/".concat(this.baseUrl),
30
- params: { type: count_types_1.CountType.COMPANY, count: count_types_1.CountEntity.TAG },
31
- });
32
- };
33
- Count.prototype.countCompanyUser = function () {
34
- return this.client.get({
35
- url: "/".concat(this.baseUrl),
36
- params: { type: count_types_1.CountType.COMPANY, count: count_types_1.CountEntity.USER },
37
- });
38
- };
39
- Count.prototype.countConversation = function () {
40
- return this.client.get({
41
- url: "/".concat(this.baseUrl),
42
- params: { type: count_types_1.CountType.CONVERSATION },
43
- });
44
- };
45
- Count.prototype.countAdminConversation = function () {
46
- return this.client.get({
47
- url: "/".concat(this.baseUrl),
48
- params: { type: count_types_1.CountType.CONVERSATION, count: count_types_1.CountEntity.ADMIN },
49
- });
50
- };
51
- Count.prototype.countUser = function () {
52
- return this.client.get({
53
- url: "/".concat(this.baseUrl),
54
- params: { type: count_types_1.CountType.USER },
55
- });
56
- };
57
- Count.prototype.countUserSegment = function () {
58
- return this.client.get({
59
- url: "/".concat(this.baseUrl),
60
- params: { type: count_types_1.CountType.USER, count: count_types_1.CountEntity.SEGMENT },
61
- });
62
- };
63
- Count.prototype.countUserTag = function () {
64
- return this.client.get({
65
- url: "/".concat(this.baseUrl),
66
- params: { type: count_types_1.CountType.USER, count: count_types_1.CountEntity.TAG },
67
- });
68
- };
69
- return Count;
70
- }());
71
- exports.default = Count;
72
- //# sourceMappingURL=count.js.map
package/dist/count.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"count.js","sourceRoot":"","sources":["../../lib/count.ts"],"names":[],"mappings":";;AASA,mDAO6B;AAE7B;IAGI,eAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAF3B,YAAO,GAAG,QAAQ,CAAC;QAG/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,sBAAM,GAAN;QACI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAwB;YAC1C,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;SAC1B,CAAC,CAAC;I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D,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAS,CAAC,YAAY,EAAE,KAAK,EAAE,yBAAW,CAAC,KAAK,EAAE;SACrE,CAAC,CAAC;IACP,CAAC;IACD,yBAAS,GAAT;QACI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAoB;YACtC,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAS,CAAC,IAAI,EAAE;SACnC,CAAC,CAAC;IACP,CAAC;IACD,gCAAgB,GAAhB;QACI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA2B;YAC7C,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAS,CAAC,IAAI,EAAE,KAAK,EAAE,yBAAW,CAAC,OAAO,EAAE;SAC/D,CAAC,CAAC;IACP,CAAC;IACD,4BAAY,GAAZ;QACI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAuB;YACzC,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;YACvB,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAS,CAAC,IAAI,EAAE,KAAK,EAAE,yBAAW,CAAC,GAAG,EAAE;SAC3D,CAAC,CAAC;IACP,CAAC;IACL,YAAC;AAAD,CAAC,AAnED,IAmEC"}
@@ -1,32 +0,0 @@
1
- import { Timestamp } from '../common/common.types';
2
- export interface DataAttributeObject {
3
- id: string;
4
- name: string;
5
- full_name: string;
6
- label: string;
7
- description: string;
8
- data_type: DataType;
9
- api_writable: boolean;
10
- ui_writable: boolean;
11
- custom: boolean;
12
- archived: boolean;
13
- model: ModelType;
14
- options: Record<'value', string>[];
15
- type?: 'data_attribute';
16
- created_at?: Timestamp;
17
- updated_at?: Timestamp;
18
- admin_id?: string;
19
- }
20
- export declare enum ModelType {
21
- CONTACT = "contact",
22
- COMPANY = "company",
23
- CONVERSATION = "conversation"
24
- }
25
- export declare enum DataType {
26
- STRING = "string",
27
- INTEGER = "integer",
28
- FLOAT = "float",
29
- BOOLEAN = "boolean",
30
- DATE = "date"
31
- }
32
- //# sourceMappingURL=dataAttribute.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataAttribute.types.d.ts","sourceRoot":"","sources":["../../../lib/dataAttribute/dataAttribute.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,QAAQ,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oBAAY,SAAS;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,YAAY,iBAAiB;CAChC;AAED,oBAAY,QAAQ;IAChB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;CAChB"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataType = exports.ModelType = void 0;
4
- var ModelType;
5
- (function (ModelType) {
6
- ModelType["CONTACT"] = "contact";
7
- ModelType["COMPANY"] = "company";
8
- ModelType["CONVERSATION"] = "conversation";
9
- })(ModelType = exports.ModelType || (exports.ModelType = {}));
10
- var DataType;
11
- (function (DataType) {
12
- DataType["STRING"] = "string";
13
- DataType["INTEGER"] = "integer";
14
- DataType["FLOAT"] = "float";
15
- DataType["BOOLEAN"] = "boolean";
16
- DataType["DATE"] = "date";
17
- })(DataType = exports.DataType || (exports.DataType = {}));
18
- //# sourceMappingURL=dataAttribute.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataAttribute.types.js","sourceRoot":"","sources":["../../../lib/dataAttribute/dataAttribute.types.ts"],"names":[],"mappings":";;;AAqBA,IAAY,SAIX;AAJD,WAAY,SAAS;IACjB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;IACnB,0CAA6B,CAAA;AACjC,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAED,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;IACnB,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,yBAAa,CAAA;AACjB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
@@ -1,33 +0,0 @@
1
- import { Client } from '.';
2
- import { DataAttributeObject, ModelType } from './dataAttribute/dataAttribute.types';
3
- export default class DataAttribute {
4
- private readonly client;
5
- readonly baseUrl = "data_attributes";
6
- constructor(client: Client);
7
- create({ name, model, dataType: data_type, description, options, }: CreateDataAttributeData): Promise<DataAttributeObject>;
8
- update({ archived, description, id, options }: UpdateDataAttributeData): Promise<DataAttributeObject>;
9
- list({ model, includeArchived: include_archived }: ListDataAttributeData): Promise<ListAllResponse>;
10
- }
11
- interface CreateDataAttributeData {
12
- name: DataAttributeObject['name'];
13
- model: DataAttributeObject['model'];
14
- dataType: DataAttributeObject['data_type'];
15
- description?: DataAttributeObject['description'];
16
- options?: DataAttributeObject['options'];
17
- }
18
- interface UpdateDataAttributeData {
19
- id: string;
20
- archived?: DataAttributeObject['archived'];
21
- description?: DataAttributeObject['description'];
22
- options?: DataAttributeObject['options'];
23
- }
24
- interface ListDataAttributeData {
25
- model?: ModelType;
26
- includeArchived?: boolean;
27
- }
28
- interface ListAllResponse {
29
- type: 'list';
30
- data: DataAttributeObject[];
31
- }
32
- export {};
33
- //# sourceMappingURL=dataAttribute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataAttribute.d.ts","sourceRoot":"","sources":["../../lib/dataAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAC3B,OAAO,EACH,mBAAmB,EACnB,SAAS,EACZ,MAAM,qCAAqC,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,aAAa;IAGlB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAgB,OAAO,qBAAqB;gBAEf,MAAM,EAAE,MAAM;IAI3C,MAAM,CAAC,EACH,IAAI,EACJ,KAAK,EACL,QAAQ,EAAE,SAAS,EACnB,WAAW,EACX,OAAO,GACV,EAAE,uBAAuB;IAc1B,MAAM,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,uBAAuB;IAYtE,IAAI,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,EAAE,qBAAqB;CAW3E;AAED,UAAU,uBAAuB;IAC7B,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAClC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC5C;AAED,UAAU,uBAAuB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC5C;AAED,UAAU,qBAAqB;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,UAAU,eAAe;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,mBAAmB,EAAE,CAAC;CAC/B"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var DataAttribute = /** @class */ (function () {
4
- function DataAttribute(client) {
5
- this.client = client;
6
- this.baseUrl = 'data_attributes';
7
- this.client = client;
8
- }
9
- DataAttribute.prototype.create = function (_a) {
10
- var name = _a.name, model = _a.model, data_type = _a.dataType, description = _a.description, options = _a.options;
11
- var data = {
12
- name: name,
13
- model: model,
14
- data_type: data_type,
15
- description: description,
16
- options: options,
17
- };
18
- return this.client.post({
19
- url: "/".concat(this.baseUrl),
20
- data: data,
21
- });
22
- };
23
- DataAttribute.prototype.update = function (_a) {
24
- var archived = _a.archived, description = _a.description, id = _a.id, options = _a.options;
25
- var data = {
26
- archived: archived,
27
- description: description,
28
- options: options,
29
- };
30
- return this.client.put({
31
- url: "/".concat(this.baseUrl, "/").concat(id),
32
- data: data,
33
- });
34
- };
35
- DataAttribute.prototype.list = function (_a) {
36
- var model = _a.model, include_archived = _a.includeArchived;
37
- var queryParams = {
38
- model: model,
39
- include_archived: include_archived,
40
- };
41
- return this.client.get({
42
- url: "/".concat(this.baseUrl),
43
- params: queryParams,
44
- });
45
- };
46
- return DataAttribute;
47
- }());
48
- exports.default = DataAttribute;
49
- //# sourceMappingURL=dataAttribute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dataAttribute.js","sourceRoot":"","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AAAD,CAAC,AAlDD,IAkDC"}
@@ -1,9 +0,0 @@
1
- import { AxiosResponse } from 'axios';
2
- export declare class BadResponseError extends Error {
3
- readonly message: string;
4
- readonly body: AxiosResponse['data'];
5
- readonly headers: AxiosResponse['headers'];
6
- readonly statusCode: AxiosResponse['status'];
7
- constructor(message: string, body: AxiosResponse['data'], headers: AxiosResponse['headers'], statusCode: AxiosResponse['status']);
8
- }
9
- //# sourceMappingURL=badResponse.error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badResponse.error.d.ts","sourceRoot":"","sources":["../../../lib/errors/badResponse.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,qBAAa,gBAAiB,SAAQ,KAAK;IAEnC,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC;gBAHnC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,EACjC,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC;CAOnD"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.BadResponseError = void 0;
19
- var BadResponseError = /** @class */ (function (_super) {
20
- __extends(BadResponseError, _super);
21
- function BadResponseError(message, body, headers, statusCode) {
22
- var _this = _super.call(this, message) || this;
23
- _this.message = message;
24
- _this.body = body;
25
- _this.headers = headers;
26
- _this.statusCode = statusCode;
27
- _this.body = body;
28
- _this.headers = headers;
29
- _this.statusCode = statusCode;
30
- return _this;
31
- }
32
- return BadResponseError;
33
- }(Error));
34
- exports.BadResponseError = BadResponseError;
35
- //# sourceMappingURL=badResponse.error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badResponse.error.js","sourceRoot":"","sources":["../../../lib/errors/badResponse.error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEA;IAAsC,oCAAK;IACvC,0BACa,OAAe,EACf,IAA2B,EAC3B,OAAiC,EACjC,UAAmC;QAJhD,YAMI,kBAAM,OAAO,CAAC,SAIjB;QATY,aAAO,GAAP,OAAO,CAAQ;QACf,UAAI,GAAJ,IAAI,CAAuB;QAC3B,aAAO,GAAP,OAAO,CAA0B;QACjC,gBAAU,GAAV,UAAU,CAAyB;QAG5C,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IACL,uBAAC;AAAD,CAAC,AAZD,CAAsC,KAAK,GAY1C;AAZY,4CAAgB"}
@@ -1,29 +0,0 @@
1
- import { Timestamp } from '../common/common.types';
2
- export interface SummaryEventObject {
3
- name: string;
4
- first: Date | string;
5
- last: Date | string;
6
- count: number;
7
- description: string | null;
8
- }
9
- export interface EventObject {
10
- event_name: string;
11
- created_at: Timestamp;
12
- user_id?: string;
13
- id?: string;
14
- email?: string;
15
- metadata?: Metadata;
16
- }
17
- export interface Metadata {
18
- [x: string]: string | number | RichLink | MonetaryAmount;
19
- }
20
- declare type RichLink = {
21
- url: string;
22
- value: string;
23
- };
24
- declare type MonetaryAmount = {
25
- amount: number;
26
- currency: string;
27
- };
28
- export {};
29
- //# sourceMappingURL=event.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.types.d.ts","sourceRoot":"","sources":["../../../lib/event/event.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC;IACrB,IAAI,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACvB;AAED,MAAM,WAAW,QAAQ;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,CAAC;CAC5D;AAED,aAAK,QAAQ,GAAG;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,aAAK,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=event.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.types.js","sourceRoot":"","sources":["../../../lib/event/event.types.ts"],"names":[],"mappings":""}
package/dist/event.d.ts DELETED
@@ -1,41 +0,0 @@
1
- import { Client } from '.';
2
- import { EventObject, SummaryEventObject } from './event/event.types';
3
- export default class Event {
4
- private readonly client;
5
- readonly baseUrl = "events";
6
- constructor(client: Client);
7
- create({ eventName: event_name, createdAt: created_at, userId: user_id, id, email, metadata, }: CreateEventData): Promise<void>;
8
- listBy({ userId: user_id, email, intercomUserId: intercom_user_id, perPage: per_page, summary, }: ListParams): Promise<ListParamsWithSummaryResponse> | Promise<ListParamsResponse>;
9
- }
10
- interface CreateEventData {
11
- eventName: EventObject['event_name'];
12
- createdAt: EventObject['created_at'];
13
- userId?: EventObject['user_id'];
14
- id?: EventObject['id'];
15
- email?: EventObject['email'];
16
- metadata?: EventObject['metadata'];
17
- }
18
- interface ListParams {
19
- userId?: EventObject['user_id'];
20
- email?: EventObject['email'];
21
- intercomUserId?: string;
22
- perPage?: number;
23
- summary?: boolean;
24
- }
25
- interface ListParamsResponse {
26
- type: 'event.list';
27
- events: EventObject[];
28
- pages: {
29
- next?: string;
30
- since?: string;
31
- };
32
- }
33
- interface ListParamsWithSummaryResponse {
34
- type: 'event.summary';
35
- email: string;
36
- intercom_user_id: string;
37
- user_id: string;
38
- events: SummaryEventObject[];
39
- }
40
- export {};
41
- //# sourceMappingURL=event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../lib/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEtE,MAAM,CAAC,OAAO,OAAO,KAAK;IAGV,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAgB,OAAO,YAAY;gBAEN,MAAM,EAAE,MAAM;IAG3C,MAAM,CAAC,EACH,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,OAAO,EACf,EAAE,EACF,KAAK,EACL,QAAQ,GACX,EAAE,eAAe;IAYlB,MAAM,CAAC,EACH,MAAM,EAAE,OAAO,EACf,KAAK,EACL,cAAc,EAAE,gBAAgB,EAChC,OAAO,EAAE,QAAQ,EACjB,OAAO,GACV,EAAE,UAAU;CAoBhB;AAED,UAAU,eAAe;IACrB,SAAS,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,EAAE,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CACtC;AAED,UAAU,UAAU;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,UAAU,kBAAkB;IACxB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,KAAK,EAAE;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACL;AACD,UAAU,6BAA6B;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAChC"}
package/dist/event.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var Event = /** @class */ (function () {
4
- function Event(client) {
5
- this.client = client;
6
- this.baseUrl = 'events';
7
- this.client = client;
8
- }
9
- Event.prototype.create = function (_a) {
10
- var event_name = _a.eventName, created_at = _a.createdAt, user_id = _a.userId, id = _a.id, email = _a.email, metadata = _a.metadata;
11
- var data = {
12
- event_name: event_name,
13
- created_at: created_at,
14
- user_id: user_id,
15
- id: id,
16
- email: email,
17
- metadata: metadata,
18
- };
19
- return this.client.post({ url: "/".concat(this.baseUrl), data: data });
20
- };
21
- Event.prototype.listBy = function (_a) {
22
- var user_id = _a.userId, email = _a.email, intercom_user_id = _a.intercomUserId, per_page = _a.perPage, summary = _a.summary;
23
- var params = {
24
- type: 'user',
25
- user_id: user_id,
26
- email: email,
27
- intercom_user_id: intercom_user_id,
28
- per_page: per_page,
29
- summary: summary,
30
- };
31
- return summary
32
- ? this.client.get({
33
- url: "/".concat(this.baseUrl),
34
- params: params,
35
- })
36
- : this.client.get({
37
- url: "/".concat(this.baseUrl),
38
- params: params,
39
- });
40
- };
41
- return Event;
42
- }());
43
- exports.default = Event;
44
- //# sourceMappingURL=event.js.map
package/dist/event.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../../lib/event.ts"],"names":[],"mappings":";;AAGA;IAGI,eAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAF3B,YAAO,GAAG,QAAQ,CAAC;QAG/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IACD,sBAAM,GAAN,UAAO,EAOW;YANH,UAAU,eAAA,EACV,UAAU,eAAA,EACb,OAAO,YAAA,EACf,EAAE,QAAA,EACF,KAAK,WAAA,EACL,QAAQ,cAAA;QAER,IAAM,IAAI,GAAgB;YACtB,UAAU,YAAA;YACV,UAAU,YAAA;YACV,OAAO,SAAA;YACP,EAAE,IAAA;YACF,KAAK,OAAA;YACL,QAAQ,UAAA;SACX,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,EAAE,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,sBAAM,GAAN,UAAO,EAMM;YALD,OAAO,YAAA,EACf,KAAK,WAAA,EACW,gBAAgB,oBAAA,EACvB,QAAQ,aAAA,EACjB,OAAO,aAAA;QAEP,IAAM,MAAM,GAAG;YACX,IAAI,EAAE,MAAM;YACZ,OAAO,SAAA;YACP,KAAK,OAAA;YACL,gBAAgB,kBAAA;YAChB,QAAQ,UAAA;YACR,OAAO,SAAA;SACV,CAAC;QAEF,OAAO,OAAO;YACV,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAgC;gBAC3C,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;gBACvB,MAAM,QAAA;aACT,CAAC;YACJ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAqB;gBAChC,GAAG,EAAE,WAAI,IAAI,CAAC,OAAO,CAAE;gBACvB,MAAM,QAAA;aACT,CAAC,CAAC;IACb,CAAC;IACL,YAAC;AAAD,CAAC,AAnDD,IAmDC"}
@@ -1,23 +0,0 @@
1
- import { ArticleObject, Locales } from '../index';
2
- export declare type CollectionObject = {
3
- type: 'collection';
4
- name: string;
5
- icon: string;
6
- order: number;
7
- } & Pick<ArticleObject, 'id' | 'workspace_id' | 'description' | 'created_at' | 'updated_at' | 'url' | 'default_locale' | 'translated_content'>;
8
- export declare type SectionObject = {
9
- type: 'section';
10
- parent_id: number;
11
- } & Omit<CollectionObject, 'type'>;
12
- export declare type GroupTranslatedContentObject = {
13
- type: 'group_translated_content';
14
- } & Partial<HelpCenterLocalesMapping>;
15
- export declare type HelpCenterLocalesMapping = {
16
- [key in Locales]: GroupContentObject;
17
- };
18
- export declare type GroupContentObject = {
19
- name: string;
20
- description: string;
21
- type?: 'group_content';
22
- };
23
- //# sourceMappingURL=helpCenter.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpCenter.types.d.ts","sourceRoot":"","sources":["../../../lib/helpCenter/helpCenter.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAElD,oBAAY,gBAAgB,GAAG;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB,GAAG,IAAI,CACJ,aAAa,EACX,IAAI,GACJ,cAAc,GACd,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,KAAK,GACL,gBAAgB,GAChB,oBAAoB,CACzB,CAAC;AAEF,oBAAY,aAAa,GAAG;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACrB,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAEnC,oBAAY,4BAA4B,GAAG;IACvC,IAAI,EAAE,0BAA0B,CAAC;CACpC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAEtC,oBAAY,wBAAwB,GAAG;KAClC,GAAG,IAAI,OAAO,GAAG,kBAAkB;CACvC,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=helpCenter.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpCenter.types.js","sourceRoot":"","sources":["../../../lib/helpCenter/helpCenter.types.ts"],"names":[],"mappings":""}
@@ -1,58 +0,0 @@
1
- import { Client } from '.';
2
- import { GenericDeletedResponse, OperationById, Paginated } from './common/common.types';
3
- import { CollectionObject, GroupTranslatedContentObject, SectionObject } from './helpCenter/helpCenter.types';
4
- export default class HelpCenter {
5
- readonly collections: Collection;
6
- readonly sections: Section;
7
- constructor(client: Client);
8
- }
9
- declare class Collection {
10
- private readonly client;
11
- readonly baseUrl = "help_center/collections";
12
- constructor(client: Client);
13
- create({ name, description, translatedContent }: CreateCollectionData): Promise<CollectionObject>;
14
- find({ id }: CollectionFindByIdData): Promise<CollectionObject>;
15
- update({ id, name, description, translatedContent }: UpdateCollectionData): Promise<CollectionObject>;
16
- delete({ id }: CollectionDeleteByIdData): Promise<CollectionDeleteByIdResponse>;
17
- list({ page, perPage: per_page }: CollectionListData): Promise<CollectionListResponse>;
18
- }
19
- interface CreateCollectionData {
20
- name: string;
21
- description?: string;
22
- translatedContent?: Omit<GroupTranslatedContentObject, 'type'>;
23
- }
24
- declare type CollectionFindByIdData = OperationById;
25
- declare type UpdateCollectionData = Partial<CreateCollectionData> & OperationById;
26
- declare type CollectionDeleteByIdData = OperationById;
27
- declare type CollectionDeleteByIdResponse = GenericDeletedResponse<'collection'>;
28
- declare type CollectionListData = {
29
- page?: number;
30
- perPage?: number;
31
- };
32
- declare type CollectionListResponse = Paginated<CollectionObject>;
33
- declare class Section {
34
- private readonly client;
35
- readonly baseUrl = "help_center/sections";
36
- constructor(client: Client);
37
- create({ name, parentId, translatedContent }: CreateSectionData): Promise<SectionObject>;
38
- find({ id }: SectionFindByIdData): Promise<SectionObject>;
39
- update({ id, name, parentId, translatedContent }: UpdateSectionData): Promise<SectionObject>;
40
- delete({ id }: SectionDeleteByIdData): Promise<SectionDeleteByIdResponse>;
41
- list({ page, perPage: per_page }: SectionListData): Promise<SectionListResponse>;
42
- }
43
- interface CreateSectionData {
44
- name: string;
45
- parentId: string;
46
- translatedContent?: Omit<GroupTranslatedContentObject, 'type'>;
47
- }
48
- declare type SectionFindByIdData = OperationById;
49
- declare type UpdateSectionData = Partial<CreateSectionData> & OperationById;
50
- declare type SectionDeleteByIdData = OperationById;
51
- declare type SectionDeleteByIdResponse = GenericDeletedResponse<'section'>;
52
- declare type SectionListData = {
53
- page?: number;
54
- perPage?: number;
55
- };
56
- declare type SectionListResponse = Paginated<SectionObject>;
57
- export {};
58
- //# sourceMappingURL=helpCenter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpCenter.d.ts","sourceRoot":"","sources":["../../lib/helpCenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;AAC3B,OAAO,EACH,sBAAsB,EACtB,aAAa,EACb,SAAS,EACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,gBAAgB,EAChB,4BAA4B,EAC5B,aAAa,EAChB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,SAAgB,WAAW,EAAE,UAAU,CAAC;IACxC,SAAgB,QAAQ,EAAE,OAAO,CAAC;gBAEtB,MAAM,EAAE,MAAM;CAI7B;AAED,cAAM,UAAU;IAGA,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAgB,OAAO,6BAA6B;gBAEvB,MAAM,EAAE,MAAM;IAI3C,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,oBAAoB;IAYrE,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,sBAAsB;IAKnC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,oBAAoB;IAYzE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,wBAAwB;IAKvC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,kBAAkB;CAWvD;AAED,UAAU,oBAAoB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,IAAI,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;CAClE;AAED,aAAK,sBAAsB,GAAG,aAAa,CA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