@periskope/types 0.6.105 → 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.
@@ -346,7 +346,6 @@ export type Database = {
346
346
  duration: string | null;
347
347
  flag_metadata: Json | null;
348
348
  flag_response_time: number | null;
349
- flag_status: boolean | null;
350
349
  forwarding_score: number | null;
351
350
  from: string | null;
352
351
  from_me: boolean | null;
@@ -398,7 +397,6 @@ export type Database = {
398
397
  duration?: string | null;
399
398
  flag_metadata?: Json | null;
400
399
  flag_response_time?: number | null;
401
- flag_status?: boolean | null;
402
400
  forwarding_score?: number | null;
403
401
  from?: string | null;
404
402
  from_me?: boolean | null;
@@ -450,7 +448,6 @@ export type Database = {
450
448
  duration?: string | null;
451
449
  flag_metadata?: Json | null;
452
450
  flag_response_time?: number | null;
453
- flag_status?: boolean | null;
454
451
  forwarding_score?: number | null;
455
452
  from?: string | null;
456
453
  from_me?: boolean | null;
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.105",
3
+ "version": "0.6.107",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/supabase.types.ts CHANGED
@@ -351,7 +351,6 @@ export type Database = {
351
351
  duration: string | null;
352
352
  flag_metadata: Json | null;
353
353
  flag_response_time: number | null;
354
- flag_status: boolean | null;
355
354
  forwarding_score: number | null;
356
355
  from: string | null;
357
356
  from_me: boolean | null;
@@ -403,7 +402,6 @@ export type Database = {
403
402
  duration?: string | null;
404
403
  flag_metadata?: Json | null;
405
404
  flag_response_time?: number | null;
406
- flag_status?: boolean | null;
407
405
  forwarding_score?: number | null;
408
406
  from?: string | null;
409
407
  from_me?: boolean | null;
@@ -455,7 +453,6 @@ export type Database = {
455
453
  duration?: string | null;
456
454
  flag_metadata?: Json | null;
457
455
  flag_response_time?: number | null;
458
- flag_status?: boolean | null;
459
456
  forwarding_score?: number | null;
460
457
  from?: string | null;
461
458
  from_me?: boolean | null;
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