@snagsolutions/sdk 0.1.0-alpha.181 → 0.1.0-alpha.183

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.d.mts +2 -2
  3. package/index.d.ts +2 -2
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/resources/auctions/auctions.d.ts +62 -4
  9. package/resources/auctions/auctions.d.ts.map +1 -1
  10. package/resources/auctions/auctions.js +1 -5
  11. package/resources/auctions/auctions.js.map +1 -1
  12. package/resources/auctions/auctions.mjs +1 -5
  13. package/resources/auctions/auctions.mjs.map +1 -1
  14. package/resources/auctions/index.d.ts +1 -1
  15. package/resources/auctions/index.d.ts.map +1 -1
  16. package/resources/auctions/index.js.map +1 -1
  17. package/resources/auctions/index.mjs.map +1 -1
  18. package/resources/auctions/website-user-attributes/values.d.ts +6 -2
  19. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -1
  20. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +6 -2
  21. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -1
  22. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -1
  23. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -1
  24. package/resources/index.d.ts +1 -1
  25. package/resources/index.d.ts.map +1 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs.map +1 -1
  28. package/resources/loyalty/badges.d.ts +212 -203
  29. package/resources/loyalty/badges.d.ts.map +1 -1
  30. package/resources/loyalty/questions-responses.d.ts +16 -4
  31. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  32. package/resources/loyalty/questions.d.ts +15 -4
  33. package/resources/loyalty/questions.d.ts.map +1 -1
  34. package/resources/loyalty/rule-groups.d.ts +1 -1
  35. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  36. package/resources/loyalty/rules.d.ts +2 -2
  37. package/resources/loyalty/rules.d.ts.map +1 -1
  38. package/resources/loyalty/transactions/transactions.d.ts +1 -1
  39. package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
  40. package/resources/loyalty/transactions/transactions.js.map +1 -1
  41. package/resources/loyalty/transactions/transactions.mjs.map +1 -1
  42. package/resources/users/users.d.ts +4 -0
  43. package/resources/users/users.d.ts.map +1 -1
  44. package/resources/users/users.js.map +1 -1
  45. package/resources/users/users.mjs.map +1 -1
  46. package/src/index.ts +2 -0
  47. package/src/resources/auctions/auctions.ts +101 -9
  48. package/src/resources/auctions/index.ts +1 -0
  49. package/src/resources/auctions/website-user-attributes/values.ts +7 -2
  50. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +7 -2
  51. package/src/resources/index.ts +1 -0
  52. package/src/resources/loyalty/badges.ts +230 -219
  53. package/src/resources/loyalty/questions-responses.ts +19 -4
  54. package/src/resources/loyalty/questions.ts +18 -4
  55. package/src/resources/loyalty/rule-groups.ts +2 -1
  56. package/src/resources/loyalty/rules.ts +4 -2
  57. package/src/resources/loyalty/transactions/transactions.ts +2 -0
  58. package/src/resources/users/users.ts +5 -0
  59. package/src/version.ts +1 -1
  60. package/version.d.ts +1 -1
  61. package/version.js +1 -1
  62. package/version.mjs +1 -1
@@ -789,329 +789,340 @@ export namespace BadgeUpdateResponse {
789
789
  }
790
790
  }
791
791
 
792
- /**
793
- * Response returned upon successful fetching of the badges.
794
- */
795
792
  export interface BadgeListResponse {
796
- /**
797
- * UUID of the badge (converted to lowercase)
798
- */
799
- id: string;
800
-
801
- /**
802
- * The date and time the badge was created
803
- */
804
- createdAt: string;
805
-
806
- /**
807
- * The description of the badge
808
- */
809
- description: string | null;
810
-
811
- /**
812
- * The URL of the badge image
813
- */
814
- imageUrl: string | null;
815
-
816
- /**
817
- * Array of conditions of the badge
818
- */
819
- loyaltyConditions: Array<BadgeListResponse.LoyaltyCondition>;
820
-
821
- /**
822
- * The name of the badge
823
- */
824
- name: string;
825
-
826
- /**
827
- * The date and time the badge was updated
828
- */
829
- updatedAt: string;
830
-
831
- /**
832
- * Array of data jobs associated with the badge
833
- */
834
- dataJobs?: Array<BadgeListResponse.DataJob>;
793
+ data: Array<BadgeListResponse.Data>;
835
794
 
836
795
  /**
837
- * Array of user badges
796
+ * Indicates if there is a next page of results
838
797
  */
839
- loyaltyBadgeUsers?: Array<BadgeListResponse.LoyaltyBadgeUser>;
840
-
841
- /**
842
- * Array of loyalty rules associated with the badge
843
- */
844
- loyaltyRules?: Array<BadgeListResponse.LoyaltyRule>;
798
+ hasNextPage: boolean;
845
799
  }
