/* !!! This is code generated by Prisma. Do not edit directly. !!! */ /* eslint-disable */ // biome-ignore-all lint: generated file // @ts-nocheck /* * This file exports the `Payment` model and its related types. * * 🟢 You can import this file directly. */ import type * as runtime from "@prisma/client/runtime/client" import type * as $Enums from "../enums" import type * as Prisma from "../internal/prismaNamespace" /** * Model Payment * Satu attempt pembayaran. Satu Booking bisa punya banyak Payment kalau retry * (di Phase MIDTRANS nanti). Untuk MANUAL biasanya cukup 1 Payment. */ export type PaymentModel = runtime.Types.Result.DefaultSelection export type AggregatePayment = { _count: PaymentCountAggregateOutputType | null _avg: PaymentAvgAggregateOutputType | null _sum: PaymentSumAggregateOutputType | null _min: PaymentMinAggregateOutputType | null _max: PaymentMaxAggregateOutputType | null } export type PaymentAvgAggregateOutputType = { amount: number | null } export type PaymentSumAggregateOutputType = { amount: number | null } export type PaymentMinAggregateOutputType = { id: string | null bookingId: string | null provider: $Enums.PaymentProvider | null externalOrderId: string | null externalTxId: string | null method: string | null amount: number | null status: $Enums.PaymentStatus | null snapToken: string | null expiresAt: Date | null paidAt: Date | null failedAt: Date | null rejectionReason: string | null createdAt: Date | null updatedAt: Date | null } export type PaymentMaxAggregateOutputType = { id: string | null bookingId: string | null provider: $Enums.PaymentProvider | null externalOrderId: string | null externalTxId: string | null method: string | null amount: number | null status: $Enums.PaymentStatus | null snapToken: string | null expiresAt: Date | null paidAt: Date | null failedAt: Date | null rejectionReason: string | null createdAt: Date | null updatedAt: Date | null } export type PaymentCountAggregateOutputType = { id: number bookingId: number provider: number externalOrderId: number externalTxId: number method: number amount: number status: number rawCallback: number snapToken: number expiresAt: number paidAt: number failedAt: number rejectionReason: number createdAt: number updatedAt: number _all: number } export type PaymentAvgAggregateInputType = { amount?: true } export type PaymentSumAggregateInputType = { amount?: true } export type PaymentMinAggregateInputType = { id?: true bookingId?: true provider?: true externalOrderId?: true externalTxId?: true method?: true amount?: true status?: true snapToken?: true expiresAt?: true paidAt?: true failedAt?: true rejectionReason?: true createdAt?: true updatedAt?: true } export type PaymentMaxAggregateInputType = { id?: true bookingId?: true provider?: true externalOrderId?: true externalTxId?: true method?: true amount?: true status?: true snapToken?: true expiresAt?: true paidAt?: true failedAt?: true rejectionReason?: true createdAt?: true updatedAt?: true } export type PaymentCountAggregateInputType = { id?: true bookingId?: true provider?: true externalOrderId?: true externalTxId?: true method?: true amount?: true status?: true rawCallback?: true snapToken?: true expiresAt?: true paidAt?: true failedAt?: true rejectionReason?: true createdAt?: true updatedAt?: true _all?: true } export type PaymentAggregateArgs = { /** * Filter which Payment to aggregate. */ where?: Prisma.PaymentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Payments to fetch. */ orderBy?: Prisma.PaymentOrderByWithRelationInput | Prisma.PaymentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: Prisma.PaymentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Payments from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Payments. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned Payments **/ _count?: true | PaymentCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: PaymentAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: PaymentSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: PaymentMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: PaymentMaxAggregateInputType } export type GetPaymentAggregateType = { [P in keyof T & keyof AggregatePayment]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType : Prisma.GetScalarType } export type PaymentGroupByArgs = { where?: Prisma.PaymentWhereInput orderBy?: Prisma.PaymentOrderByWithAggregationInput | Prisma.PaymentOrderByWithAggregationInput[] by: Prisma.PaymentScalarFieldEnum[] | Prisma.PaymentScalarFieldEnum having?: Prisma.PaymentScalarWhereWithAggregatesInput take?: number skip?: number _count?: PaymentCountAggregateInputType | true _avg?: PaymentAvgAggregateInputType _sum?: PaymentSumAggregateInputType _min?: PaymentMinAggregateInputType _max?: PaymentMaxAggregateInputType } export type PaymentGroupByOutputType = { id: string bookingId: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId: string | null method: string | null amount: number status: $Enums.PaymentStatus rawCallback: runtime.JsonValue | null snapToken: string | null expiresAt: Date | null paidAt: Date | null failedAt: Date | null rejectionReason: string | null createdAt: Date updatedAt: Date _count: PaymentCountAggregateOutputType | null _avg: PaymentAvgAggregateOutputType | null _sum: PaymentSumAggregateOutputType | null _min: PaymentMinAggregateOutputType | null _max: PaymentMaxAggregateOutputType | null } export type GetPaymentGroupByPayload = Prisma.PrismaPromise< Array< Prisma.PickEnumerable & { [P in ((keyof T) & (keyof PaymentGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType : Prisma.GetScalarType } > > export type PaymentWhereInput = { AND?: Prisma.PaymentWhereInput | Prisma.PaymentWhereInput[] OR?: Prisma.PaymentWhereInput[] NOT?: Prisma.PaymentWhereInput | Prisma.PaymentWhereInput[] id?: Prisma.StringFilter<"Payment"> | string bookingId?: Prisma.StringFilter<"Payment"> | string provider?: Prisma.EnumPaymentProviderFilter<"Payment"> | $Enums.PaymentProvider externalOrderId?: Prisma.StringFilter<"Payment"> | string externalTxId?: Prisma.StringNullableFilter<"Payment"> | string | null method?: Prisma.StringNullableFilter<"Payment"> | string | null amount?: Prisma.IntFilter<"Payment"> | number status?: Prisma.EnumPaymentStatusFilter<"Payment"> | $Enums.PaymentStatus rawCallback?: Prisma.JsonNullableFilter<"Payment"> snapToken?: Prisma.StringNullableFilter<"Payment"> | string | null expiresAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null paidAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null failedAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null rejectionReason?: Prisma.StringNullableFilter<"Payment"> | string | null createdAt?: Prisma.DateTimeFilter<"Payment"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Payment"> | Date | string booking?: Prisma.XOR refunds?: Prisma.RefundListRelationFilter } export type PaymentOrderByWithRelationInput = { id?: Prisma.SortOrder bookingId?: Prisma.SortOrder provider?: Prisma.SortOrder externalOrderId?: Prisma.SortOrder externalTxId?: Prisma.SortOrderInput | Prisma.SortOrder method?: Prisma.SortOrderInput | Prisma.SortOrder amount?: Prisma.SortOrder status?: Prisma.SortOrder rawCallback?: Prisma.SortOrderInput | Prisma.SortOrder snapToken?: Prisma.SortOrderInput | Prisma.SortOrder expiresAt?: Prisma.SortOrderInput | Prisma.SortOrder paidAt?: Prisma.SortOrderInput | Prisma.SortOrder failedAt?: Prisma.SortOrderInput | Prisma.SortOrder rejectionReason?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder booking?: Prisma.BookingOrderByWithRelationInput refunds?: Prisma.RefundOrderByRelationAggregateInput } export type PaymentWhereUniqueInput = Prisma.AtLeast<{ id?: string externalOrderId?: string AND?: Prisma.PaymentWhereInput | Prisma.PaymentWhereInput[] OR?: Prisma.PaymentWhereInput[] NOT?: Prisma.PaymentWhereInput | Prisma.PaymentWhereInput[] bookingId?: Prisma.StringFilter<"Payment"> | string provider?: Prisma.EnumPaymentProviderFilter<"Payment"> | $Enums.PaymentProvider externalTxId?: Prisma.StringNullableFilter<"Payment"> | string | null method?: Prisma.StringNullableFilter<"Payment"> | string | null amount?: Prisma.IntFilter<"Payment"> | number status?: Prisma.EnumPaymentStatusFilter<"Payment"> | $Enums.PaymentStatus rawCallback?: Prisma.JsonNullableFilter<"Payment"> snapToken?: Prisma.StringNullableFilter<"Payment"> | string | null expiresAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null paidAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null failedAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null rejectionReason?: Prisma.StringNullableFilter<"Payment"> | string | null createdAt?: Prisma.DateTimeFilter<"Payment"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Payment"> | Date | string booking?: Prisma.XOR refunds?: Prisma.RefundListRelationFilter }, "id" | "externalOrderId"> export type PaymentOrderByWithAggregationInput = { id?: Prisma.SortOrder bookingId?: Prisma.SortOrder provider?: Prisma.SortOrder externalOrderId?: Prisma.SortOrder externalTxId?: Prisma.SortOrderInput | Prisma.SortOrder method?: Prisma.SortOrderInput | Prisma.SortOrder amount?: Prisma.SortOrder status?: Prisma.SortOrder rawCallback?: Prisma.SortOrderInput | Prisma.SortOrder snapToken?: Prisma.SortOrderInput | Prisma.SortOrder expiresAt?: Prisma.SortOrderInput | Prisma.SortOrder paidAt?: Prisma.SortOrderInput | Prisma.SortOrder failedAt?: Prisma.SortOrderInput | Prisma.SortOrder rejectionReason?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder _count?: Prisma.PaymentCountOrderByAggregateInput _avg?: Prisma.PaymentAvgOrderByAggregateInput _max?: Prisma.PaymentMaxOrderByAggregateInput _min?: Prisma.PaymentMinOrderByAggregateInput _sum?: Prisma.PaymentSumOrderByAggregateInput } export type PaymentScalarWhereWithAggregatesInput = { AND?: Prisma.PaymentScalarWhereWithAggregatesInput | Prisma.PaymentScalarWhereWithAggregatesInput[] OR?: Prisma.PaymentScalarWhereWithAggregatesInput[] NOT?: Prisma.PaymentScalarWhereWithAggregatesInput | Prisma.PaymentScalarWhereWithAggregatesInput[] id?: Prisma.StringWithAggregatesFilter<"Payment"> | string bookingId?: Prisma.StringWithAggregatesFilter<"Payment"> | string provider?: Prisma.EnumPaymentProviderWithAggregatesFilter<"Payment"> | $Enums.PaymentProvider externalOrderId?: Prisma.StringWithAggregatesFilter<"Payment"> | string externalTxId?: Prisma.StringNullableWithAggregatesFilter<"Payment"> | string | null method?: Prisma.StringNullableWithAggregatesFilter<"Payment"> | string | null amount?: Prisma.IntWithAggregatesFilter<"Payment"> | number status?: Prisma.EnumPaymentStatusWithAggregatesFilter<"Payment"> | $Enums.PaymentStatus rawCallback?: Prisma.JsonNullableWithAggregatesFilter<"Payment"> snapToken?: Prisma.StringNullableWithAggregatesFilter<"Payment"> | string | null expiresAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Payment"> | Date | string | null paidAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Payment"> | Date | string | null failedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Payment"> | Date | string | null rejectionReason?: Prisma.StringNullableWithAggregatesFilter<"Payment"> | string | null createdAt?: Prisma.DateTimeWithAggregatesFilter<"Payment"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Payment"> | Date | string } export type PaymentCreateInput = { id?: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string booking: Prisma.BookingCreateNestedOneWithoutPaymentsInput refunds?: Prisma.RefundCreateNestedManyWithoutPaymentInput } export type PaymentUncheckedCreateInput = { id?: string bookingId: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutPaymentInput } export type PaymentUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string booking?: Prisma.BookingUpdateOneRequiredWithoutPaymentsNestedInput refunds?: Prisma.RefundUpdateManyWithoutPaymentNestedInput } export type PaymentUncheckedUpdateInput = { id?: Prisma.StringFieldUpdateOperationsInput | string bookingId?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string refunds?: Prisma.RefundUncheckedUpdateManyWithoutPaymentNestedInput } export type PaymentCreateManyInput = { id?: string bookingId: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string } export type PaymentUpdateManyMutationInput = { id?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PaymentUncheckedUpdateManyInput = { id?: Prisma.StringFieldUpdateOperationsInput | string bookingId?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PaymentListRelationFilter = { every?: Prisma.PaymentWhereInput some?: Prisma.PaymentWhereInput none?: Prisma.PaymentWhereInput } export type PaymentOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } export type PaymentCountOrderByAggregateInput = { id?: Prisma.SortOrder bookingId?: Prisma.SortOrder provider?: Prisma.SortOrder externalOrderId?: Prisma.SortOrder externalTxId?: Prisma.SortOrder method?: Prisma.SortOrder amount?: Prisma.SortOrder status?: Prisma.SortOrder rawCallback?: Prisma.SortOrder snapToken?: Prisma.SortOrder expiresAt?: Prisma.SortOrder paidAt?: Prisma.SortOrder failedAt?: Prisma.SortOrder rejectionReason?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PaymentAvgOrderByAggregateInput = { amount?: Prisma.SortOrder } export type PaymentMaxOrderByAggregateInput = { id?: Prisma.SortOrder bookingId?: Prisma.SortOrder provider?: Prisma.SortOrder externalOrderId?: Prisma.SortOrder externalTxId?: Prisma.SortOrder method?: Prisma.SortOrder amount?: Prisma.SortOrder status?: Prisma.SortOrder snapToken?: Prisma.SortOrder expiresAt?: Prisma.SortOrder paidAt?: Prisma.SortOrder failedAt?: Prisma.SortOrder rejectionReason?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PaymentMinOrderByAggregateInput = { id?: Prisma.SortOrder bookingId?: Prisma.SortOrder provider?: Prisma.SortOrder externalOrderId?: Prisma.SortOrder externalTxId?: Prisma.SortOrder method?: Prisma.SortOrder amount?: Prisma.SortOrder status?: Prisma.SortOrder snapToken?: Prisma.SortOrder expiresAt?: Prisma.SortOrder paidAt?: Prisma.SortOrder failedAt?: Prisma.SortOrder rejectionReason?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } export type PaymentSumOrderByAggregateInput = { amount?: Prisma.SortOrder } export type PaymentNullableScalarRelationFilter = { is?: Prisma.PaymentWhereInput | null isNot?: Prisma.PaymentWhereInput | null } export type PaymentCreateNestedManyWithoutBookingInput = { create?: Prisma.XOR | Prisma.PaymentCreateWithoutBookingInput[] | Prisma.PaymentUncheckedCreateWithoutBookingInput[] connectOrCreate?: Prisma.PaymentCreateOrConnectWithoutBookingInput | Prisma.PaymentCreateOrConnectWithoutBookingInput[] createMany?: Prisma.PaymentCreateManyBookingInputEnvelope connect?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] } export type PaymentUncheckedCreateNestedManyWithoutBookingInput = { create?: Prisma.XOR | Prisma.PaymentCreateWithoutBookingInput[] | Prisma.PaymentUncheckedCreateWithoutBookingInput[] connectOrCreate?: Prisma.PaymentCreateOrConnectWithoutBookingInput | Prisma.PaymentCreateOrConnectWithoutBookingInput[] createMany?: Prisma.PaymentCreateManyBookingInputEnvelope connect?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] } export type PaymentUpdateManyWithoutBookingNestedInput = { create?: Prisma.XOR | Prisma.PaymentCreateWithoutBookingInput[] | Prisma.PaymentUncheckedCreateWithoutBookingInput[] connectOrCreate?: Prisma.PaymentCreateOrConnectWithoutBookingInput | Prisma.PaymentCreateOrConnectWithoutBookingInput[] upsert?: Prisma.PaymentUpsertWithWhereUniqueWithoutBookingInput | Prisma.PaymentUpsertWithWhereUniqueWithoutBookingInput[] createMany?: Prisma.PaymentCreateManyBookingInputEnvelope set?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] disconnect?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] delete?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] connect?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] update?: Prisma.PaymentUpdateWithWhereUniqueWithoutBookingInput | Prisma.PaymentUpdateWithWhereUniqueWithoutBookingInput[] updateMany?: Prisma.PaymentUpdateManyWithWhereWithoutBookingInput | Prisma.PaymentUpdateManyWithWhereWithoutBookingInput[] deleteMany?: Prisma.PaymentScalarWhereInput | Prisma.PaymentScalarWhereInput[] } export type PaymentUncheckedUpdateManyWithoutBookingNestedInput = { create?: Prisma.XOR | Prisma.PaymentCreateWithoutBookingInput[] | Prisma.PaymentUncheckedCreateWithoutBookingInput[] connectOrCreate?: Prisma.PaymentCreateOrConnectWithoutBookingInput | Prisma.PaymentCreateOrConnectWithoutBookingInput[] upsert?: Prisma.PaymentUpsertWithWhereUniqueWithoutBookingInput | Prisma.PaymentUpsertWithWhereUniqueWithoutBookingInput[] createMany?: Prisma.PaymentCreateManyBookingInputEnvelope set?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] disconnect?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] delete?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] connect?: Prisma.PaymentWhereUniqueInput | Prisma.PaymentWhereUniqueInput[] update?: Prisma.PaymentUpdateWithWhereUniqueWithoutBookingInput | Prisma.PaymentUpdateWithWhereUniqueWithoutBookingInput[] updateMany?: Prisma.PaymentUpdateManyWithWhereWithoutBookingInput | Prisma.PaymentUpdateManyWithWhereWithoutBookingInput[] deleteMany?: Prisma.PaymentScalarWhereInput | Prisma.PaymentScalarWhereInput[] } export type EnumPaymentProviderFieldUpdateOperationsInput = { set?: $Enums.PaymentProvider } export type EnumPaymentStatusFieldUpdateOperationsInput = { set?: $Enums.PaymentStatus } export type PaymentCreateNestedOneWithoutRefundsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PaymentCreateOrConnectWithoutRefundsInput connect?: Prisma.PaymentWhereUniqueInput } export type PaymentUpdateOneWithoutRefundsNestedInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PaymentCreateOrConnectWithoutRefundsInput upsert?: Prisma.PaymentUpsertWithoutRefundsInput disconnect?: Prisma.PaymentWhereInput | boolean delete?: Prisma.PaymentWhereInput | boolean connect?: Prisma.PaymentWhereUniqueInput update?: Prisma.XOR, Prisma.PaymentUncheckedUpdateWithoutRefundsInput> } export type PaymentCreateWithoutBookingInput = { id?: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string refunds?: Prisma.RefundCreateNestedManyWithoutPaymentInput } export type PaymentUncheckedCreateWithoutBookingInput = { id?: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string refunds?: Prisma.RefundUncheckedCreateNestedManyWithoutPaymentInput } export type PaymentCreateOrConnectWithoutBookingInput = { where: Prisma.PaymentWhereUniqueInput create: Prisma.XOR } export type PaymentCreateManyBookingInputEnvelope = { data: Prisma.PaymentCreateManyBookingInput | Prisma.PaymentCreateManyBookingInput[] skipDuplicates?: boolean } export type PaymentUpsertWithWhereUniqueWithoutBookingInput = { where: Prisma.PaymentWhereUniqueInput update: Prisma.XOR create: Prisma.XOR } export type PaymentUpdateWithWhereUniqueWithoutBookingInput = { where: Prisma.PaymentWhereUniqueInput data: Prisma.XOR } export type PaymentUpdateManyWithWhereWithoutBookingInput = { where: Prisma.PaymentScalarWhereInput data: Prisma.XOR } export type PaymentScalarWhereInput = { AND?: Prisma.PaymentScalarWhereInput | Prisma.PaymentScalarWhereInput[] OR?: Prisma.PaymentScalarWhereInput[] NOT?: Prisma.PaymentScalarWhereInput | Prisma.PaymentScalarWhereInput[] id?: Prisma.StringFilter<"Payment"> | string bookingId?: Prisma.StringFilter<"Payment"> | string provider?: Prisma.EnumPaymentProviderFilter<"Payment"> | $Enums.PaymentProvider externalOrderId?: Prisma.StringFilter<"Payment"> | string externalTxId?: Prisma.StringNullableFilter<"Payment"> | string | null method?: Prisma.StringNullableFilter<"Payment"> | string | null amount?: Prisma.IntFilter<"Payment"> | number status?: Prisma.EnumPaymentStatusFilter<"Payment"> | $Enums.PaymentStatus rawCallback?: Prisma.JsonNullableFilter<"Payment"> snapToken?: Prisma.StringNullableFilter<"Payment"> | string | null expiresAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null paidAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null failedAt?: Prisma.DateTimeNullableFilter<"Payment"> | Date | string | null rejectionReason?: Prisma.StringNullableFilter<"Payment"> | string | null createdAt?: Prisma.DateTimeFilter<"Payment"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Payment"> | Date | string } export type PaymentCreateWithoutRefundsInput = { id?: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string booking: Prisma.BookingCreateNestedOneWithoutPaymentsInput } export type PaymentUncheckedCreateWithoutRefundsInput = { id?: string bookingId: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string } export type PaymentCreateOrConnectWithoutRefundsInput = { where: Prisma.PaymentWhereUniqueInput create: Prisma.XOR } export type PaymentUpsertWithoutRefundsInput = { update: Prisma.XOR create: Prisma.XOR where?: Prisma.PaymentWhereInput } export type PaymentUpdateToOneWithWhereWithoutRefundsInput = { where?: Prisma.PaymentWhereInput data: Prisma.XOR } export type PaymentUpdateWithoutRefundsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string booking?: Prisma.BookingUpdateOneRequiredWithoutPaymentsNestedInput } export type PaymentUncheckedUpdateWithoutRefundsInput = { id?: Prisma.StringFieldUpdateOperationsInput | string bookingId?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type PaymentCreateManyBookingInput = { id?: string provider: $Enums.PaymentProvider externalOrderId: string externalTxId?: string | null method?: string | null amount: number status?: $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: string | null expiresAt?: Date | string | null paidAt?: Date | string | null failedAt?: Date | string | null rejectionReason?: string | null createdAt?: Date | string updatedAt?: Date | string } export type PaymentUpdateWithoutBookingInput = { id?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string refunds?: Prisma.RefundUpdateManyWithoutPaymentNestedInput } export type PaymentUncheckedUpdateWithoutBookingInput = { id?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string refunds?: Prisma.RefundUncheckedUpdateManyWithoutPaymentNestedInput } export type PaymentUncheckedUpdateManyWithoutBookingInput = { id?: Prisma.StringFieldUpdateOperationsInput | string provider?: Prisma.EnumPaymentProviderFieldUpdateOperationsInput | $Enums.PaymentProvider externalOrderId?: Prisma.StringFieldUpdateOperationsInput | string externalTxId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null method?: Prisma.NullableStringFieldUpdateOperationsInput | string | null amount?: Prisma.IntFieldUpdateOperationsInput | number status?: Prisma.EnumPaymentStatusFieldUpdateOperationsInput | $Enums.PaymentStatus rawCallback?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue snapToken?: Prisma.NullableStringFieldUpdateOperationsInput | string | null expiresAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null paidAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null failedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null rejectionReason?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } /** * Count Type PaymentCountOutputType */ export type PaymentCountOutputType = { refunds: number } export type PaymentCountOutputTypeSelect = { refunds?: boolean | PaymentCountOutputTypeCountRefundsArgs } /** * PaymentCountOutputType without action */ export type PaymentCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the PaymentCountOutputType */ select?: Prisma.PaymentCountOutputTypeSelect | null } /** * PaymentCountOutputType without action */ export type PaymentCountOutputTypeCountRefundsArgs = { where?: Prisma.RefundWhereInput } export type PaymentSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean bookingId?: boolean provider?: boolean externalOrderId?: boolean externalTxId?: boolean method?: boolean amount?: boolean status?: boolean rawCallback?: boolean snapToken?: boolean expiresAt?: boolean paidAt?: boolean failedAt?: boolean rejectionReason?: boolean createdAt?: boolean updatedAt?: boolean booking?: boolean | Prisma.BookingDefaultArgs refunds?: boolean | Prisma.Payment$refundsArgs _count?: boolean | Prisma.PaymentCountOutputTypeDefaultArgs }, ExtArgs["result"]["payment"]> export type PaymentSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean bookingId?: boolean provider?: boolean externalOrderId?: boolean externalTxId?: boolean method?: boolean amount?: boolean status?: boolean rawCallback?: boolean snapToken?: boolean expiresAt?: boolean paidAt?: boolean failedAt?: boolean rejectionReason?: boolean createdAt?: boolean updatedAt?: boolean booking?: boolean | Prisma.BookingDefaultArgs }, ExtArgs["result"]["payment"]> export type PaymentSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ id?: boolean bookingId?: boolean provider?: boolean externalOrderId?: boolean externalTxId?: boolean method?: boolean amount?: boolean status?: boolean rawCallback?: boolean snapToken?: boolean expiresAt?: boolean paidAt?: boolean failedAt?: boolean rejectionReason?: boolean createdAt?: boolean updatedAt?: boolean booking?: boolean | Prisma.BookingDefaultArgs }, ExtArgs["result"]["payment"]> export type PaymentSelectScalar = { id?: boolean bookingId?: boolean provider?: boolean externalOrderId?: boolean externalTxId?: boolean method?: boolean amount?: boolean status?: boolean rawCallback?: boolean snapToken?: boolean expiresAt?: boolean paidAt?: boolean failedAt?: boolean rejectionReason?: boolean createdAt?: boolean updatedAt?: boolean } export type PaymentOmit = runtime.Types.Extensions.GetOmit<"id" | "bookingId" | "provider" | "externalOrderId" | "externalTxId" | "method" | "amount" | "status" | "rawCallback" | "snapToken" | "expiresAt" | "paidAt" | "failedAt" | "rejectionReason" | "createdAt" | "updatedAt", ExtArgs["result"]["payment"]> export type PaymentInclude = { booking?: boolean | Prisma.BookingDefaultArgs refunds?: boolean | Prisma.Payment$refundsArgs _count?: boolean | Prisma.PaymentCountOutputTypeDefaultArgs } export type PaymentIncludeCreateManyAndReturn = { booking?: boolean | Prisma.BookingDefaultArgs } export type PaymentIncludeUpdateManyAndReturn = { booking?: boolean | Prisma.BookingDefaultArgs } export type $PaymentPayload = { name: "Payment" objects: { booking: Prisma.$BookingPayload refunds: Prisma.$RefundPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: string bookingId: string provider: $Enums.PaymentProvider /** * order_id eksternal (unik per attempt). Format MANUAL: `manual-`. * Format MIDTRANS nanti: `midtrans--`. */ externalOrderId: string /** * transaction_id dari gateway. Kosong untuk MANUAL atau sebelum first callback. */ externalTxId: string | null /** * Metode konkret: bca_va, gopay, qris, manual_transfer, dst. */ method: string | null amount: number status: $Enums.PaymentStatus /** * Snapshot mentah callback gateway (untuk audit & dispute). */ rawCallback: runtime.JsonValue | null /** * Snap token Midtrans / redirect URL. */ snapToken: string | null /** * Kapan attempt ini kadaluarsa (Midtrans default 24 jam). */ expiresAt: Date | null paidAt: Date | null failedAt: Date | null rejectionReason: string | null createdAt: Date updatedAt: Date }, ExtArgs["result"]["payment"]> composites: {} } export type PaymentGetPayload = runtime.Types.Result.GetResult export type PaymentCountArgs = Omit & { select?: PaymentCountAggregateInputType | true } export interface PaymentDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['Payment'], meta: { name: 'Payment' } } /** * Find zero or one Payment that matches the filter. * @param {PaymentFindUniqueArgs} args - Arguments to find a Payment * @example * // Get one Payment * const payment = await prisma.payment.findUnique({ * where: { * // ... provide filter here * } * }) */ findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find one Payment that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {PaymentFindUniqueOrThrowArgs} args - Arguments to find a Payment * @example * // Get one Payment * const payment = await prisma.payment.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) */ findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find the first Payment that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentFindFirstArgs} args - Arguments to find a Payment * @example * // Get one Payment * const payment = await prisma.payment.findFirst({ * where: { * // ... provide filter here * } * }) */ findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Find the first Payment that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentFindFirstOrThrowArgs} args - Arguments to find a Payment * @example * // Get one Payment * const payment = await prisma.payment.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) */ findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Find zero or more Payments that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all Payments * const payments = await prisma.payment.findMany() * * // Get first 10 Payments * const payments = await prisma.payment.findMany({ take: 10 }) * * // Only select the `id` * const paymentWithIdOnly = await prisma.payment.findMany({ select: { id: true } }) * */ findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> /** * Create a Payment. * @param {PaymentCreateArgs} args - Arguments to create a Payment. * @example * // Create one Payment * const Payment = await prisma.payment.create({ * data: { * // ... data to create a Payment * } * }) * */ create(args: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Create many Payments. * @param {PaymentCreateManyArgs} args - Arguments to create many Payments. * @example * // Create many Payments * const payment = await prisma.payment.createMany({ * data: [ * // ... provide data here * ] * }) * */ createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Create many Payments and returns the data saved in the database. * @param {PaymentCreateManyAndReturnArgs} args - Arguments to create many Payments. * @example * // Create many Payments * const payment = await prisma.payment.createManyAndReturn({ * data: [ * // ... provide data here * ] * }) * * // Create many Payments and only return the `id` * const paymentWithIdOnly = await prisma.payment.createManyAndReturn({ * select: { id: true }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> /** * Delete a Payment. * @param {PaymentDeleteArgs} args - Arguments to delete one Payment. * @example * // Delete one Payment * const Payment = await prisma.payment.delete({ * where: { * // ... filter to delete one Payment * } * }) * */ delete(args: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Update one Payment. * @param {PaymentUpdateArgs} args - Arguments to update one Payment. * @example * // Update one Payment * const payment = await prisma.payment.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ update(args: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Delete zero or more Payments. * @param {PaymentDeleteManyArgs} args - Arguments to filter Payments to delete. * @example * // Delete a few Payments * const { count } = await prisma.payment.deleteMany({ * where: { * // ... provide filter here * } * }) * */ deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Payments. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many Payments * const payment = await prisma.payment.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * */ updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise /** * Update zero or more Payments and returns the data updated in the database. * @param {PaymentUpdateManyAndReturnArgs} args - Arguments to update many Payments. * @example * // Update many Payments * const payment = await prisma.payment.updateManyAndReturn({ * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * * // Update zero or more Payments and only return the `id` * const paymentWithIdOnly = await prisma.payment.updateManyAndReturn({ * select: { id: true }, * where: { * // ... provide filter here * }, * data: [ * // ... provide data here * ] * }) * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * */ updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> /** * Create or update one Payment. * @param {PaymentUpsertArgs} args - Arguments to update or create a Payment. * @example * // Update or create a Payment * const payment = await prisma.payment.upsert({ * create: { * // ... data to create a Payment * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the Payment we want to update * } * }) */ upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PaymentClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> /** * Count the number of Payments. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentCountArgs} args - Arguments to filter Payments to count. * @example * // Count the number of Payments * const count = await prisma.payment.count({ * where: { * // ... the filter for the Payments we want to count * } * }) **/ count( args?: Prisma.Subset, ): Prisma.PrismaPromise< T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType : number > /** * Allows you to perform aggregations operations on a Payment. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Prisma.Subset): Prisma.PrismaPromise> /** * Group by Payment. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {PaymentGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends PaymentGroupByArgs, HasSelectOrTake extends Prisma.Or< Prisma.Extends<'skip', Prisma.Keys>, Prisma.Extends<'take', Prisma.Keys> >, OrderByArg extends Prisma.True extends HasSelectOrTake ? { orderBy: PaymentGroupByArgs['orderBy'] } : { orderBy?: PaymentGroupByArgs['orderBy'] }, OrderFields extends Prisma.ExcludeUnderscoreKeys>>, ByFields extends Prisma.MaybeTupleToUnion, ByValid extends Prisma.Has, HavingFields extends Prisma.GetHavingFields, HavingValid extends Prisma.Has, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Prisma.Keys ? 'orderBy' extends Prisma.Keys ? ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys ? 'orderBy' extends Prisma.Keys ? ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPaymentGroupByPayload : Prisma.PrismaPromise /** * Fields of the Payment model */ readonly fields: PaymentFieldRefs; } /** * The delegate class that acts as a "Promise-like" for Payment. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__PaymentClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" booking = {}>(args?: Prisma.Subset>): Prisma.Prisma__BookingClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> refunds = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise } /** * Fields of the Payment model */ export interface PaymentFieldRefs { readonly id: Prisma.FieldRef<"Payment", 'String'> readonly bookingId: Prisma.FieldRef<"Payment", 'String'> readonly provider: Prisma.FieldRef<"Payment", 'PaymentProvider'> readonly externalOrderId: Prisma.FieldRef<"Payment", 'String'> readonly externalTxId: Prisma.FieldRef<"Payment", 'String'> readonly method: Prisma.FieldRef<"Payment", 'String'> readonly amount: Prisma.FieldRef<"Payment", 'Int'> readonly status: Prisma.FieldRef<"Payment", 'PaymentStatus'> readonly rawCallback: Prisma.FieldRef<"Payment", 'Json'> readonly snapToken: Prisma.FieldRef<"Payment", 'String'> readonly expiresAt: Prisma.FieldRef<"Payment", 'DateTime'> readonly paidAt: Prisma.FieldRef<"Payment", 'DateTime'> readonly failedAt: Prisma.FieldRef<"Payment", 'DateTime'> readonly rejectionReason: Prisma.FieldRef<"Payment", 'String'> readonly createdAt: Prisma.FieldRef<"Payment", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Payment", 'DateTime'> } // Custom InputTypes /** * Payment findUnique */ export type PaymentFindUniqueArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * Filter, which Payment to fetch. */ where: Prisma.PaymentWhereUniqueInput } /** * Payment findUniqueOrThrow */ export type PaymentFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * Filter, which Payment to fetch. */ where: Prisma.PaymentWhereUniqueInput } /** * Payment findFirst */ export type PaymentFindFirstArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * Filter, which Payment to fetch. */ where?: Prisma.PaymentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Payments to fetch. */ orderBy?: Prisma.PaymentOrderByWithRelationInput | Prisma.PaymentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Payments. */ cursor?: Prisma.PaymentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Payments from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Payments. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Payments. */ distinct?: Prisma.PaymentScalarFieldEnum | Prisma.PaymentScalarFieldEnum[] } /** * Payment findFirstOrThrow */ export type PaymentFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * Filter, which Payment to fetch. */ where?: Prisma.PaymentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Payments to fetch. */ orderBy?: Prisma.PaymentOrderByWithRelationInput | Prisma.PaymentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for Payments. */ cursor?: Prisma.PaymentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Payments from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Payments. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Payments. */ distinct?: Prisma.PaymentScalarFieldEnum | Prisma.PaymentScalarFieldEnum[] } /** * Payment findMany */ export type PaymentFindManyArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * Filter, which Payments to fetch. */ where?: Prisma.PaymentWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of Payments to fetch. */ orderBy?: Prisma.PaymentOrderByWithRelationInput | Prisma.PaymentOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing Payments. */ cursor?: Prisma.PaymentWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` Payments from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` Payments. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of Payments. */ distinct?: Prisma.PaymentScalarFieldEnum | Prisma.PaymentScalarFieldEnum[] } /** * Payment create */ export type PaymentCreateArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * The data needed to create a Payment. */ data: Prisma.XOR } /** * Payment createMany */ export type PaymentCreateManyArgs = { /** * The data used to create many Payments. */ data: Prisma.PaymentCreateManyInput | Prisma.PaymentCreateManyInput[] skipDuplicates?: boolean } /** * Payment createManyAndReturn */ export type PaymentCreateManyAndReturnArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelectCreateManyAndReturn | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * The data used to create many Payments. */ data: Prisma.PaymentCreateManyInput | Prisma.PaymentCreateManyInput[] skipDuplicates?: boolean /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentIncludeCreateManyAndReturn | null } /** * Payment update */ export type PaymentUpdateArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * The data needed to update a Payment. */ data: Prisma.XOR /** * Choose, which Payment to update. */ where: Prisma.PaymentWhereUniqueInput } /** * Payment updateMany */ export type PaymentUpdateManyArgs = { /** * The data used to update Payments. */ data: Prisma.XOR /** * Filter which Payments to update */ where?: Prisma.PaymentWhereInput /** * Limit how many Payments to update. */ limit?: number } /** * Payment updateManyAndReturn */ export type PaymentUpdateManyAndReturnArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelectUpdateManyAndReturn | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * The data used to update Payments. */ data: Prisma.XOR /** * Filter which Payments to update */ where?: Prisma.PaymentWhereInput /** * Limit how many Payments to update. */ limit?: number /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentIncludeUpdateManyAndReturn | null } /** * Payment upsert */ export type PaymentUpsertArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * The filter to search for the Payment to update in case it exists. */ where: Prisma.PaymentWhereUniqueInput /** * In case the Payment found by the `where` argument doesn't exist, create a new Payment with this data. */ create: Prisma.XOR /** * In case the Payment was found with the provided `where` argument, update it with this data. */ update: Prisma.XOR } /** * Payment delete */ export type PaymentDeleteArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null /** * Filter which Payment to delete. */ where: Prisma.PaymentWhereUniqueInput } /** * Payment deleteMany */ export type PaymentDeleteManyArgs = { /** * Filter which Payments to delete */ where?: Prisma.PaymentWhereInput /** * Limit how many Payments to delete. */ limit?: number } /** * Payment.refunds */ export type Payment$refundsArgs = { /** * Select specific fields to fetch from the Refund */ select?: Prisma.RefundSelect | null /** * Omit specific fields from the Refund */ omit?: Prisma.RefundOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.RefundInclude | null where?: Prisma.RefundWhereInput orderBy?: Prisma.RefundOrderByWithRelationInput | Prisma.RefundOrderByWithRelationInput[] cursor?: Prisma.RefundWhereUniqueInput take?: number skip?: number distinct?: Prisma.RefundScalarFieldEnum | Prisma.RefundScalarFieldEnum[] } /** * Payment without action */ export type PaymentDefaultArgs = { /** * Select specific fields to fetch from the Payment */ select?: Prisma.PaymentSelect | null /** * Omit specific fields from the Payment */ omit?: Prisma.PaymentOmit | null /** * Choose, which related nodes to fetch as well */ include?: Prisma.PaymentInclude | null }