MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / insertKiloPassStorePurchase

Function insertKiloPassStorePurchase

packages/db/src/schema.test.ts:67–84  ·  view source on GitHub ↗
(values: {
  subscriptionId: string;
  userId: string;
  paymentProvider: KiloPassPaymentProvider;
  providerSubscriptionId: string;
  providerTransactionId?: string;
})

Source from the content-addressed store, hash-verified

65 await schemaTestDb.db.insert(schema.kilocode_users).values(
66 [userId, otherUserId].map(id => ({
67 id,
68 google_user_email: `${id}@example.com`,
69 google_user_name: 'Sidebar schema test',
70 google_user_image_url: '',
71 stripe_customer_id: `cus_${crypto.randomUUID()}`,
72 }))
73 );
74 await schemaTestDb.db.insert(schema.organizations).values([
75 { id: organizationId, name: 'Sidebar schema organization' },
76 { id: otherOrganizationId, name: 'Other sidebar schema organization' },
77 ]);
78 });
79
80 afterEach(async () => {
81 await schemaTestDb.db
82 .delete(schema.cloud_agent_worktrees)
83 .where(inArray(schema.cloud_agent_worktrees.kilo_user_id, [userId, otherUserId]));
84 await schemaTestDb.db
85 .delete(schema.kilocode_users)
86 .where(inArray(schema.kilocode_users.id, [userId, otherUserId]));
87 await schemaTestDb.db

Callers 1

schema.test.tsFile · 0.85

Calls 1

valuesMethod · 0.65

Tested by

no test coverage detected