@alicloud/aligenieip_1_0 2.3.1 → 2.4.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/dist/client.d.ts +64 -0
- package/dist/client.js +131 -0
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +162 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -8121,6 +8121,112 @@ export class PushHotelMessageResponse extends $tea.Model {
|
|
|
8121
8121
|
}
|
|
8122
8122
|
}
|
|
8123
8123
|
|
|
8124
|
+
export class PushWelcomeHeaders extends $tea.Model {
|
|
8125
|
+
commonHeaders?: { [key: string]: string };
|
|
8126
|
+
xAcsAligenieAccessToken?: string;
|
|
8127
|
+
authorization?: string;
|
|
8128
|
+
static names(): { [key: string]: string } {
|
|
8129
|
+
return {
|
|
8130
|
+
commonHeaders: 'commonHeaders',
|
|
8131
|
+
xAcsAligenieAccessToken: 'x-acs-aligenie-access-token',
|
|
8132
|
+
authorization: 'Authorization',
|
|
8133
|
+
};
|
|
8134
|
+
}
|
|
8135
|
+
|
|
8136
|
+
static types(): { [key: string]: any } {
|
|
8137
|
+
return {
|
|
8138
|
+
commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
8139
|
+
xAcsAligenieAccessToken: 'string',
|
|
8140
|
+
authorization: 'string',
|
|
8141
|
+
};
|
|
8142
|
+
}
|
|
8143
|
+
|
|
8144
|
+
constructor(map?: { [key: string]: any }) {
|
|
8145
|
+
super(map);
|
|
8146
|
+
}
|
|
8147
|
+
}
|
|
8148
|
+
|
|
8149
|
+
export class PushWelcomeRequest extends $tea.Model {
|
|
8150
|
+
hotelId?: string;
|
|
8151
|
+
roomNo?: string;
|
|
8152
|
+
welcomeMusicUrl?: string;
|
|
8153
|
+
welcomeText?: string;
|
|
8154
|
+
static names(): { [key: string]: string } {
|
|
8155
|
+
return {
|
|
8156
|
+
hotelId: 'HotelId',
|
|
8157
|
+
roomNo: 'RoomNo',
|
|
8158
|
+
welcomeMusicUrl: 'WelcomeMusicUrl',
|
|
8159
|
+
welcomeText: 'WelcomeText',
|
|
8160
|
+
};
|
|
8161
|
+
}
|
|
8162
|
+
|
|
8163
|
+
static types(): { [key: string]: any } {
|
|
8164
|
+
return {
|
|
8165
|
+
hotelId: 'string',
|
|
8166
|
+
roomNo: 'string',
|
|
8167
|
+
welcomeMusicUrl: 'string',
|
|
8168
|
+
welcomeText: 'string',
|
|
8169
|
+
};
|
|
8170
|
+
}
|
|
8171
|
+
|
|
8172
|
+
constructor(map?: { [key: string]: any }) {
|
|
8173
|
+
super(map);
|
|
8174
|
+
}
|
|
8175
|
+
}
|
|
8176
|
+
|
|
8177
|
+
export class PushWelcomeResponseBody extends $tea.Model {
|
|
8178
|
+
message?: string;
|
|
8179
|
+
requestId?: string;
|
|
8180
|
+
result?: boolean;
|
|
8181
|
+
statusCode?: number;
|
|
8182
|
+
static names(): { [key: string]: string } {
|
|
8183
|
+
return {
|
|
8184
|
+
message: 'Message',
|
|
8185
|
+
requestId: 'RequestId',
|
|
8186
|
+
result: 'Result',
|
|
8187
|
+
statusCode: 'StatusCode',
|
|
8188
|
+
};
|
|
8189
|
+
}
|
|
8190
|
+
|
|
8191
|
+
static types(): { [key: string]: any } {
|
|
8192
|
+
return {
|
|
8193
|
+
message: 'string',
|
|
8194
|
+
requestId: 'string',
|
|
8195
|
+
result: 'boolean',
|
|
8196
|
+
statusCode: 'number',
|
|
8197
|
+
};
|
|
8198
|
+
}
|
|
8199
|
+
|
|
8200
|
+
constructor(map?: { [key: string]: any }) {
|
|
8201
|
+
super(map);
|
|
8202
|
+
}
|
|
8203
|
+
}
|
|
8204
|
+
|
|
8205
|
+
export class PushWelcomeResponse extends $tea.Model {
|
|
8206
|
+
headers: { [key: string]: string };
|
|
8207
|
+
statusCode: number;
|
|
8208
|
+
body: PushWelcomeResponseBody;
|
|
8209
|
+
static names(): { [key: string]: string } {
|
|
8210
|
+
return {
|
|
8211
|
+
headers: 'headers',
|
|
8212
|
+
statusCode: 'statusCode',
|
|
8213
|
+
body: 'body',
|
|
8214
|
+
};
|
|
8215
|
+
}
|
|
8216
|
+
|
|
8217
|
+
static types(): { [key: string]: any } {
|
|
8218
|
+
return {
|
|
8219
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
8220
|
+
statusCode: 'number',
|
|
8221
|
+
body: PushWelcomeResponseBody,
|
|
8222
|
+
};
|
|
8223
|
+
}
|
|
8224
|
+
|
|
8225
|
+
constructor(map?: { [key: string]: any }) {
|
|
8226
|
+
super(map);
|
|
8227
|
+
}
|
|
8228
|
+
}
|
|
8229
|
+
|
|
8124
8230
|
export class PushWelcomeTextAndMusicHeaders extends $tea.Model {
|
|
8125
8231
|
commonHeaders?: { [key: string]: string };
|
|
8126
8232
|
xAcsAligenieAccessToken?: string;
|
|
@@ -18759,6 +18865,62 @@ export default class Client extends OpenApi {
|
|
|
18759
18865
|
return await this.pushHotelMessageWithOptions(request, headers, runtime);
|
|
18760
18866
|
}
|
|
18761
18867
|
|
|
18868
|
+
async pushWelcomeWithOptions(request: PushWelcomeRequest, headers: PushWelcomeHeaders, runtime: $Util.RuntimeOptions): Promise<PushWelcomeResponse> {
|
|
18869
|
+
Util.validateModel(request);
|
|
18870
|
+
let body : {[key: string ]: any} = { };
|
|
18871
|
+
if (!Util.isUnset(request.hotelId)) {
|
|
18872
|
+
body["HotelId"] = request.hotelId;
|
|
18873
|
+
}
|
|
18874
|
+
|
|
18875
|
+
if (!Util.isUnset(request.roomNo)) {
|
|
18876
|
+
body["RoomNo"] = request.roomNo;
|
|
18877
|
+
}
|
|
18878
|
+
|
|
18879
|
+
if (!Util.isUnset(request.welcomeMusicUrl)) {
|
|
18880
|
+
body["WelcomeMusicUrl"] = request.welcomeMusicUrl;
|
|
18881
|
+
}
|
|
18882
|
+
|
|
18883
|
+
if (!Util.isUnset(request.welcomeText)) {
|
|
18884
|
+
body["WelcomeText"] = request.welcomeText;
|
|
18885
|
+
}
|
|
18886
|
+
|
|
18887
|
+
let realHeaders : {[key: string ]: string} = { };
|
|
18888
|
+
if (!Util.isUnset(headers.commonHeaders)) {
|
|
18889
|
+
realHeaders = headers.commonHeaders;
|
|
18890
|
+
}
|
|
18891
|
+
|
|
18892
|
+
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
|
|
18893
|
+
realHeaders["x-acs-aligenie-access-token"] = Util.toJSONString(headers.xAcsAligenieAccessToken);
|
|
18894
|
+
}
|
|
18895
|
+
|
|
18896
|
+
if (!Util.isUnset(headers.authorization)) {
|
|
18897
|
+
realHeaders["Authorization"] = Util.toJSONString(headers.authorization);
|
|
18898
|
+
}
|
|
18899
|
+
|
|
18900
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
18901
|
+
headers: realHeaders,
|
|
18902
|
+
body: OpenApiUtil.parseToMap(body),
|
|
18903
|
+
});
|
|
18904
|
+
let params = new $OpenApi.Params({
|
|
18905
|
+
action: "PushWelcome",
|
|
18906
|
+
version: "ip_1.0",
|
|
18907
|
+
protocol: "HTTPS",
|
|
18908
|
+
pathname: `/v1.0/ip/pushWelcome`,
|
|
18909
|
+
method: "POST",
|
|
18910
|
+
authType: "AK",
|
|
18911
|
+
style: "ROA",
|
|
18912
|
+
reqBodyType: "formData",
|
|
18913
|
+
bodyType: "json",
|
|
18914
|
+
});
|
|
18915
|
+
return $tea.cast<PushWelcomeResponse>(await this.callApi(params, req, runtime), new PushWelcomeResponse({}));
|
|
18916
|
+
}
|
|
18917
|
+
|
|
18918
|
+
async pushWelcome(request: PushWelcomeRequest): Promise<PushWelcomeResponse> {
|
|
18919
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
18920
|
+
let headers = new PushWelcomeHeaders({ });
|
|
18921
|
+
return await this.pushWelcomeWithOptions(request, headers, runtime);
|
|
18922
|
+
}
|
|
18923
|
+
|
|
18762
18924
|
async pushWelcomeTextAndMusicWithOptions(tmpReq: PushWelcomeTextAndMusicRequest, headers: PushWelcomeTextAndMusicHeaders, runtime: $Util.RuntimeOptions): Promise<PushWelcomeTextAndMusicResponse> {
|
|
18763
18925
|
Util.validateModel(tmpReq);
|
|
18764
18926
|
let request = new PushWelcomeTextAndMusicShrinkRequest({ });
|