@chotot/ct-logic-uni-rev-premium-v1 1.286.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.
Files changed (93) hide show
  1. package/ad.proto +89 -0
  2. package/ad_delivery.proto +232 -0
  3. package/ad_delivery_pb.d.ts +1285 -0
  4. package/ad_delivery_pb.js +439 -0
  5. package/ad_delivery_service-LogicUniRevPremiumAdDeliveryService_connectquery.d.ts +138 -0
  6. package/ad_delivery_service-LogicUniRevPremiumAdDeliveryService_connectquery.js +211 -0
  7. package/ad_delivery_service.proto +65 -0
  8. package/ad_delivery_service_connect.d.ts +125 -0
  9. package/ad_delivery_service_connect.js +125 -0
  10. package/ad_optimization.proto +111 -0
  11. package/ad_optimization_pb.d.ts +601 -0
  12. package/ad_optimization_pb.js +214 -0
  13. package/ad_optimization_service-LogicUniRevPremiumAdOptimizationService_connectquery.d.ts +78 -0
  14. package/ad_optimization_service-LogicUniRevPremiumAdOptimizationService_connectquery.js +115 -0
  15. package/ad_optimization_service.proto +21 -0
  16. package/ad_optimization_service_connect.d.ts +71 -0
  17. package/ad_optimization_service_connect.js +71 -0
  18. package/ad_pb.d.ts +461 -0
  19. package/ad_pb.js +172 -0
  20. package/ad_service-LogicUniRevPremiumAdService_connectquery.d.ts +58 -0
  21. package/ad_service-LogicUniRevPremiumAdService_connectquery.js +83 -0
  22. package/ad_service.proto +15 -0
  23. package/ad_service_connect.d.ts +53 -0
  24. package/ad_service_connect.js +53 -0
  25. package/ad_social_platform.proto +108 -0
  26. package/ad_social_platform_pb.d.ts +474 -0
  27. package/ad_social_platform_pb.js +156 -0
  28. package/ad_social_platform_service-LogicUniRevPremiumAdSocialPlatformService_connectquery.d.ts +68 -0
  29. package/ad_social_platform_service-LogicUniRevPremiumAdSocialPlatformService_connectquery.js +99 -0
  30. package/ad_social_platform_service.proto +23 -0
  31. package/ad_social_platform_service_connect.d.ts +62 -0
  32. package/ad_social_platform_service_connect.js +62 -0
  33. package/bump_ad.proto +162 -0
  34. package/bump_ad_pb.d.ts +869 -0
  35. package/bump_ad_pb.js +308 -0
  36. package/bump_ad_service-LogicUniRevPremiumBumpAdService_connectquery.d.ts +123 -0
  37. package/bump_ad_service-LogicUniRevPremiumBumpAdService_connectquery.js +189 -0
  38. package/bump_ad_service.proto +56 -0
  39. package/bump_ad_service_connect.d.ts +112 -0
  40. package/bump_ad_service_connect.js +112 -0
  41. package/free_ps.proto +527 -0
  42. package/free_ps_pb.d.ts +2848 -0
  43. package/free_ps_pb.js +934 -0
  44. package/free_ps_service-LogicUniRevPremiumFreePsService_connectquery.d.ts +304 -0
  45. package/free_ps_service-LogicUniRevPremiumFreePsService_connectquery.js +483 -0
  46. package/free_ps_service.proto +62 -0
  47. package/free_ps_service_connect.d.ts +276 -0
  48. package/free_ps_service_connect.js +276 -0
  49. package/listing_tier.proto +228 -0
  50. package/listing_tier_pb.d.ts +1032 -0
  51. package/listing_tier_pb.js +365 -0
  52. package/listing_tier_service-LogicUniRevPremiumListingTierService_connectquery.d.ts +108 -0
  53. package/listing_tier_service-LogicUniRevPremiumListingTierService_connectquery.js +163 -0
  54. package/listing_tier_service.proto +19 -0
  55. package/listing_tier_service_connect.d.ts +98 -0
  56. package/listing_tier_service_connect.js +98 -0
  57. package/onbehalf.proto +91 -0
  58. package/onbehalf_pb.d.ts +411 -0
  59. package/onbehalf_pb.js +138 -0
  60. package/onbehalf_service-LogicUniRevPremiumOnbehalfService_connectquery.d.ts +28 -0
  61. package/onbehalf_service-LogicUniRevPremiumOnbehalfService_connectquery.js +35 -0
  62. package/onbehalf_service.proto +11 -0
  63. package/onbehalf_service_connect.d.ts +26 -0
  64. package/onbehalf_service_connect.js +26 -0
  65. package/package.json +10 -0
  66. package/premium_services.proto +1005 -0
  67. package/premium_services_pb.d.ts +5465 -0
  68. package/premium_services_pb.js +1840 -0
  69. package/premium_services_service-LogicUniRevPremiumPremiumServicesService_connectquery.d.ts +496 -0
  70. package/premium_services_service-LogicUniRevPremiumPremiumServicesService_connectquery.js +787 -0
  71. package/premium_services_service.proto +132 -0
  72. package/premium_services_service_connect.d.ts +448 -0
  73. package/premium_services_service_connect.js +448 -0
  74. package/pricing.proto +722 -0
  75. package/pricing_pb.d.ts +3949 -0
  76. package/pricing_pb.js +1372 -0
  77. package/pricing_service-LogicUniRevPremiumPricingService_connectquery.d.ts +411 -0
  78. package/pricing_service-LogicUniRevPremiumPricingService_connectquery.js +653 -0
  79. package/pricing_service.proto +63 -0
  80. package/pricing_service_connect.d.ts +372 -0
  81. package/pricing_service_connect.js +372 -0
  82. package/scripts/modify_package_json.js +50 -0
  83. package/special_display.proto +56 -0
  84. package/special_display_pb.d.ts +322 -0
  85. package/special_display_pb.js +113 -0
  86. package/special_display_service-LogicUniRevPremiumSpecialDisplayService_connectquery.d.ts +58 -0
  87. package/special_display_service-LogicUniRevPremiumSpecialDisplayService_connectquery.js +83 -0
  88. package/special_display_service.proto +24 -0
  89. package/special_display_service_connect.d.ts +53 -0
  90. package/special_display_service_connect.js +53 -0
  91. package/sticky_adinfo.proto +312 -0
  92. package/sticky_adinfo_pb.d.ts +1463 -0
  93. package/sticky_adinfo_pb.js +328 -0
