@autofleet/element-pay 2.1.4 → 2.1.6
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 +122 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +203 -6
- package/lib/index.d.ts +203 -6
- package/lib/index.js +122 -1
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.d.cts
CHANGED
|
@@ -141,7 +141,7 @@ type OrganizationCreateInput = {
|
|
|
141
141
|
unitsId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
142
142
|
useTspMetadata?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
143
143
|
};
|
|
144
|
-
type PageRequest = {
|
|
144
|
+
type PageRequest$1 = {
|
|
145
145
|
limit?: InputMaybe$1<Scalars$1['Int']['input']>;
|
|
146
146
|
offset?: InputMaybe$1<Scalars$1['Int']['input']>;
|
|
147
147
|
};
|
|
@@ -165,7 +165,7 @@ declare enum RoleType {
|
|
|
165
165
|
Manager = "MANAGER",
|
|
166
166
|
ViewOnly = "VIEW_ONLY",
|
|
167
167
|
}
|
|
168
|
-
declare enum SortDirection {
|
|
168
|
+
declare enum SortDirection$1 {
|
|
169
169
|
Asc = "ASC",
|
|
170
170
|
AscNullsFirst = "ASC_NULLS_FIRST",
|
|
171
171
|
AscNullsLast = "ASC_NULLS_LAST",
|
|
@@ -277,7 +277,7 @@ type VehicleGroupVehiclesRemoveInput = {
|
|
|
277
277
|
};
|
|
278
278
|
type VehicleGroupsFilterInput = {
|
|
279
279
|
filter: VehicleGroupsFilterOptions;
|
|
280
|
-
page: PageRequest;
|
|
280
|
+
page: PageRequest$1;
|
|
281
281
|
sortOptions?: InputMaybe$1<VehicleGroupsSortOptions>;
|
|
282
282
|
};
|
|
283
283
|
type VehicleGroupsFilterOptions = {
|
|
@@ -294,7 +294,7 @@ declare enum VehicleGroupsSortField {
|
|
|
294
294
|
VehicleCount = "VEHICLE_COUNT",
|
|
295
295
|
}
|
|
296
296
|
type VehicleGroupsSortOptions = {
|
|
297
|
-
direction: SortDirection;
|
|
297
|
+
direction: SortDirection$1;
|
|
298
298
|
orderBy: VehicleGroupsSortField;
|
|
299
299
|
};
|
|
300
300
|
type VehicleUpdateInput = {
|
|
@@ -307,7 +307,7 @@ type VehicleUpdateInput = {
|
|
|
307
307
|
};
|
|
308
308
|
type VehiclesFilterInput = {
|
|
309
309
|
filter: VehiclesFilterOptions;
|
|
310
|
-
page?: InputMaybe$1<PageRequest>;
|
|
310
|
+
page?: InputMaybe$1<PageRequest$1>;
|
|
311
311
|
sortOptions?: InputMaybe$1<VehiclesSortOptions>;
|
|
312
312
|
};
|
|
313
313
|
type VehiclesFilterOptions = {
|
|
@@ -338,7 +338,7 @@ declare enum VehiclesSortField {
|
|
|
338
338
|
Number = "NUMBER",
|
|
339
339
|
}
|
|
340
340
|
type VehiclesSortOptions = {
|
|
341
|
-
direction: SortDirection;
|
|
341
|
+
direction: SortDirection$1;
|
|
342
342
|
orderBy: VehiclesSortField;
|
|
343
343
|
};
|
|
344
344
|
type ApiKeyCreateMutationVariables = Exact$1<{
|
|
@@ -760,6 +760,10 @@ declare enum DigitalWallet {
|
|
|
760
760
|
DigitalWalletAndroid = "DIGITAL_WALLET_ANDROID",
|
|
761
761
|
DigitalWalletApple = "DIGITAL_WALLET_APPLE",
|
|
762
762
|
}
|
|
763
|
+
type PageRequest = {
|
|
764
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
765
|
+
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
766
|
+
};
|
|
763
767
|
declare enum PaymentMethodType {
|
|
764
768
|
DirectConnect = "DIRECT_CONNECT",
|
|
765
769
|
LinkedCard = "LINKED_CARD",
|
|
@@ -806,6 +810,66 @@ type ServicePayInput = {
|
|
|
806
810
|
requestId: Scalars['ID']['input'];
|
|
807
811
|
vehicleId: Scalars['ID']['input'];
|
|
808
812
|
};
|
|
813
|
+
declare enum ServiceType {
|
|
814
|
+
Fees = "FEES",
|
|
815
|
+
Fuel = "FUEL",
|
|
816
|
+
Maintenance = "MAINTENANCE",
|
|
817
|
+
Parking = "PARKING",
|
|
818
|
+
Toll = "TOLL",
|
|
819
|
+
UnknownService = "UNKNOWN_SERVICE",
|
|
820
|
+
}
|
|
821
|
+
declare enum SortDirection {
|
|
822
|
+
Asc = "ASC",
|
|
823
|
+
AscNullsFirst = "ASC_NULLS_FIRST",
|
|
824
|
+
AscNullsLast = "ASC_NULLS_LAST",
|
|
825
|
+
Desc = "DESC",
|
|
826
|
+
DescNullsFirst = "DESC_NULLS_FIRST",
|
|
827
|
+
DescNullsLast = "DESC_NULLS_LAST",
|
|
828
|
+
}
|
|
829
|
+
type TransactionFilterAdditionalOptions = {
|
|
830
|
+
generatePdfReceipt?: InputMaybe<Scalars['Boolean']['input']>;
|
|
831
|
+
};
|
|
832
|
+
declare enum TransactionSortField {
|
|
833
|
+
Amount = "AMOUNT",
|
|
834
|
+
DriverName = "DRIVER_NAME",
|
|
835
|
+
LocalTime = "LOCAL_TIME",
|
|
836
|
+
Time = "TIME",
|
|
837
|
+
VehicleDescription = "VEHICLE_DESCRIPTION",
|
|
838
|
+
VehicleName = "VEHICLE_NAME",
|
|
839
|
+
}
|
|
840
|
+
declare enum TransactionType {
|
|
841
|
+
Invoice = "INVOICE",
|
|
842
|
+
Realtime = "REALTIME",
|
|
843
|
+
UnknownType = "UNKNOWN_TYPE",
|
|
844
|
+
}
|
|
845
|
+
type TransactionsFilterInput = {
|
|
846
|
+
additionalOptions?: InputMaybe<TransactionFilterAdditionalOptions>;
|
|
847
|
+
filter: TransactionsFilterOptions;
|
|
848
|
+
page: PageRequest;
|
|
849
|
+
sortOptions?: InputMaybe<TransactionsSortOptions>;
|
|
850
|
+
};
|
|
851
|
+
type TransactionsFilterOptions = {
|
|
852
|
+
entityId?: InputMaybe<Scalars['ID']['input']>;
|
|
853
|
+
fromDate?: InputMaybe<Scalars['String']['input']>;
|
|
854
|
+
fromInsertedDate?: InputMaybe<Scalars['String']['input']>;
|
|
855
|
+
fromLocalDate?: InputMaybe<Scalars['String']['input']>;
|
|
856
|
+
serviceTypes?: InputMaybe<Array<InputMaybe<ServiceType>>>;
|
|
857
|
+
toDate?: InputMaybe<Scalars['String']['input']>;
|
|
858
|
+
toInsertedDate?: InputMaybe<Scalars['String']['input']>;
|
|
859
|
+
toLocalDate?: InputMaybe<Scalars['String']['input']>;
|
|
860
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
861
|
+
userIds?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
862
|
+
vehicleGroupExternalId?: InputMaybe<Scalars['ID']['input']>;
|
|
863
|
+
vehicleGroupId?: InputMaybe<Scalars['ID']['input']>;
|
|
864
|
+
vehicleGroupIds?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
865
|
+
vehicleId?: InputMaybe<Scalars['String']['input']>;
|
|
866
|
+
vehicleIds?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
867
|
+
vin?: InputMaybe<Scalars['String']['input']>;
|
|
868
|
+
};
|
|
869
|
+
type TransactionsSortOptions = {
|
|
870
|
+
direction: SortDirection;
|
|
871
|
+
orderBy: TransactionSortField;
|
|
872
|
+
};
|
|
809
873
|
type TtpTokenizationInput = {
|
|
810
874
|
deviceId: Scalars['String']['input'];
|
|
811
875
|
requestId?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -850,6 +914,138 @@ type ServicePayMutation = {
|
|
|
850
914
|
transactionId: string;
|
|
851
915
|
} | null;
|
|
852
916
|
};
|
|
917
|
+
type TransactionsFilterQueryVariables = Exact<{
|
|
918
|
+
input: TransactionsFilterInput;
|
|
919
|
+
}>;
|
|
920
|
+
type TransactionsFilterQuery = {
|
|
921
|
+
__typename?: 'Query';
|
|
922
|
+
transactionsFilter?: {
|
|
923
|
+
__typename?: 'TransactionsPage';
|
|
924
|
+
meta?: {
|
|
925
|
+
__typename?: 'PageMeta';
|
|
926
|
+
limit?: number | null;
|
|
927
|
+
offset?: number | null;
|
|
928
|
+
total?: number | null;
|
|
929
|
+
} | null;
|
|
930
|
+
data?: Array<{
|
|
931
|
+
__typename?: 'Transaction';
|
|
932
|
+
id: string;
|
|
933
|
+
transactionTime?: string | null;
|
|
934
|
+
pdfReceiptUrl?: string | null;
|
|
935
|
+
transactionNumber?: number | null;
|
|
936
|
+
type?: TransactionType | null;
|
|
937
|
+
insertedAt?: string | null;
|
|
938
|
+
updatedAt?: string | null;
|
|
939
|
+
localTime?: string | null;
|
|
940
|
+
subtotal?: string | null;
|
|
941
|
+
taxAmount?: string | null;
|
|
942
|
+
totalAmount?: string | null;
|
|
943
|
+
currency?: string | null;
|
|
944
|
+
location?: {
|
|
945
|
+
__typename?: 'ServiceLocation';
|
|
946
|
+
name: string;
|
|
947
|
+
id: string;
|
|
948
|
+
brand?: string | null;
|
|
949
|
+
address?: {
|
|
950
|
+
__typename?: 'Address';
|
|
951
|
+
line1?: string | null;
|
|
952
|
+
line2?: string | null;
|
|
953
|
+
city?: string | null;
|
|
954
|
+
state?: string | null;
|
|
955
|
+
country?: string | null;
|
|
956
|
+
zip?: string | null;
|
|
957
|
+
} | null;
|
|
958
|
+
position?: {
|
|
959
|
+
__typename?: 'Location';
|
|
960
|
+
latitude?: number | null;
|
|
961
|
+
longitude?: number | null;
|
|
962
|
+
} | null;
|
|
963
|
+
} | null;
|
|
964
|
+
additionalInfo?: {
|
|
965
|
+
__typename?: 'AdditionalTransactionInfo';
|
|
966
|
+
pumpNumber?: number | null;
|
|
967
|
+
jobCode?: string | null;
|
|
968
|
+
odometer?: number | null;
|
|
969
|
+
} | null;
|
|
970
|
+
vehicle?: {
|
|
971
|
+
__typename?: 'Vehicle';
|
|
972
|
+
id?: string | null;
|
|
973
|
+
vin: string;
|
|
974
|
+
location?: {
|
|
975
|
+
__typename?: 'VehicleLocation';
|
|
976
|
+
position?: {
|
|
977
|
+
__typename?: 'Location';
|
|
978
|
+
latitude?: number | null;
|
|
979
|
+
longitude?: number | null;
|
|
980
|
+
} | null;
|
|
981
|
+
} | null;
|
|
982
|
+
fuel?: {
|
|
983
|
+
__typename?: 'VehicleFuel';
|
|
984
|
+
percent?: number | null;
|
|
985
|
+
level?: number | null;
|
|
986
|
+
} | null;
|
|
987
|
+
type?: {
|
|
988
|
+
__typename?: 'VehicleType';
|
|
989
|
+
name?: string | null;
|
|
990
|
+
serialNumber?: string | null;
|
|
991
|
+
internalDescription?: string | null;
|
|
992
|
+
internalNumber?: string | null;
|
|
993
|
+
licensePlate?: string | null;
|
|
994
|
+
} | null;
|
|
995
|
+
details?: {
|
|
996
|
+
__typename?: 'VehicleDetails';
|
|
997
|
+
description?: string | null;
|
|
998
|
+
make?: string | null;
|
|
999
|
+
model?: string | null;
|
|
1000
|
+
year?: string | null;
|
|
1001
|
+
} | null;
|
|
1002
|
+
} | null;
|
|
1003
|
+
position?: {
|
|
1004
|
+
__typename?: 'Location';
|
|
1005
|
+
latitude?: number | null;
|
|
1006
|
+
longitude?: number | null;
|
|
1007
|
+
} | null;
|
|
1008
|
+
driver?: {
|
|
1009
|
+
__typename?: 'User';
|
|
1010
|
+
id?: string | null;
|
|
1011
|
+
externalId?: string | null;
|
|
1012
|
+
username?: string | null;
|
|
1013
|
+
email?: string | null;
|
|
1014
|
+
phoneNumber?: string | null;
|
|
1015
|
+
firstName?: string | null;
|
|
1016
|
+
middleName?: string | null;
|
|
1017
|
+
lastName?: string | null;
|
|
1018
|
+
fullName?: string | null;
|
|
1019
|
+
} | null;
|
|
1020
|
+
vehicleGroup?: {
|
|
1021
|
+
__typename?: 'VehicleGroup';
|
|
1022
|
+
id: string;
|
|
1023
|
+
name?: string | null;
|
|
1024
|
+
} | null;
|
|
1025
|
+
entity?: {
|
|
1026
|
+
__typename?: 'Entity';
|
|
1027
|
+
id: string;
|
|
1028
|
+
name?: string | null;
|
|
1029
|
+
} | null;
|
|
1030
|
+
items?: Array<{
|
|
1031
|
+
__typename?: 'TransactionItem';
|
|
1032
|
+
id?: string | null;
|
|
1033
|
+
serviceType?: ServiceType | null;
|
|
1034
|
+
line?: string | null;
|
|
1035
|
+
quantity?: string | null;
|
|
1036
|
+
name?: string | null;
|
|
1037
|
+
unitPrice?: string | null;
|
|
1038
|
+
units?: string | null;
|
|
1039
|
+
amount?: string | null;
|
|
1040
|
+
} | null> | null;
|
|
1041
|
+
statuses?: Array<{
|
|
1042
|
+
__typename?: 'TransactionStatus';
|
|
1043
|
+
id?: string | null;
|
|
1044
|
+
status?: string | null;
|
|
1045
|
+
} | null> | null;
|
|
1046
|
+
} | null> | null;
|
|
1047
|
+
} | null;
|
|
1048
|
+
};
|
|
853
1049
|
type TtpTokenizationMutationVariables = Exact<{
|
|
854
1050
|
input: TtpTokenizationInput;
|
|
855
1051
|
}>;
|
|
@@ -885,6 +1081,7 @@ declare function getUserSdk(config: ElementPayUserConfig): {
|
|
|
885
1081
|
provisionCard(variables: ProvisionCardMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<ProvisionCardMutation>;
|
|
886
1082
|
provisionStatusUpdate(variables: ProvisionStatusUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<ProvisionStatusUpdateMutation>;
|
|
887
1083
|
servicePay(variables: ServicePayMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<ServicePayMutation>;
|
|
1084
|
+
transactionsFilter(variables: TransactionsFilterQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<TransactionsFilterQuery>;
|
|
888
1085
|
ttpTokenization(variables: TtpTokenizationMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<TtpTokenizationMutation>;
|
|
889
1086
|
};
|
|
890
1087
|
//#endregion
|
package/lib/index.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ type OrganizationCreateInput = {
|
|
|
142
142
|
unitsId?: InputMaybe$1<Scalars$1['String']['input']>;
|
|
143
143
|
useTspMetadata?: InputMaybe$1<Scalars$1['Boolean']['input']>;
|
|
144
144
|
};
|
|
145
|
-
type PageRequest = {
|
|
145
|
+
type PageRequest$1 = {
|
|
146
146
|
limit?: InputMaybe$1<Scalars$1['Int']['input']>;
|
|
147
147
|
offset?: InputMaybe$1<Scalars$1['Int']['input']>;
|
|
148
148
|
};
|
|
@@ -166,7 +166,7 @@ declare enum RoleType {
|
|
|
166
166
|
Manager = "MANAGER",
|
|
167
167
|
ViewOnly = "VIEW_ONLY",
|
|
168
168
|
}
|
|
169
|
-
declare enum SortDirection {
|
|
169
|
+
declare enum SortDirection$1 {
|
|
170
170
|
Asc = "ASC",
|
|
171
171
|
AscNullsFirst = "ASC_NULLS_FIRST",
|
|
172
172
|
AscNullsLast = "ASC_NULLS_LAST",
|
|
@@ -278,7 +278,7 @@ type VehicleGroupVehiclesRemoveInput = {
|
|
|
278
278
|
};
|
|
279
279
|
type VehicleGroupsFilterInput = {
|
|
280
280
|
filter: VehicleGroupsFilterOptions;
|
|
281
|
-
page: PageRequest;
|
|
281
|
+
page: PageRequest$1;
|
|
282
282
|
sortOptions?: InputMaybe$1<VehicleGroupsSortOptions>;
|
|
283
283
|
};
|
|
284
284
|
type VehicleGroupsFilterOptions = {
|
|
@@ -295,7 +295,7 @@ declare enum VehicleGroupsSortField {
|
|
|
295
295
|
VehicleCount = "VEHICLE_COUNT",
|
|
296
296
|
}
|
|
297
297
|
type VehicleGroupsSortOptions = {
|
|
298
|
-
direction: SortDirection;
|
|
298
|
+
direction: SortDirection$1;
|
|
299
299
|
orderBy: VehicleGroupsSortField;
|
|
300
300
|
};
|
|
301
301
|
type VehicleUpdateInput = {
|
|
@@ -308,7 +308,7 @@ type VehicleUpdateInput = {
|
|
|
308
308
|
};
|
|
309
309
|
type VehiclesFilterInput = {
|
|
310
310
|
filter: VehiclesFilterOptions;
|
|
311
|
-
page?: InputMaybe$1<PageRequest>;
|
|
311
|
+
page?: InputMaybe$1<PageRequest$1>;
|
|
312
312
|
sortOptions?: InputMaybe$1<VehiclesSortOptions>;
|
|
313
313
|
};
|
|
314
314
|
type VehiclesFilterOptions = {
|
|
@@ -339,7 +339,7 @@ declare enum VehiclesSortField {
|
|
|
339
339
|
Number = "NUMBER",
|
|
340
340
|
}
|
|
341
341
|
type VehiclesSortOptions = {
|
|
342
|
-
direction: SortDirection;
|
|
342
|
+
direction: SortDirection$1;
|
|
343
343
|
orderBy: VehiclesSortField;
|
|
344
344
|
};
|
|
345
345
|
type ApiKeyCreateMutationVariables = Exact$1<{
|
|
@@ -761,6 +761,10 @@ declare enum DigitalWallet {
|
|
|
761
761
|
DigitalWalletAndroid = "DIGITAL_WALLET_ANDROID",
|
|
762
762
|
DigitalWalletApple = "DIGITAL_WALLET_APPLE",
|
|
763
763
|
}
|
|
764
|
+
type PageRequest = {
|
|
765
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
766
|
+
offset?: InputMaybe<Scalars['Int']['input']>;
|
|
767
|
+
};
|
|
764
768
|
declare enum PaymentMethodType {
|
|
765
769
|
DirectConnect = "DIRECT_CONNECT",
|
|
766
770
|
LinkedCard = "LINKED_CARD",
|
|
@@ -807,6 +811,66 @@ type ServicePayInput = {
|
|
|
807
811
|
requestId: Scalars['ID']['input'];
|
|
808
812
|
vehicleId: Scalars['ID']['input'];
|
|
809
813
|
};
|
|
814
|
+
declare enum ServiceType {
|
|
815
|
+
Fees = "FEES",
|
|
816
|
+
Fuel = "FUEL",
|
|
817
|
+
Maintenance = "MAINTENANCE",
|
|
818
|
+
Parking = "PARKING",
|
|
819
|
+
Toll = "TOLL",
|
|
820
|
+
UnknownService = "UNKNOWN_SERVICE",
|
|
821
|
+
}
|
|
822
|
+
declare enum SortDirection {
|
|
823
|
+
Asc = "ASC",
|
|
824
|
+
AscNullsFirst = "ASC_NULLS_FIRST",
|
|
825
|
+
AscNullsLast = "ASC_NULLS_LAST",
|
|
826
|
+
Desc = "DESC",
|
|
827
|
+
DescNullsFirst = "DESC_NULLS_FIRST",
|
|
828
|
+
DescNullsLast = "DESC_NULLS_LAST",
|
|
829
|
+
}
|
|
830
|
+
type TransactionFilterAdditionalOptions = {
|
|
831
|
+
generatePdfReceipt?: InputMaybe<Scalars['Boolean']['input']>;
|
|
832
|
+
};
|
|
833
|
+
declare enum TransactionSortField {
|
|
834
|
+
Amount = "AMOUNT",
|
|
835
|
+
DriverName = "DRIVER_NAME",
|
|
836
|
+
LocalTime = "LOCAL_TIME",
|
|
837
|
+
Time = "TIME",
|
|
838
|
+
VehicleDescription = "VEHICLE_DESCRIPTION",
|
|
839
|
+
VehicleName = "VEHICLE_NAME",
|
|
840
|
+
}
|
|
841
|
+
declare enum TransactionType {
|
|
842
|
+
Invoice = "INVOICE",
|
|
843
|
+
Realtime = "REALTIME",
|
|
844
|
+
UnknownType = "UNKNOWN_TYPE",
|
|
845
|
+
}
|
|
846
|
+
type TransactionsFilterInput = {
|
|
847
|
+
additionalOptions?: InputMaybe<TransactionFilterAdditionalOptions>;
|
|
848
|
+
filter: TransactionsFilterOptions;
|
|
849
|
+
page: PageRequest;
|
|
850
|
+
sortOptions?: InputMaybe<TransactionsSortOptions>;
|
|
851
|
+
};
|
|
852
|
+
type TransactionsFilterOptions = {
|
|
853
|
+
entityId?: InputMaybe<Scalars['ID']['input']>;
|
|
854
|
+
fromDate?: InputMaybe<Scalars['String']['input']>;
|
|
855
|
+
fromInsertedDate?: InputMaybe<Scalars['String']['input']>;
|
|
856
|
+
fromLocalDate?: InputMaybe<Scalars['String']['input']>;
|
|
857
|
+
serviceTypes?: InputMaybe<Array<InputMaybe<ServiceType>>>;
|
|
858
|
+
toDate?: InputMaybe<Scalars['String']['input']>;
|
|
859
|
+
toInsertedDate?: InputMaybe<Scalars['String']['input']>;
|
|
860
|
+
toLocalDate?: InputMaybe<Scalars['String']['input']>;
|
|
861
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
862
|
+
userIds?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
863
|
+
vehicleGroupExternalId?: InputMaybe<Scalars['ID']['input']>;
|
|
864
|
+
vehicleGroupId?: InputMaybe<Scalars['ID']['input']>;
|
|
865
|
+
vehicleGroupIds?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
866
|
+
vehicleId?: InputMaybe<Scalars['String']['input']>;
|
|
867
|
+
vehicleIds?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
868
|
+
vin?: InputMaybe<Scalars['String']['input']>;
|
|
869
|
+
};
|
|
870
|
+
type TransactionsSortOptions = {
|
|
871
|
+
direction: SortDirection;
|
|
872
|
+
orderBy: TransactionSortField;
|
|
873
|
+
};
|
|
810
874
|
type TtpTokenizationInput = {
|
|
811
875
|
deviceId: Scalars['String']['input'];
|
|
812
876
|
requestId?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -851,6 +915,138 @@ type ServicePayMutation = {
|
|
|
851
915
|
transactionId: string;
|
|
852
916
|
} | null;
|
|
853
917
|
};
|
|
918
|
+
type TransactionsFilterQueryVariables = Exact<{
|
|
919
|
+
input: TransactionsFilterInput;
|
|
920
|
+
}>;
|
|
921
|
+
type TransactionsFilterQuery = {
|
|
922
|
+
__typename?: 'Query';
|
|
923
|
+
transactionsFilter?: {
|
|
924
|
+
__typename?: 'TransactionsPage';
|
|
925
|
+
meta?: {
|
|
926
|
+
__typename?: 'PageMeta';
|
|
927
|
+
limit?: number | null;
|
|
928
|
+
offset?: number | null;
|
|
929
|
+
total?: number | null;
|
|
930
|
+
} | null;
|
|
931
|
+
data?: Array<{
|
|
932
|
+
__typename?: 'Transaction';
|
|
933
|
+
id: string;
|
|
934
|
+
transactionTime?: string | null;
|
|
935
|
+
pdfReceiptUrl?: string | null;
|
|
936
|
+
transactionNumber?: number | null;
|
|
937
|
+
type?: TransactionType | null;
|
|
938
|
+
insertedAt?: string | null;
|
|
939
|
+
updatedAt?: string | null;
|
|
940
|
+
localTime?: string | null;
|
|
941
|
+
subtotal?: string | null;
|
|
942
|
+
taxAmount?: string | null;
|
|
943
|
+
totalAmount?: string | null;
|
|
944
|
+
currency?: string | null;
|
|
945
|
+
location?: {
|
|
946
|
+
__typename?: 'ServiceLocation';
|
|
947
|
+
name: string;
|
|
948
|
+
id: string;
|
|
949
|
+
brand?: string | null;
|
|
950
|
+
address?: {
|
|
951
|
+
__typename?: 'Address';
|
|
952
|
+
line1?: string | null;
|
|
953
|
+
line2?: string | null;
|
|
954
|
+
city?: string | null;
|
|
955
|
+
state?: string | null;
|
|
956
|
+
country?: string | null;
|
|
957
|
+
zip?: string | null;
|
|
958
|
+
} | null;
|
|
959
|
+
position?: {
|
|
960
|
+
__typename?: 'Location';
|
|
961
|
+
latitude?: number | null;
|
|
962
|
+
longitude?: number | null;
|
|
963
|
+
} | null;
|
|
964
|
+
} | null;
|
|
965
|
+
additionalInfo?: {
|
|
966
|
+
__typename?: 'AdditionalTransactionInfo';
|
|
967
|
+
pumpNumber?: number | null;
|
|
968
|
+
jobCode?: string | null;
|
|
969
|
+
odometer?: number | null;
|
|
970
|
+
} | null;
|
|
971
|
+
vehicle?: {
|
|
972
|
+
__typename?: 'Vehicle';
|
|
973
|
+
id?: string | null;
|
|
974
|
+
vin: string;
|
|
975
|
+
location?: {
|
|
976
|
+
__typename?: 'VehicleLocation';
|
|
977
|
+
position?: {
|
|
978
|
+
__typename?: 'Location';
|
|
979
|
+
latitude?: number | null;
|
|
980
|
+
longitude?: number | null;
|
|
981
|
+
} | null;
|
|
982
|
+
} | null;
|
|
983
|
+
fuel?: {
|
|
984
|
+
__typename?: 'VehicleFuel';
|
|
985
|
+
percent?: number | null;
|
|
986
|
+
level?: number | null;
|
|
987
|
+
} | null;
|
|
988
|
+
type?: {
|
|
989
|
+
__typename?: 'VehicleType';
|
|
990
|
+
name?: string | null;
|
|
991
|
+
serialNumber?: string | null;
|
|
992
|
+
internalDescription?: string | null;
|
|
993
|
+
internalNumber?: string | null;
|
|
994
|
+
licensePlate?: string | null;
|
|
995
|
+
} | null;
|
|
996
|
+
details?: {
|
|
997
|
+
__typename?: 'VehicleDetails';
|
|
998
|
+
description?: string | null;
|
|
999
|
+
make?: string | null;
|
|
1000
|
+
model?: string | null;
|
|
1001
|
+
year?: string | null;
|
|
1002
|
+
} | null;
|
|
1003
|
+
} | null;
|
|
1004
|
+
position?: {
|
|
1005
|
+
__typename?: 'Location';
|
|
1006
|
+
latitude?: number | null;
|
|
1007
|
+
longitude?: number | null;
|
|
1008
|
+
} | null;
|
|
1009
|
+
driver?: {
|
|
1010
|
+
__typename?: 'User';
|
|
1011
|
+
id?: string | null;
|
|
1012
|
+
externalId?: string | null;
|
|
1013
|
+
username?: string | null;
|
|
1014
|
+
email?: string | null;
|
|
1015
|
+
phoneNumber?: string | null;
|
|
1016
|
+
firstName?: string | null;
|
|
1017
|
+
middleName?: string | null;
|
|
1018
|
+
lastName?: string | null;
|
|
1019
|
+
fullName?: string | null;
|
|
1020
|
+
} | null;
|
|
1021
|
+
vehicleGroup?: {
|
|
1022
|
+
__typename?: 'VehicleGroup';
|
|
1023
|
+
id: string;
|
|
1024
|
+
name?: string | null;
|
|
1025
|
+
} | null;
|
|
1026
|
+
entity?: {
|
|
1027
|
+
__typename?: 'Entity';
|
|
1028
|
+
id: string;
|
|
1029
|
+
name?: string | null;
|
|
1030
|
+
} | null;
|
|
1031
|
+
items?: Array<{
|
|
1032
|
+
__typename?: 'TransactionItem';
|
|
1033
|
+
id?: string | null;
|
|
1034
|
+
serviceType?: ServiceType | null;
|
|
1035
|
+
line?: string | null;
|
|
1036
|
+
quantity?: string | null;
|
|
1037
|
+
name?: string | null;
|
|
1038
|
+
unitPrice?: string | null;
|
|
1039
|
+
units?: string | null;
|
|
1040
|
+
amount?: string | null;
|
|
1041
|
+
} | null> | null;
|
|
1042
|
+
statuses?: Array<{
|
|
1043
|
+
__typename?: 'TransactionStatus';
|
|
1044
|
+
id?: string | null;
|
|
1045
|
+
status?: string | null;
|
|
1046
|
+
} | null> | null;
|
|
1047
|
+
} | null> | null;
|
|
1048
|
+
} | null;
|
|
1049
|
+
};
|
|
854
1050
|
type TtpTokenizationMutationVariables = Exact<{
|
|
855
1051
|
input: TtpTokenizationInput;
|
|
856
1052
|
}>;
|
|
@@ -886,6 +1082,7 @@ declare function getUserSdk(config: ElementPayUserConfig): {
|
|
|
886
1082
|
provisionCard(variables: ProvisionCardMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<ProvisionCardMutation>;
|
|
887
1083
|
provisionStatusUpdate(variables: ProvisionStatusUpdateMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<ProvisionStatusUpdateMutation>;
|
|
888
1084
|
servicePay(variables: ServicePayMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<ServicePayMutation>;
|
|
1085
|
+
transactionsFilter(variables: TransactionsFilterQueryVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<TransactionsFilterQuery>;
|
|
889
1086
|
ttpTokenization(variables: TtpTokenizationMutationVariables, requestHeaders?: HeadersInit | undefined, signal?: RequestInit["signal"]): Promise<TtpTokenizationMutation>;
|
|
890
1087
|
};
|
|
891
1088
|
//#endregion
|
package/lib/index.js
CHANGED
|
@@ -281,6 +281,127 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
`,M=t`
|
|
284
|
+
query transactionsFilter($input: TransactionsFilterInput!) {
|
|
285
|
+
transactionsFilter(input: $input) {
|
|
286
|
+
meta {
|
|
287
|
+
limit
|
|
288
|
+
offset
|
|
289
|
+
total
|
|
290
|
+
}
|
|
291
|
+
data {
|
|
292
|
+
id
|
|
293
|
+
transactionTime
|
|
294
|
+
pdfReceiptUrl
|
|
295
|
+
transactionNumber
|
|
296
|
+
type
|
|
297
|
+
insertedAt
|
|
298
|
+
updatedAt
|
|
299
|
+
localTime
|
|
300
|
+
location {
|
|
301
|
+
name
|
|
302
|
+
address {
|
|
303
|
+
line1
|
|
304
|
+
line2
|
|
305
|
+
city
|
|
306
|
+
state
|
|
307
|
+
country
|
|
308
|
+
zip
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
additionalInfo {
|
|
312
|
+
pumpNumber
|
|
313
|
+
jobCode
|
|
314
|
+
odometer
|
|
315
|
+
}
|
|
316
|
+
vehicle {
|
|
317
|
+
id
|
|
318
|
+
vin
|
|
319
|
+
location {
|
|
320
|
+
position {
|
|
321
|
+
latitude
|
|
322
|
+
longitude
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
fuel {
|
|
326
|
+
percent
|
|
327
|
+
level
|
|
328
|
+
}
|
|
329
|
+
type {
|
|
330
|
+
name
|
|
331
|
+
serialNumber
|
|
332
|
+
internalDescription
|
|
333
|
+
internalNumber
|
|
334
|
+
licensePlate
|
|
335
|
+
}
|
|
336
|
+
details {
|
|
337
|
+
description
|
|
338
|
+
make
|
|
339
|
+
model
|
|
340
|
+
year
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
position {
|
|
344
|
+
latitude
|
|
345
|
+
longitude
|
|
346
|
+
}
|
|
347
|
+
location {
|
|
348
|
+
id
|
|
349
|
+
name
|
|
350
|
+
address {
|
|
351
|
+
line1
|
|
352
|
+
line2
|
|
353
|
+
city
|
|
354
|
+
state
|
|
355
|
+
country
|
|
356
|
+
zip
|
|
357
|
+
}
|
|
358
|
+
position {
|
|
359
|
+
latitude
|
|
360
|
+
longitude
|
|
361
|
+
}
|
|
362
|
+
brand
|
|
363
|
+
}
|
|
364
|
+
driver {
|
|
365
|
+
id
|
|
366
|
+
externalId
|
|
367
|
+
username
|
|
368
|
+
email
|
|
369
|
+
phoneNumber
|
|
370
|
+
firstName
|
|
371
|
+
middleName
|
|
372
|
+
lastName
|
|
373
|
+
fullName
|
|
374
|
+
}
|
|
375
|
+
vehicleGroup {
|
|
376
|
+
id
|
|
377
|
+
name
|
|
378
|
+
}
|
|
379
|
+
entity {
|
|
380
|
+
id
|
|
381
|
+
name
|
|
382
|
+
}
|
|
383
|
+
items {
|
|
384
|
+
id
|
|
385
|
+
serviceType
|
|
386
|
+
line
|
|
387
|
+
quantity
|
|
388
|
+
name
|
|
389
|
+
unitPrice
|
|
390
|
+
units
|
|
391
|
+
amount
|
|
392
|
+
}
|
|
393
|
+
statuses {
|
|
394
|
+
id
|
|
395
|
+
status
|
|
396
|
+
}
|
|
397
|
+
subtotal
|
|
398
|
+
taxAmount
|
|
399
|
+
totalAmount
|
|
400
|
+
currency
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
`,N=t`
|
|
284
405
|
mutation ttpTokenization($input: TtpTokenizationInput!) {
|
|
285
406
|
ttpTokenization(input: $input) {
|
|
286
407
|
requestId
|
|
@@ -299,5 +420,5 @@ import{GraphQLClient as e}from"graphql-request";import t from"graphql-tag";impor
|
|
|
299
420
|
cardFlag
|
|
300
421
|
}
|
|
301
422
|
}
|
|
302
|
-
`,
|
|
423
|
+
`,P=(e,t,n,r)=>e();function F(e,t=P){return{provisionCard(n,r,i){return t(t=>e.request({document:k,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionCard`,`mutation`,n)},provisionStatusUpdate(n,r,i){return t(t=>e.request({document:A,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionStatusUpdate`,`mutation`,n)},servicePay(n,r,i){return t(t=>e.request({document:j,variables:n,requestHeaders:{...r,...t},signal:i}),`servicePay`,`mutation`,n)},transactionsFilter(n,r,i){return t(t=>e.request({document:M,variables:n,requestHeaders:{...r,...t},signal:i}),`transactionsFilter`,`query`,n)},ttpTokenization(n,r,i){return t(t=>e.request({document:N,variables:n,requestHeaders:{...r,...t},signal:i}),`ttpTokenization`,`mutation`,n)}}}function I(t){let n=t.environment??`stage`;return F(new e(t.endpoint??D[n],{headers:{Authorization:`Bearer ${t.accessToken}`,"Content-Type":`application/json`}}))}const L=e=>n(Buffer.from(e,`base64`)),R=e=>{let t=L(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},z={EXXON:r.EXXONMOBIL,MOBIL:r.EXXONMOBIL,SHELL:r.SHELL,SUNOCO:r.SUNOCO},B={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},V=e=>e.reduce((e,t)=>{let n=B[t.name];return n&&(e[n]=0),e},{}),H=e=>(e??[]).map(({name:e,description:t})=>({name:e,description:t})),U=e=>Object.entries(e.ExternalIdMap??{}).find(([,t])=>t===e.PriceApiId)?.[0],W=({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:z[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:V(i),amenities:H(a),priceSourceId:e.PriceApiId,priceSourceType:U(e)}},G=e=>W({serviceLocationEvent:R(e)});export{O as getOrganizationSdk,I as getUserSdk,G as serviceLocationPubSubMessageToFuelSupplier};
|
|
303
424
|
//# sourceMappingURL=index.js.map
|