@adobe-commerce/aio-toolkit 1.0.2 → 1.0.4
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/CHANGELOG.md +111 -0
- package/README.md +349 -11
- package/dist/index.d.mts +188 -5
- package/dist/index.d.ts +188 -5
- package/dist/index.js +1222 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1195 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -126,19 +126,111 @@ interface FileRecord {
|
|
|
126
126
|
updatedAt: string;
|
|
127
127
|
[key: string]: any;
|
|
128
128
|
}
|
|
129
|
+
interface FileMetadata {
|
|
130
|
+
name: string;
|
|
131
|
+
creationTime: Date;
|
|
132
|
+
lastModified: Date;
|
|
133
|
+
etag: string;
|
|
134
|
+
contentLength: number;
|
|
135
|
+
contentType: string;
|
|
136
|
+
isDirectory: boolean;
|
|
137
|
+
isPublic: boolean;
|
|
138
|
+
url: string;
|
|
139
|
+
}
|
|
129
140
|
|
|
130
141
|
declare class FileRepository {
|
|
131
142
|
private readonly filepath;
|
|
132
143
|
private files;
|
|
133
144
|
constructor(filepath: string);
|
|
134
145
|
list(): Promise<FileRecord[]>;
|
|
146
|
+
metadata(id?: string): Promise<FileMetadata | FileMetadata[]>;
|
|
135
147
|
load(id?: string): Promise<FileRecord>;
|
|
136
|
-
save(payload?: Partial<FileRecord>, id?: string | null): Promise<string | null>;
|
|
148
|
+
save(payload?: Partial<FileRecord>, id?: string | null, overwrite?: boolean): Promise<string | null>;
|
|
137
149
|
delete(ids?: string[]): Promise<FileRecord[]>;
|
|
138
150
|
private sanitizeFileId;
|
|
139
151
|
private getFiles;
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
interface EventData {
|
|
155
|
+
type: string;
|
|
156
|
+
data: any;
|
|
157
|
+
subject?: string;
|
|
158
|
+
}
|
|
159
|
+
interface PublishEventResult {
|
|
160
|
+
eventId: string;
|
|
161
|
+
status: 'published' | 'failed';
|
|
162
|
+
publishedAt: string;
|
|
163
|
+
error?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
declare class PublishEvent {
|
|
167
|
+
private readonly imsOrgId;
|
|
168
|
+
private readonly apiKey;
|
|
169
|
+
private readonly accessToken;
|
|
170
|
+
private readonly customLogger;
|
|
171
|
+
constructor(imsOrgId: string, apiKey: string, accessToken: string, logger?: any);
|
|
172
|
+
execute(providerId: string, eventCode: string, payload: any, subject?: string): Promise<PublishEventResult>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare enum WebhookActionOperation {
|
|
176
|
+
SUCCESS = "success",
|
|
177
|
+
EXCEPTION = "exception",
|
|
178
|
+
ADD = "add",
|
|
179
|
+
REPLACE = "replace",
|
|
180
|
+
REMOVE = "remove"
|
|
181
|
+
}
|
|
182
|
+
interface WebhookActionSuccessResponse {
|
|
183
|
+
op: typeof WebhookActionOperation.SUCCESS;
|
|
184
|
+
}
|
|
185
|
+
interface WebhookActionExceptionResponse {
|
|
186
|
+
op: typeof WebhookActionOperation.EXCEPTION;
|
|
187
|
+
class?: string;
|
|
188
|
+
message?: string;
|
|
189
|
+
}
|
|
190
|
+
interface WebhookActionAddResponse {
|
|
191
|
+
op: typeof WebhookActionOperation.ADD;
|
|
192
|
+
path: string;
|
|
193
|
+
value: any;
|
|
194
|
+
instance?: string;
|
|
195
|
+
}
|
|
196
|
+
interface WebhookActionReplaceResponse {
|
|
197
|
+
op: typeof WebhookActionOperation.REPLACE;
|
|
198
|
+
path: string;
|
|
199
|
+
value: any;
|
|
200
|
+
instance?: string;
|
|
201
|
+
}
|
|
202
|
+
interface WebhookActionRemoveResponse {
|
|
203
|
+
op: typeof WebhookActionOperation.REMOVE;
|
|
204
|
+
path: string;
|
|
205
|
+
}
|
|
206
|
+
type WebhookActionResponseType = WebhookActionSuccessResponse | WebhookActionExceptionResponse | WebhookActionAddResponse | WebhookActionReplaceResponse | WebhookActionRemoveResponse;
|
|
207
|
+
|
|
208
|
+
declare enum SignatureVerification {
|
|
209
|
+
ENABLED = "enabled",
|
|
210
|
+
DISABLED = "disabled"
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare class WebhookAction {
|
|
214
|
+
static execute(name?: string, requiredParams?: string[], requiredHeaders?: string[], signatureVerification?: SignatureVerification, action?: (params: {
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
}, ctx: {
|
|
217
|
+
logger: any;
|
|
218
|
+
headers: {
|
|
219
|
+
[key: string]: any;
|
|
220
|
+
};
|
|
221
|
+
}) => Promise<WebhookActionResponseType | WebhookActionResponseType[]>): (params: {
|
|
222
|
+
[key: string]: any;
|
|
223
|
+
}) => Promise<RuntimeActionResponseType>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class WebhookActionResponse {
|
|
227
|
+
static success(): WebhookActionSuccessResponse;
|
|
228
|
+
static exception(message?: string, exceptionClass?: string): WebhookActionExceptionResponse;
|
|
229
|
+
static add(path: string, value: any, instance?: string): WebhookActionAddResponse;
|
|
230
|
+
static replace(path: string, value: any, instance?: string): WebhookActionReplaceResponse;
|
|
231
|
+
static remove(path: string): WebhookActionRemoveResponse;
|
|
232
|
+
}
|
|
233
|
+
|
|
142
234
|
interface BearerTokenInfo {
|
|
143
235
|
token: string | null;
|
|
144
236
|
tokenLength: number;
|
|
@@ -402,9 +494,8 @@ declare class ImsConnection implements Connection {
|
|
|
402
494
|
private technicalAccountEmail;
|
|
403
495
|
private imsOrgId;
|
|
404
496
|
private scopes;
|
|
405
|
-
private
|
|
406
|
-
|
|
407
|
-
constructor(clientId: string, clientSecret: string, technicalAccountId: string, technicalAccountEmail: string, imsOrgId: string, scopes: Array<string>, logger?: any, currentContext?: string);
|
|
497
|
+
private customLogger;
|
|
498
|
+
constructor(clientId: string, clientSecret: string, technicalAccountId: string, technicalAccountEmail: string, imsOrgId: string, scopes: Array<string>, logger?: any);
|
|
408
499
|
extend(commerceGot: any): Promise<any>;
|
|
409
500
|
}
|
|
410
501
|
|
|
@@ -423,12 +514,74 @@ declare class GenerateBasicAuthToken {
|
|
|
423
514
|
constructor(baseUrl: string, username: string, password: string, logger?: any);
|
|
424
515
|
execute(): Promise<string | null>;
|
|
425
516
|
getCommerceToken(): Promise<TokenResult | null>;
|
|
517
|
+
createTokenEndpoint(): string;
|
|
426
518
|
createEndpoint(endpoint: string): string;
|
|
427
519
|
setValue(result: TokenResult): Promise<boolean>;
|
|
428
520
|
getValue(): Promise<string | null>;
|
|
429
521
|
getState(): Promise<any>;
|
|
430
522
|
}
|
|
431
523
|
|
|
524
|
+
interface ShippingCarrierData {
|
|
525
|
+
code: string;
|
|
526
|
+
title?: string;
|
|
527
|
+
stores?: string[];
|
|
528
|
+
countries?: string[];
|
|
529
|
+
sort_order?: number;
|
|
530
|
+
active?: boolean;
|
|
531
|
+
tracking_available?: boolean;
|
|
532
|
+
shipping_labels_available?: boolean;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface ShippingCarrierMethodAdditionalData {
|
|
536
|
+
key: string;
|
|
537
|
+
value: any;
|
|
538
|
+
}
|
|
539
|
+
interface ShippingCarrierMethodData {
|
|
540
|
+
carrier_code: string;
|
|
541
|
+
method: string;
|
|
542
|
+
method_title: string;
|
|
543
|
+
price: number;
|
|
544
|
+
cost: number;
|
|
545
|
+
additional_data: ShippingCarrierMethodAdditionalData[];
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
declare class ShippingCarrierMethod {
|
|
549
|
+
private methodData;
|
|
550
|
+
constructor(carrierCode: string, method: string);
|
|
551
|
+
setMethodTitle(methodTitle: string): this;
|
|
552
|
+
setPrice(price: number): this;
|
|
553
|
+
setCost(cost: number): this;
|
|
554
|
+
addAdditionalData(key: string, value: any): this;
|
|
555
|
+
getData(): ShippingCarrierMethodData;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
declare class ShippingCarrier {
|
|
559
|
+
private carrierData;
|
|
560
|
+
private addedMethods;
|
|
561
|
+
private removedMethods;
|
|
562
|
+
constructor(code: string, callback?: (builder: ShippingCarrier) => void);
|
|
563
|
+
private validateCarrierCode;
|
|
564
|
+
private validateMethodCode;
|
|
565
|
+
setTitle(title: string): this;
|
|
566
|
+
setStores(stores: string[]): this;
|
|
567
|
+
setCountries(countries: string[]): this;
|
|
568
|
+
setSortOrder(sortOrder: number): this;
|
|
569
|
+
setActive(active: boolean): this;
|
|
570
|
+
setTrackingAvailable(trackingAvailable: boolean): this;
|
|
571
|
+
setShippingLabelsAvailable(shippingLabelsAvailable: boolean): this;
|
|
572
|
+
setData(carrierData: ShippingCarrierData): this;
|
|
573
|
+
addMethod(method: string, callback?: (builder: ShippingCarrierMethod) => void): this;
|
|
574
|
+
removeMethod(method: string): this;
|
|
575
|
+
reset(code: string, callback?: (builder: ShippingCarrier) => void): this;
|
|
576
|
+
getData(): ShippingCarrierData;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare class ShippingCarrierResponse {
|
|
580
|
+
private carrier;
|
|
581
|
+
constructor(carrier: ShippingCarrier);
|
|
582
|
+
generate(): WebhookActionResponseType[];
|
|
583
|
+
}
|
|
584
|
+
|
|
432
585
|
interface AdobeIMSConfig {
|
|
433
586
|
client_id: string;
|
|
434
587
|
client_secrets: string[];
|
|
@@ -632,4 +785,34 @@ interface GetRegistrationQueryParams {
|
|
|
632
785
|
registrationId: string;
|
|
633
786
|
}
|
|
634
787
|
|
|
635
|
-
|
|
788
|
+
interface MenuItem {
|
|
789
|
+
id: string;
|
|
790
|
+
title: string;
|
|
791
|
+
sortOrder: number;
|
|
792
|
+
parent?: string;
|
|
793
|
+
isSection?: boolean;
|
|
794
|
+
}
|
|
795
|
+
interface Page {
|
|
796
|
+
title: string;
|
|
797
|
+
}
|
|
798
|
+
interface AdminUiSdkRegistration {
|
|
799
|
+
registration: {
|
|
800
|
+
menuItems?: MenuItem[];
|
|
801
|
+
page?: Page;
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
declare class AdminUiSdk {
|
|
806
|
+
private extensionId;
|
|
807
|
+
private menuItems;
|
|
808
|
+
private pageTitle?;
|
|
809
|
+
constructor(extensionId: string);
|
|
810
|
+
private isValidExtensionId;
|
|
811
|
+
private isValidMenuId;
|
|
812
|
+
addMenuItem(id: string, title: string, sortOrder: number, parent?: string): void;
|
|
813
|
+
addMenuSection(id: string, title: string, sortOrder: number, parent?: string): void;
|
|
814
|
+
addPage(title: string): void;
|
|
815
|
+
getRegistration(): AdminUiSdkRegistration;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export { AdminUiSdk, type AdminUiSdkRegistration, AdobeAuth, AdobeCommerceClient, type AdobeIMSConfig, BasicAuthConnection, BearerToken, type BearerTokenInfo, type Connection, type CreateEventResult, CreateEvents, type CreateProviderParams, type CreateProviderResult, type CreateRegistrationResult, CreateRegistrations, type ErrorResponse, EventConsumerAction, type EventData, type EventMetadata, type EventMetadataInputModel, type EventMetadataListResponse, EventMetadataManager, type ExtendedRequestError, type FileMetadata, type FileRecord, FileRepository, GenerateBasicAuthToken, type GetProviderQueryParams, type GetRegistrationQueryParams, GraphQlAction, type HALLink, type Headers, HttpMethod, HttpStatus, IOEventsApiError, type IOEventsError, ImsConnection, InfiniteLoopBreaker, type InfiniteLoopData, IoEventsGlobals, type ListProvidersQueryParams, type ListRegistrationQueryParams, type MenuItem, Oauth1aConnection, OnboardEvents, type OnboardEventsInput, type OnboardEventsResponse, Openwhisk, OpenwhiskAction, type Page, Parameters, type Provider, type ProviderInputModel, ProviderManager, PublishEvent, type PublishEventResult, type Registration, type RegistrationCreateModel, type RegistrationListResponse, RegistrationManager, RestClient, RuntimeAction, RuntimeActionResponse, type RuntimeActionResponseType, ShippingCarrier, type ShippingCarrierData, ShippingCarrierMethod, type ShippingCarrierMethodAdditionalData, type ShippingCarrierMethodData, ShippingCarrierResponse, SignatureVerification, type SuccessResponse, type TokenResult, Validator, WebhookAction, type WebhookActionAddResponse, type WebhookActionExceptionResponse, WebhookActionOperation, type WebhookActionRemoveResponse, type WebhookActionReplaceResponse, WebhookActionResponse, type WebhookActionResponseType, type WebhookActionSuccessResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -126,19 +126,111 @@ interface FileRecord {
|
|
|
126
126
|
updatedAt: string;
|
|
127
127
|
[key: string]: any;
|
|
128
128
|
}
|
|
129
|
+
interface FileMetadata {
|
|
130
|
+
name: string;
|
|
131
|
+
creationTime: Date;
|
|
132
|
+
lastModified: Date;
|
|
133
|
+
etag: string;
|
|
134
|
+
contentLength: number;
|
|
135
|
+
contentType: string;
|
|
136
|
+
isDirectory: boolean;
|
|
137
|
+
isPublic: boolean;
|
|
138
|
+
url: string;
|
|
139
|
+
}
|
|
129
140
|
|
|
130
141
|
declare class FileRepository {
|
|
131
142
|
private readonly filepath;
|
|
132
143
|
private files;
|
|
133
144
|
constructor(filepath: string);
|
|
134
145
|
list(): Promise<FileRecord[]>;
|
|
146
|
+
metadata(id?: string): Promise<FileMetadata | FileMetadata[]>;
|
|
135
147
|
load(id?: string): Promise<FileRecord>;
|
|
136
|
-
save(payload?: Partial<FileRecord>, id?: string | null): Promise<string | null>;
|
|
148
|
+
save(payload?: Partial<FileRecord>, id?: string | null, overwrite?: boolean): Promise<string | null>;
|
|
137
149
|
delete(ids?: string[]): Promise<FileRecord[]>;
|
|
138
150
|
private sanitizeFileId;
|
|
139
151
|
private getFiles;
|
|
140
152
|
}
|
|
141
153
|
|
|
154
|
+
interface EventData {
|
|
155
|
+
type: string;
|
|
156
|
+
data: any;
|
|
157
|
+
subject?: string;
|
|
158
|
+
}
|
|
159
|
+
interface PublishEventResult {
|
|
160
|
+
eventId: string;
|
|
161
|
+
status: 'published' | 'failed';
|
|
162
|
+
publishedAt: string;
|
|
163
|
+
error?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
declare class PublishEvent {
|
|
167
|
+
private readonly imsOrgId;
|
|
168
|
+
private readonly apiKey;
|
|
169
|
+
private readonly accessToken;
|
|
170
|
+
private readonly customLogger;
|
|
171
|
+
constructor(imsOrgId: string, apiKey: string, accessToken: string, logger?: any);
|
|
172
|
+
execute(providerId: string, eventCode: string, payload: any, subject?: string): Promise<PublishEventResult>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare enum WebhookActionOperation {
|
|
176
|
+
SUCCESS = "success",
|
|
177
|
+
EXCEPTION = "exception",
|
|
178
|
+
ADD = "add",
|
|
179
|
+
REPLACE = "replace",
|
|
180
|
+
REMOVE = "remove"
|
|
181
|
+
}
|
|
182
|
+
interface WebhookActionSuccessResponse {
|
|
183
|
+
op: typeof WebhookActionOperation.SUCCESS;
|
|
184
|
+
}
|
|
185
|
+
interface WebhookActionExceptionResponse {
|
|
186
|
+
op: typeof WebhookActionOperation.EXCEPTION;
|
|
187
|
+
class?: string;
|
|
188
|
+
message?: string;
|
|
189
|
+
}
|
|
190
|
+
interface WebhookActionAddResponse {
|
|
191
|
+
op: typeof WebhookActionOperation.ADD;
|
|
192
|
+
path: string;
|
|
193
|
+
value: any;
|
|
194
|
+
instance?: string;
|
|
195
|
+
}
|
|
196
|
+
interface WebhookActionReplaceResponse {
|
|
197
|
+
op: typeof WebhookActionOperation.REPLACE;
|
|
198
|
+
path: string;
|
|
199
|
+
value: any;
|
|
200
|
+
instance?: string;
|
|
201
|
+
}
|
|
202
|
+
interface WebhookActionRemoveResponse {
|
|
203
|
+
op: typeof WebhookActionOperation.REMOVE;
|
|
204
|
+
path: string;
|
|
205
|
+
}
|
|
206
|
+
type WebhookActionResponseType = WebhookActionSuccessResponse | WebhookActionExceptionResponse | WebhookActionAddResponse | WebhookActionReplaceResponse | WebhookActionRemoveResponse;
|
|
207
|
+
|
|
208
|
+
declare enum SignatureVerification {
|
|
209
|
+
ENABLED = "enabled",
|
|
210
|
+
DISABLED = "disabled"
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare class WebhookAction {
|
|
214
|
+
static execute(name?: string, requiredParams?: string[], requiredHeaders?: string[], signatureVerification?: SignatureVerification, action?: (params: {
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
}, ctx: {
|
|
217
|
+
logger: any;
|
|
218
|
+
headers: {
|
|
219
|
+
[key: string]: any;
|
|
220
|
+
};
|
|
221
|
+
}) => Promise<WebhookActionResponseType | WebhookActionResponseType[]>): (params: {
|
|
222
|
+
[key: string]: any;
|
|
223
|
+
}) => Promise<RuntimeActionResponseType>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class WebhookActionResponse {
|
|
227
|
+
static success(): WebhookActionSuccessResponse;
|
|
228
|
+
static exception(message?: string, exceptionClass?: string): WebhookActionExceptionResponse;
|
|
229
|
+
static add(path: string, value: any, instance?: string): WebhookActionAddResponse;
|
|
230
|
+
static replace(path: string, value: any, instance?: string): WebhookActionReplaceResponse;
|
|
231
|
+
static remove(path: string): WebhookActionRemoveResponse;
|
|
232
|
+
}
|
|
233
|
+
|
|
142
234
|
interface BearerTokenInfo {
|
|
143
235
|
token: string | null;
|
|
144
236
|
tokenLength: number;
|
|
@@ -402,9 +494,8 @@ declare class ImsConnection implements Connection {
|
|
|
402
494
|
private technicalAccountEmail;
|
|
403
495
|
private imsOrgId;
|
|
404
496
|
private scopes;
|
|
405
|
-
private
|
|
406
|
-
|
|
407
|
-
constructor(clientId: string, clientSecret: string, technicalAccountId: string, technicalAccountEmail: string, imsOrgId: string, scopes: Array<string>, logger?: any, currentContext?: string);
|
|
497
|
+
private customLogger;
|
|
498
|
+
constructor(clientId: string, clientSecret: string, technicalAccountId: string, technicalAccountEmail: string, imsOrgId: string, scopes: Array<string>, logger?: any);
|
|
408
499
|
extend(commerceGot: any): Promise<any>;
|
|
409
500
|
}
|
|
410
501
|
|
|
@@ -423,12 +514,74 @@ declare class GenerateBasicAuthToken {
|
|
|
423
514
|
constructor(baseUrl: string, username: string, password: string, logger?: any);
|
|
424
515
|
execute(): Promise<string | null>;
|
|
425
516
|
getCommerceToken(): Promise<TokenResult | null>;
|
|
517
|
+
createTokenEndpoint(): string;
|
|
426
518
|
createEndpoint(endpoint: string): string;
|
|
427
519
|
setValue(result: TokenResult): Promise<boolean>;
|
|
428
520
|
getValue(): Promise<string | null>;
|
|
429
521
|
getState(): Promise<any>;
|
|
430
522
|
}
|
|
431
523
|
|
|
524
|
+
interface ShippingCarrierData {
|
|
525
|
+
code: string;
|
|
526
|
+
title?: string;
|
|
527
|
+
stores?: string[];
|
|
528
|
+
countries?: string[];
|
|
529
|
+
sort_order?: number;
|
|
530
|
+
active?: boolean;
|
|
531
|
+
tracking_available?: boolean;
|
|
532
|
+
shipping_labels_available?: boolean;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface ShippingCarrierMethodAdditionalData {
|
|
536
|
+
key: string;
|
|
537
|
+
value: any;
|
|
538
|
+
}
|
|
539
|
+
interface ShippingCarrierMethodData {
|
|
540
|
+
carrier_code: string;
|
|
541
|
+
method: string;
|
|
542
|
+
method_title: string;
|
|
543
|
+
price: number;
|
|
544
|
+
cost: number;
|
|
545
|
+
additional_data: ShippingCarrierMethodAdditionalData[];
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
declare class ShippingCarrierMethod {
|
|
549
|
+
private methodData;
|
|
550
|
+
constructor(carrierCode: string, method: string);
|
|
551
|
+
setMethodTitle(methodTitle: string): this;
|
|
552
|
+
setPrice(price: number): this;
|
|
553
|
+
setCost(cost: number): this;
|
|
554
|
+
addAdditionalData(key: string, value: any): this;
|
|
555
|
+
getData(): ShippingCarrierMethodData;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
declare class ShippingCarrier {
|
|
559
|
+
private carrierData;
|
|
560
|
+
private addedMethods;
|
|
561
|
+
private removedMethods;
|
|
562
|
+
constructor(code: string, callback?: (builder: ShippingCarrier) => void);
|
|
563
|
+
private validateCarrierCode;
|
|
564
|
+
private validateMethodCode;
|
|
565
|
+
setTitle(title: string): this;
|
|
566
|
+
setStores(stores: string[]): this;
|
|
567
|
+
setCountries(countries: string[]): this;
|
|
568
|
+
setSortOrder(sortOrder: number): this;
|
|
569
|
+
setActive(active: boolean): this;
|
|
570
|
+
setTrackingAvailable(trackingAvailable: boolean): this;
|
|
571
|
+
setShippingLabelsAvailable(shippingLabelsAvailable: boolean): this;
|
|
572
|
+
setData(carrierData: ShippingCarrierData): this;
|
|
573
|
+
addMethod(method: string, callback?: (builder: ShippingCarrierMethod) => void): this;
|
|
574
|
+
removeMethod(method: string): this;
|
|
575
|
+
reset(code: string, callback?: (builder: ShippingCarrier) => void): this;
|
|
576
|
+
getData(): ShippingCarrierData;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
declare class ShippingCarrierResponse {
|
|
580
|
+
private carrier;
|
|
581
|
+
constructor(carrier: ShippingCarrier);
|
|
582
|
+
generate(): WebhookActionResponseType[];
|
|
583
|
+
}
|
|
584
|
+
|
|
432
585
|
interface AdobeIMSConfig {
|
|
433
586
|
client_id: string;
|
|
434
587
|
client_secrets: string[];
|
|
@@ -632,4 +785,34 @@ interface GetRegistrationQueryParams {
|
|
|
632
785
|
registrationId: string;
|
|
633
786
|
}
|
|
634
787
|
|
|
635
|
-
|
|
788
|
+
interface MenuItem {
|
|
789
|
+
id: string;
|
|
790
|
+
title: string;
|
|
791
|
+
sortOrder: number;
|
|
792
|
+
parent?: string;
|
|
793
|
+
isSection?: boolean;
|
|
794
|
+
}
|
|
795
|
+
interface Page {
|
|
796
|
+
title: string;
|
|
797
|
+
}
|
|
798
|
+
interface AdminUiSdkRegistration {
|
|
799
|
+
registration: {
|
|
800
|
+
menuItems?: MenuItem[];
|
|
801
|
+
page?: Page;
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
declare class AdminUiSdk {
|
|
806
|
+
private extensionId;
|
|
807
|
+
private menuItems;
|
|
808
|
+
private pageTitle?;
|
|
809
|
+
constructor(extensionId: string);
|
|
810
|
+
private isValidExtensionId;
|
|
811
|
+
private isValidMenuId;
|
|
812
|
+
addMenuItem(id: string, title: string, sortOrder: number, parent?: string): void;
|
|
813
|
+
addMenuSection(id: string, title: string, sortOrder: number, parent?: string): void;
|
|
814
|
+
addPage(title: string): void;
|
|
815
|
+
getRegistration(): AdminUiSdkRegistration;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export { AdminUiSdk, type AdminUiSdkRegistration, AdobeAuth, AdobeCommerceClient, type AdobeIMSConfig, BasicAuthConnection, BearerToken, type BearerTokenInfo, type Connection, type CreateEventResult, CreateEvents, type CreateProviderParams, type CreateProviderResult, type CreateRegistrationResult, CreateRegistrations, type ErrorResponse, EventConsumerAction, type EventData, type EventMetadata, type EventMetadataInputModel, type EventMetadataListResponse, EventMetadataManager, type ExtendedRequestError, type FileMetadata, type FileRecord, FileRepository, GenerateBasicAuthToken, type GetProviderQueryParams, type GetRegistrationQueryParams, GraphQlAction, type HALLink, type Headers, HttpMethod, HttpStatus, IOEventsApiError, type IOEventsError, ImsConnection, InfiniteLoopBreaker, type InfiniteLoopData, IoEventsGlobals, type ListProvidersQueryParams, type ListRegistrationQueryParams, type MenuItem, Oauth1aConnection, OnboardEvents, type OnboardEventsInput, type OnboardEventsResponse, Openwhisk, OpenwhiskAction, type Page, Parameters, type Provider, type ProviderInputModel, ProviderManager, PublishEvent, type PublishEventResult, type Registration, type RegistrationCreateModel, type RegistrationListResponse, RegistrationManager, RestClient, RuntimeAction, RuntimeActionResponse, type RuntimeActionResponseType, ShippingCarrier, type ShippingCarrierData, ShippingCarrierMethod, type ShippingCarrierMethodAdditionalData, type ShippingCarrierMethodData, ShippingCarrierResponse, SignatureVerification, type SuccessResponse, type TokenResult, Validator, WebhookAction, type WebhookActionAddResponse, type WebhookActionExceptionResponse, WebhookActionOperation, type WebhookActionRemoveResponse, type WebhookActionReplaceResponse, WebhookActionResponse, type WebhookActionResponseType, type WebhookActionSuccessResponse };
|