@simpleapps-com/augur-server 0.3.1 → 0.4.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 +77 -2
- package/dist/index.js +211 -1
- package/dist/index.js.map +1 -1
- package/dist/{site-CxQ1goMQ.d.ts → site-IpNMQZr5.d.ts} +48 -2
- package/dist/testing.d.ts +1 -1
- package/package.json +5 -5
|
@@ -503,6 +503,13 @@ interface JoomlaApiClient {
|
|
|
503
503
|
data: unknown[];
|
|
504
504
|
}>;
|
|
505
505
|
};
|
|
506
|
+
users: {
|
|
507
|
+
doc: {
|
|
508
|
+
get: (userId: number | string, params?: Record<string, unknown>) => Promise<{
|
|
509
|
+
data: Record<string, unknown> | null;
|
|
510
|
+
}>;
|
|
511
|
+
};
|
|
512
|
+
};
|
|
506
513
|
};
|
|
507
514
|
}
|
|
508
515
|
interface JoomlaActionsConfig {
|
|
@@ -513,11 +520,19 @@ interface JoomlaActionsConfig {
|
|
|
513
520
|
/** Redis TTL for Joomla lookups in seconds. Default: 3600 (1 hour). */
|
|
514
521
|
redisTtl?: number;
|
|
515
522
|
}
|
|
523
|
+
interface NormalizedUserProfile {
|
|
524
|
+
id: string;
|
|
525
|
+
name: string;
|
|
526
|
+
email: string;
|
|
527
|
+
customerId: string;
|
|
528
|
+
permissions: string[];
|
|
529
|
+
}
|
|
516
530
|
interface JoomlaActions {
|
|
517
531
|
getJoomlaContent: (articleId: number) => Promise<unknown>;
|
|
518
532
|
getJoomlaContentList: (params?: Record<string, unknown>) => Promise<unknown[]>;
|
|
519
533
|
getJoomlaMenu: (params?: Record<string, unknown>) => Promise<unknown[]>;
|
|
520
534
|
getJoomlaMenuDoc: (menuId: number | string) => Promise<unknown>;
|
|
535
|
+
getUserProfile: (userId: number | string) => Promise<NormalizedUserProfile>;
|
|
521
536
|
}
|
|
522
537
|
/**
|
|
523
538
|
* Creates server-side Joomla content actions with Redis caching and edge cache support.
|
|
@@ -615,6 +630,10 @@ interface LegacyActions {
|
|
|
615
630
|
*/
|
|
616
631
|
declare function createLegacyActions(api: LegacyApiClient, config?: LegacyActionsConfig): LegacyActions;
|
|
617
632
|
|
|
633
|
+
interface CustomerListResult {
|
|
634
|
+
data: unknown[];
|
|
635
|
+
total: number;
|
|
636
|
+
}
|
|
618
637
|
/**
|
|
619
638
|
* The subset of augur-api used by customer actions.
|
|
620
639
|
* Matches `api.customers` from the SDK.
|
|
@@ -636,8 +655,30 @@ interface CustomersApiClient {
|
|
|
636
655
|
}>;
|
|
637
656
|
};
|
|
638
657
|
orders: {
|
|
658
|
+
get: (customerId: number, orderId: number, params?: Record<string, unknown>) => Promise<{
|
|
659
|
+
data: unknown;
|
|
660
|
+
}>;
|
|
661
|
+
list: (customerId: number, params?: Record<string, unknown>) => Promise<{
|
|
662
|
+
data: unknown[];
|
|
663
|
+
total: number;
|
|
664
|
+
}>;
|
|
665
|
+
};
|
|
666
|
+
invoices: {
|
|
667
|
+
get: (customerId: number, invoiceNo: number, params?: Record<string, unknown>) => Promise<{
|
|
668
|
+
data: unknown;
|
|
669
|
+
}>;
|
|
670
|
+
list: (customerId: number, params?: Record<string, unknown>) => Promise<{
|
|
671
|
+
data: unknown[];
|
|
672
|
+
total: number;
|
|
673
|
+
}>;
|
|
674
|
+
};
|
|
675
|
+
quotes: {
|
|
676
|
+
get: (customerId: number, quoteNo: number, params?: Record<string, unknown>) => Promise<{
|
|
677
|
+
data: unknown;
|
|
678
|
+
}>;
|
|
639
679
|
list: (customerId: number, params?: Record<string, unknown>) => Promise<{
|
|
640
680
|
data: unknown[];
|
|
681
|
+
total: number;
|
|
641
682
|
}>;
|
|
642
683
|
};
|
|
643
684
|
shipTo: {
|
|
@@ -665,7 +706,12 @@ interface CustomersActions {
|
|
|
665
706
|
getCustomer: (customerId: number) => Promise<unknown>;
|
|
666
707
|
customerLookup: (params: Record<string, unknown>) => Promise<unknown[]>;
|
|
667
708
|
getCustomerDoc: (customerId: number) => Promise<unknown>;
|
|
668
|
-
getCustomerOrders: (customerId: number, params?: Record<string, unknown>) => Promise<
|
|
709
|
+
getCustomerOrders: (customerId: number, params?: Record<string, unknown>) => Promise<CustomerListResult>;
|
|
710
|
+
getCustomerOrderDetail: (customerId: number, orderId: number) => Promise<unknown>;
|
|
711
|
+
getCustomerInvoices: (customerId: number, params?: Record<string, unknown>) => Promise<CustomerListResult>;
|
|
712
|
+
getCustomerInvoiceDetail: (customerId: number, invoiceNo: number) => Promise<unknown>;
|
|
713
|
+
getCustomerQuotes: (customerId: number, params?: Record<string, unknown>) => Promise<CustomerListResult>;
|
|
714
|
+
getCustomerQuoteDetail: (customerId: number, quoteNo: number) => Promise<unknown>;
|
|
669
715
|
getContacts: (params?: Record<string, unknown>) => Promise<unknown[]>;
|
|
670
716
|
getShipToAddresses: (customerId: number) => Promise<unknown[]>;
|
|
671
717
|
}
|
|
@@ -1959,4 +2005,4 @@ interface SiteActions {
|
|
|
1959
2005
|
*/
|
|
1960
2006
|
declare function createSiteActions<TApi extends object>(api: TApi, config?: SiteActionsConfig): SiteActions;
|
|
1961
2007
|
|
|
1962
|
-
export { type
|
|
2008
|
+
export { type P21CoreApiClient as $, type AddressValidationResult as A, type Basecamp2Actions as B, type CommerceActions as C, type ItemsApiClient as D, type JoomlaActionsConfig as E, type JoomlaApiClient as F, type GregorovichActions as G, type LegacyActionsConfig as H, type ItemActions as I, type JoomlaActions as J, type LegacyApiClient as K, type LegacyActions as L, type LogisticsActions as M, type LogisticsActionsConfig as N, type LogisticsApiClient as O, type NexusActions as P, type NexusActionsConfig as Q, type NexusApiClient as R, type NormalizedUserProfile as S, type OrderActions as T, type OrderActionsConfig as U, type OrderApiClient as V, type P21ApisActions as W, type P21ApisActionsConfig as X, type P21ApisApiClient as Y, type P21CoreActions as Z, type P21CoreActionsConfig as _, type AgrInfoActions as a, type P21PimActions as a0, type P21PimActionsConfig as a1, type P21PimApiClient as a2, type P21SismActions as a3, type P21SismActionsConfig as a4, type P21SismApiClient as a5, type PaymentsActions as a6, type PaymentsActionsConfig as a7, type PaymentsApiClient as a8, type PricingActions as a9, createAgrWorkActions as aA, createAvalaraActions as aB, createBasecamp2Actions as aC, createBrandFolderActions as aD, createCommerceActions as aE, createCustomersActions as aF, createGregorovichActions as aG, createItemActions as aH, createJoomlaActions as aI, createLegacyActions as aJ, createLogisticsActions as aK, createNexusActions as aL, createOrderActions as aM, createP21ApisActions as aN, createP21CoreActions as aO, createP21PimActions as aP, createP21SismActions as aQ, createPaymentsActions as aR, createPricingActions as aS, createSearchActions as aT, createShippingActions as aU, createSiteActions as aV, createSlackActions as aW, createSmartyStreetsActions as aX, createUpsActions as aY, createVmiActions as aZ, type PricingActionsConfig as aa, type PricingApiClient as ab, type SearchActions as ac, type SearchActionsConfig as ad, type SearchApiClient as ae, type SearchPage as af, type ShippingActions as ag, type ShippingActionsConfig as ah, type ShippingAddress as ai, type ShippingApiClient as aj, type SiteActions as ak, type SiteActionsConfig as al, type SlackActions as am, type SlackActionsConfig as an, type SlackApiClient as ao, type SmartyStreetsActions as ap, type SmartyStreetsActionsConfig as aq, type SmartyStreetsApiClient as ar, type UpsActions as as, type UpsActionsConfig as at, type UpsApiClient as au, type VmiActions as av, type VmiActionsConfig as aw, type VmiApiClient as ax, createAgrInfoActions as ay, createAgrSiteActions as az, type AgrInfoActionsConfig as b, type AgrInfoApiClient as c, type AgrSiteActions as d, type AgrSiteActionsConfig as e, type AgrSiteApiClient as f, type AgrWorkActions as g, type AgrWorkActionsConfig as h, type AgrWorkApiClient as i, type AvalaraActions as j, type AvalaraActionsConfig as k, type AvalaraApiClient as l, type Basecamp2ActionsConfig as m, type Basecamp2ApiClient as n, type BrandFolderActions as o, type BrandFolderActionsConfig as p, type BrandFolderApiClient as q, type CommerceActionsConfig as r, type CommerceApiClient as s, type CustomerListResult as t, type CustomersActions as u, type CustomersActionsConfig as v, type CustomersApiClient as w, type GregorovichActionsConfig as x, type GregorovichApiClient as y, type ItemActionsConfig as z };
|
package/dist/testing.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpleapps-com/augur-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Server-side utilities for Augur ecommerce sites (Redis caching, SDK helpers, auth)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"valibot": "^1.0.0",
|
|
44
|
-
"@simpleapps-com/augur-utils": "0.
|
|
44
|
+
"@simpleapps-com/augur-utils": "0.4.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@simpleapps-com/augur-api": "^0.9.
|
|
47
|
+
"@simpleapps-com/augur-api": "^0.9.11",
|
|
48
48
|
"@tanstack/react-query": "^5.80.0",
|
|
49
49
|
"ioredis": "^5.9.0",
|
|
50
50
|
"next": "^16.1.6",
|
|
51
51
|
"next-auth": ">=5.0.0-beta.30",
|
|
52
52
|
"react": "^19.0.0",
|
|
53
|
-
"@simpleapps-com/augur-hooks": "0.
|
|
53
|
+
"@simpleapps-com/augur-hooks": "0.4.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"ioredis": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"tsup": "^8.5.0",
|
|
74
74
|
"vitest": "^3.2.0",
|
|
75
75
|
"@augur-packages/tsconfig": "0.0.0",
|
|
76
|
-
"@simpleapps-com/augur-hooks": "0.
|
|
76
|
+
"@simpleapps-com/augur-hooks": "0.4.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "tsup",
|