@simpleapps-com/augur-server 0.3.0 → 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.
@@ -493,6 +493,23 @@ interface JoomlaApiClient {
493
493
  data: unknown[];
494
494
  }>;
495
495
  };
496
+ menu: {
497
+ doc: {
498
+ get: (menuId: number | string, params?: Record<string, unknown>) => Promise<{
499
+ data: unknown;
500
+ }>;
501
+ };
502
+ list: (params?: Record<string, unknown>) => Promise<{
503
+ data: unknown[];
504
+ }>;
505
+ };
506
+ users: {
507
+ doc: {
508
+ get: (userId: number | string, params?: Record<string, unknown>) => Promise<{
509
+ data: Record<string, unknown> | null;
510
+ }>;
511
+ };
512
+ };
496
513
  };
497
514
  }
498
515
  interface JoomlaActionsConfig {
@@ -503,9 +520,19 @@ interface JoomlaActionsConfig {
503
520
  /** Redis TTL for Joomla lookups in seconds. Default: 3600 (1 hour). */
504
521
  redisTtl?: number;
505
522
  }
523
+ interface NormalizedUserProfile {
524
+ id: string;
525
+ name: string;
526
+ email: string;
527
+ customerId: string;
528
+ permissions: string[];
529
+ }
506
530
  interface JoomlaActions {
507
531
  getJoomlaContent: (articleId: number) => Promise<unknown>;
508
532
  getJoomlaContentList: (params?: Record<string, unknown>) => Promise<unknown[]>;
533
+ getJoomlaMenu: (params?: Record<string, unknown>) => Promise<unknown[]>;
534
+ getJoomlaMenuDoc: (menuId: number | string) => Promise<unknown>;
535
+ getUserProfile: (userId: number | string) => Promise<NormalizedUserProfile>;
509
536
  }
510
537
  /**
511
538
  * Creates server-side Joomla content actions with Redis caching and edge cache support.
@@ -603,6 +630,10 @@ interface LegacyActions {
603
630
  */
604
631
  declare function createLegacyActions(api: LegacyApiClient, config?: LegacyActionsConfig): LegacyActions;
605
632
 
633
+ interface CustomerListResult {
634
+ data: unknown[];
635
+ total: number;
636
+ }
606
637
  /**
607
638
  * The subset of augur-api used by customer actions.
608
639
  * Matches `api.customers` from the SDK.
@@ -624,8 +655,30 @@ interface CustomersApiClient {
624
655
  }>;
625
656
  };
626
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
+ }>;
627
670
  list: (customerId: number, params?: Record<string, unknown>) => Promise<{
628
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
+ }>;
679
+ list: (customerId: number, params?: Record<string, unknown>) => Promise<{
680
+ data: unknown[];
681
+ total: number;
629
682
  }>;
630
683
  };
631
684
  shipTo: {
@@ -653,7 +706,12 @@ interface CustomersActions {
653
706
  getCustomer: (customerId: number) => Promise<unknown>;
654
707
  customerLookup: (params: Record<string, unknown>) => Promise<unknown[]>;
655
708
  getCustomerDoc: (customerId: number) => Promise<unknown>;
656
- getCustomerOrders: (customerId: number, params?: Record<string, unknown>) => Promise<unknown[]>;
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>;
657
715
  getContacts: (params?: Record<string, unknown>) => Promise<unknown[]>;
658
716
  getShipToAddresses: (customerId: number) => Promise<unknown[]>;
659
717
  }
@@ -1947,4 +2005,4 @@ interface SiteActions {
1947
2005
  */
1948
2006
  declare function createSiteActions<TApi extends object>(api: TApi, config?: SiteActionsConfig): SiteActions;
1949
2007
 
1950
- export { type P21PimActionsConfig as $, type AddressValidationResult as A, type Basecamp2Actions as B, type CommerceActions as C, type JoomlaActionsConfig as D, type JoomlaApiClient as E, type LegacyActionsConfig as F, type GregorovichActions as G, type LegacyApiClient as H, type ItemActions as I, type JoomlaActions as J, type LogisticsActions as K, type LegacyActions as L, type LogisticsActionsConfig as M, type LogisticsApiClient as N, type NexusActions as O, type NexusActionsConfig as P, type NexusApiClient as Q, type OrderActions as R, type OrderActionsConfig as S, type OrderApiClient as T, type P21ApisActions as U, type P21ApisActionsConfig as V, type P21ApisApiClient as W, type P21CoreActions as X, type P21CoreActionsConfig as Y, type P21CoreApiClient as Z, type P21PimActions as _, type AgrInfoActions as a, type P21PimApiClient as a0, type P21SismActions as a1, type P21SismActionsConfig as a2, type P21SismApiClient as a3, type PaymentsActions as a4, type PaymentsActionsConfig as a5, type PaymentsApiClient as a6, type PricingActions as a7, type PricingActionsConfig as a8, type PricingApiClient as a9, createBasecamp2Actions as aA, createBrandFolderActions as aB, createCommerceActions as aC, createCustomersActions as aD, createGregorovichActions as aE, createItemActions as aF, createJoomlaActions as aG, createLegacyActions as aH, createLogisticsActions as aI, createNexusActions as aJ, createOrderActions as aK, createP21ApisActions as aL, createP21CoreActions as aM, createP21PimActions as aN, createP21SismActions as aO, createPaymentsActions as aP, createPricingActions as aQ, createSearchActions as aR, createShippingActions as aS, createSiteActions as aT, createSlackActions as aU, createSmartyStreetsActions as aV, createUpsActions as aW, createVmiActions as aX, type SearchActions as aa, type SearchActionsConfig as ab, type SearchApiClient as ac, type SearchPage as ad, type ShippingActions as ae, type ShippingActionsConfig as af, type ShippingAddress as ag, type ShippingApiClient as ah, type SiteActions as ai, type SiteActionsConfig as aj, type SlackActions as ak, type SlackActionsConfig as al, type SlackApiClient as am, type SmartyStreetsActions as an, type SmartyStreetsActionsConfig as ao, type SmartyStreetsApiClient as ap, type UpsActions as aq, type UpsActionsConfig as ar, type UpsApiClient as as, type VmiActions as at, type VmiActionsConfig as au, type VmiApiClient as av, createAgrInfoActions as aw, createAgrSiteActions as ax, createAgrWorkActions as ay, createAvalaraActions 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 CustomersActions as t, type CustomersActionsConfig as u, type CustomersApiClient as v, type GregorovichActionsConfig as w, type GregorovichApiClient as x, type ItemActionsConfig as y, type ItemsApiClient as z };
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
@@ -1,4 +1,4 @@
1
- import { ai as SiteActions } from './site-DibGofHe.js';
1
+ import { ak as SiteActions } from './site-IpNMQZr5.js';
2
2
  import '@simpleapps-com/augur-utils';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleapps-com/augur-server",
3
- "version": "0.3.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.3.0"
44
+ "@simpleapps-com/augur-utils": "0.4.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "@simpleapps-com/augur-api": "^0.9.6",
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.3.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.3.0"
76
+ "@simpleapps-com/augur-hooks": "0.4.0"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "tsup",