@compassdigital/sdk.typescript 4.200.0 → 4.202.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.200.0",
3
+ "version": "4.202.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@compassdigital/review": "^7.6.3",
60
- "@compassdigital/sdk.typescript.cli": "^4.50.0",
60
+ "@compassdigital/sdk.typescript.cli": "^4.51.0",
61
61
  "@swc/core": "^1.4.1",
62
62
  "@swc/jest": "^0.2.36",
63
63
  "@types/jest": "^29.2.4",
package/src/base.ts CHANGED
@@ -177,6 +177,13 @@ export class ServiceError extends Error {
177
177
  this.data = data ?? {};
178
178
  this.context = context ?? {};
179
179
 
180
+ // Jest omits useful debugging information when logging errors.
181
+ // This env var attaches additional info as the cause.
182
+ if (getEnv('P2_SDK_JEST')) {
183
+ // @ts-expect-error
184
+ this.cause = JSON.stringify({ ...this.toJSON(), stack: undefined }, null, 2);
185
+ }
186
+
180
187
  // TODO: remove this if we change compilation target > es5
181
188
  Object.setPrototypeOf(this, ServiceError.prototype);
182
189
  }
@@ -1150,6 +1150,12 @@ export interface AuditListDraftItemDTO {
1150
1150
  [index: string]: any;
1151
1151
  }
1152
1152
 
1153
+ export interface AuditUserDTO {
1154
+ name: string;
1155
+ email?: string;
1156
+ [index: string]: any;
1157
+ }
1158
+
1153
1159
  export interface ReportingCategorySuggestion {
1154
1160
  category?: string;
1155
1161
  occurrences?: number;
@@ -3393,7 +3399,7 @@ export interface GetMenuV3DraftBrandAuditsUsersQuery {
3393
3399
  }
3394
3400
 
3395
3401
  export interface GetMenuV3DraftBrandAuditsUsersResponse {
3396
- users?: string[];
3402
+ users?: AuditUserDTO[];
3397
3403
  }
3398
3404
 
3399
3405
  export interface GetMenuV3DraftBrandAuditsUsersRequest