@compassdigital/sdk.typescript 4.598.0 → 4.600.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.
@@ -84,6 +84,29 @@ describe('ServiceClient', () => {
84
84
  });
85
85
  });
86
86
 
87
+ test('loyalty client methods use path-style names', async () => {
88
+ const intercept = jest.fn(interceptor(200, { data: [] }));
89
+ const api = new ServiceClient({ stage: 'dev', intercept });
90
+
91
+ await api.get_loyalty_rewards({
92
+ query: {
93
+ realm: 'boost',
94
+ status: 'active',
95
+ },
96
+ } as any);
97
+
98
+ const req = intercept.mock.calls[0][0];
99
+ expect(req).toEqual({
100
+ route: '/loyalty/rewards',
101
+ service: 'loyalty',
102
+ url: 'https://dev.api.compassdigital.org/loyalty/rewards?realm=boost&status=active',
103
+ method: 'GET',
104
+ headers: {
105
+ 'user-agent': 'CDL/ServiceClient',
106
+ },
107
+ });
108
+ });
109
+
87
110
  test('user specified headers take priority', async () => {
88
111
  const intercept = jest.fn(interceptor(200));
89
112
  const api = new ServiceClient({