@scryme/sdk 9.64.2 → 9.65.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.mjs CHANGED
@@ -33,6 +33,7 @@ import {
33
33
  RegisterPettyCashDtoPaymentMethod,
34
34
  ReviewPriceChangeDtoStatus,
35
35
  RoleManagementControllerGetCustomRolesSortOrder,
36
+ ScrymeAuthProvider,
36
37
  ScrymeClientSDK,
37
38
  ScrymeServerSDK,
38
39
  ServicesUpdateBookingStatusBodyStatus,
@@ -63,8 +64,11 @@ import {
63
64
  membersMapping,
64
65
  methodsWithOrgSlugSet,
65
66
  ordersMapping,
66
- posMapping
67
- } from "./chunk-CBV4VTNE.mjs";
67
+ posMapping,
68
+ publicServicesMapping,
69
+ servicesMapping,
70
+ useScrymeAuth
71
+ } from "./chunk-PPNV4D3M.mjs";
68
72
  export {
69
73
  AddDepartmentMemberDtoRole,
70
74
  AttendanceControllerGetLogsSortOrder,
@@ -100,6 +104,7 @@ export {
100
104
  RegisterPettyCashDtoPaymentMethod,
101
105
  ReviewPriceChangeDtoStatus,
102
106
  RoleManagementControllerGetCustomRolesSortOrder,
107
+ ScrymeAuthProvider,
103
108
  ScrymeClientSDK,
104
109
  ScrymeServerSDK,
105
110
  ServicesUpdateBookingStatusBodyStatus,
@@ -130,5 +135,8 @@ export {
130
135
  membersMapping,
131
136
  methodsWithOrgSlugSet,
132
137
  ordersMapping,
133
- posMapping
138
+ posMapping,
139
+ publicServicesMapping,
140
+ servicesMapping,
141
+ useScrymeAuth
134
142
  };
package/dist/server.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { AxiosInstance } from 'axios';
2
- import { fx as RawAPI, cM as CatalogModule, eb as InventoryModule, f3 as OrdersModule, cB as CRMModule, fb as POSModule, bH as AccountingModule, eD as LoyaltyModule, eY as MembersModule, c9 as AdminModule, cm as AuthModule, ab as RegisterCustomerDto } from './base-DZXCyXwH.mjs';
1
+ import { AxiosInstance, AxiosResponse } from 'axios';
2
+ import { fR as RawAPI, cT as CatalogModule, en as InventoryModule, ff as OrdersModule, cI as CRMModule, fn as POSModule, bO as AccountingModule, eP as LoyaltyModule, f8 as MembersModule, cg as AdminModule, gF as ServicesModule, b7 as CartControllerGetCartParams, b8 as CartResponseDto, ba as AddToCartDto, bb as RemoveFromCartDto, b9 as CartControllerClearCartParams, cN as CartItemDto, aA as OrderResponseDto, af as CustomerResponseDto, aj as UpdateCustomerDto, ak as AddressDto, a0 as CreateBookingDto, gd as ServiceBookingItemDto, a2 as CompleteBookingDto, ct as AuthModule, ag as RegisterCustomerDto, s as AuthExchangeToken201 } from './base-DZWqHn_L.mjs';
3
3
 
4
4
  interface ServerSDKConfig {
5
5
  clientId: string;
@@ -21,13 +21,62 @@ declare class ScrymeServerSDK {
21
21
  loyalty: LoyaltyModule;
22
22
  members: MembersModule;
23
23
  admin: AdminModule;
24
+ services: ServicesModule;
25
+ cart: {
26
+ get(params?: CartControllerGetCartParams): Promise<AxiosResponse<CartResponseDto>>;
27
+ add(dto: AddToCartDto): Promise<AxiosResponse<void>>;
28
+ remove(dto: RemoveFromCartDto): Promise<AxiosResponse<void>>;
29
+ clear(params?: CartControllerClearCartParams): Promise<AxiosResponse<void>>;
30
+ update(dto: AddToCartDto & {
31
+ quantity: number;
32
+ }): Promise<AxiosResponse<void> | AxiosResponse<CartResponseDto> | undefined>;
33
+ getItems(params?: CartControllerGetCartParams): Promise<CartItemDto[]>;
34
+ getTotals(params?: CartControllerGetCartParams): Promise<{
35
+ itemsCount: number;
36
+ items: CartItemDto[];
37
+ raw: CartResponseDto;
38
+ }>;
39
+ checkout(params: {
40
+ sessionId?: string;
41
+ customerId?: string;
42
+ locationId: string;
43
+ notes?: string;
44
+ channel?: string;
45
+ }): Promise<OrderResponseDto>;
46
+ };
47
+ customer: {
48
+ getProfile(customerId: string): Promise<AxiosResponse<CustomerResponseDto>>;
49
+ updateProfile(customerId: string, dto: UpdateCustomerDto): Promise<AxiosResponse<CustomerResponseDto>>;
50
+ getAddresses(customerId: string): Promise<AxiosResponse<AddressDto[]>>;
51
+ addAddress(customerId: string, dto: AddressDto): Promise<AxiosResponse<void>>;
52
+ };
53
+ bookings: {
54
+ create(dto: CreateBookingDto): Promise<AxiosResponse<void>>;
55
+ get(id: string): Promise<AxiosResponse<ServiceBookingItemDto>>;
56
+ list(): Promise<AxiosResponse<ServiceBookingItemDto[]>>;
57
+ cancel(id: string): Promise<AxiosResponse<void>>;
58
+ complete(id: string, dto: CompleteBookingDto & Record<string, any>): Promise<AxiosResponse<void>>;
59
+ };
24
60
  auth: AuthModule & {
25
- signUp(dto: RegisterCustomerDto): Promise<any>;
26
- authenticate(): Promise<any>;
61
+ signUp(dto: RegisterCustomerDto): Promise<AxiosResponse<CustomerResponseDto>>;
62
+ authenticate(): Promise<AuthExchangeToken201>;
27
63
  signIn(credentials: {
28
64
  email: string;
29
65
  password?: string;
30
- }): Promise<any>;
66
+ }): Promise<{
67
+ token: string;
68
+ session?: any;
69
+ user?: any;
70
+ }>;
71
+ getCurrentSession(): Promise<CustomerResponseDto>;
72
+ refreshSession(): Promise<{
73
+ token: string;
74
+ session?: any;
75
+ }>;
76
+ swapZitadel(zitadelToken: string): Promise<{
77
+ token: string;
78
+ session?: any;
79
+ }>;
31
80
  };
32
81
  private token;
33
82
  private expiresAt;
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { AxiosInstance } from 'axios';
2
- import { fx as RawAPI, cM as CatalogModule, eb as InventoryModule, f3 as OrdersModule, cB as CRMModule, fb as POSModule, bH as AccountingModule, eD as LoyaltyModule, eY as MembersModule, c9 as AdminModule, cm as AuthModule, ab as RegisterCustomerDto } from './base-DZXCyXwH.js';
1
+ import { AxiosInstance, AxiosResponse } from 'axios';
2
+ import { fR as RawAPI, cT as CatalogModule, en as InventoryModule, ff as OrdersModule, cI as CRMModule, fn as POSModule, bO as AccountingModule, eP as LoyaltyModule, f8 as MembersModule, cg as AdminModule, gF as ServicesModule, b7 as CartControllerGetCartParams, b8 as CartResponseDto, ba as AddToCartDto, bb as RemoveFromCartDto, b9 as CartControllerClearCartParams, cN as CartItemDto, aA as OrderResponseDto, af as CustomerResponseDto, aj as UpdateCustomerDto, ak as AddressDto, a0 as CreateBookingDto, gd as ServiceBookingItemDto, a2 as CompleteBookingDto, ct as AuthModule, ag as RegisterCustomerDto, s as AuthExchangeToken201 } from './base-DZWqHn_L.js';
3
3
 
4
4
  interface ServerSDKConfig {
5
5
  clientId: string;
@@ -21,13 +21,62 @@ declare class ScrymeServerSDK {
21
21
  loyalty: LoyaltyModule;
22
22
  members: MembersModule;
23
23
  admin: AdminModule;
24
+ services: ServicesModule;
25
+ cart: {
26
+ get(params?: CartControllerGetCartParams): Promise<AxiosResponse<CartResponseDto>>;
27
+ add(dto: AddToCartDto): Promise<AxiosResponse<void>>;
28
+ remove(dto: RemoveFromCartDto): Promise<AxiosResponse<void>>;
29
+ clear(params?: CartControllerClearCartParams): Promise<AxiosResponse<void>>;
30
+ update(dto: AddToCartDto & {
31
+ quantity: number;
32
+ }): Promise<AxiosResponse<void> | AxiosResponse<CartResponseDto> | undefined>;
33
+ getItems(params?: CartControllerGetCartParams): Promise<CartItemDto[]>;
34
+ getTotals(params?: CartControllerGetCartParams): Promise<{
35
+ itemsCount: number;
36
+ items: CartItemDto[];
37
+ raw: CartResponseDto;
38
+ }>;
39
+ checkout(params: {
40
+ sessionId?: string;
41
+ customerId?: string;
42
+ locationId: string;
43
+ notes?: string;
44
+ channel?: string;
45
+ }): Promise<OrderResponseDto>;
46
+ };
47
+ customer: {
48
+ getProfile(customerId: string): Promise<AxiosResponse<CustomerResponseDto>>;
49
+ updateProfile(customerId: string, dto: UpdateCustomerDto): Promise<AxiosResponse<CustomerResponseDto>>;
50
+ getAddresses(customerId: string): Promise<AxiosResponse<AddressDto[]>>;
51
+ addAddress(customerId: string, dto: AddressDto): Promise<AxiosResponse<void>>;
52
+ };
53
+ bookings: {
54
+ create(dto: CreateBookingDto): Promise<AxiosResponse<void>>;
55
+ get(id: string): Promise<AxiosResponse<ServiceBookingItemDto>>;
56
+ list(): Promise<AxiosResponse<ServiceBookingItemDto[]>>;
57
+ cancel(id: string): Promise<AxiosResponse<void>>;
58
+ complete(id: string, dto: CompleteBookingDto & Record<string, any>): Promise<AxiosResponse<void>>;
59
+ };
24
60
  auth: AuthModule & {
25
- signUp(dto: RegisterCustomerDto): Promise<any>;
26
- authenticate(): Promise<any>;
61
+ signUp(dto: RegisterCustomerDto): Promise<AxiosResponse<CustomerResponseDto>>;
62
+ authenticate(): Promise<AuthExchangeToken201>;
27
63
  signIn(credentials: {
28
64
  email: string;
29
65
  password?: string;
30
- }): Promise<any>;
66
+ }): Promise<{
67
+ token: string;
68
+ session?: any;
69
+ user?: any;
70
+ }>;
71
+ getCurrentSession(): Promise<CustomerResponseDto>;
72
+ refreshSession(): Promise<{
73
+ token: string;
74
+ session?: any;
75
+ }>;
76
+ swapZitadel(zitadelToken: string): Promise<{
77
+ token: string;
78
+ session?: any;
79
+ }>;
31
80
  };
32
81
  private token;
33
82
  private expiresAt;