@drxsuperapp/sdk 2.0.2 → 2.0.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/.ai/mcp/mcp.json +0 -0
- package/.idea/vcs.xml +6 -0
- package/.openapi-generator/FILES +2 -0
- package/apis/AuthenticationApi.ts +98 -0
- package/dist/apis/AuthenticationApi.d.ts +24 -1
- package/dist/apis/AuthenticationApi.js +73 -1
- package/dist/models/ApiAuthOneTimeLoginCodePost200Response.d.ts +51 -0
- package/dist/models/{ApiWalletUnbindPost200Response.js → ApiAuthOneTimeLoginCodePost200Response.js} +11 -11
- package/dist/models/ApiAuthOneTimeLoginCodePost200ResponseResponseObject.d.ts +38 -0
- package/dist/models/ApiAuthOneTimeLoginCodePost200ResponseResponseObject.js +47 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/models/ApiAdminPointDropsPost200ResponseResponseObject.ts +101 -101
- package/models/ApiAdminPointDropsPost200ResponseResponseObjectCreatedAt.ts +46 -46
- package/models/ApiAuthOneTimeLoginCodePost200Response.ts +100 -0
- package/models/ApiAuthOneTimeLoginCodePost200ResponseResponseObject.ts +75 -0
- package/models/ApiPwaTournamentPostRequestAdminInner.ts +46 -46
- package/models/index.ts +2 -0
- package/package.json +1 -1
- package/workflow.sh +88 -88
- package/dist/models/ApiWalletUnbindPost200Response.d.ts +0 -51
- package/dist/models/ApiWalletUnbindPost200ResponseResponseObject.d.ts +0 -32
- package/dist/models/ApiWalletUnbindPost200ResponseResponseObject.js +0 -43
- package/dist/models/ApiWeb3RedeemPost200ResponseResponseObjectData.d.ts +0 -69
- package/dist/models/ApiWeb3RedeemPost200ResponseResponseObjectData.js +0 -68
package/workflow.sh
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
LOCKFILE="/tmp/drx-sdk-deploy.lock"
|
|
4
|
-
LOGFILE="/root/drx-sdk/deploy.log"
|
|
5
|
-
SECRET_HEADER="supersecret"
|
|
6
|
-
|
|
7
|
-
# Optional: Read X-Hook-Secret from env or stdin (e.g. webhook piping)
|
|
8
|
-
if [[ -n "$HTTP_X_HOOK_SECRET" && "$HTTP_X_HOOK_SECRET" != "$SECRET_HEADER" ]]; then
|
|
9
|
-
echo "❌ Invalid hook secret at $(date)" >> "$LOGFILE"
|
|
10
|
-
exit 1
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
# Check if Authorization header is provided
|
|
14
|
-
if [[ -z "$HTTP_AUTHORIZATION" ]]; then
|
|
15
|
-
echo "❌ No Authorization header provided at $(date)" >> "$LOGFILE"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
(
|
|
20
|
-
flock -n 9 || {
|
|
21
|
-
echo "⚠️ Deploy already running at $(date)" >> "$LOGFILE"
|
|
22
|
-
exit 1
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
echo "🚀 START: $(date)" >> "$LOGFILE"
|
|
26
|
-
cd /root/drx-sdk || exit 1
|
|
27
|
-
|
|
28
|
-
# Fix file permissions so git can overwrite
|
|
29
|
-
chown -R "$(whoami)" . >>"$LOGFILE" 2>&1
|
|
30
|
-
chmod -R a+rwx . >>"$LOGFILE" 2>&1
|
|
31
|
-
|
|
32
|
-
# Step 1: Reset and pull latest code
|
|
33
|
-
git pull
|
|
34
|
-
git push
|
|
35
|
-
git fetch
|
|
36
|
-
git checkout master >> "$LOGFILE" 2>&1
|
|
37
|
-
git reset --hard HEAD >> "$LOGFILE" 2>&1
|
|
38
|
-
git pull origin master >> "$LOGFILE" 2>&1
|
|
39
|
-
|
|
40
|
-
rm -rf apis models dist docs >> "$LOGFILE" 2>&1
|
|
41
|
-
rm deploy.log
|
|
42
|
-
# Step 2: Generate SDK
|
|
43
|
-
[ -f .gitignore ] && cp .gitignore .gitignore.backup
|
|
44
|
-
|
|
45
|
-
# Use the Authorization header from the request
|
|
46
|
-
openapi-generator-cli generate \
|
|
47
|
-
-i https://api-dev.drxapps.com/swagger.json \
|
|
48
|
-
-g typescript-fetch \
|
|
49
|
-
-o ./ \
|
|
50
|
-
--additional-properties=modelPropertyNaming=original \
|
|
51
|
-
--auth "Authorization:Basic%20ZHJ4OkRyeEAyMDI1" >> "$LOGFILE" 2>&1
|
|
52
|
-
|
|
53
|
-
# Restore .gitignore
|
|
54
|
-
[ -f .gitignore.backup ] && mv .gitignore.backup .gitignore
|
|
55
|
-
|
|
56
|
-
if [ $? -ne 0 ]; then
|
|
57
|
-
echo "❌ SDK generation failed at $(date)" >> "$LOGFILE"
|
|
58
|
-
exit 1
|
|
59
|
-
fi
|
|
60
|
-
echo "✅ SDK generated" >> "$LOGFILE"
|
|
61
|
-
|
|
62
|
-
# Step 3: Commit and push
|
|
63
|
-
git add . >> "$LOGFILE" 2>&1
|
|
64
|
-
git commit -m "VPS: Generated API SDK" >> "$LOGFILE" 2>&1
|
|
65
|
-
git push >> "$LOGFILE" 2>&1 || {
|
|
66
|
-
echo "❌ Git push failed at $(date)" >> "$LOGFILE"
|
|
67
|
-
exit 1
|
|
68
|
-
}
|
|
69
|
-
echo "✅ Changes committed and pushed" >> "$LOGFILE"
|
|
70
|
-
|
|
71
|
-
# Step 4: Version bump
|
|
72
|
-
npm version patch >> "$LOGFILE" 2>&1
|
|
73
|
-
git push >> "$LOGFILE" 2>&1 || {
|
|
74
|
-
echo "❌ Version push failed" >> "$LOGFILE"
|
|
75
|
-
exit 1
|
|
76
|
-
}
|
|
77
|
-
echo "✅ Version bumped" >> "$LOGFILE"
|
|
78
|
-
|
|
79
|
-
# Step 5: Publish to NPM
|
|
80
|
-
npm publish >> "$LOGFILE" 2>&1 || {
|
|
81
|
-
echo "❌ NPM publish failed" >> "$LOGFILE"
|
|
82
|
-
exit 1
|
|
83
|
-
}
|
|
84
|
-
echo "✅ Package published to NPM" >> "$LOGFILE"
|
|
85
|
-
|
|
86
|
-
echo "🎉 DONE: $(date)" >> "$LOGFILE"
|
|
87
|
-
|
|
88
|
-
) 9> "$LOCKFILE"
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
LOCKFILE="/tmp/drx-sdk-deploy.lock"
|
|
4
|
+
LOGFILE="/root/drx-sdk/deploy.log"
|
|
5
|
+
SECRET_HEADER="supersecret"
|
|
6
|
+
|
|
7
|
+
# Optional: Read X-Hook-Secret from env or stdin (e.g. webhook piping)
|
|
8
|
+
if [[ -n "$HTTP_X_HOOK_SECRET" && "$HTTP_X_HOOK_SECRET" != "$SECRET_HEADER" ]]; then
|
|
9
|
+
echo "❌ Invalid hook secret at $(date)" >> "$LOGFILE"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# Check if Authorization header is provided
|
|
14
|
+
if [[ -z "$HTTP_AUTHORIZATION" ]]; then
|
|
15
|
+
echo "❌ No Authorization header provided at $(date)" >> "$LOGFILE"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
(
|
|
20
|
+
flock -n 9 || {
|
|
21
|
+
echo "⚠️ Deploy already running at $(date)" >> "$LOGFILE"
|
|
22
|
+
exit 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
echo "🚀 START: $(date)" >> "$LOGFILE"
|
|
26
|
+
cd /root/drx-sdk || exit 1
|
|
27
|
+
|
|
28
|
+
# Fix file permissions so git can overwrite
|
|
29
|
+
chown -R "$(whoami)" . >>"$LOGFILE" 2>&1
|
|
30
|
+
chmod -R a+rwx . >>"$LOGFILE" 2>&1
|
|
31
|
+
|
|
32
|
+
# Step 1: Reset and pull latest code
|
|
33
|
+
git pull
|
|
34
|
+
git push
|
|
35
|
+
git fetch
|
|
36
|
+
git checkout master >> "$LOGFILE" 2>&1
|
|
37
|
+
git reset --hard HEAD >> "$LOGFILE" 2>&1
|
|
38
|
+
git pull origin master >> "$LOGFILE" 2>&1
|
|
39
|
+
|
|
40
|
+
rm -rf apis models dist docs >> "$LOGFILE" 2>&1
|
|
41
|
+
rm deploy.log
|
|
42
|
+
# Step 2: Generate SDK
|
|
43
|
+
[ -f .gitignore ] && cp .gitignore .gitignore.backup
|
|
44
|
+
|
|
45
|
+
# Use the Authorization header from the request
|
|
46
|
+
openapi-generator-cli generate \
|
|
47
|
+
-i https://api-dev.drxapps.com/swagger.json \
|
|
48
|
+
-g typescript-fetch \
|
|
49
|
+
-o ./ \
|
|
50
|
+
--additional-properties=modelPropertyNaming=original \
|
|
51
|
+
--auth "Authorization:Basic%20ZHJ4OkRyeEAyMDI1" >> "$LOGFILE" 2>&1
|
|
52
|
+
|
|
53
|
+
# Restore .gitignore
|
|
54
|
+
[ -f .gitignore.backup ] && mv .gitignore.backup .gitignore
|
|
55
|
+
|
|
56
|
+
if [ $? -ne 0 ]; then
|
|
57
|
+
echo "❌ SDK generation failed at $(date)" >> "$LOGFILE"
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
echo "✅ SDK generated" >> "$LOGFILE"
|
|
61
|
+
|
|
62
|
+
# Step 3: Commit and push
|
|
63
|
+
git add . >> "$LOGFILE" 2>&1
|
|
64
|
+
git commit -m "VPS: Generated API SDK" >> "$LOGFILE" 2>&1
|
|
65
|
+
git push >> "$LOGFILE" 2>&1 || {
|
|
66
|
+
echo "❌ Git push failed at $(date)" >> "$LOGFILE"
|
|
67
|
+
exit 1
|
|
68
|
+
}
|
|
69
|
+
echo "✅ Changes committed and pushed" >> "$LOGFILE"
|
|
70
|
+
|
|
71
|
+
# Step 4: Version bump
|
|
72
|
+
npm version patch >> "$LOGFILE" 2>&1
|
|
73
|
+
git push >> "$LOGFILE" 2>&1 || {
|
|
74
|
+
echo "❌ Version push failed" >> "$LOGFILE"
|
|
75
|
+
exit 1
|
|
76
|
+
}
|
|
77
|
+
echo "✅ Version bumped" >> "$LOGFILE"
|
|
78
|
+
|
|
79
|
+
# Step 5: Publish to NPM
|
|
80
|
+
npm publish >> "$LOGFILE" 2>&1 || {
|
|
81
|
+
echo "❌ NPM publish failed" >> "$LOGFILE"
|
|
82
|
+
exit 1
|
|
83
|
+
}
|
|
84
|
+
echo "✅ Package published to NPM" >> "$LOGFILE"
|
|
85
|
+
|
|
86
|
+
echo "🎉 DONE: $(date)" >> "$LOGFILE"
|
|
87
|
+
|
|
88
|
+
) 9> "$LOCKFILE"
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DRX API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import type { ApiWalletUnbindPost200ResponseResponseObject } from './ApiWalletUnbindPost200ResponseResponseObject';
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @interface ApiWalletUnbindPost200Response
|
|
17
|
-
*/
|
|
18
|
-
export interface ApiWalletUnbindPost200Response {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {boolean}
|
|
22
|
-
* @memberof ApiWalletUnbindPost200Response
|
|
23
|
-
*/
|
|
24
|
-
success: boolean;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof ApiWalletUnbindPost200Response
|
|
29
|
-
*/
|
|
30
|
-
message: string;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {ApiWalletUnbindPost200ResponseResponseObject}
|
|
34
|
-
* @memberof ApiWalletUnbindPost200Response
|
|
35
|
-
*/
|
|
36
|
-
responseObject?: ApiWalletUnbindPost200ResponseResponseObject;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof ApiWalletUnbindPost200Response
|
|
41
|
-
*/
|
|
42
|
-
statusCode: number;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Check if a given object implements the ApiWalletUnbindPost200Response interface.
|
|
46
|
-
*/
|
|
47
|
-
export declare function instanceOfApiWalletUnbindPost200Response(value: object): value is ApiWalletUnbindPost200Response;
|
|
48
|
-
export declare function ApiWalletUnbindPost200ResponseFromJSON(json: any): ApiWalletUnbindPost200Response;
|
|
49
|
-
export declare function ApiWalletUnbindPost200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiWalletUnbindPost200Response;
|
|
50
|
-
export declare function ApiWalletUnbindPost200ResponseToJSON(json: any): ApiWalletUnbindPost200Response;
|
|
51
|
-
export declare function ApiWalletUnbindPost200ResponseToJSONTyped(value?: ApiWalletUnbindPost200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DRX API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @interface ApiWalletUnbindPost200ResponseResponseObject
|
|
16
|
-
*/
|
|
17
|
-
export interface ApiWalletUnbindPost200ResponseResponseObject {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof ApiWalletUnbindPost200ResponseResponseObject
|
|
22
|
-
*/
|
|
23
|
-
message: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Check if a given object implements the ApiWalletUnbindPost200ResponseResponseObject interface.
|
|
27
|
-
*/
|
|
28
|
-
export declare function instanceOfApiWalletUnbindPost200ResponseResponseObject(value: object): value is ApiWalletUnbindPost200ResponseResponseObject;
|
|
29
|
-
export declare function ApiWalletUnbindPost200ResponseResponseObjectFromJSON(json: any): ApiWalletUnbindPost200ResponseResponseObject;
|
|
30
|
-
export declare function ApiWalletUnbindPost200ResponseResponseObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiWalletUnbindPost200ResponseResponseObject;
|
|
31
|
-
export declare function ApiWalletUnbindPost200ResponseResponseObjectToJSON(json: any): ApiWalletUnbindPost200ResponseResponseObject;
|
|
32
|
-
export declare function ApiWalletUnbindPost200ResponseResponseObjectToJSONTyped(value?: ApiWalletUnbindPost200ResponseResponseObject | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* DRX API
|
|
5
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Check if a given object implements the ApiWalletUnbindPost200ResponseResponseObject interface.
|
|
16
|
-
*/
|
|
17
|
-
export function instanceOfApiWalletUnbindPost200ResponseResponseObject(value) {
|
|
18
|
-
if (!('message' in value) || value['message'] === undefined)
|
|
19
|
-
return false;
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
export function ApiWalletUnbindPost200ResponseResponseObjectFromJSON(json) {
|
|
23
|
-
return ApiWalletUnbindPost200ResponseResponseObjectFromJSONTyped(json, false);
|
|
24
|
-
}
|
|
25
|
-
export function ApiWalletUnbindPost200ResponseResponseObjectFromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
-
if (json == null) {
|
|
27
|
-
return json;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
'message': json['message'],
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export function ApiWalletUnbindPost200ResponseResponseObjectToJSON(json) {
|
|
34
|
-
return ApiWalletUnbindPost200ResponseResponseObjectToJSONTyped(json, false);
|
|
35
|
-
}
|
|
36
|
-
export function ApiWalletUnbindPost200ResponseResponseObjectToJSONTyped(value, ignoreDiscriminator = false) {
|
|
37
|
-
if (value == null) {
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
'message': value['message'],
|
|
42
|
-
};
|
|
43
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DRX API
|
|
3
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import type { ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInner } from './ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInner';
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @interface ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
17
|
-
*/
|
|
18
|
-
export interface ApiWeb3RedeemPost200ResponseResponseObjectData {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
23
|
-
*/
|
|
24
|
-
redemptionId: number;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
29
|
-
*/
|
|
30
|
-
status: string;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInner}
|
|
34
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
35
|
-
*/
|
|
36
|
-
rewardItem: ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInner;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
41
|
-
*/
|
|
42
|
-
totalAmountDrx: number;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {string}
|
|
46
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
47
|
-
*/
|
|
48
|
-
totalAmountIdr: string;
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @type {number}
|
|
52
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
53
|
-
*/
|
|
54
|
-
stockDeducted: number;
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {string}
|
|
58
|
-
* @memberof ApiWeb3RedeemPost200ResponseResponseObjectData
|
|
59
|
-
*/
|
|
60
|
-
transactionHash: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Check if a given object implements the ApiWeb3RedeemPost200ResponseResponseObjectData interface.
|
|
64
|
-
*/
|
|
65
|
-
export declare function instanceOfApiWeb3RedeemPost200ResponseResponseObjectData(value: object): value is ApiWeb3RedeemPost200ResponseResponseObjectData;
|
|
66
|
-
export declare function ApiWeb3RedeemPost200ResponseResponseObjectDataFromJSON(json: any): ApiWeb3RedeemPost200ResponseResponseObjectData;
|
|
67
|
-
export declare function ApiWeb3RedeemPost200ResponseResponseObjectDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiWeb3RedeemPost200ResponseResponseObjectData;
|
|
68
|
-
export declare function ApiWeb3RedeemPost200ResponseResponseObjectDataToJSON(json: any): ApiWeb3RedeemPost200ResponseResponseObjectData;
|
|
69
|
-
export declare function ApiWeb3RedeemPost200ResponseResponseObjectDataToJSONTyped(value?: ApiWeb3RedeemPost200ResponseResponseObjectData | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* DRX API
|
|
5
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
import { ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInnerFromJSON, ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInnerToJSON, } from './ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInner';
|
|
15
|
-
/**
|
|
16
|
-
* Check if a given object implements the ApiWeb3RedeemPost200ResponseResponseObjectData interface.
|
|
17
|
-
*/
|
|
18
|
-
export function instanceOfApiWeb3RedeemPost200ResponseResponseObjectData(value) {
|
|
19
|
-
if (!('redemptionId' in value) || value['redemptionId'] === undefined)
|
|
20
|
-
return false;
|
|
21
|
-
if (!('status' in value) || value['status'] === undefined)
|
|
22
|
-
return false;
|
|
23
|
-
if (!('rewardItem' in value) || value['rewardItem'] === undefined)
|
|
24
|
-
return false;
|
|
25
|
-
if (!('totalAmountDrx' in value) || value['totalAmountDrx'] === undefined)
|
|
26
|
-
return false;
|
|
27
|
-
if (!('totalAmountIdr' in value) || value['totalAmountIdr'] === undefined)
|
|
28
|
-
return false;
|
|
29
|
-
if (!('stockDeducted' in value) || value['stockDeducted'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('transactionHash' in value) || value['transactionHash'] === undefined)
|
|
32
|
-
return false;
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
export function ApiWeb3RedeemPost200ResponseResponseObjectDataFromJSON(json) {
|
|
36
|
-
return ApiWeb3RedeemPost200ResponseResponseObjectDataFromJSONTyped(json, false);
|
|
37
|
-
}
|
|
38
|
-
export function ApiWeb3RedeemPost200ResponseResponseObjectDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
-
if (json == null) {
|
|
40
|
-
return json;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'redemptionId': json['redemptionId'],
|
|
44
|
-
'status': json['status'],
|
|
45
|
-
'rewardItem': ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInnerFromJSON(json['rewardItem']),
|
|
46
|
-
'totalAmountDrx': json['totalAmountDrx'],
|
|
47
|
-
'totalAmountIdr': json['totalAmountIdr'],
|
|
48
|
-
'stockDeducted': json['stockDeducted'],
|
|
49
|
-
'transactionHash': json['transactionHash'],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
export function ApiWeb3RedeemPost200ResponseResponseObjectDataToJSON(json) {
|
|
53
|
-
return ApiWeb3RedeemPost200ResponseResponseObjectDataToJSONTyped(json, false);
|
|
54
|
-
}
|
|
55
|
-
export function ApiWeb3RedeemPost200ResponseResponseObjectDataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
-
if (value == null) {
|
|
57
|
-
return value;
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
'redemptionId': value['redemptionId'],
|
|
61
|
-
'status': value['status'],
|
|
62
|
-
'rewardItem': ApiWeb3RewardGet200ResponseResponseObjectItemsInnerRedeemableItemsInnerToJSON(value['rewardItem']),
|
|
63
|
-
'totalAmountDrx': value['totalAmountDrx'],
|
|
64
|
-
'totalAmountIdr': value['totalAmountIdr'],
|
|
65
|
-
'stockDeducted': value['stockDeducted'],
|
|
66
|
-
'transactionHash': value['transactionHash'],
|
|
67
|
-
};
|
|
68
|
-
}
|