import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import type * as Square from "../../../index"; import { WageSettingClient } from "../resources/wageSetting/client/Client"; export declare namespace TeamMembersClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class TeamMembersClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _wageSetting: WageSettingClient | undefined; constructor(options?: TeamMembersClient.Options); get wageSetting(): WageSettingClient; /** * Creates a single `TeamMember` object. The `TeamMember` object is returned on successful creates. * You must provide the following values in your request to this endpoint: * - `given_name` * - `family_name` * * Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#createteammember). * * @param {Square.CreateTeamMemberRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.teamMembers.create({ * idempotencyKey: "idempotency-key-0", * teamMember: { * referenceId: "reference_id_1", * status: "ACTIVE", * givenName: "Joe", * familyName: "Doe", * emailAddress: "joe_doe@gmail.com", * phoneNumber: "+14159283333", * assignedLocations: { * assignmentType: "EXPLICIT_LOCATIONS", * locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"] * }, * wageSetting: { * jobAssignments: [{ * payType: "SALARY", * annualRate: { * amount: BigInt("3000000"), * currency: "USD" * }, * weeklyHours: 40, * jobId: "FjS8x95cqHiMenw4f1NAUH4P" * }, { * payType: "HOURLY", * hourlyRate: { * amount: BigInt("2000"), * currency: "USD" * }, * jobId: "VDNpRv8da51NU8qZFC5zDWpF" * }], * isOvertimeExempt: true * } * } * }) */ create(request: Square.CreateTeamMemberRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Creates multiple `TeamMember` objects. The created `TeamMember` objects are returned on successful creates. * This process is non-transactional and processes as much of the request as possible. If one of the creates in * the request cannot be successfully processed, the request is not marked as failed, but the body of the response * contains explicit error information for the failed create. * * Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#bulk-create-team-members). * * @param {Square.BatchCreateTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.teamMembers.batchCreate({ * teamMembers: { * "idempotency-key-1": { * teamMember: { * referenceId: "reference_id_1", * givenName: "Joe", * familyName: "Doe", * emailAddress: "joe_doe@gmail.com", * phoneNumber: "+14159283333", * assignedLocations: { * assignmentType: "EXPLICIT_LOCATIONS", * locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"] * } * } * }, * "idempotency-key-2": { * teamMember: { * referenceId: "reference_id_2", * givenName: "Jane", * familyName: "Smith", * emailAddress: "jane_smith@gmail.com", * phoneNumber: "+14159223334", * assignedLocations: { * assignmentType: "ALL_CURRENT_AND_FUTURE_LOCATIONS" * } * } * } * } * }) */ batchCreate(request: Square.BatchCreateTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __batchCreate; /** * Updates multiple `TeamMember` objects. The updated `TeamMember` objects are returned on successful updates. * This process is non-transactional and processes as much of the request as possible. If one of the updates in * the request cannot be successfully processed, the request is not marked as failed, but the body of the response * contains explicit error information for the failed update. * Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#bulk-update-team-members). * * @param {Square.BatchUpdateTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.teamMembers.batchUpdate({ * teamMembers: { * "AFMwA08kR-MIF-3Vs0OE": { * teamMember: { * referenceId: "reference_id_2", * isOwner: false, * status: "ACTIVE", * givenName: "Jane", * familyName: "Smith", * emailAddress: "jane_smith@gmail.com", * phoneNumber: "+14159223334", * assignedLocations: { * assignmentType: "ALL_CURRENT_AND_FUTURE_LOCATIONS" * } * } * }, * "fpgteZNMaf0qOK-a4t6P": { * teamMember: { * referenceId: "reference_id_1", * isOwner: false, * status: "ACTIVE", * givenName: "Joe", * familyName: "Doe", * emailAddress: "joe_doe@gmail.com", * phoneNumber: "+14159283333", * assignedLocations: { * assignmentType: "EXPLICIT_LOCATIONS", * locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"] * } * } * } * } * }) */ batchUpdate(request: Square.BatchUpdateTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __batchUpdate; /** * Returns a paginated list of `TeamMember` objects for a business. * The list can be filtered by location IDs, `ACTIVE` or `INACTIVE` status, or whether * the team member is the Square account owner. * * @param {Square.SearchTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.teamMembers.search({ * query: { * filter: { * locationIds: ["0G5P3VGACMMQZ"], * status: "ACTIVE" * } * }, * limit: 10 * }) */ search(request?: Square.SearchTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __search; /** * Retrieves a `TeamMember` object for the given `TeamMember.id`. * Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrieve-a-team-member). * * @param {Square.GetTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.teamMembers.get({ * teamMemberId: "team_member_id" * }) */ get(request: Square.GetTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Updates a single `TeamMember` object. The `TeamMember` object is returned on successful updates. * Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#update-a-team-member). * * @param {Square.UpdateTeamMembersRequest} request * @param {TeamMembersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.teamMembers.update({ * teamMemberId: "team_member_id", * body: { * teamMember: { * referenceId: "reference_id_1", * status: "ACTIVE", * givenName: "Joe", * familyName: "Doe", * emailAddress: "joe_doe@gmail.com", * phoneNumber: "+14159283333", * assignedLocations: { * assignmentType: "EXPLICIT_LOCATIONS", * locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"] * }, * wageSetting: { * jobAssignments: [{ * payType: "SALARY", * annualRate: { * amount: BigInt("3000000"), * currency: "USD" * }, * weeklyHours: 40, * jobId: "FjS8x95cqHiMenw4f1NAUH4P" * }, { * payType: "HOURLY", * hourlyRate: { * amount: BigInt("1200"), * currency: "USD" * }, * jobId: "VDNpRv8da51NU8qZFC5zDWpF" * }], * isOvertimeExempt: true * } * } * } * }) */ update(request: Square.UpdateTeamMembersRequest, requestOptions?: TeamMembersClient.RequestOptions): core.HttpResponsePromise; private __update; }