@d19n/youfibre-odin-sdk 2.0.312 → 2.0.314

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.
Files changed (46) hide show
  1. package/README.md +14 -1
  2. package/dist/EntityRegistry.d.ts +2 -0
  3. package/dist/EntityRegistry.js +2 -0
  4. package/dist/OdinApiClient.d.ts +4 -0
  5. package/dist/OdinApiClient.js +8 -0
  6. package/dist/OdinDbClient.d.ts +4 -0
  7. package/dist/OdinDbClient.js +8 -0
  8. package/dist/accessors-v2/QaReportAccessor.d.ts +112 -0
  9. package/dist/accessors-v2/QaReportAccessor.js +191 -0
  10. package/dist/accessors-v2/index.d.ts +1 -0
  11. package/dist/accessors-v2/index.js +4 -2
  12. package/dist/actions-v2/CreateEnRouteToScheduledChangeReasonDto.d.ts +88 -0
  13. package/dist/actions-v2/CreateEnRouteToScheduledChangeReasonDto.js +59 -0
  14. package/dist/actions-v2/CreateQaReportDto.d.ts +121 -0
  15. package/dist/actions-v2/CreateQaReportDto.js +57 -0
  16. package/dist/actions-v2/MoveBusinessInstallFromEnRouteToScheduledDto.d.ts +186 -0
  17. package/dist/actions-v2/MoveBusinessInstallFromEnRouteToScheduledDto.js +124 -0
  18. package/dist/actions-v2/MoveInspectionWorkOrderFromEnRouteToScheduledDto.d.ts +186 -0
  19. package/dist/actions-v2/MoveInspectionWorkOrderFromEnRouteToScheduledDto.js +124 -0
  20. package/dist/actions-v2/MoveInstallWorkOrderFromEnRouteToScheduledDto.d.ts +186 -0
  21. package/dist/actions-v2/MoveInstallWorkOrderFromEnRouteToScheduledDto.js +124 -0
  22. package/dist/actions-v2/MovePrePullWorkOrderFromEnRouteToScheduledDto.d.ts +186 -0
  23. package/dist/actions-v2/MovePrePullWorkOrderFromEnRouteToScheduledDto.js +124 -0
  24. package/dist/actions-v2/MoveRemediationWorkOrderFromEnRouteToScheduledDto.d.ts +186 -0
  25. package/dist/actions-v2/MoveRemediationWorkOrderFromEnRouteToScheduledDto.js +124 -0
  26. package/dist/actions-v2/MoveServiceWorkOrderFromEnRouteToScheduledDto.d.ts +186 -0
  27. package/dist/actions-v2/MoveServiceWorkOrderFromEnRouteToScheduledDto.js +124 -0
  28. package/dist/db-accessors-v2/QaReportDbAccessor.d.ts +180 -0
  29. package/dist/db-accessors-v2/QaReportDbAccessor.js +265 -0
  30. package/dist/db-accessors-v2/index.d.ts +1 -0
  31. package/dist/db-accessors-v2/index.js +4 -2
  32. package/dist/entities-v2/ChangeReason.d.ts +53 -1
  33. package/dist/entities-v2/ChangeReason.js +19 -1
  34. package/dist/entities-v2/WorkOrder.d.ts +2 -0
  35. package/dist/entities-v2/WorkOrder.js +2 -0
  36. package/dist/records-v2/CaseRecord.d.ts +20 -0
  37. package/dist/records-v2/CaseRecord.js +33 -0
  38. package/dist/records-v2/ChangeReasonRecord.d.ts +29 -0
  39. package/dist/records-v2/ChangeReasonRecord.js +36 -0
  40. package/dist/records-v2/QaReportRecord.d.ts +207 -0
  41. package/dist/records-v2/QaReportRecord.js +282 -0
  42. package/dist/records-v2/WorkOrderRecord.d.ts +517 -0
  43. package/dist/records-v2/WorkOrderRecord.js +943 -151
  44. package/dist/records-v2/index.d.ts +1 -0
  45. package/dist/records-v2/index.js +5 -2
  46. package/package.json +1 -1
package/README.md CHANGED
@@ -370,7 +370,7 @@ This SDK includes **182** entities across **12** modules.
370
370
 
371
371
  ## Actions
372
372
 
373
- This SDK includes **873** actions.
373
+ This SDK includes **881** actions.
374
374
 
375
375
  ### Action Types
376
376
 
@@ -1122,6 +1122,7 @@ This SDK includes **873** actions.
1122
1122
  | `CancelServiceWorkOrderSupplier` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CancelServiceWorkOrderSupplier |
1123
1123
  | `CancelServiceWorkOrderTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CancelServiceWorkOrderTenant |
1124
1124
  | `CreateCollectionRescheduledChangeReasonTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateCollectionRescheduledChangeReasonTenant |
1125
+ | `CreateEnRouteToScheduledChangeReason` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1125
1126
  | `CreateInstallCancelledChangeReasonSupplier` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateInstallCancelledChangeReasonSupplier |
