@gethydra/sdk 0.1.32 → 0.1.34

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 CHANGED
@@ -4538,6 +4538,9 @@ interface operations {
4538
4538
  /** @example 0 */
4539
4539
  min_order_total?: number;
4540
4540
  };
4541
+ gift_card_config?: {
4542
+ default_expiry_days?: number | null;
4543
+ };
4541
4544
  };
4542
4545
  };
4543
4546
  };
@@ -20845,6 +20848,62 @@ type AnalyticsTimeSeries = components['schemas']['AnalyticsTimeSeries'];
20845
20848
  type AnalyticsOrdersSeries = components['schemas']['AnalyticsOrdersSeries'];
20846
20849
  type AnalyticsTopProduct = components['schemas']['AnalyticsTopProduct'];
20847
20850
  type AnalyticsActionItems = components['schemas']['AnalyticsActionItems'];
20851
+ type PosDashboardMetric = {
20852
+ value: number;
20853
+ previous: number | null;
20854
+ change: number | null;
20855
+ };
20856
+ type PosDashboardTakings = {
20857
+ cash_collected: number;
20858
+ card_collected: number;
20859
+ gift_card_payments: number;
20860
+ store_credit_payments: number;
20861
+ discounts_given: number;
20862
+ net_collected: number;
20863
+ };
20864
+ type PosAnalyticsDashboard = {
20865
+ period: {
20866
+ from: string;
20867
+ to: string;
20868
+ };
20869
+ comparison_period: {
20870
+ from: string;
20871
+ to: string;
20872
+ } | null;
20873
+ currency: string;
20874
+ takings: PosDashboardTakings;
20875
+ previous_takings: PosDashboardTakings | null;
20876
+ summary: {
20877
+ gross_revenue: PosDashboardMetric;
20878
+ net_collected: PosDashboardMetric;
20879
+ order_count: PosDashboardMetric;
20880
+ average_order_value: PosDashboardMetric;
20881
+ items_sold: PosDashboardMetric;
20882
+ };
20883
+ top_products: Array<{
20884
+ product_id: string | null;
20885
+ title: string;
20886
+ image_src: string | null;
20887
+ revenue: number;
20888
+ quantity_sold: number;
20889
+ orders: number;
20890
+ }>;
20891
+ staff: Array<{
20892
+ staff_id: string;
20893
+ staff_name: string;
20894
+ order_count: number;
20895
+ total_collected: number;
20896
+ gross_revenue: number;
20897
+ }>;
20898
+ };
20899
+ type PosDashboardParams = {
20900
+ location_id: string;
20901
+ from: string;
20902
+ to: string;
20903
+ compare?: 'previous_period' | 'none';
20904
+ top_products_limit?: number;
20905
+ top_products_sort?: 'revenue' | 'quantity';
20906
+ };
20848
20907
  type SummaryParams = NonNullable<operations['getAnalyticsSummary']['parameters']['query']>;
20849
20908
  type RevenueParams = NonNullable<operations['getRevenueTimeSeries']['parameters']['query']>;
20850
20909
  type OrdersParams = NonNullable<operations['getOrdersTimeSeries']['parameters']['query']>;
@@ -20857,6 +20916,7 @@ declare class AnalyticsResource {
20857
20916
  orders(params?: OrdersParams): Promise<DataResponse<AnalyticsOrdersSeries>>;
20858
20917
  topProducts(params?: TopProductsParams): Promise<DataResponse<AnalyticsTopProduct[]>>;
20859
20918
  actionItems(): Promise<DataResponse<AnalyticsActionItems>>;
20919
+ posDashboard(params: PosDashboardParams): Promise<DataResponse<PosAnalyticsDashboard>>;
20860
20920
  }
20861
20921
 
20862
20922
  type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
@@ -21433,4 +21493,4 @@ declare class HydraIdempotencyError extends HydraError {
21433
21493
  constructor(body: HydraErrorBody, headers: Headers);
21434
21494
  }
21435
21495
 
21436
- export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Appointment$1 as Appointment, type AvailabilityOverride$1 as AvailabilityOverride, BookingsResource, type Cart$1 as Cart, type CartItem, CartResource, type Channel$1 as Channel, ChannelsResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type CreateGiftCardBody, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, type CustomerMembership$1 as CustomerMembership, type CustomerPhoto$1 as CustomerPhoto, CustomerPhotosResource, CustomersResource, type DataResponse, type DayAvailability$1 as DayAvailability, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, type GiftCard, type CreditDebitBody as GiftCardCreditDebitBody, type GiftCardLookup, type GiftCardTransaction, GiftCardsResource, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListGiftCardTransactionsParams, type ListGiftCardsParams, type ListResponse, type Location$1 as Location, LocationsResource, type Lookbook$1 as Lookbook, type LookbookTag$1 as LookbookTag, LookbooksResource, type LoyaltySummary, type MembershipPlan$1 as MembershipPlan, MembershipPlansResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Slot, type Store$1 as Store, StoreCreditResource, StoreResource, type SuggestedSlot$1 as SuggestedSlot, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type UpdateGiftCardBody, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
21496
+ export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Appointment$1 as Appointment, type AvailabilityOverride$1 as AvailabilityOverride, BookingsResource, type Cart$1 as Cart, type CartItem, CartResource, type Channel$1 as Channel, ChannelsResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type CreateGiftCardBody, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, type CustomerMembership$1 as CustomerMembership, type CustomerPhoto$1 as CustomerPhoto, CustomerPhotosResource, CustomersResource, type DataResponse, type DayAvailability$1 as DayAvailability, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, type GiftCard, type CreditDebitBody as GiftCardCreditDebitBody, type GiftCardLookup, type GiftCardTransaction, GiftCardsResource, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListGiftCardTransactionsParams, type ListGiftCardsParams, type ListResponse, type Location$1 as Location, LocationsResource, type Lookbook$1 as Lookbook, type LookbookTag$1 as LookbookTag, LookbooksResource, type LoyaltySummary, type MembershipPlan$1 as MembershipPlan, MembershipPlansResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type PosAnalyticsDashboard, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Slot, type Store$1 as Store, StoreCreditResource, StoreResource, type SuggestedSlot$1 as SuggestedSlot, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type UpdateGiftCardBody, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
package/dist/index.js CHANGED
@@ -1370,6 +1370,9 @@ var AnalyticsResource = class {
1370
1370
  async actionItems() {
1371
1371
  return this.client.request("GET", "/v1/analytics/action-items");
1372
1372
  }
1373
+ async posDashboard(params) {
1374
+ return this.client.request("GET", "/v1/pos/analytics/dashboard", { params });
1375
+ }
1373
1376
  };
1374
1377
 
1375
1378
  // src/resources/store-credit.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gethydra/sdk",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Official TypeScript SDK for the Hydra Commerce API",
5
5
  "license": "MIT",
6
6
  "author": "Grant Capital Group",