@devvit/protos 0.11.0-next-2024-08-07-acf251ca4.0 → 0.11.0-next-2024-08-08-4750f1ee5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/meta.min.json +4 -4
- package/package.json +5 -5
- package/protos.min.js +2 -2
- package/protos.min.js.map +3 -3
- package/schema/devvit/ui/effects/v1alpha/create_order.proto +15 -4
- package/schema/snootobuf.devenv.lock +0 -0
- package/schema/snootobuf.lock +0 -0
- package/schema/snootobuf.redditapi.lock +0 -0
- package/schema/snootobuf.ts.lock +0 -0
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts +16 -8
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts.map +1 -1
- package/types/devvit/ui/effects/v1alpha/create_order.d.ts +14 -4
- package/types/devvit/ui/effects/v1alpha/create_order.d.ts.map +1 -1
- package/types/devvit/ui/effects/v1alpha/create_order.js +66 -15
@@ -5,6 +5,12 @@ package devvit.ui.effects.v1alpha;
|
|
5
5
|
option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/ui/events/v1alpha";
|
6
6
|
option java_package = "com.reddit.devvit.ui.effects.v1alpha";
|
7
7
|
|
8
|
+
enum OrderResultStatus {
|
9
|
+
STATUS_CANCELLED = 0;
|
10
|
+
STATUS_SUCCESS = 1;
|
11
|
+
STATUS_ERROR = 2;
|
12
|
+
}
|
13
|
+
|
8
14
|
// Emitted by an app to request a purchase flow by the client
|
9
15
|
message CreateOrderEffect {
|
10
16
|
// ID of this effect to route the OrderResultEvent to the correct handler
|
@@ -17,12 +23,17 @@ message CreateOrderEffect {
|
|
17
23
|
|
18
24
|
// Sent to the app after the purchase attempt has concluded
|
19
25
|
message OrderResultEvent {
|
20
|
-
//
|
21
|
-
bool success = 1;
|
22
|
-
// If success is false, why?
|
26
|
+
// If failed, optional user-presentable error message
|
23
27
|
optional string error_message = 2;
|
24
|
-
// If
|
28
|
+
// If successful, the order ID for the app to use to verify the purchase
|
25
29
|
optional string order_id = 3;
|
26
30
|
// The original request
|
27
31
|
CreateOrderEffect order = 4;
|
32
|
+
// Status
|
33
|
+
OrderResultStatus status = 5;
|
34
|
+
// If failed, optional error code
|
35
|
+
optional int32 error_code = 6;
|
36
|
+
|
37
|
+
reserved 1;
|
38
|
+
reserved "success";
|
28
39
|
}
|
Binary file
|
package/schema/snootobuf.lock
CHANGED
Binary file
|
Binary file
|
package/schema/snootobuf.ts.lock
CHANGED
Binary file
|
@@ -212,7 +212,6 @@ export declare const CustomPostDefinition: {
|
|
212
212
|
formId?: string | undefined;
|
213
213
|
} | undefined;
|
214
214
|
orderResult?: {
|
215
|
-
success?: boolean;
|
216
215
|
errorMessage?: string | undefined;
|
217
216
|
orderId?: string | undefined;
|
218
217
|
order?: {
|
@@ -222,6 +221,8 @@ export declare const CustomPostDefinition: {
|
|
222
221
|
[x: string]: string | undefined;
|
223
222
|
};
|
224
223
|
} | undefined;
|
224
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
225
|
+
errorCode?: number | undefined;
|
225
226
|
} | undefined;
|
226
227
|
toastAction?: {} | undefined;
|
227
228
|
userAction?: {
|
@@ -302,7 +303,6 @@ export declare const CustomPostDefinition: {
|
|
302
303
|
formId?: string | undefined;
|
303
304
|
} | undefined;
|
304
305
|
orderResult?: {
|
305
|
-
success?: boolean;
|
306
306
|
errorMessage?: string | undefined;
|
307
307
|
orderId?: string | undefined;
|
308
308
|
order?: {
|
@@ -312,6 +312,8 @@ export declare const CustomPostDefinition: {
|
|
312
312
|
[x: string]: string | undefined;
|
313
313
|
};
|
314
314
|
} | undefined;
|
315
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
316
|
+
errorCode?: number | undefined;
|
315
317
|
} | undefined;
|
316
318
|
toastAction?: {} | undefined;
|
317
319
|
userAction?: {
|
@@ -518,7 +520,6 @@ export declare const CustomPostDefinition: {
|
|
518
520
|
formId?: string | undefined;
|
519
521
|
} | undefined;
|
520
522
|
orderResult?: {
|
521
|
-
success?: boolean;
|
522
523
|
errorMessage?: string | undefined;
|
523
524
|
orderId?: string | undefined;
|
524
525
|
order?: {
|
@@ -528,6 +529,8 @@ export declare const CustomPostDefinition: {
|
|
528
529
|
[x: string]: string | undefined;
|
529
530
|
};
|
530
531
|
} | undefined;
|
532
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
533
|
+
errorCode?: number | undefined;
|
531
534
|
} | undefined;
|
532
535
|
toastAction?: {} | undefined;
|
533
536
|
userAction?: {
|
@@ -891,7 +894,6 @@ export declare const CustomPostDefinition: {
|
|
891
894
|
formId?: string | undefined;
|
892
895
|
} | undefined;
|
893
896
|
orderResult?: {
|
894
|
-
success?: boolean;
|
895
897
|
errorMessage?: string | undefined;
|
896
898
|
orderId?: string | undefined;
|
897
899
|
order?: {
|
@@ -901,6 +903,8 @@ export declare const CustomPostDefinition: {
|
|
901
903
|
[x: string]: string | undefined;
|
902
904
|
};
|
903
905
|
} | undefined;
|
906
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
907
|
+
errorCode?: number | undefined;
|
904
908
|
} | undefined;
|
905
909
|
toastAction?: {} | undefined;
|
906
910
|
userAction?: {
|
@@ -1158,7 +1162,6 @@ export declare const CustomPostDefinition: {
|
|
1158
1162
|
formId?: string | undefined;
|
1159
1163
|
} | undefined;
|
1160
1164
|
orderResult?: {
|
1161
|
-
success?: boolean;
|
1162
1165
|
errorMessage?: string | undefined;
|
1163
1166
|
orderId?: string | undefined;
|
1164
1167
|
order?: {
|
@@ -1168,6 +1171,8 @@ export declare const CustomPostDefinition: {
|
|
1168
1171
|
[x: string]: string | undefined;
|
1169
1172
|
};
|
1170
1173
|
} | undefined;
|
1174
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
1175
|
+
errorCode?: number | undefined;
|
1171
1176
|
} | undefined;
|
1172
1177
|
toastAction?: {} | undefined;
|
1173
1178
|
userAction?: {
|
@@ -1248,7 +1253,6 @@ export declare const CustomPostDefinition: {
|
|
1248
1253
|
formId?: string | undefined;
|
1249
1254
|
} | undefined;
|
1250
1255
|
orderResult?: {
|
1251
|
-
success?: boolean;
|
1252
1256
|
errorMessage?: string | undefined;
|
1253
1257
|
orderId?: string | undefined;
|
1254
1258
|
order?: {
|
@@ -1258,6 +1262,8 @@ export declare const CustomPostDefinition: {
|
|
1258
1262
|
[x: string]: string | undefined;
|
1259
1263
|
};
|
1260
1264
|
} | undefined;
|
1265
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
1266
|
+
errorCode?: number | undefined;
|
1261
1267
|
} | undefined;
|
1262
1268
|
toastAction?: {} | undefined;
|
1263
1269
|
userAction?: {
|
@@ -1464,7 +1470,6 @@ export declare const CustomPostDefinition: {
|
|
1464
1470
|
formId?: string | undefined;
|
1465
1471
|
} | undefined;
|
1466
1472
|
orderResult?: {
|
1467
|
-
success?: boolean;
|
1468
1473
|
errorMessage?: string | undefined;
|
1469
1474
|
orderId?: string | undefined;
|
1470
1475
|
order?: {
|
@@ -1474,6 +1479,8 @@ export declare const CustomPostDefinition: {
|
|
1474
1479
|
[x: string]: string | undefined;
|
1475
1480
|
};
|
1476
1481
|
} | undefined;
|
1482
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
1483
|
+
errorCode?: number | undefined;
|
1477
1484
|
} | undefined;
|
1478
1485
|
toastAction?: {} | undefined;
|
1479
1486
|
userAction?: {
|
@@ -1837,7 +1844,6 @@ export declare const CustomPostDefinition: {
|
|
1837
1844
|
formId?: string | undefined;
|
1838
1845
|
} | undefined;
|
1839
1846
|
orderResult?: {
|
1840
|
-
success?: boolean;
|
1841
1847
|
errorMessage?: string | undefined;
|
1842
1848
|
orderId?: string | undefined;
|
1843
1849
|
order?: {
|
@@ -1847,6 +1853,8 @@ export declare const CustomPostDefinition: {
|
|
1847
1853
|
[x: string]: string | undefined;
|
1848
1854
|
};
|
1849
1855
|
} | undefined;
|
1856
|
+
status?: import("../../../../../payments.js").OrderResultStatus;
|
1857
|
+
errorCode?: number | undefined;
|
1850
1858
|
} | undefined;
|
1851
1859
|
toastAction?: {} | undefined;
|
1852
1860
|
userAction?: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"custom_post.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/reddit/custom_post/v1alpha/custom_post.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAE/D;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,KAAK,CAAC,EACF;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACtB,SAAS,CAAC;IACd,kCAAkC;IAClC,MAAM,CAAC,EACH,kBAAkB,GAClB,SAAS,CAAC;IACd,gGAAgG;IAChG,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACrC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,KAAK,CAAC,EACF;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACtB,SAAS,CAAC;IACd,wDAAwD;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sCAAsC;IACtC,MAAM,CAAC,EAAE,mB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AG9C,YAAY,kBAAkB,CAAC,GAAG,kBAAkB
|
1
|
+
{"version":3,"file":"custom_post.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/reddit/custom_post/v1alpha/custom_post.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAE/D;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,KAAK,CAAC,EACF;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACtB,SAAS,CAAC;IACd,kCAAkC;IAClC,MAAM,CAAC,EACH,kBAAkB,GAClB,SAAS,CAAC;IACd,gGAAgG;IAChG,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACrC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,KAAK,CAAC,EACF;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACtB,SAAS,CAAC;IACd,wDAAwD;IACxD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,sCAAsC;IACtC,MAAM,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;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AAO,CAAC,UAAU,CAAC,CAAC;CACtG;AAED,KAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GACvC,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
@@ -4,6 +4,14 @@
|
|
4
4
|
* @packageDocumentation
|
5
5
|
*/
|
6
6
|
import _m0 from "protobufjs/minimal.js";
|
7
|
+
export declare enum OrderResultStatus {
|
8
|
+
STATUS_CANCELLED = 0,
|
9
|
+
STATUS_SUCCESS = 1,
|
10
|
+
STATUS_ERROR = 2,
|
11
|
+
UNRECOGNIZED = -1
|
12
|
+
}
|
13
|
+
export declare function orderResultStatusFromJSON(object: any): OrderResultStatus;
|
14
|
+
export declare function orderResultStatusToJSON(object: OrderResultStatus): number;
|
7
15
|
/** Emitted by an app to request a purchase flow by the client */
|
8
16
|
export interface CreateOrderEffect {
|
9
17
|
/** ID of this effect to route the OrderResultEvent to the correct handler */
|
@@ -21,14 +29,16 @@ export interface CreateOrderEffect_MetadataEntry {
|
|
21
29
|
}
|
22
30
|
/** Sent to the app after the purchase attempt has concluded */
|
23
31
|
export interface OrderResultEvent {
|
24
|
-
/**
|
25
|
-
success: boolean;
|
26
|
-
/** If success is false, why? */
|
32
|
+
/** If failed, optional user-presentable error message */
|
27
33
|
errorMessage?: string | undefined;
|
28
|
-
/** If
|
34
|
+
/** If successful, the order ID for the app to use to verify the purchase */
|
29
35
|
orderId?: string | undefined;
|
30
36
|
/** The original request */
|
31
37
|
order?: CreateOrderEffect | undefined;
|
38
|
+
/** Status */
|
39
|
+
status: OrderResultStatus;
|
40
|
+
/** If failed, optional error code */
|
41
|
+
errorCode?: number | undefined;
|
32
42
|
}
|
33
43
|
export declare const CreateOrderEffect: {
|
34
44
|
$type: "devvit.ui.effects.v1alpha.CreateOrderEffect";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create_order.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/create_order.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,4BAA4B;IAC5B,QAAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACrC;AAED,MAAM,WAAW,+BAA+B;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAC/B,
|
1
|
+
{"version":3,"file":"create_order.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/create_order.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,oBAAY,iBAAiB;IAC3B,gBAAgB,IAAI;IACpB,cAAc,IAAI;IAClB,YAAY,IAAI;IAChB,YAAY,KAAK;CAClB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,GAAG,iBAAiB,CAgBxE;AAED,wBAA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YAAY,+BAA+B,CAAC,GAAG,+BAA+B;wBAGxE,YAAY,+BAA+B,CAAC,GAAG,+BAA+B;CAMnG,CAAC;AAQF,eAAO,MAAM,gBAAgB;;oBAGX,gBAAgB,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAmBzE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,gBAAgB;qBAmDxD,GAAG,GAAG,gBAAgB;oBAUvB,gBAAgB,GAAG,OAAO;kBAoB5B,YAAY,gBAAgB,CAAC,GAAG,gBAAgB;wBAG1C,YAAY,gBAAgB,CAAC,GAAG,gBAAgB;CAWrE,CAAC;AAIF,KAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GACvC,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
@@ -6,6 +6,43 @@
|
|
6
6
|
/* eslint-disable */
|
7
7
|
import _m0 from "protobufjs/minimal.js";
|
8
8
|
import { messageTypeRegistry } from "../../../../typeRegistry.js";
|
9
|
+
export var OrderResultStatus;
|
10
|
+
(function (OrderResultStatus) {
|
11
|
+
OrderResultStatus[OrderResultStatus["STATUS_CANCELLED"] = 0] = "STATUS_CANCELLED";
|
12
|
+
OrderResultStatus[OrderResultStatus["STATUS_SUCCESS"] = 1] = "STATUS_SUCCESS";
|
13
|
+
OrderResultStatus[OrderResultStatus["STATUS_ERROR"] = 2] = "STATUS_ERROR";
|
14
|
+
OrderResultStatus[OrderResultStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
15
|
+
})(OrderResultStatus || (OrderResultStatus = {}));
|
16
|
+
export function orderResultStatusFromJSON(object) {
|
17
|
+
switch (object) {
|
18
|
+
case 0:
|
19
|
+
case "STATUS_CANCELLED":
|
20
|
+
return OrderResultStatus.STATUS_CANCELLED;
|
21
|
+
case 1:
|
22
|
+
case "STATUS_SUCCESS":
|
23
|
+
return OrderResultStatus.STATUS_SUCCESS;
|
24
|
+
case 2:
|
25
|
+
case "STATUS_ERROR":
|
26
|
+
return OrderResultStatus.STATUS_ERROR;
|
27
|
+
case -1:
|
28
|
+
case "UNRECOGNIZED":
|
29
|
+
default:
|
30
|
+
return OrderResultStatus.UNRECOGNIZED;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
export function orderResultStatusToJSON(object) {
|
34
|
+
switch (object) {
|
35
|
+
case OrderResultStatus.STATUS_CANCELLED:
|
36
|
+
return 0;
|
37
|
+
case OrderResultStatus.STATUS_SUCCESS:
|
38
|
+
return 1;
|
39
|
+
case OrderResultStatus.STATUS_ERROR:
|
40
|
+
return 2;
|
41
|
+
case OrderResultStatus.UNRECOGNIZED:
|
42
|
+
default:
|
43
|
+
return -1;
|
44
|
+
}
|
45
|
+
}
|
9
46
|
function createBaseCreateOrderEffect() {
|
10
47
|
return { id: "", skus: [], metadata: {} };
|
11
48
|
}
|
@@ -176,14 +213,11 @@ export const CreateOrderEffect_MetadataEntry = {
|
|
176
213
|
};
|
177
214
|
messageTypeRegistry.set(CreateOrderEffect_MetadataEntry.$type, CreateOrderEffect_MetadataEntry);
|
178
215
|
function createBaseOrderResultEvent() {
|
179
|
-
return {
|
216
|
+
return { errorMessage: undefined, orderId: undefined, order: undefined, status: 0, errorCode: undefined };
|
180
217
|
}
|
181
218
|
export const OrderResultEvent = {
|
182
219
|
$type: "devvit.ui.effects.v1alpha.OrderResultEvent",
|
183
220
|
encode(message, writer = _m0.Writer.create()) {
|
184
|
-
if (message.success !== false) {
|
185
|
-
writer.uint32(8).bool(message.success);
|
186
|
-
}
|
187
221
|
if (message.errorMessage !== undefined) {
|
188
222
|
writer.uint32(18).string(message.errorMessage);
|
189
223
|
}
|
@@ -193,6 +227,12 @@ export const OrderResultEvent = {
|
|
193
227
|
if (message.order !== undefined) {
|
194
228
|
CreateOrderEffect.encode(message.order, writer.uint32(34).fork()).ldelim();
|
195
229
|
}
|
230
|
+
if (message.status !== 0) {
|
231
|
+
writer.uint32(40).int32(message.status);
|
232
|
+
}
|
233
|
+
if (message.errorCode !== undefined) {
|
234
|
+
writer.uint32(48).int32(message.errorCode);
|
235
|
+
}
|
196
236
|
return writer;
|
197
237
|
},
|
198
238
|
decode(input, length) {
|
@@ -202,12 +242,6 @@ export const OrderResultEvent = {
|
|
202
242
|
while (reader.pos < end) {
|
203
243
|
const tag = reader.uint32();
|
204
244
|
switch (tag >>> 3) {
|
205
|
-
case 1:
|
206
|
-
if (tag !== 8) {
|
207
|
-
break;
|
208
|
-
}
|
209
|
-
message.success = reader.bool();
|
210
|
-
continue;
|
211
245
|
case 2:
|
212
246
|
if (tag !== 18) {
|
213
247
|
break;
|
@@ -226,6 +260,18 @@ export const OrderResultEvent = {
|
|
226
260
|
}
|
227
261
|
message.order = CreateOrderEffect.decode(reader, reader.uint32());
|
228
262
|
continue;
|
263
|
+
case 5:
|
264
|
+
if (tag !== 40) {
|
265
|
+
break;
|
266
|
+
}
|
267
|
+
message.status = reader.int32();
|
268
|
+
continue;
|
269
|
+
case 6:
|
270
|
+
if (tag !== 48) {
|
271
|
+
break;
|
272
|
+
}
|
273
|
+
message.errorCode = reader.int32();
|
274
|
+
continue;
|
229
275
|
}
|
230
276
|
if ((tag & 7) === 4 || tag === 0) {
|
231
277
|
break;
|
@@ -236,17 +282,15 @@ export const OrderResultEvent = {
|
|
236
282
|
},
|
237
283
|
fromJSON(object) {
|
238
284
|
return {
|
239
|
-
success: isSet(object.success) ? globalThis.Boolean(object.success) : false,
|
240
285
|
errorMessage: isSet(object.errorMessage) ? globalThis.String(object.errorMessage) : undefined,
|
241
286
|
orderId: isSet(object.orderId) ? globalThis.String(object.orderId) : undefined,
|
242
287
|
order: isSet(object.order) ? CreateOrderEffect.fromJSON(object.order) : undefined,
|
288
|
+
status: isSet(object.status) ? orderResultStatusFromJSON(object.status) : 0,
|
289
|
+
errorCode: isSet(object.errorCode) ? globalThis.Number(object.errorCode) : undefined,
|
243
290
|
};
|
244
291
|
},
|
245
292
|
toJSON(message) {
|
246
293
|
const obj = {};
|
247
|
-
if (message.success !== false) {
|
248
|
-
obj.success = message.success;
|
249
|
-
}
|
250
294
|
if (message.errorMessage !== undefined) {
|
251
295
|
obj.errorMessage = message.errorMessage;
|
252
296
|
}
|
@@ -256,6 +300,12 @@ export const OrderResultEvent = {
|
|
256
300
|
if (message.order !== undefined) {
|
257
301
|
obj.order = CreateOrderEffect.toJSON(message.order);
|
258
302
|
}
|
303
|
+
if (message.status !== 0) {
|
304
|
+
obj.status = orderResultStatusToJSON(message.status);
|
305
|
+
}
|
306
|
+
if (message.errorCode !== undefined) {
|
307
|
+
obj.errorCode = Math.round(message.errorCode);
|
308
|
+
}
|
259
309
|
return obj;
|
260
310
|
},
|
261
311
|
create(base) {
|
@@ -263,12 +313,13 @@ export const OrderResultEvent = {
|
|
263
313
|
},
|
264
314
|
fromPartial(object) {
|
265
315
|
const message = createBaseOrderResultEvent();
|
266
|
-
message.success = object.success ?? false;
|
267
316
|
message.errorMessage = object.errorMessage ?? undefined;
|
268
317
|
message.orderId = object.orderId ?? undefined;
|
269
318
|
message.order = (object.order !== undefined && object.order !== null)
|
270
319
|
? CreateOrderEffect.fromPartial(object.order)
|
271
320
|
: undefined;
|
321
|
+
message.status = object.status ?? 0;
|
322
|
+
message.errorCode = object.errorCode ?? undefined;
|
272
323
|
return message;
|
273
324
|
},
|
274
325
|
};
|