@autofleet/element-pay 2.1.5 → 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 +1 -1
package/lib/index.cjs
CHANGED
|
@@ -281,6 +281,127 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
`,z=l.default`
|
|
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
|
+
`,B=l.default`
|
|
284
405
|
mutation ttpTokenization($input: TtpTokenizationInput!) {
|
|
285
406
|
ttpTokenization(input: $input) {
|
|
286
407
|
requestId
|
|
@@ -299,5 +420,5 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
299
420
|
cardFlag
|
|
300
421
|
}
|
|
301
422
|
}
|
|
302
|
-
`,
|
|
423
|
+
`,V=(e,t,n,r)=>e();function H(e,t=V){return{provisionCard(n,r,i){return t(t=>e.request({document:I,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionCard`,`mutation`,n)},provisionStatusUpdate(n,r,i){return t(t=>e.request({document:L,variables:n,requestHeaders:{...r,...t},signal:i}),`provisionStatusUpdate`,`mutation`,n)},servicePay(n,r,i){return t(t=>e.request({document:R,variables:n,requestHeaders:{...r,...t},signal:i}),`servicePay`,`mutation`,n)},transactionsFilter(n,r,i){return t(t=>e.request({document:z,variables:n,requestHeaders:{...r,...t},signal:i}),`transactionsFilter`,`query`,n)},ttpTokenization(n,r,i){return t(t=>e.request({document:B,variables:n,requestHeaders:{...r,...t},signal:i}),`ttpTokenization`,`mutation`,n)}}}function U(e){let t=e.environment??`stage`;return H(new c.GraphQLClient(e.endpoint??P[t],{headers:{Authorization:`Bearer ${e.accessToken}`,"Content-Type":`application/json`}}))}const W=e=>(0,u.decode)(Buffer.from(e,`base64`)),G=e=>{let t=W(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},K={EXXON:d.FUEL_BRANDS.EXXONMOBIL,MOBIL:d.FUEL_BRANDS.EXXONMOBIL,SHELL:d.FUEL_BRANDS.SHELL,SUNOCO:d.FUEL_BRANDS.SUNOCO},q={REGULAR:d.FUEL_TYPES.UNLEADED_REGULAR,MID_GRADE_UNLEADED:d.FUEL_TYPES.UNLEADED_PLUS,"MID GRADE UNLEADED":d.FUEL_TYPES.UNLEADED_PLUS,UNLEADED_PREMIUM:d.FUEL_TYPES.UNLEADED_PREMIUM,"UNLEADED PREMIUM":d.FUEL_TYPES.UNLEADED_PREMIUM,DIESEL:d.FUEL_TYPES.DIESEL_REGULAR,DIESEL_PREMIUM:d.FUEL_TYPES.DIESEL_PREMIUM,"DIESEL PREMIUM":d.FUEL_TYPES.DIESEL_PREMIUM,OTHER_FUEL:d.FUEL_TYPES.OTHER_FUEL,"OTHER FUEL":d.FUEL_TYPES.OTHER_FUEL,HI_FLOW_DIESEL:d.FUEL_TYPES.HI_FLOW_DIESEL,"HI-FLOW DIESEL":d.FUEL_TYPES.HI_FLOW_DIESEL},J=e=>e.reduce((e,t)=>{let n=q[t.name];return n&&(e[n]=0),e},{}),Y=e=>(e??[]).map(({name:e,description:t})=>({name:e,description:t})),X=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:K[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:J(i),amenities:Y(a),priceSourceId:e.PriceApiId,priceSourceType:X(e)}},Q=e=>Z({serviceLocationEvent:G(e)});exports.getOrganizationSdk=F,exports.getUserSdk=U,exports.serviceLocationPubSubMessageToFuelSupplier=Q;
|
|
303
424
|
//# sourceMappingURL=index.cjs.map
|