tremendous 3.5.1 → 3.6.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/api.d.ts +437 -11
- package/dist/api.js +237 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.6.0](https://github.com/tremendous-rewards/tremendous-node/compare/tremendous-v3.5.1...tremendous-v3.6.0) (2024-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add /reports endpoints ([#112](https://github.com/tremendous-rewards/tremendous-node/issues/112)) ([eb7e536](https://github.com/tremendous-rewards/tremendous-node/commit/eb7e5360e3cfaede2a18725454fa7a3b032c9d4c))
|
|
9
|
+
* add support for updated_phone and updated_email on POST /api/v2/reward/:id/resend ([eb7e536](https://github.com/tremendous-rewards/tremendous-node/commit/eb7e5360e3cfaede2a18725454fa7a3b032c9d4c))
|
|
10
|
+
|
|
3
11
|
## [3.5.1](https://github.com/tremendous-rewards/tremendous-node/compare/tremendous-v3.5.0...tremendous-v3.5.1) (2024-09-26)
|
|
4
12
|
|
|
5
13
|
|
package/dist/api.d.ts
CHANGED
|
@@ -879,6 +879,230 @@ export interface CreateOrganizationRequestCopySettings {
|
|
|
879
879
|
*/
|
|
880
880
|
'fraud_prevention'?: boolean;
|
|
881
881
|
}
|
|
882
|
+
/**
|
|
883
|
+
*
|
|
884
|
+
* @export
|
|
885
|
+
* @interface CreateReport201Response
|
|
886
|
+
*/
|
|
887
|
+
export interface CreateReport201Response {
|
|
888
|
+
/**
|
|
889
|
+
*
|
|
890
|
+
* @type {CreateReport201ResponseReport}
|
|
891
|
+
* @memberof CreateReport201Response
|
|
892
|
+
*/
|
|
893
|
+
'report': CreateReport201ResponseReport;
|
|
894
|
+
/**
|
|
895
|
+
* Report status message
|
|
896
|
+
* @type {string}
|
|
897
|
+
* @memberof CreateReport201Response
|
|
898
|
+
*/
|
|
899
|
+
'message'?: string;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Reports represent a collection of your Tremendous data that can be filtered and downloaded. The report object that is returned has a unique ID, a status, and an predicted time of report generation completion. When the report generation is complete, it will also contain an expiring url where you can retrieve your report.
|
|
903
|
+
* @export
|
|
904
|
+
* @interface CreateReport201ResponseReport
|
|
905
|
+
*/
|
|
906
|
+
export interface CreateReport201ResponseReport {
|
|
907
|
+
/**
|
|
908
|
+
* Tremendous ID of the report, used to retrieve your report
|
|
909
|
+
* @type {string}
|
|
910
|
+
* @memberof CreateReport201ResponseReport
|
|
911
|
+
*/
|
|
912
|
+
'id'?: string;
|
|
913
|
+
/**
|
|
914
|
+
* Status of this report <table> <thead> <tr> <th>Status</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>CREATED</code></td> <td>Report has been created</td> </tr> <tr> <td><code>PROCESSING</code></td> <td>Report is currently being generated</td> </tr> <tr> <td><code>READY_FOR_DOWNLOAD</code></td> <td>Report generation is complete and ready for download</td> </tr> <tr> <td><code>FAILED</code></td> <td>Report failed to generate</td> </tr> </tbody> </table>
|
|
915
|
+
* @type {string}
|
|
916
|
+
* @memberof CreateReport201ResponseReport
|
|
917
|
+
*/
|
|
918
|
+
'status'?: CreateReport201ResponseReportStatusEnum;
|
|
919
|
+
/**
|
|
920
|
+
* Timestamp of when the report was created
|
|
921
|
+
* @type {string}
|
|
922
|
+
* @memberof CreateReport201ResponseReport
|
|
923
|
+
*/
|
|
924
|
+
'created_at'?: string;
|
|
925
|
+
/**
|
|
926
|
+
* Timestamp of when the report is expected to finish generating. If the report if complete, this will return the time the report completed generating at.
|
|
927
|
+
* @type {string}
|
|
928
|
+
* @memberof CreateReport201ResponseReport
|
|
929
|
+
*/
|
|
930
|
+
'expected_completion_at'?: string;
|
|
931
|
+
/**
|
|
932
|
+
* URL to download the report. Only returned when the report generation is complete and report is ready for download. URL is valid for 7 days from generation completion
|
|
933
|
+
* @type {string}
|
|
934
|
+
* @memberof CreateReport201ResponseReport
|
|
935
|
+
*/
|
|
936
|
+
'url'?: string | null;
|
|
937
|
+
}
|
|
938
|
+
export declare const CreateReport201ResponseReportStatusEnum: {
|
|
939
|
+
readonly Created: "CREATED";
|
|
940
|
+
readonly Processing: "PROCESSING";
|
|
941
|
+
readonly ReadyForDownload: "READY_FOR_DOWNLOAD";
|
|
942
|
+
readonly Failed: "FAILED";
|
|
943
|
+
};
|
|
944
|
+
export type CreateReport201ResponseReportStatusEnum = typeof CreateReport201ResponseReportStatusEnum[keyof typeof CreateReport201ResponseReportStatusEnum];
|
|
945
|
+
/**
|
|
946
|
+
*
|
|
947
|
+
* @export
|
|
948
|
+
* @interface CreateReportRequest
|
|
949
|
+
*/
|
|
950
|
+
export interface CreateReportRequest {
|
|
951
|
+
/**
|
|
952
|
+
* Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table>
|
|
953
|
+
* @type {string}
|
|
954
|
+
* @memberof CreateReportRequest
|
|
955
|
+
*/
|
|
956
|
+
'report_type': CreateReportRequestReportTypeEnum;
|
|
957
|
+
/**
|
|
958
|
+
* Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table>
|
|
959
|
+
* @type {string}
|
|
960
|
+
* @memberof CreateReportRequest
|
|
961
|
+
*/
|
|
962
|
+
'format': CreateReportRequestFormatEnum;
|
|
963
|
+
/**
|
|
964
|
+
*
|
|
965
|
+
* @type {CreateReportRequestFilters}
|
|
966
|
+
* @memberof CreateReportRequest
|
|
967
|
+
*/
|
|
968
|
+
'filters'?: CreateReportRequestFilters | null;
|
|
969
|
+
}
|
|
970
|
+
export declare const CreateReportRequestReportTypeEnum: {
|
|
971
|
+
readonly DigitalRewards: "digital_rewards";
|
|
972
|
+
};
|
|
973
|
+
export type CreateReportRequestReportTypeEnum = typeof CreateReportRequestReportTypeEnum[keyof typeof CreateReportRequestReportTypeEnum];
|
|
974
|
+
export declare const CreateReportRequestFormatEnum: {
|
|
975
|
+
readonly Csv: "csv";
|
|
976
|
+
};
|
|
977
|
+
export type CreateReportRequestFormatEnum = typeof CreateReportRequestFormatEnum[keyof typeof CreateReportRequestFormatEnum];
|
|
978
|
+
/**
|
|
979
|
+
* Filters to apply to the report. Corresponds to the filters provided in the dashboard
|
|
980
|
+
* @export
|
|
981
|
+
* @interface CreateReportRequestFilters
|
|
982
|
+
*/
|
|
983
|
+
export interface CreateReportRequestFilters {
|
|
984
|
+
/**
|
|
985
|
+
*
|
|
986
|
+
* @type {CreateReportRequestFiltersDigitalRewards}
|
|
987
|
+
* @memberof CreateReportRequestFilters
|
|
988
|
+
*/
|
|
989
|
+
'digital_rewards'?: CreateReportRequestFiltersDigitalRewards | null;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Filters object for a `report_type: digital_rewards` report
|
|
993
|
+
* @export
|
|
994
|
+
* @interface CreateReportRequestFiltersDigitalRewards
|
|
995
|
+
*/
|
|
996
|
+
export interface CreateReportRequestFiltersDigitalRewards {
|
|
997
|
+
/**
|
|
998
|
+
*
|
|
999
|
+
* @type {CreateReportRequestFiltersDigitalRewardsAmount}
|
|
1000
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1001
|
+
*/
|
|
1002
|
+
'amount'?: CreateReportRequestFiltersDigitalRewardsAmount | null;
|
|
1003
|
+
/**
|
|
1004
|
+
* ID of the Tremendous campaign that this report should be limited to
|
|
1005
|
+
* @type {string}
|
|
1006
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1007
|
+
*/
|
|
1008
|
+
'campaign_id'?: string | null;
|
|
1009
|
+
/**
|
|
1010
|
+
*
|
|
1011
|
+
* @type {CreateReportRequestFiltersDigitalRewardsCreatedAt}
|
|
1012
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1013
|
+
*/
|
|
1014
|
+
'created_at'?: CreateReportRequestFiltersDigitalRewardsCreatedAt | null;
|
|
1015
|
+
/**
|
|
1016
|
+
* Delivery date for gifts that should be returned in the report
|
|
1017
|
+
* @type {string}
|
|
1018
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1019
|
+
*/
|
|
1020
|
+
'delivered_at'?: string | null;
|
|
1021
|
+
/**
|
|
1022
|
+
* Delivery method for rewards returned in the report
|
|
1023
|
+
* @type {string}
|
|
1024
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1025
|
+
*/
|
|
1026
|
+
'delivery_method'?: CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum | null;
|
|
1027
|
+
/**
|
|
1028
|
+
* ID of the Tremendous order that this report should be limited to
|
|
1029
|
+
* @type {string}
|
|
1030
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1031
|
+
*/
|
|
1032
|
+
'order_id'?: string | null;
|
|
1033
|
+
/**
|
|
1034
|
+
* Order status for rewards returned in the report
|
|
1035
|
+
* @type {string}
|
|
1036
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1037
|
+
*/
|
|
1038
|
+
'order_status'?: CreateReportRequestFiltersDigitalRewardsOrderStatusEnum | null;
|
|
1039
|
+
/**
|
|
1040
|
+
* Status for rewards returned in the report
|
|
1041
|
+
* @type {Array<string>}
|
|
1042
|
+
* @memberof CreateReportRequestFiltersDigitalRewards
|
|
1043
|
+
*/
|
|
1044
|
+
'status'?: Array<CreateReportRequestFiltersDigitalRewardsStatusEnum> | null;
|
|
1045
|
+
}
|
|
1046
|
+
export declare const CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum: {
|
|
1047
|
+
readonly Phone: "phone";
|
|
1048
|
+
readonly Email: "email";
|
|
1049
|
+
readonly Link: "link";
|
|
1050
|
+
readonly Mail: "mail";
|
|
1051
|
+
readonly Direct: "direct";
|
|
1052
|
+
};
|
|
1053
|
+
export type CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum = typeof CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum[keyof typeof CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum];
|
|
1054
|
+
export declare const CreateReportRequestFiltersDigitalRewardsOrderStatusEnum: {
|
|
1055
|
+
readonly Executed: "executed";
|
|
1056
|
+
readonly Canceled: "canceled";
|
|
1057
|
+
readonly Failed: "failed";
|
|
1058
|
+
readonly PendingApproval: "pending_approval";
|
|
1059
|
+
};
|
|
1060
|
+
export type CreateReportRequestFiltersDigitalRewardsOrderStatusEnum = typeof CreateReportRequestFiltersDigitalRewardsOrderStatusEnum[keyof typeof CreateReportRequestFiltersDigitalRewardsOrderStatusEnum];
|
|
1061
|
+
export declare const CreateReportRequestFiltersDigitalRewardsStatusEnum: {
|
|
1062
|
+
readonly Delivered: "delivered";
|
|
1063
|
+
readonly Canceled: "canceled";
|
|
1064
|
+
readonly DeliveryFailed: "delivery_failed";
|
|
1065
|
+
readonly PendingReview: "pending_review";
|
|
1066
|
+
};
|
|
1067
|
+
export type CreateReportRequestFiltersDigitalRewardsStatusEnum = typeof CreateReportRequestFiltersDigitalRewardsStatusEnum[keyof typeof CreateReportRequestFiltersDigitalRewardsStatusEnum];
|
|
1068
|
+
/**
|
|
1069
|
+
* Amount of the rewards returned in the report
|
|
1070
|
+
* @export
|
|
1071
|
+
* @interface CreateReportRequestFiltersDigitalRewardsAmount
|
|
1072
|
+
*/
|
|
1073
|
+
export interface CreateReportRequestFiltersDigitalRewardsAmount {
|
|
1074
|
+
/**
|
|
1075
|
+
* Minimum amount of the rewards that should be returned in the report
|
|
1076
|
+
* @type {number}
|
|
1077
|
+
* @memberof CreateReportRequestFiltersDigitalRewardsAmount
|
|
1078
|
+
*/
|
|
1079
|
+
'gte'?: number;
|
|
1080
|
+
/**
|
|
1081
|
+
* Maximum amount of the rewards that should be returned in the report
|
|
1082
|
+
* @type {number}
|
|
1083
|
+
* @memberof CreateReportRequestFiltersDigitalRewardsAmount
|
|
1084
|
+
*/
|
|
1085
|
+
'lte'?: number;
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Creation dates of rewards returned in the report
|
|
1089
|
+
* @export
|
|
1090
|
+
* @interface CreateReportRequestFiltersDigitalRewardsCreatedAt
|
|
1091
|
+
*/
|
|
1092
|
+
export interface CreateReportRequestFiltersDigitalRewardsCreatedAt {
|
|
1093
|
+
/**
|
|
1094
|
+
* Minimum date the reward was created
|
|
1095
|
+
* @type {string}
|
|
1096
|
+
* @memberof CreateReportRequestFiltersDigitalRewardsCreatedAt
|
|
1097
|
+
*/
|
|
1098
|
+
'gte'?: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* Maximum date the reward was created
|
|
1101
|
+
* @type {string}
|
|
1102
|
+
* @memberof CreateReportRequestFiltersDigitalRewardsCreatedAt
|
|
1103
|
+
*/
|
|
1104
|
+
'lte'?: string;
|
|
1105
|
+
}
|
|
882
1106
|
/**
|
|
883
1107
|
*
|
|
884
1108
|
* @export
|
|
@@ -2857,12 +3081,30 @@ export interface ListFundingSources200ResponseFundingSourcesInnerMeta {
|
|
|
2857
3081
|
* @memberof ListFundingSources200ResponseFundingSourcesInnerMeta
|
|
2858
3082
|
*/
|
|
2859
3083
|
'expired'?: boolean;
|
|
3084
|
+
/**
|
|
3085
|
+
* **Only available when `method` is set to `credit_card`.** Year part of card\'s expiration date
|
|
3086
|
+
* @type {string}
|
|
3087
|
+
* @memberof ListFundingSources200ResponseFundingSourcesInnerMeta
|
|
3088
|
+
*/
|
|
3089
|
+
'year'?: string;
|
|
3090
|
+
/**
|
|
3091
|
+
* **Only available when `method` is set to `credit_card`.** Month part of card\'s expiration date
|
|
3092
|
+
* @type {string}
|
|
3093
|
+
* @memberof ListFundingSources200ResponseFundingSourcesInnerMeta
|
|
3094
|
+
*/
|
|
3095
|
+
'month'?: string;
|
|
2860
3096
|
/**
|
|
2861
3097
|
* **Only available when `method` is set to `bank_account` or `credit_card`.** Point in time when the last order failed using this bank account or credit card as a funding source.
|
|
2862
3098
|
* @type {string}
|
|
2863
3099
|
* @memberof ListFundingSources200ResponseFundingSourcesInnerMeta
|
|
2864
3100
|
*/
|
|
2865
3101
|
'last_payment_failed_at'?: string | null;
|
|
3102
|
+
/**
|
|
3103
|
+
*
|
|
3104
|
+
* @type {ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails}
|
|
3105
|
+
* @memberof ListFundingSources200ResponseFundingSourcesInnerMeta
|
|
3106
|
+
*/
|
|
3107
|
+
'failure_details'?: ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails | null;
|
|
2866
3108
|
}
|
|
2867
3109
|
export declare const ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum: {
|
|
2868
3110
|
readonly Checking: "checking";
|
|
@@ -2874,14 +3116,33 @@ export declare const ListFundingSources200ResponseFundingSourcesInnerMetaNetwork
|
|
|
2874
3116
|
readonly Amex: "Amex";
|
|
2875
3117
|
readonly Jcb: "JCB";
|
|
2876
3118
|
readonly DinersClub: "Diner's Club";
|
|
2877
|
-
readonly Visa: "
|
|
2878
|
-
readonly Discover: "
|
|
2879
|
-
readonly Laser: "
|
|
2880
|
-
readonly Elo: "
|
|
2881
|
-
readonly Maestro: "
|
|
2882
|
-
readonly Solo: "
|
|
3119
|
+
readonly Visa: "Visa";
|
|
3120
|
+
readonly Discover: "Discover";
|
|
3121
|
+
readonly Laser: "Laser";
|
|
3122
|
+
readonly Elo: "Elo";
|
|
3123
|
+
readonly Maestro: "Maestro";
|
|
3124
|
+
readonly Solo: "Solo";
|
|
2883
3125
|
};
|
|
2884
3126
|
export type ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = typeof ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum];
|
|
3127
|
+
/**
|
|
3128
|
+
*
|
|
3129
|
+
* @export
|
|
3130
|
+
* @interface ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails
|
|
3131
|
+
*/
|
|
3132
|
+
export interface ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails {
|
|
3133
|
+
/**
|
|
3134
|
+
* Payment error code
|
|
3135
|
+
* @type {string}
|
|
3136
|
+
* @memberof ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails
|
|
3137
|
+
*/
|
|
3138
|
+
'return_code'?: string;
|
|
3139
|
+
/**
|
|
3140
|
+
* Explanation of the payment error
|
|
3141
|
+
* @type {string}
|
|
3142
|
+
* @memberof ListFundingSources200ResponseFundingSourcesInnerMetaFailureDetails
|
|
3143
|
+
*/
|
|
3144
|
+
'description'?: string;
|
|
3145
|
+
}
|
|
2885
3146
|
/**
|
|
2886
3147
|
*
|
|
2887
3148
|
* @export
|
|
@@ -4784,7 +5045,13 @@ export interface Payout {
|
|
|
4784
5045
|
* @type {string}
|
|
4785
5046
|
* @memberof Payout
|
|
4786
5047
|
*/
|
|
4787
|
-
'executed_at'?: string;
|
|
5048
|
+
'executed_at'?: string | null;
|
|
5049
|
+
/**
|
|
5050
|
+
* Date when a delayed payout will be executed in the future
|
|
5051
|
+
* @type {string}
|
|
5052
|
+
* @memberof Payout
|
|
5053
|
+
*/
|
|
5054
|
+
'defer_execution_until'?: string | null;
|
|
4788
5055
|
}
|
|
4789
5056
|
export declare const PayoutStatusEnum: {
|
|
4790
5057
|
readonly Unexecuted: "UNEXECUTED";
|
|
@@ -5022,6 +5289,50 @@ export interface RefundDetails {
|
|
|
5022
5289
|
*/
|
|
5023
5290
|
'total': number;
|
|
5024
5291
|
}
|
|
5292
|
+
/**
|
|
5293
|
+
* Reports represent a collection of your Tremendous data that can be filtered and downloaded. The report object that is returned has a unique ID, a status, and an predicted time of report generation completion. When the report generation is complete, it will also contain an expiring url where you can retrieve your report.
|
|
5294
|
+
* @export
|
|
5295
|
+
* @interface Report
|
|
5296
|
+
*/
|
|
5297
|
+
export interface Report {
|
|
5298
|
+
/**
|
|
5299
|
+
* Tremendous ID of the report, used to retrieve your report
|
|
5300
|
+
* @type {string}
|
|
5301
|
+
* @memberof Report
|
|
5302
|
+
*/
|
|
5303
|
+
'id'?: string;
|
|
5304
|
+
/**
|
|
5305
|
+
* Status of this report <table> <thead> <tr> <th>Status</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>CREATED</code></td> <td>Report has been created</td> </tr> <tr> <td><code>PROCESSING</code></td> <td>Report is currently being generated</td> </tr> <tr> <td><code>READY_FOR_DOWNLOAD</code></td> <td>Report generation is complete and ready for download</td> </tr> <tr> <td><code>FAILED</code></td> <td>Report failed to generate</td> </tr> </tbody> </table>
|
|
5306
|
+
* @type {string}
|
|
5307
|
+
* @memberof Report
|
|
5308
|
+
*/
|
|
5309
|
+
'status'?: ReportStatusEnum;
|
|
5310
|
+
/**
|
|
5311
|
+
* Timestamp of when the report was created
|
|
5312
|
+
* @type {string}
|
|
5313
|
+
* @memberof Report
|
|
5314
|
+
*/
|
|
5315
|
+
'created_at'?: string;
|
|
5316
|
+
/**
|
|
5317
|
+
* Timestamp of when the report is expected to finish generating. If the report if complete, this will return the time the report completed generating at.
|
|
5318
|
+
* @type {string}
|
|
5319
|
+
* @memberof Report
|
|
5320
|
+
*/
|
|
5321
|
+
'expected_completion_at'?: string;
|
|
5322
|
+
/**
|
|
5323
|
+
* URL to download the report. Only returned when the report generation is complete and report is ready for download. URL is valid for 7 days from generation completion
|
|
5324
|
+
* @type {string}
|
|
5325
|
+
* @memberof Report
|
|
5326
|
+
*/
|
|
5327
|
+
'url'?: string | null;
|
|
5328
|
+
}
|
|
5329
|
+
export declare const ReportStatusEnum: {
|
|
5330
|
+
readonly Created: "CREATED";
|
|
5331
|
+
readonly Processing: "PROCESSING";
|
|
5332
|
+
readonly ReadyForDownload: "READY_FOR_DOWNLOAD";
|
|
5333
|
+
readonly Failed: "FAILED";
|
|
5334
|
+
};
|
|
5335
|
+
export type ReportStatusEnum = typeof ReportStatusEnum[keyof typeof ReportStatusEnum];
|
|
5025
5336
|
/**
|
|
5026
5337
|
*
|
|
5027
5338
|
* @export
|
|
@@ -5041,6 +5352,25 @@ export interface ResendReward422Response {
|
|
|
5041
5352
|
*/
|
|
5042
5353
|
'errors': ListRewards401ResponseErrors;
|
|
5043
5354
|
}
|
|
5355
|
+
/**
|
|
5356
|
+
*
|
|
5357
|
+
* @export
|
|
5358
|
+
* @interface ResendRewardRequest
|
|
5359
|
+
*/
|
|
5360
|
+
export interface ResendRewardRequest {
|
|
5361
|
+
/**
|
|
5362
|
+
* The new email address of the recipient (only for rewards delivered via email)
|
|
5363
|
+
* @type {string}
|
|
5364
|
+
* @memberof ResendRewardRequest
|
|
5365
|
+
*/
|
|
5366
|
+
'updated_email'?: string;
|
|
5367
|
+
/**
|
|
5368
|
+
* The new phone number of the recipient (only for rewards delivered via SMS)
|
|
5369
|
+
* @type {string}
|
|
5370
|
+
* @memberof ResendRewardRequest
|
|
5371
|
+
*/
|
|
5372
|
+
'updated_phone'?: string;
|
|
5373
|
+
}
|
|
5044
5374
|
/**
|
|
5045
5375
|
* Flag rewards redeemed in these countries.
|
|
5046
5376
|
* @export
|
|
@@ -7986,6 +8316,98 @@ export declare class ProductsApi extends BaseAPI {
|
|
|
7986
8316
|
*/
|
|
7987
8317
|
listProducts(country?: string, currency?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListProductsResponse, any>>;
|
|
7988
8318
|
}
|
|
8319
|
+
/**
|
|
8320
|
+
* ReportsApi - axios parameter creator
|
|
8321
|
+
* @export
|
|
8322
|
+
*/
|
|
8323
|
+
export declare const ReportsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
8324
|
+
/**
|
|
8325
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
8326
|
+
* @summary Create report
|
|
8327
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
8328
|
+
* @param {*} [options] Override http request option.
|
|
8329
|
+
* @throws {RequiredError}
|
|
8330
|
+
*/
|
|
8331
|
+
createReport: (createReportRequest: CreateReportRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
8332
|
+
/**
|
|
8333
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
8334
|
+
* @summary Retrieve report
|
|
8335
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
8336
|
+
* @param {*} [options] Override http request option.
|
|
8337
|
+
* @throws {RequiredError}
|
|
8338
|
+
*/
|
|
8339
|
+
getReport: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
8340
|
+
};
|
|
8341
|
+
/**
|
|
8342
|
+
* ReportsApi - functional programming interface
|
|
8343
|
+
* @export
|
|
8344
|
+
*/
|
|
8345
|
+
export declare const ReportsApiFp: (configuration?: Configuration) => {
|
|
8346
|
+
/**
|
|
8347
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
8348
|
+
* @summary Create report
|
|
8349
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
8350
|
+
* @param {*} [options] Override http request option.
|
|
8351
|
+
* @throws {RequiredError}
|
|
8352
|
+
*/
|
|
8353
|
+
createReport(createReportRequest: CreateReportRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateReport201Response>>;
|
|
8354
|
+
/**
|
|
8355
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
8356
|
+
* @summary Retrieve report
|
|
8357
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
8358
|
+
* @param {*} [options] Override http request option.
|
|
8359
|
+
* @throws {RequiredError}
|
|
8360
|
+
*/
|
|
8361
|
+
getReport(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateReport201Response>>;
|
|
8362
|
+
};
|
|
8363
|
+
/**
|
|
8364
|
+
* ReportsApi - factory interface
|
|
8365
|
+
* @export
|
|
8366
|
+
*/
|
|
8367
|
+
export declare const ReportsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
8368
|
+
/**
|
|
8369
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
8370
|
+
* @summary Create report
|
|
8371
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
8372
|
+
* @param {*} [options] Override http request option.
|
|
8373
|
+
* @throws {RequiredError}
|
|
8374
|
+
*/
|
|
8375
|
+
createReport(createReportRequest: CreateReportRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateReport201Response>;
|
|
8376
|
+
/**
|
|
8377
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
8378
|
+
* @summary Retrieve report
|
|
8379
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
8380
|
+
* @param {*} [options] Override http request option.
|
|
8381
|
+
* @throws {RequiredError}
|
|
8382
|
+
*/
|
|
8383
|
+
getReport(id: string, options?: RawAxiosRequestConfig): AxiosPromise<CreateReport201Response>;
|
|
8384
|
+
};
|
|
8385
|
+
/**
|
|
8386
|
+
* ReportsApi - object-oriented interface
|
|
8387
|
+
* @export
|
|
8388
|
+
* @class ReportsApi
|
|
8389
|
+
* @extends {BaseAPI}
|
|
8390
|
+
*/
|
|
8391
|
+
export declare class ReportsApi extends BaseAPI {
|
|
8392
|
+
/**
|
|
8393
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
8394
|
+
* @summary Create report
|
|
8395
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
8396
|
+
* @param {*} [options] Override http request option.
|
|
8397
|
+
* @throws {RequiredError}
|
|
8398
|
+
* @memberof ReportsApi
|
|
8399
|
+
*/
|
|
8400
|
+
createReport(createReportRequest: CreateReportRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateReport201Response, any>>;
|
|
8401
|
+
/**
|
|
8402
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
8403
|
+
* @summary Retrieve report
|
|
8404
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
8405
|
+
* @param {*} [options] Override http request option.
|
|
8406
|
+
* @throws {RequiredError}
|
|
8407
|
+
* @memberof ReportsApi
|
|
8408
|
+
*/
|
|
8409
|
+
getReport(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateReport201Response, any>>;
|
|
8410
|
+
}
|
|
7989
8411
|
/**
|
|
7990
8412
|
* RewardsApi - axios parameter creator
|
|
7991
8413
|
* @export
|
|
@@ -8027,10 +8449,11 @@ export declare const RewardsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
8027
8449
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
8028
8450
|
* @summary Resend reward
|
|
8029
8451
|
* @param {string} id ID of the reward that should be resent
|
|
8452
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
8030
8453
|
* @param {*} [options] Override http request option.
|
|
8031
8454
|
* @throws {RequiredError}
|
|
8032
8455
|
*/
|
|
8033
|
-
resendReward: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
8456
|
+
resendReward: (id: string, resendRewardRequest?: ResendRewardRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
8034
8457
|
};
|
|
8035
8458
|
/**
|
|
8036
8459
|
* RewardsApi - functional programming interface
|
|
@@ -8073,10 +8496,11 @@ export declare const RewardsApiFp: (configuration?: Configuration) => {
|
|
|
8073
8496
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
8074
8497
|
* @summary Resend reward
|
|
8075
8498
|
* @param {string} id ID of the reward that should be resent
|
|
8499
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
8076
8500
|
* @param {*} [options] Override http request option.
|
|
8077
8501
|
* @throws {RequiredError}
|
|
8078
8502
|
*/
|
|
8079
|
-
resendReward(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
8503
|
+
resendReward(id: string, resendRewardRequest?: ResendRewardRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
|
|
8080
8504
|
};
|
|
8081
8505
|
/**
|
|
8082
8506
|
* RewardsApi - factory interface
|
|
@@ -8119,10 +8543,11 @@ export declare const RewardsApiFactory: (configuration?: Configuration, basePath
|
|
|
8119
8543
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
8120
8544
|
* @summary Resend reward
|
|
8121
8545
|
* @param {string} id ID of the reward that should be resent
|
|
8546
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
8122
8547
|
* @param {*} [options] Override http request option.
|
|
8123
8548
|
* @throws {RequiredError}
|
|
8124
8549
|
*/
|
|
8125
|
-
resendReward(id: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
8550
|
+
resendReward(id: string, resendRewardRequest?: ResendRewardRequest, options?: RawAxiosRequestConfig): AxiosPromise<object>;
|
|
8126
8551
|
};
|
|
8127
8552
|
/**
|
|
8128
8553
|
* RewardsApi - object-oriented interface
|
|
@@ -8171,11 +8596,12 @@ export declare class RewardsApi extends BaseAPI {
|
|
|
8171
8596
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
8172
8597
|
* @summary Resend reward
|
|
8173
8598
|
* @param {string} id ID of the reward that should be resent
|
|
8599
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
8174
8600
|
* @param {*} [options] Override http request option.
|
|
8175
8601
|
* @throws {RequiredError}
|
|
8176
8602
|
* @memberof RewardsApi
|
|
8177
8603
|
*/
|
|
8178
|
-
resendReward(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
8604
|
+
resendReward(id: string, resendRewardRequest?: ResendRewardRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
8179
8605
|
}
|
|
8180
8606
|
/**
|
|
8181
8607
|
* RolesApi - axios parameter creator
|
package/dist/api.js
CHANGED
|
@@ -22,9 +22,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
25
|
+
exports.ListMembers200ResponseMembersInnerStatusEnum = exports.ListInvoices200ResponseInvoicesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = exports.GetFraudReview200ResponseFraudReviewReasonsEnum = exports.GetFraudReview200ResponseFraudReviewStatusEnum = exports.FundingSourceTypeEnum = exports.FundingSourceMethodEnum = exports.FraudRulesListItemRuleTypeEnum = exports.FraudRuleType = exports.FraudRuleRequestConfigPeriodEnum = exports.FraudRuleRequestConfigTypeEnum = exports.FraudReviewStatus = exports.FraudReviewRedemptionMethod = exports.FraudReviewReason = exports.FraudReviewListItemReasonsEnum = exports.FraudReviewListItemStatusEnum = exports.FraudReviewRedemptionMethodEnum = exports.FraudReviewReasonsEnum = exports.FraudReviewStatusEnum = exports.FraudConfigRedeemedRewardsCountPeriodEnum = exports.FraudConfigRedeemedRewardsAmountPeriodEnum = exports.FraudConfigCountryTypeEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsWithLinkStatusEnum = exports.DeliveryDetailsWithLinkMethodEnum = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateReportRequestFiltersDigitalRewardsStatusEnum = exports.CreateReportRequestFiltersDigitalRewardsOrderStatusEnum = exports.CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum = exports.CreateReportRequestFormatEnum = exports.CreateReportRequestReportTypeEnum = exports.CreateReport201ResponseReportStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = exports.CreateOrder200ResponseOrderChannelEnum = exports.CreateOrder200ResponseOrderStatusEnum = exports.Channel = void 0;
|
|
26
|
+
exports.FieldsApiAxiosParamCreator = exports.CampaignsApi = exports.CampaignsApiFactory = exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.UpdateFraudRuleListRequestOperationEnum = exports.SingleRewardOrderWithoutLinkOrderChannelEnum = exports.SingleRewardOrderWithoutLinkOrderStatusEnum = exports.SingleRewardOrderWithLinkOrderChannelEnum = exports.SingleRewardOrderWithLinkOrderStatusEnum = exports.SingleRewardOrderRewardDeliveryMethodEnum = exports.RewardWithoutLinkDeliveryStatusEnum = exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardWithLinkDeliveryStatusEnum = exports.RewardWithLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ReviewRedeemedRewardsCountPeriodEnum = exports.ReviewRedeemedRewardsAmountPeriodEnum = exports.ReviewCountryTypeEnum = exports.ReportStatusEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PayoutStatusEnum = exports.OrganizationStatusEnum = exports.OrderWithoutLinkChannelEnum = exports.OrderWithoutLinkStatusEnum = exports.OrderWithLinkChannelEnum = exports.OrderWithLinkStatusEnum = exports.OrderStatus = exports.OrderBaseChannelEnum = exports.OrderBaseStatusEnum = exports.OrderChannelEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = exports.MemberWithEventsStatusEnum = exports.MemberBaseStatusEnum = exports.MemberStatusEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = exports.ListProductsResponseProductsInnerCurrencyCodesEnum = exports.ListProductsResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerChannelEnum = exports.ListOrders200ResponseOrdersInnerStatusEnum = void 0;
|
|
27
|
+
exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ReportsApi = exports.ReportsApiFactory = exports.ReportsApiFp = exports.ReportsApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.MembersApi = exports.MembersApiFactory = exports.MembersApiFp = exports.MembersApiAxiosParamCreator = exports.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = exports.FundingSourcesApi = exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = exports.UpdateFraudRuleListRuleTypeEnum = exports.FraudRuleRuleTypeEnum = exports.DeleteFraudRuleRuleTypeEnum = exports.FraudRulesApi = exports.FraudRulesApiFactory = exports.FraudRulesApiFp = exports.FraudRulesApiAxiosParamCreator = exports.ListFraudReviewsStatusEnum = exports.FraudReviewsApi = exports.FraudReviewsApiFactory = exports.FraudReviewsApiFp = exports.FraudReviewsApiAxiosParamCreator = exports.ForexApi = exports.ForexApiFactory = exports.ForexApiFp = exports.ForexApiAxiosParamCreator = exports.FieldsApi = exports.FieldsApiFactory = exports.FieldsApiFp = void 0;
|
|
28
|
+
exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.RewardsApi = void 0;
|
|
28
29
|
const axios_1 = require("axios");
|
|
29
30
|
// Some imports not used depending on template conditions
|
|
30
31
|
// @ts-ignore
|
|
@@ -73,6 +74,37 @@ exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = {
|
|
|
73
74
|
Succeeded: 'SUCCEEDED',
|
|
74
75
|
Pending: 'PENDING'
|
|
75
76
|
};
|
|
77
|
+
exports.CreateReport201ResponseReportStatusEnum = {
|
|
78
|
+
Created: 'CREATED',
|
|
79
|
+
Processing: 'PROCESSING',
|
|
80
|
+
ReadyForDownload: 'READY_FOR_DOWNLOAD',
|
|
81
|
+
Failed: 'FAILED'
|
|
82
|
+
};
|
|
83
|
+
exports.CreateReportRequestReportTypeEnum = {
|
|
84
|
+
DigitalRewards: 'digital_rewards'
|
|
85
|
+
};
|
|
86
|
+
exports.CreateReportRequestFormatEnum = {
|
|
87
|
+
Csv: 'csv'
|
|
88
|
+
};
|
|
89
|
+
exports.CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum = {
|
|
90
|
+
Phone: 'phone',
|
|
91
|
+
Email: 'email',
|
|
92
|
+
Link: 'link',
|
|
93
|
+
Mail: 'mail',
|
|
94
|
+
Direct: 'direct'
|
|
95
|
+
};
|
|
96
|
+
exports.CreateReportRequestFiltersDigitalRewardsOrderStatusEnum = {
|
|
97
|
+
Executed: 'executed',
|
|
98
|
+
Canceled: 'canceled',
|
|
99
|
+
Failed: 'failed',
|
|
100
|
+
PendingApproval: 'pending_approval'
|
|
101
|
+
};
|
|
102
|
+
exports.CreateReportRequestFiltersDigitalRewardsStatusEnum = {
|
|
103
|
+
Delivered: 'delivered',
|
|
104
|
+
Canceled: 'canceled',
|
|
105
|
+
DeliveryFailed: 'delivery_failed',
|
|
106
|
+
PendingReview: 'pending_review'
|
|
107
|
+
};
|
|
76
108
|
/**
|
|
77
109
|
*
|
|
78
110
|
* @export
|
|
@@ -534,12 +566,12 @@ exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = {
|
|
|
534
566
|
Amex: 'Amex',
|
|
535
567
|
Jcb: 'JCB',
|
|
536
568
|
DinersClub: 'Diner\'s Club',
|
|
537
|
-
Visa: '
|
|
538
|
-
Discover: '
|
|
539
|
-
Laser: '
|
|
540
|
-
Elo: '
|
|
541
|
-
Maestro: '
|
|
542
|
-
Solo: '
|
|
569
|
+
Visa: 'Visa',
|
|
570
|
+
Discover: 'Discover',
|
|
571
|
+
Laser: 'Laser',
|
|
572
|
+
Elo: 'Elo',
|
|
573
|
+
Maestro: 'Maestro',
|
|
574
|
+
Solo: 'Solo'
|
|
543
575
|
};
|
|
544
576
|
exports.ListInvoices200ResponseInvoicesInnerStatusEnum = {
|
|
545
577
|
Deleted: 'DELETED',
|
|
@@ -1068,6 +1100,12 @@ exports.ProductCurrencyCodesEnum = {
|
|
|
1068
1100
|
Zar: 'ZAR',
|
|
1069
1101
|
Zmk: 'ZMK'
|
|
1070
1102
|
};
|
|
1103
|
+
exports.ReportStatusEnum = {
|
|
1104
|
+
Created: 'CREATED',
|
|
1105
|
+
Processing: 'PROCESSING',
|
|
1106
|
+
ReadyForDownload: 'READY_FOR_DOWNLOAD',
|
|
1107
|
+
Failed: 'FAILED'
|
|
1108
|
+
};
|
|
1071
1109
|
exports.ReviewCountryTypeEnum = {
|
|
1072
1110
|
Whitelist: 'whitelist',
|
|
1073
1111
|
Blacklist: 'blacklist'
|
|
@@ -4420,6 +4458,183 @@ class ProductsApi extends base_1.BaseAPI {
|
|
|
4420
4458
|
}
|
|
4421
4459
|
}
|
|
4422
4460
|
exports.ProductsApi = ProductsApi;
|
|
4461
|
+
/**
|
|
4462
|
+
* ReportsApi - axios parameter creator
|
|
4463
|
+
* @export
|
|
4464
|
+
*/
|
|
4465
|
+
const ReportsApiAxiosParamCreator = function (configuration) {
|
|
4466
|
+
return {
|
|
4467
|
+
/**
|
|
4468
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4469
|
+
* @summary Create report
|
|
4470
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4471
|
+
* @param {*} [options] Override http request option.
|
|
4472
|
+
* @throws {RequiredError}
|
|
4473
|
+
*/
|
|
4474
|
+
createReport: (createReportRequest_1, ...args_1) => __awaiter(this, [createReportRequest_1, ...args_1], void 0, function* (createReportRequest, options = {}) {
|
|
4475
|
+
// verify required parameter 'createReportRequest' is not null or undefined
|
|
4476
|
+
(0, common_1.assertParamExists)('createReport', 'createReportRequest', createReportRequest);
|
|
4477
|
+
const localVarPath = `/reports`;
|
|
4478
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4479
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4480
|
+
let baseOptions;
|
|
4481
|
+
if (configuration) {
|
|
4482
|
+
baseOptions = configuration.baseOptions;
|
|
4483
|
+
}
|
|
4484
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
4485
|
+
const localVarHeaderParameter = {};
|
|
4486
|
+
const localVarQueryParameter = {};
|
|
4487
|
+
// authentication BearerApiKey required
|
|
4488
|
+
// http bearer authentication required
|
|
4489
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4490
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4491
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4492
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4493
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4494
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createReportRequest, localVarRequestOptions, configuration);
|
|
4495
|
+
return {
|
|
4496
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4497
|
+
options: localVarRequestOptions,
|
|
4498
|
+
};
|
|
4499
|
+
}),
|
|
4500
|
+
/**
|
|
4501
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
4502
|
+
* @summary Retrieve report
|
|
4503
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
4504
|
+
* @param {*} [options] Override http request option.
|
|
4505
|
+
* @throws {RequiredError}
|
|
4506
|
+
*/
|
|
4507
|
+
getReport: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
4508
|
+
// verify required parameter 'id' is not null or undefined
|
|
4509
|
+
(0, common_1.assertParamExists)('getReport', 'id', id);
|
|
4510
|
+
const localVarPath = `/reports/{id}`
|
|
4511
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4512
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4513
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4514
|
+
let baseOptions;
|
|
4515
|
+
if (configuration) {
|
|
4516
|
+
baseOptions = configuration.baseOptions;
|
|
4517
|
+
}
|
|
4518
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4519
|
+
const localVarHeaderParameter = {};
|
|
4520
|
+
const localVarQueryParameter = {};
|
|
4521
|
+
// authentication BearerApiKey required
|
|
4522
|
+
// http bearer authentication required
|
|
4523
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4524
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4525
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4526
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4527
|
+
return {
|
|
4528
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4529
|
+
options: localVarRequestOptions,
|
|
4530
|
+
};
|
|
4531
|
+
}),
|
|
4532
|
+
};
|
|
4533
|
+
};
|
|
4534
|
+
exports.ReportsApiAxiosParamCreator = ReportsApiAxiosParamCreator;
|
|
4535
|
+
/**
|
|
4536
|
+
* ReportsApi - functional programming interface
|
|
4537
|
+
* @export
|
|
4538
|
+
*/
|
|
4539
|
+
const ReportsApiFp = function (configuration) {
|
|
4540
|
+
const localVarAxiosParamCreator = (0, exports.ReportsApiAxiosParamCreator)(configuration);
|
|
4541
|
+
return {
|
|
4542
|
+
/**
|
|
4543
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4544
|
+
* @summary Create report
|
|
4545
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4546
|
+
* @param {*} [options] Override http request option.
|
|
4547
|
+
* @throws {RequiredError}
|
|
4548
|
+
*/
|
|
4549
|
+
createReport(createReportRequest, options) {
|
|
4550
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4551
|
+
var _a, _b, _c;
|
|
4552
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createReport(createReportRequest, options);
|
|
4553
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4554
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ReportsApi.createReport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4555
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4556
|
+
});
|
|
4557
|
+
},
|
|
4558
|
+
/**
|
|
4559
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
4560
|
+
* @summary Retrieve report
|
|
4561
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
4562
|
+
* @param {*} [options] Override http request option.
|
|
4563
|
+
* @throws {RequiredError}
|
|
4564
|
+
*/
|
|
4565
|
+
getReport(id, options) {
|
|
4566
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4567
|
+
var _a, _b, _c;
|
|
4568
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getReport(id, options);
|
|
4569
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4570
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ReportsApi.getReport']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4571
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4572
|
+
});
|
|
4573
|
+
},
|
|
4574
|
+
};
|
|
4575
|
+
};
|
|
4576
|
+
exports.ReportsApiFp = ReportsApiFp;
|
|
4577
|
+
/**
|
|
4578
|
+
* ReportsApi - factory interface
|
|
4579
|
+
* @export
|
|
4580
|
+
*/
|
|
4581
|
+
const ReportsApiFactory = function (configuration, basePath, axios) {
|
|
4582
|
+
const localVarFp = (0, exports.ReportsApiFp)(configuration);
|
|
4583
|
+
return {
|
|
4584
|
+
/**
|
|
4585
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4586
|
+
* @summary Create report
|
|
4587
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4588
|
+
* @param {*} [options] Override http request option.
|
|
4589
|
+
* @throws {RequiredError}
|
|
4590
|
+
*/
|
|
4591
|
+
createReport(createReportRequest, options) {
|
|
4592
|
+
return localVarFp.createReport(createReportRequest, options).then((request) => request(axios, basePath));
|
|
4593
|
+
},
|
|
4594
|
+
/**
|
|
4595
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
4596
|
+
* @summary Retrieve report
|
|
4597
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
4598
|
+
* @param {*} [options] Override http request option.
|
|
4599
|
+
* @throws {RequiredError}
|
|
4600
|
+
*/
|
|
4601
|
+
getReport(id, options) {
|
|
4602
|
+
return localVarFp.getReport(id, options).then((request) => request(axios, basePath));
|
|
4603
|
+
},
|
|
4604
|
+
};
|
|
4605
|
+
};
|
|
4606
|
+
exports.ReportsApiFactory = ReportsApiFactory;
|
|
4607
|
+
/**
|
|
4608
|
+
* ReportsApi - object-oriented interface
|
|
4609
|
+
* @export
|
|
4610
|
+
* @class ReportsApi
|
|
4611
|
+
* @extends {BaseAPI}
|
|
4612
|
+
*/
|
|
4613
|
+
class ReportsApi extends base_1.BaseAPI {
|
|
4614
|
+
/**
|
|
4615
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simulataneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4616
|
+
* @summary Create report
|
|
4617
|
+
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4618
|
+
* @param {*} [options] Override http request option.
|
|
4619
|
+
* @throws {RequiredError}
|
|
4620
|
+
* @memberof ReportsApi
|
|
4621
|
+
*/
|
|
4622
|
+
createReport(createReportRequest, options) {
|
|
4623
|
+
return (0, exports.ReportsApiFp)(this.configuration).createReport(createReportRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4624
|
+
}
|
|
4625
|
+
/**
|
|
4626
|
+
* Retrieve the report, identified by the given `id` in the URL Using the ID that was returned by `POST /api/v2/reports`, retrieves a download link for the report, identified by the given ID in the URL. Returns the report’s current status and, if available, the URL for download. The URL is valid for 7 days.
|
|
4627
|
+
* @summary Retrieve report
|
|
4628
|
+
* @param {string} id ID of the report that should be retrieved. ID is returned from `POST` to /api/v2/reports
|
|
4629
|
+
* @param {*} [options] Override http request option.
|
|
4630
|
+
* @throws {RequiredError}
|
|
4631
|
+
* @memberof ReportsApi
|
|
4632
|
+
*/
|
|
4633
|
+
getReport(id, options) {
|
|
4634
|
+
return (0, exports.ReportsApiFp)(this.configuration).getReport(id, options).then((request) => request(this.axios, this.basePath));
|
|
4635
|
+
}
|
|
4636
|
+
}
|
|
4637
|
+
exports.ReportsApi = ReportsApi;
|
|
4423
4638
|
/**
|
|
4424
4639
|
* RewardsApi - axios parameter creator
|
|
4425
4640
|
* @export
|
|
@@ -4558,10 +4773,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
4558
4773
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
4559
4774
|
* @summary Resend reward
|
|
4560
4775
|
* @param {string} id ID of the reward that should be resent
|
|
4776
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
4561
4777
|
* @param {*} [options] Override http request option.
|
|
4562
4778
|
* @throws {RequiredError}
|
|
4563
4779
|
*/
|
|
4564
|
-
resendReward: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
4780
|
+
resendReward: (id_1, resendRewardRequest_1, ...args_1) => __awaiter(this, [id_1, resendRewardRequest_1, ...args_1], void 0, function* (id, resendRewardRequest, options = {}) {
|
|
4565
4781
|
// verify required parameter 'id' is not null or undefined
|
|
4566
4782
|
(0, common_1.assertParamExists)('resendReward', 'id', id);
|
|
4567
4783
|
const localVarPath = `/rewards/{id}/resend`
|
|
@@ -4578,9 +4794,11 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
4578
4794
|
// authentication BearerApiKey required
|
|
4579
4795
|
// http bearer authentication required
|
|
4580
4796
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4797
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4581
4798
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4582
4799
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4583
4800
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4801
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resendRewardRequest, localVarRequestOptions, configuration);
|
|
4584
4802
|
return {
|
|
4585
4803
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4586
4804
|
options: localVarRequestOptions,
|
|
@@ -4664,13 +4882,14 @@ const RewardsApiFp = function (configuration) {
|
|
|
4664
4882
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
4665
4883
|
* @summary Resend reward
|
|
4666
4884
|
* @param {string} id ID of the reward that should be resent
|
|
4885
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
4667
4886
|
* @param {*} [options] Override http request option.
|
|
4668
4887
|
* @throws {RequiredError}
|
|
4669
4888
|
*/
|
|
4670
|
-
resendReward(id, options) {
|
|
4889
|
+
resendReward(id, resendRewardRequest, options) {
|
|
4671
4890
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4672
4891
|
var _a, _b, _c;
|
|
4673
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.resendReward(id, options);
|
|
4892
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.resendReward(id, resendRewardRequest, options);
|
|
4674
4893
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4675
4894
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.resendReward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4676
4895
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -4730,11 +4949,12 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
4730
4949
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
4731
4950
|
* @summary Resend reward
|
|
4732
4951
|
* @param {string} id ID of the reward that should be resent
|
|
4952
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
4733
4953
|
* @param {*} [options] Override http request option.
|
|
4734
4954
|
* @throws {RequiredError}
|
|
4735
4955
|
*/
|
|
4736
|
-
resendReward(id, options) {
|
|
4737
|
-
return localVarFp.resendReward(id, options).then((request) => request(axios, basePath));
|
|
4956
|
+
resendReward(id, resendRewardRequest, options) {
|
|
4957
|
+
return localVarFp.resendReward(id, resendRewardRequest, options).then((request) => request(axios, basePath));
|
|
4738
4958
|
},
|
|
4739
4959
|
};
|
|
4740
4960
|
};
|
|
@@ -4794,12 +5014,13 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
4794
5014
|
* Resends a reward, identified by the given `id` in the URL, to its recipient.
|
|
4795
5015
|
* @summary Resend reward
|
|
4796
5016
|
* @param {string} id ID of the reward that should be resent
|
|
5017
|
+
* @param {ResendRewardRequest} [resendRewardRequest] _Only_ for rewards with a previous delivery failure: You can update the email or phone number used for the resend. You can only provide one of `updated_email` or `updated_phone`, not both.
|
|
4797
5018
|
* @param {*} [options] Override http request option.
|
|
4798
5019
|
* @throws {RequiredError}
|
|
4799
5020
|
* @memberof RewardsApi
|
|
4800
5021
|
*/
|
|
4801
|
-
resendReward(id, options) {
|
|
4802
|
-
return (0, exports.RewardsApiFp)(this.configuration).resendReward(id, options).then((request) => request(this.axios, this.basePath));
|
|
5022
|
+
resendReward(id, resendRewardRequest, options) {
|
|
5023
|
+
return (0, exports.RewardsApiFp)(this.configuration).resendReward(id, resendRewardRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4803
5024
|
}
|
|
4804
5025
|
}
|
|
4805
5026
|
exports.RewardsApi = RewardsApi;
|