@periskope/types 0.6.265 → 0.6.266
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 +106 -154
- package/dist/supabase.types.d.ts.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/mod_json_type.ps1 +108 -108
- package/mod_json_type.sh +22 -22
- package/package.json +19 -19
- package/src/index.ts +4 -4
- package/src/object.types.ts +100 -100
- package/src/rules.types.ts +2109 -2109
- package/src/supabase.types.ts +199 -196
- package/src/types.ts +1238 -1237
- package/tsconfig.json +18 -18
- package/tsconfig.tsbuildinfo +1 -0
- package/update_package.ps1 +21 -21
package/dist/supabase.types.d.ts
CHANGED
|
@@ -2,6 +2,31 @@ export type Json = {
|
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
} | any;
|
|
4
4
|
export type Database = {
|
|
5
|
+
graphql_public: {
|
|
6
|
+
Tables: {
|
|
7
|
+
[_ in never]: never;
|
|
8
|
+
};
|
|
9
|
+
Views: {
|
|
10
|
+
[_ in never]: never;
|
|
11
|
+
};
|
|
12
|
+
Functions: {
|
|
13
|
+
graphql: {
|
|
14
|
+
Args: {
|
|
15
|
+
operationName?: string;
|
|
16
|
+
query?: string;
|
|
17
|
+
variables?: Json;
|
|
18
|
+
extensions?: Json;
|
|
19
|
+
};
|
|
20
|
+
Returns: Json;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
Enums: {
|
|
24
|
+
[_ in never]: never;
|
|
25
|
+
};
|
|
26
|
+
CompositeTypes: {
|
|
27
|
+
[_ in never]: never;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
5
30
|
internal: {
|
|
6
31
|
Tables: {
|
|
7
32
|
config: {
|
|
@@ -188,6 +213,45 @@ export type Database = {
|
|
|
188
213
|
};
|
|
189
214
|
public: {
|
|
190
215
|
Tables: {
|
|
216
|
+
tbl_ai_contexts: {
|
|
217
|
+
Row: {
|
|
218
|
+
answer: string;
|
|
219
|
+
attachments: Json | null;
|
|
220
|
+
context_id: string;
|
|
221
|
+
created_at: string | null;
|
|
222
|
+
document_id: string | null;
|
|
223
|
+
embedding: string;
|
|
224
|
+
metadata: Json | null;
|
|
225
|
+
org_id: string;
|
|
226
|
+
question: string;
|
|
227
|
+
type: Database["public"]["Enums"]["enum_ai_context_type"] | null;
|
|
228
|
+
};
|
|
229
|
+
Insert: {
|
|
230
|
+
answer: string;
|
|
231
|
+
attachments?: Json | null;
|
|
232
|
+
context_id?: string;
|
|
233
|
+
created_at?: string | null;
|
|
234
|
+
document_id?: string | null;
|
|
235
|
+
embedding: string;
|
|
236
|
+
metadata?: Json | null;
|
|
237
|
+
org_id: string;
|
|
238
|
+
question: string;
|
|
239
|
+
type?: Database["public"]["Enums"]["enum_ai_context_type"] | null;
|
|
240
|
+
};
|
|
241
|
+
Update: {
|
|
242
|
+
answer?: string;
|
|
243
|
+
attachments?: Json | null;
|
|
244
|
+
context_id?: string;
|
|
245
|
+
created_at?: string | null;
|
|
246
|
+
document_id?: string | null;
|
|
247
|
+
embedding?: string;
|
|
248
|
+
metadata?: Json | null;
|
|
249
|
+
org_id?: string;
|
|
250
|
+
question?: string;
|
|
251
|
+
type?: Database["public"]["Enums"]["enum_ai_context_type"] | null;
|
|
252
|
+
};
|
|
253
|
+
Relationships: [];
|
|
254
|
+
};
|
|
191
255
|
tbl_api_logs: {
|
|
192
256
|
Row: {
|
|
193
257
|
org_id: string;
|
|
@@ -825,6 +889,7 @@ export type Database = {
|
|
|
825
889
|
};
|
|
826
890
|
tbl_chat_properties: {
|
|
827
891
|
Row: {
|
|
892
|
+
ai_metadata: Json | null;
|
|
828
893
|
assigned_to: string | null;
|
|
829
894
|
chat_access: Json | null;
|
|
830
895
|
chat_id: string;
|
|
@@ -845,6 +910,7 @@ export type Database = {
|
|
|
845
910
|
zohodesk_metadata: Json | null;
|
|
846
911
|
};
|
|
847
912
|
Insert: {
|
|
913
|
+
ai_metadata?: Json | null;
|
|
848
914
|
assigned_to?: string | null;
|
|
849
915
|
chat_access?: Json | null;
|
|
850
916
|
chat_id: string;
|
|
@@ -865,6 +931,7 @@ export type Database = {
|
|
|
865
931
|
zohodesk_metadata?: Json | null;
|
|
866
932
|
};
|
|
867
933
|
Update: {
|
|
934
|
+
ai_metadata?: Json | null;
|
|
868
935
|
assigned_to?: string | null;
|
|
869
936
|
chat_access?: Json | null;
|
|
870
937
|
chat_id?: string;
|
|
@@ -1139,7 +1206,7 @@ export type Database = {
|
|
|
1139
1206
|
is_my_contact: boolean | null;
|
|
1140
1207
|
is_user: boolean | null;
|
|
1141
1208
|
is_wa_contact: boolean | null;
|
|
1142
|
-
label_ids: Json;
|
|
1209
|
+
label_ids: Json | null;
|
|
1143
1210
|
name: string | null;
|
|
1144
1211
|
number: string | null;
|
|
1145
1212
|
org_id: string;
|
|
@@ -1168,7 +1235,7 @@ export type Database = {
|
|
|
1168
1235
|
is_my_contact?: boolean | null;
|
|
1169
1236
|
is_user?: boolean | null;
|
|
1170
1237
|
is_wa_contact?: boolean | null;
|
|
1171
|
-
label_ids?: Json;
|
|
1238
|
+
label_ids?: Json | null;
|
|
1172
1239
|
name?: string | null;
|
|
1173
1240
|
number?: string | null;
|
|
1174
1241
|
org_id: string;
|
|
@@ -1197,7 +1264,7 @@ export type Database = {
|
|
|
1197
1264
|
is_my_contact?: boolean | null;
|
|
1198
1265
|
is_user?: boolean | null;
|
|
1199
1266
|
is_wa_contact?: boolean | null;
|
|
1200
|
-
label_ids?: Json;
|
|
1267
|
+
label_ids?: Json | null;
|
|
1201
1268
|
name?: string | null;
|
|
1202
1269
|
number?: string | null;
|
|
1203
1270
|
org_id?: string;
|
|
@@ -1647,6 +1714,13 @@ export type Database = {
|
|
|
1647
1714
|
user_id?: string | null;
|
|
1648
1715
|
};
|
|
1649
1716
|
Relationships: [
|
|
1717
|
+
{
|
|
1718
|
+
foreignKeyName: "tbl_org_members_fkey_auth_users";
|
|
1719
|
+
columns: ["user_id"];
|
|
1720
|
+
isOneToOne: false;
|
|
1721
|
+
referencedRelation: "users";
|
|
1722
|
+
referencedColumns: ["id"];
|
|
1723
|
+
},
|
|
1650
1724
|
{
|
|
1651
1725
|
foreignKeyName: "tbl_org_members_fkey_tbl_org";
|
|
1652
1726
|
columns: ["org_id"];
|
|
@@ -2168,6 +2242,7 @@ export type Database = {
|
|
|
2168
2242
|
view_chats: {
|
|
2169
2243
|
Row: {
|
|
2170
2244
|
add_members_admins_only: boolean | null;
|
|
2245
|
+
ai_metadata: Json | null;
|
|
2171
2246
|
assigned_to: string | null;
|
|
2172
2247
|
chat_access: Json | null;
|
|
2173
2248
|
chat_id: string | null;
|
|
@@ -2528,6 +2603,13 @@ export type Database = {
|
|
|
2528
2603
|
};
|
|
2529
2604
|
Returns: Json;
|
|
2530
2605
|
};
|
|
2606
|
+
get_relevant_context: {
|
|
2607
|
+
Args: {
|
|
2608
|
+
org_id_input: string;
|
|
2609
|
+
query_embedding_input: string;
|
|
2610
|
+
};
|
|
2611
|
+
Returns: Json;
|
|
2612
|
+
};
|
|
2531
2613
|
get_team_metrics_between_dates: {
|
|
2532
2614
|
Args: {
|
|
2533
2615
|
org_id_input: string;
|
|
@@ -2736,6 +2818,7 @@ export type Database = {
|
|
|
2736
2818
|
};
|
|
2737
2819
|
};
|
|
2738
2820
|
Enums: {
|
|
2821
|
+
enum_ai_context_type: "faq" | "document";
|
|
2739
2822
|
enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired";
|
|
2740
2823
|
enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
|
|
2741
2824
|
enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
|
|
@@ -2816,7 +2899,6 @@ export type Database = {
|
|
|
2816
2899
|
created_at: string | null;
|
|
2817
2900
|
id: string;
|
|
2818
2901
|
last_accessed_at: string | null;
|
|
2819
|
-
level: number | null;
|
|
2820
2902
|
metadata: Json | null;
|
|
2821
2903
|
name: string | null;
|
|
2822
2904
|
owner: string | null;
|
|
@@ -2831,7 +2913,6 @@ export type Database = {
|
|
|
2831
2913
|
created_at?: string | null;
|
|
2832
2914
|
id?: string;
|
|
2833
2915
|
last_accessed_at?: string | null;
|
|
2834
|
-
level?: number | null;
|
|
2835
2916
|
metadata?: Json | null;
|
|
2836
2917
|
name?: string | null;
|
|
2837
2918
|
owner?: string | null;
|
|
@@ -2846,7 +2927,6 @@ export type Database = {
|
|
|
2846
2927
|
created_at?: string | null;
|
|
2847
2928
|
id?: string;
|
|
2848
2929
|
last_accessed_at?: string | null;
|
|
2849
|
-
level?: number | null;
|
|
2850
2930
|
metadata?: Json | null;
|
|
2851
2931
|
name?: string | null;
|
|
2852
2932
|
owner?: string | null;
|
|
@@ -2866,38 +2946,6 @@ export type Database = {
|
|
|
2866
2946
|
}
|
|
2867
2947
|
];
|
|
2868
2948
|
};
|
|
2869
|
-
prefixes: {
|
|
2870
|
-
Row: {
|
|
2871
|
-
bucket_id: string;
|
|
2872
|
-
created_at: string | null;
|
|
2873
|
-
level: number;
|
|
2874
|
-
name: string;
|
|
2875
|
-
updated_at: string | null;
|
|
2876
|
-
};
|
|
2877
|
-
Insert: {
|
|
2878
|
-
bucket_id: string;
|
|
2879
|
-
created_at?: string | null;
|
|
2880
|
-
level?: number;
|
|
2881
|
-
name: string;
|
|
2882
|
-
updated_at?: string | null;
|
|
2883
|
-
};
|
|
2884
|
-
Update: {
|
|
2885
|
-
bucket_id?: string;
|
|
2886
|
-
created_at?: string | null;
|
|
2887
|
-
level?: number;
|
|
2888
|
-
name?: string;
|
|
2889
|
-
updated_at?: string | null;
|
|
2890
|
-
};
|
|
2891
|
-
Relationships: [
|
|
2892
|
-
{
|
|
2893
|
-
foreignKeyName: "prefixes_bucketId_fkey";
|
|
2894
|
-
columns: ["bucket_id"];
|
|
2895
|
-
isOneToOne: false;
|
|
2896
|
-
referencedRelation: "buckets";
|
|
2897
|
-
referencedColumns: ["id"];
|
|
2898
|
-
}
|
|
2899
|
-
];
|
|
2900
|
-
};
|
|
2901
2949
|
s3_multipart_uploads: {
|
|
2902
2950
|
Row: {
|
|
2903
2951
|
bucket_id: string;
|
|
@@ -3001,13 +3049,6 @@ export type Database = {
|
|
|
3001
3049
|
[_ in never]: never;
|
|
3002
3050
|
};
|
|
3003
3051
|
Functions: {
|
|
3004
|
-
add_prefixes: {
|
|
3005
|
-
Args: {
|
|
3006
|
-
_bucket_id: string;
|
|
3007
|
-
_name: string;
|
|
3008
|
-
};
|
|
3009
|
-
Returns: undefined;
|
|
3010
|
-
};
|
|
3011
3052
|
can_insert_object: {
|
|
3012
3053
|
Args: {
|
|
3013
3054
|
bucketid: string;
|
|
@@ -3017,13 +3058,6 @@ export type Database = {
|
|
|
3017
3058
|
};
|
|
3018
3059
|
Returns: undefined;
|
|
3019
3060
|
};
|
|
3020
|
-
delete_prefix: {
|
|
3021
|
-
Args: {
|
|
3022
|
-
_bucket_id: string;
|
|
3023
|
-
_name: string;
|
|
3024
|
-
};
|
|
3025
|
-
Returns: boolean;
|
|
3026
|
-
};
|
|
3027
3061
|
extension: {
|
|
3028
3062
|
Args: {
|
|
3029
3063
|
name: string;
|
|
@@ -3042,24 +3076,6 @@ export type Database = {
|
|
|
3042
3076
|
};
|
|
3043
3077
|
Returns: string[];
|
|
3044
3078
|
};
|
|
3045
|
-
get_level: {
|
|
3046
|
-
Args: {
|
|
3047
|
-
name: string;
|
|
3048
|
-
};
|
|
3049
|
-
Returns: number;
|
|
3050
|
-
};
|
|
3051
|
-
get_prefix: {
|
|
3052
|
-
Args: {
|
|
3053
|
-
name: string;
|
|
3054
|
-
};
|
|
3055
|
-
Returns: string;
|
|
3056
|
-
};
|
|
3057
|
-
get_prefixes: {
|
|
3058
|
-
Args: {
|
|
3059
|
-
name: string;
|
|
3060
|
-
};
|
|
3061
|
-
Returns: string[];
|
|
3062
|
-
};
|
|
3063
3079
|
get_size_by_bucket: {
|
|
3064
3080
|
Args: Record<PropertyKey, never>;
|
|
3065
3081
|
Returns: {
|
|
@@ -3122,63 +3138,6 @@ export type Database = {
|
|
|
3122
3138
|
metadata: Json;
|
|
3123
3139
|
}[];
|
|
3124
3140
|
};
|
|
3125
|
-
search_legacy_v1: {
|
|
3126
|
-
Args: {
|
|
3127
|
-
prefix: string;
|
|
3128
|
-
bucketname: string;
|
|
3129
|
-
limits?: number;
|
|
3130
|
-
levels?: number;
|
|
3131
|
-
offsets?: number;
|
|
3132
|
-
search?: string;
|
|
3133
|
-
sortcolumn?: string;
|
|
3134
|
-
sortorder?: string;
|
|
3135
|
-
};
|
|
3136
|
-
Returns: {
|
|
3137
|
-
name: string;
|
|
3138
|
-
id: string;
|
|
3139
|
-
updated_at: string;
|
|
3140
|
-
created_at: string;
|
|
3141
|
-
last_accessed_at: string;
|
|
3142
|
-
metadata: Json;
|
|
3143
|
-
}[];
|
|
3144
|
-
};
|
|
3145
|
-
search_v1_optimised: {
|
|
3146
|
-
Args: {
|
|
3147
|
-
prefix: string;
|
|
3148
|
-
bucketname: string;
|
|
3149
|
-
limits?: number;
|
|
3150
|
-
levels?: number;
|
|
3151
|
-
offsets?: number;
|
|
3152
|
-
search?: string;
|
|
3153
|
-
sortcolumn?: string;
|
|
3154
|
-
sortorder?: string;
|
|
3155
|
-
};
|
|
3156
|
-
Returns: {
|
|
3157
|
-
name: string;
|
|
3158
|
-
id: string;
|
|
3159
|
-
updated_at: string;
|
|
3160
|
-
created_at: string;
|
|
3161
|
-
last_accessed_at: string;
|
|
3162
|
-
metadata: Json;
|
|
3163
|
-
}[];
|
|
3164
|
-
};
|
|
3165
|
-
search_v2: {
|
|
3166
|
-
Args: {
|
|
3167
|
-
prefix: string;
|
|
3168
|
-
bucket_name: string;
|
|
3169
|
-
limits?: number;
|
|
3170
|
-
levels?: number;
|
|
3171
|
-
start_after?: string;
|
|
3172
|
-
};
|
|
3173
|
-
Returns: {
|
|
3174
|
-
key: string;
|
|
3175
|
-
name: string;
|
|
3176
|
-
id: string;
|
|
3177
|
-
updated_at: string;
|
|
3178
|
-
created_at: string;
|
|
3179
|
-
metadata: Json;
|
|
3180
|
-
}[];
|
|
3181
|
-
};
|
|
3182
3141
|
};
|
|
3183
3142
|
Enums: {
|
|
3184
3143
|
[_ in never]: never;
|
|
@@ -3188,54 +3147,47 @@ export type Database = {
|
|
|
3188
3147
|
};
|
|
3189
3148
|
};
|
|
3190
3149
|
};
|
|
3191
|
-
type
|
|
3192
|
-
export type Tables<
|
|
3150
|
+
type PublicSchema = Database[Extract<keyof Database, "public">];
|
|
3151
|
+
export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
|
|
3193
3152
|
schema: keyof Database;
|
|
3194
|
-
}, TableName extends
|
|
3153
|
+
}, TableName extends PublicTableNameOrOptions extends {
|
|
3195
3154
|
schema: keyof Database;
|
|
3196
|
-
} ? keyof (Database[
|
|
3155
|
+
} ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"]) : never = never> = PublicTableNameOrOptions extends {
|
|
3197
3156
|
schema: keyof Database;
|
|
3198
|
-
} ? (Database[
|
|
3157
|
+
} ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
3199
3158
|
Row: infer R;
|
|
3200
|
-
} ? R : never :
|
|
3159
|
+
} ? R : never : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) ? (PublicSchema["Tables"] & PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
3201
3160
|
Row: infer R;
|
|
3202
3161
|
} ? R : never : never;
|
|
3203
|
-
export type TablesInsert<
|
|
3162
|
+
export type TablesInsert<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
|
|
3204
3163
|
schema: keyof Database;
|
|
3205
|
-
}, TableName extends
|
|
3164
|
+
}, TableName extends PublicTableNameOrOptions extends {
|
|
3206
3165
|
schema: keyof Database;
|
|
3207
|
-
} ? keyof Database[
|
|
3166
|
+
} ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] : never = never> = PublicTableNameOrOptions extends {
|
|
3208
3167
|
schema: keyof Database;
|
|
3209
|
-
} ? Database[
|
|
3168
|
+
} ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
3210
3169
|
Insert: infer I;
|
|
3211
|
-
} ? I : never :
|
|
3170
|
+
} ? I : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
3212
3171
|
Insert: infer I;
|
|
3213
3172
|
} ? I : never : never;
|
|
3214
|
-
export type TablesUpdate<
|
|
3173
|
+
export type TablesUpdate<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
|
|
3215
3174
|
schema: keyof Database;
|
|
3216
|
-
}, TableName extends
|
|
3175
|
+
}, TableName extends PublicTableNameOrOptions extends {
|
|
3217
3176
|
schema: keyof Database;
|
|
3218
|
-
} ? keyof Database[
|
|
3177
|
+
} ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] : never = never> = PublicTableNameOrOptions extends {
|
|
3219
3178
|
schema: keyof Database;
|
|
3220
|
-
} ? Database[
|
|
3179
|
+
} ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
3221
3180
|
Update: infer U;
|
|
3222
|
-
} ? U : never :
|
|
3181
|
+
} ? U : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
3223
3182
|
Update: infer U;
|
|
3224
3183
|
} ? U : never : never;
|
|
3225
|
-
export type Enums<
|
|
3226
|
-
schema: keyof Database;
|
|
3227
|
-
}, EnumName extends DefaultSchemaEnumNameOrOptions extends {
|
|
3228
|
-
schema: keyof Database;
|
|
3229
|
-
} ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
|
|
3230
|
-
schema: keyof Database;
|
|
3231
|
-
} ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
|
|
3232
|
-
export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
|
|
3184
|
+
export type Enums<PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] | {
|
|
3233
3185
|
schema: keyof Database;
|
|
3234
|
-
},
|
|
3186
|
+
}, EnumName extends PublicEnumNameOrOptions extends {
|
|
3235
3187
|
schema: keyof Database;
|
|
3236
|
-
} ? keyof Database[
|
|
3188
|
+
} ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] : never = never> = PublicEnumNameOrOptions extends {
|
|
3237
3189
|
schema: keyof Database;
|
|
3238
|
-
} ? Database[
|
|
3190
|
+
} ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never;
|
|
3239
3191
|
export declare const Constants: {
|
|
3240
3192
|
readonly internal: {
|
|
3241
3193
|
readonly Enums: {};
|