1126
1127
  | `CreateInstallCancelledChangeReasonTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateInstallCancelledChangeReasonTenant |
1127
1128
  | `CreateInstallDelayedChangeReasonTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateInstallDelayedChangeReasonTenant |
@@ -1135,7 +1136,13 @@ This SDK includes **873** actions.
1135
1136
  | `CreateServiceCancelledChangeReasonTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateServiceCancelledChangeReasonTenant |
1136
1137
  | `CreateServiceRescheduledChangeReasonSupplier` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateServiceRescheduledChangeReasonSupplier |
1137
1138
  | `CreateServiceRescheduledChangeReasonTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateServiceRescheduledChangeReasonTenant |
1139
+ | `MoveBusinessInstallFromEnRouteToScheduled` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1140
+ | `MoveInspectionWorkOrderFromEnRouteToScheduled` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1141
+ | `MoveInstallWorkOrderFromEnRouteToScheduled` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1138
1142
  | `MoveInstallWorkOrderFromScheduledToPending` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateInstallDelayedChangeReasonTenant |
1143
+ | `MovePrePullWorkOrderFromEnRouteToScheduled` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1144
+ | `MoveRemediationWorkOrderFromEnRouteToScheduled` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1145
+ | `MoveServiceWorkOrderFromEnRouteToScheduled` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason |
1139
1146
  | `RescheduleBusinessInstallWorkOrderSupplier` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateInstallRescheduledChangeReasonSupplier |
