@burgan-tech/morph-touch-runtime 0.0.6 → 0.0.8
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/burgan-tech-morph-touch-runtime-0.0.8.tgz +0 -0
- package/morph-touch/Functions/get-absence-entry.1.0.0.json +1 -1
- package/morph-touch/Functions/get-advisor-stats.1.0.0.json +1 -1
- package/morph-touch/Functions/get-available-slots.1.0.0.json +1 -1
- package/morph-touch/Functions/get-rezervations.1.0.0.json +1 -1
- package/morph-touch/Functions/src/GetAbsenceEntryMapping.csx +18 -4
- package/morph-touch/Functions/src/GetAdvisorStatsMapping.csx +22 -8
- package/morph-touch/Functions/src/GetAvailableSlotsMapping.csx +22 -14
- package/morph-touch/Functions/src/GetRezervationsMapping.csx +46 -9
- package/morph-touch/Functions/src/SendCancelNotificationMapping.csx +27 -2
- package/morph-touch/Tasks/login-for-chat.1.0.0.json +27 -0
- package/morph-touch/Tasks/register-for-chat.1.0.0.json +27 -0
- package/morph-touch/Workflows/chat-room.json +273 -14
- package/morph-touch/Workflows/notification-sender.json +2 -2
- package/morph-touch/Workflows/rezervation-start.json +39 -2
- package/morph-touch/Workflows/rezervation-transfer.json +44 -7
- package/morph-touch/Workflows/rezervation-update.json +4 -4
- package/morph-touch/Workflows/rezervation.json +135 -45
- package/morph-touch/Workflows/src/CanStartRezervationTimerMapping.csx +18 -3
- package/morph-touch/Workflows/src/ChatRoomRemoveMapping.csx +10 -1
- package/morph-touch/Workflows/src/ChatRoomTransferInviteMapping.csx +10 -1
- package/morph-touch/Workflows/src/ChatRoomTransferRemoveMapping.csx +9 -1
- package/morph-touch/Workflows/src/ChatRoomUpdateMapping.csx +10 -1
- package/morph-touch/Workflows/src/CheckDuplicateRezervationMapping.csx +17 -3
- package/morph-touch/Workflows/src/CheckRandevuTimeMapping.csx +16 -2
- package/morph-touch/Workflows/src/CreateChatRoomForRezervationMapping.csx +12 -2
- package/morph-touch/Workflows/src/CreatePermanentChatRoomMapping.csx +11 -1
- package/morph-touch/Workflows/src/EnrichRezervationsForTransferMapping.csx +18 -4
- package/morph-touch/Workflows/src/FetchRoomMessagesForSummaryMapping.csx +10 -2
- package/morph-touch/Workflows/src/InviteAdvisorForRandevuUpdateMapping.csx +10 -1
- package/morph-touch/Workflows/src/InviteNewAdvisorToRezervationRoomMapping.csx +11 -2
- package/morph-touch/Workflows/src/InviteNewParticipantToRandevuRoomMapping.csx +10 -1
- package/morph-touch/Workflows/src/JoinChatRoomForAddParticipantMapping.csx +5 -1
- package/morph-touch/Workflows/src/JoinChatRoomForRandevuStartMapping.csx +5 -1
- package/morph-touch/Workflows/src/JoinChatRoomForRezervationMapping.csx +4 -0
- package/morph-touch/Workflows/src/JoinMatrixRoomMapping.csx +11 -1
- package/morph-touch/Workflows/src/JoinUserToRoomMapping.csx +6 -0
- package/morph-touch/Workflows/src/LoginForAddParticipantChatMapping.csx +35 -6
- package/morph-touch/Workflows/src/LoginForChatRoomMapping.csx +121 -0
- package/morph-touch/Workflows/src/LoginForJoinUserToRoomMapping.csx +142 -0
- package/morph-touch/Workflows/src/LoginForRandevuStartChatMapping.csx +35 -10
- package/morph-touch/Workflows/src/LoginForTransferChatMapping.csx +153 -0
- package/morph-touch/Workflows/src/RegisterForAddParticipantChatMapping.csx +74 -0
- package/morph-touch/Workflows/src/RegisterForChatRoomMapping.csx +74 -0
- package/morph-touch/Workflows/src/RegisterForJoinUserToRoomMapping.csx +87 -0
- package/morph-touch/Workflows/src/RegisterForRandevuStartChatMapping.csx +80 -0
- package/morph-touch/Workflows/src/RegisterForTransferChatMapping.csx +113 -0
- package/morph-touch/Workflows/src/SendPushNotificationMapping.csx +25 -4
- package/morph-touch/Workflows/src/SendSmsNotificationMapping.csx +25 -4
- package/morph-touch/Workflows/src/SendSummaryToNewRoomMapping.csx +10 -2
- package/morph-touch/Workflows/src/SetRoomHistoryVisibilityMapping.csx +12 -4
- package/morph-touch/Workflows/src/ValidateDateForRezervationMapping.csx +16 -2
- package/morph-touch/Workflows/src/ValidateSlotForRandevuUpdateMapping.csx +22 -15
- package/morph-touch/Workflows/src/ValidateSlotForRezervationMapping.csx +23 -16
- package/morph-touch/Workflows/src/ValidateTransferMapping.csx +16 -2
- package/morph-touch/doc/morph-touch-domain.en.md +420 -6
- package/morph-touch/doc/morph-touch-domain.md +423 -6
- package/package.json +1 -1
- package/vnext.config.json +1 -1
- package/burgan-tech-morph-touch-runtime-0.0.6.tgz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Morph-touch domain — teknik özet
|
|
2
2
|
|
|
3
|
-
Bu doküman, `morph-touch` domain’indeki randevu (rezervation), yokluk/absence, sohbet odası, bildirim ve transfer akışlarını; workflow tanımları ve görev mapping’lerindeki davranışa dayanarak özetler.
|
|
3
|
+
Bu doküman, `morph-touch` domain’indeki randevu (rezervation), yokluk/absence, sohbet odası, bildirim ve transfer akışlarını; workflow tanımları ve görev mapping’lerindeki davranışa dayanarak özetler. HTTP örnekleri **`{{BaseUrl}}/morph-touch/...`** şablonunu kullanır; [postman_collection.json](../../postman_collection.json) farklı değişkenlerle (`api/v{{apiVersion}}` vb.) tanımlı olabilir — ortamınızda `baseUrl` ve yol önekini gateway şemanıza göre hizalayın.
|
|
4
4
|
|
|
5
5
|
İngilizce sürüm: [morph-touch-domain.en.md](morph-touch-domain.en.md).
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ Bu doküman, `morph-touch` domain’indeki randevu (rezervation), yokluk/absence
|
|
|
9
9
|
## 1. Genel bakış ve terminoloji
|
|
10
10
|
|
|
11
11
|
- **Domain:** `morph-touch`
|
|
12
|
-
- **Workflow instance:** `key`, `flow` (`sys-flows`), `domain`, `version` ile tanımlı vNext instance modeli; HTTP üzerinden `.../workflows/{flowKey}/instances/...` ile başlatılır ve geçişler `.../transitions/{transitionKey}` ile tetiklenir.
|
|
12
|
+
- **Workflow instance:** `key`, `flow` (`sys-flows`), `domain`, `version` ile tanımlı vNext instance modeli; HTTP üzerinden `.../workflows/{flowKey}/instances/...` ile başlatılır ve geçişler `.../transitions/{transitionKey}` ile tetiklenir. `instances/` sonrası yolda platform **instance id** (UUID) veya `start` isteğinde verilen instance **`key`** kullanılabilir.
|
|
13
13
|
- **Entegrasyonlar:**
|
|
14
14
|
- **DAPR / uygulama API:** `api/v{version}/{domain}/...` (mapping’lerde geçen `functions/state`, `functions/data` yolları).
|
|
15
15
|
- **Matrix:** `MatrixBaseUrl` (secret); oda oluşturma, join, invite, kick, history visibility.
|
|
@@ -63,6 +63,8 @@ flowchart LR
|
|
|
63
63
|
|
|
64
64
|
Kayıtlar çoğunlukla `complete` durumunda tutulur; `update` ile güncellenir, `cancel` ile `cancelled` olur.
|
|
65
65
|
|
|
66
|
+
Detaylı istek gövdeleri, anahtar kuralları ve cURL örnekleri için **§14**’e bakın.
|
|
67
|
+
|
|
66
68
|
### Randevu transferi ile bağlantı
|
|
67
69
|
|
|
68
70
|
- Geçiş **`start-transfer`** yalnızca `absenceType == "personal-leave"` iken değerlendirilir (`CanStartTransferMapping` — [Workflows/src/CanStartTransferMapping.csx](../Workflows/src/CanStartTransferMapping.csx)).
|
|
@@ -276,13 +278,14 @@ Detaylı HTTP örnekleri için [Functions/get-room-messages.http](../Functions/g
|
|
|
276
278
|
### Workflow API şablonları
|
|
277
279
|
|
|
278
280
|
- **Instance başlat:**
|
|
279
|
-
`POST {{baseUrl}}/
|
|
281
|
+
`POST {{baseUrl}}/morph-touch/workflows/{flowKey}/instances/start?sync=true`
|
|
280
282
|
Örnek: `rezervation`, `absence-entry`, `rezervation-start`, `chat-room`, `start-chat`, `rezervation-transfer`, `notification-sender` (alt süreç).
|
|
281
283
|
- **Instance oku:**
|
|
282
|
-
`GET
|
|
284
|
+
`GET {{baseUrl}}/morph-touch/workflows/{flowKey}/instances/{{instanceIdOrKey}}`
|
|
285
|
+
Yol segmenti: platform **instance `id`** (UUID) veya `start` isteğinde verilen instance **`key`** (ör. `working-hour`, `rez-...`).
|
|
283
286
|
- **Geçiş:**
|
|
284
|
-
`PATCH
|
|
285
|
-
Gövde genelde `{ "attributes": { ... } }`.
|
|
287
|
+
`PATCH {{baseUrl}}/morph-touch/workflows/{flowKey}/instances/{{instanceIdOrKey}}/transitions/{transitionKey}?sync=true`
|
|
288
|
+
Aynı şekilde **id** veya **`key`** kullanılabilir. Gövde genelde `{ "attributes": { ... } }`.
|
|
286
289
|
|
|
287
290
|
### Örnek istekler (koleksiyon klasörleri)
|
|
288
291
|
|
|
@@ -325,4 +328,418 @@ Koleksiyon içi açıklamalar: instance filtreleme ve görev tipleri için [vNex
|
|
|
325
328
|
|
|
326
329
|
---
|
|
327
330
|
|
|
331
|
+
## 14. API kullanım kılavuzu (cURL ve alan kuralları)
|
|
332
|
+
|
|
333
|
+
### 14.1 Ön koşul ve sıra
|
|
334
|
+
|
|
335
|
+
Randevu ve **get-available-slots** mantığı için önce **şirket çalışma saatleri** kaydının oluşturulması önerilir (`absenceType: working-hours-change`, instance `key: "working-hour"`, tags `working-hours-change` + `company`). Ardından resmi tatiller, danışman izinleri / özel çalışma saatleri ve rezervasyon akışı kullanılabilir.
|
|
336
|
+
|
|
337
|
+
### 14.2 `{{BaseUrl}}`, yol şablonu ve kimlik doğrulama
|
|
338
|
+
|
|
339
|
+
- Tüm örneklerde **`{{BaseUrl}}`**, ortamınızdaki API gateway **kökünü** temsil eder (örneğin `https://<host>` veya kurulumunuza göre `https://<host>/ebanking`). Değeri APISIX / ortam dokümantasyonunuza göre ayarlayın; kökün sonunda `/` bırakmayın veya birleştirmede **çift slash** (`//morph-touch`) oluşmamasına dikkat edin.
|
|
340
|
+
- Standart şablon: **`{{BaseUrl}}/morph-touch/workflows/...`** ve **`{{BaseUrl}}/morph-touch/functions/...`** (örnek: `{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/start?sync=true`).
|
|
341
|
+
- Postman koleksiyonundaki `{{baseUrl}}` ile aynı rolde düşünülebilir; isimlendirme dokümanda `{{BaseUrl}}` olarak verilmiştir.
|
|
342
|
+
- **`Authorization: Bearer <access_token>`:** Birçok ortamda bu başlık **zorunludur**; gateway veya güvenlik politikasına göre zorunluluk **ortamdan ortama değişebilir** (yerel geliştirme hariç tutulabilir). Erişim jetonu **ortama göre** alınır (geliştirme, test, üretim). Token’ı ilgili kimlik sağlayıcısından veya ortamınızın (APISIX, API portalı, güvenlik ekibi) verdiği yöntemle edinin; örneklerdeki `<access_token>` yalnızca yer tutucudur. Gerçek token’ları repoya veya paylaşılan dokümana yapıştırmayın.
|
|
343
|
+
- `.../workflows/{flowKey}/instances/<segment>/...` adresindeki `<segment>`: **`{{instanceIdOrKey}}`** — ya platformun döndüğü **instance id** ya da instance **`key`** değeridir.
|
|
344
|
+
|
|
345
|
+
### 14.3 Şirket çalışma saatleri — `absence-entry` start (tek sefer)
|
|
346
|
+
|
|
347
|
+
`key` **sabit** `working-hour` olmalıdır. `absenceType` **`working-hours-change`**. `customWorkingHours` altında haftanın günleri (`monday` … `sunday`) tanımlanır; her gün **dizi** olup elemanlar `{ "start": "HH:mm", "end": "HH:mm" }` şeklindedir.
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/start?sync=true' \
|
|
351
|
+
--header 'Content-Type: application/json' \
|
|
352
|
+
--header 'Accept-Language: tr-TR' \
|
|
353
|
+
--header 'X-Request-Id: <uuid>' \
|
|
354
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
355
|
+
--data '{
|
|
356
|
+
"key": "working-hour",
|
|
357
|
+
"tags": ["working-hours-change", "company"],
|
|
358
|
+
"attributes": {
|
|
359
|
+
"absenceType": "working-hours-change",
|
|
360
|
+
"title": "Şirket Çalışma Saatleri",
|
|
361
|
+
"customWorkingHours": {
|
|
362
|
+
"monday": [{"start": "09:00", "end": "12:00"}, {"start": "13:30", "end": "18:00"}],
|
|
363
|
+
"tuesday": [{"start": "09:00", "end": "12:00"}, {"start": "13:30", "end": "18:00"}],
|
|
364
|
+
"wednesday": [{"start": "09:00", "end": "12:00"}, {"start": "13:30", "end": "18:00"}],
|
|
365
|
+
"thursday": [{"start": "09:00", "end": "12:00"}, {"start": "13:30", "end": "18:00"}],
|
|
366
|
+
"friday": [{"start": "09:00", "end": "12:00"}, {"start": "13:30", "end": "17:00"}],
|
|
367
|
+
"saturday": [],
|
|
368
|
+
"sunday": []
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}'
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### 14.4 Şirket çalışma saatleri — sonraki güncellemeler (`update`)
|
|
375
|
+
|
|
376
|
+
Aynı domainde şirket kaydı genelde **bir kez** `start` ile açılır; sonrasında yalnızca **`PATCH .../transitions/update`** kullanılır. URL’de **`{{instanceIdOrKey}}`** olarak ya yanıttaki **platform instance id** (UUID) ya da şirket kaydı için sabit **`key`** (`working-hour`) kullanılabilir.
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
curl --location --request PATCH '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/{{instanceIdOrKey}}/transitions/update?sync=true' \
|
|
380
|
+
--header 'Content-Type: application/json' \
|
|
381
|
+
--header 'Accept-Language: tr-TR' \
|
|
382
|
+
--header 'X-Request-Id: <uuid>' \
|
|
383
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
384
|
+
--data '{
|
|
385
|
+
"attributes": {
|
|
386
|
+
"title": "Şirket Çalışma Saatleri (Güncellendi)",
|
|
387
|
+
"customWorkingHours": {
|
|
388
|
+
"monday": [{"start": "08:30", "end": "12:00"}, {"start": "13:00", "end": "17:30"}],
|
|
389
|
+
"tuesday": [{"start": "08:30", "end": "12:00"}, {"start": "13:00", "end": "17:30"}],
|
|
390
|
+
"wednesday": [{"start": "08:30", "end": "12:00"}, {"start": "13:00", "end": "17:30"}],
|
|
391
|
+
"thursday": [{"start": "08:30", "end": "12:00"}, {"start": "13:00", "end": "17:30"}],
|
|
392
|
+
"friday": [{"start": "08:30", "end": "12:00"}, {"start": "13:00", "end": "16:30"}],
|
|
393
|
+
"saturday": [],
|
|
394
|
+
"sunday": []
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}'
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### 14.5 Resmi tatil (`public-holiday`)
|
|
401
|
+
|
|
402
|
+
`key` deseni: `public-holiday-{tarih}` (örnek: `public-holiday-2026-04-23`). `absenceType` **`public-holiday`**. Tam veya yarım gün için `startDateTime` / `endDateTime` ihtiyaca göre set edilir.
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/start?sync=true' \
|
|
406
|
+
--header 'Content-Type: application/json' \
|
|
407
|
+
--header 'Accept-Language: tr-TR' \
|
|
408
|
+
--header 'X-Request-Id: <uuid>' \
|
|
409
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
410
|
+
--data '{
|
|
411
|
+
"key": "public-holiday-2026-04-23",
|
|
412
|
+
"tags": ["public-holiday"],
|
|
413
|
+
"attributes": {
|
|
414
|
+
"absenceType": "public-holiday",
|
|
415
|
+
"startDateTime": "2026-04-23T00:00:00",
|
|
416
|
+
"endDateTime": "2026-04-23T23:59:59",
|
|
417
|
+
"title": "23 Nisan Ulusal Egemenlik ve Çocuk Bayramı"
|
|
418
|
+
}
|
|
419
|
+
}'
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### 14.6 Kişisel izin (`personal-leave`)
|
|
423
|
+
|
|
424
|
+
`key` deseni: `personal-leave-{advisorId}-{startDateTime}-{endDateTime}`. `absenceType` **`personal-leave`**. `advisor` izin alan danışmanın benzersiz kimliği (çoğunlukla sicil). `advisorType` ortamda kısaltma (**`PM` / `IA`**) veya tam akış değerleri (**`portfolio-manager` / `investment-advisor`**) olarak kullanılabilir; üretim sözleşmenize göre seçin.
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/start?sync=true' \
|
|
428
|
+
--header 'Content-Type: application/json' \
|
|
429
|
+
--header 'Accept-Language: tr-TR' \
|
|
430
|
+
--header 'X-Request-Id: <uuid>' \
|
|
431
|
+
--header 'sub: <kullanici_sub>' \
|
|
432
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
433
|
+
--data '{
|
|
434
|
+
"key": "personal-leave-<advisorId>-2026-04-07T00:00:00-2026-04-07T12:59:59",
|
|
435
|
+
"tags": ["personal-leave"],
|
|
436
|
+
"attributes": {
|
|
437
|
+
"advisor": "<advisorId>",
|
|
438
|
+
"advisorType": "PM",
|
|
439
|
+
"absenceType": "personal-leave",
|
|
440
|
+
"startDateTime": "2026-04-07T00:00:00",
|
|
441
|
+
"endDateTime": "2026-04-07T12:59:59",
|
|
442
|
+
"title": "Müşteri Toplantısı"
|
|
443
|
+
}
|
|
444
|
+
}'
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### 14.7 Danışmana özel çalışma saatleri (`working-hours-change` + advisor)
|
|
448
|
+
|
|
449
|
+
`key` deseni: `working-hour-{advisorId}`. Tags: `working-hours-change`, `advisor`. `advisor` alanı zorunlu; `customWorkingHours` yapısı §14.3 ile aynıdır.
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/start?sync=true' \
|
|
453
|
+
--header 'Content-Type: application/json' \
|
|
454
|
+
--header 'Accept-Language: tr-TR' \
|
|
455
|
+
--header 'X-Request-Id: <uuid>' \
|
|
456
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
457
|
+
--data '{
|
|
458
|
+
"key": "working-hour-<advisorId>",
|
|
459
|
+
"tags": ["working-hours-change", "advisor"],
|
|
460
|
+
"attributes": {
|
|
461
|
+
"advisor": "<advisorId>",
|
|
462
|
+
"absenceType": "working-hours-change",
|
|
463
|
+
"title": "Özel Çalışma Saatleri",
|
|
464
|
+
"customWorkingHours": {
|
|
465
|
+
"monday": [{"start": "10:00", "end": "12:00"}, {"start": "13:00", "end": "19:00"}],
|
|
466
|
+
"tuesday": [],
|
|
467
|
+
"wednesday": [],
|
|
468
|
+
"thursday": [],
|
|
469
|
+
"friday": [],
|
|
470
|
+
"saturday": [],
|
|
471
|
+
"sunday": []
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}'
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### 14.8 İptal — `cancel` geçişi
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
curl --location --request PATCH '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/{{instanceIdOrKey}}/transitions/cancel?sync=true' \
|
|
481
|
+
--header 'Content-Type: application/json' \
|
|
482
|
+
--header 'Accept-Language: tr-TR' \
|
|
483
|
+
--header 'X-Request-Id: <uuid>' \
|
|
484
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
485
|
+
--data '{"attributes": {}}'
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### 14.9 Yokluk güncelleme — `update` (örnek: izin tarihleri)
|
|
489
|
+
|
|
490
|
+
```bash
|
|
491
|
+
curl --location --request PATCH '{{BaseUrl}}/morph-touch/workflows/absence-entry/instances/{{instanceIdOrKey}}/transitions/update?sync=true' \
|
|
492
|
+
--header 'Content-Type: application/json' \
|
|
493
|
+
--header 'Accept-Language: tr-TR' \
|
|
494
|
+
--header 'X-Request-Id: <uuid>' \
|
|
495
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
496
|
+
--data '{
|
|
497
|
+
"attributes": {
|
|
498
|
+
"startDateTime": "2026-01-28T15:00:00",
|
|
499
|
+
"endDateTime": "2026-01-28T17:00:00",
|
|
500
|
+
"title": "Müşteri Toplantısı (Güncellendi)"
|
|
501
|
+
}
|
|
502
|
+
}'
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
### 14.10 `get-absence-entry` fonksiyonu
|
|
506
|
+
|
|
507
|
+
`absenceType` zorunlu; şirket çalışma saatleri için yalnız `working-hours-change` gönderildiğinde şirket geneli kayıtlar döner. Tarih aralığı ile resmi tatiller; `advisor` ile danışman çalışma saatleri.
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
# Şirket çalışma saatleri
|
|
511
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-absence-entry?absenceType=working-hours-change' \
|
|
512
|
+
--header 'Accept: application/json' \
|
|
513
|
+
--header 'Accept-Language: tr-TR' \
|
|
514
|
+
--header 'X-Request-Id: <uuid>' \
|
|
515
|
+
--header 'Authorization: Bearer <access_token>'
|
|
516
|
+
|
|
517
|
+
# Resmi tatiller (tarih aralığı)
|
|
518
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-absence-entry?absenceType=public-holiday&startDate=2026-04-01T00:00:00&endDate=2026-04-30T23:59:59' \
|
|
519
|
+
--header 'Accept: application/json' \
|
|
520
|
+
--header 'Accept-Language: tr-TR' \
|
|
521
|
+
--header 'X-Request-Id: <uuid>' \
|
|
522
|
+
--header 'Authorization: Bearer <access_token>'
|
|
523
|
+
|
|
524
|
+
# Danışman özel çalışma saatleri
|
|
525
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-absence-entry?absenceType=working-hours-change&advisor=<advisorId>' \
|
|
526
|
+
--header 'Accept: application/json' \
|
|
527
|
+
--header 'Accept-Language: tr-TR' \
|
|
528
|
+
--header 'X-Request-Id: <uuid>' \
|
|
529
|
+
--header 'Authorization: Bearer <access_token>'
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
### 14.11 `get-available-slots`
|
|
533
|
+
|
|
534
|
+
Belirtilen `advisorId` ve `date` için o günkü boş slotları döner; `duration` isteğe bağlıdır (dakika).
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-available-slots?advisorId=<advisorId>&date=2026-03-17' \
|
|
538
|
+
--header 'Accept: application/json' \
|
|
539
|
+
--header 'Accept-Language: tr-TR' \
|
|
540
|
+
--header 'X-Request-Id: <uuid>' \
|
|
541
|
+
--header 'Authorization: Bearer <access_token>'
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Örnek gövde:
|
|
545
|
+
|
|
546
|
+
```json
|
|
547
|
+
{
|
|
548
|
+
"getAvailableSlots": {
|
|
549
|
+
"availableSlots": [
|
|
550
|
+
"09:00-09:30",
|
|
551
|
+
"09:30-10:00",
|
|
552
|
+
"10:00-10:30"
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### 14.12 Rezervasyon akışı (`rezervation`)
|
|
559
|
+
|
|
560
|
+
1. **`start`:** `key` her rezervasyon için benzersiz olmalıdır; sonraki adımlarda `randevuKey` olarak bu değer kullanılır. `user`, `advisor`, `startDateTime`, `endDateTime` — slotlarla uyumlu aralık seçin. **`sub`** header’ı token’dan veya açıkça gönderilir (müşteri kimliği).
|
|
561
|
+
2. Geçmiş tarih veya aynı kullanıcı için kurallara aykırı ikinci aktif rezervasyon varsa oluşturma reddedilebilir (bkz. §4 / §12).
|
|
562
|
+
3. State **`slot-unavailable`** ise **`appointment-form-retry`** ile yeni tarih/saat gönderilir.
|
|
563
|
+
4. **`appointment-form`** sonrası **`confirm-selection`** ile kullanıcı girdisi onaylanır.
|
|
564
|
+
5. **`create-appointment`** ile durum **`active`** olur; arka planda bildirim ve kullanıcı bilgisi (`get-user-info-for-rezervation`) çalışır, SMS kayıtlı telefona gider.
|
|
565
|
+
|
|
566
|
+
Aşağıdaki geçiş çağrılarında `instances/` sonrasına **platform instance id** veya `start` ile verdiğiniz rezervasyon **`key`** (ör. `rez-<unique-suffix>`) yazılabilir (`{{rezervationInstanceIdOrKey}}`).
|
|
567
|
+
|
|
568
|
+
```bash
|
|
569
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/rezervation/instances/start?sync=true' \
|
|
570
|
+
--header 'Content-Type: application/json' \
|
|
571
|
+
--header 'Accept-Language: tr-TR' \
|
|
572
|
+
--header 'X-Request-Id: <uuid>' \
|
|
573
|
+
--header 'sub: <customer_sub>' \
|
|
574
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
575
|
+
--data '{
|
|
576
|
+
"key": "rez-<unique-suffix>",
|
|
577
|
+
"tags": ["appointment", "randevu"],
|
|
578
|
+
"attributes": {
|
|
579
|
+
"user": "<userRef>",
|
|
580
|
+
"advisor": "<advisorRef>",
|
|
581
|
+
"startDateTime": "2026-04-17T10:30:00",
|
|
582
|
+
"endDateTime": "2026-04-17T11:00:00"
|
|
583
|
+
}
|
|
584
|
+
}'
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
curl --location --request PATCH '{{BaseUrl}}/morph-touch/workflows/rezervation/instances/{{rezervationInstanceIdOrKey}}/transitions/appointment-form-retry?sync=true' \
|
|
589
|
+
--header 'Content-Type: application/json' \
|
|
590
|
+
--header 'Accept-Language: tr-TR' \
|
|
591
|
+
--header 'X-Request-Id: <uuid>' \
|
|
592
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
593
|
+
--data '{
|
|
594
|
+
"attributes": {
|
|
595
|
+
"startDateTime": "2026-04-17T11:00:00",
|
|
596
|
+
"endDateTime": "2026-04-17T11:30:00"
|
|
597
|
+
}
|
|
598
|
+
}'
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
```bash
|
|
602
|
+
curl --location --request PATCH '{{BaseUrl}}/morph-touch/workflows/rezervation/instances/{{rezervationInstanceIdOrKey}}/transitions/confirm-selection?sync=true' \
|
|
603
|
+
--header 'Content-Type: application/json' \
|
|
604
|
+
--header 'Accept-Language: tr-TR' \
|
|
605
|
+
--header 'X-Request-Id: <uuid>' \
|
|
606
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
607
|
+
--data '{"attributes": {}}'
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
```bash
|
|
611
|
+
curl --location --request PATCH '{{BaseUrl}}/morph-touch/workflows/rezervation/instances/{{rezervationInstanceIdOrKey}}/transitions/create-appointment?sync=true' \
|
|
612
|
+
--header 'Content-Type: application/json' \
|
|
613
|
+
--header 'Accept-Language: tr-TR' \
|
|
614
|
+
--header 'X-Request-Id: <uuid>' \
|
|
615
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
616
|
+
--data '{"attributes": {}}'
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### 14.13 Görüşme başlatma (`rezervation-start`)
|
|
620
|
+
|
|
621
|
+
Randevu başlangıcına **en fazla 15 dakika** kala çağrılabilir; daha erken ise **`meet-not-started`** benzeri dala düşer. `randevuKey` ilgili rezervasyonun `key` değeridir. `participantType`: `customer`, `advisor` veya `invited`; **`invited`** ise **`invitedUserId`** zorunludur ve kullanıcı önce **add-participant-to-rezervation** akışı ile rezervasyona eklenmiş olmalıdır. İlk katılımcı Matrix odasını oluşturur ve rezervasyon **`in-meet`** olur; ikinci katılımcı **join** eder ve LiveKit URL’leri rezervasyon datasına yazılır.
|
|
622
|
+
|
|
623
|
+
```bash
|
|
624
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/rezervation-start/instances/start?sync=true' \
|
|
625
|
+
--header 'Content-Type: application/json' \
|
|
626
|
+
--header 'Accept-Language: tr-TR' \
|
|
627
|
+
--header 'X-Request-Id: <uuid>' \
|
|
628
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
629
|
+
--data '{
|
|
630
|
+
"key": "randevu-<unique-suffix>",
|
|
631
|
+
"tags": ["randevu", "meeting"],
|
|
632
|
+
"attributes": {
|
|
633
|
+
"randevuKey": "rez-<unique-suffix>",
|
|
634
|
+
"participantType": "advisor"
|
|
635
|
+
}
|
|
636
|
+
}'
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
Davetli örneği: `participantType: "invited"` ve `invitedUserId: "<davetliId>"` ekleyin.
|
|
640
|
+
|
|
641
|
+
### 14.14 Rezervasyona katılımcı ekleme (`add-participant-to-rezervation`)
|
|
642
|
+
|
|
643
|
+
```bash
|
|
644
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/add-participant-to-rezervation/instances/start?sync=true' \
|
|
645
|
+
--header 'Content-Type: application/json' \
|
|
646
|
+
--header 'Accept-Language: tr-TR' \
|
|
647
|
+
--header 'X-Request-Id: <uuid>' \
|
|
648
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
649
|
+
--data '{
|
|
650
|
+
"key": "add-participant-<unique-suffix>",
|
|
651
|
+
"tags": ["rezervation", "add-participant"],
|
|
652
|
+
"attributes": {
|
|
653
|
+
"randevuKey": "rez-<unique-suffix>",
|
|
654
|
+
"newUserId": "<davetEdilecekSicil>"
|
|
655
|
+
}
|
|
656
|
+
}'
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
Önerilen `key` deseni: `add-participant-{advisorId}-{randevuKey}` (benzersizlik için).
|
|
660
|
+
|
|
661
|
+
### 14.15 Aktif rezervasyon güncelleme (`rezervation-update`)
|
|
662
|
+
|
|
663
|
+
`randevuKey` güncellenecek rezervasyonun `key` değeridir. `startDateTime`, `endDateTime`, `advisor` ihtiyaca göre gönderilir. **`autoProcess: true`** ise akış doğrulamayı otomatik ilerletebilir; **`false`** ise `start` sonrası güncelleme değerleri **`PATCH .../transitions/to-validate`** ile gönderilir ([rezervation-update.json](../Workflows/rezervation-update.json)).
|
|
664
|
+
|
|
665
|
+
```bash
|
|
666
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/rezervation-update/instances/start?sync=true' \
|
|
667
|
+
--header 'Content-Type: application/json' \
|
|
668
|
+
--header 'Accept-Language: tr-TR' \
|
|
669
|
+
--header 'X-Request-Id: <uuid>' \
|
|
670
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
671
|
+
--data '{
|
|
672
|
+
"key": "rezervation-update-<unique-suffix>",
|
|
673
|
+
"tags": ["rezervation", "randevu", "update"],
|
|
674
|
+
"attributes": {
|
|
675
|
+
"randevuKey": "rez-<unique-suffix>",
|
|
676
|
+
"startDateTime": "2026-02-03T10:00:00",
|
|
677
|
+
"endDateTime": "2026-02-03T10:30:00",
|
|
678
|
+
"advisor": "<yeniAdvisorRef>",
|
|
679
|
+
"autoProcess": true
|
|
680
|
+
}
|
|
681
|
+
}'
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
### 14.16 Kalıcı sohbet — `start-chat`
|
|
685
|
+
|
|
686
|
+
Oda yoksa oluşturulur; varsa doğrudan **`in-chat`**. `user` sohbeti başlatan müşteri; `advisorType` **`PM`** veya **`IA`**; `advisorId` danışmanın benzersiz kimliği (sicil).
|
|
687
|
+
|
|
688
|
+
```bash
|
|
689
|
+
curl --location '{{BaseUrl}}/morph-touch/workflows/start-chat/instances/start?sync=true' \
|
|
690
|
+
--header 'Content-Type: application/json' \
|
|
691
|
+
--header 'Accept-Language: tr-TR' \
|
|
692
|
+
--header 'X-Request-Id: <uuid>' \
|
|
693
|
+
--header 'Authorization: Bearer <access_token>' \
|
|
694
|
+
--data '{
|
|
695
|
+
"key": "start-chat-<unique-suffix>",
|
|
696
|
+
"tags": ["chat", "start-chat"],
|
|
697
|
+
"attributes": {
|
|
698
|
+
"user": "<userRef>",
|
|
699
|
+
"advisorType": "IA",
|
|
700
|
+
"advisorId": "<advisorId>"
|
|
701
|
+
}
|
|
702
|
+
}'
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
### 14.17 Sohbet odaları ve mesajlar (domain fonksiyonları)
|
|
706
|
+
|
|
707
|
+
Canonical yol: **`GET {{BaseUrl}}/morph-touch/functions/get-chat-rooms`** ve **`GET .../functions/get-room-messages`**. Bazı gateway kurulumlarında farklı önek olabilir.
|
|
708
|
+
|
|
709
|
+
**`get-chat-rooms`:** `user` **veya** `advisor` (ikisi birden değil). İsteğe bağlı `roomType`: `permanent` veya `rezervation`.
|
|
710
|
+
|
|
711
|
+
**Not:** [GetChatRoomsMapping](../Functions/src/GetChatRoomsMapping.csx) içinde instance sorgusu şu an sabit `pageSize=100` ile yapılabilir; query’de `pageSize` geçmek her zaman etkili olmayabilir.
|
|
712
|
+
|
|
713
|
+
```bash
|
|
714
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-chat-rooms?user=<userRef>&roomType=permanent' \
|
|
715
|
+
--header 'Accept: application/json' \
|
|
716
|
+
--header 'Accept-Language: tr-TR' \
|
|
717
|
+
--header 'X-Request-Id: <uuid>' \
|
|
718
|
+
--header 'Authorization: Bearer <access_token>'
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
**`get-room-messages`:** Zorunlu `roomId`, `user`. İsteğe bağlı **`limit`** (varsayılan mapping tarafında 50); sayfalama için `from` token’ı kullanılabilir.
|
|
722
|
+
|
|
723
|
+
```bash
|
|
724
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-room-messages?roomId=<encodedRoomId>&user=<userRef>&limit=20' \
|
|
725
|
+
--header 'Accept: application/json' \
|
|
726
|
+
--header 'Accept-Language: tr-TR' \
|
|
727
|
+
--header 'X-Request-Id: <uuid>' \
|
|
728
|
+
--header 'Authorization: Bearer <access_token>'
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
### 14.18 Rezervasyon listesi — `get-rezervations`
|
|
732
|
+
|
|
733
|
+
Query: `advisorId`, `userId`, `startDate`, `endDate` — tarihler zorunlu değildir; aralık filtrelemek için kullanılır.
|
|
734
|
+
|
|
735
|
+
```bash
|
|
736
|
+
curl --location '{{BaseUrl}}/morph-touch/functions/get-rezervations?advisorId=<advisorId>&startDate=2026-02-01&endDate=2026-02-28' \
|
|
737
|
+
--header 'Accept: application/json' \
|
|
738
|
+
--header 'Accept-Language: tr-TR' \
|
|
739
|
+
--header 'X-Request-Id: <uuid>' \
|
|
740
|
+
--header 'Authorization: Bearer <access_token>'
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
---
|
|
744
|
+
|
|
328
745
|
*Bu doküman, kod ve workflow tanımlarına göre oluşturulmuştur; çalışma zamanı URL’leri ve auth şeması ortamınıza göre değişebilir.*
|
package/package.json
CHANGED
package/vnext.config.json
CHANGED
|
Binary file
|