fix: proper datetime name

This commit is contained in:
Rafael Taranto 2025-04-01 14:43:36 +01:00
parent e4c9b39b44
commit d452aac0f9
20 changed files with 62 additions and 67 deletions

View file

@ -3,7 +3,7 @@ const { DateTimeISOResolver, JSONResolver, JSONObjectResolver } = require('graph
const resolvers = { const resolvers = {
JSON: JSONResolver, JSON: JSONResolver,
JSONObject: JSONObjectResolver, JSONObject: JSONObjectResolver,
Date: DateTimeISOResolver DateTimeISO: DateTimeISOResolver
} }
module.exports = resolvers module.exports = resolvers

View file

@ -6,7 +6,7 @@ const typeDef = gql`
fiat: Int fiat: Int
fiatCode: String fiatCode: String
deviceId: ID deviceId: ID
created: Date created: DateTimeISO
cashUnitOperationId: ID cashUnitOperationId: ID
} }

View file

@ -4,7 +4,7 @@ const typeDef = gql`
type CashboxBatch { type CashboxBatch {
id: ID id: ID
deviceId: ID deviceId: ID
created: Date created: DateTimeISO
operationType: String operationType: String
customBillCount: Int customBillCount: Int
performedBy: String performedBy: String
@ -14,7 +14,7 @@ const typeDef = gql`
type Query { type Query {
cashboxBatches: [CashboxBatch] @auth cashboxBatches: [CashboxBatch] @auth
cashboxBatchesCsv(from: Date, until: Date, timezone: String): String @auth cashboxBatchesCsv(from: DateTimeISO, until: DateTimeISO, timezone: String): String @auth
} }
type Mutation { type Mutation {

View file

@ -33,7 +33,7 @@ const typeDef = gql`
customerId: ID customerId: ID
infoRequestId: ID infoRequestId: ID
override: String override: String
overrideAt: Date overrideAt: DateTimeISO
overrideBy: ID overrideBy: ID
customerData: JSON customerData: JSON
customInfoRequest: CustomInfoRequest customInfoRequest: CustomInfoRequest

View file

@ -9,7 +9,7 @@ const typeDef = gql`
newPhoto: Upload newPhoto: Upload
photoType: String photoType: String
frontCameraPath: String frontCameraPath: String
frontCameraAt: Date frontCameraAt: DateTimeISO
frontCameraOverride: String frontCameraOverride: String
phone: String phone: String
email: String email: String
@ -17,19 +17,19 @@ const typeDef = gql`
smsOverride: String smsOverride: String
idCardData: JSONObject idCardData: JSONObject
idCardDataOverride: String idCardDataOverride: String
idCardDataExpiration: Date idCardDataExpiration: DateTimeISO
idCardPhoto: Upload idCardPhoto: Upload
idCardPhotoPath: String idCardPhotoPath: String
idCardPhotoOverride: String idCardPhotoOverride: String
idCardPhotoAt: Date idCardPhotoAt: DateTimeISO
usSsn: String usSsn: String
usSsnOverride: String usSsnOverride: String
sanctions: Boolean sanctions: Boolean
sanctionsAt: Date sanctionsAt: DateTimeISO
sanctionsOverride: String sanctionsOverride: String
totalTxs: Int totalTxs: Int
totalSpent: String totalSpent: String
lastActive: Date lastActive: DateTimeISO
lastTxFiat: String lastTxFiat: String
lastTxFiatCode: String lastTxFiatCode: String
lastTxClass: String lastTxClass: String
@ -53,21 +53,21 @@ const typeDef = gql`
smsOverride: String smsOverride: String
idCardData: JSONObject idCardData: JSONObject
idCardDataOverride: String idCardDataOverride: String
idCardDataExpiration: Date idCardDataExpiration: DateTimeISO
idCardPhotoPath: String idCardPhotoPath: String
idCardPhotoOverride: String idCardPhotoOverride: String
usSsn: String usSsn: String
usSsnOverride: String usSsnOverride: String
sanctions: Boolean sanctions: Boolean
sanctionsAt: Date sanctionsAt: DateTimeISO
sanctionsOverride: String sanctionsOverride: String
totalTxs: Int totalTxs: Int
totalSpent: String totalSpent: String
lastActive: Date lastActive: DateTimeISO
lastTxFiat: String lastTxFiat: String
lastTxFiatCode: String lastTxFiatCode: String
lastTxClass: String lastTxClass: String
suspendedUntil: Date suspendedUntil: DateTimeISO
subscriberInfo: Boolean subscriberInfo: Boolean
phoneOverride: String phoneOverride: String
} }
@ -82,8 +82,8 @@ const typeDef = gql`
type CustomerNote { type CustomerNote {
id: ID id: ID
customerId: ID customerId: ID
created: Date created: DateTimeISO
lastEditedAt: Date lastEditedAt: DateTimeISO
lastEditedBy: ID lastEditedBy: ID
title: String title: String
content: String content: String

View file

@ -4,22 +4,22 @@ const typeDef = gql`
type MachineLog { type MachineLog {
id: ID! id: ID!
logLevel: String! logLevel: String!
timestamp: Date! timestamp: DateTimeISO!
message: String! message: String!
} }
type ServerLog { type ServerLog {
id: ID! id: ID!
logLevel: String! logLevel: String!
timestamp: Date! timestamp: DateTimeISO!
message: String message: String
} }
type Query { type Query {
machineLogs(deviceId: ID!, from: Date, until: Date, limit: Int, offset: Int): [MachineLog] @auth machineLogs(deviceId: ID!, from: DateTimeISO, until: DateTimeISO, limit: Int, offset: Int): [MachineLog] @auth
machineLogsCsv(deviceId: ID!, from: Date, until: Date, limit: Int, offset: Int, timezone: String): String @auth machineLogsCsv(deviceId: ID!, from: DateTimeISO, until: DateTimeISO, limit: Int, offset: Int, timezone: String): String @auth
serverLogs(from: Date, until: Date, limit: Int, offset: Int): [ServerLog] @auth serverLogs(from: DateTimeISO, until: DateTimeISO, limit: Int, offset: Int): [ServerLog] @auth
serverLogsCsv(from: Date, until: Date, limit: Int, offset: Int, timezone: String): String @auth serverLogsCsv(from: DateTimeISO, until: DateTimeISO, limit: Int, offset: Int, timezone: String): String @auth
} }
` `

View file

@ -10,8 +10,8 @@ const typeDef = gql`
name: String! name: String!
deviceId: ID! deviceId: ID!
paired: Boolean! paired: Boolean!
lastPing: Date lastPing: DateTimeISO
pairedAt: Date pairedAt: DateTimeISO
diagnostics: Diagnostics diagnostics: Diagnostics
version: String version: String
model: String model: String
@ -26,9 +26,9 @@ const typeDef = gql`
} }
type Diagnostics { type Diagnostics {
timestamp: Date timestamp: DateTimeISO
frontTimestamp: Date frontTimestamp: DateTimeISO
scanTimestamp: Date scanTimestamp: DateTimeISO
} }
type CashUnits { type CashUnits {
@ -64,8 +64,8 @@ const typeDef = gql`
deviceId: ID! deviceId: ID!
name: String name: String
model: String model: String
paired: Date! paired: DateTimeISO!
unpaired: Date! unpaired: DateTimeISO!
} }
type MachineEvent { type MachineEvent {
@ -73,9 +73,9 @@ const typeDef = gql`
deviceId: String deviceId: String
eventType: String eventType: String
note: String note: String
created: Date created: DateTimeISO
age: Float age: Float
deviceTime: Date deviceTime: DateTimeISO
} }
enum MachineAction { enum MachineAction {

View file

@ -6,7 +6,7 @@ const typeDef = gql`
type: String type: String
detail: JSON detail: JSON
message: String message: String
created: Date created: DateTimeISO
read: Boolean read: Boolean
valid: Boolean valid: Boolean
} }

View file

@ -3,7 +3,7 @@ const gql = require('graphql-tag')
const typeDef = gql` const typeDef = gql`
scalar JSON scalar JSON
scalar JSONObject scalar JSONObject
scalar Date scalar DateTimeISO
scalar Upload scalar Upload
` `

View file

@ -14,12 +14,12 @@ const typeDef = gql`
txHash: String txHash: String
phone: String phone: String
error: String error: String
created: Date created: DateTimeISO
send: Boolean send: Boolean
sendConfirmed: Boolean sendConfirmed: Boolean
dispense: Boolean dispense: Boolean
timedout: Boolean timedout: Boolean
sendTime: Date sendTime: DateTimeISO
errorCode: String errorCode: String
operatorCompleted: Boolean operatorCompleted: Boolean
sendPending: Boolean sendPending: Boolean
@ -35,7 +35,7 @@ const typeDef = gql`
customerPhone: String customerPhone: String
customerEmail: String customerEmail: String
customerIdCardDataNumber: String customerIdCardDataNumber: String
customerIdCardDataExpiration: Date customerIdCardDataExpiration: DateTimeISO
customerIdCardData: JSONObject customerIdCardData: JSONObject
customerName: String customerName: String
customerFrontCameraPath: String customerFrontCameraPath: String
@ -44,9 +44,9 @@ const typeDef = gql`
machineName: String machineName: String
discount: Int discount: Int
txCustomerPhotoPath: String txCustomerPhotoPath: String
txCustomerPhotoAt: Date txCustomerPhotoAt: DateTimeISO
batched: Boolean batched: Boolean
batchTime: Date batchTime: DateTimeISO
batchError: String batchError: String
walletScore: Int walletScore: Int
profit: String profit: String
@ -60,8 +60,8 @@ const typeDef = gql`
} }
type Query { type Query {
transactions(from: Date, until: Date, limit: Int, offset: Int, txClass: String, deviceId: String, customerName: String, fiatCode: String, cryptoCode: String, toAddress: String, status: String, swept: Boolean, excludeTestingCustomers: Boolean): [Transaction] @auth transactions(from: DateTimeISO, until: DateTimeISO, limit: Int, offset: Int, txClass: String, deviceId: String, customerName: String, fiatCode: String, cryptoCode: String, toAddress: String, status: String, swept: Boolean, excludeTestingCustomers: Boolean): [Transaction] @auth
transactionsCsv(from: Date, until: Date, limit: Int, offset: Int, txClass: String, deviceId: String, customerName: String, fiatCode: String, cryptoCode: String, toAddress: String, status: String, swept: Boolean, timezone: String, excludeTestingCustomers: Boolean, simplified: Boolean): String @auth transactionsCsv(from: DateTimeISO, until: DateTimeISO, limit: Int, offset: Int, txClass: String, deviceId: String, customerName: String, fiatCode: String, cryptoCode: String, toAddress: String, status: String, swept: Boolean, timezone: String, excludeTestingCustomers: Boolean, simplified: Boolean): String @auth
transactionCsv(id: ID, txClass: String, timezone: String): String @auth transactionCsv(id: ID, txClass: String, timezone: String): String @auth
txAssociatedDataCsv(id: ID, txClass: String, timezone: String): String @auth txAssociatedDataCsv(id: ID, txClass: String, timezone: String): String @auth
transactionFilters: [Filter] @auth transactionFilters: [Filter] @auth

View file

@ -45,7 +45,7 @@ const typeDef = `
type UserSession { type UserSession {
sid: String! sid: String!
sess: JSONObject! sess: JSONObject!
expire: Date! expire: DateTimeISO!
} }
type User { type User {
@ -53,8 +53,8 @@ const typeDef = `
username: String username: String
role: String role: String
enabled: Boolean enabled: Boolean
created: Date created: DateTimeISO
last_accessed: Date last_accessed: DateTimeISO
last_accessed_from: String last_accessed_from: String
last_accessed_address: String last_accessed_address: String
} }
@ -68,14 +68,14 @@ const typeDef = `
type ResetToken { type ResetToken {
token: String token: String
user_id: ID user_id: ID
expire: Date expire: DateTimeISO
} }
type RegistrationToken { type RegistrationToken {
token: String token: String
username: String username: String
role: String role: String
expire: Date expire: DateTimeISO
} }
type Query { type Query {

View file

@ -37,8 +37,8 @@ const MACHINE_LOGS = gql`
query machineLogsCsv( query machineLogsCsv(
$deviceId: ID! $deviceId: ID!
$limit: Int $limit: Int
$from: Date $from: DateTimeISO
$until: Date $until: DateTimeISO
$timezone: String $timezone: String
) { ) {
machineLogsCsv( machineLogsCsv(

View file

@ -59,8 +59,8 @@ const DAY_OPTIONS = R.map(
const GET_TRANSACTIONS = gql` const GET_TRANSACTIONS = gql`
query transactions( query transactions(
$from: Date $from: DateTimeISO
$until: Date $until: DateTimeISO
$excludeTestingCustomers: Boolean $excludeTestingCustomers: Boolean
) { ) {
transactions( transactions(

View file

@ -37,8 +37,8 @@ const GET_MACHINE_LOGS_CSV = gql`
query MachineLogs( query MachineLogs(
$deviceId: ID! $deviceId: ID!
$limit: Int $limit: Int
$from: Date $from: DateTimeISO
$until: Date $until: DateTimeISO
$timezone: String $timezone: String
) { ) {
machineLogsCsv( machineLogsCsv(
@ -52,7 +52,7 @@ const GET_MACHINE_LOGS_CSV = gql`
` `
const GET_MACHINE_LOGS = gql` const GET_MACHINE_LOGS = gql`
query MachineLogs($deviceId: ID!, $limit: Int, $from: Date, $until: Date) { query MachineLogs($deviceId: ID!, $limit: Int, $from: DateTimeISO, $until: DateTimeISO) {
machineLogs( machineLogs(
deviceId: $deviceId deviceId: $deviceId
limit: $limit limit: $limit

View file

@ -20,7 +20,7 @@ const useStyles = makeStyles(mainStyles)
const NUM_LOG_RESULTS = 5 const NUM_LOG_RESULTS = 5
const GET_TRANSACTIONS = gql` const GET_TRANSACTIONS = gql`
query transactions($limit: Int, $from: Date, $until: Date, $deviceId: String) { query transactions($limit: Int, $from: DateTimeISO, $until: DateTimeISO, $deviceId: String) {
transactions( transactions(
limit: $limit limit: $limit
from: $from from: $from

View file

@ -97,7 +97,7 @@ const SET_CASSETTE_BILLS = gql`
` `
const GET_BATCHES_CSV = gql` const GET_BATCHES_CSV = gql`
query cashboxBatchesCsv($from: Date, $until: Date, $timezone: String) { query cashboxBatchesCsv($from: DateTimeISO, $until: DateTimeISO, $timezone: String) {
cashboxBatchesCsv(from: $from, until: $until, timezone: $timezone) cashboxBatchesCsv(from: $from, until: $until, timezone: $timezone)
} }
` `

View file

@ -57,7 +57,7 @@ const SHOW_ALL = { code: 'SHOW_ALL', display: 'Show all' }
const NUM_LOG_RESULTS = 500 const NUM_LOG_RESULTS = 500
const GET_CSV = gql` const GET_CSV = gql`
query ServerData($limit: Int, $from: Date, $until: Date, $timezone: String) { query ServerData($limit: Int, $from: DateTimeISO, $until: DateTimeISO, $timezone: String) {
serverLogsCsv( serverLogsCsv(
limit: $limit limit: $limit
from: $from from: $from
@ -68,7 +68,7 @@ const GET_CSV = gql`
` `
const GET_SERVER_DATA = gql` const GET_SERVER_DATA = gql`
query ServerData($limit: Int, $from: Date, $until: Date) { query ServerData($limit: Int, $from: DateTimeISO, $until: DateTimeISO) {
serverVersion serverVersion
uptime { uptime {
name name

View file

@ -46,8 +46,8 @@ const TX_SUMMARY = gql`
$txId: ID! $txId: ID!
$deviceId: ID! $deviceId: ID!
$limit: Int $limit: Int
$from: Date $from: DateTimeISO
$until: Date $until: DateTimeISO
$txClass: String $txClass: String
$timezone: String $timezone: String
) { ) {

View file

@ -40,8 +40,8 @@ const GET_TRANSACTIONS_CSV = gql`
query transactions( query transactions(
$simplified: Boolean $simplified: Boolean
$limit: Int $limit: Int
$from: Date $from: DateTimeISO
$until: Date $until: DateTimeISO
$timezone: String $timezone: String
$excludeTestingCustomers: Boolean $excludeTestingCustomers: Boolean
) { ) {
@ -69,8 +69,8 @@ const GET_TRANSACTION_FILTERS = gql`
const GET_TRANSACTIONS = gql` const GET_TRANSACTIONS = gql`
query transactions( query transactions(
$limit: Int $limit: Int
$from: Date $from: DateTimeISO
$until: Date $until: DateTimeISO
$txClass: String $txClass: String
$deviceId: String $deviceId: String
$customerName: String $customerName: String

5
package-lock.json generated
View file

@ -5596,11 +5596,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/base-64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"node_modules/base-x": { "node_modules/base-x": {
"version": "3.0.9", "version": "3.0.9",
"resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz",