@periskope/types 0.6.9-2.2 → 0.6.9-6.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.
- package/dist/supabase.types.d.ts +453 -227
- package/dist/types.d.ts +31 -6
- package/mod_json_type.ps1 +82 -82
- package/package.json +16 -16
- package/supabase.types.ts +1836 -1596
- package/types.ts +34 -6
package/dist/types.d.ts
CHANGED
|
@@ -48,6 +48,13 @@ export type OrgPreferences = {
|
|
|
48
48
|
allow_exports?: boolean;
|
|
49
49
|
sync_phone_contacts?: boolean;
|
|
50
50
|
};
|
|
51
|
+
type OrgPreferenceKey = keyof OrgPreferences;
|
|
52
|
+
export type OrgPreferencesValue = {
|
|
53
|
+
[K in OrgPreferenceKey]: {
|
|
54
|
+
key: K;
|
|
55
|
+
value: OrgPreferences[K];
|
|
56
|
+
};
|
|
57
|
+
}[OrgPreferenceKey];
|
|
51
58
|
export type OrgMetadata = {
|
|
52
59
|
phone_number: string;
|
|
53
60
|
ticket_prefix: string;
|
|
@@ -64,6 +71,11 @@ export type OrgMetadata = {
|
|
|
64
71
|
label: string;
|
|
65
72
|
};
|
|
66
73
|
}[];
|
|
74
|
+
partition?: boolean;
|
|
75
|
+
};
|
|
76
|
+
type AccessScopes = {
|
|
77
|
+
integrations: boolean;
|
|
78
|
+
exports: boolean;
|
|
67
79
|
};
|
|
68
80
|
export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
|
|
69
81
|
user: Tables<'tbl_org_members'>;
|
|
@@ -76,6 +88,7 @@ export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
|
|
|
76
88
|
is_enterprise: boolean;
|
|
77
89
|
is_free_trial: boolean;
|
|
78
90
|
is_hubspot_connected: boolean;
|
|
91
|
+
access_scopes: AccessScopes;
|
|
79
92
|
}>, {
|
|
80
93
|
org_plan: OrgPlan<AllPlans | Enterprise>;
|
|
81
94
|
stripe_customer_details: _Stripe.Customer | null;
|
|
@@ -169,17 +182,18 @@ export type SendMessageContent = {
|
|
|
169
182
|
quoted_message_type?: 'reply' | 'forward' | 'reply_private';
|
|
170
183
|
broadcast_id?: string;
|
|
171
184
|
performed_by?: string;
|
|
172
|
-
variables?: {
|
|
173
|
-
[key: string]: VariableType;
|
|
174
|
-
};
|
|
175
185
|
};
|
|
176
186
|
export type QuickReplyContent = Omit<SendMessageContent, 'broadcast_id' | 'variables'>;
|
|
177
|
-
export type
|
|
178
|
-
|
|
187
|
+
export type BroadcastVariableType = {
|
|
188
|
+
chat_id: string;
|
|
189
|
+
values: {
|
|
190
|
+
[key: string]: string;
|
|
191
|
+
};
|
|
179
192
|
};
|
|
180
193
|
export type BroadcastMessagePayload = SendMessageContent & {
|
|
181
194
|
chat_ids: string[];
|
|
182
195
|
broadcast_id?: string;
|
|
196
|
+
variables?: BroadcastVariableType[];
|
|
183
197
|
};
|
|
184
198
|
export type SingleMessagePayload = SendMessageContent & {
|
|
185
199
|
chat_id: string;
|
|
@@ -210,6 +224,14 @@ export type ChatParticipantOperation = {
|
|
|
210
224
|
export type ChatParticipantOperationPayload = ChatParticipantOperation & {
|
|
211
225
|
chat_ids: string[];
|
|
212
226
|
};
|
|
227
|
+
export type ChatOperationReturn = {
|
|
228
|
+
[participant_id: string]: {
|
|
229
|
+
is_success: boolean;
|
|
230
|
+
message?: string;
|
|
231
|
+
code?: number;
|
|
232
|
+
isInviteV4Sent?: boolean;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
213
235
|
export type StripeSubscription = _Stripe.Subscription;
|
|
214
236
|
export type StripeCustomer = _Stripe.Customer;
|
|
215
237
|
export type StripeCoupon = _Stripe.Coupon;
|
|
@@ -294,7 +316,9 @@ export type IntegrationLogDetailsType<T extends IntegrationLogType> = OverridePr
|
|
|
294
316
|
};
|
|
295
317
|
}>;
|
|
296
318
|
export type APIAuthDetails = {
|
|
297
|
-
org_details: Tables<'view_org'
|
|
319
|
+
org_details: Merge<Tables<'view_org'>, {
|
|
320
|
+
access_scopes: AccessScopes;
|
|
321
|
+
}> | null;
|
|
298
322
|
phone_details: Tables<'tbl_org_phones'> | null;
|
|
299
323
|
token_details: Tables<'tbl_integration_tokens'> | null;
|
|
300
324
|
};
|
|
@@ -324,3 +348,4 @@ export type UserPreferences = {
|
|
|
324
348
|
right_sidepanel_open: boolean;
|
|
325
349
|
sync_wa_unread_count: boolean;
|
|
326
350
|
};
|
|
351
|
+
export {};
|
package/mod_json_type.ps1
CHANGED
|
@@ -17,93 +17,93 @@ $newText = 'export type Database = '
|
|
|
17
17
|
|
|
18
18
|
$updatedContent = $updatedContent -replace $oldText, $newText
|
|
19
19
|
|
|
20
|
-
# Append the new type definition if it doesn't exist
|
|
21
|
-
$addContent = @"
|
|
22
|
-
type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
20
|
+
# # Append the new type definition if it doesn't exist
|
|
21
|
+
# $addContent = @"
|
|
22
|
+
# type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
23
23
|
|
|
24
|
-
export type Tables<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
# export type Tables<
|
|
25
|
+
# PublicTableNameOrOptions extends
|
|
26
|
+
# | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
|
27
|
+
# | { schema: keyof Database },
|
|
28
|
+
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
29
|
+
# ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
30
|
+
# Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
31
|
+
# : never = never,
|
|
32
|
+
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
33
|
+
# ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
34
|
+
# Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
35
|
+
# Row: infer R
|
|
36
|
+
# }
|
|
37
|
+
# ? R
|
|
38
|
+
# : never
|
|
39
|
+
# : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
|
40
|
+
# PublicSchema["Views"])
|
|
41
|
+
# ? (PublicSchema["Tables"] &
|
|
42
|
+
# PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
43
|
+
# Row: infer R
|
|
44
|
+
# }
|
|
45
|
+
# ? R
|
|
46
|
+
# : never
|
|
47
|
+
# : never
|
|
48
48
|
|
|
49
|
-
export type TablesInsert<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
# export type TablesInsert<
|
|
50
|
+
# PublicTableNameOrOptions extends
|
|
51
|
+
# | keyof PublicSchema["Tables"]
|
|
52
|
+
# | { schema: keyof Database },
|
|
53
|
+
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
54
|
+
# ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
55
|
+
# : never = never,
|
|
56
|
+
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
57
|
+
# ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
58
|
+
# Insert: infer I
|
|
59
|
+
# }
|
|
60
|
+
# ? I
|
|
61
|
+
# : never
|
|
62
|
+
# : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
63
|
+
# ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
64
|
+
# Insert: infer I
|
|
65
|
+
# }
|
|
66
|
+
# ? I
|
|
67
|
+
# : never
|
|
68
|
+
# : never
|
|
69
69
|
|
|
70
|
-
export type TablesUpdate<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
70
|
+
# export type TablesUpdate<
|
|
71
|
+
# PublicTableNameOrOptions extends
|
|
72
|
+
# | keyof PublicSchema["Tables"]
|
|
73
|
+
# | { schema: keyof Database },
|
|
74
|
+
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
75
|
+
# ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
76
|
+
# : never = never,
|
|
77
|
+
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
78
|
+
# ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
79
|
+
# Update: infer U
|
|
80
|
+
# }
|
|
81
|
+
# ? U
|
|
82
|
+
# : never
|
|
83
|
+
# : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
84
|
+
# ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
85
|
+
# Update: infer U
|
|
86
|
+
# }
|
|
87
|
+
# ? U
|
|
88
|
+
# : never
|
|
89
|
+
# : never
|
|
90
90
|
|
|
91
|
-
export type Enums<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"@
|
|
91
|
+
# export type Enums<
|
|
92
|
+
# PublicEnumNameOrOptions extends
|
|
93
|
+
# | keyof PublicSchema["Enums"]
|
|
94
|
+
# | { schema: keyof Database },
|
|
95
|
+
# EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
96
|
+
# ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
97
|
+
# : never = never,
|
|
98
|
+
# > = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
99
|
+
# ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
100
|
+
# : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
101
|
+
# ? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
102
|
+
# : never
|
|
103
|
+
# "@
|
|
104
104
|
|
|
105
|
-
# Append the new content to the updated content
|
|
106
|
-
$updatedContent += $addContent
|
|
105
|
+
# # Append the new content to the updated content
|
|
106
|
+
# $updatedContent += $addContent
|
|
107
107
|
|
|
108
108
|
# Write the updated content back to the file
|
|
109
109
|
$updatedContent | Set-Content $filePath
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name":
|
|
3
|
-
"version":
|
|
4
|
-
"private":
|
|
5
|
-
"main":
|
|
6
|
-
"types":
|
|
7
|
-
"dependencies":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"scripts":
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"name": "@periskope/types",
|
|
3
|
+
"version": "0.6.96.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@periskope/whatsapp-web.js": "1.23.1-alpha.exodus.8",
|
|
9
|
+
"@types/pg": "8.11.2",
|
|
10
|
+
"pg": "^8.11.3",
|
|
11
|
+
"stripe": "^14.19.0",
|
|
12
|
+
"ts-node": "^10.9.2",
|
|
13
|
+
"type-fest": "^4.8.3"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"update-package": "tsc \u0026\u0026 npm publish --access public"
|
|
17
|
+
}
|
|
18
18
|
}
|