shopeasy-sdk 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -37,6 +37,65 @@ const sdk = new ShopEasySdk({
37
37
  | `count` | `guildId: string` | `number` |
38
38
  | `delete` | `cartId: string` | `void` |
39
39
 
40
+
41
+ <details>
42
+ <summary>📦 Tipos utilizados</summary>
43
+
44
+ ### `CartDraft`
45
+
46
+ | Campo | Tipo | Obrigatório |
47
+ |-------|------|-------------|
48
+ | `products` | `CartDraftProduct[]` | Sim |
49
+
50
+
51
+ ### `Cart`
52
+
53
+ | Campo | Tipo | Obrigatório |
54
+ |-------|------|-------------|
55
+ | `id` | `string` | Sim |
56
+ | `guildId` | `string` | Sim |
57
+ | `status` | `CartStatus` | Sim |
58
+ | `userId` | `string` | Sim |
59
+ | `message` | `string` | Sim |
60
+ | `products` | `CartProduct[]` | Sim |
61
+ | `createdAt` | `Date` | Sim |
62
+ | `updatedAt` | `Date` | Sim |
63
+ | `expireAt` | `Date` | Não |
64
+ | `orderId` | `string` | Não |
65
+ | `botClient` | `string` | Sim |
66
+ | `guild` | `Guild | null` | Não |
67
+
68
+
69
+ ### `CreateCartArgs`
70
+
71
+ | Campo | Tipo | Obrigatório |
72
+ |-------|------|-------------|
73
+ | `guildId` | `string` | Sim |
74
+ | `userId` | `string` | Sim |
75
+ | `expireAt` | `Date` | Sim |
76
+ | `botClient` | `string` | Sim |
77
+ | `message` | `string` | Sim |
78
+ | `status` | `CartStatus` | Não |
79
+ | `products` | `CreateCartProduct[]` | Sim |
80
+
81
+
82
+ ### `CartGetArgs`
83
+
84
+ | Campo | Tipo | Obrigatório |
85
+ |-------|------|-------------|
86
+ | `userId` | `string` | Sim |
87
+ | `guildId` | `string` | Sim |
88
+
89
+
90
+ ### `CartUpdateArgs`
91
+
92
+ | Campo | Tipo | Obrigatório |
93
+ |-------|------|-------------|
94
+ | `id` | `string` | Sim |
95
+ | `data` | `UpdateCartData` | Sim |
96
+
97
+ </details>
98
+
40
99
  **Exemplo de uso:**
41
100
 
42
101
  ```typescript
@@ -66,6 +125,73 @@ const result = await sdk.carts.draft.delete(/* args */);
66
125
  | `count` | `guildId: string` | `number` |
67
126
  | `delete` | `id: string` | `Catalog` |
68
127
 
128
+
129
+ <details>
130
+ <summary>📦 Tipos utilizados</summary>
131
+
132
+ ### `CatalogDraftSetArgs`
133
+
134
+ | Campo | Tipo | Obrigatório |
135
+ |-------|------|-------------|
136
+ | `id` | `string` | Sim |
137
+ | `userId` | `string` | Sim |
138
+ | `data` | `CatalogUpdateArgs["data"]` | Sim |
139
+
140
+
141
+ ### `Catalog`
142
+
143
+ | Campo | Tipo | Obrigatório |
144
+ |-------|------|-------------|
145
+ | `id` | `string` | Sim |
146
+ | `guildId` | `string` | Sim |
147
+ | `reference` | `string` | Sim |
148
+ | `createBy` | `string` | Sim |
149
+ | `title` | `string | null` | Sim |
150
+ | `description` | `string | null` | Sim |
151
+ | `banners` | `JsonValue<string[]> | null` | Sim |
152
+ | `color` | `string | null` | Sim |
153
+ | `placeholder` | `string | null` | Sim |
154
+ | `status` | `CatalogStatus` | Não |
155
+ | `messages` | `JsonValue<string[]> | null` | Sim |
156
+ | `products` | `CatalogProduct[]` | Não |
157
+ | `guild` | `Guild | null` | Não |
158
+ | `createdAt` | `Date` | Não |
159
+ | `updatedAt` | `Date` | Não |
160
+
161
+
162
+ ### `CatalogDraftGetArgs`
163
+
164
+ | Campo | Tipo | Obrigatório |
165
+ |-------|------|-------------|
166
+ | `id` | `string` | Sim |
167
+ | `userId` | `string` | Sim |
168
+
169
+
170
+ ### `CatalogCreateArgs`
171
+
172
+ | Campo | Tipo | Obrigatório |
173
+ |-------|------|-------------|
174
+ | `guildId` | `string` | Sim |
175
+ | `createBy` | `string` | Sim |
176
+ | `reference` | `string` | Sim |
177
+ | `title` | `string | null` | Não |
178
+ | `description` | `string | null` | Não |
179
+ | `banners` | `JsonValue<Array<string>> | null` | Não |
180
+ | `color` | `string | null` | Não |
181
+ | `placeholder` | `string | null` | Não |
182
+ | `messages` | `JsonValue<string> | null` | Não |
183
+ | `productId` | `string` | Não |
184
+
185
+
186
+ ### `CatalogUpdateArgs`
187
+
188
+ | Campo | Tipo | Obrigatório |
189
+ |-------|------|-------------|
190
+ | `id` | `string` | Sim |
191
+ | `data` | `Omit<Partial<Catalog>, "id" | "reference" | "guild" | "products">` | Sim |
192
+
193
+ </details>
194
+
69
195
  **Exemplo de uso:**
70
196
 
71
197
  ```typescript
@@ -91,6 +217,66 @@ const result = await sdk.catalogs.getByReference(/* args */);
91
217
  | `update` | `args: ConfigUpdateArgs` | `Config` |
92
218
  | `getByCaching` | `_guildId: string` | `Config | null` |
93
219
 
220
+
221
+ <details>
222
+ <summary>📦 Tipos utilizados</summary>
223
+
224
+ ### `Config`
225
+
226
+ | Campo | Tipo | Obrigatório |
227
+ |-------|------|-------------|
228
+ | `guildId` | `string` | Sim |
229
+ | `antiFake` | `boolean | null` | Sim |
230
+ | `antiFakeDays` | `number | null` | Sim |
231
+ | `notifys` | `string[],` | Sim |
232
+ | `antiFakeRequiredRoleIds` | `string[] | null` | Sim |
233
+ | `antiFakeVerify` | `boolean | null` | Sim |
234
+ | `antiFakeVerifyMessage` | `string | null` | Sim |
235
+ | `colorHex` | `string` | Sim |
236
+ | `channelPublic` | `string | null` | Sim |
237
+ | `channelPrivate` | `string | null` | Sim |
238
+ | `channelCall` | `string | null` | Sim |
239
+ | `channelFeds` | `string | null` | Sim |
240
+ | `categoryCarts` | `string | null` | Sim |
241
+ | `categoryChats` | `string | null` | Sim |
242
+ | `staffRoles` | `RolePermissionsMap | null` | Sim |
243
+ | `staffUsers` | `JsonValue | null` | Sim |
244
+ | `clientRole` | `string | null` | Sim |
245
+ | `clientRolePremium` | `string | null` | Sim |
246
+ | `timeCart` | `number | null` | Sim |
247
+ | `timePayment` | `number | null` | Sim |
248
+ | `usersBanned` | `JsonValue<Array<string | null>> | null` | Sim |
249
+ | `terms` | `string | null` | Sim |
250
+ | `updatedAt` | `Date` | Sim |
251
+ | `guild` | `Guild` | Não |
252
+
253
+
254
+ ### `ConfigDraftSetArgs`
255
+
256
+ | Campo | Tipo | Obrigatório |
257
+ |-------|------|-------------|
258
+ | `userId` | `string` | Sim |
259
+ | `guildId` | `string` | Sim |
260
+ | `data` | `ConfigUpdateArgs["data"]` | Sim |
261
+
262
+
263
+ ### `ConfigDraftGetArgs`
264
+
265
+ | Campo | Tipo | Obrigatório |
266
+ |-------|------|-------------|
267
+ | `userId` | `string` | Sim |
268
+ | `guildId` | `string` | Sim |
269
+
270
+
271
+ ### `ConfigUpdateArgs`
272
+
273
+ | Campo | Tipo | Obrigatório |
274
+ |-------|------|-------------|
275
+ | `guildId` | `string` | Sim |
276
+ | `data` | `Omit<Partial<Config>, "id" | "guildId">` | Sim |
277
+
278
+ </details>
279
+
94
280
  **Exemplo de uso:**
95
281
 
96
282
  ```typescript
@@ -120,6 +306,68 @@ const result = await sdk.configss.delDraft(/* args */);
120
306
  | `count` | `guildId: string` | `number` |
121
307
  | `delete` | `id: string` | `Coupon` |
122
308
 
309
+
310
+ <details>
311
+ <summary>📦 Tipos utilizados</summary>
312
+
313
+ ### `CouponDraftSetArgs`
314
+
315
+ | Campo | Tipo | Obrigatório |
316
+ |-------|------|-------------|
317
+ | `id` | `string` | Sim |
318
+ | `userId` | `string` | Sim |
319
+ | `data` | `CouponUpdateArgs["data"]` | Sim |
320
+
321
+
322
+ ### `Coupon`
323
+
324
+ | Campo | Tipo | Obrigatório |
325
+ |-------|------|-------------|
326
+ | `id` | `string` | Sim |
327
+ | `reference` | `string` | Sim |
328
+ | `guildId` | `string` | Sim |
329
+ | `createdBy` | `string` | Sim |
330
+ | `discount` | `number | null` | Sim |
331
+ | `valorMin` | `number | null` | Sim |
332
+ | `valorMax` | `number | null` | Sim |
333
+ | `amount` | `number | null` | Sim |
334
+ | `uses` | `number | null` | Sim |
335
+ | `status` | `CouponStatus` | Não |
336
+ | `guild` | `Guild | null` | Não |
337
+
338
+
339
+ ### `CouponDraftGetArgs`
340
+
341
+ | Campo | Tipo | Obrigatório |
342
+ |-------|------|-------------|
343
+ | `id` | `string` | Sim |
344
+ | `userId` | `string` | Sim |
345
+
346
+
347
+ ### `CouponCreateArgs`
348
+
349
+ | Campo | Tipo | Obrigatório |
350
+ |-------|------|-------------|
351
+ | `createdBy` | `string` | Sim |
352
+ | `reference` | `string` | Sim |
353
+ | `guildId` | `string` | Sim |
354
+ | `discount` | `number` | Não |
355
+ | `valorMin` | `number` | Não |
356
+ | `valorMax` | `number` | Não |
357
+ | `role` | `string` | Não |
358
+ | `amount` | `number` | Não |
359
+ | `uses` | `number` | Não |
360
+
361
+
362
+ ### `CouponUpdateArgs`
363
+
364
+ | Campo | Tipo | Obrigatório |
365
+ |-------|------|-------------|
366
+ | `id` | `string` | Sim |
367
+ | `data` | `Omit<Partial<Coupon>, "id" | "reference">` | Sim |
368
+
369
+ </details>
370
+
123
371
  **Exemplo de uso:**
124
372
 
125
373
  ```typescript
@@ -150,6 +398,60 @@ const result = await sdk.coupons.existsByCode(/* args */);
150
398
  | `count` | `guildId: string` | `number` |
151
399
  | `delete` | `id: string` | `Customer` |
152
400
 
401
+
402
+ <details>
403
+ <summary>📦 Tipos utilizados</summary>
404
+
405
+ ### `CustomerDraftSetArgs`
406
+
407
+ | Campo | Tipo | Obrigatório |
408
+ |-------|------|-------------|
409
+ | `id` | `string` | Sim |
410
+ | `userId` | `string` | Sim |
411
+ | `data` | `CustomerUpdateArgs["data"]` | Sim |
412
+
413
+
414
+ ### `Customer`
415
+
416
+ | Campo | Tipo | Obrigatório |
417
+ |-------|------|-------------|
418
+ | `id` | `string` | Sim |
419
+ | `userId` | `string` | Sim |
420
+ | `guildId` | `string` | Sim |
421
+ | `balance` | `Decimal` | Sim |
422
+ | `notify` | `boolean` | Sim |
423
+ | `sales` | `Sale[]` | Não |
424
+ | `guild` | `Guild | null` | Não |
425
+ | `createdAt` | `Date` | Não |
426
+
427
+
428
+ ### `CustomerDraftGetArgs`
429
+
430
+ | Campo | Tipo | Obrigatório |
431
+ |-------|------|-------------|
432
+ | `id` | `string` | Sim |
433
+ | `userId` | `string` | Sim |
434
+
435
+
436
+ ### `CustomerCreateArgs`
437
+
438
+ | Campo | Tipo | Obrigatório |
439
+ |-------|------|-------------|
440
+ | `userId` | `string` | Sim |
441
+ | `guildId` | `string` | Sim |
442
+ | `balance` | `Decimal` | Não |
443
+ | `notify` | `boolean` | Não |
444
+
445
+
446
+ ### `CustomerUpdateArgs`
447
+
448
+ | Campo | Tipo | Obrigatório |
449
+ |-------|------|-------------|
450
+ | `id` | `string` | Sim |
451
+ | `data` | `Omit<Partial<Customer>, "id" | "userId" | "guildId">` | Sim |
452
+
453
+ </details>
454
+
153
455
  **Exemplo de uso:**
154
456
 
155
457
  ```typescript
@@ -171,6 +473,23 @@ const result = await sdk.customers.existsByReference(/* args */);
171
473
  | `getAll` | `guildId: string` | `Image[]` |
172
474
  | `create` | `args: imageCreate` | `Image` |
173
475
 
476
+
477
+ <details>
478
+ <summary>📦 Tipos utilizados</summary>
479
+
480
+ ### `Image`
481
+
482
+ | Campo | Tipo | Obrigatório |
483
+ |-------|------|-------------|
484
+ | `id` | `string` | Sim |
485
+ | `guildId` | `string` | Sim |
486
+ | `url` | `string` | Sim |
487
+ | `reference` | `string` | Sim |
488
+ | `name` | `string` | Sim |
489
+ | `expiresIn` | `number` | Sim |
490
+
491
+ </details>
492
+
174
493
  **Exemplo de uso:**
175
494
 
176
495
  ```typescript
@@ -195,6 +514,52 @@ const result = await sdk.images.create(/* args */);
195
514
  | `markAsReleased` | `id: string` | `Order` |
196
515
  | `aprove` | `id: string` | `Order` |
197
516
 
517
+
518
+ <details>
519
+ <summary>📦 Tipos utilizados</summary>
520
+
521
+ ### `OrderCreate`
522
+
523
+ | Campo | Tipo | Obrigatório |
524
+ |-------|------|-------------|
525
+ | `guildId` | `string` | Sim |
526
+ | `amount` | `number` | Sim |
527
+ | `cartId` | `string` | Sim |
528
+ | `botClient` | `string` | Sim |
529
+ | `customer` | `OrderCustomer` | Sim |
530
+ | `products` | `OrderProduct[]` | Sim |
531
+
532
+
533
+ ### `Order`
534
+
535
+ | Campo | Tipo | Obrigatório |
536
+ |-------|------|-------------|
537
+ | `id` | `string` | Sim |
538
+ | `aproved` | `boolean` | Sim |
539
+ | `released` | `boolean` | Sim |
540
+ | `cartId` | `string` | Não |
541
+ | `planId` | `string` | Não |
542
+ | `paymentId` | `string` | Não |
543
+ | `guildId` | `string` | Sim |
544
+ | `customerId` | `string` | Não |
545
+ | `botClient` | `string` | Não |
546
+ | `paymentProvider` | `PaymentProvider` | Não |
547
+ | `automatic` | `boolean` | Não |
548
+ | `pixKey` | `string` | Sim |
549
+ | `expireAt` | `Date` | Não |
550
+ | `createdAt` | `Date` | Sim |
551
+ | `updatedAt` | `Date` | Sim |
552
+
553
+
554
+ ### `OrderPayment`
555
+
556
+ | Campo | Tipo | Obrigatório |
557
+ |-------|------|-------------|
558
+ | `id` | `string` | Sim |
559
+ | `aproved` | `boolean` | Sim |
560
+
561
+ </details>
562
+
198
563
  **Exemplo de uso:**
199
564
 
200
565
  ```typescript
@@ -217,6 +582,44 @@ const result = await sdk.orders.getPayment(/* args */);
217
582
  | `update` | `args: UpdatePaymentConfigArgs` | `PaymentConfig` |
218
583
  | `getByCaching` | `guildId: string` | `PaymentConfig | null` |
219
584
 
585
+
586
+ <details>
587
+ <summary>📦 Tipos utilizados</summary>
588
+
589
+ ### `PaymentConfig`
590
+
591
+ | Campo | Tipo | Obrigatório |
592
+ |-------|------|-------------|
593
+ | `guildId` | `string` | Sim |
594
+ | `provider` | `PaymentProvider | null` | Não |
595
+ | `mercadoPagoToken` | `string | null` | Não |
596
+ | `efiBankToken` | `string | null` | Não |
597
+ | `chavePix` | `string | null` | Não |
598
+ | `chavePixType` | `"CPF" | "EMAIL" | "ALEATORIA" | "NUMERO"` | Não |
599
+ | `chavePixName` | `string` | Não |
600
+ | `chavePixCity` | `string` | Não |
601
+ | `walletApiKey` | `string` | Não |
602
+ | `chavePixchavePixStaticQrCode` | `boolean` | Sim |
603
+
604
+
605
+ ### `UpdatePaymentConfigArgs`
606
+
607
+ | Campo | Tipo | Obrigatório |
608
+ |-------|------|-------------|
609
+ | `guildId` | `string` | Sim |
610
+ | `data` | `{` | Sim |
611
+ | `provider` | `PaymentProvider | null` | Não |
612
+ | `mercadoPagoToken` | `string | null` | Não |
613
+ | `walletApiKey` | `string | null` | Não |
614
+ | `efiBankToken` | `string | null` | Não |
615
+ | `chavePix` | `string | null` | Não |
616
+ | `chavePixType` | `"CPF" | "EMAIL" | "ALEATORIA" | "NUMERO"` | Não |
617
+ | `chavePixName` | `string` | Não |
618
+ | `chavePixCity` | `string` | Não |
619
+ | `chavePixchavePixStaticQrCode` | `boolean` | Não |
620
+
621
+ </details>
622
+
220
623
  **Exemplo de uso:**
221
624
 
222
625
  ```typescript
@@ -248,6 +651,95 @@ const result = await sdk.paymentConfig.getByCaching(/* args */);
248
651
  | `delete` | `guildId: string` | `void` |
249
652
  | `createSubscription` | `args: PlanSubscriptionCreateArgs` | `EfiPixCreateResponse` |
250
653
 
654
+
655
+ <details>
656
+ <summary>📦 Tipos utilizados</summary>
657
+
658
+ ### `Plan`
659
+
660
+ | Campo | Tipo | Obrigatório |
661
+ |-------|------|-------------|
662
+ | `guildId` | `string` | Sim |
663
+ | `type` | `PlanType` | Sim |
664
+ | `expired` | `boolean` | Sim |
665
+ | `userId` | `string` | Sim |
666
+ | `createdAt` | `Date | null` | Sim |
667
+ | `expireAt` | `Date | null` | Sim |
668
+
669
+
670
+ ### `ExpiredPlansResponse`
671
+
672
+ | Campo | Tipo | Obrigatório |
673
+ |-------|------|-------------|
674
+ | `count` | `number` | Sim |
675
+ | `plans` | `Array<{` | Sim |
676
+ | `guildId` | `string` | Sim |
677
+ | `userId` | `string` | Sim |
678
+ | `type` | `PlanType` | Sim |
679
+ | `expiredAt` | `Date | null` | Sim |
680
+ | `createdAt` | `Date | null` | Sim |
681
+
682
+
683
+ ### `PlansNeedingAlertResponse`
684
+
685
+ | Campo | Tipo | Obrigatório |
686
+ |-------|------|-------------|
687
+ | `count` | `number` | Sim |
688
+ | `plans` | `PlanNeedingAlert[]` | Sim |
689
+
690
+
691
+ ### `MarkAlertResponse`
692
+
693
+ | Campo | Tipo | Obrigatório |
694
+ |-------|------|-------------|
695
+ | `success` | `boolean` | Sim |
696
+ | `message` | `string` | Sim |
697
+
698
+
699
+ ### `CheckExpirationsResponse`
700
+
701
+ | Campo | Tipo | Obrigatório |
702
+ |-------|------|-------------|
703
+ | `expired` | `{` | Sim |
704
+ | `count` | `number` | Sim |
705
+ | `plans` | `Array<{` | Sim |
706
+ | `guildId` | `string` | Sim |
707
+ | `userId` | `string` | Sim |
708
+ | `type` | `PlanType` | Sim |
709
+ | `expiredAt` | `Date | null` | Sim |
710
+ | `createdAt` | `Date | null` | Sim |
711
+
712
+
713
+ ### `PlanStatus`
714
+
715
+ | Campo | Tipo | Obrigatório |
716
+ |-------|------|-------------|
717
+ | `active` | `boolean` | Sim |
718
+ | `expired` | `boolean` | Sim |
719
+ | `expireAt` | `Date` | Não |
720
+ | `daysUntilExpire` | `number` | Não |
721
+
722
+
723
+ ### `PlanSubscriptionCreateArgs`
724
+
725
+ | Campo | Tipo | Obrigatório |
726
+ |-------|------|-------------|
727
+ | `guildId` | `string` | Sim |
728
+ | `userId` | `string` | Sim |
729
+ | `months` | `number` | Sim |
730
+ | `plan` | `"essential" | "complete"` | Sim |
731
+
732
+
733
+ ### `EfiPixCreateResponse`
734
+
735
+ | Campo | Tipo | Obrigatório |
736
+ |-------|------|-------------|
737
+ | `calendario` | `{` | Sim |
738
+ | `criacao` | `string` | Sim |
739
+ | `expiracao` | `number` | Sim |
740
+
741
+ </details>
742
+
251
743
  **Exemplo de uso:**
252
744
 
253
745
  ```typescript
@@ -280,6 +772,99 @@ const result = await sdk.planss.create(/* args */);
280
772
  | `count` | `guildId: string` | `number` |
281
773
  | `delete` | `id: string` | `void` |
282
774
 
775
+
776
+ <details>
777
+ <summary>📦 Tipos utilizados</summary>
778
+
779
+ ### `ProduductDraftSetArgs`
780
+
781
+ | Campo | Tipo | Obrigatório |
782
+ |-------|------|-------------|
783
+ | `id` | `string` | Sim |
784
+ | `userId` | `string` | Sim |
785
+ | `data` | `ProductUpdateArgs["data"] & {` | Sim |
786
+ | `catalogs` | `string[]` | Não |
787
+
788
+
789
+ ### `Product`
790
+
791
+ | Campo | Tipo | Obrigatório |
792
+ |-------|------|-------------|
793
+ | `id` | `string` | Sim |
794
+ | `reference` | `string` | Sim |
795
+ | `guildId` | `string` | Sim |
796
+ | `createdBy` | `string` | Sim |
797
+ | `status` | `ProductStatus` | Sim |
798
+ | `title` | `string | null` | Não |
799
+ | `banned` | `boolean | null` | Sim |
800
+ | `usersNotifyStock` | `JsonValue<Array<string>> | null` | Sim |
801
+ | `description` | `string | null` | Sim |
802
+ | `price` | `Decimal` | Sim |
803
+ | `discount` | `Decimal | null` | Sim |
804
+ | `banners` | `JsonValue<Array<string>> | null` | Sim |
805
+ | `messages` | `JsonValue<Array<string>> | null` | Sim |
806
+ | `stockMode` | `StockMode` | Sim |
807
+ | `stockItems` | `JsonValue<Array<string>> | null` | Sim |
808
+ | `stockText` | `string | null` | Sim |
809
+ | `stockProductMode` | `ProductMode | null` | Sim |
810
+ | `stockRepeat` | `number | null` | Sim |
811
+ | `stockCount` | `number | null` | Sim |
812
+ | `instructions` | `string | null` | Sim |
813
+ | `stockMin` | `number` | Sim |
814
+ | `stockMax` | `number` | Sim |
815
+ | `chat` | `boolean | null` | Não |
816
+ | `private` | `boolean | null` | Não |
817
+ | `deshighlight` | `boolean | null` | Não |
818
+ | `sell` | `boolean | null` | Não |
819
+ | `coupon` | `boolean` | Não |
820
+ | `colorHex` | `string | null` | Não |
821
+ | `guild` | `Guild | null` | Não |
822
+ | `sales` | `SaleProduct[]` | Não |
823
+ | `catalogs` | `string[]` | Não |
824
+
825
+
826
+ ### `ProductStockPushArgs`
827
+
828
+ | Campo | Tipo | Obrigatório |
829
+ |-------|------|-------------|
830
+ | `product` | `Product` | Sim |
831
+ | `amount` | `number` | Sim |
832
+
833
+
834
+ ### `ProduductDraftGetArgs`
835
+
836
+ | Campo | Tipo | Obrigatório |
837
+ |-------|------|-------------|
838
+ | `id` | `string` | Sim |
839
+ | `userId` | `string` | Sim |
840
+
841
+
842
+ ### `ProductGetByReference`
843
+
844
+ | Campo | Tipo | Obrigatório |
845
+ |-------|------|-------------|
846
+ | `reference` | `string` | Sim |
847
+ | `guildId` | `string` | Sim |
848
+
849
+
850
+ ### `ProductCreateArgs`
851
+
852
+ | Campo | Tipo | Obrigatório |
853
+ |-------|------|-------------|
854
+ | `createdBy` | `string` | Sim |
855
+ | `reference` | `string` | Sim |
856
+ | `guildId` | `string` | Sim |
857
+
858
+
859
+ ### `ProductUpdateArgs`
860
+
861
+ | Campo | Tipo | Obrigatório |
862
+ |-------|------|-------------|
863
+ | `id` | `string` | Sim |
864
+ | `data` | `Omit<Partial<Product>, "id" | "reference">` | Sim |
865
+
866
+ </details>
867
+
283
868
  **Exemplo de uso:**
284
869
 
285
870
  ```typescript
@@ -304,6 +889,51 @@ const result = await sdk.products.getDraft(/* args */);
304
889
  | `saleProductGet` | `id: string` | `SaleProduct | null` |
305
890
  | `delete` | `id: string` | `void` |
306
891
 
892
+
893
+ <details>
894
+ <summary>📦 Tipos utilizados</summary>
895
+
896
+ ### `SaleCreateArgs`
897
+
898
+ | Campo | Tipo | Obrigatório |
899
+ |-------|------|-------------|
900
+ | `userId` | `string` | Sim |
901
+ | `guildId` | `string` | Sim |
902
+ | `totalValue` | `Decimal` | Sim |
903
+ | `products` | `SaleProductCreateArgs[]` | Sim |
904
+
905
+
906
+ ### `Sale`
907
+
908
+ | Campo | Tipo | Obrigatório |
909
+ |-------|------|-------------|
910
+ | `id` | `string` | Sim |
911
+ | `userId` | `string` | Sim |
912
+ | `guildId` | `string` | Sim |
913
+ | `totalValue` | `Decimal` | Sim |
914
+ | `createdAt` | `Date | null` | Sim |
915
+ | `guild` | `Guild` | Não |
916
+ | `customer` | `Customer` | Não |
917
+ | `saleProducts` | `SaleProduct[]` | Não |
918
+
919
+
920
+ ### `SaleProduct`
921
+
922
+ | Campo | Tipo | Obrigatório |
923
+ |-------|------|-------------|
924
+ | `id` | `string` | Sim |
925
+ | `saleId` | `string` | Sim |
926
+ | `productId` | `string` | Sim |
927
+ | `valueTotal` | `Decimal` | Sim |
928
+ | `quantity` | `number` | Sim |
929
+ | `product` | `Product` | Não |
930
+ | `sale` | `Sale` | Não |
931
+ | `deliveryStock` | `JsonValue<Array<string>> | null` | Não |
932
+ | `deliveryPedding` | `boolean | null` | Não |
933
+ | `deliveryPeddingAmount` | `number | null` | Não |
934
+
935
+ </details>
936
+
307
937
  **Exemplo de uso:**
308
938
 
309
939
  ```typescript
@@ -325,6 +955,29 @@ const result = await sdk.sales.getAllByGuild(/* args */);
325
955
  | `listUnused` | `—` | `Token[] | null` |
326
956
  | `update` | `args: TokenUpdateArgs` | `Token` |
327
957
 
958
+
959
+ <details>
960
+ <summary>📦 Tipos utilizados</summary>
961
+
962
+ ### `Token`
963
+
964
+ | Campo | Tipo | Obrigatório |
965
+ |-------|------|-------------|
966
+ | `id` | `string` | Sim |
967
+ | `botId` | `string` | Sim |
968
+ | `used` | `boolean` | Sim |
969
+ | `token` | `string` | Sim |
970
+
971
+
972
+ ### `TokenUpdateArgs`
973
+
974
+ | Campo | Tipo | Obrigatório |
975
+ |-------|------|-------------|
976
+ | `id` | `string` | Sim |
977
+ | `data` | `Partial<Omit<Token, "id" | "botId">>` | Sim |
978
+
979
+ </details>
980
+
328
981
  **Exemplo de uso:**
329
982
 
330
983
  ```typescript
@@ -344,6 +997,19 @@ const result = await sdk.tokens.update(/* args */);
344
997
  |--------|-----------|--------|
345
998
  | `get` | `userId: string` | `User | null` |
346
999
 
1000
+
1001
+ <details>
1002
+ <summary>📦 Tipos utilizados</summary>
1003
+
1004
+ ### `User`
1005
+
1006
+ | Campo | Tipo | Obrigatório |
1007
+ |-------|------|-------------|
1008
+ | `id` | `string` | Sim |
1009
+ | `develop` | `boolean` | Não |
1010
+
1011
+ </details>
1012
+
347
1013
  **Exemplo de uso:**
348
1014
 
349
1015
  ```typescript
@@ -366,6 +1032,38 @@ const result = await sdk.users.get(/* args */);
366
1032
  | `update` | `args: UpdateWalletArgs` | `Wallet` |
367
1033
  | `getByCaching` | `userId: string` | `Wallet | null` |
368
1034
 
1035
+
1036
+ <details>
1037
+ <summary>📦 Tipos utilizados</summary>
1038
+
1039
+ ### `Wallet`
1040
+
1041
+ | Campo | Tipo | Obrigatório |
1042
+ |-------|------|-------------|
1043
+ | `id` | `string` | Sim |
1044
+ | `userId` | `string` | Sim |
1045
+ | `apiKey` | `string | null` | Não |
1046
+ | `balance` | `WalletBalance` | Não |
1047
+ | `gatewayProvider` | `GatewayProvider | null` | Não |
1048
+ | `gatewayConfig` | `Record<string, unknown> | null` | Não |
1049
+ | `isActive` | `boolean | null` | Não |
1050
+ | `createdAt` | `Date` | Sim |
1051
+ | `updatedAt` | `Date` | Sim |
1052
+
1053
+
1054
+ ### `UpdateWalletArgs`
1055
+
1056
+ | Campo | Tipo | Obrigatório |
1057
+ |-------|------|-------------|
1058
+ | `userId` | `string` | Sim |
1059
+ | `data` | `{` | Sim |
1060
+ | `apiKey` | `string | null` | Não |
1061
+ | `gatewayProvider` | `GatewayProvider | null` | Não |
1062
+ | `gatewayConfig` | `Record<string, unknown> | null` | Não |
1063
+ | `isActive` | `boolean | null` | Não |
1064
+
1065
+ </details>
1066
+
369
1067
  **Exemplo de uso:**
370
1068
 
371
1069
  ```typescript
@@ -60,6 +60,16 @@ class ProductService {
60
60
  const { data } = await config.api.get(`/products/${id}`);
61
61
  return data;
62
62
  }
63
+ async generate(args) {
64
+ const { data } = await config.api.post(
65
+ `/products/generate/${args.productId}`,
66
+ {
67
+ guildId: args.guildId,
68
+ prompt: args.prompt
69
+ }
70
+ );
71
+ return data;
72
+ }
63
73
  async getByReference({
64
74
  reference,
65
75
  guildId
@@ -58,6 +58,16 @@ let ProductService$1 = class ProductService {
58
58
  const { data } = await api.get(`/products/${id}`);
59
59
  return data;
60
60
  }
61
+ async generate(args) {
62
+ const { data } = await api.post(
63
+ `/products/generate/${args.productId}`,
64
+ {
65
+ guildId: args.guildId,
66
+ prompt: args.prompt
67
+ }
68
+ );
69
+ return data;
70
+ }
61
71
  async getByReference({
62
72
  reference,
63
73
  guildId
package/dist/index.d.cts CHANGED
@@ -69,6 +69,7 @@ interface Config {
69
69
  antiFakeRequiredRoleIds: string[] | null;
70
70
  antiFakeVerify: boolean | null;
71
71
  antiFakeVerifyMessage: string | null;
72
+ geminiKey: string;
72
73
  colorHex: string;
73
74
  channelPublic: string | null;
74
75
  channelPrivate: string | null;
@@ -181,6 +182,11 @@ interface SaleProduct$1 {
181
182
  quantiy: number;
182
183
  product?: Product;
183
184
  }
185
+ interface GenerateProductArgs {
186
+ guildId: string;
187
+ productId: string;
188
+ prompt: string;
189
+ }
184
190
  type ProductMode = "TEXT" | "LINES";
185
191
  type ProductStatus = "ACTIVED" | "DEACTIVATED" | "BANNED";
186
192
  type StockMode = "AUTOMATIC" | "MANUAL";
@@ -729,6 +735,7 @@ declare class ShopEasySdk {
729
735
  getDraft(args: ProduductDraftGetArgs): Promise<Product | null>;
730
736
  existsByReference(args: ProductGetByReference): Promise<Product | null>;
731
737
  getById(id: string): Promise<Product | null>;
738
+ generate(args: GenerateProductArgs): Promise<Product>;
732
739
  getByReference({ reference, guildId, }: {
733
740
  reference: string;
734
741
  guildId: string;
package/dist/index.d.mts CHANGED
@@ -69,6 +69,7 @@ interface Config {
69
69
  antiFakeRequiredRoleIds: string[] | null;
70
70
  antiFakeVerify: boolean | null;
71
71
  antiFakeVerifyMessage: string | null;
72
+ geminiKey: string;
72
73
  colorHex: string;
73
74
  channelPublic: string | null;
74
75
  channelPrivate: string | null;
@@ -181,6 +182,11 @@ interface SaleProduct$1 {
181
182
  quantiy: number;
182
183
  product?: Product;
183
184
  }
185
+ interface GenerateProductArgs {
186
+ guildId: string;
187
+ productId: string;
188
+ prompt: string;
189
+ }
184
190
  type ProductMode = "TEXT" | "LINES";
185
191
  type ProductStatus = "ACTIVED" | "DEACTIVATED" | "BANNED";
186
192
  type StockMode = "AUTOMATIC" | "MANUAL";
@@ -729,6 +735,7 @@ declare class ShopEasySdk {
729
735
  getDraft(args: ProduductDraftGetArgs): Promise<Product | null>;
730
736
  existsByReference(args: ProductGetByReference): Promise<Product | null>;
731
737
  getById(id: string): Promise<Product | null>;
738
+ generate(args: GenerateProductArgs): Promise<Product>;
732
739
  getByReference({ reference, guildId, }: {
733
740
  reference: string;
734
741
  guildId: string;
package/dist/index.d.ts CHANGED
@@ -69,6 +69,7 @@ interface Config {
69
69
  antiFakeRequiredRoleIds: string[] | null;
70
70
  antiFakeVerify: boolean | null;
71
71
  antiFakeVerifyMessage: string | null;
72
+ geminiKey: string;
72
73
  colorHex: string;
73
74
  channelPublic: string | null;
74
75
  channelPrivate: string | null;
@@ -181,6 +182,11 @@ interface SaleProduct$1 {
181
182
  quantiy: number;
182
183
  product?: Product;
183
184
  }
185
+ interface GenerateProductArgs {
186
+ guildId: string;
187
+ productId: string;
188
+ prompt: string;
189
+ }
184
190
  type ProductMode = "TEXT" | "LINES";
185
191
  type ProductStatus = "ACTIVED" | "DEACTIVATED" | "BANNED";
186
192
  type StockMode = "AUTOMATIC" | "MANUAL";
@@ -729,6 +735,7 @@ declare class ShopEasySdk {
729
735
  getDraft(args: ProduductDraftGetArgs): Promise<Product | null>;
730
736
  existsByReference(args: ProductGetByReference): Promise<Product | null>;
731
737
  getById(id: string): Promise<Product | null>;
738
+ generate(args: GenerateProductArgs): Promise<Product>;
732
739
  getByReference({ reference, guildId, }: {
733
740
  reference: string;
734
741
  guildId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopeasy-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "SDK oficial para integração com a API ShopEasy",
5
5
  "license": "ISC",
6
6
  "author": "jeanbrnd",