1140
1147
  | `RescheduleBusinessInstallWorkOrderTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateInstallRescheduledChangeReasonTenant |
1141
1148
  | `RescheduleCollectionWorkOrderTenant` | CREATE | k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateCollectionRescheduledChangeReasonTenant |
@@ -2118,6 +2125,12 @@ This SDK includes **873** actions.
2118
2125
  | `CreatePushNotification` | CREATE | k1.t-hEOJjsDb.NotificationModule.PushNotification.Create.CreatePushNotification |
2119
2126
  | `UpdatePushNotification` | UPDATE | k1.t-hEOJjsDb.NotificationModule.PushNotification.Update.UpdatePushNotification |
2120
2127
 
2128
+ #### QaReport
2129
+
2130
+ | Action | Type | Event |
2131
+ |--------|------|-------|
2132
+ | `CreateQaReport` | CREATE | k1.t-hEOJjsDb.SupportModule.QaReport.Create.CreateQaReport |
2133
+
2121
2134
  #### Recontract
2122
2135
 
2123
2136
  | Action | Type | Event |
@@ -98,6 +98,7 @@ import { PgWebhookAttemptAccessor } from './accessors-v2/PgWebhookAttemptAccesso
98
98
  import { PriceBookAccessor } from './accessors-v2/PriceBookAccessor';
99
99
  import { ProductAccessor } from './accessors-v2/ProductAccessor';
100
100
  import { PushNotificationAccessor } from './accessors-v2/PushNotificationAccessor';
101
+ import { QaReportAccessor } from './accessors-v2/QaReportAccessor';
101
102
  import { RecontractAccessor } from './accessors-v2/RecontractAccessor';
102
103
  import { ReferralAccessor } from './accessors-v2/ReferralAccessor';
103
104
  import { RegionAccessor } from './accessors-v2/RegionAccessor';
@@ -219,6 +220,7 @@ export declare const EntityRegistry: {
219
220
  readonly PriceBook: typeof PriceBookAccessor;
220
221
  readonly Product: typeof ProductAccessor;
221
222
  readonly PushNotification: typeof PushNotificationAccessor;
223
+ readonly QaReport: typeof QaReportAccessor;
222
224
  readonly Recontract: typeof RecontractAccessor;
223
225
  readonly Referral: typeof ReferralAccessor;
224
226
  readonly Region: typeof RegionAccessor;
@@ -101,6 +101,7 @@ const PgWebhookAttemptAccessor_1 = require("./accessors-v2/PgWebhookAttemptAcces
101
101
  const PriceBookAccessor_1 = require("./accessors-v2/PriceBookAccessor");
102
102
  const ProductAccessor_1 = require("./accessors-v2/ProductAccessor");
103
103
  const PushNotificationAccessor_1 = require("./accessors-v2/PushNotificationAccessor");
104
+ const QaReportAccessor_1 = require("./accessors-v2/QaReportAccessor");
104
105
  const RecontractAccessor_1 = require("./accessors-v2/RecontractAccessor");
105
106
  const ReferralAccessor_1 = require("./accessors-v2/ReferralAccessor");
106
107
  const RegionAccessor_1 = require("./accessors-v2/RegionAccessor");
@@ -222,6 +223,7 @@ exports.EntityRegistry = {
222
223
  'PriceBook': PriceBookAccessor_1.PriceBookAccessor,
223
224
  'Product': ProductAccessor_1.ProductAccessor,
224
225
  'PushNotification': PushNotificationAccessor_1.PushNotificationAccessor,
226
+ 'QaReport': QaReportAccessor_1.QaReportAccessor,
225
227
  'Recontract': RecontractAccessor_1.RecontractAccessor,
226
228
  'Referral': ReferralAccessor_1.ReferralAccessor,
227
229
  'Region': RegionAccessor_1.RegionAccessor,
@@ -108,6 +108,7 @@ import { PgWebhookAttemptAccessor } from './accessors-v2/PgWebhookAttemptAccesso
108
108
  import { PriceBookAccessor } from './accessors-v2/PriceBookAccessor';
109
109
  import { ProductAccessor } from './accessors-v2/ProductAccessor';
110
110
  import { PushNotificationAccessor } from './accessors-v2/PushNotificationAccessor';
111
+ import { QaReportAccessor } from './accessors-v2/QaReportAccessor';
111
112
  import { RecontractAccessor } from './accessors-v2/RecontractAccessor';
112
113
  import { ReferralAccessor } from './accessors-v2/ReferralAccessor';
113
114
  import { RegionAccessor } from './accessors-v2/RegionAccessor';
@@ -238,6 +239,7 @@ export declare class OdinApiClient {
238
239
  private _priceBooks?;
239
240
  private _products?;
240
241
  private _pushNotifications?;
242
+ private _qaReports?;
241
243
  private _recontracts?;
242
244
  private _referrals?;
243
245
  private _regions?;
@@ -456,6 +458,8 @@ export declare class OdinApiClient {
456
458
  get products(): ProductAccessor;
457
459
  /** Access PushNotification records */
458
460
  get pushNotifications(): PushNotificationAccessor;
461
+ /** Access QaReport records */
462
+ get qaReports(): QaReportAccessor;
459
463
  /** Access Recontract records */
460
464
  get recontracts(): RecontractAccessor;
461
465
  /** Access Referral records */
@@ -119,6 +119,7 @@ const PgWebhookAttemptAccessor_1 = require("./accessors-v2/PgWebhookAttemptAcces
119
119
  const PriceBookAccessor_1 = require("./accessors-v2/PriceBookAccessor");
120
120
  const ProductAccessor_1 = require("./accessors-v2/ProductAccessor");
121
121
  const PushNotificationAccessor_1 = require("./accessors-v2/PushNotificationAccessor");
122
+ const QaReportAccessor_1 = require("./accessors-v2/QaReportAccessor");
122
123
  const RecontractAccessor_1 = require("./accessors-v2/RecontractAccessor");
123
124
  const ReferralAccessor_1 = require("./accessors-v2/ReferralAccessor");
124
125
  const RegionAccessor_1 = require("./accessors-v2/RegionAccessor");
@@ -789,6 +790,13 @@ class OdinApiClient {
789
790
  }
790
791
  return this._pushNotifications;
791
792
  }
793
+ /** Access QaReport records */
794
+ get qaReports() {
795
+ if (!this._qaReports) {
796
+ this._qaReports = new QaReportAccessor_1.QaReportAccessor(this._provider);
797
+ }
798
+ return this._qaReports;
799
+ }
792
800
  /** Access Recontract records */
793
801
  get recontracts() {
794
802
  if (!this._recontracts) {
@@ -116,6 +116,7 @@ import { PgWebhookDbAccessor } from './db-accessors-v2/PgWebhookDbAccessor';
116
116
  import { PriceBookDbAccessor } from './db-accessors-v2/PriceBookDbAccessor';
117
117
  import { ProductDbAccessor } from './db-accessors-v2/ProductDbAccessor';
118
118
  import { PushNotificationDbAccessor } from './db-accessors-v2/PushNotificationDbAccessor';
119
+ import { QaReportDbAccessor } from './db-accessors-v2/QaReportDbAccessor';
119
120
  import { RecontractDbAccessor } from './db-accessors-v2/RecontractDbAccessor';
120
121
  import { ReferralDbAccessor } from './db-accessors-v2/ReferralDbAccessor';
121
122
  import { RegionDbAccessor } from './db-accessors-v2/RegionDbAccessor';
@@ -240,6 +241,7 @@ export declare class OdinDbClient {
240
241
  private _priceBooks?;
241
242
  private _products?;
242
243
  private _pushNotifications?;
244
+ private _qaReports?;
243
245
  private _recontracts?;
244
246
  private _referrals?;
245
247
  private _regions?;
@@ -467,6 +469,8 @@ export declare class OdinDbClient {
467
469
  get products(): ProductDbAccessor;
468
470
  /** Access PushNotification records */
469
471
  get pushNotifications(): PushNotificationDbAccessor;
472
+ /** Access QaReport records */
473
+ get qaReports(): QaReportDbAccessor;
470
474
  /** Access Recontract records */
471
475
  get recontracts(): RecontractDbAccessor;
472
476
  /** Access Referral records */
@@ -118,6 +118,7 @@ const PgWebhookDbAccessor_1 = require("./db-accessors-v2/PgWebhookDbAccessor");
118
118
  const PriceBookDbAccessor_1 = require("./db-accessors-v2/PriceBookDbAccessor");
119
119
  const ProductDbAccessor_1 = require("./db-accessors-v2/ProductDbAccessor");
120
120
  const PushNotificationDbAccessor_1 = require("./db-accessors-v2/PushNotificationDbAccessor");
121
+ const QaReportDbAccessor_1 = require("./db-accessors-v2/QaReportDbAccessor");
121
122
  const RecontractDbAccessor_1 = require("./db-accessors-v2/RecontractDbAccessor");
122
123
  const ReferralDbAccessor_1 = require("./db-accessors-v2/ReferralDbAccessor");
123
124
  const RegionDbAccessor_1 = require("./db-accessors-v2/RegionDbAccessor");
@@ -791,6 +792,13 @@ class OdinDbClient {
791
792
  }
792
793
  return this._pushNotifications;
793
794
  }
795
+ /** Access QaReport records */
796
+ get qaReports() {
797
+ if (!this._qaReports) {
798
+ this._qaReports = new QaReportDbAccessor_1.QaReportDbAccessor(this._principal, this._dbService, this._defaultOptions);
799
+ }
800
+ return this._qaReports;
801
+ }
794
802
  /** Access Recontract records */
795
803
  get recontracts() {
796
804
  if (!this._recontracts) {
@@ -0,0 +1,112 @@
1
+ /**
2
+ * QaReport Accessor
3
+ *
4
+ * Provides typed access to QaReport records via API.
5
+ * Returns wrapped records with typed action methods.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Get existing record
10
+ * const record = await accessor.get(id);
11
+ * await record.updateQaReport({ ... });
12
+ *
13
+ * // Create new record
14
+ * const newRecord = accessor.new();
15
+ * await newRecord.createQaReport({ ... });
16
+ * ```
17
+ *
18
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
19
+ */
20
+ import { OdinSearchV2 } from '@d19n/odin-types/dist/core';
21
+ import { ApiProvider } from '@d19n/odin-sdk-generator/dist/api.provider';
22
+ import { OauthParams } from '@d19n/odin-sdk-generator/dist/odin-sdk-types';
23
+ import { QueryBuilder } from '@d19n/odin-sdk-generator/dist/query-builder';
24
+ import { QaReportProperties } from '../entities-v2/QaReport';
25
+ import { QaReportRecord } from '../records-v2/QaReportRecord';
26
+ /** List response with wrapped records */
27
+ export interface QaReportListResponse {
28
+ data: QaReportRecord[];
29
+ hasMore: boolean;
30
+ totalRecords: number;
31
+ }
32
+ /** Search response with wrapped records */
33
+ export interface QaReportSearchResponse {
34
+ records: QaReportRecord[];
35
+ totalRecords: number;
36
+ hasMore: boolean;
37
+ aggregations?: Record<string, any>;
38
+ }
39
+ export declare class QaReportAccessor {
40
+ private readonly _provider;
41
+ private readonly _moduleName;
42
+ private readonly _entityName;
43
+ constructor(provider: ApiProvider);
44
+ constructor(authParams: OauthParams);
45
+ constructor(authToken: string, host?: string);
46
+ get moduleName(): string;
47
+ get entityName(): string;
48
+ /**
49
+ * Create a new empty QaReport record instance for create operations.
50
+ * Pre-generates an ID that can be referenced before the record is saved.
51
+ *
52
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
53
+ * @returns A new record wrapper with pre-generated ID
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * // Auto-generated ID
58
+ * const note = odinClient.notes.new();
59
+ * console.log(note.id); // UUID available immediately
60
+ *
61
+ * // Custom ID
62
+ * const order = odinClient.orders.new("custom-id-123");
63
+ *
64
+ * // Reference ID before save
65
+ * const account = odinClient.accounts.new();
66
+ * const contact = odinClient.contacts.new();
67
+ * await contact
68
+ * .link({ id: account.id, entity: "CrmModule:Account" })
69
+ * .createContact({ FirstName: "John" });
70
+ * ```
71
+ */
72
+ new(id?: string): QaReportRecord;
73
+ /**
74
+ * Get a single QaReport record by ID
75
+ */
76
+ get(id: string): Promise<QaReportRecord>;
77
+ /**
78
+ * Get multiple QaReport records by IDs
79
+ */
80
+ getMany(ids: string[]): Promise<QaReportRecord[]>;
81
+ /**
82
+ * Search QaReport records
83
+ */
84
+ search(params: Partial<OdinSearchV2>): Promise<QaReportSearchResponse>;
85
+ /**
86
+ * Search all QaReport records with automatic pagination
87
+ */
88
+ searchAll(params: Partial<OdinSearchV2>): Promise<QaReportRecord[]>;
89
+ /**
90
+ * Async generator for paginating through all matching records.
91
+ * Yields batches of wrapped records.
92
+ */
93
+ paginate(params: Partial<OdinSearchV2>): AsyncGenerator<QaReportRecord[]>;
94
+ /**
95
+ * Create a fluent query builder for QaReport records
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * const results = await accessor
100
+ * .query()
101
+ * .where('Status', 'in', ['Active', 'Pending'])
102
+ * .where('CreatedAt', 'gte', '2025-01-01')
103
+ * .select('id', 'title', 'properties.*')
104
+ * .sortBy('createdAt', 'desc')
105
+ * .limit(100)
106
+ * .execute();
107
+ * ```
108
+ */
109
+ query(): QueryBuilder<QaReportProperties, QaReportRecord>;
110
+ /** Access the underlying ApiProvider */
111
+ get provider(): ApiProvider;
112
+ }
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ /**
3
+ * QaReport Accessor
4
+ *
5
+ * Provides typed access to QaReport records via API.
6
+ * Returns wrapped records with typed action methods.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Get existing record
11
+ * const record = await accessor.get(id);
12
+ * await record.updateQaReport({ ... });
13
+ *
14
+ * // Create new record
15
+ * const newRecord = accessor.new();
16
+ * await newRecord.createQaReport({ ... });
17
+ * ```
18
+ *
19
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
20
+ */
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
31
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
32
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
33
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
34
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
35
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
36
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
37
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
38
+ function fulfill(value) { resume("next", value); }
39
+ function reject(value) { resume("throw", value); }
40
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.QaReportAccessor = void 0;
44
+ const api_provider_1 = require("@d19n/odin-sdk-generator/dist/api.provider");
45
+ const query_builder_1 = require("@d19n/odin-sdk-generator/dist/query-builder");
46
+ const QaReportRecord_1 = require("../records-v2/QaReportRecord");
47
+ class QaReportAccessor {
48
+ constructor(providerOrAuth, host) {
49
+ this._moduleName = 'SupportModule';
50
+ this._entityName = 'QaReport';
51
+ if (providerOrAuth instanceof api_provider_1.ApiProvider) {
52
+ this._provider = providerOrAuth;
53
+ }
54
+ else if (typeof providerOrAuth === 'string') {
55
+ // Auth token provided
56
+ this._provider = new api_provider_1.ApiProvider(host ? { host } : undefined, providerOrAuth);
57
+ }
58
+ else {
59
+ // OauthParams provided
60
+ this._provider = new api_provider_1.ApiProvider(providerOrAuth);
61
+ }
62
+ }
63
+ get moduleName() { return this._moduleName; }
64
+ get entityName() { return this._entityName; }
65
+ // ============================================
66
+ // RECORD CREATION
67
+ // ============================================
68
+ /**
69
+ * Create a new empty QaReport record instance for create operations.
70
+ * Pre-generates an ID that can be referenced before the record is saved.
71
+ *
72
+ * @param id - Optional ID to use (auto-generated UUID if not provided)
73
+ * @returns A new record wrapper with pre-generated ID
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * // Auto-generated ID
78
+ * const note = odinClient.notes.new();
79
+ * console.log(note.id); // UUID available immediately
80
+ *
81
+ * // Custom ID
82
+ * const order = odinClient.orders.new("custom-id-123");
83
+ *
84
+ * // Reference ID before save
85
+ * const account = odinClient.accounts.new();
86
+ * const contact = odinClient.contacts.new();
87
+ * await contact
88
+ * .link({ id: account.id, entity: "CrmModule:Account" })
89
+ * .createContact({ FirstName: "John" });
90
+ * ```
91
+ */
92
+ new(id) {
93
+ return new QaReportRecord_1.QaReportRecord(null, this._provider, id);
94
+ }
95
+ // ============================================
96
+ // RECORD RETRIEVAL
97
+ // ============================================
98
+ /**
99
+ * Get a single QaReport record by ID
100
+ */
101
+ get(id) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const record = yield this._provider._getByPrimaryKey(this._moduleName, this._entityName, id);
104
+ return new QaReportRecord_1.QaReportRecord(record, this._provider);
105
+ });
106
+ }
107
+ /**
108
+ * Get multiple QaReport records by IDs
109
+ */
110
+ getMany(ids) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (ids.length === 0)
113
+ return [];
114
+ const records = yield this._provider._getManyByPrimaryKey(this._moduleName, this._entityName, ids);
115
+ return records.map((r) => new QaReportRecord_1.QaReportRecord(r, this._provider));
116
+ });
117
+ }
118
+ // ============================================
119
+ // SEARCH OPERATIONS
120
+ // ============================================
121
+ /**
122
+ * Search QaReport records
123
+ */
124
+ search(params) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ const result = yield this._provider._searchRecords(this._moduleName, this._entityName, params);
127
+ return {
128
+ records: result.records.map((r) => new QaReportRecord_1.QaReportRecord(r, this._provider)),
129
+ totalRecords: result.totalRecords,
130
+ hasMore: result.hasMore,
131
+ aggregations: result.aggregations,
132
+ };
133
+ });
134
+ }
135
+ /**
136
+ * Search all QaReport records with automatic pagination
137
+ */
138
+ searchAll(params) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params);
141
+ return result.records.map((r) => new QaReportRecord_1.QaReportRecord(r, this._provider));
142
+ });
143
+ }
144
+ /**
145
+ * Async generator for paginating through all matching records.
146
+ * Yields batches of wrapped records.
147
+ */
148
+ paginate(params) {
149
+ var _a;
150
+ return __asyncGenerator(this, arguments, function* paginate_1() {
151
+ let hasMore = true;
152
+ let searchAfter;
153
+ const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
154
+ while (hasMore) {
155
+ const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) })));
156
+ if (result.records.length > 0) {
157
+ yield yield __await(result.records.map((r) => new QaReportRecord_1.QaReportRecord(r, this._provider)));
158
+ const lastRecord = result.records[result.records.length - 1];
159
+ searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
160
+ }
161
+ hasMore = result.hasMore && result.records.length >= query.pageSize;
162
+ }
163
+ });
164
+ }
165
+ // ============================================
166
+ // QUERY BUILDER
167
+ // ============================================
168
+ /**
169
+ * Create a fluent query builder for QaReport records
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * const results = await accessor
174
+ * .query()
175
+ * .where('Status', 'in', ['Active', 'Pending'])
176
+ * .where('CreatedAt', 'gte', '2025-01-01')
177
+ * .select('id', 'title', 'properties.*')
178
+ * .sortBy('createdAt', 'desc')
179
+ * .limit(100)
180
+ * .execute();
181
+ * ```
182
+ */
183
+ query() {
184
+ return (0, query_builder_1.createQueryBuilder)(this);
185
+ }
186
+ /** Access the underlying ApiProvider */
187
+ get provider() {
188
+ return this._provider;
189
+ }
190
+ }
191
+ exports.QaReportAccessor = QaReportAccessor;
@@ -93,6 +93,7 @@ export { PgWebhookAccessor, PgWebhookSearchResponse, PgWebhookListResponse } fro
93
93
  export { PriceBookAccessor, PriceBookSearchResponse, PriceBookListResponse } from './PriceBookAccessor';
