@periskope/types 0.6.18 → 0.6.19
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 +1 -7
- package/package.json +12 -12
- package/types.ts +1 -15
- package/update_package.ps1 +21 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Merge, OverrideProperties } from 'type-fest';
|
|
2
2
|
import { Chat, MessageTypes } from 'whatsapp-web.js';
|
|
3
|
-
import { Tables
|
|
3
|
+
import { Tables } from './supabase.types';
|
|
4
4
|
export type WhatsappChat = Chat & {
|
|
5
5
|
groupMetadata?: any;
|
|
6
6
|
pinned?: boolean;
|
|
@@ -38,12 +38,6 @@ export type ContactType = Merge<Tables<'tbl_contacts'>, {
|
|
|
38
38
|
chat_ids: string[] | null;
|
|
39
39
|
}>;
|
|
40
40
|
export type ChatAccessType = Merge<Partial<Tables<'tbl_chat_access'>>, Tables<'tbl_org_members'>>;
|
|
41
|
-
export type BroadcastMessageType = Merge<TablesInsert<'tbl_broadcast_messages'>, {
|
|
42
|
-
message_payload?: SendMessageContent;
|
|
43
|
-
}>;
|
|
44
|
-
export type BroadcastTemplateType = Merge<TablesInsert<'tbl_broadcast_templates'>, {
|
|
45
|
-
message_payload?: SendMessageContent;
|
|
46
|
-
}>;
|
|
47
41
|
export declare const labelColors: string[];
|
|
48
42
|
export declare const enumChatColors: readonly ["#B4876E", "#A5B337", "#06CF9C", "#25D366", "#02A698", "#7D9EF1", "#007BFC", "#5E47DE", "#7F66FF", "#9333EA", "#FA6533", "#C4532D", "#DC2626", "#FF2E74", "#DB2777"];
|
|
49
43
|
export type SendMessageContent = {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
"name": "@periskope/types",
|
|
3
|
+
"version": "0.6.19",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"type-fest": "^4.8.3",
|
|
9
|
+
"whatsapp-web.js": "^1.23.0"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"update-package": "tsc \u0026\u0026 npm publish --access public"
|
|
13
|
+
}
|
|
14
14
|
}
|
package/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Merge, OverrideProperties } from 'type-fest';
|
|
2
2
|
import { Chat, MessageTypes } from 'whatsapp-web.js';
|
|
3
|
-
import { Tables
|
|
3
|
+
import { Tables } from './supabase.types';
|
|
4
4
|
|
|
5
5
|
/* ----------------------------- TYPE SHORTHANDS ---------------------------- */
|
|
6
6
|
|
|
@@ -68,20 +68,6 @@ export type ChatAccessType = Merge<
|
|
|
68
68
|
Tables<'tbl_org_members'>
|
|
69
69
|
>;
|
|
70
70
|
|
|
71
|
-
export type BroadcastMessageType = Merge<
|
|
72
|
-
TablesInsert<'tbl_broadcast_messages'>,
|
|
73
|
-
{
|
|
74
|
-
message_payload?: SendMessageContent;
|
|
75
|
-
}
|
|
76
|
-
>;
|
|
77
|
-
|
|
78
|
-
export type BroadcastTemplateType = Merge<
|
|
79
|
-
TablesInsert<'tbl_broadcast_templates'>,
|
|
80
|
-
{
|
|
81
|
-
message_payload?: SendMessageContent;
|
|
82
|
-
}
|
|
83
|
-
>;
|
|
84
|
-
|
|
85
71
|
/* -------------------------------- CONSTANTS ------------------------------- */
|
|
86
72
|
|
|
87
73
|
export const labelColors = [
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Define the path to your package.json file
|
|
2
|
+
$packageJsonPath = ".\package.json"
|
|
3
|
+
|
|
4
|
+
# Read the package.json file
|
|
5
|
+
$packageJson = Get-Content $packageJsonPath -Raw | ConvertFrom-Json
|
|
6
|
+
|
|
7
|
+
# Increment the patch version
|
|
8
|
+
$versionParts = $packageJson.version -split '\.'
|
|
9
|
+
$versionParts[2] = [int]$versionParts[2] + 1
|
|
10
|
+
$newVersion = $versionParts -join '.'
|
|
11
|
+
|
|
12
|
+
Write-Host "Updating package version to $newVersion"
|
|
13
|
+
|
|
14
|
+
# Update the version in the object
|
|
15
|
+
$packageJson.version = $newVersion
|
|
16
|
+
|
|
17
|
+
# Convert the object back to JSON and save
|
|
18
|
+
$packageJson | ConvertTo-Json -Depth 100 | Set-Content $packageJsonPath
|
|
19
|
+
|
|
20
|
+
# Run npm command
|
|
21
|
+
npm run update-package
|