@vennyx/solicrm 0.1.0
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/LICENSE +21 -0
- package/README.md +137 -0
- package/dist/index.d.ts +1700 -0
- package/dist/index.js +3997 -0
- package/package.json +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1700 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region packages/contracts/src/activities.d.ts
|
|
3
|
+
declare const createActivityRequestSchema: z.ZodObject<{
|
|
4
|
+
kind: z.ZodEnum<{
|
|
5
|
+
call: "call";
|
|
6
|
+
email: "email";
|
|
7
|
+
meeting: "meeting";
|
|
8
|
+
note: "note";
|
|
9
|
+
stage_change: "stage_change";
|
|
10
|
+
task: "task";
|
|
11
|
+
}>;
|
|
12
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
13
|
+
body: z.ZodOptional<z.ZodString>;
|
|
14
|
+
happensAt: z.ZodISODateTime;
|
|
15
|
+
durationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
targetType: z.ZodEnum<{
|
|
17
|
+
company: "company";
|
|
18
|
+
contact: "contact";
|
|
19
|
+
deal: "deal";
|
|
20
|
+
}>;
|
|
21
|
+
targetId: z.ZodUUID;
|
|
22
|
+
actorUserId: z.ZodOptional<z.ZodUUID>;
|
|
23
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
type CreateActivityRequest = z.infer<typeof createActivityRequestSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Genel güncelleme — `kind`/`targetType`/`targetId` BİLEREK YOK (bkz. dosya
|
|
28
|
+
* başı KRİTİK KURAL). `.strict()`: bu alanlardan biri gönderilirse 400.
|
|
29
|
+
*/
|
|
30
|
+
declare const updateActivityRequestSchema: z.ZodObject<{
|
|
31
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
32
|
+
body: z.ZodOptional<z.ZodString>;
|
|
33
|
+
happensAt: z.ZodOptional<z.ZodISODateTime>;
|
|
34
|
+
durationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
actorUserId: z.ZodOptional<z.ZodUUID>;
|
|
36
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
type UpdateActivityRequest = z.infer<typeof updateActivityRequestSchema>;
|
|
39
|
+
declare const activityResponseSchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodUUID;
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
call: "call";
|
|
43
|
+
email: "email";
|
|
44
|
+
meeting: "meeting";
|
|
45
|
+
note: "note";
|
|
46
|
+
stage_change: "stage_change";
|
|
47
|
+
task: "task";
|
|
48
|
+
}>;
|
|
49
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
50
|
+
body: z.ZodNullable<z.ZodString>;
|
|
51
|
+
happensAt: z.ZodISODateTime;
|
|
52
|
+
durationMinutes: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
targetType: z.ZodEnum<{
|
|
54
|
+
company: "company";
|
|
55
|
+
contact: "contact";
|
|
56
|
+
deal: "deal";
|
|
57
|
+
}>;
|
|
58
|
+
targetId: z.ZodUUID;
|
|
59
|
+
targetCachedName: z.ZodString;
|
|
60
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
61
|
+
actorUserId: z.ZodNullable<z.ZodUUID>;
|
|
62
|
+
createdAt: z.ZodISODateTime;
|
|
63
|
+
updatedAt: z.ZodISODateTime;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
type ActivityResponse = z.infer<typeof activityResponseSchema>;
|
|
66
|
+
declare const activitiesPagedResponseSchema: z.ZodObject<{
|
|
67
|
+
items: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodUUID;
|
|
69
|
+
kind: z.ZodEnum<{
|
|
70
|
+
call: "call";
|
|
71
|
+
email: "email";
|
|
72
|
+
meeting: "meeting";
|
|
73
|
+
note: "note";
|
|
74
|
+
stage_change: "stage_change";
|
|
75
|
+
task: "task";
|
|
76
|
+
}>;
|
|
77
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
78
|
+
body: z.ZodNullable<z.ZodString>;
|
|
79
|
+
happensAt: z.ZodISODateTime;
|
|
80
|
+
durationMinutes: z.ZodNullable<z.ZodNumber>;
|
|
81
|
+
targetType: z.ZodEnum<{
|
|
82
|
+
company: "company";
|
|
83
|
+
contact: "contact";
|
|
84
|
+
deal: "deal";
|
|
85
|
+
}>;
|
|
86
|
+
targetId: z.ZodUUID;
|
|
87
|
+
targetCachedName: z.ZodString;
|
|
88
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
89
|
+
actorUserId: z.ZodNullable<z.ZodUUID>;
|
|
90
|
+
createdAt: z.ZodISODateTime;
|
|
91
|
+
updatedAt: z.ZodISODateTime;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
94
|
+
hasMore: z.ZodBoolean;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
type ActivitiesPagedResponse = z.infer<typeof activitiesPagedResponseSchema>;
|
|
97
|
+
/**
|
|
98
|
+
* Zaman çizelgesi ucu bir hedefin (kişi/şirket/fırsat) activities/tasks/notes'unu
|
|
99
|
+
* TEK yanıtta döner — sayfalama YOKTUR, her kaynak `TIMELINE_LIMIT_PER_RESOURCE`
|
|
100
|
+
* ile SINIRLIDIR (bkz. dosya başı NOT). Yeni bir tip İCAT EDİLMEZ — VAR OLAN
|
|
101
|
+
* üç kanonik öğe şemasının (`array()` ile) bileşimidir.
|
|
102
|
+
*/
|
|
103
|
+
declare const targetTimelineResponseSchema: z.ZodObject<{
|
|
104
|
+
activities: z.ZodArray<z.ZodObject<{
|
|
105
|
+
id: z.ZodUUID;
|
|
106
|
+
kind: z.ZodEnum<{
|
|
107
|
+
call: "call";
|
|
108
|
+
email: "email";
|
|
109
|
+
meeting: "meeting";
|
|
110
|
+
note: "note";
|
|
111
|
+
stage_change: "stage_change";
|
|
112
|
+
task: "task";
|
|
113
|
+
}>;
|
|
114
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
115
|
+
body: z.ZodNullable<z.ZodString>;
|
|
116
|
+
happensAt: z.ZodISODateTime;
|
|
117
|
+
durationMinutes: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
targetType: z.ZodEnum<{
|
|
119
|
+
company: "company";
|
|
120
|
+
contact: "contact";
|
|
121
|
+
deal: "deal";
|
|
122
|
+
}>;
|
|
123
|
+
targetId: z.ZodUUID;
|
|
124
|
+
targetCachedName: z.ZodString;
|
|
125
|
+
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
126
|
+
actorUserId: z.ZodNullable<z.ZodUUID>;
|
|
127
|
+
createdAt: z.ZodISODateTime;
|
|
128
|
+
updatedAt: z.ZodISODateTime;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
131
|
+
id: z.ZodUUID;
|
|
132
|
+
title: z.ZodString;
|
|
133
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
134
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
135
|
+
dueAt: z.ZodNullable<z.ZodISODateTime>;
|
|
136
|
+
completedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
137
|
+
status: z.ZodEnum<{
|
|
138
|
+
cancelled: "cancelled";
|
|
139
|
+
done: "done";
|
|
140
|
+
in_progress: "in_progress";
|
|
141
|
+
todo: "todo";
|
|
142
|
+
}>;
|
|
143
|
+
priority: z.ZodEnum<{
|
|
144
|
+
high: "high";
|
|
145
|
+
low: "low";
|
|
146
|
+
normal: "normal";
|
|
147
|
+
urgent: "urgent";
|
|
148
|
+
}>;
|
|
149
|
+
assigneeUserId: z.ZodNullable<z.ZodUUID>;
|
|
150
|
+
createdAt: z.ZodISODateTime;
|
|
151
|
+
updatedAt: z.ZodISODateTime;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
notes: z.ZodArray<z.ZodObject<{
|
|
154
|
+
id: z.ZodUUID;
|
|
155
|
+
title: z.ZodNullable<z.ZodString>;
|
|
156
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
157
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
158
|
+
authorUserId: z.ZodNullable<z.ZodUUID>;
|
|
159
|
+
createdAt: z.ZodISODateTime;
|
|
160
|
+
updatedAt: z.ZodISODateTime;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
type TargetTimelineResponse = z.infer<typeof targetTimelineResponseSchema>;
|
|
164
|
+
/** Zaman çizelgesi ucunun kaynak başına sabit üst sınırı (bkz. dosya başı NOT — TEK gerçek kaynak) */
|
|
165
|
+
declare const TIMELINE_LIMIT_PER_RESOURCE = 50;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region packages/contracts/src/companies.d.ts
|
|
168
|
+
declare const createCompanyRequestSchema: z.ZodObject<{
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
171
|
+
industry: z.ZodOptional<z.ZodString>;
|
|
172
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
173
|
+
"1-10": "1-10";
|
|
174
|
+
"11-50": "11-50";
|
|
175
|
+
"201-500": "201-500";
|
|
176
|
+
"500+": "500+";
|
|
177
|
+
"51-200": "51-200";
|
|
178
|
+
}>>;
|
|
179
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
180
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
181
|
+
address: z.ZodOptional<z.ZodString>;
|
|
182
|
+
city: z.ZodOptional<z.ZodString>;
|
|
183
|
+
country: z.ZodOptional<z.ZodString>;
|
|
184
|
+
annualRevenue: z.ZodOptional<z.ZodString>;
|
|
185
|
+
linkedinUrl: z.ZodOptional<z.ZodURL>;
|
|
186
|
+
ownerUserId: z.ZodOptional<z.ZodUUID>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
type CreateCompanyRequest = z.infer<typeof createCompanyRequestSchema>;
|
|
189
|
+
declare const updateCompanyRequestSchema: z.ZodObject<{
|
|
190
|
+
name: z.ZodOptional<z.ZodString>;
|
|
191
|
+
domain: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
192
|
+
industry: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
193
|
+
size: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
"1-10": "1-10";
|
|
195
|
+
"11-50": "11-50";
|
|
196
|
+
"201-500": "201-500";
|
|
197
|
+
"500+": "500+";
|
|
198
|
+
"51-200": "51-200";
|
|
199
|
+
}>>>;
|
|
200
|
+
phone: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
201
|
+
website: z.ZodOptional<z.ZodOptional<z.ZodURL>>;
|
|
202
|
+
address: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
203
|
+
city: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
204
|
+
country: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
205
|
+
annualRevenue: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
206
|
+
linkedinUrl: z.ZodOptional<z.ZodOptional<z.ZodURL>>;
|
|
207
|
+
ownerUserId: z.ZodOptional<z.ZodOptional<z.ZodUUID>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
type UpdateCompanyRequest = z.infer<typeof updateCompanyRequestSchema>;
|
|
210
|
+
declare const companyResponseSchema: z.ZodObject<{
|
|
211
|
+
id: z.ZodUUID;
|
|
212
|
+
name: z.ZodString;
|
|
213
|
+
domain: z.ZodNullable<z.ZodString>;
|
|
214
|
+
industry: z.ZodNullable<z.ZodString>;
|
|
215
|
+
size: z.ZodNullable<z.ZodEnum<{
|
|
216
|
+
"1-10": "1-10";
|
|
217
|
+
"11-50": "11-50";
|
|
218
|
+
"201-500": "201-500";
|
|
219
|
+
"500+": "500+";
|
|
220
|
+
"51-200": "51-200";
|
|
221
|
+
}>>;
|
|
222
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
223
|
+
website: z.ZodNullable<z.ZodString>;
|
|
224
|
+
address: z.ZodNullable<z.ZodString>;
|
|
225
|
+
city: z.ZodNullable<z.ZodString>;
|
|
226
|
+
country: z.ZodNullable<z.ZodString>;
|
|
227
|
+
annualRevenue: z.ZodNullable<z.ZodString>;
|
|
228
|
+
linkedinUrl: z.ZodNullable<z.ZodString>;
|
|
229
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
230
|
+
createdAt: z.ZodISODateTime;
|
|
231
|
+
updatedAt: z.ZodISODateTime;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
type CompanyResponse = z.infer<typeof companyResponseSchema>;
|
|
234
|
+
declare const companiesPagedResponseSchema: z.ZodObject<{
|
|
235
|
+
items: z.ZodArray<z.ZodObject<{
|
|
236
|
+
id: z.ZodUUID;
|
|
237
|
+
name: z.ZodString;
|
|
238
|
+
domain: z.ZodNullable<z.ZodString>;
|
|
239
|
+
industry: z.ZodNullable<z.ZodString>;
|
|
240
|
+
size: z.ZodNullable<z.ZodEnum<{
|
|
241
|
+
"1-10": "1-10";
|
|
242
|
+
"11-50": "11-50";
|
|
243
|
+
"201-500": "201-500";
|
|
244
|
+
"500+": "500+";
|
|
245
|
+
"51-200": "51-200";
|
|
246
|
+
}>>;
|
|
247
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
248
|
+
website: z.ZodNullable<z.ZodString>;
|
|
249
|
+
address: z.ZodNullable<z.ZodString>;
|
|
250
|
+
city: z.ZodNullable<z.ZodString>;
|
|
251
|
+
country: z.ZodNullable<z.ZodString>;
|
|
252
|
+
annualRevenue: z.ZodNullable<z.ZodString>;
|
|
253
|
+
linkedinUrl: z.ZodNullable<z.ZodString>;
|
|
254
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
255
|
+
createdAt: z.ZodISODateTime;
|
|
256
|
+
updatedAt: z.ZodISODateTime;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
259
|
+
hasMore: z.ZodBoolean;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
type CompaniesPagedResponse = z.infer<typeof companiesPagedResponseSchema>;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region packages/contracts/src/contacts.d.ts
|
|
264
|
+
declare const createContactRequestSchema: z.ZodObject<{
|
|
265
|
+
firstName: z.ZodString;
|
|
266
|
+
lastName: z.ZodString;
|
|
267
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
268
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
269
|
+
mobile: z.ZodOptional<z.ZodString>;
|
|
270
|
+
jobTitle: z.ZodOptional<z.ZodString>;
|
|
271
|
+
linkedinUrl: z.ZodOptional<z.ZodURL>;
|
|
272
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
273
|
+
city: z.ZodOptional<z.ZodString>;
|
|
274
|
+
country: z.ZodOptional<z.ZodString>;
|
|
275
|
+
ownerUserId: z.ZodOptional<z.ZodUUID>;
|
|
276
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
277
|
+
cold_outreach: "cold_outreach";
|
|
278
|
+
event: "event";
|
|
279
|
+
other: "other";
|
|
280
|
+
referral: "referral";
|
|
281
|
+
social_media: "social_media";
|
|
282
|
+
website: "website";
|
|
283
|
+
}>>;
|
|
284
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
285
|
+
active: "active";
|
|
286
|
+
inactive: "inactive";
|
|
287
|
+
lead: "lead";
|
|
288
|
+
}>>;
|
|
289
|
+
companyId: z.ZodOptional<z.ZodUUID>;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
type CreateContactRequest = z.infer<typeof createContactRequestSchema>;
|
|
292
|
+
/**
|
|
293
|
+
* [Fix round 1 — Faz 10 Task 3] `status` AÇIKÇA yeniden tanımlanır; düz
|
|
294
|
+
* `.partial()` YETMEZ.
|
|
295
|
+
*
|
|
296
|
+
* ÖLÇÜLEN KUSUR: zod 4'te `.partial()` bir alanı `.optional()` yapar ama
|
|
297
|
+
* `.default()`'unu KALDIRMAZ ⇒ `createContactRequestSchema.partial()`'in
|
|
298
|
+
* `status`'ü hâlâ `.default('lead')` taşıyordu ve
|
|
299
|
+
* `updateContactRequestSchema.parse({ city: 'x' })` → `{ city:'x',
|
|
300
|
+
* status:'lead' }` üretiyordu (canlı ölçüldü). `PATCH /v1/tenants/:id/
|
|
301
|
+
* contacts/:contactId` gövdeyi `validateJson(updateContactRequestSchema)` ile
|
|
302
|
+
* doğrulayıp `.set({ ...body, updatedById })` yazdığı için
|
|
303
|
+
* (`apps/api/src/routes/contacts.ts:314`) `status` GÖNDERMEYEN her kısmi
|
|
304
|
+
* güncelleme, `active`/`inactive` bir kişiyi SESSİZCE `lead`'e geri
|
|
305
|
+
* düşürüyordu — dashboard'ın düzenleme formu `status`'ü her zaman gönderdiği
|
|
306
|
+
* için belirti orada görünmüyordu; kusuru MCP'nin `update_contact` aracı
|
|
307
|
+
* (yalnız verilen alanları gönderir) ortaya çıkardı.
|
|
308
|
+
*
|
|
309
|
+
* KARDEŞ ŞEMALARDA AYNI KUSUR YOK ama gerekçesi TESADÜF: `companies`/
|
|
310
|
+
* `pipelines`'ın create şemalarında `.default()`'lu alan HİÇ YOK,
|
|
311
|
+
* `updateDealRequestSchema` ise `.partial()` DEĞİL elle yazılmış bir şemadır.
|
|
312
|
+
* ⇒ `.default()`'lu bir alan içeren bir create şemasından `.partial()` ile
|
|
313
|
+
* update şeması TÜRETİRKEN o alanı DAİMA açıkça `.optional()` olarak ez.
|
|
314
|
+
*/
|
|
315
|
+
declare const updateContactRequestSchema: z.ZodObject<{
|
|
316
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
317
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
318
|
+
email: z.ZodOptional<z.ZodOptional<z.ZodEmail>>;
|
|
319
|
+
phone: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
320
|
+
mobile: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
321
|
+
jobTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
322
|
+
linkedinUrl: z.ZodOptional<z.ZodOptional<z.ZodURL>>;
|
|
323
|
+
avatarUrl: z.ZodOptional<z.ZodOptional<z.ZodURL>>;
|
|
324
|
+
city: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
325
|
+
country: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
326
|
+
ownerUserId: z.ZodOptional<z.ZodOptional<z.ZodUUID>>;
|
|
327
|
+
source: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
328
|
+
cold_outreach: "cold_outreach";
|
|
329
|
+
event: "event";
|
|
330
|
+
other: "other";
|
|
331
|
+
referral: "referral";
|
|
332
|
+
social_media: "social_media";
|
|
333
|
+
website: "website";
|
|
334
|
+
}>>>;
|
|
335
|
+
companyId: z.ZodOptional<z.ZodOptional<z.ZodUUID>>;
|
|
336
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
active: "active";
|
|
338
|
+
inactive: "inactive";
|
|
339
|
+
lead: "lead";
|
|
340
|
+
}>>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
type UpdateContactRequest = z.infer<typeof updateContactRequestSchema>;
|
|
343
|
+
declare const contactResponseSchema: z.ZodObject<{
|
|
344
|
+
id: z.ZodUUID;
|
|
345
|
+
firstName: z.ZodString;
|
|
346
|
+
lastName: z.ZodString;
|
|
347
|
+
email: z.ZodNullable<z.ZodString>;
|
|
348
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
349
|
+
mobile: z.ZodNullable<z.ZodString>;
|
|
350
|
+
jobTitle: z.ZodNullable<z.ZodString>;
|
|
351
|
+
linkedinUrl: z.ZodNullable<z.ZodString>;
|
|
352
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
353
|
+
city: z.ZodNullable<z.ZodString>;
|
|
354
|
+
country: z.ZodNullable<z.ZodString>;
|
|
355
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
356
|
+
source: z.ZodNullable<z.ZodEnum<{
|
|
357
|
+
cold_outreach: "cold_outreach";
|
|
358
|
+
event: "event";
|
|
359
|
+
other: "other";
|
|
360
|
+
referral: "referral";
|
|
361
|
+
social_media: "social_media";
|
|
362
|
+
website: "website";
|
|
363
|
+
}>>;
|
|
364
|
+
status: z.ZodEnum<{
|
|
365
|
+
active: "active";
|
|
366
|
+
inactive: "inactive";
|
|
367
|
+
lead: "lead";
|
|
368
|
+
}>;
|
|
369
|
+
companyId: z.ZodNullable<z.ZodUUID>;
|
|
370
|
+
createdAt: z.ZodISODateTime;
|
|
371
|
+
updatedAt: z.ZodISODateTime;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
type ContactResponse = z.infer<typeof contactResponseSchema>;
|
|
374
|
+
declare const contactsPagedResponseSchema: z.ZodObject<{
|
|
375
|
+
items: z.ZodArray<z.ZodObject<{
|
|
376
|
+
id: z.ZodUUID;
|
|
377
|
+
firstName: z.ZodString;
|
|
378
|
+
lastName: z.ZodString;
|
|
379
|
+
email: z.ZodNullable<z.ZodString>;
|
|
380
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
381
|
+
mobile: z.ZodNullable<z.ZodString>;
|
|
382
|
+
jobTitle: z.ZodNullable<z.ZodString>;
|
|
383
|
+
linkedinUrl: z.ZodNullable<z.ZodString>;
|
|
384
|
+
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
385
|
+
city: z.ZodNullable<z.ZodString>;
|
|
386
|
+
country: z.ZodNullable<z.ZodString>;
|
|
387
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
388
|
+
source: z.ZodNullable<z.ZodEnum<{
|
|
389
|
+
cold_outreach: "cold_outreach";
|
|
390
|
+
event: "event";
|
|
391
|
+
other: "other";
|
|
392
|
+
referral: "referral";
|
|
393
|
+
social_media: "social_media";
|
|
394
|
+
website: "website";
|
|
395
|
+
}>>;
|
|
396
|
+
status: z.ZodEnum<{
|
|
397
|
+
active: "active";
|
|
398
|
+
inactive: "inactive";
|
|
399
|
+
lead: "lead";
|
|
400
|
+
}>;
|
|
401
|
+
companyId: z.ZodNullable<z.ZodUUID>;
|
|
402
|
+
createdAt: z.ZodISODateTime;
|
|
403
|
+
updatedAt: z.ZodISODateTime;
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
406
|
+
hasMore: z.ZodBoolean;
|
|
407
|
+
}, z.core.$strip>;
|
|
408
|
+
type ContactsPagedResponse = z.infer<typeof contactsPagedResponseSchema>;
|
|
409
|
+
/**
|
|
410
|
+
* Plan bazlı kişi limiti aşıldığında dönen gövde — spec §5.7'nin
|
|
411
|
+
* `integration_requires_plan` kalıbının aynı ailesinden (bkz.
|
|
412
|
+
* `routes/sso-admin.ts` `planGateError`), ayrı bir `code` ile.
|
|
413
|
+
*/
|
|
414
|
+
declare const contactLimitReachedResponseSchema: z.ZodObject<{
|
|
415
|
+
code: z.ZodLiteral<"contact_limit_reached">;
|
|
416
|
+
limit: z.ZodNumber;
|
|
417
|
+
planCode: z.ZodEnum<{
|
|
418
|
+
enterprise: "enterprise";
|
|
419
|
+
free: "free";
|
|
420
|
+
pro: "pro";
|
|
421
|
+
team: "team";
|
|
422
|
+
}>;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
type ContactLimitReachedResponse = z.infer<typeof contactLimitReachedResponseSchema>;
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region packages/contracts/src/fields.d.ts
|
|
427
|
+
/**
|
|
428
|
+
* Alan kataloğu — `field_key` → kolon/tip/yetenek eşlemesi.
|
|
429
|
+
*
|
|
430
|
+
* NEDEN VAR: kaydedilmiş görünümler, filtreler, sıralama, CSV içe/dışa aktarma
|
|
431
|
+
* ve MCP/SDK tip üretimi HEPSİ bu katalogdan okur. Hiçbir yerde kullanıcıdan
|
|
432
|
+
* gelen bir değer doğrudan kolon adına dönüşmez — `resolveField()` bilinmeyen
|
|
433
|
+
* anahtar için `undefined` döner ve çağıran 400 verir. Bu, SQL enjeksiyonu ve
|
|
434
|
+
* bilgi sızdırmanın sınırıdır.
|
|
435
|
+
*
|
|
436
|
+
* İLERİYE DÖNÜK: özel alanlar (custom fields) eklendiğinde katalog runtime'da
|
|
437
|
+
* tenant'ın tanımlarıyla genişletilir; tüketici kod değişmez (bkz. spec §6.7).
|
|
438
|
+
*/
|
|
439
|
+
declare const CRM_RESOURCES: readonly ['contacts', 'companies', 'deals', 'tasks'];
|
|
440
|
+
type CrmResource = (typeof CRM_RESOURCES)[number];
|
|
441
|
+
type FieldType = 'text' | 'number' | 'money' | 'date' | 'boolean' | 'enum' | 'uuid';
|
|
442
|
+
interface FieldDef {
|
|
443
|
+
/** Gerçek veritabanı kolonu — yalnız katalog üzerinden erişilir */
|
|
444
|
+
column: string;
|
|
445
|
+
type: FieldType;
|
|
446
|
+
filterable: boolean;
|
|
447
|
+
sortable: boolean;
|
|
448
|
+
/** `type: 'enum'` için izinli değerler */
|
|
449
|
+
values?: readonly string[] | undefined;
|
|
450
|
+
}
|
|
451
|
+
declare const FIELD_CATALOG: Record<CrmResource, Record<string, FieldDef>>;
|
|
452
|
+
/**
|
|
453
|
+
* Bir `field_key`'i katalogdan çözer. Bilinmeyen anahtar → `undefined`
|
|
454
|
+
* (çağıran 400 döner). ASLA anahtarı kolon adı olarak varsaymaz.
|
|
455
|
+
*/
|
|
456
|
+
declare function resolveField(resource: CrmResource, key: string): FieldDef | undefined;
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region packages/contracts/src/crm.d.ts
|
|
459
|
+
declare const targetTypeSchema: z.ZodEnum<{
|
|
460
|
+
company: "company";
|
|
461
|
+
contact: "contact";
|
|
462
|
+
deal: "deal";
|
|
463
|
+
}>;
|
|
464
|
+
type TargetType = z.infer<typeof targetTypeSchema>;
|
|
465
|
+
/** Fırsat sonucu (spec §6.2) — DB'de `deals_outcome_check` CHECK kısıtıyla eşleşir */
|
|
466
|
+
declare const dealOutcomeSchema: z.ZodEnum<{
|
|
467
|
+
lost: "lost";
|
|
468
|
+
open: "open";
|
|
469
|
+
won: "won";
|
|
470
|
+
}>;
|
|
471
|
+
type DealOutcome = z.infer<typeof dealOutcomeSchema>;
|
|
472
|
+
declare const contactStatusSchema: z.ZodEnum<{
|
|
473
|
+
active: "active";
|
|
474
|
+
inactive: "inactive";
|
|
475
|
+
lead: "lead";
|
|
476
|
+
}>;
|
|
477
|
+
type ContactStatus = z.infer<typeof contactStatusSchema>;
|
|
478
|
+
/** Spec'te tam liste verilmemiş — makul bir başlangıç kümesi (bkz. dosya başı NOT) */
|
|
479
|
+
declare const contactSourceSchema: z.ZodEnum<{
|
|
480
|
+
cold_outreach: "cold_outreach";
|
|
481
|
+
event: "event";
|
|
482
|
+
other: "other";
|
|
483
|
+
referral: "referral";
|
|
484
|
+
social_media: "social_media";
|
|
485
|
+
website: "website";
|
|
486
|
+
}>;
|
|
487
|
+
type ContactSource = z.infer<typeof contactSourceSchema>;
|
|
488
|
+
/** Spec'te tam liste verilmemiş — makul bir başlangıç kümesi (bkz. dosya başı NOT) */
|
|
489
|
+
declare const companySizeSchema: z.ZodEnum<{
|
|
490
|
+
"1-10": "1-10";
|
|
491
|
+
"11-50": "11-50";
|
|
492
|
+
"201-500": "201-500";
|
|
493
|
+
"500+": "500+";
|
|
494
|
+
"51-200": "51-200";
|
|
495
|
+
}>;
|
|
496
|
+
type CompanySize = z.infer<typeof companySizeSchema>;
|
|
497
|
+
declare const sortDirectionSchema: z.ZodEnum<{
|
|
498
|
+
asc: "asc";
|
|
499
|
+
desc: "desc";
|
|
500
|
+
}>;
|
|
501
|
+
type SortDirection = z.infer<typeof sortDirectionSchema>;
|
|
502
|
+
declare const filterOperandSchema: z.ZodEnum<{
|
|
503
|
+
contains: "contains";
|
|
504
|
+
eq: "eq";
|
|
505
|
+
gt: "gt";
|
|
506
|
+
gte: "gte";
|
|
507
|
+
in: "in";
|
|
508
|
+
is_not_null: "is_not_null";
|
|
509
|
+
is_null: "is_null";
|
|
510
|
+
lt: "lt";
|
|
511
|
+
lte: "lte";
|
|
512
|
+
neq: "neq";
|
|
513
|
+
starts_with: "starts_with";
|
|
514
|
+
}>;
|
|
515
|
+
type FilterOperand = z.infer<typeof filterOperandSchema>;
|
|
516
|
+
/**
|
|
517
|
+
* Aktivite türü (spec §6.2) — `stage_change` Faz 5 Task 3'ün `/move` ucunun
|
|
518
|
+
* ürettiği otomatik aktiviteyle eşleşir (bkz. `apps/api/src/routes/deals.ts`).
|
|
519
|
+
*/
|
|
520
|
+
declare const activityKindSchema: z.ZodEnum<{
|
|
521
|
+
call: "call";
|
|
522
|
+
email: "email";
|
|
523
|
+
meeting: "meeting";
|
|
524
|
+
note: "note";
|
|
525
|
+
stage_change: "stage_change";
|
|
526
|
+
task: "task";
|
|
527
|
+
}>;
|
|
528
|
+
type ActivityKind = z.infer<typeof activityKindSchema>;
|
|
529
|
+
/** Spec'te tam liste verilmemiş — makul bir başlangıç kümesi (bkz. plan "Yeni ortak altyapı kararları / D") */
|
|
530
|
+
declare const taskStatusSchema: z.ZodEnum<{
|
|
531
|
+
cancelled: "cancelled";
|
|
532
|
+
done: "done";
|
|
533
|
+
in_progress: "in_progress";
|
|
534
|
+
todo: "todo";
|
|
535
|
+
}>;
|
|
536
|
+
type TaskStatus = z.infer<typeof taskStatusSchema>;
|
|
537
|
+
/** Spec'in verdiği tam liste (§6.2) */
|
|
538
|
+
declare const taskPrioritySchema: z.ZodEnum<{
|
|
539
|
+
high: "high";
|
|
540
|
+
low: "low";
|
|
541
|
+
normal: "normal";
|
|
542
|
+
urgent: "urgent";
|
|
543
|
+
}>;
|
|
544
|
+
type TaskPriority = z.infer<typeof taskPrioritySchema>;
|
|
545
|
+
/**
|
|
546
|
+
* Görev/not için ortak "hedefe bağla" gövdesi (spec §6.3) — `task_links`/
|
|
547
|
+
* `note_links` ikisi de aynı şekli kullanır (bkz. `apps/api/src/routes/tasks.ts`,
|
|
548
|
+
* `notes.ts`).
|
|
549
|
+
*/
|
|
550
|
+
declare const attachLinkRequestSchema: z.ZodObject<{
|
|
551
|
+
targetType: z.ZodEnum<{
|
|
552
|
+
company: "company";
|
|
553
|
+
contact: "contact";
|
|
554
|
+
deal: "deal";
|
|
555
|
+
}>;
|
|
556
|
+
targetId: z.ZodUUID;
|
|
557
|
+
}, z.core.$strip>;
|
|
558
|
+
type AttachLinkRequest = z.infer<typeof attachLinkRequestSchema>;
|
|
559
|
+
/**
|
|
560
|
+
* Kaydedilmiş görünüm katalogları (spec §6.5, Faz 5 Task 5).
|
|
561
|
+
* `savedViewResourceSchema` = `CRM_RESOURCES`'ın zod karşılığı — `fields.ts`
|
|
562
|
+
* DEĞİŞTİRİLMEDEN (`CRM_RESOURCES` sabiti oradan İÇE AKTARILIR, yeniden
|
|
563
|
+
* TANIMLANMAZ, tek gerçek kaynak korunur).
|
|
564
|
+
*/
|
|
565
|
+
declare const savedViewResourceSchema: z.ZodEnum<{
|
|
566
|
+
companies: "companies";
|
|
567
|
+
contacts: "contacts";
|
|
568
|
+
deals: "deals";
|
|
569
|
+
tasks: "tasks";
|
|
570
|
+
}>;
|
|
571
|
+
type SavedViewResource = z.infer<typeof savedViewResourceSchema>;
|
|
572
|
+
declare const savedViewLayoutSchema: z.ZodEnum<{
|
|
573
|
+
kanban: "kanban";
|
|
574
|
+
table: "table";
|
|
575
|
+
}>;
|
|
576
|
+
type SavedViewLayout = z.infer<typeof savedViewLayoutSchema>;
|
|
577
|
+
declare const savedViewVisibilitySchema: z.ZodEnum<{
|
|
578
|
+
private: "private";
|
|
579
|
+
tenant: "tenant";
|
|
580
|
+
}>;
|
|
581
|
+
type SavedViewVisibility = z.infer<typeof savedViewVisibilitySchema>;
|
|
582
|
+
declare const filterLogicalOperatorSchema: z.ZodEnum<{
|
|
583
|
+
and: "and";
|
|
584
|
+
not: "not";
|
|
585
|
+
or: "or";
|
|
586
|
+
}>;
|
|
587
|
+
type FilterLogicalOperator = z.infer<typeof filterLogicalOperatorSchema>;
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region packages/contracts/src/deals.d.ts
|
|
590
|
+
declare const createDealRequestSchema: z.ZodObject<{
|
|
591
|
+
title: z.ZodString;
|
|
592
|
+
pipelineId: z.ZodUUID;
|
|
593
|
+
stageId: z.ZodUUID;
|
|
594
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
595
|
+
currencyCode: z.ZodDefault<z.ZodString>;
|
|
596
|
+
companyId: z.ZodOptional<z.ZodUUID>;
|
|
597
|
+
primaryContactId: z.ZodOptional<z.ZodUUID>;
|
|
598
|
+
expectedCloseDate: z.ZodOptional<z.ZodISODateTime>;
|
|
599
|
+
ownerUserId: z.ZodOptional<z.ZodUUID>;
|
|
600
|
+
}, z.core.$strip>;
|
|
601
|
+
type CreateDealRequest = z.infer<typeof createDealRequestSchema>;
|
|
602
|
+
/**
|
|
603
|
+
* Genel güncelleme — `stageId`/`pipelineId`/`position`/`outcome`/`closedAt`
|
|
604
|
+
* BİLEREK YOK (bkz. dosya başı KRİTİK KURAL). `.strict()`: bu alanlardan biri
|
|
605
|
+
* gönderilirse 400 (bkz. `apps/api/test/deals.test.ts`).
|
|
606
|
+
*/
|
|
607
|
+
declare const updateDealRequestSchema: z.ZodObject<{
|
|
608
|
+
title: z.ZodOptional<z.ZodString>;
|
|
609
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
610
|
+
currencyCode: z.ZodOptional<z.ZodString>;
|
|
611
|
+
companyId: z.ZodOptional<z.ZodUUID>;
|
|
612
|
+
primaryContactId: z.ZodOptional<z.ZodUUID>;
|
|
613
|
+
expectedCloseDate: z.ZodOptional<z.ZodISODateTime>;
|
|
614
|
+
ownerUserId: z.ZodOptional<z.ZodUUID>;
|
|
615
|
+
lostReason: z.ZodOptional<z.ZodString>;
|
|
616
|
+
}, z.core.$strict>;
|
|
617
|
+
type UpdateDealRequest = z.infer<typeof updateDealRequestSchema>;
|
|
618
|
+
/**
|
|
619
|
+
* Kanban taşıma kontratı (spec §6.4) — pipeline'ın `reorderRequestSchema`'sıyla
|
|
620
|
+
* AYNI komşu şekli (`beforeId`/`afterId`), yalnız `stageId` hedefi eklenir.
|
|
621
|
+
* `pipelineId` YOK: hedef aşamanın pipeline'ı, fırsatın yeni pipeline'ı olarak
|
|
622
|
+
* KABUL EDİLİR (bkz. routes/deals.ts) — istemcinin ayrıca tutarlı bir
|
|
623
|
+
* `pipelineId` göndermesini gerektirmeden çapraz-pipeline taşımaya izin verir.
|
|
624
|
+
*/
|
|
625
|
+
declare const moveDealRequestSchema: z.ZodObject<{
|
|
626
|
+
stageId: z.ZodUUID;
|
|
627
|
+
beforeId: z.ZodOptional<z.ZodUUID>;
|
|
628
|
+
afterId: z.ZodOptional<z.ZodUUID>;
|
|
629
|
+
}, z.core.$strip>;
|
|
630
|
+
type MoveDealRequest = z.infer<typeof moveDealRequestSchema>;
|
|
631
|
+
declare const attachDealContactRequestSchema: z.ZodObject<{
|
|
632
|
+
contactId: z.ZodUUID;
|
|
633
|
+
role: z.ZodOptional<z.ZodString>;
|
|
634
|
+
}, z.core.$strip>;
|
|
635
|
+
type AttachDealContactRequest = z.infer<typeof attachDealContactRequestSchema>;
|
|
636
|
+
declare const dealContactResponseSchema: z.ZodObject<{
|
|
637
|
+
contactId: z.ZodUUID;
|
|
638
|
+
role: z.ZodNullable<z.ZodString>;
|
|
639
|
+
createdAt: z.ZodISODateTime;
|
|
640
|
+
}, z.core.$strip>;
|
|
641
|
+
type DealContactResponse = z.infer<typeof dealContactResponseSchema>;
|
|
642
|
+
declare const dealResponseSchema: z.ZodObject<{
|
|
643
|
+
id: z.ZodUUID;
|
|
644
|
+
pipelineId: z.ZodUUID;
|
|
645
|
+
stageId: z.ZodUUID;
|
|
646
|
+
companyId: z.ZodNullable<z.ZodUUID>;
|
|
647
|
+
primaryContactId: z.ZodNullable<z.ZodUUID>;
|
|
648
|
+
title: z.ZodString;
|
|
649
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
650
|
+
currencyCode: z.ZodString;
|
|
651
|
+
position: z.ZodNumber;
|
|
652
|
+
expectedCloseDate: z.ZodNullable<z.ZodISODateTime>;
|
|
653
|
+
closedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
654
|
+
outcome: z.ZodEnum<{
|
|
655
|
+
lost: "lost";
|
|
656
|
+
open: "open";
|
|
657
|
+
won: "won";
|
|
658
|
+
}>;
|
|
659
|
+
lostReason: z.ZodNullable<z.ZodString>;
|
|
660
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
661
|
+
createdAt: z.ZodISODateTime;
|
|
662
|
+
updatedAt: z.ZodISODateTime;
|
|
663
|
+
}, z.core.$strip>;
|
|
664
|
+
type DealResponse = z.infer<typeof dealResponseSchema>;
|
|
665
|
+
/** Detay ucu (`GET /deals/:id`) yanıtı — liste ucunun AKSİNE `contacts` içerir (N+1 yok: tek ek sorgu, bkz. routes/deals.ts) */
|
|
666
|
+
declare const dealDetailResponseSchema: z.ZodObject<{
|
|
667
|
+
id: z.ZodUUID;
|
|
668
|
+
pipelineId: z.ZodUUID;
|
|
669
|
+
stageId: z.ZodUUID;
|
|
670
|
+
companyId: z.ZodNullable<z.ZodUUID>;
|
|
671
|
+
primaryContactId: z.ZodNullable<z.ZodUUID>;
|
|
672
|
+
title: z.ZodString;
|
|
673
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
674
|
+
currencyCode: z.ZodString;
|
|
675
|
+
position: z.ZodNumber;
|
|
676
|
+
expectedCloseDate: z.ZodNullable<z.ZodISODateTime>;
|
|
677
|
+
closedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
678
|
+
outcome: z.ZodEnum<{
|
|
679
|
+
lost: "lost";
|
|
680
|
+
open: "open";
|
|
681
|
+
won: "won";
|
|
682
|
+
}>;
|
|
683
|
+
lostReason: z.ZodNullable<z.ZodString>;
|
|
684
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
685
|
+
createdAt: z.ZodISODateTime;
|
|
686
|
+
updatedAt: z.ZodISODateTime;
|
|
687
|
+
contacts: z.ZodArray<z.ZodObject<{
|
|
688
|
+
contactId: z.ZodUUID;
|
|
689
|
+
role: z.ZodNullable<z.ZodString>;
|
|
690
|
+
createdAt: z.ZodISODateTime;
|
|
691
|
+
}, z.core.$strip>>;
|
|
692
|
+
}, z.core.$strip>;
|
|
693
|
+
type DealDetailResponse = z.infer<typeof dealDetailResponseSchema>;
|
|
694
|
+
declare const dealsPagedResponseSchema: z.ZodObject<{
|
|
695
|
+
items: z.ZodArray<z.ZodObject<{
|
|
696
|
+
id: z.ZodUUID;
|
|
697
|
+
pipelineId: z.ZodUUID;
|
|
698
|
+
stageId: z.ZodUUID;
|
|
699
|
+
companyId: z.ZodNullable<z.ZodUUID>;
|
|
700
|
+
primaryContactId: z.ZodNullable<z.ZodUUID>;
|
|
701
|
+
title: z.ZodString;
|
|
702
|
+
amount: z.ZodNullable<z.ZodString>;
|
|
703
|
+
currencyCode: z.ZodString;
|
|
704
|
+
position: z.ZodNumber;
|
|
705
|
+
expectedCloseDate: z.ZodNullable<z.ZodISODateTime>;
|
|
706
|
+
closedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
707
|
+
outcome: z.ZodEnum<{
|
|
708
|
+
lost: "lost";
|
|
709
|
+
open: "open";
|
|
710
|
+
won: "won";
|
|
711
|
+
}>;
|
|
712
|
+
lostReason: z.ZodNullable<z.ZodString>;
|
|
713
|
+
ownerUserId: z.ZodNullable<z.ZodUUID>;
|
|
714
|
+
createdAt: z.ZodISODateTime;
|
|
715
|
+
updatedAt: z.ZodISODateTime;
|
|
716
|
+
}, z.core.$strip>>;
|
|
717
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
718
|
+
hasMore: z.ZodBoolean;
|
|
719
|
+
}, z.core.$strip>;
|
|
720
|
+
type DealsPagedResponse = z.infer<typeof dealsPagedResponseSchema>;
|
|
721
|
+
//#endregion
|
|
722
|
+
//#region packages/contracts/src/notes.d.ts
|
|
723
|
+
declare const createNoteRequestSchema: z.ZodObject<{
|
|
724
|
+
title: z.ZodOptional<z.ZodString>;
|
|
725
|
+
body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
726
|
+
bodyFormat: z.ZodOptional<z.ZodString>;
|
|
727
|
+
authorUserId: z.ZodOptional<z.ZodUUID>;
|
|
728
|
+
}, z.core.$strip>;
|
|
729
|
+
type CreateNoteRequest = z.infer<typeof createNoteRequestSchema>;
|
|
730
|
+
declare const updateNoteRequestSchema: z.ZodObject<{
|
|
731
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
732
|
+
body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
733
|
+
bodyFormat: z.ZodOptional<z.ZodString>;
|
|
734
|
+
authorUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
735
|
+
}, z.core.$strip>;
|
|
736
|
+
type UpdateNoteRequest = z.infer<typeof updateNoteRequestSchema>;
|
|
737
|
+
declare const noteLinkResponseSchema: z.ZodObject<{
|
|
738
|
+
id: z.ZodUUID;
|
|
739
|
+
targetType: z.ZodEnum<{
|
|
740
|
+
company: "company";
|
|
741
|
+
contact: "contact";
|
|
742
|
+
deal: "deal";
|
|
743
|
+
}>;
|
|
744
|
+
targetId: z.ZodUUID;
|
|
745
|
+
targetCachedName: z.ZodString;
|
|
746
|
+
createdAt: z.ZodISODateTime;
|
|
747
|
+
}, z.core.$strip>;
|
|
748
|
+
type NoteLinkResponse = z.infer<typeof noteLinkResponseSchema>;
|
|
749
|
+
declare const noteResponseSchema: z.ZodObject<{
|
|
750
|
+
id: z.ZodUUID;
|
|
751
|
+
title: z.ZodNullable<z.ZodString>;
|
|
752
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
753
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
754
|
+
authorUserId: z.ZodNullable<z.ZodUUID>;
|
|
755
|
+
createdAt: z.ZodISODateTime;
|
|
756
|
+
updatedAt: z.ZodISODateTime;
|
|
757
|
+
}, z.core.$strip>;
|
|
758
|
+
type NoteResponse = z.infer<typeof noteResponseSchema>;
|
|
759
|
+
/** Detay ucu (`GET /notes/:id`) yanıtı — liste ucunun AKSİNE `links` içerir (N+1 yok: tek ek sorgu) */
|
|
760
|
+
declare const noteDetailResponseSchema: z.ZodObject<{
|
|
761
|
+
id: z.ZodUUID;
|
|
762
|
+
title: z.ZodNullable<z.ZodString>;
|
|
763
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
764
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
765
|
+
authorUserId: z.ZodNullable<z.ZodUUID>;
|
|
766
|
+
createdAt: z.ZodISODateTime;
|
|
767
|
+
updatedAt: z.ZodISODateTime;
|
|
768
|
+
links: z.ZodArray<z.ZodObject<{
|
|
769
|
+
id: z.ZodUUID;
|
|
770
|
+
targetType: z.ZodEnum<{
|
|
771
|
+
company: "company";
|
|
772
|
+
contact: "contact";
|
|
773
|
+
deal: "deal";
|
|
774
|
+
}>;
|
|
775
|
+
targetId: z.ZodUUID;
|
|
776
|
+
targetCachedName: z.ZodString;
|
|
777
|
+
createdAt: z.ZodISODateTime;
|
|
778
|
+
}, z.core.$strip>>;
|
|
779
|
+
}, z.core.$strip>;
|
|
780
|
+
type NoteDetailResponse = z.infer<typeof noteDetailResponseSchema>;
|
|
781
|
+
declare const notesPagedResponseSchema: z.ZodObject<{
|
|
782
|
+
items: z.ZodArray<z.ZodObject<{
|
|
783
|
+
id: z.ZodUUID;
|
|
784
|
+
title: z.ZodNullable<z.ZodString>;
|
|
785
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
786
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
787
|
+
authorUserId: z.ZodNullable<z.ZodUUID>;
|
|
788
|
+
createdAt: z.ZodISODateTime;
|
|
789
|
+
updatedAt: z.ZodISODateTime;
|
|
790
|
+
}, z.core.$strip>>;
|
|
791
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
792
|
+
hasMore: z.ZodBoolean;
|
|
793
|
+
}, z.core.$strip>;
|
|
794
|
+
type NotesPagedResponse = z.infer<typeof notesPagedResponseSchema>;
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region packages/contracts/src/pagination.d.ts
|
|
797
|
+
declare const PAGE_DEFAULT_LIMIT = 25;
|
|
798
|
+
declare const PAGE_MAX_LIMIT = 100;
|
|
799
|
+
declare const pageQuerySchema: z.ZodObject<{
|
|
800
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
801
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
802
|
+
}, z.core.$strip>;
|
|
803
|
+
type PageQuery = z.infer<typeof pageQuerySchema>;
|
|
804
|
+
//#endregion
|
|
805
|
+
//#region packages/contracts/src/pipelines.d.ts
|
|
806
|
+
declare const createPipelineRequestSchema: z.ZodObject<{
|
|
807
|
+
name: z.ZodString;
|
|
808
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
809
|
+
}, z.core.$strip>;
|
|
810
|
+
type CreatePipelineRequest = z.infer<typeof createPipelineRequestSchema>;
|
|
811
|
+
declare const updatePipelineRequestSchema: z.ZodObject<{
|
|
812
|
+
name: z.ZodOptional<z.ZodString>;
|
|
813
|
+
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
814
|
+
}, z.core.$strip>;
|
|
815
|
+
type UpdatePipelineRequest = z.infer<typeof updatePipelineRequestSchema>;
|
|
816
|
+
declare const pipelineResponseSchema: z.ZodObject<{
|
|
817
|
+
id: z.ZodUUID;
|
|
818
|
+
name: z.ZodString;
|
|
819
|
+
isDefault: z.ZodBoolean;
|
|
820
|
+
position: z.ZodNumber;
|
|
821
|
+
createdAt: z.ZodISODateTime;
|
|
822
|
+
updatedAt: z.ZodISODateTime;
|
|
823
|
+
}, z.core.$strip>;
|
|
824
|
+
type PipelineResponse = z.infer<typeof pipelineResponseSchema>;
|
|
825
|
+
declare const pipelinesResponseSchema: z.ZodObject<{
|
|
826
|
+
pipelines: z.ZodArray<z.ZodObject<{
|
|
827
|
+
id: z.ZodUUID;
|
|
828
|
+
name: z.ZodString;
|
|
829
|
+
isDefault: z.ZodBoolean;
|
|
830
|
+
position: z.ZodNumber;
|
|
831
|
+
createdAt: z.ZodISODateTime;
|
|
832
|
+
updatedAt: z.ZodISODateTime;
|
|
833
|
+
}, z.core.$strip>>;
|
|
834
|
+
}, z.core.$strip>;
|
|
835
|
+
type PipelinesResponse = z.infer<typeof pipelinesResponseSchema>;
|
|
836
|
+
declare const createStageRequestSchema: z.ZodObject<{
|
|
837
|
+
key: z.ZodString;
|
|
838
|
+
label: z.ZodString;
|
|
839
|
+
color: z.ZodOptional<z.ZodString>;
|
|
840
|
+
probability: z.ZodOptional<z.ZodNumber>;
|
|
841
|
+
isWon: z.ZodOptional<z.ZodBoolean>;
|
|
842
|
+
isLost: z.ZodOptional<z.ZodBoolean>;
|
|
843
|
+
}, z.core.$strip>;
|
|
844
|
+
type CreateStageRequest = z.infer<typeof createStageRequestSchema>;
|
|
845
|
+
declare const updateStageRequestSchema: z.ZodObject<{
|
|
846
|
+
key: z.ZodOptional<z.ZodString>;
|
|
847
|
+
label: z.ZodOptional<z.ZodString>;
|
|
848
|
+
color: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
849
|
+
probability: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
850
|
+
isWon: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
851
|
+
isLost: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
852
|
+
}, z.core.$strip>;
|
|
853
|
+
type UpdateStageRequest = z.infer<typeof updateStageRequestSchema>;
|
|
854
|
+
declare const stageResponseSchema: z.ZodObject<{
|
|
855
|
+
id: z.ZodUUID;
|
|
856
|
+
pipelineId: z.ZodUUID;
|
|
857
|
+
key: z.ZodString;
|
|
858
|
+
label: z.ZodString;
|
|
859
|
+
color: z.ZodNullable<z.ZodString>;
|
|
860
|
+
position: z.ZodNumber;
|
|
861
|
+
probability: z.ZodNullable<z.ZodString>;
|
|
862
|
+
isWon: z.ZodBoolean;
|
|
863
|
+
isLost: z.ZodBoolean;
|
|
864
|
+
createdAt: z.ZodISODateTime;
|
|
865
|
+
updatedAt: z.ZodISODateTime;
|
|
866
|
+
}, z.core.$strip>;
|
|
867
|
+
type StageResponse = z.infer<typeof stageResponseSchema>;
|
|
868
|
+
declare const stagesResponseSchema: z.ZodObject<{
|
|
869
|
+
stages: z.ZodArray<z.ZodObject<{
|
|
870
|
+
id: z.ZodUUID;
|
|
871
|
+
pipelineId: z.ZodUUID;
|
|
872
|
+
key: z.ZodString;
|
|
873
|
+
label: z.ZodString;
|
|
874
|
+
color: z.ZodNullable<z.ZodString>;
|
|
875
|
+
position: z.ZodNumber;
|
|
876
|
+
probability: z.ZodNullable<z.ZodString>;
|
|
877
|
+
isWon: z.ZodBoolean;
|
|
878
|
+
isLost: z.ZodBoolean;
|
|
879
|
+
createdAt: z.ZodISODateTime;
|
|
880
|
+
updatedAt: z.ZodISODateTime;
|
|
881
|
+
}, z.core.$strip>>;
|
|
882
|
+
}, z.core.$strip>;
|
|
883
|
+
type StagesResponse = z.infer<typeof stagesResponseSchema>;
|
|
884
|
+
/**
|
|
885
|
+
* Kanban taşıma/yeniden sıralama kontratı — Task 3'teki deal `/move` ucu
|
|
886
|
+
* AYNI şekli kullanır (plan "Yeni ortak altyapı kararları / B/C"). En az
|
|
887
|
+
* birinin verilmesi ZORUNLU DEĞİL: ikisi de boşsa "listenin sonuna taşı"
|
|
888
|
+
* anlamına gelir (bkz. routes/pipelines.ts).
|
|
889
|
+
*/
|
|
890
|
+
declare const reorderRequestSchema: z.ZodObject<{
|
|
891
|
+
beforeId: z.ZodOptional<z.ZodUUID>;
|
|
892
|
+
afterId: z.ZodOptional<z.ZodUUID>;
|
|
893
|
+
}, z.core.$strip>;
|
|
894
|
+
type ReorderRequest = z.infer<typeof reorderRequestSchema>;
|
|
895
|
+
//#endregion
|
|
896
|
+
//#region packages/contracts/src/saved-views.d.ts
|
|
897
|
+
declare const filterLeafSchema: z.ZodObject<{
|
|
898
|
+
fieldKey: z.ZodString;
|
|
899
|
+
operand: z.ZodEnum<{
|
|
900
|
+
contains: "contains";
|
|
901
|
+
eq: "eq";
|
|
902
|
+
gt: "gt";
|
|
903
|
+
gte: "gte";
|
|
904
|
+
in: "in";
|
|
905
|
+
is_not_null: "is_not_null";
|
|
906
|
+
is_null: "is_null";
|
|
907
|
+
lt: "lt";
|
|
908
|
+
lte: "lte";
|
|
909
|
+
neq: "neq";
|
|
910
|
+
starts_with: "starts_with";
|
|
911
|
+
}>;
|
|
912
|
+
value: z.ZodUnknown;
|
|
913
|
+
}, z.core.$strip>;
|
|
914
|
+
type FilterLeafInput = z.infer<typeof filterLeafSchema>;
|
|
915
|
+
/** İç içe filtre grubu — özyinelemeli TypeScript arayüzü, `filterGroupSchema` bunun zod karşılığıdır */
|
|
916
|
+
interface FilterGroupInput {
|
|
917
|
+
logicalOperator: z.infer<typeof filterLogicalOperatorSchema>;
|
|
918
|
+
filters: FilterLeafInput[];
|
|
919
|
+
groups: FilterGroupInput[];
|
|
920
|
+
}
|
|
921
|
+
declare const createSavedViewRequestSchema: z.ZodObject<{
|
|
922
|
+
name: z.ZodString;
|
|
923
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
924
|
+
resource: z.ZodEnum<{
|
|
925
|
+
companies: "companies";
|
|
926
|
+
contacts: "contacts";
|
|
927
|
+
deals: "deals";
|
|
928
|
+
tasks: "tasks";
|
|
929
|
+
}>;
|
|
930
|
+
layout: z.ZodDefault<z.ZodEnum<{
|
|
931
|
+
kanban: "kanban";
|
|
932
|
+
table: "table";
|
|
933
|
+
}>>;
|
|
934
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
935
|
+
private: "private";
|
|
936
|
+
tenant: "tenant";
|
|
937
|
+
}>>;
|
|
938
|
+
groupByFieldKey: z.ZodOptional<z.ZodString>;
|
|
939
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
940
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
941
|
+
fieldKey: z.ZodString;
|
|
942
|
+
isVisible: z.ZodDefault<z.ZodBoolean>;
|
|
943
|
+
}, z.core.$strip>>>;
|
|
944
|
+
sorts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
945
|
+
fieldKey: z.ZodString;
|
|
946
|
+
direction: z.ZodEnum<{
|
|
947
|
+
asc: "asc";
|
|
948
|
+
desc: "desc";
|
|
949
|
+
}>;
|
|
950
|
+
}, z.core.$strip>>>;
|
|
951
|
+
rootFilterGroup: z.ZodOptional<z.ZodType<FilterGroupInput, unknown, z.core.$ZodTypeInternals<FilterGroupInput, unknown>>>;
|
|
952
|
+
}, z.core.$strip>;
|
|
953
|
+
type CreateSavedViewRequest = z.infer<typeof createSavedViewRequestSchema>;
|
|
954
|
+
/**
|
|
955
|
+
* Güncelleme — TÜM alanlar opsiyonel, `fields`/`sorts`/`rootFilterGroup`
|
|
956
|
+
* GÖNDERİLDİĞİNDE mevcut kaydı TAMAMEN DEĞİŞTİRİR (bkz. `routes/saved-views.ts`
|
|
957
|
+
* — "sil + yeniden ekle" kalıbı, kısmi/tekil satır güncellemesi YOK, drift
|
|
958
|
+
* riskini ortadan kaldırmak için bilinçli bir sadeleştirme).
|
|
959
|
+
*
|
|
960
|
+
* KRİTİK KURAL: `resource` BİLEREK TANIMLANMADI ve `.strict()` kullanılır —
|
|
961
|
+
* `deals.ts`'in `updateDealRequestSchema`'sıyla AYNI gerekçe (bkz. o dosyanın
|
|
962
|
+
* KRİTİK KURALI): bir görünümün kaynağını (contacts/companies/deals/tasks)
|
|
963
|
+
* PATCH ile "sessizce yok say"mak yerine `resource` gönderilirse zod'un
|
|
964
|
+
* `unrecognized_keys` hatasıyla AÇIKÇA reddedilir — kullanıcı "değiştirdim
|
|
965
|
+
* sandığı ama aslında değişmeyen" bir alanla YANILTILMAZ.
|
|
966
|
+
*/
|
|
967
|
+
declare const updateSavedViewRequestSchema: z.ZodObject<{
|
|
968
|
+
name: z.ZodOptional<z.ZodString>;
|
|
969
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
970
|
+
layout: z.ZodOptional<z.ZodEnum<{
|
|
971
|
+
kanban: "kanban";
|
|
972
|
+
table: "table";
|
|
973
|
+
}>>;
|
|
974
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
975
|
+
private: "private";
|
|
976
|
+
tenant: "tenant";
|
|
977
|
+
}>>;
|
|
978
|
+
groupByFieldKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
979
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
980
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
981
|
+
fieldKey: z.ZodString;
|
|
982
|
+
isVisible: z.ZodDefault<z.ZodBoolean>;
|
|
983
|
+
}, z.core.$strip>>>;
|
|
984
|
+
sorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
985
|
+
fieldKey: z.ZodString;
|
|
986
|
+
direction: z.ZodEnum<{
|
|
987
|
+
asc: "asc";
|
|
988
|
+
desc: "desc";
|
|
989
|
+
}>;
|
|
990
|
+
}, z.core.$strip>>>;
|
|
991
|
+
rootFilterGroup: z.ZodOptional<z.ZodNullable<z.ZodType<FilterGroupInput, unknown, z.core.$ZodTypeInternals<FilterGroupInput, unknown>>>>;
|
|
992
|
+
}, z.core.$strict>;
|
|
993
|
+
type UpdateSavedViewRequest = z.infer<typeof updateSavedViewRequestSchema>;
|
|
994
|
+
declare const savedViewFieldResponseSchema: z.ZodObject<{
|
|
995
|
+
fieldKey: z.ZodString;
|
|
996
|
+
isVisible: z.ZodBoolean;
|
|
997
|
+
}, z.core.$strip>;
|
|
998
|
+
type SavedViewFieldResponse = z.infer<typeof savedViewFieldResponseSchema>;
|
|
999
|
+
declare const savedViewSortResponseSchema: z.ZodObject<{
|
|
1000
|
+
fieldKey: z.ZodString;
|
|
1001
|
+
direction: z.ZodEnum<{
|
|
1002
|
+
asc: "asc";
|
|
1003
|
+
desc: "desc";
|
|
1004
|
+
}>;
|
|
1005
|
+
}, z.core.$strip>;
|
|
1006
|
+
type SavedViewSortResponse = z.infer<typeof savedViewSortResponseSchema>;
|
|
1007
|
+
declare const savedViewResponseSchema: z.ZodObject<{
|
|
1008
|
+
id: z.ZodUUID;
|
|
1009
|
+
name: z.ZodString;
|
|
1010
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
1011
|
+
resource: z.ZodEnum<{
|
|
1012
|
+
companies: "companies";
|
|
1013
|
+
contacts: "contacts";
|
|
1014
|
+
deals: "deals";
|
|
1015
|
+
tasks: "tasks";
|
|
1016
|
+
}>;
|
|
1017
|
+
layout: z.ZodEnum<{
|
|
1018
|
+
kanban: "kanban";
|
|
1019
|
+
table: "table";
|
|
1020
|
+
}>;
|
|
1021
|
+
position: z.ZodNumber;
|
|
1022
|
+
visibility: z.ZodEnum<{
|
|
1023
|
+
private: "private";
|
|
1024
|
+
tenant: "tenant";
|
|
1025
|
+
}>;
|
|
1026
|
+
createdById: z.ZodUUID;
|
|
1027
|
+
groupByFieldKey: z.ZodNullable<z.ZodString>;
|
|
1028
|
+
isDefault: z.ZodBoolean;
|
|
1029
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
1030
|
+
fieldKey: z.ZodString;
|
|
1031
|
+
isVisible: z.ZodBoolean;
|
|
1032
|
+
}, z.core.$strip>>;
|
|
1033
|
+
sorts: z.ZodArray<z.ZodObject<{
|
|
1034
|
+
fieldKey: z.ZodString;
|
|
1035
|
+
direction: z.ZodEnum<{
|
|
1036
|
+
asc: "asc";
|
|
1037
|
+
desc: "desc";
|
|
1038
|
+
}>;
|
|
1039
|
+
}, z.core.$strip>>;
|
|
1040
|
+
rootFilterGroup: z.ZodNullable<z.ZodType<FilterGroupInput, unknown, z.core.$ZodTypeInternals<FilterGroupInput, unknown>>>;
|
|
1041
|
+
createdAt: z.ZodISODateTime;
|
|
1042
|
+
updatedAt: z.ZodISODateTime;
|
|
1043
|
+
}, z.core.$strip>;
|
|
1044
|
+
type SavedViewResponse = z.infer<typeof savedViewResponseSchema>;
|
|
1045
|
+
/**
|
|
1046
|
+
* Liste ucu (`GET /saved-views`) YANITI — özet şekil, `fields`/`sorts`/
|
|
1047
|
+
* `rootFilterGroup` İÇERMEZ (bkz. `apps/api/src/routes/saved-views.ts`
|
|
1048
|
+
* KRİTİK KURAL — N+1 önleme: bir tenant'ın TÜM görünümlerini listelerken
|
|
1049
|
+
* her biri için 4 ek sorgu (fields/sorts/groups/filters) atmak N+1 olurdu;
|
|
1050
|
+
* tam detay yalnız TEKİL görünüm uçlarında (`GET .../saved-views/:viewId`,
|
|
1051
|
+
* `POST .../apply`) döner — o uçlarda "N" zaten 1'dir).
|
|
1052
|
+
*/
|
|
1053
|
+
declare const savedViewSummaryResponseSchema: z.ZodObject<{
|
|
1054
|
+
id: z.ZodUUID;
|
|
1055
|
+
name: z.ZodString;
|
|
1056
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
1057
|
+
resource: z.ZodEnum<{
|
|
1058
|
+
companies: "companies";
|
|
1059
|
+
contacts: "contacts";
|
|
1060
|
+
deals: "deals";
|
|
1061
|
+
tasks: "tasks";
|
|
1062
|
+
}>;
|
|
1063
|
+
layout: z.ZodEnum<{
|
|
1064
|
+
kanban: "kanban";
|
|
1065
|
+
table: "table";
|
|
1066
|
+
}>;
|
|
1067
|
+
position: z.ZodNumber;
|
|
1068
|
+
visibility: z.ZodEnum<{
|
|
1069
|
+
private: "private";
|
|
1070
|
+
tenant: "tenant";
|
|
1071
|
+
}>;
|
|
1072
|
+
createdById: z.ZodUUID;
|
|
1073
|
+
isDefault: z.ZodBoolean;
|
|
1074
|
+
createdAt: z.ZodISODateTime;
|
|
1075
|
+
updatedAt: z.ZodISODateTime;
|
|
1076
|
+
}, z.core.$strip>;
|
|
1077
|
+
type SavedViewSummaryResponse = z.infer<typeof savedViewSummaryResponseSchema>;
|
|
1078
|
+
declare const savedViewsListResponseSchema: z.ZodObject<{
|
|
1079
|
+
views: z.ZodArray<z.ZodObject<{
|
|
1080
|
+
id: z.ZodUUID;
|
|
1081
|
+
name: z.ZodString;
|
|
1082
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
1083
|
+
resource: z.ZodEnum<{
|
|
1084
|
+
companies: "companies";
|
|
1085
|
+
contacts: "contacts";
|
|
1086
|
+
deals: "deals";
|
|
1087
|
+
tasks: "tasks";
|
|
1088
|
+
}>;
|
|
1089
|
+
layout: z.ZodEnum<{
|
|
1090
|
+
kanban: "kanban";
|
|
1091
|
+
table: "table";
|
|
1092
|
+
}>;
|
|
1093
|
+
position: z.ZodNumber;
|
|
1094
|
+
visibility: z.ZodEnum<{
|
|
1095
|
+
private: "private";
|
|
1096
|
+
tenant: "tenant";
|
|
1097
|
+
}>;
|
|
1098
|
+
createdById: z.ZodUUID;
|
|
1099
|
+
isDefault: z.ZodBoolean;
|
|
1100
|
+
createdAt: z.ZodISODateTime;
|
|
1101
|
+
updatedAt: z.ZodISODateTime;
|
|
1102
|
+
}, z.core.$strip>>;
|
|
1103
|
+
}, z.core.$strip>;
|
|
1104
|
+
type SavedViewsListResponse = z.infer<typeof savedViewsListResponseSchema>;
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region packages/contracts/src/search.d.ts
|
|
1107
|
+
/**
|
|
1108
|
+
* Aranabilir kaynaklar. `CRM_RESOURCES`'ın (`fields.ts`) ALT KÜMESİ ve bu
|
|
1109
|
+
* bilinçli: `tasks` DIŞARIDA çünkü aranacak metni (`title`) `search_vector`'da
|
|
1110
|
+
* olsa da bu uç `contacts`/`companies`/`deals` üçlüsünün "kime/neye ait"
|
|
1111
|
+
* sorusunu yanıtlar — görev arama zaman çizelgesi yüzeyine aittir. Genişletmek
|
|
1112
|
+
* isteyen: `SEARCHABLE_RESOURCES`'a ekle VE `routes/search.ts`'e o kaynağın
|
|
1113
|
+
* kendi `.select()` bloğunu ekle (ikisi ayrı adımdır, biri diğerini getirmez).
|
|
1114
|
+
*/
|
|
1115
|
+
declare const SEARCHABLE_RESOURCES: readonly ['contacts', 'companies', 'deals'];
|
|
1116
|
+
declare const searchableResourceSchema: z.ZodEnum<{
|
|
1117
|
+
companies: "companies";
|
|
1118
|
+
contacts: "contacts";
|
|
1119
|
+
deals: "deals";
|
|
1120
|
+
}>;
|
|
1121
|
+
type SearchableResource = z.infer<typeof searchableResourceSchema>;
|
|
1122
|
+
declare const SEARCH_DEFAULT_LIMIT = 20;
|
|
1123
|
+
declare const SEARCH_MAX_LIMIT = 50;
|
|
1124
|
+
declare const SEARCH_QUERY_MAX_LENGTH = 200;
|
|
1125
|
+
declare const searchResultItemSchema: z.ZodObject<{
|
|
1126
|
+
id: z.ZodUUID;
|
|
1127
|
+
resource: z.ZodEnum<{
|
|
1128
|
+
companies: "companies";
|
|
1129
|
+
contacts: "contacts";
|
|
1130
|
+
deals: "deals";
|
|
1131
|
+
}>;
|
|
1132
|
+
title: z.ZodString;
|
|
1133
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
1134
|
+
}, z.core.$strip>;
|
|
1135
|
+
type SearchResultItem = z.infer<typeof searchResultItemSchema>;
|
|
1136
|
+
declare const searchResponseSchema: z.ZodObject<{
|
|
1137
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1138
|
+
id: z.ZodUUID;
|
|
1139
|
+
resource: z.ZodEnum<{
|
|
1140
|
+
companies: "companies";
|
|
1141
|
+
contacts: "contacts";
|
|
1142
|
+
deals: "deals";
|
|
1143
|
+
}>;
|
|
1144
|
+
title: z.ZodString;
|
|
1145
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
1146
|
+
}, z.core.$strip>>;
|
|
1147
|
+
}, z.core.$strip>;
|
|
1148
|
+
type SearchResponse = z.infer<typeof searchResponseSchema>;
|
|
1149
|
+
declare const searchQuerySchema: z.ZodObject<{
|
|
1150
|
+
q: z.ZodString;
|
|
1151
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1152
|
+
resources: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodEnum<{
|
|
1153
|
+
companies: "companies";
|
|
1154
|
+
contacts: "contacts";
|
|
1155
|
+
deals: "deals";
|
|
1156
|
+
}>>>>;
|
|
1157
|
+
}, z.core.$strip>;
|
|
1158
|
+
type SearchQuery = z.infer<typeof searchQuerySchema>;
|
|
1159
|
+
//#endregion
|
|
1160
|
+
//#region packages/contracts/src/tasks.d.ts
|
|
1161
|
+
declare const createTaskRequestSchema: z.ZodObject<{
|
|
1162
|
+
title: z.ZodString;
|
|
1163
|
+
body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1164
|
+
bodyFormat: z.ZodOptional<z.ZodString>;
|
|
1165
|
+
dueAt: z.ZodOptional<z.ZodISODateTime>;
|
|
1166
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
1167
|
+
cancelled: "cancelled";
|
|
1168
|
+
done: "done";
|
|
1169
|
+
in_progress: "in_progress";
|
|
1170
|
+
todo: "todo";
|
|
1171
|
+
}>>;
|
|
1172
|
+
priority: z.ZodDefault<z.ZodEnum<{
|
|
1173
|
+
high: "high";
|
|
1174
|
+
low: "low";
|
|
1175
|
+
normal: "normal";
|
|
1176
|
+
urgent: "urgent";
|
|
1177
|
+
}>>;
|
|
1178
|
+
assigneeUserId: z.ZodOptional<z.ZodUUID>;
|
|
1179
|
+
}, z.core.$strip>;
|
|
1180
|
+
type CreateTaskRequest = z.infer<typeof createTaskRequestSchema>;
|
|
1181
|
+
declare const updateTaskRequestSchema: z.ZodObject<{
|
|
1182
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1183
|
+
body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1184
|
+
bodyFormat: z.ZodOptional<z.ZodString>;
|
|
1185
|
+
dueAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
1186
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1187
|
+
cancelled: "cancelled";
|
|
1188
|
+
done: "done";
|
|
1189
|
+
in_progress: "in_progress";
|
|
1190
|
+
todo: "todo";
|
|
1191
|
+
}>>;
|
|
1192
|
+
priority: z.ZodOptional<z.ZodEnum<{
|
|
1193
|
+
high: "high";
|
|
1194
|
+
low: "low";
|
|
1195
|
+
normal: "normal";
|
|
1196
|
+
urgent: "urgent";
|
|
1197
|
+
}>>;
|
|
1198
|
+
assigneeUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
1199
|
+
}, z.core.$strip>;
|
|
1200
|
+
type UpdateTaskRequest = z.infer<typeof updateTaskRequestSchema>;
|
|
1201
|
+
declare const taskLinkResponseSchema: z.ZodObject<{
|
|
1202
|
+
id: z.ZodUUID;
|
|
1203
|
+
targetType: z.ZodEnum<{
|
|
1204
|
+
company: "company";
|
|
1205
|
+
contact: "contact";
|
|
1206
|
+
deal: "deal";
|
|
1207
|
+
}>;
|
|
1208
|
+
targetId: z.ZodUUID;
|
|
1209
|
+
targetCachedName: z.ZodString;
|
|
1210
|
+
createdAt: z.ZodISODateTime;
|
|
1211
|
+
}, z.core.$strip>;
|
|
1212
|
+
type TaskLinkResponse = z.infer<typeof taskLinkResponseSchema>;
|
|
1213
|
+
declare const taskResponseSchema: z.ZodObject<{
|
|
1214
|
+
id: z.ZodUUID;
|
|
1215
|
+
title: z.ZodString;
|
|
1216
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1217
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
1218
|
+
dueAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1219
|
+
completedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1220
|
+
status: z.ZodEnum<{
|
|
1221
|
+
cancelled: "cancelled";
|
|
1222
|
+
done: "done";
|
|
1223
|
+
in_progress: "in_progress";
|
|
1224
|
+
todo: "todo";
|
|
1225
|
+
}>;
|
|
1226
|
+
priority: z.ZodEnum<{
|
|
1227
|
+
high: "high";
|
|
1228
|
+
low: "low";
|
|
1229
|
+
normal: "normal";
|
|
1230
|
+
urgent: "urgent";
|
|
1231
|
+
}>;
|
|
1232
|
+
assigneeUserId: z.ZodNullable<z.ZodUUID>;
|
|
1233
|
+
createdAt: z.ZodISODateTime;
|
|
1234
|
+
updatedAt: z.ZodISODateTime;
|
|
1235
|
+
}, z.core.$strip>;
|
|
1236
|
+
type TaskResponse = z.infer<typeof taskResponseSchema>;
|
|
1237
|
+
/** Detay ucu (`GET /tasks/:id`) yanıtı — liste ucunun AKSİNE `links` içerir (N+1 yok: tek ek sorgu) */
|
|
1238
|
+
declare const taskDetailResponseSchema: z.ZodObject<{
|
|
1239
|
+
id: z.ZodUUID;
|
|
1240
|
+
title: z.ZodString;
|
|
1241
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1242
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
1243
|
+
dueAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1244
|
+
completedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1245
|
+
status: z.ZodEnum<{
|
|
1246
|
+
cancelled: "cancelled";
|
|
1247
|
+
done: "done";
|
|
1248
|
+
in_progress: "in_progress";
|
|
1249
|
+
todo: "todo";
|
|
1250
|
+
}>;
|
|
1251
|
+
priority: z.ZodEnum<{
|
|
1252
|
+
high: "high";
|
|
1253
|
+
low: "low";
|
|
1254
|
+
normal: "normal";
|
|
1255
|
+
urgent: "urgent";
|
|
1256
|
+
}>;
|
|
1257
|
+
assigneeUserId: z.ZodNullable<z.ZodUUID>;
|
|
1258
|
+
createdAt: z.ZodISODateTime;
|
|
1259
|
+
updatedAt: z.ZodISODateTime;
|
|
1260
|
+
links: z.ZodArray<z.ZodObject<{
|
|
1261
|
+
id: z.ZodUUID;
|
|
1262
|
+
targetType: z.ZodEnum<{
|
|
1263
|
+
company: "company";
|
|
1264
|
+
contact: "contact";
|
|
1265
|
+
deal: "deal";
|
|
1266
|
+
}>;
|
|
1267
|
+
targetId: z.ZodUUID;
|
|
1268
|
+
targetCachedName: z.ZodString;
|
|
1269
|
+
createdAt: z.ZodISODateTime;
|
|
1270
|
+
}, z.core.$strip>>;
|
|
1271
|
+
}, z.core.$strip>;
|
|
1272
|
+
type TaskDetailResponse = z.infer<typeof taskDetailResponseSchema>;
|
|
1273
|
+
declare const tasksPagedResponseSchema: z.ZodObject<{
|
|
1274
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1275
|
+
id: z.ZodUUID;
|
|
1276
|
+
title: z.ZodString;
|
|
1277
|
+
body: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1278
|
+
bodyFormat: z.ZodNullable<z.ZodString>;
|
|
1279
|
+
dueAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1280
|
+
completedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1281
|
+
status: z.ZodEnum<{
|
|
1282
|
+
cancelled: "cancelled";
|
|
1283
|
+
done: "done";
|
|
1284
|
+
in_progress: "in_progress";
|
|
1285
|
+
todo: "todo";
|
|
1286
|
+
}>;
|
|
1287
|
+
priority: z.ZodEnum<{
|
|
1288
|
+
high: "high";
|
|
1289
|
+
low: "low";
|
|
1290
|
+
normal: "normal";
|
|
1291
|
+
urgent: "urgent";
|
|
1292
|
+
}>;
|
|
1293
|
+
assigneeUserId: z.ZodNullable<z.ZodUUID>;
|
|
1294
|
+
createdAt: z.ZodISODateTime;
|
|
1295
|
+
updatedAt: z.ZodISODateTime;
|
|
1296
|
+
}, z.core.$strip>>;
|
|
1297
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1298
|
+
hasMore: z.ZodBoolean;
|
|
1299
|
+
}, z.core.$strip>;
|
|
1300
|
+
type TasksPagedResponse = z.infer<typeof tasksPagedResponseSchema>;
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region packages/sdk/dist/http-client.d.ts
|
|
1303
|
+
/** SoliCRM'in barındırılan API tabanı (`.env.example`'daki `API_BASE_URL`) */
|
|
1304
|
+
declare const DEFAULT_BASE_URL = "https://api.solicrm.com";
|
|
1305
|
+
declare const DEFAULT_MAX_ATTEMPTS = 3;
|
|
1306
|
+
declare const DEFAULT_BASE_DELAY_MS = 250;
|
|
1307
|
+
/**
|
|
1308
|
+
* Enjekte edilebilir `fetch`. BİLEREK `typeof fetch` DEĞİL: Bun'ın (ve
|
|
1309
|
+
* Node'un) global `fetch`'i ek üyeler (`preconnect`) taşır, bu yüzden düz bir
|
|
1310
|
+
* async fonksiyon `typeof fetch`'e ATANAMAZ — repo bunu daha önce
|
|
1311
|
+
* `as unknown as typeof fetch` cast'iyle çözmek zorunda kalmıştı
|
|
1312
|
+
* (`packages/net/src/test-network-guard.ts` `lazyFetchImpl`). Yapısal minimal
|
|
1313
|
+
* imza hem gerçek `globalThis.fetch`'i (parametre tipi daha geniş olduğu için
|
|
1314
|
+
* atanabilir) hem tüketicinin/testin sahte implementasyonunu cast'siz kabul
|
|
1315
|
+
* eder.
|
|
1316
|
+
*/
|
|
1317
|
+
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
1318
|
+
type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'DELETE';
|
|
1319
|
+
/**
|
|
1320
|
+
* Query string değeri. Para/tarih alanlarının HAM STRING olarak geçirilmesi
|
|
1321
|
+
* gerektiği için `string` yeterli olurdu, ama `limit` gibi gerçek sayaçlar da
|
|
1322
|
+
* var; `number` yalnız onlar için vardır (bkz. `list-query.ts`'in filtre
|
|
1323
|
+
* değerlerini bilerek `string`e kısıtlaması).
|
|
1324
|
+
*/
|
|
1325
|
+
type QueryValue = string | number | boolean | undefined;
|
|
1326
|
+
interface RetryOptions {
|
|
1327
|
+
/** Toplam deneme sayısı (ilk istek dahil). Varsayılan 3. `1` ⇒ retry yok. */
|
|
1328
|
+
maxAttempts?: number | undefined;
|
|
1329
|
+
/** İlk geri çekilmenin taban süresi (ms). Varsayılan 250. `0` ⇒ beklemesiz. */
|
|
1330
|
+
baseDelayMs?: number | undefined;
|
|
1331
|
+
}
|
|
1332
|
+
interface HttpClientOptions {
|
|
1333
|
+
/** Tenant kapsamlı API anahtarı (`scrm_...`) — `Authorization: Bearer` ile gider */
|
|
1334
|
+
apiKey: string;
|
|
1335
|
+
/** Varsayılan {@link DEFAULT_BASE_URL}; sondaki `/` karakterleri kırpılır */
|
|
1336
|
+
baseUrl?: string | undefined;
|
|
1337
|
+
/** `fetch` implementasyonu; verilmezse `globalThis.fetch` (bkz. dosya başı) */
|
|
1338
|
+
fetch?: FetchLike | undefined;
|
|
1339
|
+
retry?: RetryOptions | undefined;
|
|
1340
|
+
/** Her isteğe eklenen ek başlıklar (`Authorization` ezilemez) */
|
|
1341
|
+
headers?: Record<string, string> | undefined;
|
|
1342
|
+
}
|
|
1343
|
+
interface RequestOptions {
|
|
1344
|
+
query?: Record<string, QueryValue> | undefined;
|
|
1345
|
+
body?: unknown;
|
|
1346
|
+
signal?: AbortSignal | undefined;
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Yarım-jitter'lı üstel geri çekilme. SAF fonksiyon (rastgelelik enjekte
|
|
1350
|
+
* edilebilir) — böylece sınırları happy-dom'a/zamanlayıcıya hiç dokunmadan
|
|
1351
|
+
* doğrudan test edilebilir.
|
|
1352
|
+
*/
|
|
1353
|
+
declare function jitteredDelayMs(attempt: number, baseDelayMs: number, random?: () => number): number;
|
|
1354
|
+
/** Bkz. KRİTİK KURAL 1 — tek karar noktası, tek yerde test edilir. */
|
|
1355
|
+
declare function isRetryableStatus(method: HttpMethod, status: number): boolean;
|
|
1356
|
+
/** `fetch`'in reddi iptalden mi kaynaklandı? (iptal asla yeniden denenmez) */
|
|
1357
|
+
declare function isAbortReason(reason: unknown, signal: AbortSignal | undefined): boolean;
|
|
1358
|
+
declare class HttpClient {
|
|
1359
|
+
private readonly apiKey;
|
|
1360
|
+
private readonly baseUrl;
|
|
1361
|
+
private readonly fetchImpl;
|
|
1362
|
+
private readonly extraHeaders;
|
|
1363
|
+
private readonly maxAttempts;
|
|
1364
|
+
private readonly baseDelayMs;
|
|
1365
|
+
constructor(options: HttpClientOptions);
|
|
1366
|
+
/**
|
|
1367
|
+
* JSON yanıtı bekleyen istek — gövde `@solicrm/contracts`'ın ŞEMASIYLA
|
|
1368
|
+
* çalışma zamanında doğrulanır (tek doğrulama noktası; her kaynak dosyası
|
|
1369
|
+
* kendi `.parse()`'ını tekrarlamaz).
|
|
1370
|
+
*/
|
|
1371
|
+
requestJson<TSchema extends z.ZodType>(method: HttpMethod, path: string, schema: TSchema, options?: RequestOptions): Promise<z.output<TSchema>>;
|
|
1372
|
+
/** Gövdesiz yanıt bekleyen istek (API'nin 12 `204 No Content` ucu). */
|
|
1373
|
+
requestVoid(method: HttpMethod, path: string, options?: RequestOptions): Promise<void>;
|
|
1374
|
+
/** Tam URL'i kurar — `filter[alan]` gibi köşeli parantezli anahtarlar dahil. */
|
|
1375
|
+
buildUrl(path: string, query: Record<string, QueryValue> | undefined): string;
|
|
1376
|
+
private send;
|
|
1377
|
+
private buildInit;
|
|
1378
|
+
}
|
|
1379
|
+
//#endregion
|
|
1380
|
+
//#region packages/sdk/dist/pagination.d.ts
|
|
1381
|
+
/** `pagedResponseSchema`'nın ürettiği zarfın yapısal karşılığı */
|
|
1382
|
+
interface CursorPage<TItem> {
|
|
1383
|
+
items: TItem[];
|
|
1384
|
+
nextCursor: string | null;
|
|
1385
|
+
hasMore: boolean;
|
|
1386
|
+
}
|
|
1387
|
+
/** Cursor sayfalaması destekleyen her liste sorgusunun paylaştığı taban */
|
|
1388
|
+
interface CursorPageQuery {
|
|
1389
|
+
cursor?: string | undefined;
|
|
1390
|
+
limit?: number | undefined;
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* `fetchPage`'i (bir kaynağın `list()` metodu) sayfa sayfa çağırıp tüm
|
|
1394
|
+
* öğeleri akıtır. `query`'deki diğer filtreler HER sayfada KORUNUR — yalnız
|
|
1395
|
+
* `cursor` ilerletilir.
|
|
1396
|
+
*/
|
|
1397
|
+
declare function paginateAll<TItem, TQuery extends CursorPageQuery>(fetchPage: (query: TQuery) => Promise<CursorPage<TItem>>, query: TQuery): AsyncGenerator<TItem, void, unknown>;
|
|
1398
|
+
//#endregion
|
|
1399
|
+
//#region packages/sdk/dist/resource.d.ts
|
|
1400
|
+
/** Her kaynak metodunun kabul ettiği çağrı-başına seçenekler */
|
|
1401
|
+
interface CallOptions {
|
|
1402
|
+
/** Bu çağrı için tenant'ı ezer (istemci düzeyi `tenantId`'nin yerine geçer) */
|
|
1403
|
+
tenantId?: string | undefined;
|
|
1404
|
+
signal?: AbortSignal | undefined;
|
|
1405
|
+
}
|
|
1406
|
+
declare abstract class TenantScopedResource {
|
|
1407
|
+
protected readonly http: HttpClient;
|
|
1408
|
+
private readonly defaultTenantId;
|
|
1409
|
+
constructor(http: HttpClient, defaultTenantId: string | undefined);
|
|
1410
|
+
/** `/v1/tenants/<tenantId><suffix>` — `suffix` `/` ile başlar */
|
|
1411
|
+
protected path(opts: CallOptions, suffix: string): string;
|
|
1412
|
+
/**
|
|
1413
|
+
* `exactOptionalPropertyTypes` altında `{ signal: opts.signal }` yazmak
|
|
1414
|
+
* `undefined`'ı açıkça atamak demektir; `RequestOptions.signal` bunu kabul
|
|
1415
|
+
* edecek şekilde `AbortSignal | undefined` yazılmıştır, bu yardımcı yine de
|
|
1416
|
+
* niyeti tek yerde toplar.
|
|
1417
|
+
*/
|
|
1418
|
+
protected init(opts: CallOptions, extra?: Omit<RequestOptions, 'signal'>): RequestOptions;
|
|
1419
|
+
}
|
|
1420
|
+
//#endregion
|
|
1421
|
+
//#region packages/sdk/dist/resources/activities.d.ts
|
|
1422
|
+
/** Bir contacts/companies/deals kaydına yapılan hedef göndermesi */
|
|
1423
|
+
interface ActivityTarget {
|
|
1424
|
+
type: TargetType;
|
|
1425
|
+
id: string;
|
|
1426
|
+
}
|
|
1427
|
+
interface ActivityListQuery extends CursorPageQuery {
|
|
1428
|
+
/** Verilirse `targetType` + `targetId` BİRLİKTE gönderilir (bkz. dosya başı) */
|
|
1429
|
+
target?: ActivityTarget | undefined;
|
|
1430
|
+
}
|
|
1431
|
+
declare class ActivitiesResource extends TenantScopedResource {
|
|
1432
|
+
list(query?: ActivityListQuery, opts?: CallOptions): Promise<ActivitiesPagedResponse>;
|
|
1433
|
+
listAll(query?: ActivityListQuery, opts?: CallOptions): AsyncGenerator<ActivityResponse>;
|
|
1434
|
+
get(activityId: string, opts?: CallOptions): Promise<ActivityResponse>;
|
|
1435
|
+
create(body: CreateActivityRequest, opts?: CallOptions): Promise<ActivityResponse>;
|
|
1436
|
+
update(activityId: string, body: UpdateActivityRequest, opts?: CallOptions): Promise<ActivityResponse>;
|
|
1437
|
+
delete(activityId: string, opts?: CallOptions): Promise<void>;
|
|
1438
|
+
/** Bir hedefin birleşik zaman çizelgesi (activities + tasks + notes) */
|
|
1439
|
+
timeline(target: ActivityTarget, opts?: CallOptions): Promise<TargetTimelineResponse>;
|
|
1440
|
+
}
|
|
1441
|
+
//#endregion
|
|
1442
|
+
//#region packages/sdk/dist/list-query.d.ts
|
|
1443
|
+
interface CrmListSort {
|
|
1444
|
+
/** `FIELD_CATALOG[resource]`'ın `sortable: true` anahtarlarından biri */
|
|
1445
|
+
field: string;
|
|
1446
|
+
direction: SortDirection;
|
|
1447
|
+
}
|
|
1448
|
+
interface CrmListQuery extends CursorPageQuery {
|
|
1449
|
+
sort?: CrmListSort | undefined;
|
|
1450
|
+
/** `filter[<anahtar>]=<deger>` — değerler bilinçli olarak `string` (bkz. KRİTİK KURAL 3) */
|
|
1451
|
+
filters?: Record<string, string> | undefined;
|
|
1452
|
+
}
|
|
1453
|
+
declare function buildCrmListQuery(resource: CrmResource, query: CrmListQuery): Record<string, QueryValue>;
|
|
1454
|
+
//#endregion
|
|
1455
|
+
//#region packages/sdk/dist/resources/companies.d.ts
|
|
1456
|
+
declare class CompaniesResource extends TenantScopedResource {
|
|
1457
|
+
list(query?: CrmListQuery, opts?: CallOptions): Promise<CompaniesPagedResponse>;
|
|
1458
|
+
listAll(query?: CrmListQuery, opts?: CallOptions): AsyncGenerator<CompanyResponse>;
|
|
1459
|
+
get(companyId: string, opts?: CallOptions): Promise<CompanyResponse>;
|
|
1460
|
+
create(body: CreateCompanyRequest, opts?: CallOptions): Promise<CompanyResponse>;
|
|
1461
|
+
update(companyId: string, body: UpdateCompanyRequest, opts?: CallOptions): Promise<CompanyResponse>;
|
|
1462
|
+
delete(companyId: string, opts?: CallOptions): Promise<void>;
|
|
1463
|
+
}
|
|
1464
|
+
//#endregion
|
|
1465
|
+
//#region packages/sdk/dist/resources/contacts.d.ts
|
|
1466
|
+
declare class ContactsResource extends TenantScopedResource {
|
|
1467
|
+
list(query?: CrmListQuery, opts?: CallOptions): Promise<ContactsPagedResponse>;
|
|
1468
|
+
/** Tüm sayfaları otomatik cursor ilerletmesiyle akıtır */
|
|
1469
|
+
listAll(query?: CrmListQuery, opts?: CallOptions): AsyncGenerator<ContactResponse>;
|
|
1470
|
+
get(contactId: string, opts?: CallOptions): Promise<ContactResponse>;
|
|
1471
|
+
/** Plan limiti doluysa 402 ⇒ `SolicrmApiError` (bkz. `readContactLimitReached`) */
|
|
1472
|
+
create(body: CreateContactRequest, opts?: CallOptions): Promise<ContactResponse>;
|
|
1473
|
+
update(contactId: string, body: UpdateContactRequest, opts?: CallOptions): Promise<ContactResponse>;
|
|
1474
|
+
delete(contactId: string, opts?: CallOptions): Promise<void>;
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Bir hatanın "plan kişi limiti doldu" 402'si olup olmadığını söyler ve
|
|
1478
|
+
* doluysa gövdeyi tipli döner; değilse `undefined`. Gövde şeması
|
|
1479
|
+
* `@solicrm/contracts`'tan gelir — SDK `code`/`limit`/`planCode` alanlarını
|
|
1480
|
+
* yeniden TANIMLAMAZ.
|
|
1481
|
+
*/
|
|
1482
|
+
declare function readContactLimitReached(error: unknown): ContactLimitReachedResponse | undefined;
|
|
1483
|
+
//#endregion
|
|
1484
|
+
//#region packages/sdk/dist/resources/deals.d.ts
|
|
1485
|
+
declare class DealsResource extends TenantScopedResource {
|
|
1486
|
+
list(query?: CrmListQuery, opts?: CallOptions): Promise<DealsPagedResponse>;
|
|
1487
|
+
listAll(query?: CrmListQuery, opts?: CallOptions): AsyncGenerator<DealResponse>;
|
|
1488
|
+
/** Detay ucu — liste öğesinin AKSİNE `contacts` dizisini de taşır */
|
|
1489
|
+
get(dealId: string, opts?: CallOptions): Promise<DealDetailResponse>;
|
|
1490
|
+
create(body: CreateDealRequest, opts?: CallOptions): Promise<DealResponse>;
|
|
1491
|
+
update(dealId: string, body: UpdateDealRequest, opts?: CallOptions): Promise<DealResponse>;
|
|
1492
|
+
delete(dealId: string, opts?: CallOptions): Promise<void>;
|
|
1493
|
+
/** Aşama/pozisyon taşıma — 200 döner; eşzamanlı rebalance çakışması 409'dur */
|
|
1494
|
+
move(dealId: string, body: MoveDealRequest, opts?: CallOptions): Promise<DealResponse>;
|
|
1495
|
+
attachContact(dealId: string, body: AttachDealContactRequest, opts?: CallOptions): Promise<DealContactResponse>;
|
|
1496
|
+
detachContact(dealId: string, contactId: string, opts?: CallOptions): Promise<void>;
|
|
1497
|
+
}
|
|
1498
|
+
//#endregion
|
|
1499
|
+
//#region packages/sdk/dist/resources/notes.d.ts
|
|
1500
|
+
declare class NotesResource extends TenantScopedResource {
|
|
1501
|
+
list(query?: CursorPageQuery, opts?: CallOptions): Promise<NotesPagedResponse>;
|
|
1502
|
+
listAll(query?: CursorPageQuery, opts?: CallOptions): AsyncGenerator<NoteResponse>;
|
|
1503
|
+
/** Detay ucu — liste öğesinin AKSİNE `links` dizisini de taşır */
|
|
1504
|
+
get(noteId: string, opts?: CallOptions): Promise<NoteDetailResponse>;
|
|
1505
|
+
create(body: CreateNoteRequest, opts?: CallOptions): Promise<NoteResponse>;
|
|
1506
|
+
update(noteId: string, body: UpdateNoteRequest, opts?: CallOptions): Promise<NoteResponse>;
|
|
1507
|
+
delete(noteId: string, opts?: CallOptions): Promise<void>;
|
|
1508
|
+
/** Notu bir contacts/companies/deals kaydına bağlar; aynı bağ ikinci kez 409 */
|
|
1509
|
+
attachLink(noteId: string, body: AttachLinkRequest, opts?: CallOptions): Promise<NoteLinkResponse>;
|
|
1510
|
+
detachLink(noteId: string, linkId: string, opts?: CallOptions): Promise<void>;
|
|
1511
|
+
}
|
|
1512
|
+
//#endregion
|
|
1513
|
+
//#region packages/sdk/dist/resources/pipelines.d.ts
|
|
1514
|
+
declare class PipelinesResource extends TenantScopedResource {
|
|
1515
|
+
list(opts?: CallOptions): Promise<PipelinesResponse>;
|
|
1516
|
+
create(body: CreatePipelineRequest, opts?: CallOptions): Promise<PipelineResponse>;
|
|
1517
|
+
update(pipelineId: string, body: UpdatePipelineRequest, opts?: CallOptions): Promise<PipelineResponse>;
|
|
1518
|
+
/** Aktif fırsatı olan bir hattı silmek 409 döner */
|
|
1519
|
+
delete(pipelineId: string, opts?: CallOptions): Promise<void>;
|
|
1520
|
+
listStages(pipelineId: string, opts?: CallOptions): Promise<StagesResponse>;
|
|
1521
|
+
createStage(pipelineId: string, body: CreateStageRequest, opts?: CallOptions): Promise<StageResponse>;
|
|
1522
|
+
updateStage(pipelineId: string, stageId: string, body: UpdateStageRequest, opts?: CallOptions): Promise<StageResponse>;
|
|
1523
|
+
/** Son aşamayı silmek 400, aktif/geçmiş fırsatı olan aşama 409 döner */
|
|
1524
|
+
deleteStage(pipelineId: string, stageId: string, opts?: CallOptions): Promise<void>;
|
|
1525
|
+
reorderStage(pipelineId: string, stageId: string, body: ReorderRequest, opts?: CallOptions): Promise<StageResponse>;
|
|
1526
|
+
}
|
|
1527
|
+
//#endregion
|
|
1528
|
+
//#region packages/sdk/dist/resources/search.d.ts
|
|
1529
|
+
interface SearchParams {
|
|
1530
|
+
/** Aranacak metin — boş olamaz, en fazla `SEARCH_QUERY_MAX_LENGTH` karakter */
|
|
1531
|
+
q: string;
|
|
1532
|
+
/** Varsayılan `SEARCH_DEFAULT_LIMIT`, azami `SEARCH_MAX_LIMIT` */
|
|
1533
|
+
limit?: number | undefined;
|
|
1534
|
+
/** Verilmezse contacts/companies/deals ÜÇÜ de aranır */
|
|
1535
|
+
resources?: readonly SearchableResource[] | undefined;
|
|
1536
|
+
}
|
|
1537
|
+
/**
|
|
1538
|
+
* Girdiyi kanonik `searchQuerySchema` ile doğrular ve tele gidecek query
|
|
1539
|
+
* kaydını üretir. Şema `resources`'ı VİRGÜLLE AYRILMIŞ METİN olarak bekler
|
|
1540
|
+
* (sunucu `Object.fromEntries(url.searchParams)` ile ayrıştırır), bu yüzden
|
|
1541
|
+
* birleştirme doğrulamadan ÖNCE yapılır.
|
|
1542
|
+
*/
|
|
1543
|
+
declare function buildSearchQuery(params: SearchParams): Record<string, QueryValue>;
|
|
1544
|
+
declare class SearchResource extends TenantScopedResource {
|
|
1545
|
+
query(params: SearchParams, opts?: CallOptions): Promise<SearchResponse>;
|
|
1546
|
+
}
|
|
1547
|
+
//#endregion
|
|
1548
|
+
//#region packages/sdk/dist/resources/tasks.d.ts
|
|
1549
|
+
declare class TasksResource extends TenantScopedResource {
|
|
1550
|
+
list(query?: CrmListQuery, opts?: CallOptions): Promise<TasksPagedResponse>;
|
|
1551
|
+
listAll(query?: CrmListQuery, opts?: CallOptions): AsyncGenerator<TaskResponse>;
|
|
1552
|
+
/** Detay ucu — liste öğesinin AKSİNE `links` dizisini de taşır */
|
|
1553
|
+
get(taskId: string, opts?: CallOptions): Promise<TaskDetailResponse>;
|
|
1554
|
+
create(body: CreateTaskRequest, opts?: CallOptions): Promise<TaskResponse>;
|
|
1555
|
+
update(taskId: string, body: UpdateTaskRequest, opts?: CallOptions): Promise<TaskResponse>;
|
|
1556
|
+
/** `update(id, { status: 'done' })`'un ince kısayolu — `completedAt`'i SUNUCU doldurur */
|
|
1557
|
+
complete(taskId: string, opts?: CallOptions): Promise<TaskResponse>;
|
|
1558
|
+
delete(taskId: string, opts?: CallOptions): Promise<void>;
|
|
1559
|
+
/** Görevi bir contacts/companies/deals kaydına bağlar; aynı bağ ikinci kez 409 */
|
|
1560
|
+
attachLink(taskId: string, body: AttachLinkRequest, opts?: CallOptions): Promise<TaskLinkResponse>;
|
|
1561
|
+
detachLink(taskId: string, linkId: string, opts?: CallOptions): Promise<void>;
|
|
1562
|
+
}
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region packages/sdk/dist/resources/views.d.ts
|
|
1565
|
+
/** `apply()`'ın ayırt edici (`resource`) dönüşü — tüketici `switch` ile daraltır */
|
|
1566
|
+
type SavedViewApplyResult = {
|
|
1567
|
+
resource: 'contacts';
|
|
1568
|
+
page: ContactsPagedResponse;
|
|
1569
|
+
} | {
|
|
1570
|
+
resource: 'companies';
|
|
1571
|
+
page: CompaniesPagedResponse;
|
|
1572
|
+
} | {
|
|
1573
|
+
resource: 'deals';
|
|
1574
|
+
page: DealsPagedResponse;
|
|
1575
|
+
} | {
|
|
1576
|
+
resource: 'tasks';
|
|
1577
|
+
page: TasksPagedResponse;
|
|
1578
|
+
};
|
|
1579
|
+
declare class SavedViewsResource extends TenantScopedResource {
|
|
1580
|
+
list(query?: {
|
|
1581
|
+
resource?: SavedViewResource | undefined;
|
|
1582
|
+
}, opts?: CallOptions): Promise<SavedViewsListResponse>;
|
|
1583
|
+
get(viewId: string, opts?: CallOptions): Promise<SavedViewResponse>;
|
|
1584
|
+
create(body: CreateSavedViewRequest, opts?: CallOptions): Promise<SavedViewResponse>;
|
|
1585
|
+
update(viewId: string, body: UpdateSavedViewRequest, opts?: CallOptions): Promise<SavedViewResponse>;
|
|
1586
|
+
delete(viewId: string, opts?: CallOptions): Promise<void>;
|
|
1587
|
+
/**
|
|
1588
|
+
* Kayıtlı görünümü uygular. `resource` görünümün KENDİ `resource` alanıdır
|
|
1589
|
+
* (`list()`/`get()` yanıtından okunur) — SDK onu tahmin etmez.
|
|
1590
|
+
*/
|
|
1591
|
+
apply(viewId: string, resource: SavedViewResource, query?: CursorPageQuery, opts?: CallOptions): Promise<SavedViewApplyResult>;
|
|
1592
|
+
}
|
|
1593
|
+
//#endregion
|
|
1594
|
+
//#region packages/sdk/dist/client.d.ts
|
|
1595
|
+
interface SolicrmClientOptions extends HttpClientOptions {
|
|
1596
|
+
/** Varsayılan tenant — API anahtarının bağlı olduğu tenant'ın kimliği */
|
|
1597
|
+
tenantId?: string | undefined;
|
|
1598
|
+
}
|
|
1599
|
+
declare class SolicrmClient {
|
|
1600
|
+
/** Düşük seviyeli HTTP çekirdeği (kaçış kapısı) */
|
|
1601
|
+
readonly http: HttpClient;
|
|
1602
|
+
readonly tenantId: string | undefined;
|
|
1603
|
+
readonly contacts: ContactsResource;
|
|
1604
|
+
readonly companies: CompaniesResource;
|
|
1605
|
+
readonly deals: DealsResource;
|
|
1606
|
+
readonly pipelines: PipelinesResource;
|
|
1607
|
+
readonly activities: ActivitiesResource;
|
|
1608
|
+
readonly tasks: TasksResource;
|
|
1609
|
+
readonly notes: NotesResource;
|
|
1610
|
+
readonly views: SavedViewsResource;
|
|
1611
|
+
readonly search: SearchResource;
|
|
1612
|
+
constructor(options: SolicrmClientOptions);
|
|
1613
|
+
}
|
|
1614
|
+
/** `new SolicrmClient(options)` ile birebir aynı — fonksiyonel tercih edenler için */
|
|
1615
|
+
declare function createSolicrmClient(options: SolicrmClientOptions): SolicrmClient;
|
|
1616
|
+
//#endregion
|
|
1617
|
+
//#region packages/sdk/dist/errors.d.ts
|
|
1618
|
+
/**
|
|
1619
|
+
* SDK'nın tek hata hiyerarşisi — her başarısızlık (ağ, HTTP, sözleşme sapması)
|
|
1620
|
+
* `SolicrmError`'ın bir alt sınıfıdır, böylece tüketici tek bir
|
|
1621
|
+
* `catch (err) { if (err instanceof SolicrmError) ... }` ile SDK'nın tamamını
|
|
1622
|
+
* kapsar.
|
|
1623
|
+
*
|
|
1624
|
+
* DİL İSTİSNASI: bu dosyadaki mesajlar İngilizce'dir. Proje kuralı
|
|
1625
|
+
* "kullanıcıya dönen API mesajları Türkçe"dir ve o kural `apps/api`'nin
|
|
1626
|
+
* `jsonError()` zarfı için geçerlidir; bu paket global npm tüketicilerine
|
|
1627
|
+
* gider (kardeş `@vennyx/solitrace` SDK'sı da İngilizce). Yorumlar Türkçe,
|
|
1628
|
+
* test adları Türkçe kalır. Sunucudan gelen Türkçe metin ise ÇEVRİLMEZ,
|
|
1629
|
+
* `serverMessage` alanında AYNEN taşınır.
|
|
1630
|
+
*
|
|
1631
|
+
* KRİTİK KURAL 1 — sunucu metni ne YUTULUR ne UYDURULUR. `apps/api`'nin hata
|
|
1632
|
+
* zarfı `{ error: string }`'tir (`apps/api/src/lib/context.ts` `jsonError`) ama
|
|
1633
|
+
* bu zarf EVRENSEL DEĞİL: `POST /v1/tenants/:id/contacts`'ın 402 yanıtı
|
|
1634
|
+
* `{ code, limit, planCode }` döndürür ve `error` alanı HİÇ TAŞIMAZ
|
|
1635
|
+
* (`apps/api/src/routes/contacts.ts:175-180`, `c.json(limitBody, 402)` ile
|
|
1636
|
+
* DÖNER, fırlatılmaz ⇒ global `onError` onu yeniden kurmaz). Bu yüzden:
|
|
1637
|
+
* - `body` ham ayrıştırılmış gövdenin TAMAMINI taşır (zengin 402 gövdesi
|
|
1638
|
+
* kaybolmaz),
|
|
1639
|
+
* - `serverMessage` yalnız gövdede GERÇEKTEN bir `error: string` varsa
|
|
1640
|
+
* dolar, yoksa `undefined` kalır,
|
|
1641
|
+
* - `message` `serverMessage` varsa ONDAN gelir, yoksa jenerik İngilizce bir
|
|
1642
|
+
* SDK metnine düşer — var olmayan bir sunucu mesajı UYDURULMAZ.
|
|
1643
|
+
*
|
|
1644
|
+
* KRİTİK KURAL 2 — `code` alanı İDDİA EDİLMEZ. `jsonError()` bir `code`
|
|
1645
|
+
* üretmez; 402 gövdesindeki `code` o UCUN KENDİ sözleşmesidir, genel bir hata
|
|
1646
|
+
* alanı değil. Bu yüzden `SolicrmApiError`'da `code` diye bir alan YOKTUR;
|
|
1647
|
+
* ilgilenen tüketici `body`'yi `@solicrm/contracts`'ın kendi şemasıyla
|
|
1648
|
+
* ayrıştırır (bkz. `resources/contacts.ts` `readContactLimitReached`).
|
|
1649
|
+
*
|
|
1650
|
+
* KRİTİK KURAL 3 — `Retry-After` HAM STRING olarak taşınır, sayıya
|
|
1651
|
+
* ÇEVRİLMEZ. SDK hiçbir yerde string→sayı dönüşümü yapmaz (bkz.
|
|
1652
|
+
* `http-client.ts` dosya başı, "aritmetik yok" kuralı); saniyeyi ms'e çevirmek
|
|
1653
|
+
* tüketicinin işidir.
|
|
1654
|
+
*/
|
|
1655
|
+
/** SDK kaynaklı her başarısızlığın taban sınıfı. */
|
|
1656
|
+
declare class SolicrmError extends Error {
|
|
1657
|
+
constructor(message: string, options?: {
|
|
1658
|
+
cause?: unknown;
|
|
1659
|
+
} | undefined);
|
|
1660
|
+
}
|
|
1661
|
+
interface SolicrmApiErrorParams {
|
|
1662
|
+
status: number;
|
|
1663
|
+
/** Ham ayrıştırılmış yanıt gövdesi — JSON ise nesne, JSON değilse metin, boşsa `undefined` */
|
|
1664
|
+
body: unknown;
|
|
1665
|
+
/** Yalnız gövdede gerçekten `error: string` varsa dolu */
|
|
1666
|
+
serverMessage?: string | undefined;
|
|
1667
|
+
/** `Retry-After` başlığının HAM değeri (saniye cinsinden bir metin) */
|
|
1668
|
+
retryAfter?: string | undefined;
|
|
1669
|
+
}
|
|
1670
|
+
/** Sunucu 2xx dışında yanıt verdiğinde fırlatılır. */
|
|
1671
|
+
declare class SolicrmApiError extends SolicrmError {
|
|
1672
|
+
readonly status: number;
|
|
1673
|
+
readonly body: unknown;
|
|
1674
|
+
readonly serverMessage: string | undefined;
|
|
1675
|
+
readonly retryAfter: string | undefined;
|
|
1676
|
+
constructor(params: SolicrmApiErrorParams);
|
|
1677
|
+
}
|
|
1678
|
+
/**
|
|
1679
|
+
* Sunucu 2xx döndürdü ama gövde `@solicrm/contracts` şemasına UYMUYOR.
|
|
1680
|
+
* Sessiz bir tip uyumsuzluğu yerine erken ve net bir hata — SDK'nın çalışma
|
|
1681
|
+
* zamanı doğrulamasının varlık sebebi budur.
|
|
1682
|
+
*/
|
|
1683
|
+
declare class SolicrmResponseError extends SolicrmError {
|
|
1684
|
+
/** Zod'un `issues` dizisi (ham, `unknown` — zod sürümüne bağlanmamak için) */
|
|
1685
|
+
readonly issues: unknown;
|
|
1686
|
+
readonly body: unknown;
|
|
1687
|
+
constructor(params: {
|
|
1688
|
+
message: string;
|
|
1689
|
+
issues: unknown;
|
|
1690
|
+
body: unknown;
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* Gövdedeki `{ error: string }` zarfını okur. Zarf yoksa (402'nin
|
|
1695
|
+
* `{ code, limit, planCode }` gövdesi gibi) `undefined` döner — bu bilinçli:
|
|
1696
|
+
* çağıran uydurma bir mesaj üretmek yerine jenerik metne düşer.
|
|
1697
|
+
*/
|
|
1698
|
+
declare function readServerErrorMessage(body: unknown): string | undefined;
|
|
1699
|
+
//#endregion
|
|
1700
|
+
export { type ActivitiesPagedResponse, ActivitiesResource, type ActivityResponse as Activity, type ActivityKind, type ActivityListQuery, type ActivityTarget, type AttachDealContactRequest, type AttachLinkRequest, CRM_RESOURCES, type CallOptions, type CompaniesPagedResponse, CompaniesResource, type CompanyResponse as Company, type CompanySize, type ContactResponse as Contact, type ContactLimitReachedResponse, type ContactSource, type ContactStatus, type ContactsPagedResponse, ContactsResource, type CreateActivityRequest, type CreateCompanyRequest, type CreateContactRequest, type CreateDealRequest, type CreateNoteRequest, type CreatePipelineRequest, type CreateSavedViewRequest, type CreateStageRequest, type CreateTaskRequest, type CrmListQuery, type CrmListSort, type CrmResource, type CursorPage, type CursorPageQuery, DEFAULT_BASE_DELAY_MS, DEFAULT_BASE_URL, DEFAULT_MAX_ATTEMPTS, type DealResponse as Deal, type DealContactResponse, type DealDetailResponse, type DealOutcome, type DealsPagedResponse, DealsResource, FIELD_CATALOG, type FetchLike, type FieldDef, type FieldType, type FilterGroupInput, type FilterLeafInput, type FilterLogicalOperator, type FilterOperand, HttpClient, type HttpClientOptions, type HttpMethod, type MoveDealRequest, type NoteResponse as Note, type NoteDetailResponse, type NoteLinkResponse, type NotesPagedResponse, NotesResource, PAGE_DEFAULT_LIMIT, PAGE_MAX_LIMIT, type PageQuery, type PipelineResponse as Pipeline, PipelinesResource, type PipelinesResponse, type QueryValue, type ReorderRequest, type RequestOptions, type RetryOptions, SEARCHABLE_RESOURCES, SEARCH_DEFAULT_LIMIT, SEARCH_MAX_LIMIT, SEARCH_QUERY_MAX_LENGTH, type SavedViewResponse as SavedView, type SavedViewApplyResult, type SavedViewFieldResponse, type SavedViewLayout, type SavedViewResource, type SavedViewSortResponse, type SavedViewSummaryResponse, type SavedViewVisibility, type SavedViewsListResponse, SavedViewsResource, type SearchParams, type SearchQuery, SearchResource, type SearchResponse, type SearchResultItem, type SearchableResource, SolicrmApiError, type SolicrmApiErrorParams, SolicrmClient, type SolicrmClientOptions, SolicrmError, SolicrmResponseError, type SortDirection, type StageResponse as Stage, type StagesResponse, TIMELINE_LIMIT_PER_RESOURCE, type TargetTimelineResponse, type TargetType, type TaskResponse as Task, type TaskDetailResponse, type TaskLinkResponse, type TaskPriority, type TaskStatus, type TasksPagedResponse, TasksResource, TenantScopedResource, type UpdateActivityRequest, type UpdateCompanyRequest, type UpdateContactRequest, type UpdateDealRequest, type UpdateNoteRequest, type UpdatePipelineRequest, type UpdateSavedViewRequest, type UpdateStageRequest, type UpdateTaskRequest, buildCrmListQuery, buildSearchQuery, createSolicrmClient, isAbortReason, isRetryableStatus, jitteredDelayMs, paginateAll, readContactLimitReached, readServerErrorMessage, resolveField };
|