@communi/chat-api-client-typescript 2.6.5 → 2.6.7
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/index.js +1 -1
- package/package.json +1 -1
- package/src/api-version.js +1 -1
- package/src/axios.d.ts +2 -1
- package/src/axios.js +1 -1
- package/src/client.d.ts +4 -1
- package/src/client.js +1 -1
- package/src/config/config.js +1 -1
- package/src/config/index.js +1 -1
- package/src/demo.js +1 -1
- package/src/guest/guest.js +1 -1
- package/src/guest/index.js +1 -1
- package/src/guest/types.js +1 -1
- package/src/index.js +1 -1
- package/src/jwt.js +1 -1
- package/src/message/index.js +1 -1
- package/src/message/message.js +1 -1
- package/src/message/types.d.ts +12 -1
- package/src/message/types.js +1 -1
- package/src/notification/index.js +1 -1
- package/src/notification/notification.d.ts +2 -1
- package/src/notification/notification.js +1 -1
- package/src/notification/types.js +1 -1
- package/src/preview-link/index.js +1 -1
- package/src/preview-link/preview-link.js +1 -1
- package/src/preview-link/types.js +1 -1
- package/src/search/index.js +1 -1
- package/src/search/search.js +1 -1
- package/src/search/types.js +1 -1
- package/src/session/index.js +1 -1
- package/src/session/session.d.ts +25 -1
- package/src/session/session.js +1 -1
- package/src/session/types.d.ts +29 -0
- package/src/session/types.js +1 -1
- package/src/sticker/index.js +1 -1
- package/src/sticker/sticker.js +1 -1
- package/src/sticker/types.js +1 -1
- package/src/super-groups/index.js +1 -1
- package/src/super-groups/super-groups.js +1 -1
- package/src/tag/index.js +1 -1
- package/src/tag/tag.js +1 -1
- package/src/tag/types.js +1 -1
- package/src/tag-category/category.js +1 -1
- package/src/tag-category/index.js +1 -1
- package/src/tag-category/types.js +1 -1
- package/src/thread/index.js +1 -1
- package/src/thread/thread.d.ts +2 -2
- package/src/thread/thread.js +1 -1
- package/src/thread/types.d.ts +6 -0
- package/src/thread/types.js +1 -1
- package/src/types.d.ts +1 -0
- package/src/types.js +1 -1
- package/src/upload/index.js +1 -1
- package/src/upload/types.js +1 -1
- package/src/upload/upload.js +1 -1
- package/src/user/index.js +1 -1
- package/src/user/types.d.ts +10 -0
- package/src/user/types.js +1 -1
- package/src/user/user.d.ts +3 -1
- package/src/user/user.js +1 -1
- package/src/utils.js +1 -1
package/src/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var e=h;function h(J,z){var Y=r();return h=function(b,s){b=b-0x147;var n=Y[b];return n;},h(J,z);}function r(){var W=['24661pGsCHG','respo','5777151YKdQtl','11Ckwwqr','9mPqmsw','ototy','type','31662144NsafXX','setPr','38WmhPrJ','6EfcQzI','12022073STHIxW','4737416LnURzV','4hKjFJD','proto','http_','nse','12767960xmOtmR','code','2398190wtNNpq','peOf'];r=function(){return W;};return r();}(function(J,z){var n=h,Y=J();while(!![]){try{var b=parseInt(n(0x153))/0x1*(parseInt(n(0x147))/0x2)+parseInt(n(0x155))/0x3*(parseInt(n(0x14b))/0x4)+-parseInt(n(0x151))/0x5+-parseInt(n(0x148))/0x6*(parseInt(n(0x149))/0x7)+-parseInt(n(0x14a))/0x8*(parseInt(n(0x157))/0x9)+-parseInt(n(0x14f))/0xa*(parseInt(n(0x156))/0xb)+parseInt(n(0x15a))/0xc;if(b===z)break;else Y['push'](Y['shift']());}catch(s){Y['push'](Y['shift']());}}}(r,0xec052));export class PSResponseError extends Error{[e(0x14d)+e(0x150)];[e(0x154)+e(0x14e)];constructor(J){var u=e;super(J),Object[u(0x15b)+u(0x158)+u(0x152)](this,PSResponseError[u(0x14c)+u(0x159)]);}}
|
package/src/upload/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function h(J,z){var Y=r();return h=function(b,s){b=b-0x90;var n=Y[b];return n;},h(J,z);}function r(){var e=['4728216xKeJct','1084990dSYeVD','2772240kiDWnk','7JbHLVy','36757728UXmWEa','831535nFCPSQ','1twpWHr','2305684SVtIix','5849560DUUZYC'];r=function(){return e;};return r();}(function(J,z){var n=h,Y=J();while(!![]){try{var b=-parseInt(n(0x93))/0x1*(parseInt(n(0x97))/0x2)+-parseInt(n(0x98))/0x3+-parseInt(n(0x94))/0x4+parseInt(n(0x92))/0x5+-parseInt(n(0x96))/0x6+parseInt(n(0x90))/0x7*(-parseInt(n(0x95))/0x8)+parseInt(n(0x91))/0x9;if(b===z)break;else Y['push'](Y['shift']());}catch(s){Y['push'](Y['shift']());}}}(r,0xa8090));export*from'./upload';export*from'./types';
|
package/src/upload/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const e=h;function h(J,z){const Y=r();return h=function(b,s){b=b-0x17b;let n=Y[b];return n;},h(J,z);}function r(){const u=['durat','name','6kMUPRT','70323KXPJhe','bucke','heigh','114IDRGMH','717408smZLYn','6uSPEWS','3630325qeGvAe','4596725ninLoq','width','320RCxtzJ','3692032kMwcXN','6922629urJzjd','4791mNHwFW','path','ion','size'];r=function(){return u;};return r();}(function(J,z){const n=h,Y=J();while(!![]){try{const b=parseInt(n(0x180))/0x1*(-parseInt(n(0x18a))/0x2)+-parseInt(n(0x18c))/0x3*(-parseInt(n(0x18b))/0x4)+parseInt(n(0x18d))/0x5+parseInt(n(0x186))/0x6*(parseInt(n(0x17b))/0x7)+-parseInt(n(0x17e))/0x8+-parseInt(n(0x17f))/0x9+parseInt(n(0x17d))/0xa*(parseInt(n(0x187))/0xb);if(b===z)break;else Y['push'](Y['shift']());}catch(s){Y['push'](Y['shift']());}}}(r,0x6bf88));export const mapUploadDataDtoToCreateMessageBodyMetadataRequestDto=(J,z)=>({'id':J['id'],'name':J[e(0x185)],'path':J[e(0x181)],'bucket':J[e(0x188)+'t'],'size':J[e(0x183)],'width':J[e(0x17c)],'height':J[e(0x189)+'t'],'duration':J[e(0x184)+e(0x182)],'type':z});
|
package/src/upload/upload.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var u=h;(function(z,Y){var e=h,b=z();while(!![]){try{var s=-parseInt(e(0x179))/0x1+parseInt(e(0x180))/0x2+parseInt(e(0x187))/0x3*(-parseInt(e(0x17a))/0x4)+parseInt(e(0x183))/0x5*(parseInt(e(0x181))/0x6)+parseInt(e(0x18c))/0x7*(-parseInt(e(0x174))/0x8)+-parseInt(e(0x189))/0x9+-parseInt(e(0x17d))/0xa*(-parseInt(e(0x175))/0xb);if(s===Y)break;else b['push'](b['shift']());}catch(n){b['push'](b['shift']());}}}(r,0x33cb3));function h(J,z){var Y=r();return h=function(b,s){b=b-0x174;var n=Y[b];return n;},h(J,z);}import{PS_UPLOAD_API_VERSION as J}from'../api-version';function r(){var g=['/vide','dFile','43535gXqVhg','16DZzukE','/imag','/file','852670ytsSyr','data','axios','591850hbEqWa','30hgpYwF','uploa','169790JsOauA','part/','dVide','form-','29478pwABJm','post','1652274FywjLb','Deleg','dImag','182VKGVLa','multi','74752sPDpuJ','33dsGdAB','ate'];r=function(){return g;};return r();}export class PSChatUploadApiImpl{[u(0x17f)+u(0x18a)+u(0x176)];constructor(z){var W=u;this[W(0x17f)+W(0x18a)+W(0x176)]=z;}[u(0x182)+u(0x18b)+'e'](z,Y){var v=u;return this[v(0x17f)+v(0x18a)+v(0x176)][v(0x188)](J+(v(0x17b)+'es'),z,{'onUploadProgress':Y,'headers':{'Content-Type':v(0x18d)+v(0x184)+v(0x186)+v(0x17e)},'timeout':0xea60});}[u(0x182)+u(0x185)+'o'](z,Y){var f=u;return this[f(0x17f)+f(0x18a)+f(0x176)][f(0x188)](J+(f(0x177)+'os'),z,{'onUploadProgress':Y,'headers':{'Content-Type':f(0x18d)+f(0x184)+f(0x186)+f(0x17e)},'timeout':0xea60});}[u(0x182)+u(0x178)](z,Y){var i=u;return this[i(0x17f)+i(0x18a)+i(0x176)][i(0x188)](J+(i(0x17c)+'s'),z,{'onUploadProgress':Y,'headers':{'Content-Type':i(0x18d)+i(0x184)+i(0x186)+i(0x17e)},'timeout':0xea60});}}
|
package/src/user/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function r(){var e=['2PFfxck','6763183YlzsXv','3663808fieoWD','11867220QJsEDO','535HGDTVM','15116DrtHzG','10nUxvHr','217266hEHmVa','1490844prwUrX','2403024UdPCps'];r=function(){return e;};return r();}function h(J,z){var Y=r();return h=function(b,s){b=b-0x9b;var n=Y[b];return n;},h(J,z);}(function(J,z){var n=h,Y=J();while(!![]){try{var b=parseInt(n(0xa1))/0x1+-parseInt(n(0xa4))/0x2*(parseInt(n(0xa2))/0x3)+parseInt(n(0x9f))/0x4*(parseInt(n(0x9e))/0x5)+parseInt(n(0xa3))/0x6+parseInt(n(0x9b))/0x7+parseInt(n(0x9c))/0x8+parseInt(n(0x9d))/0x9*(-parseInt(n(0xa0))/0xa);if(b===z)break;else Y['push'](Y['shift']());}catch(s){Y['push'](Y['shift']());}}}(r,0x99fd4));export*from'./user';export*from'./types';
|
package/src/user/types.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export type PSUserDto = {
|
|
|
26
26
|
alias?: string;
|
|
27
27
|
verified?: boolean;
|
|
28
28
|
status?: PSUserStatus;
|
|
29
|
+
block_status?: PSUserBlockStatus;
|
|
29
30
|
};
|
|
30
31
|
export type PSUserLastOnlineTimeDto = {
|
|
31
32
|
ext_user_id: string;
|
|
@@ -34,3 +35,12 @@ export type PSUserLastOnlineTimeDto = {
|
|
|
34
35
|
export type PSUserStateDto = {
|
|
35
36
|
state: number;
|
|
36
37
|
};
|
|
38
|
+
export declare enum PSUserBlockStatus {
|
|
39
|
+
NO_BLOCK = 0,
|
|
40
|
+
BLOCKED_BY_ME = 1,
|
|
41
|
+
BLOCKED_BY_PARTNER = 2
|
|
42
|
+
}
|
|
43
|
+
export declare enum PSBlockAction {
|
|
44
|
+
BLOCK = 1,
|
|
45
|
+
UN_BLOCK = 2
|
|
46
|
+
}
|
package/src/user/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(J,z){var n=h,Y=J();while(!![]){try{var b=-parseInt(n(0x136))/0x1*(parseInt(n(0x133))/0x2)+-parseInt(n(0x137))/0x3+parseInt(n(0x12f))/0x4+parseInt(n(0x12b))/0x5+parseInt(n(0x125))/0x6*(-parseInt(n(0x134))/0x7)+-parseInt(n(0x141))/0x8*(-parseInt(n(0x13f))/0x9)+parseInt(n(0x132))/0xa*(parseInt(n(0x12a))/0xb);if(b===z)break;else Y['push'](Y['shift']());}catch(s){Y['push'](Y['shift']());}}}(r,0x6bbd2));export var PSUserType;(function(J){var e=h;J[J[e(0x139)]=0x1]=e(0x139),J[J[e(0x13e)]=0x2]=e(0x13e),J[J[e(0x129)+e(0x13d)]=0x5]=e(0x129)+e(0x13d),J[J[e(0x123)]=0x6]=e(0x123);}(PSUserType||(PSUserType={})));export var PSUserStatus;function r(){var g=['BLOCK','USER','_ME','ACTIV','ILABL','ENT','BOT','8253RHJaMJ','IVATE','6488LDeJVS','ABLE','GUEST','NER','719826unsiAb','NO_BL','OCK','UNAVA','CS_AG','33YdXJNS','1703285LdbsTk','ED_BY','MUTED','UN_BL','2055000CsoLut','AVAIL','_PART','1735520VKkocz','2QcxeNF','28pAeVMD','DEACT','659894soBgDm','1613022rjVwVR'];r=function(){return g;};return r();}(function(J){var u=h;J[J[u(0x135)+u(0x140)+'D']=0x2]=u(0x135)+u(0x140)+'D';}(PSUserStatus||(PSUserStatus={})));export var MEMBER_STATUS;(function(J){var W=h;J[J[W(0x13b)+'E']=0x1]=W(0x13b)+'E',J[J[W(0x12d)]=0x2]=W(0x12d);}(MEMBER_STATUS||(MEMBER_STATUS={})));export var USER_STATE;(function(J){var v=h;J[J[v(0x130)+v(0x142)]=0x1]=v(0x130)+v(0x142),J[J[v(0x128)+v(0x13c)+'E']=0x2]=v(0x128)+v(0x13c)+'E';}(USER_STATE||(USER_STATE={})));export var PSUserBlockStatus;function h(J,z){var Y=r();return h=function(b,s){b=b-0x123;var n=Y[b];return n;},h(J,z);}(function(J){var f=h;J[J[f(0x126)+f(0x127)]=0x0]=f(0x126)+f(0x127),J[J[f(0x138)+f(0x12c)+f(0x13a)]=0x1]=f(0x138)+f(0x12c)+f(0x13a),J[J[f(0x138)+f(0x12c)+f(0x131)+f(0x124)]=0x2]=f(0x138)+f(0x12c)+f(0x131)+f(0x124);}(PSUserBlockStatus||(PSUserBlockStatus={})));export var PSBlockAction;(function(J){var i=h;J[J[i(0x138)]=0x1]=i(0x138),J[J[i(0x12e)+i(0x127)]=0x2]=i(0x12e)+i(0x127);}(PSBlockAction||(PSBlockAction={})));
|
package/src/user/user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IPSChatAxiosDelegate } from '../axios';
|
|
2
2
|
import { PSResponse } from '../types';
|
|
3
|
-
import { PSUserDto, PSUserLastOnlineTimeDto, PSUserStateDto, USER_STATE } from './types';
|
|
3
|
+
import { PSBlockAction, PSUserDto, PSUserLastOnlineTimeDto, PSUserStateDto, USER_STATE } from './types';
|
|
4
4
|
export declare const PS_FETCH_USER_BY_IDS_MAX = 10;
|
|
5
5
|
export interface IPSChatUserApi {
|
|
6
6
|
ping(): Promise<PSResponse<any>>;
|
|
@@ -10,6 +10,7 @@ export interface IPSChatUserApi {
|
|
|
10
10
|
mqttPing(requestId: string): Promise<PSResponse<any>>;
|
|
11
11
|
fetchState(): Promise<PSResponse<PSUserStateDto>>;
|
|
12
12
|
updateState(state: number): Promise<PSResponse<any>>;
|
|
13
|
+
setBlockUser(userId: string, type: PSBlockAction): Promise<PSResponse<any>>;
|
|
13
14
|
}
|
|
14
15
|
export declare class PSChatUserApiImpl implements IPSChatUserApi {
|
|
15
16
|
private axiosDelegate;
|
|
@@ -21,4 +22,5 @@ export declare class PSChatUserApiImpl implements IPSChatUserApi {
|
|
|
21
22
|
mqttPing(requestId: string): Promise<PSResponse<any>>;
|
|
22
23
|
fetchState(): Promise<PSResponse<PSUserStateDto>>;
|
|
23
24
|
updateState(state: USER_STATE): Promise<PSResponse<any>>;
|
|
25
|
+
setBlockUser(userId: string, type: PSBlockAction): Promise<PSResponse<any>>;
|
|
24
26
|
}
|
package/src/user/user.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const f=J;(function(s,n){const v=J,e=s();while(!![]){try{const u=parseInt(v(0xb2))/0x1+parseInt(v(0x8c))/0x2+-parseInt(v(0x8f))/0x3+-parseInt(v(0x9d))/0x4+-parseInt(v(0xa5))/0x5*(parseInt(v(0x9e))/0x6)+parseInt(v(0x98))/0x7+parseInt(v(0xb0))/0x8*(parseInt(v(0xad))/0x9);if(u===n)break;else e['push'](e['shift']());}catch(W){e['push'](e['shift']());}}}(h,0x68117));function J(r,z){const Y=h();return J=function(b,s){b=b-0x8b;let n=Y[b];return n;},J(r,z);}import{PS_CHAT_API_VERSION as z,PS_DESK_API_VERSION as Y,PS_USER_API_VERSION as b}from'../api-version';export const PS_FETCH_USER_BY_IDS_MAX=0xa;function h(){const Z=['setBl','ser_i','join','mqttP','put','post','/user','axios','1588237GpCrDj','Users','/asta','yIds','lock','1643348BrniyN','6jdQvjm','get','UserB','ping','nts/b','s/mqt','Onlin','638830lPLLQv','_user','r?ext','ds=','icipa','/puse','ing','ine?u','2502FEUymd','Deleg','t-pin','14056RlqJWU','eStat','739121EmFMIY','/part','updat','s/me-','ockUs','s/onl','yId','fetch','ate','508236fHqDMS','_ids=','State','2231130HYMeZe'];h=function(){return Z;};return h();}export class PSChatUserApiImpl{[f(0x97)+f(0xae)+f(0x8b)];constructor(s){const g=f;this[g(0x97)+g(0xae)+g(0x8b)]=s;}[f(0xa1)](){const X=f;return this[X(0x97)+X(0xae)+X(0x8b)][X(0x95)](z+(X(0x96)+X(0xb5)+X(0xa1)));}[f(0xb9)+f(0x99)+f(0xa4)+'e'](s){const A=f;return this[A(0x97)+A(0xae)+A(0x8b)][A(0x9f)](z+(A(0x96)+A(0xb7)+A(0xac)+A(0x91)+A(0xa8))+s[A(0x92)](','));}[f(0xb9)+f(0xa0)+f(0xb8)](n,u){const S=f;return this[S(0x97)+S(0xae)+S(0x8b)][S(0x9f)](b+(S(0xaa)+'r/')+n,{'params':{'more_fields':u}});}[f(0xb9)+f(0xa0)+f(0x9b)](s){const j=f;return this[j(0x97)+j(0xae)+j(0x8b)][j(0x9f)](b+(j(0xaa)+j(0xa7)+j(0xa6)+j(0x8d))+s[j(0x92)](','));}[f(0x93)+f(0xab)](s){const m=f;return this[m(0x97)+m(0xae)+m(0x8b)][m(0x95)](z+(m(0x96)+m(0xa3)+m(0xaf)+'g'),null,{'headers':{'X-Piscale-Request-Id':s}});}[f(0xb9)+f(0x8e)](){const V=f;return this[V(0x97)+V(0xae)+V(0x8b)][V(0x9f)](Y+(V(0x9a)+'te'));}[f(0xb4)+f(0xb1)+'e'](s){const x=f;return this[x(0x97)+x(0xae)+x(0x8b)][x(0x94)](Y+(x(0x9a)+'te'),{'state':s});}[f(0x90)+f(0xb6)+'er'](n,u){const O=f;return this[O(0x97)+O(0xae)+O(0x8b)][O(0x95)](z+(O(0xb3)+O(0xa9)+O(0xa2)+O(0x9c)),{'type':u,'user_id':n});}}
|
package/src/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function r(){const f=['647715mJcbzi','.uplo','33147tGeaQv','958883NafuWJ','rejec','://ap','://','2156095fPGRwt','.api.','com','pisca','le.co','16hLnytv','scale','6417270JWovEM','cale.','276718dYgLmo','42irbqll','340NhcQQN','.com/','291328IYzOMM','ad.pi','i.pis','https'];r=function(){return f;};return r();}function h(J,z){const Y=r();return h=function(b,s){b=b-0x18a;let n=Y[b];return n;},h(J,z);}const v=h;(function(J,z){const n=h,Y=J();while(!![]){try{const b=-parseInt(n(0x190))/0x1+parseInt(n(0x19d))/0x2+parseInt(n(0x18d))/0x3*(parseInt(n(0x199))/0x4)+-parseInt(n(0x194))/0x5+parseInt(n(0x19b))/0x6+-parseInt(n(0x19e))/0x7*(parseInt(n(0x1a1))/0x8)+-parseInt(n(0x18f))/0x9*(-parseInt(n(0x19f))/0xa);if(b===z)break;else Y['push'](Y['shift']());}catch(s){Y['push'](Y['shift']());}}}(r,0x8f974));export const generateBaseUrl=J=>{const e=h;let z='';return z=e(0x18c)+e(0x193)+J+(e(0x195)+e(0x197)+e(0x198)+'m/'),z;},generateBaseUploadUrl=J=>{const u=h;let z='';return z=u(0x18c)+u(0x193)+J+(u(0x18e)+u(0x18a)+u(0x19a)+u(0x1a0)),z;},generateGuestUrl=()=>{const W=h;let J='';return J=W(0x18c)+W(0x192)+W(0x18b)+W(0x19c)+W(0x196),J;},errorLogger=async J=>Promise[v(0x191)+'t'](J),requestLogger=J=>J,responseLogger=J=>J;
|