@elara-services/packages 3.0.0 → 3.0.1

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 (3) hide show
  1. package/CHANGELOG +5 -0
  2. package/index.d.ts +16 -11
  3. package/package.json +1 -1
package/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ # V3.0.1
2
+
3
+ Fixed the typings for modal and added the typings for "ButtonStyle"
4
+
5
+
1
6
  # v3.0.0
2
7
 
3
8
  __Breaking Changes__
package/index.d.ts CHANGED
@@ -37,7 +37,7 @@ declare module "@elara-services/packages" {
37
37
  public static button(options: ButtonOptions): Button;
38
38
  public static select(options: SelectOptions): Select;
39
39
  public static modal(options: ModalOptions): Modal;
40
- };
40
+ }
41
41
 
42
42
  export type ChannelTypes = 'GUILD_TEXT' | 'DM' | 'GUILD_VOICE' | 'GROUP_DM' | 'GUILD_CATEGORY' | 'GUILD_NEWS' | 'GUILD_STORE' | 'GUILD_NEWS_THREAD' | 'GUILD_PUBLIC_THREAD' | 'GUILD_PRIVATE_THREAD' | 'GUILD_STAGE_VOICE';
43
43
 
@@ -106,6 +106,8 @@ declare module "@elara-services/packages" {
106
106
  url?: Button['url']
107
107
  }
108
108
 
109
+ export type ButtonStyles = 'PRIMARY' | 'BLURPLE' | 'SECONDARY' | 'GREY' | 'SUCCESS' | 'GREEN' | 'DANGER' | 'RED' | 'LINK' | 'URL'
110
+
109
111
  export type Select = {
110
112
  custom_id: string;
111
113
  placeholder: string;
@@ -135,16 +137,19 @@ declare module "@elara-services/packages" {
135
137
  title: string;
136
138
  custom_id: string;
137
139
  components: {
138
- type: number;
139
- custom_id: string;
140
- label: string;
141
- style: 1 | 2 | number;
142
- min_length?: number;
143
- max_length?: number;
144
- required?: boolean;
145
- value?: string;
146
- placeholder?: string;
147
- }[]
140
+ type: number,
141
+ components: {
142
+ type: number;
143
+ custom_id: string;
144
+ label: string;
145
+ style: 1 | 2 | number;
146
+ min_length?: number;
147
+ max_length?: number;
148
+ required?: boolean;
149
+ value?: string;
150
+ placeholder?: string;
151
+ }[]
152
+ }
148
153
  }
149
154
 
150
155
  export type ModalOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elara-services/packages",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",