import {
getState,
setState,
} from "https://deno.land/x/windmill@v1.85.0/mod.ts";
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno";
type Stripe = {
token: string;
};
export async function main(auth: Stripe) {
const stripe = new Stripe(auth.token, {
httpClient: Stripe.createFetchHttpClient(),
});
const lastCheck = (await getState()) || 0;
await setState(Date.now());
const customers = await stripe.customers.list({
created: { gt: lastCheck },
});
return customers.data;
}
Submitted by admin 497 days ago
import { getState, setState } from "https://deno.land/x/windmill@v1.85.0/mod.ts"
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno"
type Stripe = {
token: string;
};
export async function main(auth: Stripe) {
const stripe = new Stripe(
auth.token,
{ httpClient: Stripe.createFetchHttpClient() }
)
const lastCheck = await getState() || 0
await setState(Date.now())
const customers = await stripe.customers.list({
created: { gt: lastCheck }
})
return customers.data
}
Submitted by admin 500 days ago
import { Resource, getState, setState } from "https://deno.land/x/windmill@v1.85.0/mod.ts"
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno"
export async function main(auth: Resource<'stripe'>) {
const stripe = new Stripe(
auth.token,
{ httpClient: Stripe.createFetchHttpClient() }
)
const lastCheck = await getState() || 0
await setState(Date.now())
const customers = await stripe.customers.list({
created: { gt: lastCheck }
})
return customers.data
}
Submitted by adam186 628 days ago
import { Resource, getState, setState } from "https://deno.land/x/windmill@v1.70.1/mod.ts"
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno"
export async function main(auth: Resource<'stripe'>) {
const stripe = new Stripe(
auth.token,
{ httpClient: Stripe.createFetchHttpClient() }
)
const lastCheck = await getState() || 0
await setState(Date.now())
const customers = await stripe.customers.list({
created: { gt: lastCheck }
})
return customers.data
}
Submitted by adam186 663 days ago
import { Resource, getState, setState } from "https://deno.land/x/windmill@v1.55.0/mod.ts"
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno"
export async function main(auth: Resource<'stripe'>) {
const stripe = new Stripe(
auth.token,
{ httpClient: Stripe.createFetchHttpClient() }
)
const lastCheck = await getState() || 0
await setState(Date.now())
const customers = await stripe.customers.list({
created: { gt: lastCheck }
})
return customers.data
}
Submitted by adam186 731 days ago
import { Resource, getState, setState } from "https://deno.land/x/windmill@v1.55.0/mod.ts"
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno"
export async function main(auth: Resource<'stripe'>) {
const stripe = new Stripe(
auth.token,
{ httpClient: Stripe.createFetchHttpClient() }
)
const lastCheck = await getState()
await setState(Date.now())
const customers = await stripe.customers.list({
created: { gt: lastCheck }
})
return customers.data
}
Submitted by adam186 731 days ago
import { Resource, getState, setState } from "https://deno.land/x/windmill@v1.55.0/mod.ts"
import Stripe from "https://esm.sh/stripe@11.4.0?target=deno"
export async function main(
auth: Resource<'stripe'>
) {
const stripe = new Stripe(
auth.token,
{ httpClient: Stripe.createFetchHttpClient() }
)
const lastCheck = await getState()
await setState(Date.now())
const customers = await stripe.customers.list({
created: { gt: lastCheck }
})
return customers.data
}
Submitted by adam186 731 days ago