@compassdigital/sdk.typescript 4.597.0 → 4.599.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.
@@ -45,6 +45,7 @@ export interface User {
45
45
  placeholder?: boolean;
46
46
  };
47
47
  permissions?: Permissions;
48
+ temporary_permissions?: TemporaryPermissions;
48
49
  // User location group
49
50
  location_group?: string;
50
51
  ssoId?: string;
@@ -247,6 +248,12 @@ export interface Permissions {
247
248
  scopes?: Scope[];
248
249
  }
249
250
 
251
+ export interface TemporaryPermissions {
252
+ // ISO 8601 UTC timestamp at which these temporary scopes expire
253
+ expiry?: string;
254
+ scopes?: Scope[];
255
+ }
256
+
250
257
  export interface Users {
251
258
  users?: User[];
252
259
  }
@@ -667,6 +674,7 @@ export interface PutUserPermissionsPath {
667
674
 
668
675
  export interface PutUserPermissionsBody {
669
676
  permissions?: Permissions;
677
+ temporary_permissions?: TemporaryPermissions;
670
678
  }
671
679
 
672
680
  export type PutUserPermissionsResponse = User;
@@ -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({