@autofleet/element-pay 2.0.1 → 2.1.2
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/lib/index.cjs +37 -10
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +80 -1
- package/lib/index.d.ts +80 -1
- package/lib/index.js +45 -18
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.d.cts
CHANGED
|
@@ -66,6 +66,7 @@ type ClientOnboardInput = {
|
|
|
66
66
|
integratorId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
67
67
|
name: Scalars$1['String']['input'];
|
|
68
68
|
onboardedBy?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
69
|
+
phoneNumber?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
69
70
|
taxId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
70
71
|
unitsId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
71
72
|
useTspMetadata?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
@@ -204,6 +205,17 @@ declare enum UserStatus {
|
|
|
204
205
|
Onboarded = "ONBOARDED",
|
|
205
206
|
Unknown = "UNKNOWN",
|
|
206
207
|
}
|
|
208
|
+
type UserUpdateInput = {
|
|
209
|
+
additionalInfo?: InputMaybe$1<AdditionalInfoInput>;
|
|
210
|
+
email?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
211
|
+
employeeId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
212
|
+
firstName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
213
|
+
id: Scalars$1['ID']['input'];
|
|
214
|
+
lastName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
215
|
+
loginType?: InputMaybe$1<LoginType>;
|
|
216
|
+
phoneNumber?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
217
|
+
role: RoleType;
|
|
218
|
+
};
|
|
207
219
|
type VehicleGroupCreateInput = {
|
|
208
220
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
209
221
|
driverEnteredOdometerEnabled?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
@@ -257,6 +269,17 @@ type VehicleUpdateInput = {
|
|
|
257
269
|
licensePlateState?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
258
270
|
number?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
259
271
|
};
|
|
272
|
+
type VehiclesFilterInput = {
|
|
273
|
+
filter: VehiclesFilterOptions;
|
|
274
|
+
page?: InputMaybe$1<PageRequest>;
|
|
275
|
+
sortOptions?: InputMaybe$1<VehiclesSortOptions>;
|
|
276
|
+
};
|
|
277
|
+
type VehiclesFilterOptions = {
|
|
278
|
+
entityId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
279
|
+
userId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
280
|
+
vehicleGroupId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
281
|
+
vin?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
282
|
+
};
|
|
260
283
|
type VehiclesOnboardInput = {
|
|
261
284
|
customFields?: InputMaybe$1<Array<InputMaybe$1<HashMapInput>>>;
|
|
262
285
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
@@ -270,6 +293,18 @@ type VehiclesOnboardInput = {
|
|
|
270
293
|
type VehiclesOnboardInputList = {
|
|
271
294
|
vehicles?: InputMaybe$1<Array<InputMaybe$1<VehiclesOnboardInput>>>;
|
|
272
295
|
};
|
|
296
|
+
declare enum VehiclesSortField {
|
|
297
|
+
Description = "DESCRIPTION",
|
|
298
|
+
DriverCount = "DRIVER_COUNT",
|
|
299
|
+
FuelLevel = "FUEL_LEVEL",
|
|
300
|
+
LastTransactionDate = "LAST_TRANSACTION_DATE",
|
|
301
|
+
Name = "NAME",
|
|
302
|
+
Number = "NUMBER",
|
|
303
|
+
}
|
|
304
|
+
type VehiclesSortOptions = {
|
|
305
|
+
direction: SortDirection;
|
|
306
|
+
orderBy: VehiclesSortField;
|
|
307
|
+
};
|
|
273
308
|
type ApiKeyCreateMutationVariables = Exact$1<{
|
|
274
309
|
input: ApiKeyCreateInput;
|
|
275
310
|
}>;
|
|
@@ -422,6 +457,23 @@ type UserCreateMutation = {
|
|
|
422
457
|
updatedAt?: string | null;
|
|
423
458
|
} | null;
|
|
424
459
|
};
|
|
460
|
+
type UserUpdateMutationVariables = Exact$1<{
|
|
461
|
+
input: UserUpdateInput;
|
|
462
|
+
}>;
|
|
463
|
+
type UserUpdateMutation = {
|
|
464
|
+
__typename?: 'Mutation';
|
|
465
|
+
userUpdate?: {
|
|
466
|
+
__typename?: 'User';
|
|
467
|
+
id?: string | null;
|
|
468
|
+
firstName?: string | null;
|
|
469
|
+
lastName?: string | null;
|
|
470
|
+
email?: string | null;
|
|
471
|
+
phoneNumber?: string | null;
|
|
472
|
+
employeeId?: string | null;
|
|
473
|
+
role?: RoleType | null;
|
|
474
|
+
status?: UserStatus | null;
|
|
475
|
+
} | null;
|
|
476
|
+
};
|
|
425
477
|
type VehicleGroupCreateMutationVariables = Exact$1<{
|
|
426
478
|
input: VehicleGroupCreateInput;
|
|
427
479
|
}>;
|
|
@@ -481,6 +533,26 @@ type VehicleUpdateMutation = {
|
|
|
481
533
|
__typename?: 'Mutation';
|
|
482
534
|
vehicleUpdate?: string | null;
|
|
483
535
|
};
|
|
536
|
+
type VehiclesFilterQueryVariables = Exact$1<{
|
|
537
|
+
input: VehiclesFilterInput;
|
|
538
|
+
}>;
|
|
539
|
+
type VehiclesFilterQuery = {
|
|
540
|
+
__typename?: 'Query';
|
|
541
|
+
vehiclesFilter?: {
|
|
542
|
+
__typename?: 'VehiclesPage';
|
|
543
|
+
data?: Array<{
|
|
544
|
+
__typename?: 'Vehicle';
|
|
545
|
+
id?: string | null;
|
|
546
|
+
vin: string;
|
|
547
|
+
} | null> | null;
|
|
548
|
+
meta?: {
|
|
549
|
+
__typename?: 'PageMeta';
|
|
550
|
+
limit?: number | null;
|
|
551
|
+
offset?: number | null;
|
|
552
|
+
total?: number | null;
|
|
553
|
+
} | null;
|
|
554
|
+
} | null;
|
|
555
|
+
};
|
|
484
556
|
type VehicleGroupsFilterQueryVariables = Exact$1<{
|
|
485
557
|
input: VehicleGroupsFilterInput;
|
|
486
558
|
}>;
|
|
@@ -535,10 +607,12 @@ declare function getOrganizationSdk(config: ElementPayOrganizationConfig): {
|
|
|
535
607
|
entityGetExternalId(variables?: EntityGetExternalIdQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<EntityGetExternalIdQuery>;
|
|
536
608
|
machineTokenizeUser(variables?: MachineTokenizeUserMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<MachineTokenizeUserMutation>;
|
|
537
609
|
userCreate(variables: UserCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserCreateMutation>;
|
|
610
|
+
userUpdate(variables: UserUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserUpdateMutation>;
|
|
538
611
|
vehicleGroupCreate(variables: VehicleGroupCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupCreateMutation>;
|
|
539
612
|
vehicleGroupDriversAdd(variables: VehicleGroupDriversAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupDriversAddMutation>;
|
|
540
613
|
vehicleGroupVehiclesAdd(variables: VehicleGroupVehiclesAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupVehiclesAddMutation>;
|
|
541
614
|
vehicleUpdate(variables: VehicleUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleUpdateMutation>;
|
|
615
|
+
vehiclesFilter(variables: VehiclesFilterQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehiclesFilterQuery>;
|
|
542
616
|
vehicleGroupsFilter(variables: VehicleGroupsFilterQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupsFilterQuery>;
|
|
543
617
|
vehiclesOnboard(variables: VehiclesOnboardMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehiclesOnboardMutation>;
|
|
544
618
|
};
|
|
@@ -733,6 +807,11 @@ interface RawService {
|
|
|
733
807
|
name: string;
|
|
734
808
|
};
|
|
735
809
|
}
|
|
810
|
+
interface RawAmenity {
|
|
811
|
+
id: string;
|
|
812
|
+
name: string;
|
|
813
|
+
description: string;
|
|
814
|
+
}
|
|
736
815
|
interface ServiceLocationFromEvent {
|
|
737
816
|
id: string;
|
|
738
817
|
provider_id: string;
|
|
@@ -750,7 +829,7 @@ interface ServiceLocationFromEvent {
|
|
|
750
829
|
lng: number;
|
|
751
830
|
lat: number;
|
|
752
831
|
};
|
|
753
|
-
amenities:
|
|
832
|
+
amenities: RawAmenity[] | null;
|
|
754
833
|
services: RawService[];
|
|
755
834
|
phone: string;
|
|
756
835
|
integration: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ type ClientOnboardInput = {
|
|
|
67
67
|
integratorId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
68
68
|
name: Scalars$1['String']['input'];
|
|
69
69
|
onboardedBy?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
70
|
+
phoneNumber?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
70
71
|
taxId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
71
72
|
unitsId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
72
73
|
useTspMetadata?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
@@ -205,6 +206,17 @@ declare enum UserStatus {
|
|
|
205
206
|
Onboarded = "ONBOARDED",
|
|
206
207
|
Unknown = "UNKNOWN",
|
|
207
208
|
}
|
|
209
|
+
type UserUpdateInput = {
|
|
210
|
+
additionalInfo?: InputMaybe$1<AdditionalInfoInput>;
|
|
211
|
+
email?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
212
|
+
employeeId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
213
|
+
firstName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
214
|
+
id: Scalars$1['ID']['input'];
|
|
215
|
+
lastName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
216
|
+
loginType?: InputMaybe$1<LoginType>;
|
|
217
|
+
phoneNumber?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
218
|
+
role: RoleType;
|
|
219
|
+
};
|
|
208
220
|
type VehicleGroupCreateInput = {
|
|
209
221
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
210
222
|
driverEnteredOdometerEnabled?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
@@ -258,6 +270,17 @@ type VehicleUpdateInput = {
|
|
|
258
270
|
licensePlateState?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
259
271
|
number?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
260
272
|
};
|
|
273
|
+
type VehiclesFilterInput = {
|
|
274
|
+
filter: VehiclesFilterOptions;
|
|
275
|
+
page?: InputMaybe$1<PageRequest>;
|
|
276
|
+
sortOptions?: InputMaybe$1<VehiclesSortOptions>;
|
|
277
|
+
};
|
|
278
|
+
type VehiclesFilterOptions = {
|
|
279
|
+
entityId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
280
|
+
userId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
281
|
+
vehicleGroupId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
282
|
+
vin?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
283
|
+
};
|
|
261
284
|
type VehiclesOnboardInput = {
|
|
262
285
|
customFields?: InputMaybe$1<Array<InputMaybe$1<HashMapInput>>>;
|
|
263
286
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
@@ -271,6 +294,18 @@ type VehiclesOnboardInput = {
|
|
|
271
294
|
type VehiclesOnboardInputList = {
|
|
272
295
|
vehicles?: InputMaybe$1<Array<InputMaybe$1<VehiclesOnboardInput>>>;
|
|
273
296
|
};
|
|
297
|
+
declare enum VehiclesSortField {
|
|
298
|
+
Description = "DESCRIPTION",
|
|
299
|
+
DriverCount = "DRIVER_COUNT",
|
|
300
|
+
FuelLevel = "FUEL_LEVEL",
|
|
301
|
+
LastTransactionDate = "LAST_TRANSACTION_DATE",
|
|
302
|
+
Name = "NAME",
|
|
303
|
+
Number = "NUMBER",
|
|
304
|
+
}
|
|
305
|
+
type VehiclesSortOptions = {
|
|
306
|
+
direction: SortDirection;
|
|
307
|
+
orderBy: VehiclesSortField;
|
|
308
|
+
};
|
|
274
309
|
type ApiKeyCreateMutationVariables = Exact$1<{
|
|
275
310
|
input: ApiKeyCreateInput;
|
|
276
311
|
}>;
|
|
@@ -423,6 +458,23 @@ type UserCreateMutation = {
|
|
|
423
458
|
updatedAt?: string | null;
|
|
424
459
|
} | null;
|
|
425
460
|
};
|
|
461
|
+
type UserUpdateMutationVariables = Exact$1<{
|
|
462
|
+
input: UserUpdateInput;
|
|
463
|
+
}>;
|
|
464
|
+
type UserUpdateMutation = {
|
|
465
|
+
__typename?: 'Mutation';
|
|
466
|
+
userUpdate?: {
|
|
467
|
+
__typename?: 'User';
|
|
468
|
+
id?: string | null;
|
|
469
|
+
firstName?: string | null;
|
|
470
|
+
lastName?: string | null;
|
|
471
|
+
email?: string | null;
|
|
472
|
+
phoneNumber?: string | null;
|
|
473
|
+
employeeId?: string | null;
|
|
474
|
+
role?: RoleType | null;
|
|
475
|
+
status?: UserStatus | null;
|
|
476
|
+
} | null;
|
|
477
|
+
};
|
|
426
478
|
type VehicleGroupCreateMutationVariables = Exact$1<{
|
|
427
479
|
input: VehicleGroupCreateInput;
|
|
428
480
|
}>;
|
|
@@ -482,6 +534,26 @@ type VehicleUpdateMutation = {
|
|
|
482
534
|
__typename?: 'Mutation';
|
|
483
535
|
vehicleUpdate?: string | null;
|
|
484
536
|
};
|
|
537
|
+
type VehiclesFilterQueryVariables = Exact$1<{
|
|
538
|
+
input: VehiclesFilterInput;
|
|
539
|
+
}>;
|
|
540
|
+
type VehiclesFilterQuery = {
|
|
541
|
+
__typename?: 'Query';
|
|
542
|
+
vehiclesFilter?: {
|
|
543
|
+
__typename?: 'VehiclesPage';
|
|
544
|
+
data?: Array<{
|
|
545
|
+
__typename?: 'Vehicle';
|
|
546
|
+
id?: string | null;
|
|
547
|
+
vin: string;
|
|
548
|
+
} | null> | null;
|
|
549
|
+
meta?: {
|
|
550
|
+
__typename?: 'PageMeta';
|
|
551
|
+
limit?: number | null;
|
|
552
|
+
offset?: number | null;
|
|
553
|
+
total?: number | null;
|
|
554
|
+
} | null;
|
|
555
|
+
} | null;
|
|
556
|
+
};
|
|
485
557
|
type VehicleGroupsFilterQueryVariables = Exact$1<{
|
|
486
558
|
input: VehicleGroupsFilterInput;
|
|
487
559
|
}>;
|
|
@@ -536,10 +608,12 @@ declare function getOrganizationSdk(config: ElementPayOrganizationConfig): {
|
|
|
536
608
|
entityGetExternalId(variables?: EntityGetExternalIdQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<EntityGetExternalIdQuery>;
|
|
537
609
|
machineTokenizeUser(variables?: MachineTokenizeUserMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<MachineTokenizeUserMutation>;
|
|
538
610
|
userCreate(variables: UserCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserCreateMutation>;
|
|
611
|
+
userUpdate(variables: UserUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserUpdateMutation>;
|
|
539
612
|
vehicleGroupCreate(variables: VehicleGroupCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupCreateMutation>;
|
|
540
613
|
vehicleGroupDriversAdd(variables: VehicleGroupDriversAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupDriversAddMutation>;
|
|
541
614
|
vehicleGroupVehiclesAdd(variables: VehicleGroupVehiclesAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupVehiclesAddMutation>;
|
|
542
615
|
vehicleUpdate(variables: VehicleUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleUpdateMutation>;
|
|
616
|
+
vehiclesFilter(variables: VehiclesFilterQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehiclesFilterQuery>;
|
|
543
617
|
vehicleGroupsFilter(variables: VehicleGroupsFilterQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupsFilterQuery>;
|
|
544
618
|
vehiclesOnboard(variables: VehiclesOnboardMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehiclesOnboardMutation>;
|
|
545
619
|
};
|
|
@@ -734,6 +808,11 @@ interface RawService {
|
|
|
734
808
|
name: string;
|
|
735
809
|
};
|
|
736
810
|
}
|
|
811
|
+
interface RawAmenity {
|
|
812
|
+
id: string;
|
|
813
|
+
name: string;
|
|
814
|
+
description: string;
|
|
815
|
+
}
|
|
737
816
|
interface ServiceLocationFromEvent {
|
|
738
817
|
id: string;
|
|
739
818
|
provider_id: string;
|
|
@@ -751,7 +830,7 @@ interface ServiceLocationFromEvent {
|
|
|
751
830
|
lng: number;
|
|
752
831
|
lat: number;
|
|
753
832
|
};
|
|
754
|
-
amenities:
|
|
833
|
+
amenities: RawAmenity[] | null;
|
|
755
834
|
services: RawService[];
|
|
756
835
|
phone: string;
|
|
757
836
|
integration: string;
|
package/lib/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";import{decode as n}from"@msgpack/msgpack";import{FUEL_BRANDS as r}from"@autofleet/common-types/lib/pit-stop";const
|
|
1
|
+
import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";import{decode as n}from"@msgpack/msgpack";import{FUEL_BRANDS as r,FUEL_TYPES as i}from"@autofleet/common-types/lib/pit-stop";const a=t`
|
|
2
2
|
mutation apiKeyCreate($input: ApiKeyCreateInput!) {
|
|
3
3
|
apiKeyCreate(input: $input) {
|
|
4
4
|
apiKey
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,o=t`
|
|
8
8
|
mutation clientOnboard($input: ClientOnboardInput!) {
|
|
9
9
|
clientOnboard(input: $input) {
|
|
10
10
|
id
|
|
@@ -15,7 +15,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
15
15
|
deletedAt
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,s=t`
|
|
19
19
|
mutation organizationCreate($input: OrganizationCreateInput!) {
|
|
20
20
|
organizationCreate(input: $input) {
|
|
21
21
|
id
|
|
@@ -35,7 +35,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
35
35
|
deletedAt
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`,c=t`
|
|
39
39
|
mutation entityCreate($input: EntityCreateInput!) {
|
|
40
40
|
entityCreate(input: $input) {
|
|
41
41
|
id
|
|
@@ -49,7 +49,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
49
49
|
updatedAt
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,l=t`
|
|
53
53
|
query entityGetExternalId($externalId: String) {
|
|
54
54
|
entity(externalId: $externalId) {
|
|
55
55
|
id
|
|
@@ -90,14 +90,14 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,u=t`
|
|
94
94
|
mutation machineTokenizeUser($input: MachineTokenizeUserInput) {
|
|
95
95
|
machineTokenizeUser(input: $input) {
|
|
96
96
|
access_token
|
|
97
97
|
expires_in
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
`,
|
|
100
|
+
`,d=t`
|
|
101
101
|
mutation userCreate($input: UserCreateInput!) {
|
|
102
102
|
userCreate(input: $input) {
|
|
103
103
|
id
|
|
@@ -117,7 +117,20 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
117
117
|
updatedAt
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,f=t`
|
|
121
|
+
mutation userUpdate($input: UserUpdateInput!) {
|
|
122
|
+
userUpdate(input: $input) {
|
|
123
|
+
id
|
|
124
|
+
firstName
|
|
125
|
+
lastName
|
|
126
|
+
email
|
|
127
|
+
phoneNumber
|
|
128
|
+
employeeId
|
|
129
|
+
role
|
|
130
|
+
status
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`,p=t`
|
|
121
134
|
mutation vehicleGroupCreate($input: VehicleGroupCreateInput!) {
|
|
122
135
|
vehicleGroupCreate(input: $input) {
|
|
123
136
|
id
|
|
@@ -131,7 +144,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
131
144
|
updatedAt
|
|
132
145
|
}
|
|
133
146
|
}
|
|
134
|
-
`,
|
|
147
|
+
`,m=t`
|
|
135
148
|
mutation vehicleGroupDriversAdd($input: VehicleGroupDriversAddInput!) {
|
|
136
149
|
vehicleGroupDriversAdd(input: $input) {
|
|
137
150
|
id
|
|
@@ -144,7 +157,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
144
157
|
updatedAt
|
|
145
158
|
}
|
|
146
159
|
}
|
|
147
|
-
`,
|
|
160
|
+
`,h=t`
|
|
148
161
|
mutation vehicleGroupVehiclesAdd($input: VehicleGroupVehiclesAddInput!) {
|
|
149
162
|
vehicleGroupVehiclesAdd(input: $input) {
|
|
150
163
|
id
|
|
@@ -157,11 +170,25 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
157
170
|
updatedAt
|
|
158
171
|
}
|
|
159
172
|
}
|
|
160
|
-
`,
|
|
173
|
+
`,g=t`
|
|
161
174
|
mutation vehicleUpdate($input: VehicleUpdateInput!) {
|
|
162
175
|
vehicleUpdate(input: $input)
|
|
163
176
|
}
|
|
164
|
-
`,
|
|
177
|
+
`,_=t`
|
|
178
|
+
query vehiclesFilter($input: VehiclesFilterInput!) {
|
|
179
|
+
vehiclesFilter(input: $input) {
|
|
180
|
+
data {
|
|
181
|
+
id
|
|
182
|
+
vin
|
|
183
|
+
}
|
|
184
|
+
meta {
|
|
185
|
+
limit
|
|
186
|
+
offset
|
|
187
|
+
total
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
`,v=t`
|
|
165
192
|
query vehicleGroupsFilter($input: VehicleGroupsFilterInput!) {
|
|
166
193
|
vehicleGroupsFilter(input: $input) {
|
|
167
194
|
data {
|
|
@@ -177,7 +204,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
177
204
|
}
|
|
178
205
|
}
|
|
179
206
|
}
|
|
180
|
-
`,
|
|
207
|
+
`,y=t`
|
|
181
208
|
mutation vehiclesOnboard($input: VehiclesOnboardInputList!) {
|
|
182
209
|
vehiclesOnboard(input: $input) {
|
|
183
210
|
vehicles {
|
|
@@ -189,7 +216,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
189
216
|
}
|
|
190
217
|
}
|
|
191
218
|
}
|
|
192
|
-
`,
|
|
219
|
+
`,b=(e,t,n,r)=>e();function x(e,t=b){return{apiKeyCreate(n,r,i){return t(t=>e.request({document:a,variables:n,requestHeaders:{...r,...t},signal:i}),`apiKeyCreate`,`mutation`,n)},clientOnboard(n,r,i){return t(t=>e.request({document:o,variables:n,requestHeaders:{...r,...t},signal:i}),`clientOnboard`,`mutation`,n)},organizationCreate(n,r,i){return t(t=>e.request({document:s,variables:n,requestHeaders:{...r,...t},signal:i}),`organizationCreate`,`mutation`,n)},entityCreate(n,r,i){return t(t=>e.request({document:c,variables:n,requestHeaders:{...r,...t},signal:i}),`entityCreate`,`mutation`,n)},entityGetExternalId(n,r,i){return t(t=>e.request({document:l,variables:n,requestHeaders:{...r,...t},signal:i}),`entityGetExternalId`,`query`,n)},machineTokenizeUser(n,r,i){return t(t=>e.request({document:u,variables:n,requestHeaders:{...r,...t},signal:i}),`machineTokenizeUser`,`mutation`,n)},userCreate(n,r,i){return t(t=>e.request({document:d,variables:n,requestHeaders:{...r,...t},signal:i}),`userCreate`,`mutation`,n)},userUpdate(n,r,i){return t(t=>e.request({document:f,variables:n,requestHeaders:{...r,...t},signal:i}),`userUpdate`,`mutation`,n)},vehicleGroupCreate(n,r,i){return t(t=>e.request({document:p,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupCreate`,`mutation`,n)},vehicleGroupDriversAdd(n,r,i){return t(t=>e.request({document:m,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupDriversAdd`,`mutation`,n)},vehicleGroupVehiclesAdd(n,r,i){return t(t=>e.request({document:h,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupVehiclesAdd`,`mutation`,n)},vehicleUpdate(n,r,i){return t(t=>e.request({document:g,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleUpdate`,`mutation`,n)},vehiclesFilter(n,r,i){return t(t=>e.request({document:_,variables:n,requestHeaders:{...r,...t},signal:i}),`vehiclesFilter`,`query`,n)},vehicleGroupsFilter(n,r,i){return t(t=>e.request({document:v,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupsFilter`,`query`,n)},vehiclesOnboard(n,r,i){return t(t=>e.request({document:y,variables:n,requestHeaders:{...r,...t},signal:i}),`vehiclesOnboard`,`mutation`,n)}}}const S={int:`https://api-gateway.int.gocariq.com/`,stage:`https://api-gateway.stage.gocariq.com/`};function C(t){let n=t.environment??`stage`;return x(new e(t.endpoint??S[n],{headers:{"x-api-key":t.apiKey,"Content-Type":`application/json`}}))}const w=t`
|
|
193
220
|
mutation provisionCard($input: ProvisionCardInput!) {
|
|
194
221
|
provisionCard(input: $input) {
|
|
195
222
|
encryptedData
|
|
@@ -200,20 +227,20 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
200
227
|
cardNetwork
|
|
201
228
|
}
|
|
202
229
|
}
|
|
203
|
-
`,
|
|
230
|
+
`,T=t`
|
|
204
231
|
mutation provisionStatusUpdate($input: ProvisionStatusUpdateInput!) {
|
|
205
232
|
provisionStatusUpdate(input: $input) {
|
|
206
233
|
success
|
|
207
234
|
}
|
|
208
235
|
}
|
|
209
|
-
`,
|
|
236
|
+
`,E=t`
|
|
210
237
|
mutation servicePay($input: ServicePayInput!) {
|
|
211
238
|
servicePay(input: $input) {
|
|
212
239
|
requestId
|
|
213
240
|
transactionId
|
|
214
241
|
}
|
|
215
242
|
}
|
|
216
|
-
`,
|
|
243
|
+
`,D=t`
|
|
217
244
|
mutation ttpTokenization($input: TtpTokenizationInput!) {
|
|
218
245
|
ttpTokenization(input: $input) {
|
|
219
246
|
requestId
|
|
@@ -232,5 +259,5 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
232
259
|
cardFlag
|
|
233
260
|
}
|
|
234
261
|
}
|
|
235
|
-
`,
|
|
262
|
+
`,O=(e,t,n,r)=>e();function k(e,t=O){return{provisionCard(n,r,i){return t(t=>e.request({document:w,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionCard`,`mutation`,n)},provisionStatusUpdate(n,r,i){return t(t=>e.request({document:T,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionStatusUpdate`,`mutation`,n)},servicePay(n,r,i){return t(t=>e.request({document:E,variables:n,requestHeaders:{...r,...t},signal:i}),`servicePay`,`mutation`,n)},ttpTokenization(n,r,i){return t(t=>e.request({document:D,variables:n,requestHeaders:{...r,...t},signal:i}),`ttpTokenization`,`mutation`,n)}}}function A(t){let n=t.environment??`stage`;return k(new e(t.endpoint??S[n],{headers:{Authorization:`Bearer ${t.accessToken}`,"Content-Type":`application/json`}}))}const j=e=>n(Buffer.from(e,`base64`)),M=e=>{let t=j(e);if(Buffer.isBuffer(t.ID)&&(t.ID=t.ID.toString(`hex`)),Buffer.isBuffer(t.ServiceLocation)){let e=t.ServiceLocation.toString(`utf8`);t.ServiceLocation=JSON.parse(e)}return t},N={EXXON:r.EXXONMOBIL,MOBIL:r.EXXONMOBIL,SHELL:r.SHELL,SUNOCO:r.SUNOCO},P={REGULAR:i.UNLEADED_REGULAR,MID_GRADE_UNLEADED:i.UNLEADED_PLUS,"MID GRADE UNLEADED":i.UNLEADED_PLUS,UNLEADED_PREMIUM:i.UNLEADED_PREMIUM,"UNLEADED PREMIUM":i.UNLEADED_PREMIUM,DIESEL:i.DIESEL_REGULAR,DIESEL_PREMIUM:i.DIESEL_PREMIUM,"DIESEL PREMIUM":i.DIESEL_PREMIUM,OTHER_FUEL:i.OTHER_FUEL,"OTHER FUEL":i.OTHER_FUEL,HI_FLOW_DIESEL:i.HI_FLOW_DIESEL,"HI-FLOW DIESEL":i.HI_FLOW_DIESEL},F=e=>e.reduce((e,t)=>{let n=P[t.name];return n&&(e[n]=`0.0`),e},{}),I=e=>(e??[]).map(({name:e,description:t})=>({name:e,description:t})),L=e=>Object.entries(e.ExternalIdMap??{}).find(([,t])=>t===e.PriceApiId)?.[0],R=({serviceLocationEvent:e})=>{let t=e.ServiceLocation,{address:n,geocoded:r,services:i,amenities:a}=t;return{acceptElementPay:!0,address:[n.line1,n.line2,n.city,n.state,n.zip].filter(Boolean).join(`, `),externalId:t.id,name:t.name,brandName:N[t.provider.name]||null,lat:r.lat,lng:r.lng,directPayEnabled:!t.out_of_network,ttpEnabled:t.ttp_enabled,isActive:t.enabled&&!t.deleted_at,typesPrices:F(i),amenities:I(a),priceSourceId:e.PriceApiId,priceSourceType:L(e)}},z=e=>R({serviceLocationEvent:M(e)});export{C as getOrganizationSdk,A as getUserSdk,z as serviceLocationPubSubMessageToFuelSupplier};
|
|
236
263
|
//# sourceMappingURL=index.js.map
|