@erxes/core-contract 0.1.0-v2.3 → 0.1.0-v2.5
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/automations.d.ts +5 -7
- package/dist/automations.js +6 -4
- package/dist/client.d.ts +600 -10
- package/dist/client.js +16 -1
- package/dist/contract/routes.json.js +16 -0
- package/dist/emails.d.ts +105 -0
- package/dist/emails.js +25 -0
- package/dist/errors.d.ts +3 -0
- package/dist/errors.js +1 -0
- package/dist/index.d.ts +291 -9
- package/dist/index.js +4 -2
- package/dist/plugins.d.ts +82 -1
- package/dist/plugins.js +14 -3
- package/dist/roles.d.ts +136 -0
- package/dist/roles.js +22 -1
- package/package.json +2 -1
package/dist/client.d.ts
CHANGED
|
@@ -3038,10 +3038,8 @@ export declare const orpc: {
|
|
|
3038
3038
|
}>;
|
|
3039
3039
|
test: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
3040
3040
|
id: string;
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
id: string;
|
|
3044
|
-
} | undefined;
|
|
3041
|
+
subjectType?: "company" | "customer" | undefined;
|
|
3042
|
+
subjectId?: string | undefined;
|
|
3045
3043
|
payload?: Record<string, unknown> | undefined;
|
|
3046
3044
|
assumeEventHappens?: boolean | undefined;
|
|
3047
3045
|
}, {
|
|
@@ -3182,10 +3180,8 @@ export declare const orpc: {
|
|
|
3182
3180
|
};
|
|
3183
3181
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
3184
3182
|
id: string;
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
id: string;
|
|
3188
|
-
} | undefined;
|
|
3183
|
+
subjectType?: "company" | "customer" | undefined;
|
|
3184
|
+
subjectId?: string | undefined;
|
|
3189
3185
|
payload?: Record<string, unknown> | undefined;
|
|
3190
3186
|
assumeEventHappens?: boolean | undefined;
|
|
3191
3187
|
}>;
|
|
@@ -13920,6 +13916,107 @@ export declare const orpc: {
|
|
|
13920
13916
|
refreshToken: string;
|
|
13921
13917
|
}>;
|
|
13922
13918
|
} & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
13919
|
+
emails: {
|
|
13920
|
+
send: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
13921
|
+
to: string[];
|
|
13922
|
+
subject: string;
|
|
13923
|
+
body: string;
|
|
13924
|
+
replyTo?: string | undefined;
|
|
13925
|
+
button?: {
|
|
13926
|
+
label: string;
|
|
13927
|
+
link: string;
|
|
13928
|
+
} | undefined;
|
|
13929
|
+
}, {
|
|
13930
|
+
queued: number;
|
|
13931
|
+
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
13932
|
+
UNAUTHORIZED: {
|
|
13933
|
+
status: number;
|
|
13934
|
+
};
|
|
13935
|
+
NOT_ALLOWED: {
|
|
13936
|
+
status: number;
|
|
13937
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
13938
|
+
permission: import("zod").ZodString;
|
|
13939
|
+
}, import("zod/v4/core").$strip>>;
|
|
13940
|
+
};
|
|
13941
|
+
PLUGIN_ONLY: {
|
|
13942
|
+
status: number;
|
|
13943
|
+
};
|
|
13944
|
+
MEMBERS_ONLY: {
|
|
13945
|
+
status: number;
|
|
13946
|
+
};
|
|
13947
|
+
ORG_REQUIRED: {
|
|
13948
|
+
status: number;
|
|
13949
|
+
};
|
|
13950
|
+
SCOPE_REQUIRED: {
|
|
13951
|
+
status: number;
|
|
13952
|
+
};
|
|
13953
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
13954
|
+
status: number;
|
|
13955
|
+
};
|
|
13956
|
+
ORGANIZATION_DISABLED: {
|
|
13957
|
+
status: number;
|
|
13958
|
+
data: import("zod").ZodObject<{
|
|
13959
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
13960
|
+
}, import("zod/v4/core").$strip>;
|
|
13961
|
+
};
|
|
13962
|
+
NOT_IN_PLAN: {
|
|
13963
|
+
status: number;
|
|
13964
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
13965
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
13966
|
+
}, import("zod/v4/core").$strip>>;
|
|
13967
|
+
};
|
|
13968
|
+
READ_ONLY: {
|
|
13969
|
+
status: number;
|
|
13970
|
+
};
|
|
13971
|
+
TOO_MANY_REQUESTS: {
|
|
13972
|
+
status: number;
|
|
13973
|
+
};
|
|
13974
|
+
INVALID_INPUT: {
|
|
13975
|
+
status: number;
|
|
13976
|
+
data: import("zod").ZodObject<{
|
|
13977
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
13978
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
|
|
13979
|
+
message: import("zod").ZodString;
|
|
13980
|
+
}, import("zod/v4/core").$strip>>;
|
|
13981
|
+
}, import("zod/v4/core").$strip>;
|
|
13982
|
+
};
|
|
13983
|
+
NOT_FOUND: {
|
|
13984
|
+
status: number;
|
|
13985
|
+
};
|
|
13986
|
+
TAKEN: {
|
|
13987
|
+
status: number;
|
|
13988
|
+
data: import("zod").ZodObject<{
|
|
13989
|
+
field: import("zod").ZodString;
|
|
13990
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13991
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
13992
|
+
}, import("zod/v4/core").$strip>;
|
|
13993
|
+
};
|
|
13994
|
+
INVALID_CURSOR: {
|
|
13995
|
+
status: number;
|
|
13996
|
+
};
|
|
13997
|
+
INVALID_REFERENCE: {
|
|
13998
|
+
status: number;
|
|
13999
|
+
data: import("zod").ZodObject<{
|
|
14000
|
+
field: import("zod").ZodString;
|
|
14001
|
+
}, import("zod/v4/core").$strip>;
|
|
14002
|
+
};
|
|
14003
|
+
INVALID_FILTER: {
|
|
14004
|
+
status: number;
|
|
14005
|
+
};
|
|
14006
|
+
FILTER_TOO_SLOW: {
|
|
14007
|
+
status: number;
|
|
14008
|
+
};
|
|
14009
|
+
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
14010
|
+
to: string[];
|
|
14011
|
+
subject: string;
|
|
14012
|
+
body: string;
|
|
14013
|
+
replyTo?: string | undefined;
|
|
14014
|
+
button?: {
|
|
14015
|
+
label: string;
|
|
14016
|
+
link: string;
|
|
14017
|
+
} | undefined;
|
|
14018
|
+
}>;
|
|
14019
|
+
} & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
13923
14020
|
events: {
|
|
13924
14021
|
publish: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
13925
14022
|
events: {
|
|
@@ -21683,6 +21780,9 @@ export declare const orpc: {
|
|
|
21683
21780
|
CROSS_SITE: {
|
|
21684
21781
|
status: number;
|
|
21685
21782
|
};
|
|
21783
|
+
DUPLICATE_PERMISSION_SET: {
|
|
21784
|
+
status: number;
|
|
21785
|
+
};
|
|
21686
21786
|
INVALID_CLIENT: {
|
|
21687
21787
|
status: number;
|
|
21688
21788
|
};
|
|
@@ -21698,6 +21798,12 @@ export declare const orpc: {
|
|
|
21698
21798
|
PLUGIN_NOT_FOUND: {
|
|
21699
21799
|
status: number;
|
|
21700
21800
|
};
|
|
21801
|
+
UNKNOWN_PERMISSION: {
|
|
21802
|
+
status: number;
|
|
21803
|
+
data: import("zod").ZodObject<{
|
|
21804
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
21805
|
+
}, import("zod/v4/core").$strip>;
|
|
21806
|
+
};
|
|
21701
21807
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
21702
21808
|
grant_type: "client_credentials";
|
|
21703
21809
|
client_id: string;
|
|
@@ -21722,13 +21828,19 @@ export declare const orpc: {
|
|
|
21722
21828
|
customerApp?: {
|
|
21723
21829
|
origins: string[];
|
|
21724
21830
|
} | undefined;
|
|
21725
|
-
scopes?: ("activities:write" | "audit:write" | "customers:read" | "customers:write" | "events:read" | "events:write" | "files:read" | "files:write" | "live:write" | "notifications:write" | "payments:read" | "payments:write" | "products:read" | "products:write")[] | undefined;
|
|
21831
|
+
scopes?: ("activities:write" | "audit:write" | "customers:read" | "customers:write" | "emails:write" | "events:read" | "events:write" | "files:read" | "files:write" | "live:write" | "notifications:write" | "payments:read" | "payments:write" | "products:read" | "products:write" | "users:read")[] | undefined;
|
|
21726
21832
|
permissions?: {
|
|
21727
21833
|
action: string;
|
|
21728
21834
|
label: string;
|
|
21729
21835
|
description?: string | undefined;
|
|
21730
21836
|
group?: string | undefined;
|
|
21731
21837
|
}[] | undefined;
|
|
21838
|
+
permissionSets?: {
|
|
21839
|
+
key: string;
|
|
21840
|
+
label: string;
|
|
21841
|
+
description?: string | undefined;
|
|
21842
|
+
permissions: string[];
|
|
21843
|
+
}[] | undefined;
|
|
21732
21844
|
notificationKinds?: {
|
|
21733
21845
|
kind: string;
|
|
21734
21846
|
label: string;
|
|
@@ -21854,6 +21966,9 @@ export declare const orpc: {
|
|
|
21854
21966
|
CROSS_SITE: {
|
|
21855
21967
|
status: number;
|
|
21856
21968
|
};
|
|
21969
|
+
DUPLICATE_PERMISSION_SET: {
|
|
21970
|
+
status: number;
|
|
21971
|
+
};
|
|
21857
21972
|
INVALID_CLIENT: {
|
|
21858
21973
|
status: number;
|
|
21859
21974
|
};
|
|
@@ -21869,6 +21984,12 @@ export declare const orpc: {
|
|
|
21869
21984
|
PLUGIN_NOT_FOUND: {
|
|
21870
21985
|
status: number;
|
|
21871
21986
|
};
|
|
21987
|
+
UNKNOWN_PERMISSION: {
|
|
21988
|
+
status: number;
|
|
21989
|
+
data: import("zod").ZodObject<{
|
|
21990
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
21991
|
+
}, import("zod/v4/core").$strip>;
|
|
21992
|
+
};
|
|
21872
21993
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
21873
21994
|
title: string;
|
|
21874
21995
|
version: string;
|
|
@@ -21887,13 +22008,19 @@ export declare const orpc: {
|
|
|
21887
22008
|
customerApp?: {
|
|
21888
22009
|
origins: string[];
|
|
21889
22010
|
} | undefined;
|
|
21890
|
-
scopes?: ("activities:write" | "audit:write" | "customers:read" | "customers:write" | "events:read" | "events:write" | "files:read" | "files:write" | "live:write" | "notifications:write" | "payments:read" | "payments:write" | "products:read" | "products:write")[] | undefined;
|
|
22011
|
+
scopes?: ("activities:write" | "audit:write" | "customers:read" | "customers:write" | "emails:write" | "events:read" | "events:write" | "files:read" | "files:write" | "live:write" | "notifications:write" | "payments:read" | "payments:write" | "products:read" | "products:write" | "users:read")[] | undefined;
|
|
21891
22012
|
permissions?: {
|
|
21892
22013
|
action: string;
|
|
21893
22014
|
label: string;
|
|
21894
22015
|
description?: string | undefined;
|
|
21895
22016
|
group?: string | undefined;
|
|
21896
22017
|
}[] | undefined;
|
|
22018
|
+
permissionSets?: {
|
|
22019
|
+
key: string;
|
|
22020
|
+
label: string;
|
|
22021
|
+
description?: string | undefined;
|
|
22022
|
+
permissions: string[];
|
|
22023
|
+
}[] | undefined;
|
|
21897
22024
|
notificationKinds?: {
|
|
21898
22025
|
kind: string;
|
|
21899
22026
|
label: string;
|
|
@@ -22043,6 +22170,9 @@ export declare const orpc: {
|
|
|
22043
22170
|
CROSS_SITE: {
|
|
22044
22171
|
status: number;
|
|
22045
22172
|
};
|
|
22173
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22174
|
+
status: number;
|
|
22175
|
+
};
|
|
22046
22176
|
INVALID_CLIENT: {
|
|
22047
22177
|
status: number;
|
|
22048
22178
|
};
|
|
@@ -22058,6 +22188,12 @@ export declare const orpc: {
|
|
|
22058
22188
|
PLUGIN_NOT_FOUND: {
|
|
22059
22189
|
status: number;
|
|
22060
22190
|
};
|
|
22191
|
+
UNKNOWN_PERMISSION: {
|
|
22192
|
+
status: number;
|
|
22193
|
+
data: import("zod").ZodObject<{
|
|
22194
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22195
|
+
}, import("zod/v4/core").$strip>;
|
|
22196
|
+
};
|
|
22061
22197
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
22062
22198
|
install: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
22063
22199
|
name: string;
|
|
@@ -22165,6 +22301,9 @@ export declare const orpc: {
|
|
|
22165
22301
|
CROSS_SITE: {
|
|
22166
22302
|
status: number;
|
|
22167
22303
|
};
|
|
22304
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22305
|
+
status: number;
|
|
22306
|
+
};
|
|
22168
22307
|
INVALID_CLIENT: {
|
|
22169
22308
|
status: number;
|
|
22170
22309
|
};
|
|
@@ -22180,6 +22319,12 @@ export declare const orpc: {
|
|
|
22180
22319
|
PLUGIN_NOT_FOUND: {
|
|
22181
22320
|
status: number;
|
|
22182
22321
|
};
|
|
22322
|
+
UNKNOWN_PERMISSION: {
|
|
22323
|
+
status: number;
|
|
22324
|
+
data: import("zod").ZodObject<{
|
|
22325
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22326
|
+
}, import("zod/v4/core").$strip>;
|
|
22327
|
+
};
|
|
22183
22328
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
22184
22329
|
name: string;
|
|
22185
22330
|
}>;
|
|
@@ -22289,6 +22434,9 @@ export declare const orpc: {
|
|
|
22289
22434
|
CROSS_SITE: {
|
|
22290
22435
|
status: number;
|
|
22291
22436
|
};
|
|
22437
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22438
|
+
status: number;
|
|
22439
|
+
};
|
|
22292
22440
|
INVALID_CLIENT: {
|
|
22293
22441
|
status: number;
|
|
22294
22442
|
};
|
|
@@ -22304,6 +22452,12 @@ export declare const orpc: {
|
|
|
22304
22452
|
PLUGIN_NOT_FOUND: {
|
|
22305
22453
|
status: number;
|
|
22306
22454
|
};
|
|
22455
|
+
UNKNOWN_PERMISSION: {
|
|
22456
|
+
status: number;
|
|
22457
|
+
data: import("zod").ZodObject<{
|
|
22458
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22459
|
+
}, import("zod/v4/core").$strip>;
|
|
22460
|
+
};
|
|
22307
22461
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
22308
22462
|
name: string;
|
|
22309
22463
|
}>;
|
|
@@ -22394,6 +22548,9 @@ export declare const orpc: {
|
|
|
22394
22548
|
CROSS_SITE: {
|
|
22395
22549
|
status: number;
|
|
22396
22550
|
};
|
|
22551
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22552
|
+
status: number;
|
|
22553
|
+
};
|
|
22397
22554
|
INVALID_CLIENT: {
|
|
22398
22555
|
status: number;
|
|
22399
22556
|
};
|
|
@@ -22409,6 +22566,12 @@ export declare const orpc: {
|
|
|
22409
22566
|
PLUGIN_NOT_FOUND: {
|
|
22410
22567
|
status: number;
|
|
22411
22568
|
};
|
|
22569
|
+
UNKNOWN_PERMISSION: {
|
|
22570
|
+
status: number;
|
|
22571
|
+
data: import("zod").ZodObject<{
|
|
22572
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22573
|
+
}, import("zod/v4/core").$strip>;
|
|
22574
|
+
};
|
|
22412
22575
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
22413
22576
|
name: string;
|
|
22414
22577
|
}>;
|
|
@@ -22498,6 +22661,9 @@ export declare const orpc: {
|
|
|
22498
22661
|
CROSS_SITE: {
|
|
22499
22662
|
status: number;
|
|
22500
22663
|
};
|
|
22664
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22665
|
+
status: number;
|
|
22666
|
+
};
|
|
22501
22667
|
INVALID_CLIENT: {
|
|
22502
22668
|
status: number;
|
|
22503
22669
|
};
|
|
@@ -22513,6 +22679,12 @@ export declare const orpc: {
|
|
|
22513
22679
|
PLUGIN_NOT_FOUND: {
|
|
22514
22680
|
status: number;
|
|
22515
22681
|
};
|
|
22682
|
+
UNKNOWN_PERMISSION: {
|
|
22683
|
+
status: number;
|
|
22684
|
+
data: import("zod").ZodObject<{
|
|
22685
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22686
|
+
}, import("zod/v4/core").$strip>;
|
|
22687
|
+
};
|
|
22516
22688
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<{
|
|
22517
22689
|
topics: string[];
|
|
22518
22690
|
userIds?: string[] | undefined;
|
|
@@ -24489,6 +24661,126 @@ export declare const orpc: {
|
|
|
24489
24661
|
}, import("zod/v4/core").$strip>;
|
|
24490
24662
|
};
|
|
24491
24663
|
}>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
24664
|
+
permissionSets: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
|
|
24665
|
+
data: {
|
|
24666
|
+
source: string;
|
|
24667
|
+
key: string;
|
|
24668
|
+
label: string;
|
|
24669
|
+
description: string | null;
|
|
24670
|
+
permissions: string[];
|
|
24671
|
+
}[];
|
|
24672
|
+
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
24673
|
+
UNAUTHORIZED: {
|
|
24674
|
+
status: number;
|
|
24675
|
+
};
|
|
24676
|
+
NOT_ALLOWED: {
|
|
24677
|
+
status: number;
|
|
24678
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
24679
|
+
permission: import("zod").ZodString;
|
|
24680
|
+
}, import("zod/v4/core").$strip>>;
|
|
24681
|
+
};
|
|
24682
|
+
PLUGIN_ONLY: {
|
|
24683
|
+
status: number;
|
|
24684
|
+
};
|
|
24685
|
+
MEMBERS_ONLY: {
|
|
24686
|
+
status: number;
|
|
24687
|
+
};
|
|
24688
|
+
ORG_REQUIRED: {
|
|
24689
|
+
status: number;
|
|
24690
|
+
};
|
|
24691
|
+
SCOPE_REQUIRED: {
|
|
24692
|
+
status: number;
|
|
24693
|
+
};
|
|
24694
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
24695
|
+
status: number;
|
|
24696
|
+
};
|
|
24697
|
+
ORGANIZATION_DISABLED: {
|
|
24698
|
+
status: number;
|
|
24699
|
+
data: import("zod").ZodObject<{
|
|
24700
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
24701
|
+
}, import("zod/v4/core").$strip>;
|
|
24702
|
+
};
|
|
24703
|
+
NOT_IN_PLAN: {
|
|
24704
|
+
status: number;
|
|
24705
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
24706
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
24707
|
+
}, import("zod/v4/core").$strip>>;
|
|
24708
|
+
};
|
|
24709
|
+
READ_ONLY: {
|
|
24710
|
+
status: number;
|
|
24711
|
+
};
|
|
24712
|
+
TOO_MANY_REQUESTS: {
|
|
24713
|
+
status: number;
|
|
24714
|
+
};
|
|
24715
|
+
INVALID_INPUT: {
|
|
24716
|
+
status: number;
|
|
24717
|
+
data: import("zod").ZodObject<{
|
|
24718
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
24719
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
|
|
24720
|
+
message: import("zod").ZodString;
|
|
24721
|
+
}, import("zod/v4/core").$strip>>;
|
|
24722
|
+
}, import("zod/v4/core").$strip>;
|
|
24723
|
+
};
|
|
24724
|
+
NOT_FOUND: {
|
|
24725
|
+
status: number;
|
|
24726
|
+
};
|
|
24727
|
+
TAKEN: {
|
|
24728
|
+
status: number;
|
|
24729
|
+
data: import("zod").ZodObject<{
|
|
24730
|
+
field: import("zod").ZodString;
|
|
24731
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24732
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
24733
|
+
}, import("zod/v4/core").$strip>;
|
|
24734
|
+
};
|
|
24735
|
+
INVALID_CURSOR: {
|
|
24736
|
+
status: number;
|
|
24737
|
+
};
|
|
24738
|
+
INVALID_REFERENCE: {
|
|
24739
|
+
status: number;
|
|
24740
|
+
data: import("zod").ZodObject<{
|
|
24741
|
+
field: import("zod").ZodString;
|
|
24742
|
+
}, import("zod/v4/core").$strip>;
|
|
24743
|
+
};
|
|
24744
|
+
INVALID_FILTER: {
|
|
24745
|
+
status: number;
|
|
24746
|
+
};
|
|
24747
|
+
FILTER_TOO_SLOW: {
|
|
24748
|
+
status: number;
|
|
24749
|
+
};
|
|
24750
|
+
BEYOND_OWN_PERMISSIONS: {
|
|
24751
|
+
status: number;
|
|
24752
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
24753
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
24754
|
+
}, import("zod/v4/core").$strip>>;
|
|
24755
|
+
};
|
|
24756
|
+
BUILTIN_ROLE: {
|
|
24757
|
+
status: number;
|
|
24758
|
+
};
|
|
24759
|
+
FIXED_ROLE: {
|
|
24760
|
+
status: number;
|
|
24761
|
+
};
|
|
24762
|
+
LIMIT_EXCEEDED: {
|
|
24763
|
+
status: number;
|
|
24764
|
+
};
|
|
24765
|
+
OWNER_ONLY_PERMISSION: {
|
|
24766
|
+
status: number;
|
|
24767
|
+
data: import("zod").ZodObject<{
|
|
24768
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
24769
|
+
}, import("zod/v4/core").$strip>;
|
|
24770
|
+
};
|
|
24771
|
+
ROLE_IN_USE: {
|
|
24772
|
+
status: number;
|
|
24773
|
+
};
|
|
24774
|
+
ROLE_NOT_FOUND: {
|
|
24775
|
+
status: number;
|
|
24776
|
+
};
|
|
24777
|
+
UNKNOWN_PERMISSION: {
|
|
24778
|
+
status: number;
|
|
24779
|
+
data: import("zod").ZodObject<{
|
|
24780
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
24781
|
+
}, import("zod/v4/core").$strip>;
|
|
24782
|
+
};
|
|
24783
|
+
}>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
|
|
24492
24784
|
create: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
|
|
24493
24785
|
name: string;
|
|
24494
24786
|
description?: string | null | undefined;
|
|
@@ -30689,6 +30981,304 @@ export declare const memberQueries: {
|
|
|
30689
30981
|
};
|
|
30690
30982
|
}>>>, "input" | "staleTime">>;
|
|
30691
30983
|
};
|
|
30984
|
+
/**
|
|
30985
|
+
* Where erxes-ui's `ContactLink` reads a customer or company:
|
|
30986
|
+
* `<ContactLink contentType="core:customer" contentId={id} contacts={contactQueries} />`.
|
|
30987
|
+
* It is the query web's panel reads, so a name edited there shows in every link.
|
|
30988
|
+
*/
|
|
30989
|
+
export declare const contactQueries: {
|
|
30990
|
+
customer: (id: string) => NoInfer<{
|
|
30991
|
+
input: {
|
|
30992
|
+
id: string;
|
|
30993
|
+
};
|
|
30994
|
+
staleTime: number;
|
|
30995
|
+
} & Omit<import("@orpc/tanstack-query").QueryOptionsBase<{
|
|
30996
|
+
id: string;
|
|
30997
|
+
state: "customer" | "lead";
|
|
30998
|
+
firstName: string | null;
|
|
30999
|
+
middleName: string | null;
|
|
31000
|
+
lastName: string | null;
|
|
31001
|
+
avatarUrl: string | null;
|
|
31002
|
+
primaryEmail: string | null;
|
|
31003
|
+
emails: string[];
|
|
31004
|
+
primaryPhone: string | null;
|
|
31005
|
+
phones: string[];
|
|
31006
|
+
sex: 0 | 1 | 2 | 9 | null;
|
|
31007
|
+
birthDate: string | null;
|
|
31008
|
+
position: string | null;
|
|
31009
|
+
department: string | null;
|
|
31010
|
+
code: string | null;
|
|
31011
|
+
description: string | null;
|
|
31012
|
+
ownerId: string | null;
|
|
31013
|
+
leadStageId: string | null;
|
|
31014
|
+
leadStageChangedAt: string | null;
|
|
31015
|
+
disqualifyReason: string | null;
|
|
31016
|
+
source: string | null;
|
|
31017
|
+
sourceDetails: Record<string, string>;
|
|
31018
|
+
convertedAt: string | null;
|
|
31019
|
+
lastActivityAt: string;
|
|
31020
|
+
createdAt: string;
|
|
31021
|
+
updatedAt: string;
|
|
31022
|
+
tagIds: string[];
|
|
31023
|
+
customFields: Record<string, string | number | boolean | string[]>;
|
|
31024
|
+
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
31025
|
+
UNAUTHORIZED: {
|
|
31026
|
+
status: number;
|
|
31027
|
+
};
|
|
31028
|
+
NOT_ALLOWED: {
|
|
31029
|
+
status: number;
|
|
31030
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
31031
|
+
permission: import("zod").ZodString;
|
|
31032
|
+
}, import("zod/v4/core").$strip>>;
|
|
31033
|
+
};
|
|
31034
|
+
PLUGIN_ONLY: {
|
|
31035
|
+
status: number;
|
|
31036
|
+
};
|
|
31037
|
+
MEMBERS_ONLY: {
|
|
31038
|
+
status: number;
|
|
31039
|
+
};
|
|
31040
|
+
ORG_REQUIRED: {
|
|
31041
|
+
status: number;
|
|
31042
|
+
};
|
|
31043
|
+
SCOPE_REQUIRED: {
|
|
31044
|
+
status: number;
|
|
31045
|
+
};
|
|
31046
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
31047
|
+
status: number;
|
|
31048
|
+
};
|
|
31049
|
+
ORGANIZATION_DISABLED: {
|
|
31050
|
+
status: number;
|
|
31051
|
+
data: import("zod").ZodObject<{
|
|
31052
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
31053
|
+
}, import("zod/v4/core").$strip>;
|
|
31054
|
+
};
|
|
31055
|
+
NOT_IN_PLAN: {
|
|
31056
|
+
status: number;
|
|
31057
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
31058
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
31059
|
+
}, import("zod/v4/core").$strip>>;
|
|
31060
|
+
};
|
|
31061
|
+
READ_ONLY: {
|
|
31062
|
+
status: number;
|
|
31063
|
+
};
|
|
31064
|
+
TOO_MANY_REQUESTS: {
|
|
31065
|
+
status: number;
|
|
31066
|
+
};
|
|
31067
|
+
INVALID_INPUT: {
|
|
31068
|
+
status: number;
|
|
31069
|
+
data: import("zod").ZodObject<{
|
|
31070
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
31071
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
|
|
31072
|
+
message: import("zod").ZodString;
|
|
31073
|
+
}, import("zod/v4/core").$strip>>;
|
|
31074
|
+
}, import("zod/v4/core").$strip>;
|
|
31075
|
+
};
|
|
31076
|
+
NOT_FOUND: {
|
|
31077
|
+
status: number;
|
|
31078
|
+
};
|
|
31079
|
+
TAKEN: {
|
|
31080
|
+
status: number;
|
|
31081
|
+
data: import("zod").ZodObject<{
|
|
31082
|
+
field: import("zod").ZodString;
|
|
31083
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31084
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
31085
|
+
}, import("zod/v4/core").$strip>;
|
|
31086
|
+
};
|
|
31087
|
+
INVALID_CURSOR: {
|
|
31088
|
+
status: number;
|
|
31089
|
+
};
|
|
31090
|
+
INVALID_REFERENCE: {
|
|
31091
|
+
status: number;
|
|
31092
|
+
data: import("zod").ZodObject<{
|
|
31093
|
+
field: import("zod").ZodString;
|
|
31094
|
+
}, import("zod/v4/core").$strip>;
|
|
31095
|
+
};
|
|
31096
|
+
INVALID_FILTER: {
|
|
31097
|
+
status: number;
|
|
31098
|
+
};
|
|
31099
|
+
FILTER_TOO_SLOW: {
|
|
31100
|
+
status: number;
|
|
31101
|
+
};
|
|
31102
|
+
INVALID_ACTOR: {
|
|
31103
|
+
status: number;
|
|
31104
|
+
};
|
|
31105
|
+
INVALID_FIELD: {
|
|
31106
|
+
status: number;
|
|
31107
|
+
data: import("zod").ZodObject<{
|
|
31108
|
+
fieldId: import("zod").ZodString;
|
|
31109
|
+
}, import("zod/v4/core").$strip>;
|
|
31110
|
+
};
|
|
31111
|
+
INVALID_FIELD_VALUE: {
|
|
31112
|
+
status: number;
|
|
31113
|
+
data: import("zod").ZodObject<{
|
|
31114
|
+
fieldId: import("zod").ZodString;
|
|
31115
|
+
}, import("zod/v4/core").$strip>;
|
|
31116
|
+
};
|
|
31117
|
+
INVALID_OWNER: {
|
|
31118
|
+
status: number;
|
|
31119
|
+
};
|
|
31120
|
+
INVALID_TAG: {
|
|
31121
|
+
status: number;
|
|
31122
|
+
};
|
|
31123
|
+
INVALID_TYPE: {
|
|
31124
|
+
status: number;
|
|
31125
|
+
};
|
|
31126
|
+
MASS_DELETE_STOPPED: {
|
|
31127
|
+
status: number;
|
|
31128
|
+
};
|
|
31129
|
+
NOT_A_LEAD: {
|
|
31130
|
+
status: number;
|
|
31131
|
+
};
|
|
31132
|
+
TAG_LIMIT: {
|
|
31133
|
+
status: number;
|
|
31134
|
+
};
|
|
31135
|
+
}>>>, "input" | "staleTime">>;
|
|
31136
|
+
company: (id: string) => NoInfer<{
|
|
31137
|
+
input: {
|
|
31138
|
+
id: string;
|
|
31139
|
+
};
|
|
31140
|
+
staleTime: number;
|
|
31141
|
+
} & Omit<import("@orpc/tanstack-query").QueryOptionsBase<{
|
|
31142
|
+
id: string;
|
|
31143
|
+
primaryName: string;
|
|
31144
|
+
state: "customer" | "lead";
|
|
31145
|
+
names: string[];
|
|
31146
|
+
avatarUrl: string | null;
|
|
31147
|
+
primaryEmail: string | null;
|
|
31148
|
+
emails: string[];
|
|
31149
|
+
primaryPhone: string | null;
|
|
31150
|
+
phones: string[];
|
|
31151
|
+
website: string | null;
|
|
31152
|
+
industry: string | null;
|
|
31153
|
+
size: number | null;
|
|
31154
|
+
businessType: string | null;
|
|
31155
|
+
code: string | null;
|
|
31156
|
+
description: string | null;
|
|
31157
|
+
ownerId: string | null;
|
|
31158
|
+
leadStageId: string | null;
|
|
31159
|
+
leadStageChangedAt: string | null;
|
|
31160
|
+
disqualifyReason: string | null;
|
|
31161
|
+
source: string | null;
|
|
31162
|
+
sourceDetails: Record<string, string>;
|
|
31163
|
+
convertedAt: string | null;
|
|
31164
|
+
lastActivityAt: string;
|
|
31165
|
+
createdAt: string;
|
|
31166
|
+
updatedAt: string;
|
|
31167
|
+
tagIds: string[];
|
|
31168
|
+
customFields: Record<string, string | number | boolean | string[]>;
|
|
31169
|
+
}, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
31170
|
+
UNAUTHORIZED: {
|
|
31171
|
+
status: number;
|
|
31172
|
+
};
|
|
31173
|
+
NOT_ALLOWED: {
|
|
31174
|
+
status: number;
|
|
31175
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
31176
|
+
permission: import("zod").ZodString;
|
|
31177
|
+
}, import("zod/v4/core").$strip>>;
|
|
31178
|
+
};
|
|
31179
|
+
PLUGIN_ONLY: {
|
|
31180
|
+
status: number;
|
|
31181
|
+
};
|
|
31182
|
+
MEMBERS_ONLY: {
|
|
31183
|
+
status: number;
|
|
31184
|
+
};
|
|
31185
|
+
ORG_REQUIRED: {
|
|
31186
|
+
status: number;
|
|
31187
|
+
};
|
|
31188
|
+
SCOPE_REQUIRED: {
|
|
31189
|
+
status: number;
|
|
31190
|
+
};
|
|
31191
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
31192
|
+
status: number;
|
|
31193
|
+
};
|
|
31194
|
+
ORGANIZATION_DISABLED: {
|
|
31195
|
+
status: number;
|
|
31196
|
+
data: import("zod").ZodObject<{
|
|
31197
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
31198
|
+
}, import("zod/v4/core").$strip>;
|
|
31199
|
+
};
|
|
31200
|
+
NOT_IN_PLAN: {
|
|
31201
|
+
status: number;
|
|
31202
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
31203
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
31204
|
+
}, import("zod/v4/core").$strip>>;
|
|
31205
|
+
};
|
|
31206
|
+
READ_ONLY: {
|
|
31207
|
+
status: number;
|
|
31208
|
+
};
|
|
31209
|
+
TOO_MANY_REQUESTS: {
|
|
31210
|
+
status: number;
|
|
31211
|
+
};
|
|
31212
|
+
INVALID_INPUT: {
|
|
31213
|
+
status: number;
|
|
31214
|
+
data: import("zod").ZodObject<{
|
|
31215
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
31216
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
|
|
31217
|
+
message: import("zod").ZodString;
|
|
31218
|
+
}, import("zod/v4/core").$strip>>;
|
|
31219
|
+
}, import("zod/v4/core").$strip>;
|
|
31220
|
+
};
|
|
31221
|
+
NOT_FOUND: {
|
|
31222
|
+
status: number;
|
|
31223
|
+
};
|
|
31224
|
+
TAKEN: {
|
|
31225
|
+
status: number;
|
|
31226
|
+
data: import("zod").ZodObject<{
|
|
31227
|
+
field: import("zod").ZodString;
|
|
31228
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31229
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
31230
|
+
}, import("zod/v4/core").$strip>;
|
|
31231
|
+
};
|
|
31232
|
+
INVALID_CURSOR: {
|
|
31233
|
+
status: number;
|
|
31234
|
+
};
|
|
31235
|
+
INVALID_REFERENCE: {
|
|
31236
|
+
status: number;
|
|
31237
|
+
data: import("zod").ZodObject<{
|
|
31238
|
+
field: import("zod").ZodString;
|
|
31239
|
+
}, import("zod/v4/core").$strip>;
|
|
31240
|
+
};
|
|
31241
|
+
INVALID_FILTER: {
|
|
31242
|
+
status: number;
|
|
31243
|
+
};
|
|
31244
|
+
FILTER_TOO_SLOW: {
|
|
31245
|
+
status: number;
|
|
31246
|
+
};
|
|
31247
|
+
INVALID_ACTOR: {
|
|
31248
|
+
status: number;
|
|
31249
|
+
};
|
|
31250
|
+
INVALID_FIELD: {
|
|
31251
|
+
status: number;
|
|
31252
|
+
data: import("zod").ZodObject<{
|
|
31253
|
+
fieldId: import("zod").ZodString;
|
|
31254
|
+
}, import("zod/v4/core").$strip>;
|
|
31255
|
+
};
|
|
31256
|
+
INVALID_FIELD_VALUE: {
|
|
31257
|
+
status: number;
|
|
31258
|
+
data: import("zod").ZodObject<{
|
|
31259
|
+
fieldId: import("zod").ZodString;
|
|
31260
|
+
}, import("zod/v4/core").$strip>;
|
|
31261
|
+
};
|
|
31262
|
+
INVALID_OWNER: {
|
|
31263
|
+
status: number;
|
|
31264
|
+
};
|
|
31265
|
+
INVALID_TAG: {
|
|
31266
|
+
status: number;
|
|
31267
|
+
};
|
|
31268
|
+
INVALID_TYPE: {
|
|
31269
|
+
status: number;
|
|
31270
|
+
};
|
|
31271
|
+
MASS_DELETE_STOPPED: {
|
|
31272
|
+
status: number;
|
|
31273
|
+
};
|
|
31274
|
+
NOT_A_LEAD: {
|
|
31275
|
+
status: number;
|
|
31276
|
+
};
|
|
31277
|
+
TAG_LIMIT: {
|
|
31278
|
+
status: number;
|
|
31279
|
+
};
|
|
31280
|
+
}>>>, "input" | "staleTime">>;
|
|
31281
|
+
};
|
|
30692
31282
|
/** Any error core answers with: one per code in `ERRORS`, with that code's `data`. */
|
|
30693
31283
|
type ApiError = ORPCErrorFromErrorMap<typeof ERRORS>;
|
|
30694
31284
|
/**
|