@voyant-travel/distribution 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.
Files changed (168) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +42 -0
  3. package/dist/booking-extension.d.ts +168 -0
  4. package/dist/booking-extension.d.ts.map +1 -0
  5. package/dist/booking-extension.js +102 -0
  6. package/dist/channel-push/admin-routes.d.ts +31 -0
  7. package/dist/channel-push/admin-routes.d.ts.map +1 -0
  8. package/dist/channel-push/admin-routes.js +165 -0
  9. package/dist/channel-push/availability-push.d.ts +76 -0
  10. package/dist/channel-push/availability-push.d.ts.map +1 -0
  11. package/dist/channel-push/availability-push.js +236 -0
  12. package/dist/channel-push/booking-push-helpers.d.ts +36 -0
  13. package/dist/channel-push/booking-push-helpers.d.ts.map +1 -0
  14. package/dist/channel-push/booking-push-helpers.js +169 -0
  15. package/dist/channel-push/booking-push.d.ts +108 -0
  16. package/dist/channel-push/booking-push.d.ts.map +1 -0
  17. package/dist/channel-push/booking-push.js +335 -0
  18. package/dist/channel-push/boundary-sql.d.ts +23 -0
  19. package/dist/channel-push/boundary-sql.d.ts.map +1 -0
  20. package/dist/channel-push/boundary-sql.js +75 -0
  21. package/dist/channel-push/content-push.d.ts +60 -0
  22. package/dist/channel-push/content-push.d.ts.map +1 -0
  23. package/dist/channel-push/content-push.js +252 -0
  24. package/dist/channel-push/index.d.ts +15 -0
  25. package/dist/channel-push/index.d.ts.map +1 -0
  26. package/dist/channel-push/index.js +18 -0
  27. package/dist/channel-push/plugin.d.ts +18 -0
  28. package/dist/channel-push/plugin.d.ts.map +1 -0
  29. package/dist/channel-push/plugin.js +21 -0
  30. package/dist/channel-push/reconciler.d.ts +85 -0
  31. package/dist/channel-push/reconciler.d.ts.map +1 -0
  32. package/dist/channel-push/reconciler.js +179 -0
  33. package/dist/channel-push/subscriber.d.ts +40 -0
  34. package/dist/channel-push/subscriber.d.ts.map +1 -0
  35. package/dist/channel-push/subscriber.js +199 -0
  36. package/dist/channel-push/types.d.ts +43 -0
  37. package/dist/channel-push/types.d.ts.map +1 -0
  38. package/dist/channel-push/types.js +32 -0
  39. package/dist/channel-push/workflows.d.ts +56 -0
  40. package/dist/channel-push/workflows.d.ts.map +1 -0
  41. package/dist/channel-push/workflows.js +100 -0
  42. package/dist/external-refs/index.d.ts +11 -0
  43. package/dist/external-refs/index.d.ts.map +1 -0
  44. package/dist/external-refs/index.js +12 -0
  45. package/dist/external-refs/routes.d.ts +253 -0
  46. package/dist/external-refs/routes.d.ts.map +1 -0
  47. package/dist/external-refs/routes.js +52 -0
  48. package/dist/external-refs/schema.d.ts +251 -0
  49. package/dist/external-refs/schema.d.ts.map +1 -0
  50. package/dist/external-refs/schema.js +32 -0
  51. package/dist/external-refs/service.d.ts +82 -0
  52. package/dist/external-refs/service.d.ts.map +1 -0
  53. package/dist/external-refs/service.js +112 -0
  54. package/dist/external-refs/validation.d.ts +91 -0
  55. package/dist/external-refs/validation.d.ts.map +1 -0
  56. package/dist/external-refs/validation.js +40 -0
  57. package/dist/index.d.ts +21 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +20 -0
  60. package/dist/interface-types.d.ts +128 -0
  61. package/dist/interface-types.d.ts.map +1 -0
  62. package/dist/interface-types.js +1 -0
  63. package/dist/interface.d.ts +10 -0
  64. package/dist/interface.d.ts.map +1 -0
  65. package/dist/interface.js +286 -0
  66. package/dist/rate-limit.d.ts +69 -0
  67. package/dist/rate-limit.d.ts.map +1 -0
  68. package/dist/rate-limit.js +135 -0
  69. package/dist/routes/batch.d.ts +200 -0
  70. package/dist/routes/batch.d.ts.map +1 -0
  71. package/dist/routes/batch.js +52 -0
  72. package/dist/routes/env.d.ts +8 -0
  73. package/dist/routes/env.d.ts.map +1 -0
  74. package/dist/routes/env.js +1 -0
  75. package/dist/routes/inventory.d.ts +604 -0
  76. package/dist/routes/inventory.d.ts.map +1 -0
  77. package/dist/routes/inventory.js +138 -0
  78. package/dist/routes/settlements.d.ts +1649 -0
  79. package/dist/routes/settlements.d.ts.map +1 -0
  80. package/dist/routes/settlements.js +265 -0
  81. package/dist/routes.d.ts +3909 -0
  82. package/dist/routes.d.ts.map +1 -0
  83. package/dist/routes.js +323 -0
  84. package/dist/schema-automation.d.ts +680 -0
  85. package/dist/schema-automation.d.ts.map +1 -0
  86. package/dist/schema-automation.js +76 -0
  87. package/dist/schema-core.d.ts +1674 -0
  88. package/dist/schema-core.d.ts.map +1 -0
  89. package/dist/schema-core.js +227 -0
  90. package/dist/schema-finance.d.ts +1372 -0
  91. package/dist/schema-finance.d.ts.map +1 -0
  92. package/dist/schema-finance.js +153 -0
  93. package/dist/schema-inventory.d.ts +855 -0
  94. package/dist/schema-inventory.d.ts.map +1 -0
  95. package/dist/schema-inventory.js +102 -0
  96. package/dist/schema-push-intents.d.ts +387 -0
  97. package/dist/schema-push-intents.d.ts.map +1 -0
  98. package/dist/schema-push-intents.js +77 -0
  99. package/dist/schema-relations.d.ts +95 -0
  100. package/dist/schema-relations.d.ts.map +1 -0
  101. package/dist/schema-relations.js +196 -0
  102. package/dist/schema-shared.d.ts +24 -0
  103. package/dist/schema-shared.d.ts.map +1 -0
  104. package/dist/schema-shared.js +123 -0
  105. package/dist/schema.d.ts +9 -0
  106. package/dist/schema.d.ts.map +1 -0
  107. package/dist/schema.js +8 -0
  108. package/dist/service/channels.d.ts +167 -0
  109. package/dist/service/channels.d.ts.map +1 -0
  110. package/dist/service/channels.js +305 -0
  111. package/dist/service/commercial.d.ts +385 -0
  112. package/dist/service/commercial.d.ts.map +1 -0
  113. package/dist/service/commercial.js +248 -0
  114. package/dist/service/helpers.d.ts +10 -0
  115. package/dist/service/helpers.d.ts.map +1 -0
  116. package/dist/service/helpers.js +7 -0
  117. package/dist/service/inventory.d.ts +193 -0
  118. package/dist/service/inventory.d.ts.map +1 -0
  119. package/dist/service/inventory.js +154 -0
  120. package/dist/service/settlement-policies.d.ts +325 -0
  121. package/dist/service/settlement-policies.d.ts.map +1 -0
  122. package/dist/service/settlement-policies.js +272 -0
  123. package/dist/service/settlements.d.ts +357 -0
  124. package/dist/service/settlements.d.ts.map +1 -0
  125. package/dist/service/settlements.js +319 -0
  126. package/dist/service/types.d.ts +60 -0
  127. package/dist/service/types.d.ts.map +1 -0
  128. package/dist/service/types.js +1 -0
  129. package/dist/service.d.ts +1418 -0
  130. package/dist/service.d.ts.map +1 -0
  131. package/dist/service.js +17 -0
  132. package/dist/suppliers/index.d.ts +15 -0
  133. package/dist/suppliers/index.d.ts.map +1 -0
  134. package/dist/suppliers/index.js +23 -0
  135. package/dist/suppliers/routes.d.ts +1202 -0
  136. package/dist/suppliers/routes.d.ts.map +1 -0
  137. package/dist/suppliers/routes.js +290 -0
  138. package/dist/suppliers/schema.d.ts +1272 -0
  139. package/dist/suppliers/schema.d.ts.map +1 -0
  140. package/dist/suppliers/schema.js +219 -0
  141. package/dist/suppliers/service-aggregates.d.ts +23 -0
  142. package/dist/suppliers/service-aggregates.d.ts.map +1 -0
  143. package/dist/suppliers/service-aggregates.js +51 -0
  144. package/dist/suppliers/service-core.d.ts +89 -0
  145. package/dist/suppliers/service-core.d.ts.map +1 -0
  146. package/dist/suppliers/service-core.js +164 -0
  147. package/dist/suppliers/service-identity.d.ts +162 -0
  148. package/dist/suppliers/service-identity.d.ts.map +1 -0
  149. package/dist/suppliers/service-identity.js +101 -0
  150. package/dist/suppliers/service-operations.d.ts +1500 -0
  151. package/dist/suppliers/service-operations.d.ts.map +1 -0
  152. package/dist/suppliers/service-operations.js +157 -0
  153. package/dist/suppliers/service-shared.d.ts +45 -0
  154. package/dist/suppliers/service-shared.d.ts.map +1 -0
  155. package/dist/suppliers/service-shared.js +294 -0
  156. package/dist/suppliers/service.d.ts +41 -0
  157. package/dist/suppliers/service.d.ts.map +1 -0
  158. package/dist/suppliers/service.js +40 -0
  159. package/dist/suppliers/validation.d.ts +2 -0
  160. package/dist/suppliers/validation.d.ts.map +1 -0
  161. package/dist/suppliers/validation.js +1 -0
  162. package/dist/validation.d.ts +1371 -0
  163. package/dist/validation.d.ts.map +1 -0
  164. package/dist/validation.js +445 -0
  165. package/dist/webhook-deliveries.d.ts +86 -0
  166. package/dist/webhook-deliveries.d.ts.map +1 -0
  167. package/dist/webhook-deliveries.js +296 -0
  168. package/package.json +71 -0
