@ptkl/sdk 1.6.5 → 1.6.6
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.0.10.js +7 -2
- package/dist/package.json +1 -1
- package/dist/v0.10/api/component.d.ts +4 -2
- package/dist/v0.10/index.cjs.js +7 -2
- package/dist/v0.10/index.esm.js +7 -2
- package/dist/v0.10/types/component.d.ts +13 -13
- package/dist/v0.9/types/component.d.ts +9 -9
- package/package.json +1 -1
package/dist/index.0.10.js
CHANGED
|
@@ -432,16 +432,21 @@ var ProtokolSDK010 = (function (exports, axios) {
|
|
|
432
432
|
* Get a single extension by name from the component
|
|
433
433
|
*
|
|
434
434
|
* @param name - The name of the extension to retrieve
|
|
435
|
-
* @param version - The component version
|
|
435
|
+
* @param version - The component version (optional; if not provided, the active environment version is used)
|
|
436
436
|
* @returns The extension object
|
|
437
437
|
*
|
|
438
438
|
* @example
|
|
439
439
|
* ```typescript
|
|
440
440
|
* const extension = await component.getExtension('shipping_tracker', '0.1.0')
|
|
441
|
+
* // or, using the active environment:
|
|
442
|
+
* const extension = await component.getExtension('shipping_tracker')
|
|
441
443
|
* ```
|
|
442
444
|
*/
|
|
443
445
|
async getExtension(name, version) {
|
|
444
|
-
|
|
446
|
+
if (version) {
|
|
447
|
+
return await this.client.get(`/v4/system/component/${this.ref}/${version}/extensions/${name}`);
|
|
448
|
+
}
|
|
449
|
+
return await this.client.get(`/v4/system/component/${this.ref}/extensions/${name}`);
|
|
445
450
|
}
|
|
446
451
|
/**
|
|
447
452
|
* Install a new extension on the component
|
package/dist/package.json
CHANGED
|
@@ -183,15 +183,17 @@ export default class Component<C extends string = string> extends PlatformBaseCl
|
|
|
183
183
|
* Get a single extension by name from the component
|
|
184
184
|
*
|
|
185
185
|
* @param name - The name of the extension to retrieve
|
|
186
|
-
* @param version - The component version
|
|
186
|
+
* @param version - The component version (optional; if not provided, the active environment version is used)
|
|
187
187
|
* @returns The extension object
|
|
188
188
|
*
|
|
189
189
|
* @example
|
|
190
190
|
* ```typescript
|
|
191
191
|
* const extension = await component.getExtension('shipping_tracker', '0.1.0')
|
|
192
|
+
* // or, using the active environment:
|
|
193
|
+
* const extension = await component.getExtension('shipping_tracker')
|
|
192
194
|
* ```
|
|
193
195
|
*/
|
|
194
|
-
getExtension(name: string, version
|
|
196
|
+
getExtension(name: string, version?: string): Promise<AxiosResponse<any, any>>;
|
|
195
197
|
/**
|
|
196
198
|
* Install a new extension on the component
|
|
197
199
|
*
|
package/dist/v0.10/index.cjs.js
CHANGED
|
@@ -19398,16 +19398,21 @@ class Component extends PlatformBaseClient {
|
|
|
19398
19398
|
* Get a single extension by name from the component
|
|
19399
19399
|
*
|
|
19400
19400
|
* @param name - The name of the extension to retrieve
|
|
19401
|
-
* @param version - The component version
|
|
19401
|
+
* @param version - The component version (optional; if not provided, the active environment version is used)
|
|
19402
19402
|
* @returns The extension object
|
|
19403
19403
|
*
|
|
19404
19404
|
* @example
|
|
19405
19405
|
* ```typescript
|
|
19406
19406
|
* const extension = await component.getExtension('shipping_tracker', '0.1.0')
|
|
19407
|
+
* // or, using the active environment:
|
|
19408
|
+
* const extension = await component.getExtension('shipping_tracker')
|
|
19407
19409
|
* ```
|
|
19408
19410
|
*/
|
|
19409
19411
|
async getExtension(name, version) {
|
|
19410
|
-
|
|
19412
|
+
if (version) {
|
|
19413
|
+
return await this.client.get(`/v4/system/component/${this.ref}/${version}/extensions/${name}`);
|
|
19414
|
+
}
|
|
19415
|
+
return await this.client.get(`/v4/system/component/${this.ref}/extensions/${name}`);
|
|
19411
19416
|
}
|
|
19412
19417
|
/**
|
|
19413
19418
|
* Install a new extension on the component
|
package/dist/v0.10/index.esm.js
CHANGED
|
@@ -431,16 +431,21 @@ class Component extends PlatformBaseClient {
|
|
|
431
431
|
* Get a single extension by name from the component
|
|
432
432
|
*
|
|
433
433
|
* @param name - The name of the extension to retrieve
|
|
434
|
-
* @param version - The component version
|
|
434
|
+
* @param version - The component version (optional; if not provided, the active environment version is used)
|
|
435
435
|
* @returns The extension object
|
|
436
436
|
*
|
|
437
437
|
* @example
|
|
438
438
|
* ```typescript
|
|
439
439
|
* const extension = await component.getExtension('shipping_tracker', '0.1.0')
|
|
440
|
+
* // or, using the active environment:
|
|
441
|
+
* const extension = await component.getExtension('shipping_tracker')
|
|
440
442
|
* ```
|
|
441
443
|
*/
|
|
442
444
|
async getExtension(name, version) {
|
|
443
|
-
|
|
445
|
+
if (version) {
|
|
446
|
+
return await this.client.get(`/v4/system/component/${this.ref}/${version}/extensions/${name}`);
|
|
447
|
+
}
|
|
448
|
+
return await this.client.get(`/v4/system/component/${this.ref}/extensions/${name}`);
|
|
444
449
|
}
|
|
445
450
|
/**
|
|
446
451
|
* Install a new extension on the component
|
|
@@ -236,7 +236,7 @@ type FieldConstraints = {
|
|
|
236
236
|
to?: string;
|
|
237
237
|
from?: string;
|
|
238
238
|
days?: number[];
|
|
239
|
-
days_of_month?: number[];
|
|
239
|
+
days_of_month?: number[] | null;
|
|
240
240
|
ranges?: Array<{
|
|
241
241
|
from: string;
|
|
242
242
|
to: string;
|
|
@@ -247,7 +247,7 @@ type FieldConstraints = {
|
|
|
247
247
|
to?: string;
|
|
248
248
|
from?: string;
|
|
249
249
|
days?: number[];
|
|
250
|
-
days_of_month?: number[];
|
|
250
|
+
days_of_month?: number[] | null;
|
|
251
251
|
ranges?: Array<{
|
|
252
252
|
from: string;
|
|
253
253
|
to: string;
|
|
@@ -321,7 +321,7 @@ type PresetContext = {
|
|
|
321
321
|
};
|
|
322
322
|
type Preset = {
|
|
323
323
|
name: string;
|
|
324
|
-
roles?: string[];
|
|
324
|
+
roles?: string[] | null;
|
|
325
325
|
context: PresetContext;
|
|
326
326
|
};
|
|
327
327
|
type Function = {
|
|
@@ -331,12 +331,12 @@ type Function = {
|
|
|
331
331
|
type Extension = {
|
|
332
332
|
name: string;
|
|
333
333
|
is_active: boolean;
|
|
334
|
-
fields?: SettingsField[];
|
|
335
|
-
functions?: Function[];
|
|
336
|
-
workflows?: Record<string, any>[];
|
|
337
|
-
templates?: Record<string, any
|
|
338
|
-
templates_dist?: TemplatesDist;
|
|
339
|
-
config?: Record<string, any
|
|
334
|
+
fields?: SettingsField[] | null;
|
|
335
|
+
functions?: Function[] | null;
|
|
336
|
+
workflows?: Record<string, any>[] | null;
|
|
337
|
+
templates?: Record<string, any> | null;
|
|
338
|
+
templates_dist?: TemplatesDist | null;
|
|
339
|
+
config?: Record<string, any> | null;
|
|
340
340
|
version?: string;
|
|
341
341
|
};
|
|
342
342
|
type FieldAccessConfig = {
|
|
@@ -353,9 +353,9 @@ type Policy<T = Record<string, any>> = {
|
|
|
353
353
|
config?: T;
|
|
354
354
|
};
|
|
355
355
|
type TemplatesDist = {
|
|
356
|
-
sdk_version
|
|
357
|
-
sdk_engine
|
|
358
|
-
dist
|
|
356
|
+
sdk_version?: number | null;
|
|
357
|
+
sdk_engine?: string | null;
|
|
358
|
+
dist?: Record<string, any> | null;
|
|
359
359
|
};
|
|
360
360
|
type Settings = {
|
|
361
361
|
version?: string;
|
|
@@ -391,7 +391,7 @@ type Settings = {
|
|
|
391
391
|
};
|
|
392
392
|
presets?: Preset[] | null;
|
|
393
393
|
templates?: Record<string, any>[] | null;
|
|
394
|
-
templates_dist?: TemplatesDist;
|
|
394
|
+
templates_dist?: TemplatesDist | null;
|
|
395
395
|
config?: Record<string, any> | null;
|
|
396
396
|
functions?: Function[] | null;
|
|
397
397
|
extensions?: Extension[] | null;
|
|
@@ -236,7 +236,7 @@ type FieldConstraints = {
|
|
|
236
236
|
to?: string;
|
|
237
237
|
from?: string;
|
|
238
238
|
days?: number[];
|
|
239
|
-
days_of_month?: number[];
|
|
239
|
+
days_of_month?: number[] | null;
|
|
240
240
|
ranges?: Array<{
|
|
241
241
|
from: string;
|
|
242
242
|
to: string;
|
|
@@ -247,7 +247,7 @@ type FieldConstraints = {
|
|
|
247
247
|
to?: string;
|
|
248
248
|
from?: string;
|
|
249
249
|
days?: number[];
|
|
250
|
-
days_of_month?: number[];
|
|
250
|
+
days_of_month?: number[] | null;
|
|
251
251
|
ranges?: Array<{
|
|
252
252
|
from: string;
|
|
253
253
|
to: string;
|
|
@@ -321,7 +321,7 @@ type PresetContext = {
|
|
|
321
321
|
};
|
|
322
322
|
type Preset = {
|
|
323
323
|
name: string;
|
|
324
|
-
roles?: string[];
|
|
324
|
+
roles?: string[] | null;
|
|
325
325
|
context: PresetContext;
|
|
326
326
|
};
|
|
327
327
|
type Function = {
|
|
@@ -335,14 +335,14 @@ type Extension = {
|
|
|
335
335
|
functions?: Function[];
|
|
336
336
|
workflows?: Record<string, any>[];
|
|
337
337
|
templates?: Record<string, any>;
|
|
338
|
-
templates_dist?: TemplatesDist;
|
|
338
|
+
templates_dist?: TemplatesDist | null;
|
|
339
339
|
config?: Record<string, any>;
|
|
340
340
|
version?: string;
|
|
341
341
|
};
|
|
342
342
|
type FieldAccessConfig = {
|
|
343
343
|
fields: string[];
|
|
344
344
|
actions: string[];
|
|
345
|
-
roles: string[];
|
|
345
|
+
roles: string[] | null;
|
|
346
346
|
};
|
|
347
347
|
type Policy<T = Record<string, any>> = {
|
|
348
348
|
type: string;
|
|
@@ -353,9 +353,9 @@ type Policy<T = Record<string, any>> = {
|
|
|
353
353
|
config?: T;
|
|
354
354
|
};
|
|
355
355
|
type TemplatesDist = {
|
|
356
|
-
sdk_version
|
|
357
|
-
sdk_engine
|
|
358
|
-
dist
|
|
356
|
+
sdk_version?: number;
|
|
357
|
+
sdk_engine?: string;
|
|
358
|
+
dist?: Record<string, any>;
|
|
359
359
|
};
|
|
360
360
|
type Settings = {
|
|
361
361
|
version?: string;
|
|
@@ -391,7 +391,7 @@ type Settings = {
|
|
|
391
391
|
};
|
|
392
392
|
presets?: Preset[] | null;
|
|
393
393
|
templates?: Record<string, any>[] | null;
|
|
394
|
-
templates_dist?: TemplatesDist;
|
|
394
|
+
templates_dist?: TemplatesDist | null;
|
|
395
395
|
config?: Record<string, any> | null;
|
|
396
396
|
functions?: Function[] | null;
|
|
397
397
|
extensions?: Extension[] | null;
|