@discordjs/builders 2.0.0-dev.1758877923-b3705df54 → 2.0.0-dev.1759017751-1c5674d9b

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/dist/index.mjs CHANGED
@@ -93,6 +93,7 @@ import { z as z3 } from "zod";
93
93
  // src/Assertions.ts
94
94
  import { Locale } from "discord-api-types/v10";
95
95
  import { z as z2 } from "zod";
96
+ var idPredicate = z2.int().min(0).max(2147483647).optional();
96
97
  var customIdPredicate = z2.string().min(1).max(100);
97
98
  var memberPermissionsPredicate = z2.coerce.bigint();
98
99
  var localeMapPredicate = z2.strictObject(
@@ -140,6 +141,7 @@ var buttonPredicate = z3.discriminatedUnion("style", [
140
141
  buttonPremiumPredicate
141
142
  ]);
142
143
  var selectMenuBasePredicate = z3.object({
144
+ id: idPredicate,
143
145
  placeholder: z3.string().max(150).optional(),
144
146
  min_values: z3.number().min(0).max(25).optional(),
145
147
  max_values: z3.number().min(0).max(25).optional(),
@@ -195,6 +197,7 @@ var selectMenuUserPredicate = selectMenuBasePredicate.extend({
195
197
  default_values: z3.object({ id: z3.string(), type: z3.literal(SelectMenuDefaultValueType.User) }).array().max(25).optional()
196
198
  });
197
199
  var actionRowPredicate = z3.object({
200
+ id: idPredicate,
198
201
  type: z3.literal(ComponentType.ActionRow),
199
202
  components: z3.union([
200
203
  z3.object({ type: z3.literal(ComponentType.Button) }).array().min(1).max(5),
@@ -1049,6 +1052,7 @@ import { ComponentType as ComponentType11 } from "discord-api-types/v10";
1049
1052
  import { ComponentType as ComponentType10, TextInputStyle } from "discord-api-types/v10";
1050
1053
  import { z as z4 } from "zod";
1051
1054
  var textInputPredicate = z4.object({
1055
+ id: idPredicate,
1052
1056
  type: z4.literal(ComponentType10.TextInput),
1053
1057
  custom_id: customIdPredicate,
1054
1058
  style: z4.enum(TextInputStyle),
@@ -1439,6 +1443,7 @@ var unfurledMediaItemPredicate = z5.object({
1439
1443
  });
1440
1444
  var thumbnailPredicate = z5.object({
1441
1445
  type: z5.literal(ComponentType13.Thumbnail),
1446
+ id: idPredicate,
1442
1447
  media: unfurledMediaItemPredicate,
1443
1448
  description: z5.string().min(1).max(1024).nullish(),
1444
1449
  spoiler: z5.boolean().optional()
@@ -1448,29 +1453,35 @@ var unfurledMediaItemAttachmentOnlyPredicate = z5.object({
1448
1453
  });
1449
1454
  var filePredicate = z5.object({
1450
1455
  type: z5.literal(ComponentType13.File),
1456
+ id: idPredicate,
1451
1457
  file: unfurledMediaItemAttachmentOnlyPredicate,
1452
1458
  spoiler: z5.boolean().optional()
1453
1459
  });
1454
1460
  var separatorPredicate = z5.object({
1455
1461
  type: z5.literal(ComponentType13.Separator),
1462
+ id: idPredicate,
1456
1463
  divider: z5.boolean().optional(),
1457
1464
  spacing: z5.enum(SeparatorSpacingSize).optional()
1458
1465
  });
1459
1466
  var textDisplayPredicate = z5.object({
1460
1467
  type: z5.literal(ComponentType13.TextDisplay),
1468
+ id: idPredicate,
1461
1469
  content: z5.string().min(1).max(4e3)
1462
1470
  });
1463
1471
  var mediaGalleryItemPredicate = z5.object({
1472
+ id: idPredicate,
1464
1473
  media: unfurledMediaItemPredicate,
1465
1474
  description: z5.string().min(1).max(1024).nullish(),
1466
1475
  spoiler: z5.boolean().optional()
1467
1476
  });
1468
1477
  var mediaGalleryPredicate = z5.object({
1469
1478
  type: z5.literal(ComponentType13.MediaGallery),
1479
+ id: idPredicate,
1470
1480
  items: z5.array(mediaGalleryItemPredicate).min(1).max(10)
1471
1481
  });
1472
1482
  var sectionPredicate = z5.object({
1473
1483
  type: z5.literal(ComponentType13.Section),
1484
+ id: idPredicate,
1474
1485
  components: z5.array(textDisplayPredicate).min(1).max(3),
1475
1486
  accessory: z5.union([
1476
1487
  z5.object({ type: z5.literal(ComponentType13.Button) }),
@@ -1479,6 +1490,7 @@ var sectionPredicate = z5.object({
1479
1490
  });
1480
1491
  var containerPredicate = z5.object({
1481
1492
  type: z5.literal(ComponentType13.Container),
1493
+ id: idPredicate,
1482
1494
  components: z5.array(
1483
1495
  z5.union([
1484
1496
  actionRowPredicate,
@@ -2379,6 +2391,7 @@ __name(resolveAccessoryComponent, "resolveAccessoryComponent");
2379
2391
  import { ComponentType as ComponentType22 } from "discord-api-types/v10";
2380
2392
  import { z as z6 } from "zod";
2381
2393
  var labelPredicate2 = z6.object({
2394
+ id: idPredicate,
2382
2395
  type: z6.literal(ComponentType22.Label),
2383
2396
  label: z6.string().min(1).max(45),
2384
2397
  description: z6.string().min(1).max(100).optional(),
@@ -5478,7 +5491,7 @@ var MessageBuilder = class {
5478
5491
  };
5479
5492
 
5480
5493
  // src/index.ts
5481
- var version = "2.0.0-dev.1758877923-b3705df54";
5494
+ var version = "2.0.0-dev.1759017751-1c5674d9b";
5482
5495
  export {
5483
5496
  ActionRowBuilder,
5484
5497
  AllowedMentionsBuilder,
@@ -5570,6 +5583,7 @@ export {
5570
5583
  emojiPredicate,
5571
5584
  enableValidators,
5572
5585
  filePredicate,
5586
+ idPredicate,
5573
5587
  integerOptionPredicate,
5574
5588
  isValidationEnabled,
5575
5589
  labelPredicate2 as labelPredicate,