mezon-sdk 2.7.1 → 2.7.3
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 +143 -143
- package/api.ts +392 -0
- package/build.mjs +44 -44
- package/client.ts +409 -327
- package/dist/api.d.ts +68 -0
- package/dist/client.d.ts +173 -74
- package/dist/index.d.ts +18 -18
- package/dist/mezon-sdk.cjs.js +10346 -0
- package/dist/mezon-sdk.esm.mjs +10326 -0
- package/dist/mezon-sdk.iife.js +10348 -0
- package/dist/mezon-sdk.umd.js +11033 -0
- package/dist/session.d.ts +52 -52
- package/dist/socket.d.ts +594 -0
- package/dist/utils.d.ts +3 -3
- package/dist/web_socket_adapter.d.ts +83 -0
- package/index.ts +19 -19
- package/package.json +46 -49
- package/rollup.config.js +40 -40
- package/session.ts +107 -107
- package/socket.ts +1345 -0
- package/tsconfig.json +10 -10
- package/utils.ts +47 -47
- package/web_socket_adapter.ts +159 -0
- package/api.gen.ts +0 -783
- package/dist/api.gen.d.ts +0 -157
- package/dist/satori-js.cjs.js +0 -1456
- package/dist/satori-js.esm.mjs +0 -1436
- package/dist/satori-js.iife.js +0 -1458
- package/dist/satori-js.umd.js +0 -1956
- package/tsconfig.base.json +0 -33
package/dist/api.gen.d.ts
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/** Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user. */
|
|
2
|
-
export interface ApiAuthenticateLogoutRequest {
|
|
3
|
-
refresh_token?: string;
|
|
4
|
-
token?: string;
|
|
5
|
-
}
|
|
6
|
-
/** Authenticate against the server with a refresh token. */
|
|
7
|
-
export interface ApiAuthenticateRefreshRequest {
|
|
8
|
-
refresh_token?: string;
|
|
9
|
-
}
|
|
10
|
-
/** */
|
|
11
|
-
export interface ApiAuthenticateRequest {
|
|
12
|
-
custom?: Record<string, string>;
|
|
13
|
-
default?: Record<string, string>;
|
|
14
|
-
id?: string;
|
|
15
|
-
}
|
|
16
|
-
/** A single event. Usually, but not necessarily, part of a batch. */
|
|
17
|
-
export interface ApiEvent {
|
|
18
|
-
id?: string;
|
|
19
|
-
metadata?: Record<string, string>;
|
|
20
|
-
name?: string;
|
|
21
|
-
timestamp?: string;
|
|
22
|
-
value?: string;
|
|
23
|
-
}
|
|
24
|
-
/** */
|
|
25
|
-
export interface ApiEventRequest {
|
|
26
|
-
events?: Array<ApiEvent>;
|
|
27
|
-
}
|
|
28
|
-
/** An experiment that this user is partaking. */
|
|
29
|
-
export interface ApiExperiment {
|
|
30
|
-
name?: string;
|
|
31
|
-
value?: string;
|
|
32
|
-
}
|
|
33
|
-
/** All experiments that this identity is involved with. */
|
|
34
|
-
export interface ApiExperimentList {
|
|
35
|
-
experiments?: Array<ApiExperiment>;
|
|
36
|
-
}
|
|
37
|
-
/** Feature flag available to the identity. */
|
|
38
|
-
export interface ApiFlag {
|
|
39
|
-
condition_changed?: boolean;
|
|
40
|
-
name?: string;
|
|
41
|
-
value?: string;
|
|
42
|
-
}
|
|
43
|
-
/** */
|
|
44
|
-
export interface ApiFlagList {
|
|
45
|
-
flags?: Array<ApiFlag>;
|
|
46
|
-
}
|
|
47
|
-
/** A response containing all the messages for an identity. */
|
|
48
|
-
export interface ApiGetMessageListResponse {
|
|
49
|
-
cacheable_cursor?: string;
|
|
50
|
-
messages?: Array<ApiMessage>;
|
|
51
|
-
next_cursor?: string;
|
|
52
|
-
prev_cursor?: string;
|
|
53
|
-
}
|
|
54
|
-
/** Enrich/replace the current session with a new ID. */
|
|
55
|
-
export interface ApiIdentifyRequest {
|
|
56
|
-
custom?: Record<string, string>;
|
|
57
|
-
default?: Record<string, string>;
|
|
58
|
-
id?: string;
|
|
59
|
-
}
|
|
60
|
-
/** A single live event. */
|
|
61
|
-
export interface ApiLiveEvent {
|
|
62
|
-
active_end_time_sec?: string;
|
|
63
|
-
active_start_time_sec?: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
id?: string;
|
|
66
|
-
name?: string;
|
|
67
|
-
value?: string;
|
|
68
|
-
}
|
|
69
|
-
/** List of Live events. */
|
|
70
|
-
export interface ApiLiveEventList {
|
|
71
|
-
live_events?: Array<ApiLiveEvent>;
|
|
72
|
-
}
|
|
73
|
-
/** A scheduled message. */
|
|
74
|
-
export interface ApiMessage {
|
|
75
|
-
consume_time?: string;
|
|
76
|
-
create_time?: string;
|
|
77
|
-
metadata?: Record<string, string>;
|
|
78
|
-
read_time?: string;
|
|
79
|
-
schedule_id?: string;
|
|
80
|
-
send_time?: string;
|
|
81
|
-
text?: string;
|
|
82
|
-
update_time?: string;
|
|
83
|
-
}
|
|
84
|
-
/** Properties associated with an identity. */
|
|
85
|
-
export interface ApiProperties {
|
|
86
|
-
computed?: Record<string, string>;
|
|
87
|
-
custom?: Record<string, string>;
|
|
88
|
-
default?: Record<string, string>;
|
|
89
|
-
}
|
|
90
|
-
/** A session. */
|
|
91
|
-
export interface ApiSession {
|
|
92
|
-
properties?: ApiProperties;
|
|
93
|
-
refresh_token?: string;
|
|
94
|
-
token?: string;
|
|
95
|
-
}
|
|
96
|
-
/** The request to update the status of a message. */
|
|
97
|
-
export interface ApiUpdateMessageRequest {
|
|
98
|
-
consume_time?: string;
|
|
99
|
-
id?: string;
|
|
100
|
-
read_time?: string;
|
|
101
|
-
}
|
|
102
|
-
/** Update Properties associated with this identity. */
|
|
103
|
-
export interface ApiUpdatePropertiesRequest {
|
|
104
|
-
custom?: Record<string, string>;
|
|
105
|
-
default?: Record<string, string>;
|
|
106
|
-
recompute?: boolean;
|
|
107
|
-
}
|
|
108
|
-
/** */
|
|
109
|
-
export interface ProtobufAny {
|
|
110
|
-
type_url?: string;
|
|
111
|
-
value?: string;
|
|
112
|
-
}
|
|
113
|
-
/** */
|
|
114
|
-
export interface RpcStatus {
|
|
115
|
-
code?: number;
|
|
116
|
-
details?: Array<ProtobufAny>;
|
|
117
|
-
message?: string;
|
|
118
|
-
}
|
|
119
|
-
export declare class SatoriApi {
|
|
120
|
-
readonly apiKey: string;
|
|
121
|
-
readonly basePath: string;
|
|
122
|
-
readonly timeoutMs: number;
|
|
123
|
-
constructor(apiKey: string, basePath: string, timeoutMs: number);
|
|
124
|
-
/** A healthcheck which load balancers can use to check the service. */
|
|
125
|
-
satoriHealthcheck(bearerToken: string, options?: any): Promise<any>;
|
|
126
|
-
/** A readycheck which load balancers can use to check the service. */
|
|
127
|
-
satoriReadycheck(bearerToken: string, options?: any): Promise<any>;
|
|
128
|
-
/** Authenticate against the server. */
|
|
129
|
-
satoriAuthenticate(basicAuthUsername: string, basicAuthPassword: string, body: ApiAuthenticateRequest, options?: any): Promise<ApiSession>;
|
|
130
|
-
/** Log out a session, invalidate a refresh token, or log out all sessions/refresh tokens for a user. */
|
|
131
|
-
satoriAuthenticateLogout(bearerToken: string, body: ApiAuthenticateLogoutRequest, options?: any): Promise<any>;
|
|
132
|
-
/** Refresh a user's session using a refresh token retrieved from a previous authentication request. */
|
|
133
|
-
satoriAuthenticateRefresh(basicAuthUsername: string, basicAuthPassword: string, body: ApiAuthenticateRefreshRequest, options?: any): Promise<ApiSession>;
|
|
134
|
-
/** Publish an event for this session. */
|
|
135
|
-
satoriEvent(bearerToken: string, body: ApiEventRequest, options?: any): Promise<any>;
|
|
136
|
-
/** Get or list all available experiments for this identity. */
|
|
137
|
-
satoriGetExperiments(bearerToken: string, names?: Array<string>, options?: any): Promise<ApiExperimentList>;
|
|
138
|
-
/** List all available flags for this identity. */
|
|
139
|
-
satoriGetFlags(bearerToken: string, basicAuthUsername: string, basicAuthPassword: string, names?: Array<string>, options?: any): Promise<ApiFlagList>;
|
|
140
|
-
/** Enrich/replace the current session with new identifier. */
|
|
141
|
-
satoriIdentify(bearerToken: string, body: ApiIdentifyRequest, options?: any): Promise<ApiSession>;
|
|
142
|
-
/** Delete the caller's identity and associated data. */
|
|
143
|
-
satoriDeleteIdentity(bearerToken: string, options?: any): Promise<any>;
|
|
144
|
-
/** List available live events. */
|
|
145
|
-
satoriGetLiveEvents(bearerToken: string, names?: Array<string>, options?: any): Promise<ApiLiveEventList>;
|
|
146
|
-
/** Get the list of messages for the identity. */
|
|
147
|
-
satoriGetMessageList(bearerToken: string, limit?: number, forward?: boolean, cursor?: string, options?: any): Promise<ApiGetMessageListResponse>;
|
|
148
|
-
/** Deletes a message for an identity. */
|
|
149
|
-
satoriDeleteMessage(bearerToken: string, id: string, options?: any): Promise<any>;
|
|
150
|
-
/** Updates a message for an identity. */
|
|
151
|
-
satoriUpdateMessage(bearerToken: string, id: string, body: ApiUpdateMessageRequest, options?: any): Promise<any>;
|
|
152
|
-
/** List properties associated with this identity. */
|
|
153
|
-
satoriListProperties(bearerToken: string, options?: any): Promise<ApiProperties>;
|
|
154
|
-
/** Update identity properties. */
|
|
155
|
-
satoriUpdateProperties(bearerToken: string, body: ApiUpdatePropertiesRequest, options?: any): Promise<any>;
|
|
156
|
-
buildFullUrl(basePath: string, fragment: string, queryParams: Map<string, any>): string;
|
|
157
|
-
}
|