@@ -0,0 +1,162 @@
1
+ import type { InsertAddressForEntity, InsertContactPointForEntity, InsertNamedContactForEntity, UpdateAddress as UpdateIdentityAddress, UpdateContactPoint as UpdateIdentityContactPoint, UpdateNamedContact as UpdateIdentityNamedContact } from "@voyant-travel/identity/validation";
2
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
+ export declare function listContactPoints(db: PostgresJsDatabase, supplierId: string): Promise<{
4
+ id: string;
5
+ entityType: string;
6
+ entityId: string;
7
+ kind: "other" | "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
8
+ label: string | null;
9
+ value: string;
10
+ normalizedValue: string | null;
11
+ isPrimary: boolean;
12
+ notes: string | null;
13
+ metadata: Record<string, unknown> | null;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ }[]>;
17
+ export declare function listNamedContacts(db: PostgresJsDatabase, supplierId: string): Promise<{
18
+ id: string;
19
+ entityType: string;
20
+ entityId: string;
21
+ role: "primary" | "other" | "operations" | "legal" | "general" | "reservations" | "front_desk" | "sales" | "emergency" | "accounting";
22
+ name: string;
23
+ title: string | null;
24
+ email: string | null;
25
+ phone: string | null;
26
+ isPrimary: boolean;
27
+ notes: string | null;
28
+ metadata: Record<string, unknown> | null;
29
+ createdAt: Date;
30
+ updatedAt: Date;
31
+ }[]>;
32
+ export declare function createNamedContact(db: PostgresJsDatabase, supplierId: string, data: InsertNamedContactForEntity): Promise<{
33
+ metadata: Record<string, unknown> | null;
34
+ id: string;
35
+ name: string;
36
+ createdAt: Date;
37
+ notes: string | null;
38
+ email: string | null;
39
+ updatedAt: Date;
40
+ title: string | null;
41
+ phone: string | null;
42
+ entityType: string;
43
+ entityId: string;
44
+ isPrimary: boolean;
45
+ role: "primary" | "other" | "operations" | "legal" | "general" | "reservations" | "front_desk" | "sales" | "emergency" | "accounting";
46
+ } | null>;
47
+ export declare function updateNamedContact(db: PostgresJsDatabase, contactId: string, data: UpdateIdentityNamedContact): Promise<{
48
+ id: string;
49
+ entityType: string;
50
+ entityId: string;
51
+ role: "primary" | "other" | "operations" | "legal" | "general" | "reservations" | "front_desk" | "sales" | "emergency" | "accounting";
52
+ name: string;
53
+ title: string | null;
54
+ email: string | null;
55
+ phone: string | null;
56
+ isPrimary: boolean;
57
+ notes: string | null;
58
+ metadata: Record<string, unknown> | null;
59
+ createdAt: Date;
60
+ updatedAt: Date;
61
+ } | null>;
62
+ export declare function deleteNamedContact(db: PostgresJsDatabase, contactId: string): Promise<{
63
+ id: string;
64
+ } | null>;
65
+ export declare function createContactPoint(db: PostgresJsDatabase, supplierId: string, data: InsertContactPointForEntity): Promise<{
66
+ value: string;
67
+ metadata: Record<string, unknown> | null;
68
+ id: string;
69
+ createdAt: Date;
70
+ notes: string | null;
71
+ updatedAt: Date;
72
+ kind: "other" | "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
73
+ entityType: string;
74
+ entityId: string;
75
+ label: string | null;
76
+ normalizedValue: string | null;
77
+ isPrimary: boolean;
78
+ } | null>;
79
+ export declare function updateContactPoint(db: PostgresJsDatabase, contactPointId: string, data: UpdateIdentityContactPoint): Promise<{
80
+ id: string;
81
+ entityType: string;
82
+ entityId: string;
83
+ kind: "other" | "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
84
+ label: string | null;
85
+ value: string;
86
+ normalizedValue: string | null;
87
+ isPrimary: boolean;
88
+ notes: string | null;
89
+ metadata: Record<string, unknown> | null;
90
+ createdAt: Date;
91
+ updatedAt: Date;
92
+ } | null>;
93
+ export declare function deleteContactPoint(db: PostgresJsDatabase, contactPointId: string): Promise<{
94
+ id: string;
95
+ } | null>;
96
+ export declare function listAddresses(db: PostgresJsDatabase, supplierId: string): Promise<{
97
+ id: string;
98
+ entityType: string;
99
+ entityId: string;
100
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
101
+ fullText: string | null;
102
+ line1: string | null;
103
+ line2: string | null;
104
+ city: string | null;
105
+ region: string | null;
106
+ postalCode: string | null;
107
+ country: string | null;
108
+ latitude: number | null;
109
+ longitude: number | null;
110
+ timezone: string | null;
111
+ isPrimary: boolean;
112
+ notes: string | null;
113
+ metadata: Record<string, unknown> | null;
114
+ createdAt: Date;
115
+ updatedAt: Date;
116
+ }[]>;
117
+ export declare function createAddress(db: PostgresJsDatabase, supplierId: string, data: InsertAddressForEntity): Promise<{
118
+ metadata: Record<string, unknown> | null;
119
+ id: string;
120
+ createdAt: Date;
121
+ notes: string | null;
122
+ updatedAt: Date;
123
+ entityType: string;
124
+ entityId: string;
125
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
126
+ isPrimary: boolean;
127
+ fullText: string | null;
128
+ line1: string | null;
129
+ line2: string | null;
130
+ city: string | null;
131
+ region: string | null;
132
+ postalCode: string | null;
133
+ country: string | null;
134
+ latitude: number | null;
135
+ longitude: number | null;
136
+ timezone: string | null;
137
+ } | null>;
138
+ export declare function updateAddress(db: PostgresJsDatabase, addressId: string, data: UpdateIdentityAddress): Promise<{
139
+ id: string;
140
+ entityType: string;
141
+ entityId: string;
142
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
143
+ fullText: string | null;
144
+ line1: string | null;
145
+ line2: string | null;
146
+ city: string | null;
147
+ region: string | null;
148
+ postalCode: string | null;
149
+ country: string | null;
150
+ latitude: number | null;
151
+ longitude: number | null;
152
+ timezone: string | null;
153
+ isPrimary: boolean;
154
+ notes: string | null;
155
+ metadata: Record<string, unknown> | null;
156
+ createdAt: Date;
157
+ updatedAt: Date;
158
+ } | null>;
159
+ export declare function deleteAddress(db: PostgresJsDatabase, addressId: string): Promise<{
160
+ id: string;
161
+ } | null>;
162
+ //# sourceMappingURL=service-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-identity.d.ts","sourceRoot":"","sources":["../../src/suppliers/service-identity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,aAAa,IAAI,qBAAqB,EACtC,kBAAkB,IAAI,0BAA0B,EAChD,kBAAkB,IAAI,0BAA0B,EACjD,MAAM,oCAAoC,CAAA;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAQjE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;KAE3E;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;;KAE3E;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,kBAAkB,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,2BAA2B;;;;;;;;;;;;;;UAkBlC;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,0BAA0B;;;;;;;;;;;;;;UAOjC;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM;;UAOjF;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,kBAAkB,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,2BAA2B;;;;;;;;;;;;;UAkBlC;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,kBAAkB,EACtB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,0BAA0B;;;;;;;;;;;;;UAOjC;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM;;UAOtF;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;KAEvE;AAED,wBAAsB,aAAa,CACjC,EAAE,EAAE,kBAAkB,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,sBAAsB;;;;;;;;;;;;;;;;;;;;UAkB7B;AAED,wBAAsB,aAAa,CACjC,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;UAO5B;AAED,wBAAsB,aAAa,CAAC,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM;;UAO5E"}
@@ -0,0 +1,101 @@
1
+ import { identityService } from "@voyant-travel/identity/service";
2
+ import { ensureSupplierExists, rebuildSupplierDirectoryProjection, supplierEntityType, } from "./service-shared.js";
3
+ export function listContactPoints(db, supplierId) {
4
+ return identityService.listContactPointsForEntity(db, supplierEntityType, supplierId);
5
+ }
6
+ export function listNamedContacts(db, supplierId) {
7
+ return identityService.listNamedContactsForEntity(db, supplierEntityType, supplierId);
8
+ }
9
+ export async function createNamedContact(db, supplierId, data) {
10
+ const supplier = await ensureSupplierExists(db, supplierId);
11
+ if (!supplier) {
12
+ return null;
13
+ }
14
+ const row = await identityService.createNamedContact(db, {
15
+ ...data,
16
+ entityType: supplierEntityType,
17
+ entityId: supplierId,
18
+ });
19
+ if (row) {
20
+ await rebuildSupplierDirectoryProjection(db, supplierId);
21
+ }
22
+ return row;
23
+ }
24
+ export async function updateNamedContact(db, contactId, data) {
25
+ const row = await identityService.updateNamedContact(db, contactId, data);
26
+ if (row?.entityType === supplierEntityType) {
27
+ await rebuildSupplierDirectoryProjection(db, row.entityId);
28
+ }
29
+ return row;
30
+ }
31
+ export async function deleteNamedContact(db, contactId) {
32
+ const existing = await identityService.getNamedContactById(db, contactId);
33
+ const row = await identityService.deleteNamedContact(db, contactId);
34
+ if (row && existing?.entityType === supplierEntityType) {
35
+ await rebuildSupplierDirectoryProjection(db, existing.entityId);
36
+ }
37
+ return row;
38
+ }
39
+ export async function createContactPoint(db, supplierId, data) {
40
+ const supplier = await ensureSupplierExists(db, supplierId);
41
+ if (!supplier) {
42
+ return null;
43
+ }
44
+ const row = await identityService.createContactPoint(db, {
45
+ ...data,
46
+ entityType: supplierEntityType,
47
+ entityId: supplierId,
48
+ });
49
+ if (row) {
50
+ await rebuildSupplierDirectoryProjection(db, supplierId);
51
+ }
52
+ return row;
53
+ }
54
+ export async function updateContactPoint(db, contactPointId, data) {
55
+ const row = await identityService.updateContactPoint(db, contactPointId, data);
56
+ if (row?.entityType === supplierEntityType) {
57
+ await rebuildSupplierDirectoryProjection(db, row.entityId);
58
+ }
59
+ return row;
60
+ }
61
+ export async function deleteContactPoint(db, contactPointId) {
62
+ const existing = await identityService.getContactPointById(db, contactPointId);
63
+ const row = await identityService.deleteContactPoint(db, contactPointId);
64
+ if (row && existing?.entityType === supplierEntityType) {
65
+ await rebuildSupplierDirectoryProjection(db, existing.entityId);
66
+ }
67
+ return row;
68
+ }
69
+ export function listAddresses(db, supplierId) {
70
+ return identityService.listAddressesForEntity(db, supplierEntityType, supplierId);
71
+ }
72
+ export async function createAddress(db, supplierId, data) {
73
+ const supplier = await ensureSupplierExists(db, supplierId);
74
+ if (!supplier) {
75
+ return null;
76
+ }
77
+ const row = await identityService.createAddress(db, {
78
+ ...data,
79
+ entityType: supplierEntityType,
80
+ entityId: supplierId,
81
+ });
82
+ if (row) {
83
+ await rebuildSupplierDirectoryProjection(db, supplierId);
84
+ }
85
+ return row;
86
+ }
87
+ export async function updateAddress(db, addressId, data) {
88
+ const row = await identityService.updateAddress(db, addressId, data);
89
+ if (row?.entityType === supplierEntityType) {
90
+ await rebuildSupplierDirectoryProjection(db, row.entityId);
91
+ }
92
+ return row;
93
+ }
94
+ export async function deleteAddress(db, addressId) {
95
+ const existing = await identityService.getAddressById(db, addressId);
96
+ const row = await identityService.deleteAddress(db, addressId);
97
+ if (row && existing?.entityType === supplierEntityType) {
98
+ await rebuildSupplierDirectoryProjection(db, existing.entityId);
99
+ }
100
+ return row;
101
+ }