SimpleContractsApi - functional programming interface export

  • Parameters

    Returns {
        apiSimpleContractsContractIdPut(contractId: string, simpleContractUpdateDeets?: SimpleContractUpdateDeets, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        apiSimpleContractsDelete(contractId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        getSimpleContracts(activeOnly?: boolean, limit?: number, page?: number, userId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContractListResponse>)>;
        simpleContractPayments(id: string, limit?: number, page?: number, userId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentCycleListResponse>)>;
        simpleContractsDeleteAvatar(id: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        simpleContractsGetAvatarById(id: string, userId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        simpleContractsGETByAccountAndId(accountId: string, contractId: string, specificRevision?: number, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        simpleContractsGETById(id: string, specificRevision?: number, userId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        simpleContractsPOST(simpleContractCreateDeets?: SimpleContractCreateDeets, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        simpleContractsPOSTAccept(id: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        simpleContractsPOSTArchive(id: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        simpleContractsPOSTDecline(id: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>;
        simpleContractsUpdateAvatar(id: string, file?: File, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        simpleContractsUpdateAvatarByDeets(id: string, userId?: string, avatarBytes?: AvatarBytes, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        simpleContractsUpdateAvatarByPrompt(id: string, avatarPromptCreateDeets?: AvatarPromptCreateDeets, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
    }

    • apiSimpleContractsContractIdPut:function
      • summary Update a SimpleContract

        Parameters

        • contractId: string

          the ContractId of the Contract (not the Id property)

        • OptionalsimpleContractUpdateDeets: SimpleContractUpdateDeets
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • apiSimpleContractsDelete:function
      • summary Delete a SimpleContract

        Parameters

        • OptionalcontractId: string
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

    • getSimpleContracts:function
      • SimpleContracts are a lighter-weight version of the standard contracts. Contracts are core to the Mozaic API, they contain Income objects which have child terms used to specify the rules of how income should be split or sent to payees.

        summary List all SimpleContracts

        Parameters

        • OptionalactiveOnly: boolean

          If true only active SimpleContracts will be returned

        • Optionallimit: number

          A limit of the number of objects to be returned for the next page, between 1 and 100. The default is 25

        • Optionalpage: number

          1-based page index for paginated results

        • OptionaluserId: string

          The user id to operate on their behalf (tenants only)

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContractListResponse>)>

    • simpleContractPayments:function
      • summary Retrieve a list of all related payments

        Parameters

        • id: string
        • Optionallimit: number

          A limit of the number of objects to be returned for the next page, between 1 and 100. The default is 25

        • Optionalpage: number

          1-based page index for paginated results

        • OptionaluserId: string

          The user id to operate on their behalf (tenants only)

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentCycleListResponse>)>

    • simpleContractsDeleteAvatar:function
      • summary Reset avatar to the default

        Parameters

        • id: string
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

    • simpleContractsGetAvatarById:function
      • summary Retrieve an avatar by id

        Parameters

        • id: string

          The id of the record you wish to retrieve

        • OptionaluserId: string

          The user id to operate on their behalf (tenants only)

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

    • simpleContractsGETByAccountAndId:function
      • Returns a single `SimpleContract` object based on the specified id

        summary Retrieve a SimpleContract by accountID and contract ID

        Parameters

        • accountId: string

          The id of the account that holds the simple contract

        • contractId: string

          The id of the SimpleContract you want to retrieve

        • OptionalspecificRevision: number

          Optional revision number of the contract to retrieve

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • simpleContractsGETById:function
      • Returns a single `SimpleContract` object based on the specified id

        summary Retrieve a SimpleContract

        Parameters

        • id: string

          The id of the record you wish to retrieve

        • OptionalspecificRevision: number
        • OptionaluserId: string

          The user id to operate on their behalf (tenants only)

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • simpleContractsPOST:function
      • Used to create new SimpleContracts or link to a existing SimpleContract group

        summary Create a SimpleContract

        Parameters

        • OptionalsimpleContractCreateDeets: SimpleContractCreateDeets
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • simpleContractsPOSTAccept:function
      • summary Accept the specified SimpleContract

        Parameters

        • id: string
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • simpleContractsPOSTArchive:function
      • summary Archive the specified SimpleContract

        Parameters

        • id: string
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • simpleContractsPOSTDecline:function
      • summary Decline the specified SimpleContract

        Parameters

        • id: string
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<SimpleContract>)>

    • simpleContractsUpdateAvatar:function
      • avatar_id could be tenant.id, SimpleContract.id, work.id, project.id, team.id, etc summary Upload avatar image via file

        Parameters

        • id: string

          SimpleContract id

        • Optionalfile: File
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

    • simpleContractsUpdateAvatarByDeets:function
      • avatar_id could be tenant.id, SimpleContract.id, work.id, project.id, team.id, etc summary Upload avatar via JSON body

        Parameters

        • id: string

          The id of the record you wish to retrieve

        • OptionaluserId: string

          The user id to operate on their behalf (tenants only)

        • OptionalavatarBytes: AvatarBytes
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

    • simpleContractsUpdateAvatarByPrompt:function
      • avatar_id could be tenant.id, SimpleContract.id, work.id, project.id, team.id, etc summary Generate a new avatar image via AI prompt.

        Parameters

        • id: string
        • OptionalavatarPromptCreateDeets: AvatarPromptCreateDeets
        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>