@voyant-travel/distribution-react 0.109.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/LICENSE +201 -0
- package/README.md +82 -0
- package/dist/admin/index.d.ts +30 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +65 -0
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +59 -0
- package/dist/components/booking-link-detail-page.d.ts +10 -0
- package/dist/components/booking-link-detail-page.d.ts.map +1 -0
- package/dist/components/booking-link-detail-page.js +51 -0
- package/dist/components/channel-detail-page.d.ts +12 -0
- package/dist/components/channel-detail-page.d.ts.map +1 -0
- package/dist/components/channel-detail-page.js +41 -0
- package/dist/components/channel-sync-controls.d.ts +15 -0
- package/dist/components/channel-sync-controls.d.ts.map +1 -0
- package/dist/components/channel-sync-controls.js +29 -0
- package/dist/components/channel-sync-deliveries-drawer.d.ts +12 -0
- package/dist/components/channel-sync-deliveries-drawer.d.ts.map +1 -0
- package/dist/components/channel-sync-deliveries-drawer.js +18 -0
- package/dist/components/channel-sync-page-utils.d.ts +99 -0
- package/dist/components/channel-sync-page-utils.d.ts.map +1 -0
- package/dist/components/channel-sync-page-utils.js +85 -0
- package/dist/components/channel-sync-page.d.ts +4 -0
- package/dist/components/channel-sync-page.d.ts.map +1 -0
- package/dist/components/channel-sync-page.js +141 -0
- package/dist/components/channels-page.d.ts +6 -0
- package/dist/components/channels-page.d.ts.map +1 -0
- package/dist/components/channels-page.js +132 -0
- package/dist/components/commission-rule-detail-page.d.ts +10 -0
- package/dist/components/commission-rule-detail-page.d.ts.map +1 -0
- package/dist/components/commission-rule-detail-page.js +57 -0
- package/dist/components/contract-detail-page.d.ts +10 -0
- package/dist/components/contract-detail-page.d.ts.map +1 -0
- package/dist/components/contract-detail-page.js +64 -0
- package/dist/components/distribution-overview.d.ts +19 -0
- package/dist/components/distribution-overview.d.ts.map +1 -0
- package/dist/components/distribution-overview.js +13 -0
- package/dist/components/distribution-page.d.ts +26 -0
- package/dist/components/distribution-page.d.ts.map +1 -0
- package/dist/components/distribution-page.js +190 -0
- package/dist/components/distribution-section-header.d.ts +7 -0
- package/dist/components/distribution-section-header.d.ts.map +1 -0
- package/dist/components/distribution-section-header.js +6 -0
- package/dist/components/distribution-shared.d.ts +32 -0
- package/dist/components/distribution-shared.d.ts.map +1 -0
- package/dist/components/distribution-shared.js +246 -0
- package/dist/components/distribution-tabs-primary.d.ts +57 -0
- package/dist/components/distribution-tabs-primary.d.ts.map +1 -0
- package/dist/components/distribution-tabs-primary.js +89 -0
- package/dist/components/distribution-tabs-secondary.d.ts +58 -0
- package/dist/components/distribution-tabs-secondary.d.ts.map +1 -0
- package/dist/components/distribution-tabs-secondary.js +89 -0
- package/dist/components/mapping-detail-page.d.ts +10 -0
- package/dist/components/mapping-detail-page.d.ts.map +1 -0
- package/dist/components/mapping-detail-page.js +51 -0
- package/dist/components/webhook-event-detail-page.d.ts +9 -0
- package/dist/components/webhook-event-detail-page.d.ts.map +1 -0
- package/dist/components/webhook-event-detail-page.js +46 -0
- package/dist/constants.d.ts +103 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +48 -0
- package/dist/external-refs/client.d.ts +14 -0
- package/dist/external-refs/client.d.ts.map +1 -0
- package/dist/external-refs/client.js +58 -0
- package/dist/external-refs/components/entity-ref-picker.d.ts +21 -0
- package/dist/external-refs/components/entity-ref-picker.d.ts.map +1 -0
- package/dist/external-refs/components/entity-ref-picker.js +38 -0
- package/dist/external-refs/components/external-ref-dialog.d.ts +11 -0
- package/dist/external-refs/components/external-ref-dialog.d.ts.map +1 -0
- package/dist/external-refs/components/external-ref-dialog.js +120 -0
- package/dist/external-refs/components/external-refs-page.d.ts +16 -0
- package/dist/external-refs/components/external-refs-page.d.ts.map +1 -0
- package/dist/external-refs/components/external-refs-page.js +109 -0
- package/dist/external-refs/hooks/index.d.ts +3 -0
- package/dist/external-refs/hooks/index.d.ts.map +1 -0
- package/dist/external-refs/hooks/index.js +2 -0
- package/dist/external-refs/hooks/use-external-ref-mutation.d.ts +57 -0
- package/dist/external-refs/hooks/use-external-ref-mutation.d.ts.map +1 -0
- package/dist/external-refs/hooks/use-external-ref-mutation.js +40 -0
- package/dist/external-refs/hooks/use-external-refs.d.ts +26 -0
- package/dist/external-refs/hooks/use-external-refs.d.ts.map +1 -0
- package/dist/external-refs/hooks/use-external-refs.js +12 -0
- package/dist/external-refs/i18n/en.d.ts +3 -0
- package/dist/external-refs/i18n/en.d.ts.map +1 -0
- package/dist/external-refs/i18n/en.js +92 -0
- package/dist/external-refs/i18n/index.d.ts +5 -0
- package/dist/external-refs/i18n/index.d.ts.map +1 -0
- package/dist/external-refs/i18n/index.js +3 -0
- package/dist/external-refs/i18n/messages.d.ts +85 -0
- package/dist/external-refs/i18n/messages.d.ts.map +1 -0
- package/dist/external-refs/i18n/messages.js +1 -0
- package/dist/external-refs/i18n/provider.d.ts +26 -0
- package/dist/external-refs/i18n/provider.d.ts.map +1 -0
- package/dist/external-refs/i18n/provider.js +44 -0
- package/dist/external-refs/i18n/ro.d.ts +3 -0
- package/dist/external-refs/i18n/ro.d.ts.map +1 -0
- package/dist/external-refs/i18n/ro.js +92 -0
- package/dist/external-refs/index.d.ts +7 -0
- package/dist/external-refs/index.d.ts.map +1 -0
- package/dist/external-refs/index.js +6 -0
- package/dist/external-refs/provider.d.ts +2 -0
- package/dist/external-refs/provider.d.ts.map +1 -0
- package/dist/external-refs/provider.js +1 -0
- package/dist/external-refs/query-keys.d.ts +18 -0
- package/dist/external-refs/query-keys.d.ts.map +1 -0
- package/dist/external-refs/query-keys.js +6 -0
- package/dist/external-refs/query-options.d.ts +159 -0
- package/dist/external-refs/query-options.d.ts.map +1 -0
- package/dist/external-refs/query-options.js +31 -0
- package/dist/external-refs/schemas.d.ts +82 -0
- package/dist/external-refs/schemas.d.ts.map +1 -0
- package/dist/external-refs/schemas.js +20 -0
- package/dist/external-refs/ui.d.ts +5 -0
- package/dist/external-refs/ui.d.ts.map +1 -0
- package/dist/external-refs/ui.js +4 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/use-booking-links.d.ts +20 -0
- package/dist/hooks/use-booking-links.d.ts.map +1 -0
- package/dist/hooks/use-booking-links.js +9 -0
- package/dist/hooks/use-bookings.d.ts +14 -0
- package/dist/hooks/use-bookings.d.ts.map +1 -0
- package/dist/hooks/use-bookings.js +9 -0
- package/dist/hooks/use-channel-mutation.d.ts +69 -0
- package/dist/hooks/use-channel-mutation.d.ts.map +1 -0
- package/dist/hooks/use-channel-mutation.js +49 -0
- package/dist/hooks/use-channel.d.ts +16 -0
- package/dist/hooks/use-channel.d.ts.map +1 -0
- package/dist/hooks/use-channel.js +13 -0
- package/dist/hooks/use-channels.d.ts +20 -0
- package/dist/hooks/use-channels.d.ts.map +1 -0
- package/dist/hooks/use-channels.js +9 -0
- package/dist/hooks/use-commission-rules.d.ts +23 -0
- package/dist/hooks/use-commission-rules.d.ts.map +1 -0
- package/dist/hooks/use-commission-rules.js +9 -0
- package/dist/hooks/use-contracts.d.ts +22 -0
- package/dist/hooks/use-contracts.d.ts.map +1 -0
- package/dist/hooks/use-contracts.js +9 -0
- package/dist/hooks/use-mappings.d.ts +19 -0
- package/dist/hooks/use-mappings.d.ts.map +1 -0
- package/dist/hooks/use-mappings.js +9 -0
- package/dist/hooks/use-products.d.ts +14 -0
- package/dist/hooks/use-products.d.ts.map +1 -0
- package/dist/hooks/use-products.js +9 -0
- package/dist/hooks/use-suppliers.d.ts +14 -0
- package/dist/hooks/use-suppliers.d.ts.map +1 -0
- package/dist/hooks/use-suppliers.js +9 -0
- package/dist/hooks/use-webhook-events.d.ts +21 -0
- package/dist/hooks/use-webhook-events.d.ts.map +1 -0
- package/dist/hooks/use-webhook-events.js +9 -0
- package/dist/i18n/en.d.ts +592 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +561 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages.d.ts +409 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +1207 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +592 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +561 -0
- package/dist/i18n/utils.d.ts +4 -0
- package/dist/i18n/utils.d.ts.map +1 -0
- package/dist/i18n/utils.js +8 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +61 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +30 -0
- package/dist/query-options.d.ts +999 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +219 -0
- package/dist/schemas.d.ts +615 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +144 -0
- package/dist/suppliers/admin/index.d.ts +69 -0
- package/dist/suppliers/admin/index.d.ts.map +1 -0
- package/dist/suppliers/admin/index.js +111 -0
- package/dist/suppliers/admin/pages/supplier-detail-page.d.ts +9 -0
- package/dist/suppliers/admin/pages/supplier-detail-page.d.ts.map +1 -0
- package/dist/suppliers/admin/pages/supplier-detail-page.js +11 -0
- package/dist/suppliers/admin/slots.d.ts +19 -0
- package/dist/suppliers/admin/slots.d.ts.map +1 -0
- package/dist/suppliers/admin/slots.js +18 -0
- package/dist/suppliers/admin/supplier-detail-host.d.ts +30 -0
- package/dist/suppliers/admin/supplier-detail-host.d.ts.map +1 -0
- package/dist/suppliers/admin/supplier-detail-host.js +34 -0
- package/dist/suppliers/admin/supplier-detail-skeleton.d.ts +9 -0
- package/dist/suppliers/admin/supplier-detail-skeleton.d.ts.map +1 -0
- package/dist/suppliers/admin/supplier-detail-skeleton.js +20 -0
- package/dist/suppliers/admin/suppliers-host.d.ts +11 -0
- package/dist/suppliers/admin/suppliers-host.d.ts.map +1 -0
- package/dist/suppliers/admin/suppliers-host.js +17 -0
- package/dist/suppliers/admin/suppliers-list-skeleton.d.ts +9 -0
- package/dist/suppliers/admin/suppliers-list-skeleton.d.ts.map +1 -0
- package/dist/suppliers/admin/suppliers-list-skeleton.js +24 -0
- package/dist/suppliers/client.d.ts +14 -0
- package/dist/suppliers/client.d.ts.map +1 -0
- package/dist/suppliers/client.js +59 -0
- package/dist/suppliers/components/message-format.d.ts +2 -0
- package/dist/suppliers/components/message-format.d.ts.map +1 -0
- package/dist/suppliers/components/message-format.js +3 -0
- package/dist/suppliers/components/rate-dialog.d.ts +11 -0
- package/dist/suppliers/components/rate-dialog.d.ts.map +1 -0
- package/dist/suppliers/components/rate-dialog.js +93 -0
- package/dist/suppliers/components/service-dialog.d.ts +10 -0
- package/dist/suppliers/components/service-dialog.d.ts.map +1 -0
- package/dist/suppliers/components/service-dialog.js +69 -0
- package/dist/suppliers/components/supplier-combobox.d.ts +13 -0
- package/dist/suppliers/components/supplier-combobox.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-combobox.js +23 -0
- package/dist/suppliers/components/supplier-detail-page.d.ts +17 -0
- package/dist/suppliers/components/supplier-detail-page.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-detail-page.js +105 -0
- package/dist/suppliers/components/supplier-dialog.d.ts +9 -0
- package/dist/suppliers/components/supplier-dialog.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-dialog.js +118 -0
- package/dist/suppliers/components/supplier-service-row.d.ts +22 -0
- package/dist/suppliers/components/supplier-service-row.d.ts.map +1 -0
- package/dist/suppliers/components/supplier-service-row.js +18 -0
- package/dist/suppliers/components/suppliers-page.d.ts +10 -0
- package/dist/suppliers/components/suppliers-page.d.ts.map +1 -0
- package/dist/suppliers/components/suppliers-page.js +94 -0
- package/dist/suppliers/constants.d.ts +69 -0
- package/dist/suppliers/constants.d.ts.map +1 -0
- package/dist/suppliers/constants.js +34 -0
- package/dist/suppliers/hooks/index.d.ts +10 -0
- package/dist/suppliers/hooks/index.d.ts.map +1 -0
- package/dist/suppliers/hooks/index.js +10 -0
- package/dist/suppliers/hooks/use-supplier-mutation.d.ts +95 -0
- package/dist/suppliers/hooks/use-supplier-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-mutation.js +41 -0
- package/dist/suppliers/hooks/use-supplier-note-mutation.d.ts +13 -0
- package/dist/suppliers/hooks/use-supplier-note-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-note-mutation.js +20 -0
- package/dist/suppliers/hooks/use-supplier-notes.d.ts +13 -0
- package/dist/suppliers/hooks/use-supplier-notes.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-notes.js +12 -0
- package/dist/suppliers/hooks/use-supplier-rate-mutation.d.ts +56 -0
- package/dist/suppliers/hooks/use-supplier-rate-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-rate-mutation.js +41 -0
- package/dist/suppliers/hooks/use-supplier-service-mutation.d.ts +45 -0
- package/dist/suppliers/hooks/use-supplier-service-mutation.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-service-mutation.js +44 -0
- package/dist/suppliers/hooks/use-supplier-service-rates.d.ts +20 -0
- package/dist/suppliers/hooks/use-supplier-service-rates.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-service-rates.js +12 -0
- package/dist/suppliers/hooks/use-supplier-services.d.ts +19 -0
- package/dist/suppliers/hooks/use-supplier-services.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier-services.js +12 -0
- package/dist/suppliers/hooks/use-supplier.d.ts +38 -0
- package/dist/suppliers/hooks/use-supplier.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-supplier.js +9 -0
- package/dist/suppliers/hooks/use-suppliers.d.ts +42 -0
- package/dist/suppliers/hooks/use-suppliers.d.ts.map +1 -0
- package/dist/suppliers/hooks/use-suppliers.js +9 -0
- package/dist/suppliers/i18n/en.d.ts +204 -0
- package/dist/suppliers/i18n/en.d.ts.map +1 -0
- package/dist/suppliers/i18n/en.js +203 -0
- package/dist/suppliers/i18n/index.d.ts +5 -0
- package/dist/suppliers/i18n/index.d.ts.map +1 -0
- package/dist/suppliers/i18n/index.js +3 -0
- package/dist/suppliers/i18n/messages.d.ts +187 -0
- package/dist/suppliers/i18n/messages.d.ts.map +1 -0
- package/dist/suppliers/i18n/messages.js +1 -0
- package/dist/suppliers/i18n/provider.d.ts +430 -0
- package/dist/suppliers/i18n/provider.d.ts.map +1 -0
- package/dist/suppliers/i18n/provider.js +44 -0
- package/dist/suppliers/i18n/ro.d.ts +204 -0
- package/dist/suppliers/i18n/ro.d.ts.map +1 -0
- package/dist/suppliers/i18n/ro.js +203 -0
- package/dist/suppliers/index.d.ts +9 -0
- package/dist/suppliers/index.d.ts.map +1 -0
- package/dist/suppliers/index.js +8 -0
- package/dist/suppliers/provider.d.ts +2 -0
- package/dist/suppliers/provider.d.ts.map +1 -0
- package/dist/suppliers/provider.js +1 -0
- package/dist/suppliers/query-keys.d.ts +29 -0
- package/dist/suppliers/query-keys.d.ts.map +1 -0
- package/dist/suppliers/query-keys.js +12 -0
- package/dist/suppliers/query-options.d.ts +467 -0
- package/dist/suppliers/query-options.d.ts.map +1 -0
- package/dist/suppliers/query-options.js +63 -0
- package/dist/suppliers/schemas.d.ts +363 -0
- package/dist/suppliers/schemas.d.ts.map +1 -0
- package/dist/suppliers/schemas.js +109 -0
- package/dist/suppliers/ui.d.ts +9 -0
- package/dist/suppliers/ui.d.ts.map +1 -0
- package/dist/suppliers/ui.js +8 -0
- package/dist/suppliers/utils.d.ts +4 -0
- package/dist/suppliers/utils.d.ts.map +1 -0
- package/dist/suppliers/utils.js +10 -0
- package/dist/ui.d.ts +16 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +14 -0
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +44 -0
- package/package.json +263 -0
- package/src/external-refs/styles.css +11 -0
- package/src/styles.css +11 -0
- package/src/suppliers/styles.css +11 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const externalRefsUiRo = {
|
|
2
|
+
common: {
|
|
3
|
+
refStatusLabels: {
|
|
4
|
+
active: "Activ",
|
|
5
|
+
inactive: "Inactiv",
|
|
6
|
+
archived: "Arhivat",
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
externalRefsPage: {
|
|
10
|
+
title: "Referinte externe",
|
|
11
|
+
description: "ID-uri din sisteme terte legate de entitati Voyant. Introdu tipul entitatii si ID-ul de mai jos pentru a gestiona referintele externe.",
|
|
12
|
+
fields: {
|
|
13
|
+
entityType: "Tip entitate",
|
|
14
|
+
entity: "Entitate",
|
|
15
|
+
customEntityType: "Alt tip de entitate",
|
|
16
|
+
},
|
|
17
|
+
placeholders: {
|
|
18
|
+
entityType: "person, booking, product...",
|
|
19
|
+
entity: "Insereaza o referinta pentru tipuri custom",
|
|
20
|
+
},
|
|
21
|
+
entityTypeLabels: {
|
|
22
|
+
person: "Persoana",
|
|
23
|
+
organization: "Organizatie",
|
|
24
|
+
supplier: "Furnizor",
|
|
25
|
+
booking: "Rezervare",
|
|
26
|
+
product: "Produs",
|
|
27
|
+
},
|
|
28
|
+
emptyScope: "Alege o entitate mai sus pentru a vedea referintele externe.",
|
|
29
|
+
},
|
|
30
|
+
externalRefsTab: {
|
|
31
|
+
description: "Legaturi intre aceasta entitate si ID-uri din sisteme externe.",
|
|
32
|
+
add: "Adauga referinta externa",
|
|
33
|
+
empty: {
|
|
34
|
+
none: "Nu exista inca referinte externe.",
|
|
35
|
+
loading: "Se incarca referintele externe...",
|
|
36
|
+
},
|
|
37
|
+
columns: {
|
|
38
|
+
sourceSystem: "Sistem sursa",
|
|
39
|
+
objectType: "Tip obiect",
|
|
40
|
+
externalId: "ID extern",
|
|
41
|
+
namespace: "Namespace",
|
|
42
|
+
status: "Status",
|
|
43
|
+
primary: "Primara",
|
|
44
|
+
},
|
|
45
|
+
actions: {
|
|
46
|
+
edit: "Editeaza referinta externa",
|
|
47
|
+
delete: "Sterge referinta externa",
|
|
48
|
+
deleteConfirm: "Stergi referinta externa?",
|
|
49
|
+
},
|
|
50
|
+
pagination: {
|
|
51
|
+
previous: "Pagina anterioara",
|
|
52
|
+
next: "Pagina urmatoare",
|
|
53
|
+
page: "Pagina",
|
|
54
|
+
of: "din",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
externalRefDialog: {
|
|
58
|
+
titles: {
|
|
59
|
+
edit: "Editeaza referinta externa",
|
|
60
|
+
add: "Adauga referinta externa",
|
|
61
|
+
},
|
|
62
|
+
labels: {
|
|
63
|
+
sourceSystem: "Sistem sursa",
|
|
64
|
+
objectType: "Tip obiect",
|
|
65
|
+
namespace: "Namespace",
|
|
66
|
+
externalId: "ID extern",
|
|
67
|
+
externalParentId: "ID parinte extern",
|
|
68
|
+
status: "Status",
|
|
69
|
+
primary: "Primar",
|
|
70
|
+
metadataJson: "Metadata (JSON)",
|
|
71
|
+
},
|
|
72
|
+
placeholders: {
|
|
73
|
+
sourceSystem: "bokun, pipedrive, stripe...",
|
|
74
|
+
objectType: "booking, person, product...",
|
|
75
|
+
namespace: "default",
|
|
76
|
+
externalId: "abc-123",
|
|
77
|
+
externalParentId: "parent-id...",
|
|
78
|
+
metadataJson: '{ "key": "value" }',
|
|
79
|
+
},
|
|
80
|
+
actions: {
|
|
81
|
+
cancel: "Anuleaza",
|
|
82
|
+
saveChanges: "Salveaza modificarile",
|
|
83
|
+
addExternalRef: "Adauga referinta externa",
|
|
84
|
+
},
|
|
85
|
+
validation: {
|
|
86
|
+
sourceSystemRequired: "Sistemul sursa este obligatoriu",
|
|
87
|
+
objectTypeRequired: "Tipul obiectului este obligatoriu",
|
|
88
|
+
externalIdRequired: "ID-ul extern este obligatoriu",
|
|
89
|
+
metadataMustBeObject: "Trebuie sa fie un obiect JSON",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { useVoyantExternalRefsContext, type VoyantExternalRefsContextValue, VoyantExternalRefsProvider, type VoyantExternalRefsProviderProps, } from "./provider.js";
|
|
4
|
+
export { type ExternalRefsListFilters, externalRefsQueryKeys } from "./query-keys.js";
|
|
5
|
+
export { getExternalRefQueryOptions, getExternalRefsQueryOptions } from "./query-options.js";
|
|
6
|
+
export * from "./schemas.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/external-refs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,4BAA4B,EAC5B,KAAK,8BAA8B,EACnC,0BAA0B,EAC1B,KAAK,+BAA+B,GACrC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,KAAK,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACrF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAC5F,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { useVoyantExternalRefsContext, VoyantExternalRefsProvider, } from "./provider.js";
|
|
4
|
+
export { externalRefsQueryKeys } from "./query-keys.js";
|
|
5
|
+
export { getExternalRefQueryOptions, getExternalRefsQueryOptions } from "./query-options.js";
|
|
6
|
+
export * from "./schemas.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useVoyantReactContext as useVoyantExternalRefsContext, type VoyantReactContextValue as VoyantExternalRefsContextValue, VoyantReactProvider as VoyantExternalRefsProvider, type VoyantReactProviderProps as VoyantExternalRefsProviderProps, } from "@voyant-travel/react";
|
|
2
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/external-refs/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,4BAA4B,EACrD,KAAK,uBAAuB,IAAI,8BAA8B,EAC9D,mBAAmB,IAAI,0BAA0B,EACjD,KAAK,wBAAwB,IAAI,+BAA+B,GACjE,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useVoyantReactContext as useVoyantExternalRefsContext, VoyantReactProvider as VoyantExternalRefsProvider, } from "@voyant-travel/react";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ExternalRefsListFilters {
|
|
2
|
+
entityType?: string | undefined;
|
|
3
|
+
entityId?: string | undefined;
|
|
4
|
+
sourceSystem?: string | undefined;
|
|
5
|
+
objectType?: string | undefined;
|
|
6
|
+
namespace?: string | undefined;
|
|
7
|
+
status?: string | undefined;
|
|
8
|
+
search?: string | undefined;
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
offset?: number | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare const externalRefsQueryKeys: {
|
|
13
|
+
all: readonly ["external-refs"];
|
|
14
|
+
refs: () => readonly ["external-refs", "refs"];
|
|
15
|
+
refsList: (filters: ExternalRefsListFilters) => readonly ["external-refs", "refs", ExternalRefsListFilters];
|
|
16
|
+
ref: (id: string) => readonly ["external-refs", "refs", string];
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=query-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../src/external-refs/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,eAAO,MAAM,qBAAqB;;;wBAGZ,uBAAuB;cAEjC,MAAM;CACjB,CAAA"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { type FetchWithValidationOptions } from "./client.js";
|
|
2
|
+
import type { UseExternalRefsOptions } from "./hooks/use-external-refs.js";
|
|
3
|
+
export declare function getExternalRefsQueryOptions(client: FetchWithValidationOptions, options?: UseExternalRefsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
4
|
+
data: {
|
|
5
|
+
entityType: string;
|
|
6
|
+
entityId: string;
|
|
7
|
+
sourceSystem: string;
|
|
8
|
+
objectType: string;
|
|
9
|
+
namespace: string;
|
|
10
|
+
externalId: string;
|
|
11
|
+
isPrimary: boolean;
|
|
12
|
+
status: "active" | "inactive" | "archived";
|
|
13
|
+
id: string;
|
|
14
|
+
externalParentId: string | null;
|
|
15
|
+
lastSyncedAt: string | null;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
19
|
+
}[];
|
|
20
|
+
total: number;
|
|
21
|
+
limit: number;
|
|
22
|
+
offset: number;
|
|
23
|
+
}, Error, {
|
|
24
|
+
data: {
|
|
25
|
+
entityType: string;
|
|
26
|
+
entityId: string;
|
|
27
|
+
sourceSystem: string;
|
|
28
|
+
objectType: string;
|
|
29
|
+
namespace: string;
|
|
30
|
+
externalId: string;
|
|
31
|
+
isPrimary: boolean;
|
|
32
|
+
status: "active" | "inactive" | "archived";
|
|
33
|
+
id: string;
|
|
34
|
+
externalParentId: string | null;
|
|
35
|
+
lastSyncedAt: string | null;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
total: number;
|
|
41
|
+
limit: number;
|
|
42
|
+
offset: number;
|
|
43
|
+
}, readonly ["external-refs", "refs", import("./query-keys.js").ExternalRefsListFilters]>, "queryFn"> & {
|
|
44
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
45
|
+
data: {
|
|
46
|
+
entityType: string;
|
|
47
|
+
entityId: string;
|
|
48
|
+
sourceSystem: string;
|
|
49
|
+
objectType: string;
|
|
50
|
+
namespace: string;
|
|
51
|
+
externalId: string;
|
|
52
|
+
isPrimary: boolean;
|
|
53
|
+
status: "active" | "inactive" | "archived";
|
|
54
|
+
id: string;
|
|
55
|
+
externalParentId: string | null;
|
|
56
|
+
lastSyncedAt: string | null;
|
|
57
|
+
createdAt: string;
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
60
|
+
}[];
|
|
61
|
+
total: number;
|
|
62
|
+
limit: number;
|
|
63
|
+
offset: number;
|
|
64
|
+
}, readonly ["external-refs", "refs", import("./query-keys.js").ExternalRefsListFilters], never> | undefined;
|
|
65
|
+
} & {
|
|
66
|
+
queryKey: readonly ["external-refs", "refs", import("./query-keys.js").ExternalRefsListFilters] & {
|
|
67
|
+
[dataTagSymbol]: {
|
|
68
|
+
data: {
|
|
69
|
+
entityType: string;
|
|
70
|
+
entityId: string;
|
|
71
|
+
sourceSystem: string;
|
|
72
|
+
objectType: string;
|
|
73
|
+
namespace: string;
|
|
74
|
+
externalId: string;
|
|
75
|
+
isPrimary: boolean;
|
|
76
|
+
status: "active" | "inactive" | "archived";
|
|
77
|
+
id: string;
|
|
78
|
+
externalParentId: string | null;
|
|
79
|
+
lastSyncedAt: string | null;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
83
|
+
}[];
|
|
84
|
+
total: number;
|
|
85
|
+
limit: number;
|
|
86
|
+
offset: number;
|
|
87
|
+
};
|
|
88
|
+
[dataTagErrorSymbol]: Error;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export declare function getExternalRefQueryOptions(client: FetchWithValidationOptions, id: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
92
|
+
entityType: string;
|
|
93
|
+
entityId: string;
|
|
94
|
+
sourceSystem: string;
|
|
95
|
+
objectType: string;
|
|
96
|
+
namespace: string;
|
|
97
|
+
externalId: string;
|
|
98
|
+
isPrimary: boolean;
|
|
99
|
+
status: "active" | "inactive" | "archived";
|
|
100
|
+
id: string;
|
|
101
|
+
externalParentId: string | null;
|
|
102
|
+
lastSyncedAt: string | null;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
updatedAt: string;
|
|
105
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
106
|
+
}, Error, {
|
|
107
|
+
entityType: string;
|
|
108
|
+
entityId: string;
|
|
109
|
+
sourceSystem: string;
|
|
110
|
+
objectType: string;
|
|
111
|
+
namespace: string;
|
|
112
|
+
externalId: string;
|
|
113
|
+
isPrimary: boolean;
|
|
114
|
+
status: "active" | "inactive" | "archived";
|
|
115
|
+
id: string;
|
|
116
|
+
externalParentId: string | null;
|
|
117
|
+
lastSyncedAt: string | null;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
120
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
121
|
+
}, readonly ["external-refs", "refs", string]>, "queryFn"> & {
|
|
122
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
123
|
+
entityType: string;
|
|
124
|
+
entityId: string;
|
|
125
|
+
sourceSystem: string;
|
|
126
|
+
objectType: string;
|
|
127
|
+
namespace: string;
|
|
128
|
+
externalId: string;
|
|
129
|
+
isPrimary: boolean;
|
|
130
|
+
status: "active" | "inactive" | "archived";
|
|
131
|
+
id: string;
|
|
132
|
+
externalParentId: string | null;
|
|
133
|
+
lastSyncedAt: string | null;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
137
|
+
}, readonly ["external-refs", "refs", string], never> | undefined;
|
|
138
|
+
} & {
|
|
139
|
+
queryKey: readonly ["external-refs", "refs", string] & {
|
|
140
|
+
[dataTagSymbol]: {
|
|
141
|
+
entityType: string;
|
|
142
|
+
entityId: string;
|
|
143
|
+
sourceSystem: string;
|
|
144
|
+
objectType: string;
|
|
145
|
+
namespace: string;
|
|
146
|
+
externalId: string;
|
|
147
|
+
isPrimary: boolean;
|
|
148
|
+
status: "active" | "inactive" | "archived";
|
|
149
|
+
id: string;
|
|
150
|
+
externalParentId: string | null;
|
|
151
|
+
lastSyncedAt: string | null;
|
|
152
|
+
createdAt: string;
|
|
153
|
+
updatedAt: string;
|
|
154
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
155
|
+
};
|
|
156
|
+
[dataTagErrorSymbol]: Error;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=query-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../../src/external-refs/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAc1E,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrC;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYxF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { queryOptions } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "./client.js";
|
|
4
|
+
import { externalRefsQueryKeys } from "./query-keys.js";
|
|
5
|
+
import { externalRefListResponse, externalRefSingleResponse } from "./schemas.js";
|
|
6
|
+
function toQueryString(filters) {
|
|
7
|
+
const params = new URLSearchParams();
|
|
8
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
9
|
+
if (value === undefined || value === null || value === "")
|
|
10
|
+
continue;
|
|
11
|
+
params.set(key, String(value));
|
|
12
|
+
}
|
|
13
|
+
const qs = params.toString();
|
|
14
|
+
return qs ? `?${qs}` : "";
|
|
15
|
+
}
|
|
16
|
+
export function getExternalRefsQueryOptions(client, options = {}) {
|
|
17
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
18
|
+
return queryOptions({
|
|
19
|
+
queryKey: externalRefsQueryKeys.refsList(filters),
|
|
20
|
+
queryFn: () => fetchWithValidation(`/v1/external-refs/refs${toQueryString(filters)}`, externalRefListResponse, client),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function getExternalRefQueryOptions(client, id) {
|
|
24
|
+
return queryOptions({
|
|
25
|
+
queryKey: externalRefsQueryKeys.ref(id),
|
|
26
|
+
queryFn: async () => {
|
|
27
|
+
const { data } = await fetchWithValidation(`/v1/external-refs/refs/${id}`, externalRefSingleResponse, client);
|
|
28
|
+
return data;
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
3
|
+
data: z.ZodArray<T>;
|
|
4
|
+
total: z.ZodNumber;
|
|
5
|
+
limit: z.ZodNumber;
|
|
6
|
+
offset: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
9
|
+
data: T;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const successEnvelope: z.ZodObject<{
|
|
12
|
+
success: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const externalRefRecordSchema: z.ZodObject<{
|
|
15
|
+
entityType: z.ZodString;
|
|
16
|
+
entityId: z.ZodString;
|
|
17
|
+
sourceSystem: z.ZodString;
|
|
18
|
+
objectType: z.ZodString;
|
|
19
|
+
namespace: z.ZodDefault<z.ZodString>;
|
|
20
|
+
externalId: z.ZodString;
|
|
21
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
active: "active";
|
|
24
|
+
inactive: "inactive";
|
|
25
|
+
archived: "archived";
|
|
26
|
+
}>>;
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
externalParentId: z.ZodNullable<z.ZodString>;
|
|
29
|
+
lastSyncedAt: z.ZodNullable<z.ZodString>;
|
|
30
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
31
|
+
createdAt: z.ZodString;
|
|
32
|
+
updatedAt: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export type ExternalRefRecord = z.infer<typeof externalRefRecordSchema>;
|
|
35
|
+
export declare const externalRefListResponse: z.ZodObject<{
|
|
36
|
+
data: z.ZodArray<z.ZodObject<{
|
|
37
|
+
entityType: z.ZodString;
|
|
38
|
+
entityId: z.ZodString;
|
|
39
|
+
sourceSystem: z.ZodString;
|
|
40
|
+
objectType: z.ZodString;
|
|
41
|
+
namespace: z.ZodDefault<z.ZodString>;
|
|
42
|
+
externalId: z.ZodString;
|
|
43
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
45
|
+
active: "active";
|
|
46
|
+
inactive: "inactive";
|
|
47
|
+
archived: "archived";
|
|
48
|
+
}>>;
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
externalParentId: z.ZodNullable<z.ZodString>;
|
|
51
|
+
lastSyncedAt: z.ZodNullable<z.ZodString>;
|
|
52
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
53
|
+
createdAt: z.ZodString;
|
|
54
|
+
updatedAt: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
total: z.ZodNumber;
|
|
57
|
+
limit: z.ZodNumber;
|
|
58
|
+
offset: z.ZodNumber;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export declare const externalRefSingleResponse: z.ZodObject<{
|
|
61
|
+
data: z.ZodObject<{
|
|
62
|
+
entityType: z.ZodString;
|
|
63
|
+
entityId: z.ZodString;
|
|
64
|
+
sourceSystem: z.ZodString;
|
|
65
|
+
objectType: z.ZodString;
|
|
66
|
+
namespace: z.ZodDefault<z.ZodString>;
|
|
67
|
+
externalId: z.ZodString;
|
|
68
|
+
isPrimary: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
70
|
+
active: "active";
|
|
71
|
+
inactive: "inactive";
|
|
72
|
+
archived: "archived";
|
|
73
|
+
}>>;
|
|
74
|
+
id: z.ZodString;
|
|
75
|
+
externalParentId: z.ZodNullable<z.ZodString>;
|
|
76
|
+
lastSyncedAt: z.ZodNullable<z.ZodString>;
|
|
77
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
78
|
+
createdAt: z.ZodString;
|
|
79
|
+
updatedAt: z.ZodString;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/external-refs/schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;iBAOlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;iBAA6C,CAAA;AACjF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;iBAA0C,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { insertExternalRefSchema } from "@voyant-travel/distribution";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const paginatedEnvelope = (item) => z.object({
|
|
4
|
+
data: z.array(item),
|
|
5
|
+
total: z.number().int(),
|
|
6
|
+
limit: z.number().int(),
|
|
7
|
+
offset: z.number().int(),
|
|
8
|
+
});
|
|
9
|
+
export const singleEnvelope = (item) => z.object({ data: item });
|
|
10
|
+
export const successEnvelope = z.object({ success: z.boolean() });
|
|
11
|
+
export const externalRefRecordSchema = insertExternalRefSchema.extend({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
externalParentId: z.string().nullable(),
|
|
14
|
+
lastSyncedAt: z.string().nullable(),
|
|
15
|
+
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
16
|
+
createdAt: z.string(),
|
|
17
|
+
updatedAt: z.string(),
|
|
18
|
+
});
|
|
19
|
+
export const externalRefListResponse = paginatedEnvelope(externalRefRecordSchema);
|
|
20
|
+
export const externalRefSingleResponse = singleEnvelope(externalRefRecordSchema);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EntityRefPicker, type EntityRefPickerProps } from "./components/entity-ref-picker.js";
|
|
2
|
+
export { ExternalRefDialog, type ExternalRefDialogProps } from "./components/external-ref-dialog.js";
|
|
3
|
+
export { ExternalRefsPage, type ExternalRefsPageProps, ExternalRefsTab, type ExternalRefsTabProps, } from "./components/external-refs-page.js";
|
|
4
|
+
export { type ExternalRefStatus, type ExternalRefsUiMessageOverrides, type ExternalRefsUiMessages, ExternalRefsUiMessagesProvider, externalRefsUiEn, externalRefsUiMessageDefinitions, externalRefsUiRo, getExternalRefsUiI18n, resolveExternalRefsUiMessages, useExternalRefsUiI18n, useExternalRefsUiI18nOrDefault, useExternalRefsUiMessages, useExternalRefsUiMessagesOrDefault, } from "./i18n/index.js";
|
|
5
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/external-refs/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAC9F,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AACpG,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,gBAAgB,EAChB,gCAAgC,EAChC,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { EntityRefPicker } from "./components/entity-ref-picker.js";
|
|
2
|
+
export { ExternalRefDialog } from "./components/external-ref-dialog.js";
|
|
3
|
+
export { ExternalRefsPage, ExternalRefsTab, } from "./components/external-refs-page.js";
|
|
4
|
+
export { ExternalRefsUiMessagesProvider, externalRefsUiEn, externalRefsUiMessageDefinitions, externalRefsUiRo, getExternalRefsUiI18n, resolveExternalRefsUiMessages, useExternalRefsUiI18n, useExternalRefsUiI18nOrDefault, useExternalRefsUiMessages, useExternalRefsUiMessagesOrDefault, } from "./i18n/index.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./use-booking-links.js";
|
|
2
|
+
export * from "./use-bookings.js";
|
|
3
|
+
export * from "./use-channel.js";
|
|
4
|
+
export * from "./use-channel-mutation.js";
|
|
5
|
+
export * from "./use-channels.js";
|
|
6
|
+
export * from "./use-commission-rules.js";
|
|
7
|
+
export * from "./use-contracts.js";
|
|
8
|
+
export * from "./use-mappings.js";
|
|
9
|
+
export * from "./use-products.js";
|
|
10
|
+
export * from "./use-suppliers.js";
|
|
11
|
+
export * from "./use-webhook-events.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export * from "./use-booking-links.js";
|
|
3
|
+
export * from "./use-bookings.js";
|
|
4
|
+
export * from "./use-channel.js";
|
|
5
|
+
export * from "./use-channel-mutation.js";
|
|
6
|
+
export * from "./use-channels.js";
|
|
7
|
+
export * from "./use-commission-rules.js";
|
|
8
|
+
export * from "./use-contracts.js";
|
|
9
|
+
export * from "./use-mappings.js";
|
|
10
|
+
export * from "./use-products.js";
|
|
11
|
+
export * from "./use-suppliers.js";
|
|
12
|
+
export * from "./use-webhook-events.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BookingLinksListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UseBookingLinksOptions extends BookingLinksListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useBookingLinks(options?: UseBookingLinksOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
channelId: string;
|
|
9
|
+
bookingId: string;
|
|
10
|
+
externalBookingId: string | null;
|
|
11
|
+
externalReference: string | null;
|
|
12
|
+
externalStatus: string | null;
|
|
13
|
+
bookedAtExternal: string | null;
|
|
14
|
+
lastSyncedAt: string | null;
|
|
15
|
+
}[];
|
|
16
|
+
total: number;
|
|
17
|
+
limit: number;
|
|
18
|
+
offset: number;
|
|
19
|
+
}, Error>;
|
|
20
|
+
//# sourceMappingURL=use-booking-links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-links.d.ts","sourceRoot":"","sources":["../../src/hooks/use-booking-links.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAG/D,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;UAInE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantDistributionContext } from "../provider.js";
|
|
4
|
+
import { getBookingLinksQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useBookingLinks(options = {}) {
|
|
6
|
+
const client = useVoyantDistributionContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({ ...getBookingLinksQueryOptions(client, options), enabled });
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BookingsListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UseBookingsOptions extends BookingsListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useBookings(options?: UseBookingsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
bookingNumber: string;
|
|
9
|
+
}[];
|
|
10
|
+
total: number;
|
|
11
|
+
limit: number;
|
|
12
|
+
offset: number;
|
|
13
|
+
}, Error>;
|
|
14
|
+
//# sourceMappingURL=use-bookings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-bookings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-bookings.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAG3D,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB;;;;;;;;UAI3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantDistributionContext } from "../provider.js";
|
|
4
|
+
import { getBookingsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useBookings(options = {}) {
|
|
6
|
+
const client = useVoyantDistributionContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({ ...getBookingsQueryOptions(client, options), enabled });
|
|
9
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const channelInputSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
kind: z.ZodEnum<{
|
|
6
|
+
direct: "direct";
|
|
7
|
+
affiliate: "affiliate";
|
|
8
|
+
ota: "ota";
|
|
9
|
+
reseller: "reseller";
|
|
10
|
+
marketplace: "marketplace";
|
|
11
|
+
api_partner: "api_partner";
|
|
12
|
+
connect: "connect";
|
|
13
|
+
}>;
|
|
14
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
active: "active";
|
|
16
|
+
inactive: "inactive";
|
|
17
|
+
pending: "pending";
|
|
18
|
+
archived: "archived";
|
|
19
|
+
}>>;
|
|
20
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
contactEmail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type CreateChannelInput = z.input<typeof channelInputSchema>;
|
|
26
|
+
export type UpdateChannelInput = Partial<CreateChannelInput>;
|
|
27
|
+
export declare function useChannelMutation(): {
|
|
28
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
kind: "direct" | "affiliate" | "ota" | "reseller" | "marketplace" | "api_partner" | "connect";
|
|
32
|
+
status: "active" | "inactive" | "pending" | "archived";
|
|
33
|
+
website: string | null;
|
|
34
|
+
contactName: string | null;
|
|
35
|
+
contactEmail: string | null;
|
|
36
|
+
metadata: Record<string, unknown> | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
}, Error, {
|
|
40
|
+
name: string;
|
|
41
|
+
kind: "direct" | "affiliate" | "ota" | "reseller" | "marketplace" | "api_partner" | "connect";
|
|
42
|
+
description?: string | null | undefined;
|
|
43
|
+
status?: "active" | "inactive" | "pending" | "archived" | undefined;
|
|
44
|
+
website?: string | null | undefined;
|
|
45
|
+
contactName?: string | null | undefined;
|
|
46
|
+
contactEmail?: string | null | undefined;
|
|
47
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
48
|
+
}, unknown>;
|
|
49
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
kind: "direct" | "affiliate" | "ota" | "reseller" | "marketplace" | "api_partner" | "connect";
|
|
53
|
+
status: "active" | "inactive" | "pending" | "archived";
|
|
54
|
+
website: string | null;
|
|
55
|
+
contactName: string | null;
|
|
56
|
+
contactEmail: string | null;
|
|
57
|
+
metadata: Record<string, unknown> | null;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
updatedAt: string;
|
|
60
|
+
}, Error, {
|
|
61
|
+
id: string;
|
|
62
|
+
input: UpdateChannelInput;
|
|
63
|
+
}, unknown>;
|
|
64
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
65
|
+
success: boolean;
|
|
66
|
+
}, Error, string, unknown>;
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=use-channel-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-channel-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-channel-mutation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;iBAStB,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AACnE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAE5D,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqBU,MAAM;eAAS,kBAAkB;;;;;EA8B5E"}
|