@simpleapps-com/augur-server 0.3.1 → 0.4.1

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.
@@ -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<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>;
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 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-CxQ1goMQ.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.1",
3
+ "version": "0.4.1",
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.1"
44
+ "@simpleapps-com/augur-utils": "0.4.1"
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.1"
53
+ "@simpleapps-com/augur-hooks": "0.4.1"
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.1"
76
+ "@simpleapps-com/augur-hooks": "0.4.1"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "tsup",