@d19n/youfibre-odin-sdk 2.0.33 → 2.0.35
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/README.md +8 -1
- package/dist/EntityRegistry.d.ts +2 -0
- package/dist/EntityRegistry.js +2 -0
- package/dist/OdinApiClient.d.ts +4 -0
- package/dist/OdinApiClient.js +8 -0
- package/dist/OdinDbClient.d.ts +4 -0
- package/dist/OdinDbClient.js +8 -0
- package/dist/accessors-v2/ExchangeAccessor.d.ts +111 -0
- package/dist/accessors-v2/ExchangeAccessor.js +190 -0
- package/dist/accessors-v2/index.d.ts +1 -0
- package/dist/accessors-v2/index.js +5 -3
- package/dist/actions-v2/CaseDefaultStageEscalatedDto.d.ts +9 -1
- package/dist/actions-v2/CreateExchangeDto.d.ts +90 -0
- package/dist/actions-v2/CreateExchangeDto.js +54 -0
- package/dist/actions-v2/EditProvidersDto.d.ts +71 -0
- package/dist/actions-v2/EditProvidersDto.js +54 -0
- package/dist/actions-v2/EscalateCaseActionDto.d.ts +9 -1
- package/dist/actions-v2/EscalateCaseTransitionDto.d.ts +9 -1
- package/dist/actions-v2/OverlayA55UpdateDto.d.ts +54 -0
- package/dist/actions-v2/UpdateTeamDto.d.ts +8 -1
- package/dist/db-accessors-v2/ExchangeDbAccessor.d.ts +149 -0
- package/dist/db-accessors-v2/ExchangeDbAccessor.js +227 -0
- package/dist/db-accessors-v2/index.d.ts +1 -0
- package/dist/db-accessors-v2/index.js +5 -3
- package/dist/entities-v2/Case.d.ts +5 -0
- package/dist/entities-v2/Case.js +5 -0
- package/dist/entities-v2/Config.d.ts +8 -8
- package/dist/entities-v2/Config.js +4 -4
- package/dist/entities-v2/Exchange.d.ts +7 -0
- package/dist/entities-v2/Exchange.js +2 -0
- package/dist/entities-v2/OhInstallationAudit.d.ts +12 -12
- package/dist/entities-v2/OhInstallationAudit.js +2 -2
- package/dist/entities-v2/Order.d.ts +1 -0
- package/dist/entities-v2/OverlayRealA55.d.ts +286 -202
- package/dist/entities-v2/OverlayRealA55.js +109 -95
- package/dist/entities-v2/Team.d.ts +22 -1
- package/dist/entities-v2/Team.js +17 -1
- package/dist/records-v2/CaseRecord.d.ts +28 -0
- package/dist/records-v2/CaseRecord.js +37 -0
- package/dist/records-v2/ExchangeRecord.d.ts +185 -0
- package/dist/records-v2/ExchangeRecord.js +259 -0
- package/dist/records-v2/SalesTerritoryRecord.d.ts +20 -0
- package/dist/records-v2/SalesTerritoryRecord.js +33 -0
- package/dist/records-v2/index.d.ts +1 -0
- package/dist/records-v2/index.js +6 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ This SDK includes **164** entities across **12** modules.
|
|
|
352
352
|
|
|
353
353
|
## Actions
|
|
354
354
|
|
|
355
|
-
This SDK includes **
|
|
355
|
+
This SDK includes **595** actions.
|
|
356
356
|
|
|
357
357
|
### Action Types
|
|
358
358
|
|
|
@@ -721,6 +721,7 @@ This SDK includes **593** actions.
|
|
|
721
721
|
| `CreateCaseFromContact` | CREATE | k1.t-hEOJjsDb.SupportModule.Case.Create.CreateCase |
|
|
722
722
|
| `CreateCaseWithDpa` | CREATE | k1.t-hEOJjsDb.SupportModule.Case.Create.CreateCaseWithDpa |
|
|
723
723
|
| `EditCaseForm` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.EditCaseForm |
|
|
724
|
+
| `EditProviders` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.EditProviders |
|
|
724
725
|
| `EscalateCaseAction` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.EscalateCaseAction |
|
|
725
726
|
| `EscalateCaseTransition` | STAGE_TRANSITION | k1.t-hEOJjsDb.SupportModule.Case.Update.EscalateCaseAction |
|
|
726
727
|
| `ExceptionInput` | UPDATE | k1.t-hEOJjsDb.SupportModule.Case.Update.ExceptionInput |
|
|
@@ -1226,6 +1227,12 @@ This SDK includes **593** actions.
|
|
|
1226
1227
|
| `CreateEmailTemplate` | CREATE | k1.t-hEOJjsDb.NotificationModule.EmailTemplate.Create.CreateEmailTemplate |
|
|
1227
1228
|
| `UpdateEmailTemplate` | UPDATE | k1.t-hEOJjsDb.NotificationModule.EmailTemplate.Update.UpdateEmailTemplate |
|
|
1228
1229
|
|
|
1230
|
+
#### Exchange
|
|
1231
|
+
|
|
1232
|
+
| Action | Type | Event |
|
|
1233
|
+
|--------|------|-------|
|
|
1234
|
+
| `CreateExchange` | CREATE | k1.t-hEOJjsDb.ProjectModule.Exchange.Create.CreateExchange |
|
|
1235
|
+
|
|
1229
1236
|
#### FieldServiceDispatchedProduct
|
|
1230
1237
|
|
|
1231
1238
|
| Action | Type | Event |
|
package/dist/EntityRegistry.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ import { DiscountAccessor } from './accessors-v2/DiscountAccessor';
|
|
|
47
47
|
import { EmailAccessor } from './accessors-v2/EmailAccessor';
|
|
48
48
|
import { EmailSenderAccessor } from './accessors-v2/EmailSenderAccessor';
|
|
49
49
|
import { EmailTemplateAccessor } from './accessors-v2/EmailTemplateAccessor';
|
|
50
|
+
import { ExchangeAccessor } from './accessors-v2/ExchangeAccessor';
|
|
50
51
|
import { FieldServiceDispatchedProductAccessor } from './accessors-v2/FieldServiceDispatchedProductAccessor';
|
|
51
52
|
import { FieldServiceProductAccessor } from './accessors-v2/FieldServiceProductAccessor';
|
|
52
53
|
import { FileAccessor } from './accessors-v2/FileAccessor';
|
|
@@ -163,6 +164,7 @@ export declare const EntityRegistry: {
|
|
|
163
164
|
readonly Email: typeof EmailAccessor;
|
|
164
165
|
readonly EmailSender: typeof EmailSenderAccessor;
|
|
165
166
|
readonly EmailTemplate: typeof EmailTemplateAccessor;
|
|
167
|
+
readonly Exchange: typeof ExchangeAccessor;
|
|
166
168
|
readonly FieldServiceDispatchedProduct: typeof FieldServiceDispatchedProductAccessor;
|
|
167
169
|
readonly FieldServiceProduct: typeof FieldServiceProductAccessor;
|
|
168
170
|
readonly File: typeof FileAccessor;
|
package/dist/EntityRegistry.js
CHANGED
|
@@ -50,6 +50,7 @@ const DiscountAccessor_1 = require("./accessors-v2/DiscountAccessor");
|
|
|
50
50
|
const EmailAccessor_1 = require("./accessors-v2/EmailAccessor");
|
|
51
51
|
const EmailSenderAccessor_1 = require("./accessors-v2/EmailSenderAccessor");
|
|
52
52
|
const EmailTemplateAccessor_1 = require("./accessors-v2/EmailTemplateAccessor");
|
|
53
|
+
const ExchangeAccessor_1 = require("./accessors-v2/ExchangeAccessor");
|
|
53
54
|
const FieldServiceDispatchedProductAccessor_1 = require("./accessors-v2/FieldServiceDispatchedProductAccessor");
|
|
54
55
|
const FieldServiceProductAccessor_1 = require("./accessors-v2/FieldServiceProductAccessor");
|
|
55
56
|
const FileAccessor_1 = require("./accessors-v2/FileAccessor");
|
|
@@ -166,6 +167,7 @@ exports.EntityRegistry = {
|
|
|
166
167
|
'Email': EmailAccessor_1.EmailAccessor,
|
|
167
168
|
'EmailSender': EmailSenderAccessor_1.EmailSenderAccessor,
|
|
168
169
|
'EmailTemplate': EmailTemplateAccessor_1.EmailTemplateAccessor,
|
|
170
|
+
'Exchange': ExchangeAccessor_1.ExchangeAccessor,
|
|
169
171
|
'FieldServiceDispatchedProduct': FieldServiceDispatchedProductAccessor_1.FieldServiceDispatchedProductAccessor,
|
|
170
172
|
'FieldServiceProduct': FieldServiceProductAccessor_1.FieldServiceProductAccessor,
|
|
171
173
|
'File': FileAccessor_1.FileAccessor,
|
package/dist/OdinApiClient.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ import { DiscountAccessor } from './accessors-v2/DiscountAccessor';
|
|
|
57
57
|
import { EmailAccessor } from './accessors-v2/EmailAccessor';
|
|
58
58
|
import { EmailSenderAccessor } from './accessors-v2/EmailSenderAccessor';
|
|
59
59
|
import { EmailTemplateAccessor } from './accessors-v2/EmailTemplateAccessor';
|
|
60
|
+
import { ExchangeAccessor } from './accessors-v2/ExchangeAccessor';
|
|
60
61
|
import { FieldServiceDispatchedProductAccessor } from './accessors-v2/FieldServiceDispatchedProductAccessor';
|
|
61
62
|
import { FieldServiceProductAccessor } from './accessors-v2/FieldServiceProductAccessor';
|
|
62
63
|
import { FileAccessor } from './accessors-v2/FileAccessor';
|
|
@@ -182,6 +183,7 @@ export declare class OdinApiClient {
|
|
|
182
183
|
private _emails?;
|
|
183
184
|
private _emailSenders?;
|
|
184
185
|
private _emailTemplates?;
|
|
186
|
+
private _exchanges?;
|
|
185
187
|
private _fieldServiceDispatchedProducts?;
|
|
186
188
|
private _fieldServiceProducts?;
|
|
187
189
|
private _files?;
|
|
@@ -344,6 +346,8 @@ export declare class OdinApiClient {
|
|
|
344
346
|
get emailSenders(): EmailSenderAccessor;
|
|
345
347
|
/** Access EmailTemplate records */
|
|
346
348
|
get emailTemplates(): EmailTemplateAccessor;
|
|
349
|
+
/** Access Exchange records */
|
|
350
|
+
get exchanges(): ExchangeAccessor;
|
|
347
351
|
/** Access FieldServiceDispatchedProduct records */
|
|
348
352
|
get fieldServiceDispatchedProducts(): FieldServiceDispatchedProductAccessor;
|
|
349
353
|
/** Access FieldServiceProduct records */
|
package/dist/OdinApiClient.js
CHANGED
|
@@ -68,6 +68,7 @@ const DiscountAccessor_1 = require("./accessors-v2/DiscountAccessor");
|
|
|
68
68
|
const EmailAccessor_1 = require("./accessors-v2/EmailAccessor");
|
|
69
69
|
const EmailSenderAccessor_1 = require("./accessors-v2/EmailSenderAccessor");
|
|
70
70
|
const EmailTemplateAccessor_1 = require("./accessors-v2/EmailTemplateAccessor");
|
|
71
|
+
const ExchangeAccessor_1 = require("./accessors-v2/ExchangeAccessor");
|
|
71
72
|
const FieldServiceDispatchedProductAccessor_1 = require("./accessors-v2/FieldServiceDispatchedProductAccessor");
|
|
72
73
|
const FieldServiceProductAccessor_1 = require("./accessors-v2/FieldServiceProductAccessor");
|
|
73
74
|
const FileAccessor_1 = require("./accessors-v2/FileAccessor");
|
|
@@ -427,6 +428,13 @@ class OdinApiClient {
|
|
|
427
428
|
}
|
|
428
429
|
return this._emailTemplates;
|
|
429
430
|
}
|
|
431
|
+
/** Access Exchange records */
|
|
432
|
+
get exchanges() {
|
|
433
|
+
if (!this._exchanges) {
|
|
434
|
+
this._exchanges = new ExchangeAccessor_1.ExchangeAccessor(this._provider);
|
|
435
|
+
}
|
|
436
|
+
return this._exchanges;
|
|
437
|
+
}
|
|
430
438
|
/** Access FieldServiceDispatchedProduct records */
|
|
431
439
|
get fieldServiceDispatchedProducts() {
|
|
432
440
|
if (!this._fieldServiceDispatchedProducts) {
|
package/dist/OdinDbClient.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ import { DiscountDbAccessor } from './db-accessors-v2/DiscountDbAccessor';
|
|
|
64
64
|
import { EmailDbAccessor } from './db-accessors-v2/EmailDbAccessor';
|
|
65
65
|
import { EmailSenderDbAccessor } from './db-accessors-v2/EmailSenderDbAccessor';
|
|
66
66
|
import { EmailTemplateDbAccessor } from './db-accessors-v2/EmailTemplateDbAccessor';
|
|
67
|
+
import { ExchangeDbAccessor } from './db-accessors-v2/ExchangeDbAccessor';
|
|
67
68
|
import { FieldServiceDispatchedProductDbAccessor } from './db-accessors-v2/FieldServiceDispatchedProductDbAccessor';
|
|
68
69
|
import { FieldServiceProductDbAccessor } from './db-accessors-v2/FieldServiceProductDbAccessor';
|
|
69
70
|
import { FileDbAccessor } from './db-accessors-v2/FileDbAccessor';
|
|
@@ -183,6 +184,7 @@ export declare class OdinDbClient {
|
|
|
183
184
|
private _emails?;
|
|
184
185
|
private _emailSenders?;
|
|
185
186
|
private _emailTemplates?;
|
|
187
|
+
private _exchanges?;
|
|
186
188
|
private _fieldServiceDispatchedProducts?;
|
|
187
189
|
private _fieldServiceProducts?;
|
|
188
190
|
private _files?;
|
|
@@ -354,6 +356,8 @@ export declare class OdinDbClient {
|
|
|
354
356
|
get emailSenders(): EmailSenderDbAccessor;
|
|
355
357
|
/** Access EmailTemplate records */
|
|
356
358
|
get emailTemplates(): EmailTemplateDbAccessor;
|
|
359
|
+
/** Access Exchange records */
|
|
360
|
+
get exchanges(): ExchangeDbAccessor;
|
|
357
361
|
/** Access FieldServiceDispatchedProduct records */
|
|
358
362
|
get fieldServiceDispatchedProducts(): FieldServiceDispatchedProductDbAccessor;
|
|
359
363
|
/** Access FieldServiceProduct records */
|
package/dist/OdinDbClient.js
CHANGED
|
@@ -66,6 +66,7 @@ const DiscountDbAccessor_1 = require("./db-accessors-v2/DiscountDbAccessor");
|
|
|
66
66
|
const EmailDbAccessor_1 = require("./db-accessors-v2/EmailDbAccessor");
|
|
67
67
|
const EmailSenderDbAccessor_1 = require("./db-accessors-v2/EmailSenderDbAccessor");
|
|
68
68
|
const EmailTemplateDbAccessor_1 = require("./db-accessors-v2/EmailTemplateDbAccessor");
|
|
69
|
+
const ExchangeDbAccessor_1 = require("./db-accessors-v2/ExchangeDbAccessor");
|
|
69
70
|
const FieldServiceDispatchedProductDbAccessor_1 = require("./db-accessors-v2/FieldServiceDispatchedProductDbAccessor");
|
|
70
71
|
const FieldServiceProductDbAccessor_1 = require("./db-accessors-v2/FieldServiceProductDbAccessor");
|
|
71
72
|
const FileDbAccessor_1 = require("./db-accessors-v2/FileDbAccessor");
|
|
@@ -428,6 +429,13 @@ class OdinDbClient {
|
|
|
428
429
|
}
|
|
429
430
|
return this._emailTemplates;
|
|
430
431
|
}
|
|
432
|
+
/** Access Exchange records */
|
|
433
|
+
get exchanges() {
|
|
434
|
+
if (!this._exchanges) {
|
|
435
|
+
this._exchanges = new ExchangeDbAccessor_1.ExchangeDbAccessor(this._principal, this._dbService, this._defaultOptions);
|
|
436
|
+
}
|
|
437
|
+
return this._exchanges;
|
|
438
|
+
}
|
|
431
439
|
/** Access FieldServiceDispatchedProduct records */
|
|
432
440
|
get fieldServiceDispatchedProducts() {
|
|
433
441
|
if (!this._fieldServiceDispatchedProducts) {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exchange Accessor
|
|
3
|
+
*
|
|
4
|
+
* Provides typed access to Exchange 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.updateExchange({ ... });
|
|
12
|
+
*
|
|
13
|
+
* // Create new record
|
|
14
|
+
* const newRecord = accessor.new();
|
|
15
|
+
* await newRecord.createExchange({ ... });
|
|
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 { ExchangeProperties } from '../entities-v2/Exchange';
|
|
25
|
+
import { ExchangeRecord } from '../records-v2/ExchangeRecord';
|
|
26
|
+
/** List response with wrapped records */
|
|
27
|
+
export interface ExchangeListResponse {
|
|
28
|
+
data: ExchangeRecord[];
|
|
29
|
+
hasMore: boolean;
|
|
30
|
+
totalRecords: number;
|
|
31
|
+
}
|
|
32
|
+
/** Search response with wrapped records */
|
|
33
|
+
export interface ExchangeSearchResponse {
|
|
34
|
+
records: ExchangeRecord[];
|
|
35
|
+
totalRecords: number;
|
|
36
|
+
hasMore: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare class ExchangeAccessor {
|
|
39
|
+
private readonly _provider;
|
|
40
|
+
private readonly _moduleName;
|
|
41
|
+
private readonly _entityName;
|
|
42
|
+
constructor(provider: ApiProvider);
|
|
43
|
+
constructor(authParams: OauthParams);
|
|
44
|
+
constructor(authToken: string, host?: string);
|
|
45
|
+
get moduleName(): string;
|
|
46
|
+
get entityName(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Create a new empty Exchange record instance for create operations.
|
|
49
|
+
* Pre-generates an ID that can be referenced before the record is saved.
|
|
50
|
+
*
|
|
51
|
+
* @param id - Optional ID to use (auto-generated UUID if not provided)
|
|
52
|
+
* @returns A new record wrapper with pre-generated ID
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* // Auto-generated ID
|
|
57
|
+
* const note = odinClient.notes.new();
|
|
58
|
+
* console.log(note.id); // UUID available immediately
|
|
59
|
+
*
|
|
60
|
+
* // Custom ID
|
|
61
|
+
* const order = odinClient.orders.new("custom-id-123");
|
|
62
|
+
*
|
|
63
|
+
* // Reference ID before save
|
|
64
|
+
* const account = odinClient.accounts.new();
|
|
65
|
+
* const contact = odinClient.contacts.new();
|
|
66
|
+
* await contact
|
|
67
|
+
* .link({ id: account.id, entity: "CrmModule:Account" })
|
|
68
|
+
* .createContact({ FirstName: "John" });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
new(id?: string): ExchangeRecord;
|
|
72
|
+
/**
|
|
73
|
+
* Get a single Exchange record by ID
|
|
74
|
+
*/
|
|
75
|
+
get(id: string): Promise<ExchangeRecord>;
|
|
76
|
+
/**
|
|
77
|
+
* Get multiple Exchange records by IDs
|
|
78
|
+
*/
|
|
79
|
+
getMany(ids: string[]): Promise<ExchangeRecord[]>;
|
|
80
|
+
/**
|
|
81
|
+
* Search Exchange records
|
|
82
|
+
*/
|
|
83
|
+
search(params: Partial<OdinSearchV2>): Promise<ExchangeSearchResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Search all Exchange records with automatic pagination
|
|
86
|
+
*/
|
|
87
|
+
searchAll(params: Partial<OdinSearchV2>): Promise<ExchangeRecord[]>;
|
|
88
|
+
/**
|
|
89
|
+
* Async generator for paginating through all matching records.
|
|
90
|
+
* Yields batches of wrapped records.
|
|
91
|
+
*/
|
|
92
|
+
paginate(params: Partial<OdinSearchV2>): AsyncGenerator<ExchangeRecord[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Create a fluent query builder for Exchange records
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const results = await accessor
|
|
99
|
+
* .query()
|
|
100
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
101
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
102
|
+
* .select('id', 'title', 'properties.*')
|
|
103
|
+
* .sortBy('createdAt', 'desc')
|
|
104
|
+
* .limit(100)
|
|
105
|
+
* .execute();
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
query(): QueryBuilder<ExchangeProperties, ExchangeRecord>;
|
|
109
|
+
/** Access the underlying ApiProvider */
|
|
110
|
+
get provider(): ApiProvider;
|
|
111
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Exchange Accessor
|
|
4
|
+
*
|
|
5
|
+
* Provides typed access to Exchange 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.updateExchange({ ... });
|
|
13
|
+
*
|
|
14
|
+
* // Create new record
|
|
15
|
+
* const newRecord = accessor.new();
|
|
16
|
+
* await newRecord.createExchange({ ... });
|
|
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.ExchangeAccessor = 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 ExchangeRecord_1 = require("../records-v2/ExchangeRecord");
|
|
47
|
+
class ExchangeAccessor {
|
|
48
|
+
constructor(providerOrAuth, host) {
|
|
49
|
+
this._moduleName = 'ProjectModule';
|
|
50
|
+
this._entityName = 'Exchange';
|
|
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 Exchange 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 ExchangeRecord_1.ExchangeRecord(null, this._provider, id);
|
|
94
|
+
}
|
|
95
|
+
// ============================================
|
|
96
|
+
// RECORD RETRIEVAL
|
|
97
|
+
// ============================================
|
|
98
|
+
/**
|
|
99
|
+
* Get a single Exchange 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 ExchangeRecord_1.ExchangeRecord(record, this._provider);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get multiple Exchange 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 ExchangeRecord_1.ExchangeRecord(r, this._provider));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// ============================================
|
|
119
|
+
// SEARCH OPERATIONS
|
|
120
|
+
// ============================================
|
|
121
|
+
/**
|
|
122
|
+
* Search Exchange 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 ExchangeRecord_1.ExchangeRecord(r, this._provider)),
|
|
129
|
+
totalRecords: result.totalRecords,
|
|
130
|
+
hasMore: result.hasMore,
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Search all Exchange records with automatic pagination
|
|
136
|
+
*/
|
|
137
|
+
searchAll(params) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const result = yield this._provider._searchAllRecordsAndPaginate(this._moduleName, this._entityName, params);
|
|
140
|
+
return result.records.map((r) => new ExchangeRecord_1.ExchangeRecord(r, this._provider));
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Async generator for paginating through all matching records.
|
|
145
|
+
* Yields batches of wrapped records.
|
|
146
|
+
*/
|
|
147
|
+
paginate(params) {
|
|
148
|
+
var _a;
|
|
149
|
+
return __asyncGenerator(this, arguments, function* paginate_1() {
|
|
150
|
+
let hasMore = true;
|
|
151
|
+
let searchAfter;
|
|
152
|
+
const query = Object.assign(Object.assign({}, params.query), { pageSize: ((_a = params.query) === null || _a === void 0 ? void 0 : _a.pageSize) || 500 });
|
|
153
|
+
while (hasMore) {
|
|
154
|
+
const result = yield __await(this._provider._searchRecords(this._moduleName, this._entityName, Object.assign(Object.assign({}, params), { query: Object.assign(Object.assign({}, query), { searchAfter }) })));
|
|
155
|
+
if (result.records.length > 0) {
|
|
156
|
+
yield yield __await(result.records.map((r) => new ExchangeRecord_1.ExchangeRecord(r, this._provider)));
|
|
157
|
+
const lastRecord = result.records[result.records.length - 1];
|
|
158
|
+
searchAfter = lastRecord === null || lastRecord === void 0 ? void 0 : lastRecord.sort;
|
|
159
|
+
}
|
|
160
|
+
hasMore = result.hasMore && result.records.length >= query.pageSize;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// ============================================
|
|
165
|
+
// QUERY BUILDER
|
|
166
|
+
// ============================================
|
|
167
|
+
/**
|
|
168
|
+
* Create a fluent query builder for Exchange records
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* const results = await accessor
|
|
173
|
+
* .query()
|
|
174
|
+
* .where('Status', 'in', ['Active', 'Pending'])
|
|
175
|
+
* .where('CreatedAt', 'gte', '2025-01-01')
|
|
176
|
+
* .select('id', 'title', 'properties.*')
|
|
177
|
+
* .sortBy('createdAt', 'desc')
|
|
178
|
+
* .limit(100)
|
|
179
|
+
* .execute();
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
query() {
|
|
183
|
+
return (0, query_builder_1.createQueryBuilder)(this);
|
|
184
|
+
}
|
|
185
|
+
/** Access the underlying ApiProvider */
|
|
186
|
+
get provider() {
|
|
187
|
+
return this._provider;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.ExchangeAccessor = ExchangeAccessor;
|
|
@@ -42,6 +42,7 @@ export { DiscountAccessor, DiscountSearchResponse, DiscountListResponse } from '
|
|
|
42
42
|
export { EmailAccessor, EmailSearchResponse, EmailListResponse } from './EmailAccessor';
|
|
43
43
|
export { EmailSenderAccessor, EmailSenderSearchResponse, EmailSenderListResponse } from './EmailSenderAccessor';
|
|
44
44
|
export { EmailTemplateAccessor, EmailTemplateSearchResponse, EmailTemplateListResponse } from './EmailTemplateAccessor';
|
|
45
|
+
export { ExchangeAccessor, ExchangeSearchResponse, ExchangeListResponse } from './ExchangeAccessor';
|
|
45
46
|
export { FieldServiceDispatchedProductAccessor, FieldServiceDispatchedProductSearchResponse, FieldServiceDispatchedProductListResponse } from './FieldServiceDispatchedProductAccessor';
|
|
46
47
|
export { FieldServiceProductAccessor, FieldServiceProductSearchResponse, FieldServiceProductListResponse } from './FieldServiceProductAccessor';
|
|
47
48
|
export { FileAccessor, FileSearchResponse, FileListResponse } from './FileAccessor';
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.YfStockAuditAccessor = exports.YfFieldServiceVisitAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = exports.VisitAccessor = exports.UserAccessor = exports.UgRetroAuditAccessor = exports.UgInstallationAuditAccessor = exports.UgInProgressAuditAccessor = exports.UgExternalAuditAccessor = exports.UgAuditOfInstallationAccessor = exports.TwilioUserUpdateAccessor = exports.TransactionAccessor = void 0;
|
|
11
|
+
exports.OfferAccessor = exports.NoteAccessor = exports.NetworkDeviceAccessor = exports.MessageAccessor = exports.LeadAccessor = exports.KnowledgeArticleAccessor = exports.InvoiceAccessor = exports.InvoiceItemAccessor = exports.InternalInstallAuditAccessor = exports.ImpersonationTrackerAccessor = exports.FileAccessor = exports.FieldServiceProductAccessor = exports.FieldServiceDispatchedProductAccessor = exports.ExchangeAccessor = exports.EmailTemplateAccessor = exports.EmailSenderAccessor = exports.EmailAccessor = exports.DiscountAccessor = exports.CustomerPhonePortingAccessor = exports.CustomerDeviceRouterAccessor = exports.CustomerDeviceOntAccessor = exports.CustomerDeviceConfigurationAccessor = exports.CustomerDeviceAtaAccessor = exports.CrmDatasetAccessor = exports.CreditNoteAccessor = exports.ConversationAccessor = exports.ContractBuyOutAccessor = exports.ContactAccessor = exports.ContactIdentityAccessor = exports.ConfigAccessor = exports.ChurnRequestAccessor = exports.ChangeReasonAccessor = exports.CaseAccessor = exports.CampaignAccessor = exports.CallTransferAccessor = exports.CallAccessor = exports.CallLegAccessor = exports.CallEventAccessor = exports.BrskEntityMigrationErrorAccessor = exports.BngProvisionAccessor = exports.BlockageA55Accessor = exports.BillingRequestAccessor = exports.BillingAdjustmentAccessor = exports.AppointmentAccessor = exports.AffiliateCodeAccessor = exports.AddressAccessor = exports.ActivityAccessor = exports.ActivityLogAccessor = exports.AccountAccessor = exports.AccountCreditAccessor = void 0;
|
|
12
|
+
exports.TestEntityForVisualBuilderAccessor = exports.TeamAccessor = exports.SweeperMaintenanceAuditAccessor = exports.SmsMessageAccessor = exports.SiteSpecificRiskAssessmentOutcomeFormAccessor = exports.ServiceVisitAuditAccessor = exports.ServiceAccessor = exports.ServiceAppointmentAccessor = exports.ServiceAppointmentConfigAccessor = exports.ScheduleSlotAccessor = exports.SalesTerritoryAccessor = exports.RewardAccessor = exports.ReturnsAccessor = exports.RemediationRequiredReasonAccessor = exports.RemediationOutcomeFormAccessor = exports.ReferralAccessor = exports.PushNotificationAccessor = exports.ProductAccessor = exports.PriceBookAccessor = exports.PhoneNumberAccessor = exports.PgWebhookAccessor = exports.PgWebhookAttemptAccessor = exports.PgVocalinkAccessor = exports.PgTransactionAccessor = exports.PgSortCodeSubstitutionAccessor = 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.OutageAccessor = exports.OrderAccessor = exports.OrderKciAccessor = exports.OrderItemAccessor = exports.OrderCheckAccessor = exports.OntReplacementApprovalAccessor = exports.OneTouchSwitchAccessor = exports.OhRetroAuditAccessor = exports.OhInstallationAuditAccessor = exports.OhInProgressAuditAccessor = exports.OhExternalAuditAccessor = exports.OhAuditOfInstallationAccessor = void 0;
|
|
13
|
+
exports.YfStockAuditAccessor = exports.YfFieldServiceVisitAccessor = exports.WorkOrderStatusUpdateAccessor = exports.WorkOrderAccessor = exports.WayleaveAuditAccessor = exports.VoiceConfigurationAccessor = exports.VisitAccessor = exports.UserAccessor = exports.UgRetroAuditAccessor = exports.UgInstallationAuditAccessor = exports.UgInProgressAuditAccessor = exports.UgExternalAuditAccessor = exports.UgAuditOfInstallationAccessor = exports.TwilioUserUpdateAccessor = exports.TransactionAccessor = exports.TimeSlotAccessor = 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");
|
|
@@ -83,6 +83,8 @@ var EmailSenderAccessor_1 = require("./EmailSenderAccessor");
|
|
|
83
83
|
Object.defineProperty(exports, "EmailSenderAccessor", { enumerable: true, get: function () { return EmailSenderAccessor_1.EmailSenderAccessor; } });
|
|
84
84
|
var EmailTemplateAccessor_1 = require("./EmailTemplateAccessor");
|
|
85
85
|
Object.defineProperty(exports, "EmailTemplateAccessor", { enumerable: true, get: function () { return EmailTemplateAccessor_1.EmailTemplateAccessor; } });
|
|
86
|
+
var ExchangeAccessor_1 = require("./ExchangeAccessor");
|
|
87
|
+
Object.defineProperty(exports, "ExchangeAccessor", { enumerable: true, get: function () { return ExchangeAccessor_1.ExchangeAccessor; } });
|
|
86
88
|
var FieldServiceDispatchedProductAccessor_1 = require("./FieldServiceDispatchedProductAccessor");
|
|
87
89
|
Object.defineProperty(exports, "FieldServiceDispatchedProductAccessor", { enumerable: true, get: function () { return FieldServiceDispatchedProductAccessor_1.FieldServiceDispatchedProductAccessor; } });
|
|
88
90
|
var FieldServiceProductAccessor_1 = require("./FieldServiceProductAccessor");
|
|
@@ -16,7 +16,7 @@ import { OdinRecord, OdinRecordCreateDto, OdinRecordUpdateDto, OdinRecordUpdated
|
|
|
16
16
|
* Properties for EscalateCaseAction action
|
|
17
17
|
*
|
|
18
18
|
* @property Required fields: 1
|
|
19
|
-
* @property Optional fields:
|
|
19
|
+
* @property Optional fields: 4
|
|
20
20
|
*/
|
|
21
21
|
export interface EscalateCaseActionProperties {
|
|
22
22
|
/**
|
|
@@ -27,6 +27,14 @@ export interface EscalateCaseActionProperties {
|
|
|
27
27
|
* @required
|
|
28
28
|
*/
|
|
29
29
|
TeamId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Providers
|
|
32
|
+
*
|
|
33
|
+
* Providers
|
|
34
|
+
* @type {ENUM}
|
|
35
|
+
* @validWhen Providers eq ["Netomnia","Brsk"]
|
|
36
|
+
*/
|
|
37
|
+
Providers?: string | null;
|
|
30
38
|
/**
|
|
31
39
|
* OwnerId
|
|
32
40
|
*
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateExchange Action DTO
|
|
3
|
+
*
|
|
4
|
+
* Create new Exchange
|
|
5
|
+
*
|
|
6
|
+
* @module ProjectModule
|
|
7
|
+
* @entity Exchange
|
|
8
|
+
* @actionKey CreateExchange
|
|
9
|
+
* @event k1.t-hEOJjsDb.ProjectModule.Exchange.Create.CreateExchange
|
|
10
|
+
*
|
|
11
|
+
* AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
12
|
+
*/
|
|
13
|
+
import { OdinRecordCreateDto, OdinRecordCreatedEvent } from '@d19n/odin-types/dist/core';
|
|
14
|
+
/**
|
|
15
|
+
* RabbitMQ message payload for CreateExchange created events
|
|
16
|
+
*
|
|
17
|
+
* @event k1.t-hEOJjsDb.ProjectModule.Exchange.Create.CreateExchange
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateExchangeMessage extends OdinRecordCreatedEvent<CreateExchangeDto, CreateExchangeProperties> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Properties for CreateExchange action
|
|
23
|
+
*
|
|
24
|
+
* @property Required fields: 2
|
|
25
|
+
* @property Optional fields: 2
|
|
26
|
+
*/
|
|
27
|
+
export interface CreateExchangeProperties {
|
|
28
|
+
/**
|
|
29
|
+
* ExternalRef
|
|
30
|
+
*
|
|
31
|
+
* ID of the exchange in the cosmos table (Project Management - Exchange)
|
|
32
|
+
* @type {NUMBER}
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
ExternalRef: number;
|
|
36
|
+
/**
|
|
37
|
+
* ExPolygonId
|
|
38
|
+
*
|
|
39
|
+
* ExPolygonId (Project Management - Exchange)
|
|
40
|
+
* @type {NUMBER}
|
|
41
|
+
* @required
|
|
42
|
+
*/
|
|
43
|
+
ExPolygonId: number;
|
|
44
|
+
/**
|
|
45
|
+
* Name
|
|
46
|
+
*
|
|
47
|
+
* Name of exchange
|
|
48
|
+
* @type {TEXT}
|
|
49
|
+
*/
|
|
50
|
+
Name?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Borough
|
|
53
|
+
*
|
|
54
|
+
* Data field for Exchange records. Used by Project Management team.
|
|
55
|
+
* @type {TEXT}
|
|
56
|
+
*/
|
|
57
|
+
Borough?: string | null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* CreateExchange
|
|
61
|
+
*
|
|
62
|
+
* Create new Exchange
|
|
63
|
+
*
|
|
64
|
+
* @actionType CREATE - Creates a new Exchange record
|
|
65
|
+
* @module ProjectModule
|
|
66
|
+
* @entity Exchange
|
|
67
|
+
* @event k1.t-hEOJjsDb.ProjectModule.Exchange.Create.CreateExchange
|
|
68
|
+
* @permission schema.action.createexchange.trigger
|
|
69
|
+
* @benchmark This action is tracked for performance benchmarks
|
|
70
|
+
*/
|
|
71
|
+
export declare class CreateExchangeDto extends OdinRecordCreateDto<CreateExchangeProperties> {
|
|
72
|
+
/** Used by SDK generators to identify action type */
|
|
73
|
+
static readonly ACTION_TYPE = "CREATE";
|
|
74
|
+
static readonly ACTION_KEY = "CreateExchange";
|
|
75
|
+
static readonly MODULE_NAME = "ProjectModule";
|
|
76
|
+
static readonly ENTITIES: string[];
|
|
77
|
+
static readonly EVENT_NAME = "k1.t-hEOJjsDb.ProjectModule.Exchange.Create.CreateExchange";
|
|
78
|
+
static readonly PERMISSION = "schema.action.createexchange.trigger";
|
|
79
|
+
/** Step metadata - entity this action targets */
|
|
80
|
+
static readonly STEP_ENTITY = "ProjectModule:Exchange";
|
|
81
|
+
static readonly STEP_SCHEMA_ID = "e8162e52-c785-4094-a812-83b7b86e587e";
|
|
82
|
+
static readonly STEP_SCHEMA_ACTION_ID = "311ea5ad-5b4b-4b5e-b631-c235a2501c0e";
|
|
83
|
+
static readonly AUTO_LINK_PARENT = true;
|
|
84
|
+
readonly actionName: string;
|
|
85
|
+
readonly schemaActionId: string;
|
|
86
|
+
readonly entity: string;
|
|
87
|
+
constructor(properties: CreateExchangeProperties, options?: {
|
|
88
|
+
journeyId?: string;
|
|
89
|
+
});
|
|
90
|
+
}
|