Skip to content

Instantly share code, notes, and snippets.

@maxkorp
Created August 22, 2019 21:14
Show Gist options
  • Save maxkorp/eb57ddf138c7019c43affac63a8aba6c to your computer and use it in GitHub Desktop.
Save maxkorp/eb57ddf138c7019c43affac63a8aba6c to your computer and use it in GitHub Desktop.
const type = {
activeId: option(int),
alcoholAwarenessExpirationDate: option(Js.Json.t),
clientTypeCurrentlyBeingUsed: option([
LEGACY,
PROFESSIONAL_MOBILE_ANDROID,
PROFESSIONAL_MOBILE_IOS,
QWICKIO,
UNSPECIFIED,
WEB
]),
clientTypeVersionCurrentlyBeingUsed: option(string),
details: option({
attendedOrienationAt: option(Js.Json.t),
averageRatingFromBusinessOverall: option(Js.Json.t),
blocked: option(string),
bohQwickScore: option(Js.Json.t),
bohQwickScorePercentile: option(Js.Json.t),
bohRating: option(Js.Json.t),
experiences: option(string),
fohQwickScore: option(Js.Json.t),
fohQwickScorePercentile: option(Js.Json.t),
fohRating: option(Js.Json.t),
numberOfShiftsOverall: option(Js.Json.t),
overallCancellations: option(Js.Json.t),
shift24HourCancellations: option(Js.Json.t),
shift4HourCancellations: option(Js.Json.t),
shiftNoShows: option(Js.Json.t),
stripeMerchantAccountId: option(string)
}),
foodHandlersExpirationDate: option(Js.Json.t),
id: Js.Json.t,
ineligibleStatus: option(string),
isInstantPayEligible: bool,
runningBalance: option(int),
workerAvailableShifts: {
edges: array({
node: option({
shift: option({
shiftType: option({ name: option(string) }),
startDatetime: option(Js.Json.t)
}),
shiftId: Js.Json.t,
workerId: Js.Json.t
})
})
},
workerPastShifts: {
edges: array({
node: option({
shift: option({
shiftType: { name: option(string) },
startDatetime: option(Js.Json.t)
}),
shiftId: option(Js.Json.t),
workerId: option(Js.Json.t),
workerShift: {
amountOwed: option(int),
canceledAt: option(Js.Json.t),
clockedInAt: option(Js.Json.t),
clockedInClientType: option([
LEGACY,
PROFESSIONAL_MOBILE_ANDROID,
PROFESSIONAL_MOBILE_IOS,
QWICKIO,
UNSPECIFIED,
WEB
]),
clockedInClientVersion: option(string),
clockedOutAt: option(Js.Json.t),
clockedOutClientType: option([
LEGACY,
PROFESSIONAL_MOBILE_ANDROID,
PROFESSIONAL_MOBILE_IOS,
QWICKIO,
UNSPECIFIED,
WEB
]),
clockedOutClientVersion: option(string),
duration: option(float),
id: Js.Json.t,
shift: {
business: { businessName: string },
id: Js.Json.t,
shiftType: { name: option(string) }
},
shiftPay: option(int),
totalPayout: option(int),
userId: option(int),
workerPayments: {
edges: array({
node: option({
id: Js.Json.t,
payoutStatus: [FAILED, PENDING, RETRYING, SUCCEEDED],
transferAmount: int,
transferId: option(string),
transferStatus: [FAILED, PENDING, RETRYING, SUCCEEDED]
})
})
},
workerRateCents: option(int)
}
})
})
},
workerUpcomingShifts: {
edges: array({
node: option({
shift: option({
shiftType: { name: option(string) },
startDatetime: option(Js.Json.t)
}),
shiftId: option(Js.Json.t),
workerId: option(Js.Json.t),
workerShift: {
amountOwed: option(int),
canceledAt: option(Js.Json.t),
clockedInAt: option(Js.Json.t),
clockedInClientType: option([
LEGACY,
PROFESSIONAL_MOBILE_ANDROID,
PROFESSIONAL_MOBILE_IOS,
QWICKIO,
UNSPECIFIED,
WEB
]),
clockedInClientVersion: option(string),
clockedOutAt: option(Js.Json.t),
clockedOutClientType: option([
LEGACY,
PROFESSIONAL_MOBILE_ANDROID,
PROFESSIONAL_MOBILE_IOS,
QWICKIO,
UNSPECIFIED,
WEB
]),
clockedOutClientVersion: option(string),
duration: option(float),
id: Js.Json.t,
shift: {
business: { businessName: string },
id: Js.Json.t,
shiftType: { name: option(string) }
},
shiftPay: option(int),
totalPayout: option(int),
userId: option(int),
workerPayments: {
edges: array({
node: option({
id: Js.Json.t,
payoutStatus: [FAILED, PENDING, RETRYING, SUCCEEDED],
transferAmount: int,
transferId: option(string),
transferStatus: [FAILED, PENDING, RETRYING, SUCCEEDED]
})
})
},
workerRateCents: option(int)
}
})
})
}
};
{.. "activeId": option(int),
"alcoholAwarenessExpirationDate": Relude.Globals.Option.Monad.t(
Js.Json.t),
"clientTypeCurrentlyBeingUsed": option([< `LEGACY
| `PROFESSIONAL_MOBILE_ANDROID
| `PROFESSIONAL_MOBILE_IOS
| `QWICKIO
| `UNSPECIFIED
| `WEB ]),
"clientTypeVersionCurrentlyBeingUsed": option(string),
"details": Relude.Globals.Option.Monad.t({.. "attendedOrienationAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"averageRatingFromBusinessOverall":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"blocked": Relude.Globals.Option.Monad.t(
string),
"bohQwickScore":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"bohQwickScorePercentile":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"bohRating":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"experiences":
Relude.Globals.Option.Monad.t(
string),
"fohQwickScore":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"fohQwickScorePercentile":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"fohRating":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"numberOfShiftsOverall":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"overallCancellations":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"shift24HourCancellations":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"shift4HourCancellations":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"shiftNoShows":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"stripeMerchantAccountId":
Relude.Globals.Option.Monad.t(
string)}),
"foodHandlersExpirationDate": Relude.Globals.Option.Monad.t(
Js.Json.t),
"id": Js.Json.t, "ineligibleStatus": option(string),
"isInstantPayEligible": bool, "runningBalance": option(int),
"workerAvailableShifts": {.. "edges": array({.. "node":
option({.. "shift":
Relude.Globals.Option.Monad.t(
{.. "shiftType":
Relude.Globals.Option.Monad.t(
{.. "name":
Relude.Globals.Option.Monad.t(
string)}),
"startDatetime":
Relude.Globals.Option.Monad.t(
Js.Json.t)}),
"shiftId":
Js.Json.t,
"workerId":
Js.Json.t})})},
"workerPastShifts": {.. "edges": array({.. "node": option(
{.. "shift":
Relude.Globals.Option.Monad.t(
{.. "shiftType":
{.. "name":
Relude.Globals.Option.Monad.t(
string)},
"startDatetime":
Relude.Globals.Option.Monad.t(
Js.Json.t)}),
"shiftId":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"workerId":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"workerShift":
{.. "amountOwed":
Relude.Globals.Option.Apply.t(
int),
"canceledAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"clockedInAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"clockedInClientType":
option([<
`LEGACY
| `PROFESSIONAL_MOBILE_ANDROID
| `PROFESSIONAL_MOBILE_IOS
| `QWICKIO
| `UNSPECIFIED
| `WEB ]),
"clockedInClientVersion":
option(
string),
"clockedOutAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"clockedOutClientType":
option([<
`LEGACY
| `PROFESSIONAL_MOBILE_ANDROID
| `PROFESSIONAL_MOBILE_IOS
| `QWICKIO
| `UNSPECIFIED
| `WEB ]),
"clockedOutClientVersion":
option(
string),
"duration":
Relude.Globals.Option.Apply.t(
float),
"id":
Js.Json.t,
"shift":
{.. "business":
{.. "businessName":
string},
"id":
Js.Json.t,
"shiftType":
{.. "name":
Relude.Globals.Option.Apply.t(
string)}},
"shiftPay":
Relude.Globals.Option.Apply.t(
int),
"totalPayout":
Relude.Globals.Option.Apply.t(
int),
"userId":
Relude.Globals.Option.Apply.t(
int),
"workerPayments":
{.. "edges":
array(
{.. "node":
option(
{.. "id":
Js.Json.t,
"payoutStatus": [<
`FAILED
| `PENDING
| `RETRYING
| `SUCCEEDED ],
"transferAmount":
int,
"transferId":
option(
string),
"transferStatus": [<
`FAILED
| `PENDING
| `RETRYING
| `SUCCEEDED ]})})},
"workerRateCents":
Relude.Globals.Option.Apply.t(
int)}})})},
"workerUpcomingShifts": {.. "edges": array({.. "node": option(
{.. "shift":
Relude.Globals.Option.Monad.t(
{.. "shiftType":
{.. "name":
Relude.Globals.Option.Monad.t(
string)},
"startDatetime":
Relude.Globals.Option.Monad.t(
Js.Json.t)}),
"shiftId":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"workerId":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"workerShift":
{.. "amountOwed":
Relude.Globals.Option.Apply.t(
int),
"canceledAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"clockedInAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"clockedInClientType":
option([<
`LEGACY
| `PROFESSIONAL_MOBILE_ANDROID
| `PROFESSIONAL_MOBILE_IOS
| `QWICKIO
| `UNSPECIFIED
| `WEB ]),
"clockedInClientVersion":
option(
string),
"clockedOutAt":
Relude.Globals.Option.Monad.t(
Js.Json.t),
"clockedOutClientType":
option([<
`LEGACY
| `PROFESSIONAL_MOBILE_ANDROID
| `PROFESSIONAL_MOBILE_IOS
| `QWICKIO
| `UNSPECIFIED
| `WEB ]),
"clockedOutClientVersion":
option(
string),
"duration":
Relude.Globals.Option.Apply.t(
float),
"id":
Js.Json.t,
"shift":
{.. "business":
{.. "businessName":
string},
"id":
Js.Json.t,
"shiftType":
{.. "name":
Relude.Globals.Option.Apply.t(
string)}},
"shiftPay":
Relude.Globals.Option.Apply.t(
int),
"totalPayout":
Relude.Globals.Option.Apply.t(
int),
"userId":
Relude.Globals.Option.Apply.t(
int),
"workerPayments":
{.. "edges":
array(
{.. "node":
option(
{.. "id":
Js.Json.t,
"payoutStatus": [<
`FAILED
| `PENDING
| `RETRYING
| `SUCCEEDED ],
"transferAmount":
int,
"transferId":
option(
string),
"transferStatus": [<
`FAILED
| `PENDING
| `RETRYING
| `SUCCEEDED ]})})},
"workerRateCents":
Relude.Globals.Option.Apply.t(
int)}})})}} =>
Relude.Globals.Option.Apply.t(t)
#### To install
`npm install -g @maxkorp/bs-type-cleaner`
#### To run
```
clean-bs-types mylogfile.log
```
for multiple files
```
clean-bs-types has.log wants.log
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment