@periskope/types 0.6.106 → 0.6.107

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/types.d.ts CHANGED
@@ -1,12 +1,6 @@
1
- import { Chat, Location } from '@periskope/whatsapp-web.js';
2
1
  import type { default as _Stripe } from 'stripe';
3
2
  import { Merge, OverrideProperties } from 'type-fest';
4
3
  import { Tables } from './supabase.types';
5
- export type WhatsappChat = Chat & {
6
- groupMetadata?: any;
7
- pinned?: boolean;
8
- invite_link?: string;
9
- };
10
4
  export declare enum AllPlans {
11
5
  FREE_TRIAL = "free-trial",
12
6
  ENTERPRISE = "enterprise",
@@ -212,11 +206,12 @@ export type SingleMessagePayload = SendMessageContent & {
212
206
  job_id?: string;
213
207
  };
214
208
  export type MessageAttachmentFileTypes = 'image' | 'audio' | 'document' | 'video';
215
- export type AttachmentTypeProps = {
209
+ export type AttachmentFileType = {
216
210
  result: string;
217
211
  file: File | null;
218
212
  type: MessageAttachmentFileTypes;
219
- } | {
213
+ };
214
+ export type AttachmentLinkType = {
220
215
  link: {
221
216
  url: string;
222
217
  type: MessageAttachmentFileTypes;
@@ -224,6 +219,7 @@ export type AttachmentTypeProps = {
224
219
  mimetype?: string;
225
220
  };
226
221
  };
222
+ export type AttachmentTypeProps = AttachmentFileType | AttachmentLinkType;
227
223
  export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
228
224
  logs: (Tables<'tbl_broadcast_logs'> & Partial<ChatType>)[];
229
225
  } & {
package/dist/types.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IntegrationLogType = exports.SUPPORTED_TYPES = exports.enumChatColors = exports.labelColors = exports.AllPlans = void 0;
4
+ /* ----------------------------- TYPE SHORTHANDS ---------------------------- */
4
5
  /* ------------------------------ PERISKOPE TYPES ------------------------------ */
5
6
  var AllPlans;
6
7
  (function (AllPlans) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.106",
3
+ "version": "0.6.107",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types.ts CHANGED
@@ -1,18 +1,9 @@
1
- import { Chat, Location } from '@periskope/whatsapp-web.js';
2
1
  import type { default as _Stripe } from 'stripe';
3
2
  import { Merge, OverrideProperties } from 'type-fest';
4
3
  import { Tables } from './supabase.types';
5
4
 
6
5
  /* ----------------------------- TYPE SHORTHANDS ---------------------------- */
7
6
 
8
- /* ------------------------------ WHATSAPP ------------------------------ */
9
-
10
- export type WhatsappChat = Chat & {
11
- groupMetadata?: any;
12
- pinned?: boolean;
13
- invite_link?: string;
14
- };
15
-
16
7
  /* ------------------------------ PERISKOPE TYPES ------------------------------ */
17
8
 
18
9
  export enum AllPlans {
@@ -314,20 +305,25 @@ export type MessageAttachmentFileTypes =
314
305
  | 'document'
315
306
  | 'video';
316
307
 
317
- export type AttachmentTypeProps =
318
- | {
319
- result: string;
320
- file: File | null;
308
+
309
+ export type AttachmentFileType = {
310
+ result: string;
311
+ file: File | null;
312
+ type: MessageAttachmentFileTypes;
313
+ }
314
+
315
+ export type AttachmentLinkType = {
316
+ link: {
317
+ url: string;
321
318
  type: MessageAttachmentFileTypes;
322
- }
323
- | {
324
- link: {
325
- url: string;
326
- type: MessageAttachmentFileTypes;
327
- name: string;
328
- mimetype?: string;
329
- };
319
+ name: string;
320
+ mimetype?: string;
330
321
  };
322
+ };
323
+
324
+ export type AttachmentTypeProps =
325
+ | AttachmentFileType
326
+ | AttachmentLinkType
331
327
 
332
328
  /* -------------------------------- BROADCAST ------------------------------- */
333
329