{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,gCAAiB,CAAA;AACnB,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB;AASD,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["export enum ProductType {\n  SHIELD = 'shield',\n}\n\nexport type Product = {\n  name: ProductType;\n  id: string;\n  currency: string;\n  amount: number;\n};\n\nexport enum PaymentType {\n  CARD = 'card',\n  CRYPTO = 'crypto',\n}\n\nexport type PaymentMethod = {\n  type: PaymentType;\n  crypto?: {\n    payerAddress: string;\n    chainId: string;\n    tokenSymbol: string;\n  };\n};\n\n// state\nexport type Subscription = {\n  id: string;\n  products: Product[];\n  currentPeriodStart: string; // ISO 8601\n  currentPeriodEnd: string; // ISO 8601\n  billingCycles?: number;\n  status: 'active' | 'inactive' | 'trialing' | 'cancelled';\n  interval: 'month' | 'year';\n  paymentMethod: PaymentMethod;\n};\n\nexport type GetSubscriptionsResponse = {\n  customerId: string;\n  subscriptions: Subscription[];\n  trialedProducts: ProductType[];\n};\n\nexport type AuthUtils = {\n  getAccessToken: () => Promise<string>;\n};\n\nexport type ISubscriptionService = {\n  getSubscriptions(): Promise<GetSubscriptionsResponse>;\n  cancelSubscription(request: { subscriptionId: string }): Promise<void>;\n};\n"]}