94
94
  export { ProductAccessor, ProductSearchResponse, ProductListResponse } from './ProductAccessor';
95
95
  export { PushNotificationAccessor, PushNotificationSearchResponse, PushNotificationListResponse } from './PushNotificationAccessor';
96
+ export { QaReportAccessor, QaReportSearchResponse, QaReportListResponse } from './QaReportAccessor';
96
97
  export { RecontractAccessor, RecontractSearchResponse, RecontractListResponse } from './RecontractAccessor';
97
98
  export { ReferralAccessor, ReferralSearchResponse, ReferralListResponse } from './ReferralAccessor';
98
99
  export { RegionAccessor, RegionSearchResponse, RegionListResponse } from './RegionAccessor';
@@ -9,8 +9,8 @@
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.NetworkDeviceAccessor = exports.ModifyServiceRequestAccessor = exports.MessageAccessor = exports.LeadAccessor = exports.KnowledgeArticleAccessor = exports.InvoiceAccessor = exports.InvoiceItemAccessor = exports.ImpersonationTrackerAccessor = exports.FileAccessor = exports.FieldServiceProductAccessor = exports.FieldServiceDispatchedProductAccessor = exports.ExchangeAccessor = exports.EmailTemplateAccessor = exports.EmailSenderAccessor = exports.EmailAccessor = exports.DiscountAccessor = exports.DataIssueAccessor = exports.CustomerPhonePortingAccessor = exports.CustomerDeviceRouterAccessor = exports.CustomerDeviceAccessor = exports.CustomerDeviceOntAccessor = exports.CustomerDeviceConfigurationAccessor = exports.CustomerDeviceAtaAccessor = exports.CrmDatasetAccessor = exports.CreditNoteAccessor = exports.ConversationSummaryFeedbackAccessor = exports.ConversationAccessor = exports.ContractBuyOutAccessor = exports.ContactAccessor = exports.ContactIdentityAccessor = exports.ConfigAccessor = exports.ChurnRequestAccessor = exports.ChangeReasonAccessor = exports.CaseAccessor = exports.CampaignAccessor = exports.CallAccessor = exports.CallLegAccessor = exports.BrskEntityMigrationErrorAccessor = exports.BngProvisionAccessor = exports.BillingRequestAccessor = exports.BillingAdjustmentAccessor = exports.AppointmentAccessor = exports.AgentStatusAccessor = exports.AffiliateCodeAccessor = exports.AddressAccessor = exports.AddressInteractionAccessor = exports.ActivityAccessor = exports.ActivityLogAccessor = exports.AccountAccessor = exports.AccountCreditAccessor = void 0;
12
- exports.SiteSpecificRiskAssessmentOutcomeFormAccessor = exports.ServiceAccessor = exports.ServiceAppointmentAccessor = exports.ServiceAppointmentConfigAccessor = exports.ScheduleSlotAccessor = exports.SalesTerritoryAccessor = exports.RewardAccessor = exports.ReturnsAccessor = exports.RemediationRequiredReasonAccessor = exports.RemediationOutcomeFormAccessor = exports.RegionAccessor = exports.ReferralAccessor = exports.RecontractAccessor = exports.PushNotificationAccessor = exports.ProductAccessor = exports.PriceBookAccessor = exports.PgWebhookAccessor = exports.PgWebhookAttemptAccessor = exports.PgVocalinkAccessor = exports.PgTransactionAccessor = exports.PgSortCodeSubstitutionAccessor = exports.PgReportEventAccessor = exports.PgPaymentMethodAccessor = exports.PgLogAccessor = exports.PgFileAllocationAccessor = exports.PgDisputeAccessor = exports.PgDirectDebitFileAccessor = exports.PgContactAccessor = exports.PgAccountValidationAccessor = exports.PermissionToFailAccessor = exports.PaymentAccessor = exports.PaymentMethodRefundAccessor = exports.PaymentMethodAccessor = exports.PICRequestAccessor = exports.OverlayRealA55Accessor = exports.OutboundDialSessionAccessor = exports.OutboundDialCampaignAccessor = exports.OutboundDialCampaignCaseAccessor = exports.OutageAccessor = exports.OrderAccessor = exports.OrderKciAccessor = exports.OrderItemAccessor = exports.OrderCheckAccessor = exports.OntReplacementApprovalAccessor = exports.OneTouchSwitchAccessor = exports.OhExternalAuditAccessor = exports.OfferTemplateAccessor = exports.OfferAccessor = exports.NotificationTemplateAccessor = exports.NoteAccessor = void 0;
13
- exports.YfWifiSurveyAccessor = exports.YfFieldVisitOutcomeFormAccessor = exports.YfAgentLocationAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = exports.VisitAccessor = exports.UserAccessor = exports.UgExternalAuditAccessor = exports.TwilioWorkerAccessor = exports.TwilioUserUpdateAccessor = exports.TwilioTaskQueueAccessor = exports.TwilioCallEventAccessor = exports.TwilioActivityAccessor = exports.TransactionAccessor = exports.TimeSlotAccessor = exports.TeamAccessor = exports.SmsTemplateAccessor = exports.SmsMessageAccessor = void 0;
12
+ exports.ServiceAccessor = exports.ServiceAppointmentAccessor = exports.ServiceAppointmentConfigAccessor = exports.ScheduleSlotAccessor = exports.SalesTerritoryAccessor = exports.RewardAccessor = exports.ReturnsAccessor = exports.RemediationRequiredReasonAccessor = exports.RemediationOutcomeFormAccessor = exports.RegionAccessor = exports.ReferralAccessor = exports.RecontractAccessor = exports.QaReportAccessor = exports.PushNotificationAccessor = exports.ProductAccessor = exports.PriceBookAccessor = exports.PgWebhookAccessor = exports.PgWebhookAttemptAccessor = exports.PgVocalinkAccessor = exports.PgTransactionAccessor = exports.PgSortCodeSubstitutionAccessor = exports.PgReportEventAccessor = exports.PgPaymentMethodAccessor = exports.PgLogAccessor = exports.PgFileAllocationAccessor = exports.PgDisputeAccessor = exports.PgDirectDebitFileAccessor = exports.PgContactAccessor = exports.PgAccountValidationAccessor = exports.PermissionToFailAccessor = exports.PaymentAccessor = exports.PaymentMethodRefundAccessor = exports.PaymentMethodAccessor = exports.PICRequestAccessor = exports.OverlayRealA55Accessor = exports.OutboundDialSessionAccessor = exports.OutboundDialCampaignAccessor = exports.OutboundDialCampaignCaseAccessor = exports.OutageAccessor = exports.OrderAccessor = exports.OrderKciAccessor = exports.OrderItemAccessor = exports.OrderCheckAccessor = exports.OntReplacementApprovalAccessor = exports.OneTouchSwitchAccessor = exports.OhExternalAuditAccessor = exports.OfferTemplateAccessor = exports.OfferAccessor = exports.NotificationTemplateAccessor = exports.NoteAccessor = void 0;
13
+ exports.YfWifiSurveyAccessor = exports.YfFieldVisitOutcomeFormAccessor = exports.YfAgentLocationAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = exports.VisitAccessor = exports.UserAccessor = exports.UgExternalAuditAccessor = exports.TwilioWorkerAccessor = exports.TwilioUserUpdateAccessor = exports.TwilioTaskQueueAccessor = exports.TwilioCallEventAccessor = exports.TwilioActivityAccessor = exports.TransactionAccessor = exports.TimeSlotAccessor = exports.TeamAccessor = exports.SmsTemplateAccessor = exports.SmsMessageAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormAccessor = void 0;
14
14
  var AccountCreditAccessor_1 = require("./AccountCreditAccessor");
