@devvit/protos 0.10.18-next-2024-03-12-1779d7ee8.0 → 0.10.18-next-2024-03-12-613bad501.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -3
- package/schema/devvit/ui/block_kit/v1beta/block.proto +19 -0
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts +160 -0
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/block.d.ts +1001 -0
- package/types/devvit/ui/block_kit/v1beta/block.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/block.js +19 -1
- package/types/devvit/ui/block_kit/v1beta/rendering.d.ts +206 -0
- package/types/devvit/ui/block_kit/v1beta/rendering.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/ui.d.ts +206 -0
- package/types/devvit/ui/block_kit/v1beta/ui.d.ts.map +1 -1
@@ -9,7 +9,7 @@ import { messageTypeRegistry } from '../../../../typeRegistry.js';
|
|
9
9
|
import { BlockAction, BlockAlignment, BlockBorder, BlockColor, BlockSize, BlockSizes } from './attributes.js';
|
10
10
|
import { blockAnimationDirectionFromJSON, blockAnimationDirectionToJSON, blockAnimationLoopModeFromJSON, blockAnimationLoopModeToJSON, blockAnimationTypeFromJSON, blockAnimationTypeToJSON, blockAvatarBackgroundFromJSON, blockAvatarBackgroundToJSON, blockAvatarFacingFromJSON, blockAvatarFacingToJSON, blockAvatarSizeFromJSON, blockAvatarSizeToJSON, blockButtonAppearanceFromJSON, blockButtonAppearanceToJSON, blockButtonSizeFromJSON, blockButtonSizeToJSON, blockFullSnooSizeFromJSON, blockFullSnooSizeToJSON, blockGapFromJSON, blockGapToJSON, blockIconSizeFromJSON, blockIconSizeToJSON, blockImageResizeModeFromJSON, blockImageResizeModeToJSON, blockPaddingFromJSON, blockPaddingToJSON, blockRadiusFromJSON, blockRadiusToJSON, blockSpacerShapeFromJSON, blockSpacerShapeToJSON, blockSpacerSizeFromJSON, blockSpacerSizeToJSON, blockStackDirectionFromJSON, blockStackDirectionToJSON, blockTextOutlineFromJSON, blockTextOutlineToJSON, blockTextOverflowFromJSON, blockTextOverflowToJSON, blockTextSizeFromJSON, blockTextSizeToJSON, blockTextStyleFromJSON, blockTextStyleToJSON, blockTextWeightFromJSON, blockTextWeightToJSON, blockTypeFromJSON, blockTypeToJSON, } from './enums.js';
|
11
11
|
function createBaseBlock() {
|
12
|
-
return { type: 0, size: undefined, sizes: undefined, config: undefined, actions: [] };
|
12
|
+
return { type: 0, size: undefined, sizes: undefined, config: undefined, actions: [], id: undefined, key: undefined };
|
13
13
|
}
|
14
14
|
export const Block = {
|
15
15
|
$type: "devvit.ui.block_kit.v1beta.Block",
|
@@ -29,6 +29,12 @@ export const Block = {
|
|
29
29
|
for (const v of message.actions) {
|
30
30
|
BlockAction.encode(v, writer.uint32(34).fork()).ldelim();
|
31
31
|
}
|
32
|
+
if (message.id !== undefined) {
|
33
|
+
writer.uint32(50).string(message.id);
|
34
|
+
}
|
35
|
+
if (message.key !== undefined) {
|
36
|
+
writer.uint32(58).string(message.key);
|
37
|
+
}
|
32
38
|
return writer;
|
33
39
|
},
|
34
40
|
decode(input, length) {
|
@@ -53,6 +59,12 @@ export const Block = {
|
|
53
59
|
case 4:
|
54
60
|
message.actions.push(BlockAction.decode(reader, reader.uint32()));
|
55
61
|
break;
|
62
|
+
case 6:
|
63
|
+
message.id = reader.string();
|
64
|
+
break;
|
65
|
+
case 7:
|
66
|
+
message.key = reader.string();
|
67
|
+
break;
|
56
68
|
default:
|
57
69
|
reader.skipType(tag & 7);
|
58
70
|
break;
|
@@ -67,6 +79,8 @@ export const Block = {
|
|
67
79
|
sizes: isSet(object.sizes) ? BlockSizes.fromJSON(object.sizes) : undefined,
|
68
80
|
config: isSet(object.config) ? BlockConfig.fromJSON(object.config) : undefined,
|
69
81
|
actions: Array.isArray(object?.actions) ? object.actions.map((e) => BlockAction.fromJSON(e)) : [],
|
82
|
+
id: isSet(object.id) ? String(object.id) : undefined,
|
83
|
+
key: isSet(object.key) ? String(object.key) : undefined,
|
70
84
|
};
|
71
85
|
},
|
72
86
|
toJSON(message) {
|
@@ -81,6 +95,8 @@ export const Block = {
|
|
81
95
|
else {
|
82
96
|
obj.actions = [];
|
83
97
|
}
|
98
|
+
message.id !== undefined && (obj.id = message.id);
|
99
|
+
message.key !== undefined && (obj.key = message.key);
|
84
100
|
return obj;
|
85
101
|
},
|
86
102
|
fromPartial(object) {
|
@@ -94,6 +110,8 @@ export const Block = {
|
|
94
110
|
? BlockConfig.fromPartial(object.config)
|
95
111
|
: undefined;
|
96
112
|
message.actions = object.actions?.map((e) => BlockAction.fromPartial(e)) || [];
|
113
|
+
message.id = object.id ?? undefined;
|
114
|
+
message.key = object.key ?? undefined;
|
97
115
|
return message;
|
98
116
|
},
|
99
117
|
};
|