@tallyui/core 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +11 -0
- package/package.json +1 -1
- package/src/types/connector.ts +9 -0
package/dist/index.d.ts
CHANGED
|
@@ -584,6 +584,17 @@ interface TallyConnector {
|
|
|
584
584
|
createCustomer?: (context: SyncContext, input: CustomerInput) => Promise<Customer>;
|
|
585
585
|
/** Customer lookup: online only; `undefined` when the connector has no customer support. */
|
|
586
586
|
getCustomer?: (context: SyncContext, id: string) => Promise<Customer | null>;
|
|
587
|
+
/**
|
|
588
|
+
* Emails the receipt of an order the store already has: online only, and **not idempotent** (each call sends one
|
|
589
|
+
* email, so an app never retries it on its own after a timeout). `orderId` is the store's id from the order-create
|
|
590
|
+
* result (`serverRefs.orderId`). `options.saveToBilling` also stores the address on the order's billing email where
|
|
591
|
+
* the platform supports it. Rejects with `ConnectorUnauthorizedError` for credentials and `CustomerServiceError`
|
|
592
|
+
* (`invalid` for a refused order or address, `server` or `network` otherwise). `undefined` when the connector can't
|
|
593
|
+
* email receipts.
|
|
594
|
+
*/
|
|
595
|
+
emailReceipt?: (context: SyncContext, orderId: string, email: string, options?: {
|
|
596
|
+
saveToBilling?: boolean;
|
|
597
|
+
}) => Promise<void>;
|
|
587
598
|
}
|
|
588
599
|
|
|
589
600
|
/**
|
package/package.json
CHANGED
package/src/types/connector.ts
CHANGED
|
@@ -264,4 +264,13 @@ export interface TallyConnector {
|
|
|
264
264
|
createCustomer?: (context: SyncContext, input: CustomerInput) => Promise<Customer>;
|
|
265
265
|
/** Customer lookup: online only; `undefined` when the connector has no customer support. */
|
|
266
266
|
getCustomer?: (context: SyncContext, id: string) => Promise<Customer | null>;
|
|
267
|
+
/**
|
|
268
|
+
* Emails the receipt of an order the store already has: online only, and **not idempotent** (each call sends one
|
|
269
|
+
* email, so an app never retries it on its own after a timeout). `orderId` is the store's id from the order-create
|
|
270
|
+
* result (`serverRefs.orderId`). `options.saveToBilling` also stores the address on the order's billing email where
|
|
271
|
+
* the platform supports it. Rejects with `ConnectorUnauthorizedError` for credentials and `CustomerServiceError`
|
|
272
|
+
* (`invalid` for a refused order or address, `server` or `network` otherwise). `undefined` when the connector can't
|
|
273
|
+
* email receipts.
|
|
274
|
+
*/
|
|
275
|
+
emailReceipt?: (context: SyncContext, orderId: string, email: string, options?: { saveToBilling?: boolean }) => Promise<void>;
|
|
267
276
|
}
|