15
15
  Object.defineProperty(exports, "AccountCreditAccessor", { enumerable: true, get: function () { return AccountCreditAccessor_1.AccountCreditAccessor; } });
16
16
  var AccountAccessor_1 = require("./AccountAccessor");
@@ -185,6 +185,8 @@ var ProductAccessor_1 = require("./ProductAccessor");
185
185
  Object.defineProperty(exports, "ProductAccessor", { enumerable: true, get: function () { return ProductAccessor_1.ProductAccessor; } });
186
186
  var PushNotificationAccessor_1 = require("./PushNotificationAccessor");
187
187
  Object.defineProperty(exports, "PushNotificationAccessor", { enumerable: true, get: function () { return PushNotificationAccessor_1.PushNotificationAccessor; } });
188
+ var QaReportAccessor_1 = require("./QaReportAccessor");
189
+ Object.defineProperty(exports, "QaReportAccessor", { enumerable: true, get: function () { return QaReportAccessor_1.QaReportAccessor; } });
188
190
  var RecontractAccessor_1 = require("./RecontractAccessor");
189
191
  Object.defineProperty(exports, "RecontractAccessor", { enumerable: true, get: function () { return RecontractAccessor_1.RecontractAccessor; } });
190
192
  var ReferralAccessor_1 = require("./ReferralAccessor");
