arky-sdk 0.5.40 → 0.5.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1100,14 +1100,36 @@ var createBookingApi = (apiConfig) => {
1100
1100
  }
1101
1101
  );
1102
1102
  },
1103
- async getProviderWorkingTime(params, options) {
1104
- const { providerId, ...queryParams } = params;
1103
+ async findServiceProviders(params, options) {
1104
+ const targetBusinessId = params.businessId || apiConfig.businessId;
1105
1105
  return apiConfig.httpClient.get(
1106
- `/v1/businesses/${apiConfig.businessId}/providers/${providerId}/working-time`,
1107
- {
1108
- ...options,
1109
- params: queryParams
1110
- }
1106
+ `/v1/businesses/${targetBusinessId}/services/${params.serviceId}/providers`,
1107
+ options
1108
+ );
1109
+ },
1110
+ async createServiceProvider(params, options) {
1111
+ const { businessId, serviceId, ...payload } = params;
1112
+ const targetBusinessId = businessId || apiConfig.businessId;
1113
+ return apiConfig.httpClient.post(
1114
+ `/v1/businesses/${targetBusinessId}/services/${serviceId}/providers`,
1115
+ payload,
1116
+ options
1117
+ );
1118
+ },
1119
+ async updateServiceProvider(params, options) {
1120
+ const { businessId, serviceId, id, ...payload } = params;
1121
+ const targetBusinessId = businessId || apiConfig.businessId;
1122
+ return apiConfig.httpClient.put(
1123
+ `/v1/businesses/${targetBusinessId}/services/${serviceId}/providers/${id}`,
1124
+ payload,
1125
+ options
1126
+ );
1127
+ },
1128
+ async deleteServiceProvider(params, options) {
1129
+ const targetBusinessId = params.businessId || apiConfig.businessId;
1130
+ return apiConfig.httpClient.delete(
1131
+ `/v1/businesses/${targetBusinessId}/services/${params.serviceId}/providers/${params.id}`,
1132
+ options
1111
1133
  );
1112
1134
  }
1113
1135
  };