@autofleet/element-pay 2.0.2 → 2.1.3
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 +31 -12
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +76 -2
- package/lib/index.d.ts +76 -2
- package/lib/index.js +38 -19
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.d.cts
CHANGED
|
@@ -57,19 +57,33 @@ type ApiKeyCreateInput = {
|
|
|
57
57
|
name: Scalars$1['String']['input'];
|
|
58
58
|
organizationId: Scalars$1['ID']['input'];
|
|
59
59
|
};
|
|
60
|
+
type CardCreateDataInput = {
|
|
61
|
+
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
62
|
+
embossing: EmbossingInput;
|
|
63
|
+
shippingAddress?: InputMaybe$1<AddressInput>;
|
|
64
|
+
vehicleId: Scalars$1['ID']['input'];
|
|
65
|
+
};
|
|
60
66
|
type ClientOnboardInput = {
|
|
61
67
|
address: AddressInput;
|
|
62
68
|
checkLocationOverride?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
63
69
|
costFactorEnabled?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
64
|
-
email
|
|
70
|
+
email: Scalars$1['String']['input'];
|
|
65
71
|
externalId: Scalars$1['String']['input'];
|
|
66
72
|
integratorId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
67
73
|
name: Scalars$1['String']['input'];
|
|
68
74
|
onboardedBy?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
75
|
+
phoneNumber: Scalars$1['String']['input'];
|
|
69
76
|
taxId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
70
77
|
unitsId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
71
78
|
useTspMetadata?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
72
79
|
};
|
|
80
|
+
type EmbossingInput = {
|
|
81
|
+
externalId: Scalars$1['String']['input'];
|
|
82
|
+
line1: Scalars$1['String']['input'];
|
|
83
|
+
line2: Scalars$1['String']['input'];
|
|
84
|
+
line3: Scalars$1['String']['input'];
|
|
85
|
+
maintenanceId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
86
|
+
};
|
|
73
87
|
type EntityCreateInput = {
|
|
74
88
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
75
89
|
externalId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
@@ -183,6 +197,21 @@ type SpendRestrictionsInput = {
|
|
|
183
197
|
noOfTransactions?: InputMaybe$1<Scalars$1['Int']['input']>;
|
|
184
198
|
predefinedRule?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
185
199
|
};
|
|
200
|
+
type SpendRuleDataInput = {
|
|
201
|
+
amount: Scalars$1['String']['input'];
|
|
202
|
+
count: Scalars$1['Int']['input'];
|
|
203
|
+
};
|
|
204
|
+
type SpendRulesInput = {
|
|
205
|
+
daily?: InputMaybe$1<SpendRuleDataInput>;
|
|
206
|
+
monthly?: InputMaybe$1<SpendRuleDataInput>;
|
|
207
|
+
weekly?: InputMaybe$1<SpendRuleDataInput>;
|
|
208
|
+
yearly?: InputMaybe$1<SpendRuleDataInput>;
|
|
209
|
+
};
|
|
210
|
+
type StandaloneCardCreateInput = {
|
|
211
|
+
cards: Array<CardCreateDataInput>;
|
|
212
|
+
entityId: Scalars$1['ID']['input'];
|
|
213
|
+
spendRules?: InputMaybe$1<SpendRulesInput>;
|
|
214
|
+
};
|
|
186
215
|
type UserCreateInput = {
|
|
187
216
|
additionalInfo?: InputMaybe$1<AdditionalInfoInput>;
|
|
188
217
|
email?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
@@ -204,6 +233,17 @@ declare enum UserStatus {
|
|
|
204
233
|
Onboarded = "ONBOARDED",
|
|
205
234
|
Unknown = "UNKNOWN",
|
|
206
235
|
}
|
|
236
|
+
type UserUpdateInput = {
|
|
237
|
+
additionalInfo?: InputMaybe$1<AdditionalInfoInput>;
|
|
238
|
+
email?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
239
|
+
employeeId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
240
|
+
firstName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
241
|
+
id: Scalars$1['ID']['input'];
|
|
242
|
+
lastName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
243
|
+
loginType?: InputMaybe$1<LoginType>;
|
|
244
|
+
phoneNumber?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
245
|
+
role: RoleType;
|
|
246
|
+
};
|
|
207
247
|
type VehicleGroupCreateInput = {
|
|
208
248
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
209
249
|
driverEnteredOdometerEnabled?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
@@ -421,6 +461,16 @@ type MachineTokenizeUserMutation = {
|
|
|
421
461
|
expires_in: number;
|
|
422
462
|
} | null;
|
|
423
463
|
};
|
|
464
|
+
type StandaloneCardCreateMutationVariables = Exact$1<{
|
|
465
|
+
input: StandaloneCardCreateInput;
|
|
466
|
+
}>;
|
|
467
|
+
type StandaloneCardCreateMutation = {
|
|
468
|
+
__typename?: 'Mutation';
|
|
469
|
+
standaloneCardCreate: {
|
|
470
|
+
__typename?: 'BooleanSuccessOutput';
|
|
471
|
+
success: boolean;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
424
474
|
type UserCreateMutationVariables = Exact$1<{
|
|
425
475
|
input: UserCreateInput;
|
|
426
476
|
}>;
|
|
@@ -445,6 +495,23 @@ type UserCreateMutation = {
|
|
|
445
495
|
updatedAt?: string | null;
|
|
446
496
|
} | null;
|
|
447
497
|
};
|
|
498
|
+
type UserUpdateMutationVariables = Exact$1<{
|
|
499
|
+
input: UserUpdateInput;
|
|
500
|
+
}>;
|
|
501
|
+
type UserUpdateMutation = {
|
|
502
|
+
__typename?: 'Mutation';
|
|
503
|
+
userUpdate?: {
|
|
504
|
+
__typename?: 'User';
|
|
505
|
+
id?: string | null;
|
|
506
|
+
firstName?: string | null;
|
|
507
|
+
lastName?: string | null;
|
|
508
|
+
email?: string | null;
|
|
509
|
+
phoneNumber?: string | null;
|
|
510
|
+
employeeId?: string | null;
|
|
511
|
+
role?: RoleType | null;
|
|
512
|
+
status?: UserStatus | null;
|
|
513
|
+
} | null;
|
|
514
|
+
};
|
|
448
515
|
type VehicleGroupCreateMutationVariables = Exact$1<{
|
|
449
516
|
input: VehicleGroupCreateInput;
|
|
450
517
|
}>;
|
|
@@ -577,7 +644,9 @@ declare function getOrganizationSdk(config: ElementPayOrganizationConfig): {
|
|
|
577
644
|
entityCreate(variables: EntityCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<EntityCreateMutation>;
|
|
578
645
|
entityGetExternalId(variables?: EntityGetExternalIdQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<EntityGetExternalIdQuery>;
|
|
579
646
|
machineTokenizeUser(variables?: MachineTokenizeUserMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<MachineTokenizeUserMutation>;
|
|
647
|
+
standaloneCardCreate(variables: StandaloneCardCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<StandaloneCardCreateMutation>;
|
|
580
648
|
userCreate(variables: UserCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserCreateMutation>;
|
|
649
|
+
userUpdate(variables: UserUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserUpdateMutation>;
|
|
581
650
|
vehicleGroupCreate(variables: VehicleGroupCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupCreateMutation>;
|
|
582
651
|
vehicleGroupDriversAdd(variables: VehicleGroupDriversAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupDriversAddMutation>;
|
|
583
652
|
vehicleGroupVehiclesAdd(variables: VehicleGroupVehiclesAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupVehiclesAddMutation>;
|
|
@@ -777,6 +846,11 @@ interface RawService {
|
|
|
777
846
|
name: string;
|
|
778
847
|
};
|
|
779
848
|
}
|
|
849
|
+
interface RawAmenity {
|
|
850
|
+
id: string;
|
|
851
|
+
name: string;
|
|
852
|
+
description: string;
|
|
853
|
+
}
|
|
780
854
|
interface ServiceLocationFromEvent {
|
|
781
855
|
id: string;
|
|
782
856
|
provider_id: string;
|
|
@@ -794,7 +868,7 @@ interface ServiceLocationFromEvent {
|
|
|
794
868
|
lng: number;
|
|
795
869
|
lat: number;
|
|
796
870
|
};
|
|
797
|
-
amenities:
|
|
871
|
+
amenities: RawAmenity[] | null;
|
|
798
872
|
services: RawService[];
|
|
799
873
|
phone: string;
|
|
800
874
|
integration: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -58,19 +58,33 @@ type ApiKeyCreateInput = {
|
|
|
58
58
|
name: Scalars$1['String']['input'];
|
|
59
59
|
organizationId: Scalars$1['ID']['input'];
|
|
60
60
|
};
|
|
61
|
+
type CardCreateDataInput = {
|
|
62
|
+
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
63
|
+
embossing: EmbossingInput;
|
|
64
|
+
shippingAddress?: InputMaybe$1<AddressInput>;
|
|
65
|
+
vehicleId: Scalars$1['ID']['input'];
|
|
66
|
+
};
|
|
61
67
|
type ClientOnboardInput = {
|
|
62
68
|
address: AddressInput;
|
|
63
69
|
checkLocationOverride?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
64
70
|
costFactorEnabled?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
65
|
-
email
|
|
71
|
+
email: Scalars$1['String']['input'];
|
|
66
72
|
externalId: Scalars$1['String']['input'];
|
|
67
73
|
integratorId?: InputMaybe$1<Scalars$1['ID']['input']>;
|
|
68
74
|
name: Scalars$1['String']['input'];
|
|
69
75
|
onboardedBy?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
76
|
+
phoneNumber: Scalars$1['String']['input'];
|
|
70
77
|
taxId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
71
78
|
unitsId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
72
79
|
useTspMetadata?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
73
80
|
};
|
|
81
|
+
type EmbossingInput = {
|
|
82
|
+
externalId: Scalars$1['String']['input'];
|
|
83
|
+
line1: Scalars$1['String']['input'];
|
|
84
|
+
line2: Scalars$1['String']['input'];
|
|
85
|
+
line3: Scalars$1['String']['input'];
|
|
86
|
+
maintenanceId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
87
|
+
};
|
|
74
88
|
type EntityCreateInput = {
|
|
75
89
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
76
90
|
externalId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
@@ -184,6 +198,21 @@ type SpendRestrictionsInput = {
|
|
|
184
198
|
noOfTransactions?: InputMaybe$1<Scalars$1['Int']['input']>;
|
|
185
199
|
predefinedRule?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
186
200
|
};
|
|
201
|
+
type SpendRuleDataInput = {
|
|
202
|
+
amount: Scalars$1['String']['input'];
|
|
203
|
+
count: Scalars$1['Int']['input'];
|
|
204
|
+
};
|
|
205
|
+
type SpendRulesInput = {
|
|
206
|
+
daily?: InputMaybe$1<SpendRuleDataInput>;
|
|
207
|
+
monthly?: InputMaybe$1<SpendRuleDataInput>;
|
|
208
|
+
weekly?: InputMaybe$1<SpendRuleDataInput>;
|
|
209
|
+
yearly?: InputMaybe$1<SpendRuleDataInput>;
|
|
210
|
+
};
|
|
211
|
+
type StandaloneCardCreateInput = {
|
|
212
|
+
cards: Array<CardCreateDataInput>;
|
|
213
|
+
entityId: Scalars$1['ID']['input'];
|
|
214
|
+
spendRules?: InputMaybe$1<SpendRulesInput>;
|
|
215
|
+
};
|
|
187
216
|
type UserCreateInput = {
|
|
188
217
|
additionalInfo?: InputMaybe$1<AdditionalInfoInput>;
|
|
189
218
|
email?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
@@ -205,6 +234,17 @@ declare enum UserStatus {
|
|
|
205
234
|
Onboarded = "ONBOARDED",
|
|
206
235
|
Unknown = "UNKNOWN",
|
|
207
236
|
}
|
|
237
|
+
type UserUpdateInput = {
|
|
238
|
+
additionalInfo?: InputMaybe$1<AdditionalInfoInput>;
|
|
239
|
+
email?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
240
|
+
employeeId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
241
|
+
firstName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
242
|
+
id: Scalars$1['ID']['input'];
|
|
243
|
+
lastName?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
244
|
+
loginType?: InputMaybe$1<LoginType>;
|
|
245
|
+
phoneNumber?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
246
|
+
role: RoleType;
|
|
247
|
+
};
|
|
208
248
|
type VehicleGroupCreateInput = {
|
|
209
249
|
description?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
210
250
|
driverEnteredOdometerEnabled?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
@@ -422,6 +462,16 @@ type MachineTokenizeUserMutation = {
|
|
|
422
462
|
expires_in: number;
|
|
423
463
|
} | null;
|
|
424
464
|
};
|
|
465
|
+
type StandaloneCardCreateMutationVariables = Exact$1<{
|
|
466
|
+
input: StandaloneCardCreateInput;
|
|
467
|
+
}>;
|
|
468
|
+
type StandaloneCardCreateMutation = {
|
|
469
|
+
__typename?: 'Mutation';
|
|
470
|
+
standaloneCardCreate: {
|
|
471
|
+
__typename?: 'BooleanSuccessOutput';
|
|
472
|
+
success: boolean;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
425
475
|
type UserCreateMutationVariables = Exact$1<{
|
|
426
476
|
input: UserCreateInput;
|
|
427
477
|
}>;
|
|
@@ -446,6 +496,23 @@ type UserCreateMutation = {
|
|
|
446
496
|
updatedAt?: string | null;
|
|
447
497
|
} | null;
|
|
448
498
|
};
|
|
499
|
+
type UserUpdateMutationVariables = Exact$1<{
|
|
500
|
+
input: UserUpdateInput;
|
|
501
|
+
}>;
|
|
502
|
+
type UserUpdateMutation = {
|
|
503
|
+
__typename?: 'Mutation';
|
|
504
|
+
userUpdate?: {
|
|
505
|
+
__typename?: 'User';
|
|
506
|
+
id?: string | null;
|
|
507
|
+
firstName?: string | null;
|
|
508
|
+
lastName?: string | null;
|
|
509
|
+
email?: string | null;
|
|
510
|
+
phoneNumber?: string | null;
|
|
511
|
+
employeeId?: string | null;
|
|
512
|
+
role?: RoleType | null;
|
|
513
|
+
status?: UserStatus | null;
|
|
514
|
+
} | null;
|
|
515
|
+
};
|
|
449
516
|
type VehicleGroupCreateMutationVariables = Exact$1<{
|
|
450
517
|
input: VehicleGroupCreateInput;
|
|
451
518
|
}>;
|
|
@@ -578,7 +645,9 @@ declare function getOrganizationSdk(config: ElementPayOrganizationConfig): {
|
|
|
578
645
|
entityCreate(variables: EntityCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<EntityCreateMutation>;
|
|
579
646
|
entityGetExternalId(variables?: EntityGetExternalIdQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<EntityGetExternalIdQuery>;
|
|
580
647
|
machineTokenizeUser(variables?: MachineTokenizeUserMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<MachineTokenizeUserMutation>;
|
|
648
|
+
standaloneCardCreate(variables: StandaloneCardCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<StandaloneCardCreateMutation>;
|
|
581
649
|
userCreate(variables: UserCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserCreateMutation>;
|
|
650
|
+
userUpdate(variables: UserUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<UserUpdateMutation>;
|
|
582
651
|
vehicleGroupCreate(variables: VehicleGroupCreateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupCreateMutation>;
|
|
583
652
|
vehicleGroupDriversAdd(variables: VehicleGroupDriversAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupDriversAddMutation>;
|
|
584
653
|
vehicleGroupVehiclesAdd(variables: VehicleGroupVehiclesAddMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<VehicleGroupVehiclesAddMutation>;
|
|
@@ -778,6 +847,11 @@ interface RawService {
|
|
|
778
847
|
name: string;
|
|
779
848
|
};
|
|
780
849
|
}
|
|
850
|
+
interface RawAmenity {
|
|
851
|
+
id: string;
|
|
852
|
+
name: string;
|
|
853
|
+
description: string;
|
|
854
|
+
}
|
|
781
855
|
interface ServiceLocationFromEvent {
|
|
782
856
|
id: string;
|
|
783
857
|
provider_id: string;
|
|
@@ -795,7 +869,7 @@ interface ServiceLocationFromEvent {
|
|
|
795
869
|
lng: number;
|
|
796
870
|
lat: number;
|
|
797
871
|
};
|
|
798
|
-
amenities:
|
|
872
|
+
amenities: RawAmenity[] | null;
|
|
799
873
|
services: RawService[];
|
|
800
874
|
phone: string;
|
|
801
875
|
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,20 @@ 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
|
+
mutation standaloneCardCreate($input: StandaloneCardCreateInput!) {
|
|
102
|
+
standaloneCardCreate(input: $input) {
|
|
103
|
+
success
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`,f=t`
|
|
101
107
|
mutation userCreate($input: UserCreateInput!) {
|
|
102
108
|
userCreate(input: $input) {
|
|
103
109
|
id
|
|
@@ -117,7 +123,20 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
117
123
|
updatedAt
|
|
118
124
|
}
|
|
119
125
|
}
|
|
120
|
-
`,
|
|
126
|
+
`,p=t`
|
|
127
|
+
mutation userUpdate($input: UserUpdateInput!) {
|
|
128
|
+
userUpdate(input: $input) {
|
|
129
|
+
id
|
|
130
|
+
firstName
|
|
131
|
+
lastName
|
|
132
|
+
email
|
|
133
|
+
phoneNumber
|
|
134
|
+
employeeId
|
|
135
|
+
role
|
|
136
|
+
status
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`,m=t`
|
|
121
140
|
mutation vehicleGroupCreate($input: VehicleGroupCreateInput!) {
|
|
122
141
|
vehicleGroupCreate(input: $input) {
|
|
123
142
|
id
|
|
@@ -131,7 +150,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
131
150
|
updatedAt
|
|
132
151
|
}
|
|
133
152
|
}
|
|
134
|
-
`,
|
|
153
|
+
`,h=t`
|
|
135
154
|
mutation vehicleGroupDriversAdd($input: VehicleGroupDriversAddInput!) {
|
|
136
155
|
vehicleGroupDriversAdd(input: $input) {
|
|
137
156
|
id
|
|
@@ -144,7 +163,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
144
163
|
updatedAt
|
|
145
164
|
}
|
|
146
165
|
}
|
|
147
|
-
`,
|
|
166
|
+
`,g=t`
|
|
148
167
|
mutation vehicleGroupVehiclesAdd($input: VehicleGroupVehiclesAddInput!) {
|
|
149
168
|
vehicleGroupVehiclesAdd(input: $input) {
|
|
150
169
|
id
|
|
@@ -157,11 +176,11 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
157
176
|
updatedAt
|
|
158
177
|
}
|
|
159
178
|
}
|
|
160
|
-
`,
|
|
179
|
+
`,_=t`
|
|
161
180
|
mutation vehicleUpdate($input: VehicleUpdateInput!) {
|
|
162
181
|
vehicleUpdate(input: $input)
|
|
163
182
|
}
|
|
164
|
-
`,
|
|
183
|
+
`,v=t`
|
|
165
184
|
query vehiclesFilter($input: VehiclesFilterInput!) {
|
|
166
185
|
vehiclesFilter(input: $input) {
|
|
167
186
|
data {
|
|
@@ -175,7 +194,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
175
194
|
}
|
|
176
195
|
}
|
|
177
196
|
}
|
|
178
|
-
`,
|
|
197
|
+
`,y=t`
|
|
179
198
|
query vehicleGroupsFilter($input: VehicleGroupsFilterInput!) {
|
|
180
199
|
vehicleGroupsFilter(input: $input) {
|
|
181
200
|
data {
|
|
@@ -191,7 +210,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
191
210
|
}
|
|
192
211
|
}
|
|
193
212
|
}
|
|
194
|
-
`,
|
|
213
|
+
`,b=t`
|
|
195
214
|
mutation vehiclesOnboard($input: VehiclesOnboardInputList!) {
|
|
196
215
|
vehiclesOnboard(input: $input) {
|
|
197
216
|
vehicles {
|
|
@@ -203,7 +222,7 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
203
222
|
}
|
|
204
223
|
}
|
|
205
224
|
}
|
|
206
|
-
`,
|
|
225
|
+
`,x=(e,t,n,r)=>e();function S(e,t=x){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)},standaloneCardCreate(n,r,i){return t(t=>e.request({document:d,variables:n,requestHeaders:{...r,...t},signal:i}),`standaloneCardCreate`,`mutation`,n)},userCreate(n,r,i){return t(t=>e.request({document:f,variables:n,requestHeaders:{...r,...t},signal:i}),`userCreate`,`mutation`,n)},userUpdate(n,r,i){return t(t=>e.request({document:p,variables:n,requestHeaders:{...r,...t},signal:i}),`userUpdate`,`mutation`,n)},vehicleGroupCreate(n,r,i){return t(t=>e.request({document:m,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupCreate`,`mutation`,n)},vehicleGroupDriversAdd(n,r,i){return t(t=>e.request({document:h,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupDriversAdd`,`mutation`,n)},vehicleGroupVehiclesAdd(n,r,i){return t(t=>e.request({document:g,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupVehiclesAdd`,`mutation`,n)},vehicleUpdate(n,r,i){return t(t=>e.request({document:_,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleUpdate`,`mutation`,n)},vehiclesFilter(n,r,i){return t(t=>e.request({document:v,variables:n,requestHeaders:{...r,...t},signal:i}),`vehiclesFilter`,`query`,n)},vehicleGroupsFilter(n,r,i){return t(t=>e.request({document:y,variables:n,requestHeaders:{...r,...t},signal:i}),`vehicleGroupsFilter`,`query`,n)},vehiclesOnboard(n,r,i){return t(t=>e.request({document:b,variables:n,requestHeaders:{...r,...t},signal:i}),`vehiclesOnboard`,`mutation`,n)}}}const C={int:`https://api-gateway.int.gocariq.com/`,stage:`https://api-gateway.stage.gocariq.com/`};function w(t){let n=t.environment??`stage`;return S(new e(t.endpoint??C[n],{headers:{"x-api-key":t.apiKey,"Content-Type":`application/json`}}))}const T=t`
|
|
207
226
|
mutation provisionCard($input: ProvisionCardInput!) {
|
|
208
227
|
provisionCard(input: $input) {
|
|
209
228
|
encryptedData
|
|
@@ -214,20 +233,20 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
214
233
|
cardNetwork
|
|
215
234
|
}
|
|
216
235
|
}
|
|
217
|
-
`,
|
|
236
|
+
`,E=t`
|
|
218
237
|
mutation provisionStatusUpdate($input: ProvisionStatusUpdateInput!) {
|
|
219
238
|
provisionStatusUpdate(input: $input) {
|
|
220
239
|
success
|
|
221
240
|
}
|
|
222
241
|
}
|
|
223
|
-
`,
|
|
242
|
+
`,D=t`
|
|
224
243
|
mutation servicePay($input: ServicePayInput!) {
|
|
225
244
|
servicePay(input: $input) {
|
|
226
245
|
requestId
|
|
227
246
|
transactionId
|
|
228
247
|
}
|
|
229
248
|
}
|
|
230
|
-
`,
|
|
249
|
+
`,O=t`
|
|
231
250
|
mutation ttpTokenization($input: TtpTokenizationInput!) {
|
|
232
251
|
ttpTokenization(input: $input) {
|
|
233
252
|
requestId
|
|
@@ -246,5 +265,5 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
246
265
|
cardFlag
|
|
247
266
|
}
|
|
248
267
|
}
|
|
249
|
-
`,
|
|
268
|
+
`,k=(e,t,n,r)=>e();function A(e,t=k){return{provisionCard(n,r,i){return t(t=>e.request({document:T,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionCard`,`mutation`,n)},provisionStatusUpdate(n,r,i){return t(t=>e.request({document:E,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionStatusUpdate`,`mutation`,n)},servicePay(n,r,i){return t(t=>e.request({document:D,variables:n,requestHeaders:{...r,...t},signal:i}),`servicePay`,`mutation`,n)},ttpTokenization(n,r,i){return t(t=>e.request({document:O,variables:n,requestHeaders:{...r,...t},signal:i}),`ttpTokenization`,`mutation`,n)}}}function j(t){let n=t.environment??`stage`;return A(new e(t.endpoint??C[n],{headers:{Authorization:`Bearer ${t.accessToken}`,"Content-Type":`application/json`}}))}const M=e=>n(Buffer.from(e,`base64`)),N=e=>{let t=M(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},P={EXXON:r.EXXONMOBIL,MOBIL:r.EXXONMOBIL,SHELL:r.SHELL,SUNOCO:r.SUNOCO},F={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},I=e=>e.reduce((e,t)=>{let n=F[t.name];return n&&(e[n]=`0.0`),e},{}),L=e=>(e??[]).map(({name:e,description:t})=>({name:e,description:t})),R=e=>Object.entries(e.ExternalIdMap??{}).find(([,t])=>t===e.PriceApiId)?.[0],z=({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:P[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:I(i),amenities:L(a),priceSourceId:e.PriceApiId,priceSourceType:R(e)}},B=e=>z({serviceLocationEvent:N(e)});export{w as getOrganizationSdk,j as getUserSdk,B as serviceLocationPubSubMessageToFuelSupplier};
|
|
250
269
|
//# sourceMappingURL=index.js.map
|