@pexip-engage-public/graphql 1.3.6 → 1.4.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/CHANGELOG.md +14 -0
- package/dist/graphql-env.d.ts +96 -19
- package/dist/graphql-env.d.ts.map +1 -1
- package/dist/graphql-env.js +105 -26
- package/dist/graphql-env.js.map +1 -1
- package/dist/graphql-error-handler.d.ts +11 -101
- package/dist/graphql-error-handler.d.ts.map +1 -1
- package/dist/graphql-error-handler.js +2 -2
- package/dist/graphql-error-handler.js.map +1 -1
- package/dist/schema.d.ts +10 -1
- package/dist/schema.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/graphql-env.ts +105 -26
- package/src/graphql-error-handler.ts +2 -2
- package/src/schema.ts +12 -7
|
@@ -1,123 +1,33 @@
|
|
|
1
1
|
import { ClientError } from "graphql-request";
|
|
2
|
-
import
|
|
2
|
+
import * as z from "zod";
|
|
3
3
|
import { GraphQLErrorCode } from "./graphql-error-codes.js";
|
|
4
|
-
declare const ExtensionSchema: z.ZodUnion<[z.ZodObject<{
|
|
4
|
+
declare const ExtensionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
5
|
message: z.ZodString;
|
|
6
|
-
/**
|
|
7
|
-
* A `400` response code indicates a malformed request.
|
|
8
|
-
*
|
|
9
|
-
* The request should not be retried without changes.
|
|
10
|
-
*/
|
|
11
6
|
statusCode: z.ZodLiteral<400>;
|
|
12
|
-
},
|
|
13
|
-
statusCode: 400;
|
|
14
|
-
message: string;
|
|
15
|
-
}, {
|
|
16
|
-
statusCode: 400;
|
|
17
|
-
message: string;
|
|
18
|
-
}>, z.ZodObject<{
|
|
7
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
8
|
message: z.ZodString;
|
|
20
|
-
/**
|
|
21
|
-
* A `401` response code indicates an unauthorized request.
|
|
22
|
-
*
|
|
23
|
-
* This response can be expected when the `Authorization` header value is invalid, expired or missing.
|
|
24
|
-
*
|
|
25
|
-
* The request should not be retried with the same `Authorization` header value.
|
|
26
|
-
*/
|
|
27
9
|
statusCode: z.ZodLiteral<401>;
|
|
28
|
-
},
|
|
29
|
-
statusCode: 401;
|
|
30
|
-
message: string;
|
|
31
|
-
}, {
|
|
32
|
-
statusCode: 401;
|
|
33
|
-
message: string;
|
|
34
|
-
}>, z.ZodObject<{
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
11
|
message: z.ZodString;
|
|
36
|
-
/**
|
|
37
|
-
* A `403` response code indicates a forbidden request.
|
|
38
|
-
*
|
|
39
|
-
* The provided `Authorization` header value is valid but the request is prohibited due to other permission restrictions (e.g., missing scopes or organizational settings).
|
|
40
|
-
*/
|
|
41
12
|
statusCode: z.ZodLiteral<403>;
|
|
42
|
-
},
|
|
43
|
-
statusCode: 403;
|
|
44
|
-
message: string;
|
|
45
|
-
}, {
|
|
46
|
-
statusCode: 403;
|
|
47
|
-
message: string;
|
|
48
|
-
}>, z.ZodObject<{
|
|
13
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
14
|
message: z.ZodString;
|
|
50
|
-
/**
|
|
51
|
-
* A `404` response code indicates a resource that cannot be found.
|
|
52
|
-
*
|
|
53
|
-
* This response code will be returned in case of a non-existent URL being used or a non-existent resource ID being used in a valid URL structure.
|
|
54
|
-
*/
|
|
55
15
|
statusCode: z.ZodLiteral<404>;
|
|
56
|
-
},
|
|
57
|
-
statusCode: 404;
|
|
58
|
-
message: string;
|
|
59
|
-
}, {
|
|
60
|
-
statusCode: 404;
|
|
61
|
-
message: string;
|
|
62
|
-
}>, z.ZodObject<{
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
17
|
message: z.ZodString;
|
|
64
|
-
/**
|
|
65
|
-
* A `405` response code indicates that the HTTP method being used is not supported for the target URL.
|
|
66
|
-
*
|
|
67
|
-
* The request should not be retried without changes.
|
|
68
|
-
*/
|
|
69
18
|
statusCode: z.ZodLiteral<405>;
|
|
70
|
-
},
|
|
71
|
-
statusCode: 405;
|
|
72
|
-
message: string;
|
|
73
|
-
}, {
|
|
74
|
-
statusCode: 405;
|
|
75
|
-
message: string;
|
|
76
|
-
}>, z.ZodObject<{
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
20
|
message: z.ZodString;
|
|
78
|
-
/**
|
|
79
|
-
* A `409` response code indicates a conflict, caused by concurrent operations, that resulted in a situation where the requested operation could not be performed simultaneously with another operation.
|
|
80
|
-
*
|
|
81
|
-
* The request can be retried without changes but will most likely result in another error response code.
|
|
82
|
-
*/
|
|
83
21
|
statusCode: z.ZodLiteral<409>;
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
message: string;
|
|
87
|
-
}, {
|
|
88
|
-
statusCode: 409;
|
|
89
|
-
message: string;
|
|
90
|
-
}>, z.ZodObject<{
|
|
91
|
-
code: z.ZodNativeEnum<typeof GraphQLErrorCode>;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
code: z.ZodEnum<typeof GraphQLErrorCode>;
|
|
92
24
|
message: z.ZodString;
|
|
93
|
-
/**
|
|
94
|
-
* A `422` response code indicates a failed business validation.
|
|
95
|
-
*
|
|
96
|
-
* More information on the business validation concerned can be found in [Error codes](https://developer.pexipengage.com/topic/topic-error-codes) by looking up the specific error code mentioned in the `errors` array in the response body.
|
|
97
|
-
*/
|
|
98
25
|
statusCode: z.ZodLiteral<422>;
|
|
99
26
|
type: z.ZodLiteral<"UnprocessableEntity">;
|
|
100
|
-
},
|
|
101
|
-
type: "UnprocessableEntity";
|
|
102
|
-
code: GraphQLErrorCode;
|
|
103
|
-
statusCode: 422;
|
|
104
|
-
message: string;
|
|
105
|
-
}, {
|
|
106
|
-
type: "UnprocessableEntity";
|
|
107
|
-
code: GraphQLErrorCode;
|
|
108
|
-
statusCode: 422;
|
|
109
|
-
message: string;
|
|
110
|
-
}>, z.ZodObject<{
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
28
|
message: z.ZodString;
|
|
112
|
-
/** A `429` response code indicates that too many requests were sent in a given amount of time. See [Rate limiting](https://developer.pexipengage.com/topic/topic-rate-limiting). */
|
|
113
29
|
statusCode: z.ZodLiteral<429>;
|
|
114
|
-
},
|
|
115
|
-
statusCode: 429;
|
|
116
|
-
message: string;
|
|
117
|
-
}, {
|
|
118
|
-
statusCode: 429;
|
|
119
|
-
message: string;
|
|
120
|
-
}>]>;
|
|
30
|
+
}, z.core.$strip>]>;
|
|
121
31
|
type Extension = z.infer<typeof ExtensionSchema>;
|
|
122
32
|
type StatusCode = Extension["statusCode"];
|
|
123
33
|
type ErrorMap = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-error-handler.d.ts","sourceRoot":"","sources":["../src/graphql-error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-error-handler.d.ts","sourceRoot":"","sources":["../src/graphql-error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;mBA6EnB,CAAC;AAEH,KAAK,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACjD,KAAK,UAAU,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAC1C,KAAK,QAAQ,GAAG;KAAG,GAAG,IAAI,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE;QAAE,UAAU,EAAE,GAAG,CAAA;KAAE,CAAC,EAAE;CAAE,CAAC;AAEpF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;EAmC5C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientError } from "graphql-request";
|
|
2
|
-
import
|
|
2
|
+
import * as z from "zod";
|
|
3
3
|
import { GraphQLErrorCode } from "./graphql-error-codes.js";
|
|
4
4
|
const ExtensionSchema = z.union([
|
|
5
5
|
z.object({
|
|
@@ -59,7 +59,7 @@ const ExtensionSchema = z.union([
|
|
|
59
59
|
statusCode: z.literal(409),
|
|
60
60
|
}),
|
|
61
61
|
z.object({
|
|
62
|
-
code: z.
|
|
62
|
+
code: z.enum(GraphQLErrorCode),
|
|
63
63
|
message: z.string(),
|
|
64
64
|
/**
|
|
65
65
|
* A `422` response code indicates a failed business validation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-error-handler.js","sourceRoot":"","sources":["../src/graphql-error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-error-handler.js","sourceRoot":"","sources":["../src/graphql-error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC;IAC9B,CAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB;;;;WAIG;QACH,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;KAC3B,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB;;;;;;WAMG;QACH,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;QACjC,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAC3C,CAAC,GAAG,EAAE,EAAE,CACN,eAAe,CAAC,SAAS,CAAC;gBACxB,GAAG,GAAG,CAAC,UAAU;gBACjB,OAAO,EAAE,GAAG,CAAC,OAAO;aACrB,CAAC,CAAC,IAAI,CACV,CAAC;YAEF,MAAM,GAAG,GAAa,EAAE,CAAC;YACzB,MAAM,QAAQ,GACZ,UAAU,EAAE,MAAM,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;gBACpC,IAAI,CAAC,SAAS;oBAAE,OAAO,GAAG,CAAC;gBAC3B,MAAM,YAAY,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;gBAE/C,IAAI,YAAY,EAAE,CAAC;oBACjB,YAAY,CAAC,IAAI,CAAC,SAAgB,CAAC,CAAC;gBACtC,CAAC;qBAAM,CAAC;oBACN,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,SAAgB,CAAC,CAAC;gBACjD,CAAC;gBAED,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC;YAEjB,MAAM,QAAQ,GAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;YAE5D,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,EAAE,aAAa,EAAW,CAAC;QACxF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;AAC7C,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -303,6 +303,7 @@ export type Appointment = {
|
|
|
303
303
|
updatedFrom: AppointmentSource;
|
|
304
304
|
/** Indicates if the appointment will sent out notifications and reminders to participants. */
|
|
305
305
|
userCommunication: AppointmentUserCommunication;
|
|
306
|
+
uuid: Scalars['String']['output'];
|
|
306
307
|
};
|
|
307
308
|
export type AppointmentAppointmentParticipantsArgs = {
|
|
308
309
|
role?: InputMaybe<ParticipantRole>;
|
|
@@ -2011,7 +2012,6 @@ export type InsightsAccessToken = {
|
|
|
2011
2012
|
dashboardId: Scalars['String']['output'];
|
|
2012
2013
|
};
|
|
2013
2014
|
export type InsightsDashboardType = 'ADMIN_APPOINTMENT_INSIGHTS' | 'AVAILABILITY_INSIGHTS' | 'CONVERSION_ANALYTICS' | 'OFFICE_MANAGER_APPOINTMENT_INSIGHTS';
|
|
2014
|
-
export type InsightsDatasetType = 'APPOINTMENT_INSIGHTS' | 'AVAILABILITY_INSIGHTS' | 'CONVERSION_ANALYTICS' | 'CONVERSION_ANALYTICS_AGGREGATED' | 'CONVERSION_ANALYTICS_UNWRAPPED';
|
|
2015
2015
|
export type IntegerAvailabilitySetting = {
|
|
2016
2016
|
default: Scalars['Int']['output'];
|
|
2017
2017
|
isOverridden: Scalars['Boolean']['output'];
|
|
@@ -2734,6 +2734,7 @@ export type Mutation = {
|
|
|
2734
2734
|
putLeadSegmentSchedulingSettings: Array<LeadSegmentSchedulingSetting>;
|
|
2735
2735
|
putListingSchedulingSettings: ListingSchedulingSetting;
|
|
2736
2736
|
putListingTimeSlot: ListingTimeSlot;
|
|
2737
|
+
putMeetingRoomOffices: MeetingRoom;
|
|
2737
2738
|
putMeetingRoomSchedulingSettings: Array<MeetingRoomSchedulingSetting>;
|
|
2738
2739
|
putOfficeEmployeeCoverageRegionSchedulingSettings: Array<OfficeEmployeeCoverageRegionSchedulingSetting>;
|
|
2739
2740
|
putOfficeEmployeeSubjectCoverageRegionSchedulingSettings: Array<OfficeEmployeeSubjectCoverageRegionSchedulingSetting>;
|
|
@@ -3232,6 +3233,10 @@ export type MutationPutListingTimeSlotArgs = {
|
|
|
3232
3233
|
id: Scalars['ID']['input'];
|
|
3233
3234
|
listingTimeSlotPutInput: ListingTimeSlotPutInput;
|
|
3234
3235
|
};
|
|
3236
|
+
export type MutationPutMeetingRoomOfficesArgs = {
|
|
3237
|
+
meetingRoomId: Scalars['ID']['input'];
|
|
3238
|
+
officeIds: Array<Scalars['ID']['input']>;
|
|
3239
|
+
};
|
|
3235
3240
|
export type MutationPutMeetingRoomSchedulingSettingsArgs = {
|
|
3236
3241
|
meetingRoomId: Scalars['ID']['input'];
|
|
3237
3242
|
meetingRoomSchedulingSettingInput: Array<MeetingRoomSchedulingSettingInput>;
|
|
@@ -5053,6 +5058,7 @@ export type SubjectGroup = {
|
|
|
5053
5058
|
color: Scalars['String']['output'];
|
|
5054
5059
|
createdAt: Scalars['ISO8601']['output'];
|
|
5055
5060
|
deletedAt?: Maybe<Scalars['ISO8601']['output']>;
|
|
5061
|
+
description?: Maybe<TranslationObject>;
|
|
5056
5062
|
externalId?: Maybe<Scalars['String']['output']>;
|
|
5057
5063
|
id: Scalars['ID']['output'];
|
|
5058
5064
|
image?: Maybe<Scalars['String']['output']>;
|
|
@@ -5107,12 +5113,15 @@ export type SubjectGroupSort = {
|
|
|
5107
5113
|
field: SortableSubjectGroupFields;
|
|
5108
5114
|
};
|
|
5109
5115
|
export type SubjectGroupTranslations = {
|
|
5116
|
+
description: Array<TranslationObject>;
|
|
5110
5117
|
name: Array<TranslationObject>;
|
|
5111
5118
|
};
|
|
5112
5119
|
export type SubjectGroupTranslationsCreateInput = {
|
|
5120
|
+
description?: InputMaybe<Array<TranslationObjectInput>>;
|
|
5113
5121
|
name: Array<TranslationObjectInput>;
|
|
5114
5122
|
};
|
|
5115
5123
|
export type SubjectGroupTranslationsPatchInput = {
|
|
5124
|
+
description?: InputMaybe<Array<TranslationObjectInput>>;
|
|
5116
5125
|
name?: InputMaybe<Array<TranslationObjectInput>>;
|
|
5117
5126
|
};
|
|
5118
5127
|
export type SubjectMeetingTypeAvailabilitySetting = {
|