Monday DTO
Описание сущностей и типов из src/dto/monday/.
Обогащено snapshot-данными бэкенд-DTO (0 из 30 типов сопоставлено, snapshot от 2026-05-05T13:21:51.699Z).
Содержание
- BootstrapPreviewReportDto
- ConflictPropertySummaryDto
- DuplicateResolutionDto
- DuplicateResolutionListPageDto
- GetSyncChangesRequestDto
- GetSyncEntityHistoryRequestDto
- InsuranceAliasDto
- InsuranceAliasListPageDto
- MondayQuotaDto
- PreviewCollisionDto
- SkipChangeOutcomeDto
- SkipChangesResultDto
- StaleDiffDto
- StaleDiffEntryDto
- StaleDiffEntryKindDto
- SyncChangeDto
- SyncChangeListPageDto
- SyncChangeOperationTypeDto
- SyncChangeStatusDto
- SyncEntityHistoryPageDto
- SyncEntityHistoryRowDto
- SyncEntityTypeDto
- SyncErrorGroupDto
- SyncErrorsSummaryDto
- SyncRequestDetailDto
- SyncRequestListPageDto
- SyncRequestStatusDto
- SyncRequestSummaryDto
- SyncSideDto
- UnresolvedInsuranceCompanyDto
BootstrapPreviewReportDto
Snapshot of what a bootstrap import would do, computed before any mutation.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
workersTotal | number | да | — |
clientsTotal | number | да | — |
workersToInsert | number | да | — |
workersToSkip | number | да | — |
clientsToInsert | number | да | — |
clientsToSkip | number | да | — |
matchedSingle | number | да | — |
matchedAmbiguous | number | да | — |
matchedSoftDeleted | number | да | — |
missingRequiredField | number | да | — |
loginCollisions | number | да | — |
loginDuplicatesInBatch | number | да | — |
assignmentsToCreate | number | да | Clients whose "zugeteilte Fee" resolves to exactly one worker with no existing assignment — a WorkerAssignment the apply will create. Preview estimate. |
assignmentsToReactivate | number | да | Clients whose assigned worker already has a non-InWork assignment that the apply will reactivate to InWork. Preview estimate. |
assignmentsToClose | number | да | Incremental sync only: active assignments the apply will close (zugeteilte Fee cleared or changed). 0 for bootstrap import. |
assignmentsAmbiguous | number | да | Clients whose "zugeteilte Fee" matches more than one worker by name — left for the operator, never auto-assigned. |
assignmentsUnmatched | number | да | Clients whose "zugeteilte Fee" matches no worker in the import. |
addressesRequested | number | да | — |
addressesResolved | number | да | — |
addressMisses | number | да | — |
estimatedAddressCacheHits | number | нет | Of the addresses resolved for this preview, how many came from the geocoding cache (no Google Places call). |
estimatedAddressApiCalls | number | нет | Address resolutions that needed a paid Google Places call (Autocomplete + Place Details), incl. misses. Note: this cost is spent while building the preview, not at apply. |
estimatedDistancePairs | number | да | Estimated client↔worker distance pairs this import would compute (dry-run, before approve). |
estimatedDistanceCacheHits | number | да | Of estimatedDistancePairs, how many are already cached. |
estimatedDistanceGoogleApiCalls | number | да | Of estimatedDistancePairs, how many would need a fresh (paid) Google Routes call. |
distanceEstimateReliable | boolean | да | False when the estimate could not be trusted (failed, or 0 pairs despite create/update work). The UI must not show the numbers as a reliable "0 Google calls" in that case. |
distanceEstimatePending | boolean | нет | True while the estimate is still being computed asynchronously (the figures above are not yet final). Poll GetSyncRequestStatus and watch estimateStage for live progress; the report is patched with the final figures when it reaches Done. |
estimatedMondayApiRequests | number | нет | Estimated number of Monday API calls the apply will consume (Business→Monday writes batch ≤30 per request; Monday→Business creates read one item each). ≈0 for Import (writes to the Business layer, not Monday). |
collisions | PreviewCollisionDto[] | да | — |
Пример
{
"workersTotal": 0,
"clientsTotal": 0,
"workersToInsert": 0,
"workersToSkip": 0,
"clientsToInsert": 0,
"clientsToSkip": 0,
"matchedSingle": 0,
"matchedAmbiguous": 0,
"matchedSoftDeleted": 0,
"missingRequiredField": 0,
"loginCollisions": 0,
"loginDuplicatesInBatch": 0,
"assignmentsToCreate": 0,
"assignmentsToReactivate": 0,
"assignmentsToClose": 0,
"assignmentsAmbiguous": 0,
"assignmentsUnmatched": 0,
"addressesRequested": 0,
"addressesResolved": 0,
"addressMisses": 0,
"estimatedAddressCacheHits": 0,
"estimatedAddressApiCalls": 0,
"estimatedDistancePairs": 0,
"estimatedDistanceCacheHits": 0,
"estimatedDistanceGoogleApiCalls": 0,
"distanceEstimateReliable": false,
"distanceEstimatePending": false,
"estimatedMondayApiRequests": 0,
"collisions": []
}ConflictPropertySummaryDto
Number of still-conflicting changes per property name within a sync request.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
propertyName | string | да | — |
count | number | да | — |
Пример
{
"propertyName": "string",
"count": 0
}DuplicateResolutionDto
Remembered duplicate decision (which Monday row wins for a Business entity), reused by future imports.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
id | number | да | — |
entityType | string | да | Entity type: "Worker" or "Client". |
businessEntityId | number | да | Id of the Business (DAF) entity the duplicate group maps to. |
chosenMondayItemId | string | да | Id of the Monday row chosen as the winner. |
createDateTime | string | null | нет | — |
Пример
{
"id": 0,
"entityType": "string",
"businessEntityId": 0,
"chosenMondayItemId": "uuid",
"createDateTime": "2026-05-05T08:00:00Z"
}DuplicateResolutionListPageDto
One server-side page of remembered duplicate decisions.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
total | number | да | — |
page | number | да | — |
rowsPerPage | number | да | — |
items | DuplicateResolutionDto[] | да | — |
Пример
{
"total": 0,
"page": 0,
"rowsPerPage": 0,
"items": []
}GetSyncChangesRequestDto
Pagination and filters for the server-side changes table of a sync request.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
page | number | да | — |
rowsPerPage | number | да | — |
status | SyncChangeStatusDto | null | нет | Filter by change status. |
sourceSide | SyncSideDto | null | нет | Filter by the side the change originates from. |
entityType | SyncEntityTypeDto | null | нет | Filter by entity type (Worker/Client). |
property | string | null | нет | Filter by target property name. |
search | string | null | нет | Free-text search over entity display names. |
Пример
{
"page": 0,
"rowsPerPage": 0,
"status": "<syncchangestatusdto>",
"sourceSide": "<syncsidedto>",
"entityType": "<syncentitytypedto>",
"property": "string",
"search": "string"
}GetSyncEntityHistoryRequestDto
Pagination and filters for the per-entity sync history.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
entityType | "Worker" | "Client" | да | Entity type the history belongs to. |
businessEntityId | number | null | нет | Id of the entity in Business (DAF). Provide this or mondayItemId. |
mondayItemId | string | null | нет | Id of the Monday item. Provide this or businessEntityId. |
page | number | да | — |
rowsPerPage | number | да | — |
Пример
{
"entityType": "<\"Worker\" | \"Client\">",
"businessEntityId": 0,
"mondayItemId": "uuid",
"page": 0,
"rowsPerPage": 0
}InsuranceAliasDto
Operator-curated mapping from a raw Monday insurance company name to a CRM insurance company.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
id | number | да | — |
alias | string | да | Raw name as it appears in Monday. |
insuranceCompanyId | number | да | Id of the CRM insurance company the alias resolves to. |
insuranceCompanyName | string | null | нет | Display name of the resolved CRM insurance company. |
createDateTime | string | null | нет | — |
Пример
{
"id": 0,
"alias": "string",
"insuranceCompanyId": 0,
"insuranceCompanyName": "string",
"createDateTime": "2026-05-05T08:00:00Z"
}InsuranceAliasListPageDto
One server-side page of insurance aliases.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
total | number | да | — |
page | number | да | — |
rowsPerPage | number | да | — |
items | InsuranceAliasDto[] | да | — |
Пример
{
"total": 0,
"page": 0,
"rowsPerPage": 0,
"items": []
}MondayQuotaDto
Current consumption of the Monday daily API call quota (resets at midnight UTC).
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
date | string | да | UTC date (ISO-8601) the counters belong to. |
used | number | да | API calls already consumed today. |
limit | number | да | Daily limit configured for the Monday account. |
remaining | number | да | Calls still available before the apply phase gets deferred (WaitingForApiLimit). |
Пример
{
"date": "2026-05-05T08:00:00Z",
"used": 0,
"limit": 0,
"remaining": 0
}PreviewCollisionDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
entityType | string | да | — |
kind | string | да | — |
entityDisplayName | string | null | нет | — |
mondayItemId | string | null | нет | — |
businessEntityId | number | null | нет | — |
details | string | null | нет | — |
Пример
{
"entityType": "string",
"kind": "string",
"entityDisplayName": "string",
"mondayItemId": "uuid",
"businessEntityId": 0,
"details": "string"
}SkipChangeOutcomeDto
Per-change outcome of a bulk Skip/Unskip operation.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
changeId | number | да | — |
succeeded | boolean | да | True when the change was actually skipped/unskipped. |
reason | string | null | нет | Why the change was left untouched (e.g. not found, status does not allow it). |
Пример
{
"changeId": 0,
"succeeded": false,
"reason": "string"
}SkipChangesResultDto
Result of a bulk Skip/Unskip operation — one outcome per requested change id.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
outcomes | SkipChangeOutcomeDto[] | да | — |
Пример
{
"outcomes": []
}StaleDiffDto
Diff between the data the sync model was built on and the current CRM state — explains why a request became Stale.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
totalWorkersChanged | number | да | — |
totalClientsChanged | number | да | — |
truncated | boolean | да | True when the workers/clients lists were cut off and do not contain every changed entity. |
workers | StaleDiffEntryDto[] | да | — |
clients | StaleDiffEntryDto[] | да | — |
Пример
{
"totalWorkersChanged": 0,
"totalClientsChanged": 0,
"truncated": false,
"workers": [],
"clients": []
}StaleDiffEntryDto
One entity that changed in CRM since the sync model was built.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
businessEntityId | number | да | — |
displayName | string | да | — |
kind | StaleDiffEntryKindDto | да | — |
changedFields | string[] | да | Property names that differ (empty for Added/Removed). |
Пример
{
"businessEntityId": 0,
"displayName": "string",
"kind": "<StaleDiffEntryKindDto>",
"changedFields": []
}StaleDiffEntryKindDto
How an entity differs between the stale model snapshot and the current CRM data.
"Added" | "Removed" | "Changed"
SyncChangeDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
id | number | да | — |
syncRequestId | number | да | — |
entityType | SyncEntityTypeDto | да | — |
entityDisplayName | string | да | — |
businessEntityId | number | null | нет | — |
mondayItemId | string | null | нет | — |
counterpartyBusinessEntityId | number | null | нет | Linked second entity for a WorkerAssignment change (the worker, when the primary entity is the client). |
counterpartyMondayItemId | string | null | нет | — |
counterpartyDisplayName | string | null | нет | — |
sourceSide | SyncSideDto | да | — |
operationType | SyncChangeOperationTypeDto | да | — |
sourcePropertyName | string | null | нет | — |
targetPropertyName | string | null | нет | — |
beforeValue | string | null | нет | — |
afterValue | string | null | нет | — |
status | SyncChangeStatusDto | да | — |
errorMessage | string | null | нет | — |
resolvedWinner | SyncSideDto | null | нет | — |
resolvedByUserId | number | null | нет | — |
resolvedDateTime | string | null | нет | — |
Пример
{
"id": 0,
"syncRequestId": 0,
"entityType": "<SyncEntityTypeDto>",
"entityDisplayName": "string",
"businessEntityId": 0,
"mondayItemId": "uuid",
"counterpartyBusinessEntityId": 0,
"counterpartyMondayItemId": "uuid",
"counterpartyDisplayName": "string",
"sourceSide": "<SyncSideDto>",
"operationType": "<SyncChangeOperationTypeDto>",
"sourcePropertyName": "string",
"targetPropertyName": "string",
"beforeValue": "string",
"afterValue": "string",
"status": "<SyncChangeStatusDto>",
"errorMessage": "string",
"resolvedWinner": "<syncsidedto>",
"resolvedByUserId": 0,
"resolvedDateTime": "2026-05-05T08:00:00Z"
}SyncChangeListPageDto
One server-side page of the changes table of a sync request.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
total | number | да | — |
page | number | да | — |
rowsPerPage | number | да | — |
items | SyncChangeDto[] | да | — |
Пример
{
"total": 0,
"page": 0,
"rowsPerPage": 0,
"items": []
}SyncChangeOperationTypeDto
Operation carried out by the change (entity-level create vs per-property update).
Значения
| Имя | Значение | Описание |
|---|---|---|
NotFound | 0 | — |
Create | 1 | — |
Update | 2 | — |
Пример
0SyncChangeStatusDto
Execution status of an individual change row.
Значения
| Имя | Значение | Описание |
|---|---|---|
NotFound | 0 | — |
InPending | 1 | — |
Syncing | 2 | — |
Synced | 3 | — |
Conflict | 4 | — |
Error | 5 | — |
Пример
0SyncEntityHistoryPageDto
One server-side page of the per-entity sync history.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
total | number | да | — |
page | number | да | — |
rowsPerPage | number | да | — |
items | SyncEntityHistoryRowDto[] | да | — |
Пример
{
"total": 0,
"page": 0,
"rowsPerPage": 0,
"items": []
}SyncEntityHistoryRowDto
One change applied to (or attempted on) an entity across all sync requests.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
requestId | number | да | Id of the sync request the change belongs to. |
requestKind | string | да | Flow of the request: "Import" or "Sync". |
requestCreateDateTime | string | да | ISO-8601 UTC timestamp the request was created. |
propertyName | string | null | нет | — |
beforeValue | string | null | нет | — |
afterValue | string | null | нет | — |
sourceSide | SyncSideDto | да | — |
status | SyncChangeStatusDto | да | — |
errorMessage | string | null | нет | — |
mondayItemId | string | null | нет | — |
mondayItemUrl | string | null | нет | — |
Пример
{
"requestId": 0,
"requestKind": "string",
"requestCreateDateTime": "2026-05-05T08:00:00Z",
"propertyName": "string",
"beforeValue": "string",
"afterValue": "string",
"sourceSide": "<SyncSideDto>",
"status": "<SyncChangeStatusDto>",
"errorMessage": "string",
"mondayItemId": "uuid",
"mondayItemUrl": "https://..."
}SyncEntityTypeDto
Type of the entity a change refers to.
Значения
| Имя | Значение | Описание |
|---|---|---|
NotFound | 0 | — |
Worker | 1 | — |
Client | 2 | — |
WorkerAssignment | 3 | — |
Пример
0SyncErrorGroupDto
A group of failed changes sharing the same normalized error message.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
message | string | да | Original (raw) error message of the first change in the group. |
normalized | string | да | Normalized message used as the grouping key (ids/values stripped). |
count | number | да | Number of changes in Error status with this normalized message. |
changeIds | number[] | да | Ids of the changes in the group. |
entitySamples | string[] | да | A few entity display names affected by the group, for quick orientation. |
Пример
{
"message": "string",
"normalized": "string",
"count": 0,
"changeIds": [],
"entitySamples": []
}SyncErrorsSummaryDto
Errors of a sync request grouped by normalized message.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
items | SyncErrorGroupDto[] | да | — |
Пример
{
"items": []
}SyncRequestDetailDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
summary | SyncRequestSummaryDto | да | — |
changes | SyncChangeDto[] | да | — |
Пример
{
"summary": "<SyncRequestSummaryDto>",
"changes": []
}SyncRequestListPageDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
total | number | да | — |
page | number | да | — |
rowsPerPage | number | да | — |
items | SyncRequestSummaryDto[] | да | — |
Пример
{
"total": 0,
"page": 0,
"rowsPerPage": 0,
"items": []
}SyncRequestStatusDto
Status of a full Monday ↔ Business sync request.
Значения
| Имя | Значение | Описание |
|---|---|---|
NotFound | 0 | — |
Syncing | 1 | — |
Synced | 2 | — |
PartiallySynced | 3 | — |
PreviewPending | 4 | Bootstrap import: background worker has not yet built the preview. |
PreviewReady | 5 | Bootstrap import: preview built, waiting for the user to approve. |
Cancelled | 6 | Request was cancelled by the operator before/while applying. |
NoChanges | 7 | Preview built but the diff was empty — nothing to apply on either side. |
Stale | 8 | Business (DAF) data changed since the preview was built — operator must recompute before applying. |
WaitingForApiLimit | 9 | Apply hit Monday's daily API call limit; the remaining changes are deferred until the quota resets (midnight UTC), then the background worker auto-resumes. See resumeAfterDateTime. |
Пример
0SyncRequestSummaryDto
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
id | number | да | — |
status | SyncRequestStatusDto | да | — |
assignedUserId | number | да | — |
assignedUserFullName | string | да | — |
workersXlsxFileName | string | null | нет | — |
clientsXlsxFileName | string | null | нет | — |
createDateTime | string | да | — |
processedDateTime | string | null | нет | — |
totalChanges | number | да | — |
conflictCount | number | да | — |
errorCount | number | да | — |
pendingCount | number | да | — |
processedCount | number | нет | — |
totalCount | number | нет | — |
requiresApproval | boolean | нет | Bootstrap-import preview/approve flow — true when the request was uploaded with requiresApproval. |
previewBuiltDateTime | string | null | нет | ISO-8601 UTC timestamp (e.g. "2026-05-18T12:34:56.789Z") set when the preview build completed. |
approvedDateTime | string | null | нет | ISO-8601 UTC timestamp set when an admin approved the preview and unblocked the apply phase. |
approvedByUserFullName | string | null | нет | — |
resumeAfterDateTime | string | null | нет | When status is WaitingForApiLimit, ISO-8601 UTC time the request will resume (Monday daily quota reset, midnight UTC). |
estimatedMondayApiRequests | number | нет | Estimated number of Monday API calls the apply will consume (batched ≤30 per request). ≈0 for Import. |
previewReport | BootstrapPreviewReportDto | null | нет | Computed report attached while status is PreviewPending or PreviewReady. |
Пример
{
"id": 0,
"status": "<SyncRequestStatusDto>",
"assignedUserId": 0,
"assignedUserFullName": "string",
"workersXlsxFileName": "string",
"clientsXlsxFileName": "string",
"createDateTime": "2026-05-05T08:00:00Z",
"processedDateTime": "2026-05-05T08:00:00Z",
"totalChanges": 0,
"conflictCount": 0,
"errorCount": 0,
"pendingCount": 0,
"processedCount": 0,
"totalCount": 0,
"requiresApproval": false,
"previewBuiltDateTime": "2026-05-05T08:00:00Z",
"approvedDateTime": "2026-05-05T08:00:00Z",
"approvedByUserFullName": "string",
"resumeAfterDateTime": "2026-05-05T08:00:00Z",
"estimatedMondayApiRequests": 0,
"previewReport": "<bootstrappreviewreportdto>"
}SyncSideDto
Origin of a detected change or a snapshot row.
Значения
| Имя | Значение | Описание |
|---|---|---|
NotFound | 0 | — |
Business | 1 | — |
Monday | 2 | — |
Пример
0UnresolvedInsuranceCompanyDto
An insurance company name from Monday that could not be matched to a CRM insurance company.
Поля
| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
name | string | да | Raw insurance company name as it appears in Monday. |
count | number | да | Number of changes blocked by this unresolved name. |
changeIds | number[] | да | Ids of the affected changes. |
Пример
{
"name": "string",
"count": 0,
"changeIds": []
}