@merchi/sdk 1.42.21 → 1.42.23
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/constants/errors.d.ts +1 -1
- package/dist/constants/errors.js +3 -1
- package/dist/constants/errors.test.d.ts +1 -0
- package/dist/constants/errors.test.js +16 -0
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.js +2 -1
- package/dist/constants/job_followup_types.d.ts +8 -0
- package/dist/constants/job_followup_types.js +8 -0
- package/dist/constants/notification_types.d.ts +2 -1
- package/dist/constants/notification_types.js +1 -0
- package/dist/entities/domain.d.ts +2 -0
- package/dist/entities/domain.js +4 -0
- package/dist/entities/job.d.ts +9 -0
- package/dist/entities/job.js +51 -0
- package/dist/entities/job_followup.d.ts +47 -0
- package/dist/entities/job_followup.js +114 -0
- package/dist/entities/job_followup.test.d.ts +1 -0
- package/dist/entities/job_followup.test.js +138 -0
- package/dist/entities/job_followup_template.d.ts +20 -0
- package/dist/entities/job_followup_template.js +84 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/merchi.d.ts +4 -0
- package/dist/merchi.js +4 -0
- package/dist/request.d.ts +2 -2
- package/dist/request.js +0 -1
- package/dist/request.test.js +35 -0
- package/package.json +1 -1
- package/src/constants/errors.test.ts +23 -0
- package/src/constants/errors.ts +4 -2
- package/src/constants/index.ts +2 -0
- package/src/constants/job_followup_types.ts +9 -0
- package/src/constants/notification_types.ts +1 -0
- package/src/entities/domain.ts +4 -0
- package/src/entities/job.ts +56 -0
- package/src/entities/job_followup.test.ts +99 -0
- package/src/entities/job_followup.ts +91 -0
- package/src/entities/job_followup_template.ts +45 -0
- package/src/index.ts +8 -0
- package/src/merchi.ts +8 -0
- package/src/request.test.ts +32 -0
- package/src/request.ts +3 -3
package/src/request.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ErrorType, getErrorFromCode } from './constants/errors.js';
|
|
1
|
+
import { getErrorFromCode } from './constants/errors.js';
|
|
3
2
|
|
|
4
3
|
export interface RequestOptions extends RequestInit {
|
|
5
4
|
query?: string[][];
|
|
@@ -50,7 +49,8 @@ function resolveApiErrorMessage(err: any): string {
|
|
|
50
49
|
|
|
51
50
|
export class ApiError extends Error {
|
|
52
51
|
public statusCode?: number;
|
|
53
|
-
|
|
52
|
+
/** Numeric API code, including values added after this SDK was published. */
|
|
53
|
+
public errorCode?: number;
|
|
54
54
|
public errorMessage: string;
|
|
55
55
|
/**
|
|
56
56
|
* Structured context the API may include alongside the error
|