@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.js
CHANGED
|
@@ -48,6 +48,21 @@ const memberQueries = {
|
|
|
48
48
|
})
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
|
+
* Where erxes-ui's `ContactLink` reads a customer or company:
|
|
52
|
+
* `<ContactLink contentType="core:customer" contentId={id} contacts={contactQueries} />`.
|
|
53
|
+
* It is the query web's panel reads, so a name edited there shows in every link.
|
|
54
|
+
*/
|
|
55
|
+
const contactQueries = {
|
|
56
|
+
customer: (id) => orpc.customers.get.queryOptions({
|
|
57
|
+
input: { id },
|
|
58
|
+
staleTime: 6e4
|
|
59
|
+
}),
|
|
60
|
+
company: (id) => orpc.companies.get.queryOptions({
|
|
61
|
+
input: { id },
|
|
62
|
+
staleTime: 6e4
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
51
66
|
* Whether core answered with `code` (`TAKEN`, `NOT_FOUND`, …). It narrows
|
|
52
67
|
* `error.data` to what `ERRORS` declares for the code, so the field a
|
|
53
68
|
* `TAKEN` is about reads as `error.data.field`.
|
|
@@ -59,4 +74,4 @@ const messageOf = (error) => {
|
|
|
59
74
|
if (issue) return `${issue.path.join(".")}: ${issue.message}`;
|
|
60
75
|
return error instanceof Error ? error.message : "Something went wrong. Try again.";
|
|
61
76
|
};
|
|
62
|
-
export { isApiError, memberQueries, messageOf, orpc };
|
|
77
|
+
export { contactQueries, isApiError, memberQueries, messageOf, orpc };
|
|
@@ -760,6 +760,14 @@ var routes_default = {
|
|
|
760
760
|
}
|
|
761
761
|
} }
|
|
762
762
|
},
|
|
763
|
+
emails: { "send": { "~orpc": {
|
|
764
|
+
"errorMap": {},
|
|
765
|
+
"meta": {},
|
|
766
|
+
"route": {
|
|
767
|
+
"method": "POST",
|
|
768
|
+
"path": "/emails"
|
|
769
|
+
}
|
|
770
|
+
} } },
|
|
763
771
|
events: {
|
|
764
772
|
"publish": { "~orpc": {
|
|
765
773
|
"errorMap": {},
|
|
@@ -1423,6 +1431,14 @@ var routes_default = {
|
|
|
1423
1431
|
"path": "/permissions"
|
|
1424
1432
|
}
|
|
1425
1433
|
} },
|
|
1434
|
+
"permissionSets": { "~orpc": {
|
|
1435
|
+
"errorMap": {},
|
|
1436
|
+
"meta": {},
|
|
1437
|
+
"route": {
|
|
1438
|
+
"method": "GET",
|
|
1439
|
+
"path": "/permission-sets"
|
|
1440
|
+
}
|
|
1441
|
+
} },
|
|
1426
1442
|
"create": { "~orpc": {
|
|
1427
1443
|
"errorMap": {},
|
|
1428
1444
|
"meta": {},
|
package/dist/emails.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A plain message erxes emails for a plugin: a subject, paragraphs and an optional button. */
|
|
3
|
+
export declare const EmailMessage: z.ZodObject<{
|
|
4
|
+
to: z.ZodArray<z.ZodString>;
|
|
5
|
+
subject: z.ZodString;
|
|
6
|
+
body: z.ZodString;
|
|
7
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
8
|
+
button: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
label: z.ZodString;
|
|
10
|
+
link: z.ZodURL;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type EmailMessage = z.infer<typeof EmailMessage>;
|
|
14
|
+
export declare const emailsContract: {
|
|
15
|
+
send: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
16
|
+
to: z.ZodArray<z.ZodString>;
|
|
17
|
+
subject: z.ZodString;
|
|
18
|
+
body: z.ZodString;
|
|
19
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
20
|
+
button: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
link: z.ZodURL;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
queued: z.ZodInt;
|
|
26
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
27
|
+
UNAUTHORIZED: {
|
|
28
|
+
status: number;
|
|
29
|
+
};
|
|
30
|
+
NOT_ALLOWED: {
|
|
31
|
+
status: number;
|
|
32
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
permission: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
};
|
|
36
|
+
PLUGIN_ONLY: {
|
|
37
|
+
status: number;
|
|
38
|
+
};
|
|
39
|
+
MEMBERS_ONLY: {
|
|
40
|
+
status: number;
|
|
41
|
+
};
|
|
42
|
+
ORG_REQUIRED: {
|
|
43
|
+
status: number;
|
|
44
|
+
};
|
|
45
|
+
SCOPE_REQUIRED: {
|
|
46
|
+
status: number;
|
|
47
|
+
};
|
|
48
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
49
|
+
status: number;
|
|
50
|
+
};
|
|
51
|
+
ORGANIZATION_DISABLED: {
|
|
52
|
+
status: number;
|
|
53
|
+
data: z.ZodObject<{
|
|
54
|
+
manageUrl: z.ZodNullable<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
};
|
|
57
|
+
NOT_IN_PLAN: {
|
|
58
|
+
status: number;
|
|
59
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
manageUrl: z.ZodNullable<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
};
|
|
63
|
+
READ_ONLY: {
|
|
64
|
+
status: number;
|
|
65
|
+
};
|
|
66
|
+
TOO_MANY_REQUESTS: {
|
|
67
|
+
status: number;
|
|
68
|
+
};
|
|
69
|
+
INVALID_INPUT: {
|
|
70
|
+
status: number;
|
|
71
|
+
data: z.ZodObject<{
|
|
72
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
73
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
|
|
74
|
+
message: z.ZodString;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
};
|
|
78
|
+
NOT_FOUND: {
|
|
79
|
+
status: number;
|
|
80
|
+
};
|
|
81
|
+
TAKEN: {
|
|
82
|
+
status: number;
|
|
83
|
+
data: z.ZodObject<{
|
|
84
|
+
field: z.ZodString;
|
|
85
|
+
id: z.ZodOptional<z.ZodString>;
|
|
86
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
};
|
|
89
|
+
INVALID_CURSOR: {
|
|
90
|
+
status: number;
|
|
91
|
+
};
|
|
92
|
+
INVALID_REFERENCE: {
|
|
93
|
+
status: number;
|
|
94
|
+
data: z.ZodObject<{
|
|
95
|
+
field: z.ZodString;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
};
|
|
98
|
+
INVALID_FILTER: {
|
|
99
|
+
status: number;
|
|
100
|
+
};
|
|
101
|
+
FILTER_TOO_SLOW: {
|
|
102
|
+
status: number;
|
|
103
|
+
};
|
|
104
|
+
}>, Record<never, never>>;
|
|
105
|
+
};
|
package/dist/emails.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { COMMON_ERRORS } from "./errors.js";
|
|
2
|
+
import { oc } from "@orpc/contract";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
// src/emails.ts
|
|
5
|
+
const Address = z.string().trim().check(z.email()).max(254);
|
|
6
|
+
/** A plain message erxes emails for a plugin: a subject, paragraphs and an optional button. */
|
|
7
|
+
const EmailMessage = z.object({
|
|
8
|
+
to: z.array(Address).min(1).max(50),
|
|
9
|
+
subject: z.string().trim().min(1).max(200),
|
|
10
|
+
/** Text; a blank line starts a new paragraph. */
|
|
11
|
+
body: z.string().trim().min(1).max(2e4),
|
|
12
|
+
/** Where replies go, such as the organisation's support inbox. */
|
|
13
|
+
replyTo: Address.optional(),
|
|
14
|
+
button: z.object({
|
|
15
|
+
label: z.string().trim().min(1).max(60),
|
|
16
|
+
link: z.url({ protocol: /^https$/ }).max(2e3)
|
|
17
|
+
}).optional()
|
|
18
|
+
});
|
|
19
|
+
const emailsContract = { send: oc.errors(COMMON_ERRORS).route({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/emails",
|
|
22
|
+
successStatus: 202,
|
|
23
|
+
summary: "Email up to 50 addresses from erxes's address (plugins with emails:write). Queued and retried; an address that fails doesn't stop the others"
|
|
24
|
+
}).input(EmailMessage).output(z.object({ queued: z.int() })) };
|
|
25
|
+
export { EmailMessage, emailsContract };
|
package/dist/errors.d.ts
CHANGED
package/dist/errors.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { COMMON_ERRORS, ERRORS, ErrorCode } from "./errors.js";
|
|
|
12
12
|
import { Company, CompanyFields, CompanyInput, PersonRef, companiesContract } from "./companies.js";
|
|
13
13
|
import { CompanyRef, ContactLink, ContactLinkInput, Customer, CustomerFields, CustomerInput, CustomerState, customersContract } from "./customers.js";
|
|
14
14
|
import { CustomerLogin, CustomerProfile, CustomerSession, CustomerTokens, customerAccountContract, customerAuthContract } from "./customerAuth.js";
|
|
15
|
+
import { EmailMessage, emailsContract } from "./emails.js";
|
|
15
16
|
import { CoreEvent, EventFailure, EventFailureStatus, EventInput, EventNotify, eventsContract } from "./events.js";
|
|
16
17
|
import { Field, FieldGroup, FieldUsage, fieldGroupsContract, fieldsContract } from "./fields.js";
|
|
17
18
|
import { FileInfo, FileSettings, UploadTarget, filesContract } from "./files.js";
|
|
@@ -23,7 +24,7 @@ import { Organization, OrganizationRegion, organizationsContract } from "./organ
|
|
|
23
24
|
import { GatewayConfig, Invoice, InvoiceLine, InvoiceLineInput, InvoiceMetadata, PaymentGateway, PluginPaymentSettings, Refund, paymentsContract } from "./payments.js";
|
|
24
25
|
import { LiveTopic, PLUGIN_SCOPES, Plugin, PluginInstallation, PluginManifest, PluginName, PluginScope, TokenResponse, pluginsContract } from "./plugins.js";
|
|
25
26
|
import { Product, ProductCategory, ProductStatus, productCategoriesContract, productsContract } from "./products.js";
|
|
26
|
-
import { CORE_PERMISSIONS, CorePermission, OWNER_ONLY_PERMISSIONS, PermissionAction, PermissionInfo, Role, rolesContract } from "./roles.js";
|
|
27
|
+
import { CORE_PERMISSIONS, CorePermission, ManifestPermissionSet, OWNER_ONLY_PERMISSIONS, PermissionAction, PermissionInfo, PermissionSet, Role, rolesContract } from "./roles.js";
|
|
27
28
|
import { EntitlementStatus, OrganizationStatus, PluginAccess, PluginPlan, PluginTier, SaasWorkspace, SubscriptionInfo, saasContract } from "./saas.js";
|
|
28
29
|
import { Tag, tagsContract } from "./tags.js";
|
|
29
30
|
import { TrashItem, trashContract } from "./trash.js";
|
|
@@ -3238,13 +3239,11 @@ export declare const coreContract: {
|
|
|
3238
3239
|
}>, Record<never, never>>;
|
|
3239
3240
|
test: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
3240
3241
|
id: import("zod").ZodString;
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
id: import("zod").ZodString;
|
|
3247
|
-
}, import("zod/v4/core").$strip>>;
|
|
3242
|
+
subjectType: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
3243
|
+
company: "company";
|
|
3244
|
+
customer: "customer";
|
|
3245
|
+
}>>;
|
|
3246
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3248
3247
|
payload: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
3249
3248
|
assumeEventHappens: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
3250
3249
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
@@ -14214,6 +14213,98 @@ export declare const coreContract: {
|
|
|
14214
14213
|
};
|
|
14215
14214
|
}>, Record<never, never>>;
|
|
14216
14215
|
};
|
|
14216
|
+
emails: {
|
|
14217
|
+
send: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
14218
|
+
to: import("zod").ZodArray<import("zod").ZodString>;
|
|
14219
|
+
subject: import("zod").ZodString;
|
|
14220
|
+
body: import("zod").ZodString;
|
|
14221
|
+
replyTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14222
|
+
button: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
14223
|
+
label: import("zod").ZodString;
|
|
14224
|
+
link: import("zod").ZodURL;
|
|
14225
|
+
}, import("zod/v4/core").$strip>>;
|
|
14226
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
14227
|
+
queued: import("zod").ZodInt;
|
|
14228
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
14229
|
+
UNAUTHORIZED: {
|
|
14230
|
+
status: number;
|
|
14231
|
+
};
|
|
14232
|
+
NOT_ALLOWED: {
|
|
14233
|
+
status: number;
|
|
14234
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
14235
|
+
permission: import("zod").ZodString;
|
|
14236
|
+
}, import("zod/v4/core").$strip>>;
|
|
14237
|
+
};
|
|
14238
|
+
PLUGIN_ONLY: {
|
|
14239
|
+
status: number;
|
|
14240
|
+
};
|
|
14241
|
+
MEMBERS_ONLY: {
|
|
14242
|
+
status: number;
|
|
14243
|
+
};
|
|
14244
|
+
ORG_REQUIRED: {
|
|
14245
|
+
status: number;
|
|
14246
|
+
};
|
|
14247
|
+
SCOPE_REQUIRED: {
|
|
14248
|
+
status: number;
|
|
14249
|
+
};
|
|
14250
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
14251
|
+
status: number;
|
|
14252
|
+
};
|
|
14253
|
+
ORGANIZATION_DISABLED: {
|
|
14254
|
+
status: number;
|
|
14255
|
+
data: import("zod").ZodObject<{
|
|
14256
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
14257
|
+
}, import("zod/v4/core").$strip>;
|
|
14258
|
+
};
|
|
14259
|
+
NOT_IN_PLAN: {
|
|
14260
|
+
status: number;
|
|
14261
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
14262
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
14263
|
+
}, import("zod/v4/core").$strip>>;
|
|
14264
|
+
};
|
|
14265
|
+
READ_ONLY: {
|
|
14266
|
+
status: number;
|
|
14267
|
+
};
|
|
14268
|
+
TOO_MANY_REQUESTS: {
|
|
14269
|
+
status: number;
|
|
14270
|
+
};
|
|
14271
|
+
INVALID_INPUT: {
|
|
14272
|
+
status: number;
|
|
14273
|
+
data: import("zod").ZodObject<{
|
|
14274
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
14275
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
|
|
14276
|
+
message: import("zod").ZodString;
|
|
14277
|
+
}, import("zod/v4/core").$strip>>;
|
|
14278
|
+
}, import("zod/v4/core").$strip>;
|
|
14279
|
+
};
|
|
14280
|
+
NOT_FOUND: {
|
|
14281
|
+
status: number;
|
|
14282
|
+
};
|
|
14283
|
+
TAKEN: {
|
|
14284
|
+
status: number;
|
|
14285
|
+
data: import("zod").ZodObject<{
|
|
14286
|
+
field: import("zod").ZodString;
|
|
14287
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14288
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
14289
|
+
}, import("zod/v4/core").$strip>;
|
|
14290
|
+
};
|
|
14291
|
+
INVALID_CURSOR: {
|
|
14292
|
+
status: number;
|
|
14293
|
+
};
|
|
14294
|
+
INVALID_REFERENCE: {
|
|
14295
|
+
status: number;
|
|
14296
|
+
data: import("zod").ZodObject<{
|
|
14297
|
+
field: import("zod").ZodString;
|
|
14298
|
+
}, import("zod/v4/core").$strip>;
|
|
14299
|
+
};
|
|
14300
|
+
INVALID_FILTER: {
|
|
14301
|
+
status: number;
|
|
14302
|
+
};
|
|
14303
|
+
FILTER_TOO_SLOW: {
|
|
14304
|
+
status: number;
|
|
14305
|
+
};
|
|
14306
|
+
}>, Record<never, never>>;
|
|
14307
|
+
};
|
|
14217
14308
|
events: {
|
|
14218
14309
|
publish: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
14219
14310
|
events: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -22302,6 +22393,9 @@ export declare const coreContract: {
|
|
|
22302
22393
|
CROSS_SITE: {
|
|
22303
22394
|
status: number;
|
|
22304
22395
|
};
|
|
22396
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22397
|
+
status: number;
|
|
22398
|
+
};
|
|
22305
22399
|
INVALID_CLIENT: {
|
|
22306
22400
|
status: number;
|
|
22307
22401
|
};
|
|
@@ -22317,6 +22411,12 @@ export declare const coreContract: {
|
|
|
22317
22411
|
PLUGIN_NOT_FOUND: {
|
|
22318
22412
|
status: number;
|
|
22319
22413
|
};
|
|
22414
|
+
UNKNOWN_PERMISSION: {
|
|
22415
|
+
status: number;
|
|
22416
|
+
data: import("zod").ZodObject<{
|
|
22417
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22418
|
+
}, import("zod/v4/core").$strip>;
|
|
22419
|
+
};
|
|
22320
22420
|
}>, Record<never, never>>;
|
|
22321
22421
|
registerManifest: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
22322
22422
|
title: import("zod").ZodString;
|
|
@@ -22341,6 +22441,7 @@ export declare const coreContract: {
|
|
|
22341
22441
|
"audit:write": "audit:write";
|
|
22342
22442
|
"customers:read": "customers:read";
|
|
22343
22443
|
"customers:write": "customers:write";
|
|
22444
|
+
"emails:write": "emails:write";
|
|
22344
22445
|
"events:read": "events:read";
|
|
22345
22446
|
"events:write": "events:write";
|
|
22346
22447
|
"files:read": "files:read";
|
|
@@ -22351,6 +22452,7 @@ export declare const coreContract: {
|
|
|
22351
22452
|
"payments:write": "payments:write";
|
|
22352
22453
|
"products:read": "products:read";
|
|
22353
22454
|
"products:write": "products:write";
|
|
22455
|
+
"users:read": "users:read";
|
|
22354
22456
|
}>>>;
|
|
22355
22457
|
permissions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
22356
22458
|
action: import("zod").ZodString;
|
|
@@ -22358,6 +22460,12 @@ export declare const coreContract: {
|
|
|
22358
22460
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22359
22461
|
group: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22360
22462
|
}, import("zod/v4/core").$strip>>>;
|
|
22463
|
+
permissionSets: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
22464
|
+
key: import("zod").ZodString;
|
|
22465
|
+
label: import("zod").ZodString;
|
|
22466
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22467
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22468
|
+
}, import("zod/v4/core").$strip>>>;
|
|
22361
22469
|
notificationKinds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
22362
22470
|
kind: import("zod").ZodString;
|
|
22363
22471
|
label: import("zod").ZodString;
|
|
@@ -22503,6 +22611,9 @@ export declare const coreContract: {
|
|
|
22503
22611
|
CROSS_SITE: {
|
|
22504
22612
|
status: number;
|
|
22505
22613
|
};
|
|
22614
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22615
|
+
status: number;
|
|
22616
|
+
};
|
|
22506
22617
|
INVALID_CLIENT: {
|
|
22507
22618
|
status: number;
|
|
22508
22619
|
};
|
|
@@ -22518,6 +22629,12 @@ export declare const coreContract: {
|
|
|
22518
22629
|
PLUGIN_NOT_FOUND: {
|
|
22519
22630
|
status: number;
|
|
22520
22631
|
};
|
|
22632
|
+
UNKNOWN_PERMISSION: {
|
|
22633
|
+
status: number;
|
|
22634
|
+
data: import("zod").ZodObject<{
|
|
22635
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22636
|
+
}, import("zod/v4/core").$strip>;
|
|
22637
|
+
};
|
|
22521
22638
|
}>, Record<never, never>>;
|
|
22522
22639
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
22523
22640
|
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -22634,6 +22751,9 @@ export declare const coreContract: {
|
|
|
22634
22751
|
CROSS_SITE: {
|
|
22635
22752
|
status: number;
|
|
22636
22753
|
};
|
|
22754
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22755
|
+
status: number;
|
|
22756
|
+
};
|
|
22637
22757
|
INVALID_CLIENT: {
|
|
22638
22758
|
status: number;
|
|
22639
22759
|
};
|
|
@@ -22649,6 +22769,12 @@ export declare const coreContract: {
|
|
|
22649
22769
|
PLUGIN_NOT_FOUND: {
|
|
22650
22770
|
status: number;
|
|
22651
22771
|
};
|
|
22772
|
+
UNKNOWN_PERMISSION: {
|
|
22773
|
+
status: number;
|
|
22774
|
+
data: import("zod").ZodObject<{
|
|
22775
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22776
|
+
}, import("zod/v4/core").$strip>;
|
|
22777
|
+
};
|
|
22652
22778
|
}>, Record<never, never>>;
|
|
22653
22779
|
install: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
22654
22780
|
name: import("zod").ZodString;
|
|
@@ -22765,6 +22891,9 @@ export declare const coreContract: {
|
|
|
22765
22891
|
CROSS_SITE: {
|
|
22766
22892
|
status: number;
|
|
22767
22893
|
};
|
|
22894
|
+
DUPLICATE_PERMISSION_SET: {
|
|
22895
|
+
status: number;
|
|
22896
|
+
};
|
|
22768
22897
|
INVALID_CLIENT: {
|
|
22769
22898
|
status: number;
|
|
22770
22899
|
};
|
|
@@ -22780,6 +22909,12 @@ export declare const coreContract: {
|
|
|
22780
22909
|
PLUGIN_NOT_FOUND: {
|
|
22781
22910
|
status: number;
|
|
22782
22911
|
};
|
|
22912
|
+
UNKNOWN_PERMISSION: {
|
|
22913
|
+
status: number;
|
|
22914
|
+
data: import("zod").ZodObject<{
|
|
22915
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
22916
|
+
}, import("zod/v4/core").$strip>;
|
|
22917
|
+
};
|
|
22783
22918
|
}>, Record<never, never>>;
|
|
22784
22919
|
uninstall: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
22785
22920
|
name: import("zod").ZodString;
|
|
@@ -22896,6 +23031,9 @@ export declare const coreContract: {
|
|
|
22896
23031
|
CROSS_SITE: {
|
|
22897
23032
|
status: number;
|
|
22898
23033
|
};
|
|
23034
|
+
DUPLICATE_PERMISSION_SET: {
|
|
23035
|
+
status: number;
|
|
23036
|
+
};
|
|
22899
23037
|
INVALID_CLIENT: {
|
|
22900
23038
|
status: number;
|
|
22901
23039
|
};
|
|
@@ -22911,6 +23049,12 @@ export declare const coreContract: {
|
|
|
22911
23049
|
PLUGIN_NOT_FOUND: {
|
|
22912
23050
|
status: number;
|
|
22913
23051
|
};
|
|
23052
|
+
UNKNOWN_PERMISSION: {
|
|
23053
|
+
status: number;
|
|
23054
|
+
data: import("zod").ZodObject<{
|
|
23055
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
23056
|
+
}, import("zod/v4/core").$strip>;
|
|
23057
|
+
};
|
|
22914
23058
|
}>, Record<never, never>>;
|
|
22915
23059
|
session: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
22916
23060
|
name: import("zod").ZodString;
|
|
@@ -22999,6 +23143,9 @@ export declare const coreContract: {
|
|
|
22999
23143
|
CROSS_SITE: {
|
|
23000
23144
|
status: number;
|
|
23001
23145
|
};
|
|
23146
|
+
DUPLICATE_PERMISSION_SET: {
|
|
23147
|
+
status: number;
|
|
23148
|
+
};
|
|
23002
23149
|
INVALID_CLIENT: {
|
|
23003
23150
|
status: number;
|
|
23004
23151
|
};
|
|
@@ -23014,6 +23161,12 @@ export declare const coreContract: {
|
|
|
23014
23161
|
PLUGIN_NOT_FOUND: {
|
|
23015
23162
|
status: number;
|
|
23016
23163
|
};
|
|
23164
|
+
UNKNOWN_PERMISSION: {
|
|
23165
|
+
status: number;
|
|
23166
|
+
data: import("zod").ZodObject<{
|
|
23167
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
23168
|
+
}, import("zod/v4/core").$strip>;
|
|
23169
|
+
};
|
|
23017
23170
|
}>, Record<never, never>>;
|
|
23018
23171
|
signal: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
23019
23172
|
topics: import("zod").ZodArray<import("zod").ZodString>;
|
|
@@ -23101,6 +23254,9 @@ export declare const coreContract: {
|
|
|
23101
23254
|
CROSS_SITE: {
|
|
23102
23255
|
status: number;
|
|
23103
23256
|
};
|
|
23257
|
+
DUPLICATE_PERMISSION_SET: {
|
|
23258
|
+
status: number;
|
|
23259
|
+
};
|
|
23104
23260
|
INVALID_CLIENT: {
|
|
23105
23261
|
status: number;
|
|
23106
23262
|
};
|
|
@@ -23116,6 +23272,12 @@ export declare const coreContract: {
|
|
|
23116
23272
|
PLUGIN_NOT_FOUND: {
|
|
23117
23273
|
status: number;
|
|
23118
23274
|
};
|
|
23275
|
+
UNKNOWN_PERMISSION: {
|
|
23276
|
+
status: number;
|
|
23277
|
+
data: import("zod").ZodObject<{
|
|
23278
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
23279
|
+
}, import("zod/v4/core").$strip>;
|
|
23280
|
+
};
|
|
23119
23281
|
}>, Record<never, never>>;
|
|
23120
23282
|
};
|
|
23121
23283
|
productCategories: {
|
|
@@ -25139,6 +25301,126 @@ export declare const coreContract: {
|
|
|
25139
25301
|
}, import("zod/v4/core").$strip>;
|
|
25140
25302
|
};
|
|
25141
25303
|
}>, Record<never, never>>;
|
|
25304
|
+
permissionSets: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
25305
|
+
data: import("zod").ZodArray<import("zod").ZodObject<{
|
|
25306
|
+
source: import("zod").ZodString;
|
|
25307
|
+
key: import("zod").ZodString;
|
|
25308
|
+
label: import("zod").ZodString;
|
|
25309
|
+
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
25310
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
25311
|
+
}, import("zod/v4/core").$strip>>;
|
|
25312
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
25313
|
+
UNAUTHORIZED: {
|
|
25314
|
+
status: number;
|
|
25315
|
+
};
|
|
25316
|
+
NOT_ALLOWED: {
|
|
25317
|
+
status: number;
|
|
25318
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
25319
|
+
permission: import("zod").ZodString;
|
|
25320
|
+
}, import("zod/v4/core").$strip>>;
|
|
25321
|
+
};
|
|
25322
|
+
PLUGIN_ONLY: {
|
|
25323
|
+
status: number;
|
|
25324
|
+
};
|
|
25325
|
+
MEMBERS_ONLY: {
|
|
25326
|
+
status: number;
|
|
25327
|
+
};
|
|
25328
|
+
ORG_REQUIRED: {
|
|
25329
|
+
status: number;
|
|
25330
|
+
};
|
|
25331
|
+
SCOPE_REQUIRED: {
|
|
25332
|
+
status: number;
|
|
25333
|
+
};
|
|
25334
|
+
SERVICE_TOKEN_REQUIRED: {
|
|
25335
|
+
status: number;
|
|
25336
|
+
};
|
|
25337
|
+
ORGANIZATION_DISABLED: {
|
|
25338
|
+
status: number;
|
|
25339
|
+
data: import("zod").ZodObject<{
|
|
25340
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
25341
|
+
}, import("zod/v4/core").$strip>;
|
|
25342
|
+
};
|
|
25343
|
+
NOT_IN_PLAN: {
|
|
25344
|
+
status: number;
|
|
25345
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
25346
|
+
manageUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
25347
|
+
}, import("zod/v4/core").$strip>>;
|
|
25348
|
+
};
|
|
25349
|
+
READ_ONLY: {
|
|
25350
|
+
status: number;
|
|
25351
|
+
};
|
|
25352
|
+
TOO_MANY_REQUESTS: {
|
|
25353
|
+
status: number;
|
|
25354
|
+
};
|
|
25355
|
+
INVALID_INPUT: {
|
|
25356
|
+
status: number;
|
|
25357
|
+
data: import("zod").ZodObject<{
|
|
25358
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
25359
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInt]>>;
|
|
25360
|
+
message: import("zod").ZodString;
|
|
25361
|
+
}, import("zod/v4/core").$strip>>;
|
|
25362
|
+
}, import("zod/v4/core").$strip>;
|
|
25363
|
+
};
|
|
25364
|
+
NOT_FOUND: {
|
|
25365
|
+
status: number;
|
|
25366
|
+
};
|
|
25367
|
+
TAKEN: {
|
|
25368
|
+
status: number;
|
|
25369
|
+
data: import("zod").ZodObject<{
|
|
25370
|
+
field: import("zod").ZodString;
|
|
25371
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25372
|
+
values: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
25373
|
+
}, import("zod/v4/core").$strip>;
|
|
25374
|
+
};
|
|
25375
|
+
INVALID_CURSOR: {
|
|
25376
|
+
status: number;
|
|
25377
|
+
};
|
|
25378
|
+
INVALID_REFERENCE: {
|
|
25379
|
+
status: number;
|
|
25380
|
+
data: import("zod").ZodObject<{
|
|
25381
|
+
field: import("zod").ZodString;
|
|
25382
|
+
}, import("zod/v4/core").$strip>;
|
|
25383
|
+
};
|
|
25384
|
+
INVALID_FILTER: {
|
|
25385
|
+
status: number;
|
|
25386
|
+
};
|
|
25387
|
+
FILTER_TOO_SLOW: {
|
|
25388
|
+
status: number;
|
|
25389
|
+
};
|
|
25390
|
+
BEYOND_OWN_PERMISSIONS: {
|
|
25391
|
+
status: number;
|
|
25392
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
25393
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
25394
|
+
}, import("zod/v4/core").$strip>>;
|
|
25395
|
+
};
|
|
25396
|
+
BUILTIN_ROLE: {
|
|
25397
|
+
status: number;
|
|
25398
|
+
};
|
|
25399
|
+
FIXED_ROLE: {
|
|
25400
|
+
status: number;
|
|
25401
|
+
};
|
|
25402
|
+
LIMIT_EXCEEDED: {
|
|
25403
|
+
status: number;
|
|
25404
|
+
};
|
|
25405
|
+
OWNER_ONLY_PERMISSION: {
|
|
25406
|
+
status: number;
|
|
25407
|
+
data: import("zod").ZodObject<{
|
|
25408
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
25409
|
+
}, import("zod/v4/core").$strip>;
|
|
25410
|
+
};
|
|
25411
|
+
ROLE_IN_USE: {
|
|
25412
|
+
status: number;
|
|
25413
|
+
};
|
|
25414
|
+
ROLE_NOT_FOUND: {
|
|
25415
|
+
status: number;
|
|
25416
|
+
};
|
|
25417
|
+
UNKNOWN_PERMISSION: {
|
|
25418
|
+
status: number;
|
|
25419
|
+
data: import("zod").ZodObject<{
|
|
25420
|
+
permissions: import("zod").ZodArray<import("zod").ZodString>;
|
|
25421
|
+
}, import("zod/v4/core").$strip>;
|
|
25422
|
+
};
|
|
25423
|
+
}>, Record<never, never>>;
|
|
25142
25424
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
25143
25425
|
name: import("zod").ZodNonOptional<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
25144
25426
|
description: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
@@ -31379,4 +31661,4 @@ export declare const coreContract: {
|
|
|
31379
31661
|
}>, Record<never, never>>;
|
|
31380
31662
|
};
|
|
31381
31663
|
};
|
|
31382
|
-
export { ActionField, ActionInfo, ActionInput, Activity, ActivityInput, ActivityTarget, ActorType, AppLink, Audience, AuditEntry, AuditStream, AuditStreamFormat, Automation, AutomationDefinition, AutomationFieldPath, AutomationRun, AutomationStatus, AutomationStep, AutomationTrigger, COMMON_ERRORS, CONDITION_OPERATORS, CORE_ACTIVITY_TYPES, CORE_API_PREFIX, CORE_API_VERSION, CORE_EVENT_TYPES, CORE_NOTIFICATION_GROUPS, CORE_NOTIFICATION_KINDS, CORE_PERMISSIONS, COUNTRIES, Company, CompanyFields, CompanyInput, CompanyRef, ConditionGroup, ConditionOperator, ConditionRule, ContactLink, ContactLinkInput, ContactState, ContentType, ContextPath, CoreEvent, CoreNotificationKind, CorePermission, Country, Currency, CursorQuery, CustomFields, CustomFieldsPatch, CustomValue, Customer, CustomerFields, CustomerInput, CustomerLogin, CustomerProfile, CustomerSession, CustomerSex, CustomerState, CustomerTokens, DESCRIPTION_MAX, DateOnly, DedupeKey, DryRunStep, ERRORS, EmailAddress, EntitlementStatus, EntityType, ErrorCode, EventFailure, EventFailureStatus, EventInput, EventNotify, EventPattern, EventType, EventTypeInfo, Export, ExportQuery, FIELD_TYPE_FAMILIES, Field, FieldContentType, FieldGroup, FieldType, FieldUsage, FieldValidation, FileInfo, FileSettings, FilterField, GatewayConfig, Id, IdList, ImageAddress, Import, ImportOptions, ImportRow, ImportStatus, InvalidInput, InviteRole, Invoice, InvoiceLine, InvoiceLineInput, InvoiceMetadata, InvoiceStatus, LEAD_SOURCES, LIFECYCLE_COLUMNS, LIFECYCLE_INPUT_COLUMNS, LIST_MAX, LeadEvent, LeadRecordType, LeadReport, LeadSource, LeadStage, LeadStageKind, LiveMode, LiveTopic, NewPassword, Note, NoteInput, NoteVersion, Notification, NotificationDelivery, NotificationGroupSetting, NotificationInput, NotificationSettings, OPTION_FIELD_TYPES, OWNER_ONLY_PERMISSIONS, Organization, OrganizationRegion, OrganizationStatus, PAYMENT_GATEWAYS, PLUGIN_SCOPES, PageInfo, PaymentGateway, PaymentGatewayKind, PermissionAction, PermissionInfo, PersonRef, PhoneNumber, Plugin, PluginAccess, PluginInstallation, PluginManifest, PluginName, PluginPaymentSettings, PluginPlan, PluginScope, PluginTier, Product, ProductCategory, ProductKind, ProductStatus, QueryBoolean, QueryFlag, RecordFilter, Reentry, Refund, RelativeAmount, Role, RoleKey, RunStatus, RunStep, SaasWorkspace, Session, SourceDetails, SubscriptionInfo, Tag, TimelineKind, TimelineTarget, TokenResponse, TransferColumn, TransferRecordType, TrashItem, UNMUTABLE_NOTIFICATION_KINDS, USER_LINK_NAMES, UploadTarget, User, UserLinkName, UserLinks, UserStatus, View, ViewRecordType, ViewSort, Webhook, WebhookDelivery, activitiesContract, auditContract, authContract, automationsContract, companiesContract, currencyDigits, currencyOfCountry, cursorPageOf, customerAccountContract, customerAuthContract, customersContract, eventsContract, fieldGroupsContract, fieldsContract, filesContract, gatewayTakes, isoDate, leadsContract, lifecycleInput, lifecycleRow, listOf, notificationGroupOf, notificationsContract, organizationsContract, paymentsContract, pluginsContract, productCategoriesContract, productsContract, rolesContract, saasContract, tagsContract, transferContract, trashContract, usersContract, viewsContract, webhooksContract };
|
|
31664
|
+
export { ActionField, ActionInfo, ActionInput, Activity, ActivityInput, ActivityTarget, ActorType, AppLink, Audience, AuditEntry, AuditStream, AuditStreamFormat, Automation, AutomationDefinition, AutomationFieldPath, AutomationRun, AutomationStatus, AutomationStep, AutomationTrigger, COMMON_ERRORS, CONDITION_OPERATORS, CORE_ACTIVITY_TYPES, CORE_API_PREFIX, CORE_API_VERSION, CORE_EVENT_TYPES, CORE_NOTIFICATION_GROUPS, CORE_NOTIFICATION_KINDS, CORE_PERMISSIONS, COUNTRIES, Company, CompanyFields, CompanyInput, CompanyRef, ConditionGroup, ConditionOperator, ConditionRule, ContactLink, ContactLinkInput, ContactState, ContentType, ContextPath, CoreEvent, CoreNotificationKind, CorePermission, Country, Currency, CursorQuery, CustomFields, CustomFieldsPatch, CustomValue, Customer, CustomerFields, CustomerInput, CustomerLogin, CustomerProfile, CustomerSession, CustomerSex, CustomerState, CustomerTokens, DESCRIPTION_MAX, DateOnly, DedupeKey, DryRunStep, ERRORS, EmailAddress, EmailMessage, EntitlementStatus, EntityType, ErrorCode, EventFailure, EventFailureStatus, EventInput, EventNotify, EventPattern, EventType, EventTypeInfo, Export, ExportQuery, FIELD_TYPE_FAMILIES, Field, FieldContentType, FieldGroup, FieldType, FieldUsage, FieldValidation, FileInfo, FileSettings, FilterField, GatewayConfig, Id, IdList, ImageAddress, Import, ImportOptions, ImportRow, ImportStatus, InvalidInput, InviteRole, Invoice, InvoiceLine, InvoiceLineInput, InvoiceMetadata, InvoiceStatus, LEAD_SOURCES, LIFECYCLE_COLUMNS, LIFECYCLE_INPUT_COLUMNS, LIST_MAX, LeadEvent, LeadRecordType, LeadReport, LeadSource, LeadStage, LeadStageKind, LiveMode, LiveTopic, ManifestPermissionSet, NewPassword, Note, NoteInput, NoteVersion, Notification, NotificationDelivery, NotificationGroupSetting, NotificationInput, NotificationSettings, OPTION_FIELD_TYPES, OWNER_ONLY_PERMISSIONS, Organization, OrganizationRegion, OrganizationStatus, PAYMENT_GATEWAYS, PLUGIN_SCOPES, PageInfo, PaymentGateway, PaymentGatewayKind, PermissionAction, PermissionInfo, PermissionSet, PersonRef, PhoneNumber, Plugin, PluginAccess, PluginInstallation, PluginManifest, PluginName, PluginPaymentSettings, PluginPlan, PluginScope, PluginTier, Product, ProductCategory, ProductKind, ProductStatus, QueryBoolean, QueryFlag, RecordFilter, Reentry, Refund, RelativeAmount, Role, RoleKey, RunStatus, RunStep, SaasWorkspace, Session, SourceDetails, SubscriptionInfo, Tag, TimelineKind, TimelineTarget, TokenResponse, TransferColumn, TransferRecordType, TrashItem, UNMUTABLE_NOTIFICATION_KINDS, USER_LINK_NAMES, UploadTarget, User, UserLinkName, UserLinks, UserStatus, View, ViewRecordType, ViewSort, Webhook, WebhookDelivery, activitiesContract, auditContract, authContract, automationsContract, companiesContract, currencyDigits, currencyOfCountry, cursorPageOf, customerAccountContract, customerAuthContract, customersContract, emailsContract, eventsContract, fieldGroupsContract, fieldsContract, filesContract, gatewayTakes, isoDate, leadsContract, lifecycleInput, lifecycleRow, listOf, notificationGroupOf, notificationsContract, organizationsContract, paymentsContract, pluginsContract, productCategoriesContract, productsContract, rolesContract, saasContract, tagsContract, transferContract, trashContract, usersContract, viewsContract, webhooksContract };
|