starta.apiclient 1.112.12824 → 1.112.12829

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.
@@ -124,7 +124,7 @@ export default class Organizations {
124
124
  receiveReward(organizationLogin: string, rewardType: OrgRewardType): Promise<import("../../types").StartaResponse>;
125
125
  setRewardConditions(organizationLogin: string, rewardType: OrgRewardType, conditions: any): Promise<import("../../types").StartaResponse>;
126
126
  getStats(organizationLogin: string): Promise<import("../../types").StartaResponse>;
127
- setAiEnabled(organizationLogin: string, aiEnabled?: boolean): Promise<import("../../types").StartaResponse>;
127
+ setAiEnabled(organizationLogin: string, aiEnabled?: boolean, aiModelFamily?: 'GROK' | 'OPENAI' | 'GEMINI'): Promise<import("../../types").StartaResponse>;
128
128
  getAiUsage(organizationLogin: string): Promise<import("../../types").StartaResponse>;
129
129
  get calendar(): Calendar;
130
130
  get loyalty(): Loyalty;
@@ -278,11 +278,11 @@ class Organizations {
278
278
  method: 'GET',
279
279
  });
280
280
  }
281
- setAiEnabled(organizationLogin, aiEnabled) {
281
+ setAiEnabled(organizationLogin, aiEnabled, aiModelFamily) {
282
282
  return this._requestRunner.performRequest({
283
283
  url: `accounts/${organizationLogin}/aiEnabled`,
284
284
  method: 'PUT',
285
- body: { aiEnabled },
285
+ body: { aiEnabled, aiModelFamily },
286
286
  config: {
287
287
  rewriteBaseUrl: (url) => {
288
288
  return url.replace('/api', '/comm/api');
@@ -1,4 +1,4 @@
1
- import { StartaRequestRunner, OrderStatus, OrderData } from '../../types';
1
+ import { StartaRequestRunner, OrderStatus, OrderData, PaymentStatus, ComparisonOperator, SortDirection } from '../../types';
2
2
  export default class Orders {
3
3
  private _requestRunner;
4
4
  constructor(requestRunner: StartaRequestRunner);
@@ -14,8 +14,8 @@ export default class Orders {
14
14
  id?: string;
15
15
  executors?: Array<string>;
16
16
  };
17
- statusOperator?: '$eq' | '$ne' | '$in' | '$nin';
18
- sortDirection?: 'asc' | 'desc';
17
+ statusOperator?: ComparisonOperator;
18
+ sortDirection?: SortDirection;
19
19
  sortColumn?: 'incrementId' | 'starttime' | 'price' | 'createdAt';
20
20
  needsToBeConfirmedByOrganization?: boolean;
21
21
  needsToBeApprovedByCustomer?: boolean;
@@ -23,8 +23,8 @@ export default class Orders {
23
23
  searchQuery?: string;
24
24
  reviewFilter?: 'with' | 'without';
25
25
  customerId?: string;
26
- paymentStatusOperator?: '$eq' | '$ne';
27
- paymentStatus?: 'paid' | 'not_paid' | 'partially_paid';
26
+ paymentStatusOperator?: ComparisonOperator;
27
+ paymentStatus?: PaymentStatus | PaymentStatus[];
28
28
  }): Promise<import("../../types").StartaResponse>;
29
29
  isTimeSlotAvailable(organizationLogin: string, { executor, starttime, endtime, skipOrderId, scheduleId, resources, }: {
30
30
  scheduleId: string;
@@ -10,6 +10,7 @@ export default class Techcards {
10
10
  isEnabled?: boolean;
11
11
  type?: TechcardType;
12
12
  }): Promise<import("../../types").StartaResponse>;
13
+ get(organizationLogin: string, techcardId: string): Promise<import("../../types").StartaResponse>;
13
14
  update(organizationLogin: string, techcardId: string, techcard: Techcard): Promise<import("../../types").StartaResponse>;
14
15
  delete(organizationLogin: string, techcardId: string): Promise<import("../../types").StartaResponse>;
15
16
  }
@@ -18,6 +18,12 @@ class Techcards {
18
18
  method: 'GET',
19
19
  });
20
20
  }
21
+ get(organizationLogin, techcardId) {
22
+ return this._requestRunner.performRequest({
23
+ url: `accounts/${organizationLogin}/techcards/${techcardId}`,
24
+ method: 'GET',
25
+ });
26
+ }
21
27
  update(organizationLogin, techcardId, techcard) {
22
28
  return this._requestRunner.performRequest({
23
29
  url: `accounts/${organizationLogin}/techcards/${techcardId}`,
package/lib/types.d.ts CHANGED
@@ -192,7 +192,10 @@ export type OrganizationSchedule = {
192
192
  enabled: boolean;
193
193
  }>;
194
194
  };
195
+ export type SortDirection = 'asc' | 'desc';
196
+ export type ComparisonOperator = '$eq' | '$ne' | '$in' | '$nin';
195
197
  export type OrderStatus = 'new' | 'inprogress' | 'canceled' | 'completed';
198
+ export type PaymentStatus = 'paid' | 'not_paid' | 'partially_paid';
196
199
  export type OrderRepeatSettings = {
197
200
  enabled: boolean;
198
201
  interval: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.112.12824",
3
+ "version": "1.112.12829",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",