846
800
 
847
801
  export namespace BadgeListResponse {
848
802
  /**
849
- * Schema for a loyalty condition rule.
803
+ * Response returned upon successful fetching of the badges.
850
804
  */
851
- export interface LoyaltyCondition {
805
+ export interface Data {
852
806
  /**
853
- * UUID of the condition (converted to lowercase)
807
+ * UUID of the badge (converted to lowercase)
854
808
  */
855
809
  id: string;
856
810
 
857
811
  /**
858
- * The amount of the condition
812
+ * The date and time the badge was created
859
813
  */
860
- amount: number | null;
861
-
862
- association: Array<LoyaltyCondition.Association>;
814
+ createdAt: string;
863
815
 
864
816
  /**
865
- * URL of the CSV file
817
+ * The description of the badge
866
818
  */
867
- csvUrl: string | null;
819
+ description: string | null;
868
820
 
869
821
  /**
870
- * The description of the condition
822
+ * The URL of the badge image
871
823
  */
872
- description: string | null;
824
+ imageUrl: string | null;
873
825
 
874
826
  /**
875
- * UUID of the currency (converted to lowercase)
827
+ * Array of conditions of the badge
876
828
  */
877
- loyaltyCurrencyId: string | null;
829
+ loyaltyConditions: Array<Data.LoyaltyCondition>;
878
830
 
879
831
  /**
880
- * UUID of the rule group (converted to lowercase)
832
+ * The name of the badge
881
833
  */
882
- loyaltyRuleGroupId: string | null;
834
+ name: string;
883
835
 
884
836
  /**
885
- * The repeat count of the condition
837
+ * The date and time the badge was updated
886
838
  */
887
- repeatCount: number | null;
839
+ updatedAt: string;
888
840
 
889
841
  /**
890
- * The required count of the condition
842
+ * Array of data jobs associated with the badge
891
843
  */
892
- requiredCount: number | null;
844
+ dataJobs?: Array<Data.DataJob>;
893
845
 
894
846
  /**
895
- * The type of the condition
847
+ * Array of user badges
896
848
  */
897
- type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
849
+ loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
898
850
 
899
851
  /**
900
- * Array of CSV files associated with the condition
852
+ * Array of loyalty rules associated with the badge
901
853
  */
902
- csvFiles?: Array<LoyaltyCondition.CsvFile>;
854
+ loyaltyRules?: Array<Data.LoyaltyRule>;
903
855
  }
904
856
 
905
- export namespace LoyaltyCondition {
906
- export interface Association {
907
- loyaltyBadge: Association.LoyaltyBadge | null;
857
+ export namespace Data {
858
+ /**
859
+ * Schema for a loyalty condition rule.
860
+ */
861
+ export interface LoyaltyCondition {
862
+ /**
863
+ * UUID of the condition (converted to lowercase)
864
+ */
865
+ id: string;
908
866
 
909
- loyaltyCurrency: Association.LoyaltyCurrency | null;
867
+ /**
868
+ * The amount of the condition
869
+ */
870
+ amount: number | null;
910
871
 
911
- loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
872
+ association: Array<LoyaltyCondition.Association>;
912
873
 
913
- loyaltyRule: Association.LoyaltyRule | null;
874
+ /**
875
+ * URL of the CSV file
876
+ */
877
+ csvUrl: string | null;
914
878
 
915
- loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
879
+ /**
880
+ * The description of the condition
881
+ */
882
+ description: string | null;
883
+
884
+ /**
885
+ * UUID of the currency (converted to lowercase)
886
+ */
887
+ loyaltyCurrencyId: string | null;
888
+
889
+ /**
890
+ * UUID of the rule group (converted to lowercase)
891
+ */
892
+ loyaltyRuleGroupId: string | null;
893
+
894
+ /**
895
+ * The repeat count of the condition
896
+ */
897
+ repeatCount: number | null;
898
+
899
+ /**
900
+ * The required count of the condition
901
+ */
902
+ requiredCount: number | null;
903
+
904
+ /**
905
+ * The type of the condition
906
+ */
907
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
908
+
909
+ /**
910
+ * Array of CSV files associated with the condition
911
+ */
912
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
916
913
  }
917
914
 
918
- export namespace Association {
919
- export interface LoyaltyBadge {
920
- /**
921
- * UUID of the association (converted to lowercase)
922
- */
923
- id: string;
915
+ export namespace LoyaltyCondition {
916
+ export interface Association {
917
+ loyaltyBadge: Association.LoyaltyBadge | null;
924
918
 
925
- /**
926
- * The name of the association
927
- */
928
- name: string;
929
- }
919
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
930
920
 
931
- export interface LoyaltyCurrency {
932
- /**
933
- * UUID of the association (converted to lowercase)
934
- */
935
- id: string;
921
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
936
922
 
937
- /**
938
- * The name of the association
939
- */
940
- name: string;
941
- }
923
+ loyaltyRule: Association.LoyaltyRule | null;
942
924
 
943
- export interface LoyaltyLeaderboardView {
944
- /**
945
- * UUID of the association (converted to lowercase)
946
- */
947
- id: string;
925
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
926
+ }
948
927
 
949
- /**
950
- * The name of the association
951
- */
952
- name: string;
928
+ export namespace Association {
929
+ export interface LoyaltyBadge {
930
+ /**
931
+ * UUID of the association (converted to lowercase)
932
+ */
933
+ id: string;
934
+
935
+ /**
936
+ * The name of the association
937
+ */
938
+ name: string;
939
+ }
940
+
941
+ export interface LoyaltyCurrency {
942
+ /**
943
+ * UUID of the association (converted to lowercase)
944
+ */
945
+ id: string;
946
+
947
+ /**
948
+ * The name of the association
949
+ */
950
+ name: string;
951
+ }
952
+
953
+ export interface LoyaltyLeaderboardView {
954
+ /**
955
+ * UUID of the association (converted to lowercase)
956
+ */
957
+ id: string;
958
+
959
+ /**
960
+ * The name of the association
961
+ */
962
+ name: string;
963
+ }
964
+
965
+ export interface LoyaltyRule {
966
+ /**
967
+ * UUID of the association (converted to lowercase)
968
+ */
969
+ id: string;
970
+
971
+ /**
972
+ * The name of the association
973
+ */
974
+ name: string;
975
+ }
976
+
977
+ export interface LoyaltyRuleGroup {
978
+ /**
979
+ * UUID of the association (converted to lowercase)
980
+ */
981
+ id: string;
982
+
983
+ /**
984
+ * The name of the association
985
+ */
986
+ name: string;
987
+ }
953
988
  }
954
989
 
955
- export interface LoyaltyRule {
990
+ export interface CsvFile {
956
991
  /**
957
- * UUID of the association (converted to lowercase)
992
+ * UUID of the CSV file (converted to lowercase)
958
993
  */
959
994
  id: string;
960
995
 
961
996
  /**
962
- * The name of the association
997
+ * The description of the CSV file
963
998
  */
964
- name: string;
965
- }
999
+ description: string | null;
966
1000
 
967
- export interface LoyaltyRuleGroup {
968
1001
  /**
969
- * UUID of the association (converted to lowercase)
1002
+ * The name of the CSV file
970
1003
  */
971
- id: string;
1004
+ name: string | null;
972
1005
 
973
1006
  /**
974
- * The name of the association
1007
+ * The URL of the CSV file
975
1008
  */
976
- name: string;
1009
+ url: string | null;
977
1010
  }
978
1011
  }
979
1012
 
980
- export interface CsvFile {
1013
+ export interface DataJob {
981
1014
  /**
982
- * UUID of the CSV file (converted to lowercase)
1015
+ * UUID of the data job (converted to lowercase)
983
1016
  */
984
1017
  id: string;
985
1018
 
986
1019
  /**
987
- * The description of the CSV file
1020
+ * The date and time the data job was created
988
1021
  */
989
- description: string | null;
1022
+ createdAt: string;
990
1023
 
991
1024
  /**
992
- * The name of the CSV file
1025
+ * The status of the data job
993
1026
  */
994
- name: string | null;
1027
+ status: 'pending' | 'complete' | 'failed';
995
1028
 
996
1029
  /**
997
- * The URL of the CSV file
1030
+ * The date and time the data job was updated
998
1031
  */
999
- url: string | null;
1000
- }
1001
- }
1002
-
1003
- export interface DataJob {
1004
- /**
1005
- * UUID of the data job (converted to lowercase)
1006
- */
1007
- id: string;
1008
-
1009
- /**
1010
- * The date and time the data job was created
1011
- */
1012
- createdAt: string;
1032
+ updatedAt: string;
1013
1033
 
1014
- /**
1015
- * The status of the data job
1016
- */
1017
- status: 'pending' | 'complete' | 'failed';
1034
+ /**
1035
+ * The message associated with the data job
1036
+ */
1037
+ message?: string | null;
1038
+ }
1018
1039
 
1019
- /**
1020
- * The date and time the data job was updated
1021
- */
1022
- updatedAt: string;
1040
+ export interface LoyaltyBadgeUser {
1041
+ /**
1042
+ * UUID of the user badge (converted to lowercase)
1043
+ */
1044
+ id: string;
1023
1045
 
1024
- /**
1025
- * The message associated with the data job
1026
- */
1027
- message?: string | null;
1028
- }
1046
+ /**
1047
+ * The date and time the user badge was created
1048
+ */
1049
+ createdAt: string;
1029
1050
 
1030
- export interface LoyaltyBadgeUser {
1031
- /**
1032
- * UUID of the user badge (converted to lowercase)
1033
- */
1034
- id: string;
1051
+ /**
1052
+ * UUID of the badge (converted to lowercase)
1053
+ */
1054
+ loyaltyBadgeId: string;
1035
1055
 
1036
- /**
1037
- * The date and time the user badge was created
1038
- */
1039
- createdAt: string;
1056
+ /**
1057
+ * UUID of the organization (converted to lowercase)
1058
+ */
1059
+ organizationId: string;
1040
1060
 
1041
- /**
1042
- * UUID of the badge (converted to lowercase)
1043
- */
1044
- loyaltyBadgeId: string;
1061
+ /**
1062
+ * The status of the badge
1063
+ */
1064
+ status: 'active' | 'inactive' | 'revoked';
1045
1065
 
1046
- /**
1047
- * UUID of the organization (converted to lowercase)
1048
- */
1049
- organizationId: string;
1066
+ /**
1067
+ * The date and time the user badge was updated
1068
+ */
1069
+ updatedAt: string;
1050
1070
 
1051
- /**
1052
- * The status of the badge
1053
- */
1054
- status: 'active' | 'inactive' | 'revoked';
1071
+ /**
1072
+ * UUID of the user (converted to lowercase)
1073
+ */
1074
+ userId: string;
1055
1075
 
1056
- /**
1057
- * The date and time the user badge was updated
1058
- */
1059
- updatedAt: string;
1076
+ /**
1077
+ * UUID of the website (converted to lowercase)
1078
+ */
1079
+ websiteId: string;
1060
1080
 
1061
- /**
1062
- * UUID of the user (converted to lowercase)
1063
- */
1064
- userId: string;
1081
+ /**
1082
+ * Whether the user has dismissed the badge in the UI
1083
+ */
1084
+ dismissedInUi?: boolean;
1065
1085
 
1066
- /**
1067
- * UUID of the website (converted to lowercase)
1068
- */
1069
- websiteId: string;
1086
+ /**
1087
+ * Array of progress for the badge
1088
+ */
1089
+ progress?: unknown;
1070
1090
 
1071
- /**
1072
- * Whether the user has dismissed the badge in the UI
1073
- */
1074
- dismissedInUi?: boolean;
1091
+ /**
1092
+ * User associated with the user badge
1093
+ */
1094
+ user?: LoyaltyBadgeUser.User;
1095
+ }
1075
1096
 
1076
- /**
1077
- * Array of progress for the badge
1078
- */
1079
- progress?: unknown;
1097
+ export namespace LoyaltyBadgeUser {
1098
+ /**
1099
+ * User associated with the user badge
1100
+ */
1101
+ export interface User {
1102
+ /**
1103
+ * UUID of the user (converted to lowercase)
1104
+ */
1105
+ id: string;
1080
1106
 
1081
- /**
1082
- * User associated with the user badge
1083
- */
1084
- user?: LoyaltyBadgeUser.User;
1085
- }
1107
+ /**
1108
+ * Wallet address of the user
1109
+ */
1110
+ walletAddress: string;
1111
+ }
1112
+ }
1086
1113
 
1087
- export namespace LoyaltyBadgeUser {
1088
- /**
1089
- * User associated with the user badge
1090
- */
1091
- export interface User {
1114
+ export interface LoyaltyRule {
1092
1115
  /**
1093
- * UUID of the user (converted to lowercase)
1116
+ * UUID of the loyalty rule (converted to lowercase)
1094
1117
  */
1095
1118
  id: string;
1096
1119
 
1097
1120
  /**
1098
- * Wallet address of the user
1121
+ * The name of the loyalty rule
1099
1122
  */
1100
- walletAddress: string;
1123
+ name: string;
1101
1124
  }
1102
1125
  }
1103
-
1104
- export interface LoyaltyRule {
1105
- /**
1106
- * UUID of the loyalty rule (converted to lowercase)
1107
- */
1108
- id: string;
1109
-
1110
- /**
1111
- * The name of the loyalty rule
1112
- */
1113
- name: string;
1114
- }
1115
1126
  }
1116
1127
 
1117
1128
  /**
@@ -54,14 +54,19 @@ export class QuestionsResponses extends APIResource {
54
54
  * List of question responses with details
55
55
  */
56
56
  export interface QuestionsResponseListResponse {
57
- responses: Array<QuestionsResponseListResponse.Response>;
57
+ data: Array<QuestionsResponseListResponse.Data>;
58
+
59
+ /**
60
+ * Indicates if there are more pages of results available
61
+ */
62
+ hasNextPage: boolean;
58
63
  }
59
64
 
60
65
  export namespace QuestionsResponseListResponse {
61
66
  /**
62
67
  * Response details including the question and choice information
63
68
  */
64
- export interface Response {
69
+ export interface Data {
65
70
  id: string;
66
71
 
67
72
  createdAt: string;
@@ -72,12 +77,12 @@ export namespace QuestionsResponseListResponse {
72
77
 
73
78
  loyaltyQuestionId: string;
74
79
 
75
- question: Response.Question;
80
+ question: Data.Question;
76
81
 
77
82
  userId: string;
78
83
  }
79
84
 
80
- export namespace Response {
85
+ export namespace Data {
81
86
  export interface Question {
82
87
  loyaltyQuestionChoices: Array<Question.LoyaltyQuestionChoice>;
83
88
 
@@ -138,6 +143,11 @@ export namespace QuestionsResponseSubmitResponse {
138
143
  }
139
144
 
140
145
  export interface QuestionsResponseListParams {
146
+ /**
147
+ * Maximum number of records to return (max 100)
148
+ */
149
+ limit?: number;
150
+
141
151
  /**
142
152
  * UUID of the organization to filter responses
143
153
  */
@@ -148,6 +158,11 @@ export interface QuestionsResponseListParams {
148
158
  */
149
159
  questionsId?: string | Array<string>;
150
160
 
161
+ /**
162
+ * Pagination cursor to start after a specific resource ID
163
+ */
164
+ startingAfter?: string;
165
+
151
166
  /**
152
167
  * UUID of the user to filter responses
153
168
  */
@@ -103,21 +103,25 @@ export namespace QuestionUpdateResponse {
103
103
  }
104
104
  }
105
105
 
106
- export type QuestionListResponse = Array<QuestionListResponse.QuestionListResponseItem>;
106
+ export interface QuestionListResponse {
107
+ data: Array<QuestionListResponse.Data>;
108
+
109
+ hasNextPage: boolean;
110
+ }
107
111
 
108
112
  export namespace QuestionListResponse {
109
113
  /**
110
114
  * Response returned for a question
111
115
  */
112
- export interface QuestionListResponseItem {
116
+ export interface Data {
113
117
  id: string;
114
118
 
115
- loyaltyQuestionChoices: Array<QuestionListResponseItem.LoyaltyQuestionChoice>;
119
+ loyaltyQuestionChoices: Array<Data.LoyaltyQuestionChoice>;
116
120
 
117
121
  text: string;
118
122
  }
119
123
 
120
- export namespace QuestionListResponseItem {
124
+ export namespace Data {
121
125
  export interface LoyaltyQuestionChoice {
122
126
  id: string;
123
127
 
@@ -216,11 +220,21 @@ export interface QuestionListParams {
216
220
  */
217
221
  loyaltyRuleIds: string | Array<string>;
218
222
 
223
+ /**
224
+ * Maximum number of records to return (max 100)
225
+ */
226
+ limit?: number;
227
+
219
228
  /**
220
229
  * UUID of the organization to fetch questions for
221
230
  */
222
231
  organizationId?: string;
223
232
 
233
+ /**
234
+ * Pagination cursor to start after a specific resource ID
235
+ */
236
+ startingAfter?: string;
237
+
224
238
  /**
225
239
  * UUID of the user to fetch questions for
226
240
  */
@@ -254,7 +254,8 @@ export namespace RuleGroupGetRuleGroupsResponse {
254
254
  | 'discord_join'
255
255
  | 'connected_youtube'
256
256
  | 'stratus_function'
257
- | 'connected_tiktok';
257
+ | 'connected_tiktok'
258
+ | 'tiktok_follow';
258
259
  }
259
260
 
260
261
  export namespace LoyaltyRule {