@@ -0,0 +1,88 @@
1
+ /**
2
+ * CreateEnRouteToScheduledChangeReason Action DTO
3
+ *
4
+ * Records why an En Route work order stood down to Scheduled. Step of the FromEnRouteToScheduled transitions — the required reason is the audit control on the backward move.
5
+ *
6
+ * @module FieldServiceModule
7
+ * @entity ChangeReason
8
+ * @entityType SA_DELAY
9
+ * @actionKey CreateEnRouteToScheduledChangeReason
10
+ * @event k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason
11
+ *
12
+ * AUTO-GENERATED - DO NOT EDIT DIRECTLY
13
+ */
14
+ import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
15
+ /**
16
+ * RabbitMQ message payload for CreateEnRouteToScheduledChangeReason created events
17
+ *
18
+ * @event k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason
19
+ */
20
+ export interface CreateEnRouteToScheduledChangeReasonMessage extends OdinRecordCreatedEvent<CreateEnRouteToScheduledChangeReasonDto, CreateEnRouteToScheduledChangeReasonProperties> {
21
+ }
22
+ /**
23
+ * Properties for CreateEnRouteToScheduledChangeReason action
24
+ *
25
+ * @property Required fields: 1
26
+ * @property Optional fields: 2
27
+ */
28
+ export interface CreateEnRouteToScheduledChangeReasonProperties {
29
+ /**
30
+ * Reason
31
+ *
32
+ * why an En Route work order stood down to Scheduled (Field Operations - ChangeReason)
33
+ * @type {ENUM}
34
+ * @required
35
+ */
36
+ StandDownReason: string;
37
+ /**
38
+ * Additional detail
39
+ *
40
+ * cancellation description (Field Operations - ChangeReason)
41
+ * @type {TEXT_LONG}
42
+ */
43
+ Description?: string | null;
44
+ /**
45
+ * Owner
46
+ *
47
+ * Owner (Supplier or Tenant) (Field Operations - ChangeReason)
48
+ * @type {ENUM}
49
+ * @default TENANT
50
+ */
51
+ Owner?: string | null;
52
+ }
53
+ /**
54
+ * Why is this going back to Scheduled?
55
+ *
56
+ * Records why an En Route work order stood down to Scheduled. Step of the FromEnRouteToScheduled transitions — the required reason is the audit control on the backward move.
57
+ *
58
+ * @actionType CREATE - Creates a new ChangeReason record
59
+ * @module FieldServiceModule
60
+ * @entity ChangeReason
61
+ * @entityType SA_DELAY (Delay)
62
+ * @event k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason
63
+ * @permission schema.action.createenroutetoscheduledchangereason.trigger
64
+ * @benchmark This action is tracked for performance benchmarks
65
+ */
66
+ export declare class CreateEnRouteToScheduledChangeReasonDto extends OdinRecordCreateDto<CreateEnRouteToScheduledChangeReasonProperties> {
67
+ /** Used by SDK generators to identify action type */
68
+ static readonly ACTION_TYPE = "CREATE";
69
+ static readonly ACTION_KEY = "CreateEnRouteToScheduledChangeReason";
70
+ static readonly MODULE_NAME = "FieldServiceModule";
71
+ static readonly ENTITIES: string[];
72
+ static readonly ENTITY_TYPE = "SA_DELAY";
73
+ static readonly EVENT_NAME = "k1.t-hEOJjsDb.FieldServiceModule.ChangeReason.Create.CreateEnRouteToScheduledChangeReason";
74
+ static readonly PERMISSION = "schema.action.createenroutetoscheduledchangereason.trigger";
75
+ /** Step metadata - entity this action targets */
76
+ static readonly STEP_ENTITY = "FieldServiceModule:ChangeReason";
77
+ static readonly STEP_SCHEMA_ID = "d411bca0-e0f3-437a-9886-2107cbb0b07d";
78
+ static readonly STEP_SCHEMA_ACTION_ID = "6a9206f9-52d7-4730-a956-ad9b3a1d1207";
79
+ static readonly STEP_SCHEMA_TYPE_ID = "baa0fa45-7576-4502-b0ea-5253e664722b";
80
+ static readonly STEP_TYPE = "SA_DELAY";
81
+ static readonly AUTO_LINK_PARENT = true;
82
+ readonly actionName: string;
83
+ readonly schemaActionId: string;
84
+ readonly entity: string;
85
+ constructor(properties: CreateEnRouteToScheduledChangeReasonProperties, options?: {
86
+ journeyId?: string;
87
+ });
88
+ }