@@ -0,0 +1,228 @@
1
+ syntax = "proto3";
2
+ package ct_logic_uni_rev_premium.v1;
3
+
4
+ option go_package = "github.com/carousell/ct-grpc-go/pkg/ct-logic-uni-rev-premium;pb";
5
+
6
+ import "validate/validate.proto";
7
+ import "google/protobuf/timestamp.proto";
8
+
9
+ enum BenefitType {
10
+ BENEFIT_TYPE_UNSPECIFIED = 0;
11
+ BENEFIT_TYPE_COMMUNICATION_VIA_ZALO = 1;
12
+ BENEFIT_TYPE_BLOCK_OTHER_LISTINGS = 2;
13
+ BENEFIT_TYPE_SHARE_CROSS_PLATFORM = 3;
14
+ BENEFIT_TYPE_STICKY_AD = 4;
15
+ BENEFIT_TYPE_SDA = 5;
16
+ BENEFIT_TYPE_NEW_AD = 6;
17
+ }
18
+
19
+ message GetActiveBenefitsByListingTierRequest {
20
+ int64 ad_id = 1;
21
+ }
22
+
23
+ message GetActiveBenefitsByListingTierResponse {
24
+ repeated ActiveBenefit benefits = 1;
25
+ }
26
+
27
+ message ActiveBenefit {
28
+ BenefitType type = 1;
29
+ }
30
+
31
+ message ApplyListingTierOnPosRequest {
32
+ int64 ad_id = 1 [(validate.rules).int64.gt = 0];
33
+ int64 account_id = 2 [(validate.rules).int64.gt = 0];
34
+ ApplyListingTierOnPosMetadata metadata = 3;
35
+ }
36
+
37
+ message ApplyListingTierOnPosMetadata {
38
+ string tier_price_id = 1;
39
+ optional string subscription_id = 2;
40
+ optional string voucher_id = 3;
41
+ string listing_fee_type = 4 [(validate.rules).string = {
42
+ in: [
43
+ "paid_listing_fee_entitlement",
44
+ "free_listing_fee_voucher",
45
+ "free_listing_fee_entitlement",
46
+ "subscription_quota"
47
+ ]
48
+ }];
49
+ string tier_code = 5;
50
+ int64 duration = 6;
51
+ }
52
+
53
+ message ApplyListingTierOnPosResponse {
54
+ string next_step = 1; // "checkout" or "pos", checkout if listing tier is not free & pos if listing tier is free or from membership
55
+ }
56
+
57
+ message ApplyListingTierWithSubscriptionRequest {
58
+ int64 ad_id = 1 [(validate.rules).int64.gt = 0];
59
+ int64 account_id = 2 [(validate.rules).int64.gt = 0];
60
+ ApplyListingTierWithSubscriptionMetadata metadata = 3;
61
+ }
62
+
63
+ message ApplyListingTierWithSubscriptionMetadata {
64
+ string tier_code = 1;
65
+ int64 duration = 2;
66
+ int64 subscription_package_unit_delivery_id = 3;
67
+ }
68
+
69
+ message ApplyListingTierWithSubscriptionResponse {}
70
+
71
+ message GetTierOptionsForPosRequest {
72
+ optional string listing_tier_pos_action = 1 [(validate.rules).string = {
73
+ in: [
74
+ "upgrade",
75
+ "extend"
76
+ ]
77
+ }];
78
+ int64 ad_id = 2;
79
+ int64 account_id = 3;
80
+ }
81
+
82
+ message GetTierOptionsForPosResponse {
83
+ repeated TierOption tier_options = 1;
84
+ repeated PosAdInfo ad_info = 2;
85
+ }
86
+
87
+ message PosAdInfo {
88
+ string title = 1;
89
+ string description = 2;
90
+ string price_text = 3;
91
+ string display_mode = 4;
92
+ repeated string image_urls = 5;
93
+ int64 big_category_id = 6;
94
+ int64 sub_category_id = 7;
95
+ repeated ServiceDeliveryInfo service_delivery_infos = 8;
96
+ }
97
+
98
+ message BannerInfo {
99
+ // Possible values: "promote", "info"
100
+ string type = 1;
101
+ string icon_url = 2;
102
+ string text = 3;
103
+ string next_action = 4;
104
+ }
105
+
106
+ message TierOption {
107
+ string tier_price_id = 1;
108
+
109
+ // Possible values: "casual", "professional", "elite"
110
+ string tier_code = 2;
111
+
112
+ int64 duration = 3;
113
+ int64 original_price = 4;
114
+ int64 discounted_price = 5;
115
+ int64 discount_percentage = 6;
116
+ string listing_fee_type = 7;
117
+ bool is_trial_eligible = 8;
118
+ bool is_default_selected = 9;
119
+ BannerInfo banner_info = 10;
120
+ oneof metadata {
121
+ MetadataListingFeeTypeSubscription subscription = 11;
122
+ MetadataListingFeeTypeVoucher voucher = 12;
123
+ }
124
+ }
125
+
126
+ message GetTierOfAdRequest {
127
+ int64 ad_id = 1 [(validate.rules).int64.gt = 0];
128
+ int64 account_id = 2 [(validate.rules).int64.gt = 0];
129
+ }
130
+
131
+ message GetTierOfAdResponse {
132
+ string tier_code = 1;
133
+ int64 duration = 2;
134
+ google.protobuf.Timestamp started_at = 3;
135
+ google.protobuf.Timestamp expires_at = 4;
136
+ bool can_upgrade = 5;
137
+ }
138
+
139
+ message CheckSKFeatureEnableRequest {
140
+ int64 account_id = 1;
141
+ optional int64 category_id = 2;
142
+ optional int64 ad_id = 3;
143
+ }
144
+ message CheckSKFeatureEnableResponse {
145
+ bool listing_tier_enabled = 1;
146
+ bool package_tier_enabled = 2;
147
+ }
148
+
149
+ message UpdateServiceStatusRequest {
150
+ string operation = 1 [(validate.rules).string = {
151
+ in: [
152
+ "deliver",
153
+ "cancel"
154
+ ]
155
+ }];
156
+ string transaction_id = 2 [(validate.rules).string.min_len = 1];
157
+ string service_type = 3 [(validate.rules).string = {
158
+ in: [
159
+ "newad",
160
+ "sticky_ad",
161
+ "special_display",
162
+ "auto_bump",
163
+ "communication_via_zalo",
164
+ "share_ad_cross_platform",
165
+ "block_other_listings"
166
+ ]
167
+ }];
168
+
169
+ // To track the delivery in the external system
170
+ // Provide only if the operation is "deliver"
171
+ optional string ref_delivery_id = 4;
172
+
173
+ string status = 5 [(validate.rules).string = {
174
+ in: [
175
+ "success",
176
+ "failed"
177
+ ]
178
+ }];
179
+
180
+ // Failure reason/note if any
181
+ string note = 6;
182
+ }
183
+
184
+ message UpdateServiceStatusResponse {}
185
+
186
+ message GetTierInfoOfAdsRequest {
187
+ repeated int64 ad_ids = 1 [(validate.rules).repeated.min_items = 1];
188
+ int64 account_id = 2 [(validate.rules).int64.gt = 0];
189
+ }
190
+
191
+ message GetTierInfoOfAdsResponse {
192
+ map<int64, TierInfo> data = 1;
193
+ }
194
+
195
+ message TierInfo {
196
+ string tier_code = 1;
197
+ int64 duration = 2;
198
+ google.protobuf.Timestamp started_at = 3;
199
+ google.protobuf.Timestamp expires_at = 4;
200
+ bool can_upgrade = 5;
201
+ }
202
+
203
+ message GetAlacarteServicesRequest {
204
+ int64 ad_id = 1 [(validate.rules).int64.gt = 0];
205
+ }
206
+
207
+ message GetAlacarteServicesResponse {
208
+ string current_tier_code = 1;
209
+ repeated ServicePermission services = 2;
210
+ }
211
+
212
+ message ServicePermission {
213
+ string service_type = 1;
214
+ bool is_locked = 2;
215
+ }
216
+
217
+ message MetadataListingFeeTypeVoucher {
218
+ string voucher_id = 1;
219
+ }
220
+
221
+ message MetadataListingFeeTypeSubscription {
222
+ string subscription_id = 1;
223
+ }
224
+
225
+ message ServiceDeliveryInfo {
226
+ string service_type = 1;
227
+ string meta_data = 2;
228
+ }