Skip to content

Clean up the resource type definitions #12

@rgarver

Description

@rgarver

The current resource type definitions are messy and difficult to parse in Typescript and IDE hints. Resources like SubscribePro.V2.Customers and others should be simplified and easy to parse, eg:

type CustomersServiceType = {
  getOne({ client, id }: { client?: Client; id: string | number; }): Promise<CustomerType | null>
  getAll({ client, params }: { client?: Client; params?: CustomerSearchParams; }): Promise<SearchResults<CustomerType[]>>
  updateOne({ client, id, data }: { client?: Client; id: string | number; data: UpdateCustomerType; }): Promise<CustomerType | null>;
  createOne({ client, data }: { client?: Client; data: CreateCustomerType; }): Promise<CustomerType | null>;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions