@redonvn/zalo-ads-sdk 0.2.16 → 0.2.18
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.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +115 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +115 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -196,6 +196,10 @@ interface ZaloSsoAuthOptions {
|
|
|
196
196
|
* Nếu không truyền, SDK tự động trích xuất từ `zpsid` (ví dụ: `zalo_330114198_...`).
|
|
197
197
|
*/
|
|
198
198
|
accountKey?: string;
|
|
199
|
+
/**
|
|
200
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) - chứa accountId, memberId, agencyId, accountType.
|
|
201
|
+
*/
|
|
202
|
+
accountScope?: ZaloAccountScope;
|
|
199
203
|
/**
|
|
200
204
|
* Alias của `accountKey` dành cho hệ thống Multi-Integration trên Backend.
|
|
201
205
|
*/
|
|
@@ -275,6 +279,7 @@ declare function parseZaloCookieInput(rawInput: string): {
|
|
|
275
279
|
*/
|
|
276
280
|
declare class ZaloAuthManager {
|
|
277
281
|
private explicitAccountKey?;
|
|
282
|
+
private accountScope?;
|
|
278
283
|
private zpsid?;
|
|
279
284
|
private readonly getZpsidFn?;
|
|
280
285
|
private extraCookies;
|
|
@@ -294,6 +299,8 @@ declare class ZaloAuthManager {
|
|
|
294
299
|
* Trả về `sessionStore` đang sử dụng (RAM / Redis / Tiered).
|
|
295
300
|
*/
|
|
296
301
|
getSessionStore(): ZaloSessionStore;
|
|
302
|
+
getAccountScope(): ZaloAccountScope | undefined;
|
|
303
|
+
setAccountScope(scope?: ZaloAccountScope): void;
|
|
297
304
|
/**
|
|
298
305
|
* Cập nhật `zpsid` mới và xóa toàn bộ cache phiên cũ trên cả RAM lẫn Redis.
|
|
299
306
|
*/
|
|
@@ -380,7 +387,19 @@ interface ZaloSdkAuth {
|
|
|
380
387
|
getHeaders?: (context: ZaloSdkAuthContext) => Promise<Record<string, string> | undefined> | Record<string, string> | undefined;
|
|
381
388
|
getCookies?: (context: ZaloSdkAuthContext) => Promise<Record<string, string> | undefined> | Record<string, string> | undefined;
|
|
382
389
|
}
|
|
390
|
+
interface ZaloAccountScope {
|
|
391
|
+
accountId?: string | number;
|
|
392
|
+
memberId?: string | number;
|
|
393
|
+
agencyId?: string | number;
|
|
394
|
+
accountType?: 'PERSONAL' | 'ACCESSOR' | 'AGENCY' | 'AGENCY_MASTER' | 'AGENCY_SUB_ACCOUNT' | string;
|
|
395
|
+
isRoot?: boolean;
|
|
396
|
+
}
|
|
383
397
|
interface ZaloAdsSdkOptions {
|
|
398
|
+
/**
|
|
399
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) - chứa accountId, memberId, agencyId, accountType.
|
|
400
|
+
* Dùng để tự động gài tham số báo cáo (agencyId, createdBy) và cô lập phiên (ads_user_id, PLAY_SESSION).
|
|
401
|
+
*/
|
|
402
|
+
accountScope?: ZaloAccountScope;
|
|
384
403
|
/**
|
|
385
404
|
* Định danh Integration (`integrationId`) hoặc `accountKey` để cô lập phiên khi quản lý nhiều tài khoản trên RAM/Redis.
|
|
386
405
|
* Nếu không truyền, SDK tự động tạo `accountKey` duy nhất từ `zpsid`.
|
|
@@ -1053,6 +1072,7 @@ declare class ZaloSdkHttpClient {
|
|
|
1053
1072
|
private readonly authByHost;
|
|
1054
1073
|
private authManagerInstance?;
|
|
1055
1074
|
private readonly autoRetryOn401;
|
|
1075
|
+
accountScope?: ZaloAccountScope;
|
|
1056
1076
|
constructor(options?: ZaloAdsSdkOptions);
|
|
1057
1077
|
get authManager(): ZaloAuthManager | undefined;
|
|
1058
1078
|
setAuthManager(manager?: ZaloAuthManager): void;
|
|
@@ -5668,6 +5688,14 @@ declare class ZaloAdsSdk {
|
|
|
5668
5688
|
* Trình quản lý xác thực `ZaloAuthManager` đang gắn với SDK (nếu khởi tạo bằng `zpsid` / `ssoAuth` / `authManager`).
|
|
5669
5689
|
*/
|
|
5670
5690
|
get authManager(): ZaloAuthManager | undefined;
|
|
5691
|
+
/**
|
|
5692
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) đang gắn với instance SDK.
|
|
5693
|
+
*/
|
|
5694
|
+
get accountScope(): ZaloAccountScope | undefined;
|
|
5695
|
+
/**
|
|
5696
|
+
* Cập nhật phạm vi tài khoản quảng cáo cô lập.
|
|
5697
|
+
*/
|
|
5698
|
+
setAccountScope(scope?: ZaloAccountScope): void;
|
|
5671
5699
|
/**
|
|
5672
5700
|
* Cập nhật cookie `zpsid` gốc (hoặc chuỗi Cookie trình duyệt) để tự động xác thực cho toàn bộ các domain Zalo Ads.
|
|
5673
5701
|
*/
|
|
@@ -5697,6 +5725,10 @@ interface ZaloIntegrationCredentials {
|
|
|
5697
5725
|
* Các cookie bổ sung muốn gắn kèm.
|
|
5698
5726
|
*/
|
|
5699
5727
|
extraCookies?: Record<string, string>;
|
|
5728
|
+
/**
|
|
5729
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) - chứa accountId, memberId, agencyId, accountType.
|
|
5730
|
+
*/
|
|
5731
|
+
accountScope?: ZaloAccountScope;
|
|
5700
5732
|
}
|
|
5701
5733
|
interface ZaloAdsClientRequest extends ZaloIntegrationCredentials {
|
|
5702
5734
|
/**
|
|
@@ -5810,6 +5842,7 @@ declare class ZaloAdsIntegrationManager {
|
|
|
5810
5842
|
zpsid: string;
|
|
5811
5843
|
zoawSek?: string;
|
|
5812
5844
|
extraCookies?: Record<string, string>;
|
|
5845
|
+
accountScope?: ZaloAccountScope;
|
|
5813
5846
|
}): Promise<ZaloIntegrationVerificationResult>;
|
|
5814
5847
|
/**
|
|
5815
5848
|
* Số lượng instance SDK đang giữ trong Pool RAM.
|
|
@@ -6261,4 +6294,4 @@ declare const ZaloMediaValidator: {
|
|
|
6261
6294
|
validateSaveMedia: typeof validateSaveMediaRequest;
|
|
6262
6295
|
};
|
|
6263
6296
|
|
|
6264
|
-
export { ALLOWED_CTAS_PER_AD_TYPE, ALL_ZALO_ADS_DOMAINS, AutomatedRuleActionTypeEnum, AutomatedRuleConditionFieldEnum, AutomatedRuleFrequencyEnum, AutomatedRuleOperatorEnum, AutomatedRuleScopeEnum, AutomatedRuleTimeRangeEnum, type AutomatedRuleValidationResult, type BodyType, type CampaignValidationResult, type CleanDateRangeReport, ConversionLabelEnum, ConversionUrlTypeEnum, type ConversionValidationResult, type DateRangeReportQuery, type FileDownloadResponse, type FileInput, type HttpMethod, MAX_REPORT_RANGE_MS, MAX_REPORT_RANGE_SECONDS, type MediaValidationResult, MemoryZaloSessionStore, type MemoryZaloSessionStoreOptions, type OperationDefinition, RedisZaloSessionStore, type RedisZaloSessionStoreOptions, type RequestOptions, TieredZaloSessionStore, type TieredZaloSessionStoreOptions, VALID_AD_TYPES, VALID_CAMPAIGN_TYPES, VIETNAM_PHONE_REGEX, type ValidateAdOptions, type ValidateCampaignOptions, type ValidateImageInput, type ValidateUploadMediaOptions, type ValidateVideoInput, type ValidationResult, ZALO_NEW_REGION_PROVINCE_CODES, ZALO_PROFILE_ADS_PROVINCES, ZALO_PROFILE_ADS_SUB_CATEGORIES, ZALO_PROVINCE_MERGE_MAPPING, ZALO_REGION_PROVINCE_CODES, ZaloAccountService, type ZaloAdsAccessorItemDto, type ZaloAdsAccountAgencyInfoDto, ZaloAdsIntegrationManager as ZaloAdsAccountPool, ZaloAdsActionType, type ZaloAdsAdAppInfoSettingsDto, type ZaloAdsAdImageSettingsDto, type ZaloAdsAdInfoSettingsDto, type ZaloAdsAdLocationSettingsDto, type ZaloAdsAdMultiImageItemDto, type ZaloAdsAdMutationResultDto, type ZaloAdsAdPriceSettingsDto, type ZaloAdsAdReportItemDto, type ZaloAdsAdSettingsDto, type ZaloAdsAdTargetingLocationContainerDto, type ZaloAdsAdTargetingProvinceItemDto, type ZaloAdsAdTargetingRegionItemDto, type ZaloAdsAdTargetingSettingsDto, type ZaloAdsAdUpdatePayloadDto, type ZaloAdsAdZVideoSettingsDto, ZaloAdsAgeRangeId, type ZaloAdsAgencyEmployeeItemDto, type ZaloAdsAutomatedRuleActionDto, type ZaloAdsAutomatedRuleAppliedItemDto, type ZaloAdsAutomatedRuleConditionDto, type ZaloAdsAutomatedRuleScheduleDto, ZaloAdsBudgetScheduleType, type ZaloAdsBudgetScheduleTypeValue, type ZaloAdsCampaignCreatePayloadDto, type ZaloAdsCampaignDetailExtendDto, type ZaloAdsCampaignReportItemDto, ZaloAdsCampaignStatus, type ZaloAdsCampaignStatusValue, type ZaloAdsChangeAutomatedRuleStatusRequest, type ZaloAdsChangeAutomatedRuleStatusResponse, type ZaloAdsChangeCampaignStatusRequest, type ZaloAdsChangeCampaignStatusResponse, type ZaloAdsClientRequest, type ZaloAdsCommerceFormAudienceTargetingDto, type ZaloAdsConversionElementSelectorDto, type ZaloAdsConversionItemDto, type ZaloAdsConversionNameItemDto, type ZaloAdsCreateArticleCampaignRequest, type ZaloAdsCreateArticleCampaignResponse, type ZaloAdsCreateAutomatedRuleRequest, type ZaloAdsCreateAutomatedRuleResponse, type ZaloAdsCreateCommerceCampaignRequest, type ZaloAdsCreateCommerceCampaignResponse, type ZaloAdsCreateCommerceFormAudienceRequest, type ZaloAdsCreateCommerceFormAudienceResponse, type ZaloAdsCreateConversionRequest, type ZaloAdsCreateConversionResponse, type ZaloAdsCreateCustomAudienceRequest, type ZaloAdsCreateCustomAudienceResponse, type ZaloAdsCreateDisplayCampaignRequest, type ZaloAdsCreateDisplayCampaignResponse, type ZaloAdsCreateEcommerceCampaignRequest, type ZaloAdsCreateEcommerceCampaignResponse, ZaloAdsCreateFlowRequest, ZaloAdsCreateFlowResponse, type ZaloAdsCreateFormCampaignRequest, type ZaloAdsCreateFormCampaignResponse, type ZaloAdsCreateFormEventAudienceRequest, type ZaloAdsCreateFormEventAudienceResponse, type ZaloAdsCreateFormLeadAudienceRequest, type ZaloAdsCreateFormLeadAudienceResponse, type ZaloAdsCreateFormPayloadDto, type ZaloAdsCreateFormRequest, type ZaloAdsCreateFormResponse, type ZaloAdsCreateLeadSignalAudienceRequest, type ZaloAdsCreateLeadSignalAudienceResponse, type ZaloAdsCreateLookalikeAudienceRequest, type ZaloAdsCreateLookalikeAudienceResponse, type ZaloAdsCreateMessageCampaignRequest, type ZaloAdsCreateMessageCampaignResponse, type ZaloAdsCreateMessageOaEventAudienceRequest, type ZaloAdsCreateMessageOaEventAudienceResponse, type ZaloAdsCreateMessageOaLeadAudienceRequest, type ZaloAdsCreateMessageOaLeadAudienceResponse, type ZaloAdsCreateMessagePersonalEventAudienceRequest, type ZaloAdsCreateMessagePersonalEventAudienceResponse, type ZaloAdsCreateOaCampaignRequest, type ZaloAdsCreateOaCampaignResponse, type ZaloAdsCreateOfficialAccountCampaignRequest, type ZaloAdsCreateOfficialAccountCampaignResponse, type ZaloAdsCreatePhoneAudienceRequest, type ZaloAdsCreatePhoneAudienceResponse, ZaloAdsCreatePostCampaignRequest, ZaloAdsCreatePostCampaignResponse, type ZaloAdsCreateSavedAudienceRequest, type ZaloAdsCreateSavedAudienceResponse, type ZaloAdsCreateSpellCheckV3JobRequest, type ZaloAdsCreateSpellCheckV3JobResponse, type ZaloAdsCreateVideoCampaignRequest, type ZaloAdsCreateVideoCampaignResponse, type ZaloAdsCreateWebsiteCampaignRequest, type ZaloAdsCreateWebsiteCampaignResponse, type ZaloAdsDeleteAutomatedRuleRequest, type ZaloAdsDeleteAutomatedRuleResponse, type ZaloAdsDeleteCampaignRequest, type ZaloAdsDeleteCampaignResponse, type ZaloAdsDeleteConversionRequest, type ZaloAdsDeleteConversionResponse, type ZaloAdsDeleteCustomAudienceRequest, type ZaloAdsDeleteCustomAudienceResponse, type ZaloAdsDeleteCustomReportRequest, type ZaloAdsDeleteCustomReportResponse, ZaloAdsDeliveryType, type ZaloAdsDeliveryTypeValue, type ZaloAdsDomain, type ZaloAdsDownloadReportRequest, type ZaloAdsDownloadReportResponse, type ZaloAdsDuplicateAdRequest, type ZaloAdsDuplicateAdResponse, type ZaloAdsFileGroupItemDto, ZaloAdsFlowButtonDto, ZaloAdsFlowChildMessageDto, ZaloAdsFlowMessageDto, type ZaloAdsFormAnswerDto, type ZaloAdsFormEventAudienceTargetingDto, type ZaloAdsFormLeadAudienceTargetingDto, type ZaloAdsFormQuestionDto, type ZaloAdsFormQuestionUiDto, type ZaloAdsFormSectionContentDto, type ZaloAdsFormSectionDto, type ZaloAdsFormSectionImageItemDto, type ZaloAdsFormSectionTableItemDto, type ZaloAdsGetAdByIdRequest, type ZaloAdsGetAdByIdResponse, type ZaloAdsGetAdChangeLogRequest, type ZaloAdsGetAdChangeLogResponse, type ZaloAdsGetApiAdGetlistadadvancetargetingRequest, type ZaloAdsGetApiAdGetlistadadvancetargetingResponse, type ZaloAdsGetApiBaAccountAllaccessorsRequest, type ZaloAdsGetApiBaAccountAllaccessorsResponse, type ZaloAdsGetApiBaAccountAllgrantedmembersRequest, type ZaloAdsGetApiBaAccountAllgrantedmembersResponse, type ZaloAdsGetApiBaAgencyEmployeesRequest, type ZaloAdsGetApiBaAgencyEmployeesResponse, type ZaloAdsGetApiConversionAllRequest, type ZaloAdsGetApiConversionAllResponse, type ZaloAdsGetApiConversionStandardEventsRequest, type ZaloAdsGetApiConversionStandardEventsResponse, type ZaloAdsGetApiCustomAudienceAllRequest, type ZaloAdsGetApiCustomAudienceAllResponse, type ZaloAdsGetApiFilegroupsRequest, type ZaloAdsGetApiFilegroupsResponse, type ZaloAdsGetApiLpNewsRequest, type ZaloAdsGetApiLpNewsResponse, type ZaloAdsGetApiMediaItemsRequest, type ZaloAdsGetApiMediaItemsResponse, type ZaloAdsGetApiMemberFilesRequest, type ZaloAdsGetApiMemberFilesResponse, type ZaloAdsGetApiNotifiesHeaderRequest, type ZaloAdsGetApiNotifiesHeaderResponse, type ZaloAdsGetApiPaymentTransactionHistoryRequest, type ZaloAdsGetApiPaymentTransactionHistoryResponse, type ZaloAdsGetApiPlaceGetalldistrictsRequest, type ZaloAdsGetApiPlaceGetalldistrictsResponse, type ZaloAdsGetApiSpellCheckV2Request, type ZaloAdsGetApiSpellCheckV2Response, type ZaloAdsGetApiWhoamiRequest, type ZaloAdsGetApiWhoamiResponse, type ZaloAdsGetAutomatedRuleDetailRequest, type ZaloAdsGetAutomatedRuleDetailResponse, type ZaloAdsGetAutomatedRuleHistoryRequest, type ZaloAdsGetAutomatedRuleHistoryResponse, type ZaloAdsGetDemographicsReportRequest, type ZaloAdsGetDemographicsReportResponse, type ZaloAdsGetReportOverviewRequest, type ZaloAdsGetReportOverviewResponse, type ZaloAdsGetReportapiV2AdsRequest, type ZaloAdsGetReportapiV2AdsResponse, type ZaloAdsGetReportapiV2CampaignsRequest, type ZaloAdsGetReportapiV2CampaignsResponse, type ZaloAdsGetReportapiV2UniqueUserRequest, type ZaloAdsGetReportapiV2UniqueUserResponse, type ZaloAdsGetReportapiV3CampaignsRequest, type ZaloAdsGetReportapiV3CampaignsResponse, type ZaloAdsGetSpellCheckV3JobRequest, type ZaloAdsGetSpellCheckV3JobResponse, type ZaloAdsGetZaapiCampaignReportcampaignRequest, type ZaloAdsGetZaapiCampaignReportcampaignResponse, type ZaloAdsGetZaapiCheckcamphasmanyadsRequest, type ZaloAdsGetZaapiCheckcamphasmanyadsResponse, type ZaloAdsGetZaapiGetadsfromcampaignidRequest, type ZaloAdsGetZaapiGetadsfromcampaignidResponse, type ZaloAdsGetZaapiGetallpagesRequest, type ZaloAdsGetZaapiGetallpagesResponse, type ZaloAdsGetZaapiGetownedarticlesRequest, type ZaloAdsGetZaapiGetownedarticlesResponse, type ZaloAdsGetZaapiGetownedpagesRequest, type ZaloAdsGetZaapiGetownedpagesResponse, type ZaloAdsGrantedMemberItemDto, ZaloAdsImageRatio, type ZaloAdsImageRatioValue, ZaloAdsIntegrationManager, type ZaloAdsIntegrationManagerOptions, type ZaloAdsLeadSignalAudienceTargetingDto, type ZaloAdsLeadSignalOaItem, type ZaloAdsListAgencyCustomersWithBudgetRequest, type ZaloAdsListAgencyCustomersWithBudgetResponse, type ZaloAdsListAutomatedRulesRequest, type ZaloAdsListAutomatedRulesResponse, type ZaloAdsListConversionNamesRequest, type ZaloAdsListConversionNamesResponse, type ZaloAdsListCustomReportsRequest, type ZaloAdsListCustomReportsResponse, type ZaloAdsListFlowsByOfficialAccountRequest, type ZaloAdsListFlowsByOfficialAccountResponse, type ZaloAdsListFormsByOfficialAccountRequest, type ZaloAdsListFormsByOfficialAccountResponse, type ZaloAdsListLeadSignalOasResponse, type ZaloAdsListMiniPagesByTemplateRequest, type ZaloAdsListMiniPagesByTemplateResponse, type ZaloAdsListPersonalPixelLabelsRequest, type ZaloAdsListPersonalPixelLabelsResponse, type ZaloAdsListReportFiltersRequest, type ZaloAdsListReportFiltersResponse, type ZaloAdsLookalikeAudienceTargetingDto, type ZaloAdsLpNewsButtonDto, type ZaloAdsLpNewsItemDto, type ZaloAdsMediaSavePayloadDto, type ZaloAdsMediaSaveSettingsDto, type ZaloAdsMemberFileItemDto, ZaloAdsMessageAdUpdateDataDto, type ZaloAdsMessageOaEventAudienceTargetingDto, type ZaloAdsMessageOaLeadAudienceTargetingDto, type ZaloAdsMessagePersonalEventAudienceTargetingDto, type ZaloAdsNotifyHeaderItemDto, ZaloAdsOsId, type ZaloAdsOsIdValue, type ZaloAdsOwnedArticleItemDto, type ZaloAdsOwnedPageExtraInfoDto, type ZaloAdsOwnedPageItemDto, type ZaloAdsOwnedPageLocationDto, type ZaloAdsPageConfigDto, type ZaloAdsPaymentTransactionItemDto, type ZaloAdsPhoneAudienceTargetingDto, type ZaloAdsPostApiAdEstimateaudienceRequest, type ZaloAdsPostApiAdEstimateaudienceResponse, type ZaloAdsPostApiMediaSaveRequest, type ZaloAdsPostApiMediaSaveResponse, type ZaloAdsPostApiMemberUploadImageRequest, type ZaloAdsPostApiMemberUploadImageResponse, type ZaloAdsPostZaapiDeleteadRequest, type ZaloAdsPostZaapiDeleteadResponse, ZaloAdsPriceLimitType, type ZaloAdsPriceLimitTypeValue, ZaloAdsPriceType, type ZaloAdsPriceTypeValue, ZaloAdsProvinceCode, type ZaloAdsProvinceCodeValue, ZaloAdsRegionId, type ZaloAdsRegionIdValue, type ZaloAdsRenameCampaignRequest, type ZaloAdsRenameCampaignResponse, ZaloAdsSdk, type ZaloAdsSdkOptions, ZaloAdsService, type ZaloAdsSpellCheckIssueDto, type ZaloAdsSpellCheckViolationDto, ZaloAdsSpendingMethod, type ZaloAdsSpendingMethodValue, type ZaloAdsStandardEventItemDto, type ZaloAdsUniqueUserReportDataDto, type ZaloAdsUpdateArticleAdRequest, type ZaloAdsUpdateArticleAdResponse, type ZaloAdsUpdateAutomatedRuleRequest, type ZaloAdsUpdateAutomatedRuleResponse, type ZaloAdsUpdateCommerceAdRequest, type ZaloAdsUpdateCommerceAdResponse, type ZaloAdsUpdateDisplayAdRequest, type ZaloAdsUpdateDisplayAdResponse, type ZaloAdsUpdateEcommerceAdRequest, type ZaloAdsUpdateEcommerceAdResponse, type ZaloAdsUpdateFlowRequest, type ZaloAdsUpdateFlowResponse, type ZaloAdsUpdateFormAdRequest, type ZaloAdsUpdateFormAdResponse, ZaloAdsUpdateMessageAdRequest, ZaloAdsUpdateMessageAdResponse, type ZaloAdsUpdateNewAdsRequest, type ZaloAdsUpdateNewAdsResponse, type ZaloAdsUpdateOaAdRequest, type ZaloAdsUpdateOaAdResponse, type ZaloAdsUpdateOfficialAccountAdRequest, type ZaloAdsUpdateOfficialAccountAdResponse, type ZaloAdsUpdatePostAdRequest, type ZaloAdsUpdatePostAdResponse, ZaloAdsUpdateVideoAdRequest, ZaloAdsUpdateVideoAdResponse, type ZaloAdsUpdateWebsiteAdRequest, type ZaloAdsUpdateWebsiteAdResponse, type ZaloAdsUploadCustomAudiencePhoneListRequest, type ZaloAdsUploadCustomAudiencePhoneListResponse, type ZaloAdsUploadVideoRequest, type ZaloAdsUploadVideoResponse, type ZaloAdsUpsertCustomReportRequest, type ZaloAdsUpsertCustomReportResponse, ZaloAdsUseConversion, type ZaloAdsUseConversionValue, ZaloAdsVideoSrc, type ZaloAdsVideoSrcValue, type ZaloAdsWhoamiProfile, ZaloAdsXTemplates, type ZaloAdsXTemplatesValue, type ZaloAdsZaapiCampaignReportItemDto, ZaloAudiencesService, ZaloAudiencesValidator, type ZaloAuthDomain, ZaloAuthManager, ZaloAutomatedRulesService, ZaloAutomatedRulesValidator, ZaloCampaignsService, ZaloCampaignsValidator, type ZaloChatWidgetGetChatWidgetLoginConfigRequest, type ZaloChatWidgetGetChatWidgetLoginConfigResponse, type ZaloChatWidgetGetLoginConfigRequest, type ZaloChatWidgetGetLoginConfigResponse, ZaloChatWidgetService, ZaloConversionsService, ZaloConversionsValidator, type ZaloCreateFormCleanPayload, type ZaloCreateFormRequestInput, type ZaloDomainSession, ZaloFlowsService, ZaloFlowsValidator, type ZaloFormQuestionAnswerInput, type ZaloFormQuestionInput, type ZaloFormSectionInput, type ZaloFormSessionProfile, type ZaloFormsAudienceExclusionTargetingItem, type ZaloFormsAuthSessionOaItem, type ZaloFormsConversationLeadItem, type ZaloFormsDisableFormLeadNotificationRequest, type ZaloFormsDisableFormLeadNotificationResponse, type ZaloFormsEnableFormLeadNotificationRequest, type ZaloFormsEnableFormLeadNotificationResponse, type ZaloFormsExportFormLeadReportRequest, type ZaloFormsExportFormLeadReportResponse, type ZaloFormsGetAuthSessionResponse, type ZaloFormsLeadAnswerItem, type ZaloFormsLeadItem, type ZaloFormsListAudienceExclusionTargetingRequest, type ZaloFormsListAudienceExclusionTargetingResponse, type ZaloFormsListConversationLeadsRequest, type ZaloFormsListConversationLeadsResponse, type ZaloFormsListFormLeadsRequest, type ZaloFormsListFormLeadsResponse, type ZaloFormsListManagedFormsByOfficialAccountRequest, type ZaloFormsListManagedFormsByOfficialAccountResponse, type ZaloFormsListScenariosByOfficialAccountRequest, type ZaloFormsListScenariosByOfficialAccountResponse, type ZaloFormsListSimpleFormsByOfficialAccountRequest, type ZaloFormsListSimpleFormsByOfficialAccountResponse, type ZaloFormsScenarioItem, ZaloFormsService, type ZaloFormsTrackManageFormEventRequest, type ZaloFormsTrackManageFormEventResponse, type ZaloFormsUpdateFormLeadNotificationIntervalRequest, type ZaloFormsUpdateFormLeadNotificationIntervalResponse, ZaloFormsValidator, type ZaloInstantPageActive, ZaloInstantPageBlockType, ZaloInstantPageSharePermission, type ZaloInstantPageSharePermissionValue, type ZaloInstantPageStatus, type ZaloInstantPagesCloneInstantPageRequest, type ZaloInstantPagesCloneInstantPageResponse, type ZaloInstantPagesCreateInstantPageRequest, type ZaloInstantPagesCreateInstantPageResponse, type ZaloInstantPagesFormRecordItem, type ZaloInstantPagesGetInstantPageDetailRequest, type ZaloInstantPagesGetInstantPageDetailResponse, type ZaloInstantPagesGetInstantPageSharedUserRequest, type ZaloInstantPagesGetInstantPageSharedUserResponse, type ZaloInstantPagesListInstantPageEditHistoryRequest, type ZaloInstantPagesListInstantPageEditHistoryResponse, type ZaloInstantPagesListInstantPageFormRecordsRequest, type ZaloInstantPagesListInstantPageFormRecordsResponse, type ZaloInstantPagesListInstantPageLeadsRequest, type ZaloInstantPagesListInstantPageLeadsResponse, type ZaloInstantPagesListInstantPageSharesRequest, type ZaloInstantPagesListInstantPageSharesResponse, type ZaloInstantPagesListInstantPageUsersRequest, type ZaloInstantPagesListInstantPageUsersResponse, type ZaloInstantPagesListMiniPageTemplatesRequest, type ZaloInstantPagesListMiniPageTemplatesResponse, type ZaloInstantPagesListOfficialAccountsRequest, type ZaloInstantPagesListOfficialAccountsResponse, type ZaloInstantPagesOfficialAccountItem, type ZaloInstantPagesSearchInstantPagesRequest, type ZaloInstantPagesSearchInstantPagesResponse, ZaloInstantPagesService, type ZaloInstantPagesShareMemberDto, type ZaloInstantPagesUpdateInstantPageRequest, type ZaloInstantPagesUpdateInstantPageResponse, type ZaloInstantPagesUpdateInstantPageSharesRequest, type ZaloInstantPagesUpdateInstantPageSharesResponse, type ZaloInstantPagesUpsertInstantPageFormRequest, type ZaloInstantPagesUpsertInstantPageFormResponse, ZaloInstantPagesValidator, type ZaloIntegrationCredentials, type ZaloIntegrationVerificationResult, ZaloMediaService, ZaloMediaValidator, type ZaloPlaySessionPayload, type ZaloProfileAdsAdministrativeItem, type ZaloProfileAdsCreateOaPageRequest, type ZaloProfileAdsCreateOaPageResponse, type ZaloProfileAdsGetDistrictsRequest, type ZaloProfileAdsGetDistrictsResponse, type ZaloProfileAdsGetProvincesResponse, type ZaloProfileAdsProvinceId, ZaloProfileAdsService, type ZaloProfileAdsSubCategoryId, type ZaloProfileAdsUploadOaAvatarRequest, type ZaloProfileAdsUploadOaAvatarResponse, type ZaloProfileAdsUploadOaCoverRequest, type ZaloProfileAdsUploadOaCoverResponse, ZaloProfileAdsValidator, type ZaloRedisLikeClient, ZaloReportsService, ZaloReportsValidator, type ZaloSdkAuth, type ZaloSdkAuthContext, ZaloSdkError, ZaloSdkHttpClient, type ZaloSessionStore, type ZaloSsoAuthOptions, type ZaloUploadAndSaveImageRequest, type ZaloUploadAndSaveImageResult, type ZaloUploadAndSaveVideoRequest, type ZaloUploadAndSaveVideoResult, type ZaloWidgetAPIGetOfficialAccountInfoRequest, type ZaloWidgetAPIGetOfficialAccountInfoResponse, type ZaloWidgetAPIGetWidgetUserProfileRequest, type ZaloWidgetAPIGetWidgetUserProfileResponse, type ZaloWidgetAPIListStickerCategoriesRequest, type ZaloWidgetAPIListStickerCategoriesResponse, type ZaloWidgetAPIListStickersByCategoryRequest, type ZaloWidgetAPIListStickersByCategoryResponse, ZaloWidgetApiService, computeZpsidFingerprint, createZaloSsoAuth, decodePlaySessionJwt, ZaloAdsSdk as default, defaultSharedMemorySessionStore, deriveAccountKeyFromZpsid, parseZaloCookieInput, validateChangeCampaignStatusParams, validateCloneInstantPageRequest, validateCreateCampaignPayload, validateCreateCustomAudienceRequest, validateCreateFlowRequest, validateCreateFormEventAudienceRequest, validateCreateFormRequest, validateCreateInstantPageRequest, validateCreateLookalikeAudienceRequest, validateCreateMessageOaEventAudienceRequest, validateCreateMessagePersonalEventAudienceRequest, validateCreateOaPageRequest, validateCreatePhoneAudienceRequest, validateCreateSavedAudienceRequest, validateCropCoordinates, validateDateRangeReportRequest, validateDuplicateAdParams, validateEstimateAudienceRequest, validateGetInstantPageDetailRequest, validateGetInstantPageSharedUserRequest, validateListFlowsByOfficialAccountRequest, validateListFormLeadsRequest, validateListFormsByOfficialAccountRequest, validateListInstantPageEditHistoryRequest, validateListInstantPageFormRecordsRequest, validateListInstantPageLeadsRequest, validateListInstantPageSharesRequest, validateListInstantPageUsersRequest, validateListMiniPageTemplatesRequest, validateListOfficialAccountsRequest, validateRenameCampaignParams, validateSaveMediaRequest, validateSearchInstantPagesRequest, validateToggleLeadNotificationRequest, validateUpdateAdPayload, validateUpdateFlowRequest, validateUpdateInstantPageRequest, validateUpdateInstantPageSharesRequest, validateUpdateLeadNotificationIntervalRequest, validateUploadCustomAudiencePhoneListRequest, validateUploadMediaRequest, validateUpsertCustomReportRequest, validateUpsertInstantPageFormRequest };
|
|
6297
|
+
export { ALLOWED_CTAS_PER_AD_TYPE, ALL_ZALO_ADS_DOMAINS, AutomatedRuleActionTypeEnum, AutomatedRuleConditionFieldEnum, AutomatedRuleFrequencyEnum, AutomatedRuleOperatorEnum, AutomatedRuleScopeEnum, AutomatedRuleTimeRangeEnum, type AutomatedRuleValidationResult, type BodyType, type CampaignValidationResult, type CleanDateRangeReport, ConversionLabelEnum, ConversionUrlTypeEnum, type ConversionValidationResult, type DateRangeReportQuery, type FileDownloadResponse, type FileInput, type HttpMethod, MAX_REPORT_RANGE_MS, MAX_REPORT_RANGE_SECONDS, type MediaValidationResult, MemoryZaloSessionStore, type MemoryZaloSessionStoreOptions, type OperationDefinition, RedisZaloSessionStore, type RedisZaloSessionStoreOptions, type RequestOptions, TieredZaloSessionStore, type TieredZaloSessionStoreOptions, VALID_AD_TYPES, VALID_CAMPAIGN_TYPES, VIETNAM_PHONE_REGEX, type ValidateAdOptions, type ValidateCampaignOptions, type ValidateImageInput, type ValidateUploadMediaOptions, type ValidateVideoInput, type ValidationResult, ZALO_NEW_REGION_PROVINCE_CODES, ZALO_PROFILE_ADS_PROVINCES, ZALO_PROFILE_ADS_SUB_CATEGORIES, ZALO_PROVINCE_MERGE_MAPPING, ZALO_REGION_PROVINCE_CODES, type ZaloAccountScope, ZaloAccountService, type ZaloAdsAccessorItemDto, type ZaloAdsAccountAgencyInfoDto, ZaloAdsIntegrationManager as ZaloAdsAccountPool, ZaloAdsActionType, type ZaloAdsAdAppInfoSettingsDto, type ZaloAdsAdImageSettingsDto, type ZaloAdsAdInfoSettingsDto, type ZaloAdsAdLocationSettingsDto, type ZaloAdsAdMultiImageItemDto, type ZaloAdsAdMutationResultDto, type ZaloAdsAdPriceSettingsDto, type ZaloAdsAdReportItemDto, type ZaloAdsAdSettingsDto, type ZaloAdsAdTargetingLocationContainerDto, type ZaloAdsAdTargetingProvinceItemDto, type ZaloAdsAdTargetingRegionItemDto, type ZaloAdsAdTargetingSettingsDto, type ZaloAdsAdUpdatePayloadDto, type ZaloAdsAdZVideoSettingsDto, ZaloAdsAgeRangeId, type ZaloAdsAgencyEmployeeItemDto, type ZaloAdsAutomatedRuleActionDto, type ZaloAdsAutomatedRuleAppliedItemDto, type ZaloAdsAutomatedRuleConditionDto, type ZaloAdsAutomatedRuleScheduleDto, ZaloAdsBudgetScheduleType, type ZaloAdsBudgetScheduleTypeValue, type ZaloAdsCampaignCreatePayloadDto, type ZaloAdsCampaignDetailExtendDto, type ZaloAdsCampaignReportItemDto, ZaloAdsCampaignStatus, type ZaloAdsCampaignStatusValue, type ZaloAdsChangeAutomatedRuleStatusRequest, type ZaloAdsChangeAutomatedRuleStatusResponse, type ZaloAdsChangeCampaignStatusRequest, type ZaloAdsChangeCampaignStatusResponse, type ZaloAdsClientRequest, type ZaloAdsCommerceFormAudienceTargetingDto, type ZaloAdsConversionElementSelectorDto, type ZaloAdsConversionItemDto, type ZaloAdsConversionNameItemDto, type ZaloAdsCreateArticleCampaignRequest, type ZaloAdsCreateArticleCampaignResponse, type ZaloAdsCreateAutomatedRuleRequest, type ZaloAdsCreateAutomatedRuleResponse, type ZaloAdsCreateCommerceCampaignRequest, type ZaloAdsCreateCommerceCampaignResponse, type ZaloAdsCreateCommerceFormAudienceRequest, type ZaloAdsCreateCommerceFormAudienceResponse, type ZaloAdsCreateConversionRequest, type ZaloAdsCreateConversionResponse, type ZaloAdsCreateCustomAudienceRequest, type ZaloAdsCreateCustomAudienceResponse, type ZaloAdsCreateDisplayCampaignRequest, type ZaloAdsCreateDisplayCampaignResponse, type ZaloAdsCreateEcommerceCampaignRequest, type ZaloAdsCreateEcommerceCampaignResponse, ZaloAdsCreateFlowRequest, ZaloAdsCreateFlowResponse, type ZaloAdsCreateFormCampaignRequest, type ZaloAdsCreateFormCampaignResponse, type ZaloAdsCreateFormEventAudienceRequest, type ZaloAdsCreateFormEventAudienceResponse, type ZaloAdsCreateFormLeadAudienceRequest, type ZaloAdsCreateFormLeadAudienceResponse, type ZaloAdsCreateFormPayloadDto, type ZaloAdsCreateFormRequest, type ZaloAdsCreateFormResponse, type ZaloAdsCreateLeadSignalAudienceRequest, type ZaloAdsCreateLeadSignalAudienceResponse, type ZaloAdsCreateLookalikeAudienceRequest, type ZaloAdsCreateLookalikeAudienceResponse, type ZaloAdsCreateMessageCampaignRequest, type ZaloAdsCreateMessageCampaignResponse, type ZaloAdsCreateMessageOaEventAudienceRequest, type ZaloAdsCreateMessageOaEventAudienceResponse, type ZaloAdsCreateMessageOaLeadAudienceRequest, type ZaloAdsCreateMessageOaLeadAudienceResponse, type ZaloAdsCreateMessagePersonalEventAudienceRequest, type ZaloAdsCreateMessagePersonalEventAudienceResponse, type ZaloAdsCreateOaCampaignRequest, type ZaloAdsCreateOaCampaignResponse, type ZaloAdsCreateOfficialAccountCampaignRequest, type ZaloAdsCreateOfficialAccountCampaignResponse, type ZaloAdsCreatePhoneAudienceRequest, type ZaloAdsCreatePhoneAudienceResponse, ZaloAdsCreatePostCampaignRequest, ZaloAdsCreatePostCampaignResponse, type ZaloAdsCreateSavedAudienceRequest, type ZaloAdsCreateSavedAudienceResponse, type ZaloAdsCreateSpellCheckV3JobRequest, type ZaloAdsCreateSpellCheckV3JobResponse, type ZaloAdsCreateVideoCampaignRequest, type ZaloAdsCreateVideoCampaignResponse, type ZaloAdsCreateWebsiteCampaignRequest, type ZaloAdsCreateWebsiteCampaignResponse, type ZaloAdsDeleteAutomatedRuleRequest, type ZaloAdsDeleteAutomatedRuleResponse, type ZaloAdsDeleteCampaignRequest, type ZaloAdsDeleteCampaignResponse, type ZaloAdsDeleteConversionRequest, type ZaloAdsDeleteConversionResponse, type ZaloAdsDeleteCustomAudienceRequest, type ZaloAdsDeleteCustomAudienceResponse, type ZaloAdsDeleteCustomReportRequest, type ZaloAdsDeleteCustomReportResponse, ZaloAdsDeliveryType, type ZaloAdsDeliveryTypeValue, type ZaloAdsDomain, type ZaloAdsDownloadReportRequest, type ZaloAdsDownloadReportResponse, type ZaloAdsDuplicateAdRequest, type ZaloAdsDuplicateAdResponse, type ZaloAdsFileGroupItemDto, ZaloAdsFlowButtonDto, ZaloAdsFlowChildMessageDto, ZaloAdsFlowMessageDto, type ZaloAdsFormAnswerDto, type ZaloAdsFormEventAudienceTargetingDto, type ZaloAdsFormLeadAudienceTargetingDto, type ZaloAdsFormQuestionDto, type ZaloAdsFormQuestionUiDto, type ZaloAdsFormSectionContentDto, type ZaloAdsFormSectionDto, type ZaloAdsFormSectionImageItemDto, type ZaloAdsFormSectionTableItemDto, type ZaloAdsGetAdByIdRequest, type ZaloAdsGetAdByIdResponse, type ZaloAdsGetAdChangeLogRequest, type ZaloAdsGetAdChangeLogResponse, type ZaloAdsGetApiAdGetlistadadvancetargetingRequest, type ZaloAdsGetApiAdGetlistadadvancetargetingResponse, type ZaloAdsGetApiBaAccountAllaccessorsRequest, type ZaloAdsGetApiBaAccountAllaccessorsResponse, type ZaloAdsGetApiBaAccountAllgrantedmembersRequest, type ZaloAdsGetApiBaAccountAllgrantedmembersResponse, type ZaloAdsGetApiBaAgencyEmployeesRequest, type ZaloAdsGetApiBaAgencyEmployeesResponse, type ZaloAdsGetApiConversionAllRequest, type ZaloAdsGetApiConversionAllResponse, type ZaloAdsGetApiConversionStandardEventsRequest, type ZaloAdsGetApiConversionStandardEventsResponse, type ZaloAdsGetApiCustomAudienceAllRequest, type ZaloAdsGetApiCustomAudienceAllResponse, type ZaloAdsGetApiFilegroupsRequest, type ZaloAdsGetApiFilegroupsResponse, type ZaloAdsGetApiLpNewsRequest, type ZaloAdsGetApiLpNewsResponse, type ZaloAdsGetApiMediaItemsRequest, type ZaloAdsGetApiMediaItemsResponse, type ZaloAdsGetApiMemberFilesRequest, type ZaloAdsGetApiMemberFilesResponse, type ZaloAdsGetApiNotifiesHeaderRequest, type ZaloAdsGetApiNotifiesHeaderResponse, type ZaloAdsGetApiPaymentTransactionHistoryRequest, type ZaloAdsGetApiPaymentTransactionHistoryResponse, type ZaloAdsGetApiPlaceGetalldistrictsRequest, type ZaloAdsGetApiPlaceGetalldistrictsResponse, type ZaloAdsGetApiSpellCheckV2Request, type ZaloAdsGetApiSpellCheckV2Response, type ZaloAdsGetApiWhoamiRequest, type ZaloAdsGetApiWhoamiResponse, type ZaloAdsGetAutomatedRuleDetailRequest, type ZaloAdsGetAutomatedRuleDetailResponse, type ZaloAdsGetAutomatedRuleHistoryRequest, type ZaloAdsGetAutomatedRuleHistoryResponse, type ZaloAdsGetDemographicsReportRequest, type ZaloAdsGetDemographicsReportResponse, type ZaloAdsGetReportOverviewRequest, type ZaloAdsGetReportOverviewResponse, type ZaloAdsGetReportapiV2AdsRequest, type ZaloAdsGetReportapiV2AdsResponse, type ZaloAdsGetReportapiV2CampaignsRequest, type ZaloAdsGetReportapiV2CampaignsResponse, type ZaloAdsGetReportapiV2UniqueUserRequest, type ZaloAdsGetReportapiV2UniqueUserResponse, type ZaloAdsGetReportapiV3CampaignsRequest, type ZaloAdsGetReportapiV3CampaignsResponse, type ZaloAdsGetSpellCheckV3JobRequest, type ZaloAdsGetSpellCheckV3JobResponse, type ZaloAdsGetZaapiCampaignReportcampaignRequest, type ZaloAdsGetZaapiCampaignReportcampaignResponse, type ZaloAdsGetZaapiCheckcamphasmanyadsRequest, type ZaloAdsGetZaapiCheckcamphasmanyadsResponse, type ZaloAdsGetZaapiGetadsfromcampaignidRequest, type ZaloAdsGetZaapiGetadsfromcampaignidResponse, type ZaloAdsGetZaapiGetallpagesRequest, type ZaloAdsGetZaapiGetallpagesResponse, type ZaloAdsGetZaapiGetownedarticlesRequest, type ZaloAdsGetZaapiGetownedarticlesResponse, type ZaloAdsGetZaapiGetownedpagesRequest, type ZaloAdsGetZaapiGetownedpagesResponse, type ZaloAdsGrantedMemberItemDto, ZaloAdsImageRatio, type ZaloAdsImageRatioValue, ZaloAdsIntegrationManager, type ZaloAdsIntegrationManagerOptions, type ZaloAdsLeadSignalAudienceTargetingDto, type ZaloAdsLeadSignalOaItem, type ZaloAdsListAgencyCustomersWithBudgetRequest, type ZaloAdsListAgencyCustomersWithBudgetResponse, type ZaloAdsListAutomatedRulesRequest, type ZaloAdsListAutomatedRulesResponse, type ZaloAdsListConversionNamesRequest, type ZaloAdsListConversionNamesResponse, type ZaloAdsListCustomReportsRequest, type ZaloAdsListCustomReportsResponse, type ZaloAdsListFlowsByOfficialAccountRequest, type ZaloAdsListFlowsByOfficialAccountResponse, type ZaloAdsListFormsByOfficialAccountRequest, type ZaloAdsListFormsByOfficialAccountResponse, type ZaloAdsListLeadSignalOasResponse, type ZaloAdsListMiniPagesByTemplateRequest, type ZaloAdsListMiniPagesByTemplateResponse, type ZaloAdsListPersonalPixelLabelsRequest, type ZaloAdsListPersonalPixelLabelsResponse, type ZaloAdsListReportFiltersRequest, type ZaloAdsListReportFiltersResponse, type ZaloAdsLookalikeAudienceTargetingDto, type ZaloAdsLpNewsButtonDto, type ZaloAdsLpNewsItemDto, type ZaloAdsMediaSavePayloadDto, type ZaloAdsMediaSaveSettingsDto, type ZaloAdsMemberFileItemDto, ZaloAdsMessageAdUpdateDataDto, type ZaloAdsMessageOaEventAudienceTargetingDto, type ZaloAdsMessageOaLeadAudienceTargetingDto, type ZaloAdsMessagePersonalEventAudienceTargetingDto, type ZaloAdsNotifyHeaderItemDto, ZaloAdsOsId, type ZaloAdsOsIdValue, type ZaloAdsOwnedArticleItemDto, type ZaloAdsOwnedPageExtraInfoDto, type ZaloAdsOwnedPageItemDto, type ZaloAdsOwnedPageLocationDto, type ZaloAdsPageConfigDto, type ZaloAdsPaymentTransactionItemDto, type ZaloAdsPhoneAudienceTargetingDto, type ZaloAdsPostApiAdEstimateaudienceRequest, type ZaloAdsPostApiAdEstimateaudienceResponse, type ZaloAdsPostApiMediaSaveRequest, type ZaloAdsPostApiMediaSaveResponse, type ZaloAdsPostApiMemberUploadImageRequest, type ZaloAdsPostApiMemberUploadImageResponse, type ZaloAdsPostZaapiDeleteadRequest, type ZaloAdsPostZaapiDeleteadResponse, ZaloAdsPriceLimitType, type ZaloAdsPriceLimitTypeValue, ZaloAdsPriceType, type ZaloAdsPriceTypeValue, ZaloAdsProvinceCode, type ZaloAdsProvinceCodeValue, ZaloAdsRegionId, type ZaloAdsRegionIdValue, type ZaloAdsRenameCampaignRequest, type ZaloAdsRenameCampaignResponse, ZaloAdsSdk, type ZaloAdsSdkOptions, ZaloAdsService, type ZaloAdsSpellCheckIssueDto, type ZaloAdsSpellCheckViolationDto, ZaloAdsSpendingMethod, type ZaloAdsSpendingMethodValue, type ZaloAdsStandardEventItemDto, type ZaloAdsUniqueUserReportDataDto, type ZaloAdsUpdateArticleAdRequest, type ZaloAdsUpdateArticleAdResponse, type ZaloAdsUpdateAutomatedRuleRequest, type ZaloAdsUpdateAutomatedRuleResponse, type ZaloAdsUpdateCommerceAdRequest, type ZaloAdsUpdateCommerceAdResponse, type ZaloAdsUpdateDisplayAdRequest, type ZaloAdsUpdateDisplayAdResponse, type ZaloAdsUpdateEcommerceAdRequest, type ZaloAdsUpdateEcommerceAdResponse, type ZaloAdsUpdateFlowRequest, type ZaloAdsUpdateFlowResponse, type ZaloAdsUpdateFormAdRequest, type ZaloAdsUpdateFormAdResponse, ZaloAdsUpdateMessageAdRequest, ZaloAdsUpdateMessageAdResponse, type ZaloAdsUpdateNewAdsRequest, type ZaloAdsUpdateNewAdsResponse, type ZaloAdsUpdateOaAdRequest, type ZaloAdsUpdateOaAdResponse, type ZaloAdsUpdateOfficialAccountAdRequest, type ZaloAdsUpdateOfficialAccountAdResponse, type ZaloAdsUpdatePostAdRequest, type ZaloAdsUpdatePostAdResponse, ZaloAdsUpdateVideoAdRequest, ZaloAdsUpdateVideoAdResponse, type ZaloAdsUpdateWebsiteAdRequest, type ZaloAdsUpdateWebsiteAdResponse, type ZaloAdsUploadCustomAudiencePhoneListRequest, type ZaloAdsUploadCustomAudiencePhoneListResponse, type ZaloAdsUploadVideoRequest, type ZaloAdsUploadVideoResponse, type ZaloAdsUpsertCustomReportRequest, type ZaloAdsUpsertCustomReportResponse, ZaloAdsUseConversion, type ZaloAdsUseConversionValue, ZaloAdsVideoSrc, type ZaloAdsVideoSrcValue, type ZaloAdsWhoamiProfile, ZaloAdsXTemplates, type ZaloAdsXTemplatesValue, type ZaloAdsZaapiCampaignReportItemDto, ZaloAudiencesService, ZaloAudiencesValidator, type ZaloAuthDomain, ZaloAuthManager, ZaloAutomatedRulesService, ZaloAutomatedRulesValidator, ZaloCampaignsService, ZaloCampaignsValidator, type ZaloChatWidgetGetChatWidgetLoginConfigRequest, type ZaloChatWidgetGetChatWidgetLoginConfigResponse, type ZaloChatWidgetGetLoginConfigRequest, type ZaloChatWidgetGetLoginConfigResponse, ZaloChatWidgetService, ZaloConversionsService, ZaloConversionsValidator, type ZaloCreateFormCleanPayload, type ZaloCreateFormRequestInput, type ZaloDomainSession, ZaloFlowsService, ZaloFlowsValidator, type ZaloFormQuestionAnswerInput, type ZaloFormQuestionInput, type ZaloFormSectionInput, type ZaloFormSessionProfile, type ZaloFormsAudienceExclusionTargetingItem, type ZaloFormsAuthSessionOaItem, type ZaloFormsConversationLeadItem, type ZaloFormsDisableFormLeadNotificationRequest, type ZaloFormsDisableFormLeadNotificationResponse, type ZaloFormsEnableFormLeadNotificationRequest, type ZaloFormsEnableFormLeadNotificationResponse, type ZaloFormsExportFormLeadReportRequest, type ZaloFormsExportFormLeadReportResponse, type ZaloFormsGetAuthSessionResponse, type ZaloFormsLeadAnswerItem, type ZaloFormsLeadItem, type ZaloFormsListAudienceExclusionTargetingRequest, type ZaloFormsListAudienceExclusionTargetingResponse, type ZaloFormsListConversationLeadsRequest, type ZaloFormsListConversationLeadsResponse, type ZaloFormsListFormLeadsRequest, type ZaloFormsListFormLeadsResponse, type ZaloFormsListManagedFormsByOfficialAccountRequest, type ZaloFormsListManagedFormsByOfficialAccountResponse, type ZaloFormsListScenariosByOfficialAccountRequest, type ZaloFormsListScenariosByOfficialAccountResponse, type ZaloFormsListSimpleFormsByOfficialAccountRequest, type ZaloFormsListSimpleFormsByOfficialAccountResponse, type ZaloFormsScenarioItem, ZaloFormsService, type ZaloFormsTrackManageFormEventRequest, type ZaloFormsTrackManageFormEventResponse, type ZaloFormsUpdateFormLeadNotificationIntervalRequest, type ZaloFormsUpdateFormLeadNotificationIntervalResponse, ZaloFormsValidator, type ZaloInstantPageActive, ZaloInstantPageBlockType, ZaloInstantPageSharePermission, type ZaloInstantPageSharePermissionValue, type ZaloInstantPageStatus, type ZaloInstantPagesCloneInstantPageRequest, type ZaloInstantPagesCloneInstantPageResponse, type ZaloInstantPagesCreateInstantPageRequest, type ZaloInstantPagesCreateInstantPageResponse, type ZaloInstantPagesFormRecordItem, type ZaloInstantPagesGetInstantPageDetailRequest, type ZaloInstantPagesGetInstantPageDetailResponse, type ZaloInstantPagesGetInstantPageSharedUserRequest, type ZaloInstantPagesGetInstantPageSharedUserResponse, type ZaloInstantPagesListInstantPageEditHistoryRequest, type ZaloInstantPagesListInstantPageEditHistoryResponse, type ZaloInstantPagesListInstantPageFormRecordsRequest, type ZaloInstantPagesListInstantPageFormRecordsResponse, type ZaloInstantPagesListInstantPageLeadsRequest, type ZaloInstantPagesListInstantPageLeadsResponse, type ZaloInstantPagesListInstantPageSharesRequest, type ZaloInstantPagesListInstantPageSharesResponse, type ZaloInstantPagesListInstantPageUsersRequest, type ZaloInstantPagesListInstantPageUsersResponse, type ZaloInstantPagesListMiniPageTemplatesRequest, type ZaloInstantPagesListMiniPageTemplatesResponse, type ZaloInstantPagesListOfficialAccountsRequest, type ZaloInstantPagesListOfficialAccountsResponse, type ZaloInstantPagesOfficialAccountItem, type ZaloInstantPagesSearchInstantPagesRequest, type ZaloInstantPagesSearchInstantPagesResponse, ZaloInstantPagesService, type ZaloInstantPagesShareMemberDto, type ZaloInstantPagesUpdateInstantPageRequest, type ZaloInstantPagesUpdateInstantPageResponse, type ZaloInstantPagesUpdateInstantPageSharesRequest, type ZaloInstantPagesUpdateInstantPageSharesResponse, type ZaloInstantPagesUpsertInstantPageFormRequest, type ZaloInstantPagesUpsertInstantPageFormResponse, ZaloInstantPagesValidator, type ZaloIntegrationCredentials, type ZaloIntegrationVerificationResult, ZaloMediaService, ZaloMediaValidator, type ZaloPlaySessionPayload, type ZaloProfileAdsAdministrativeItem, type ZaloProfileAdsCreateOaPageRequest, type ZaloProfileAdsCreateOaPageResponse, type ZaloProfileAdsGetDistrictsRequest, type ZaloProfileAdsGetDistrictsResponse, type ZaloProfileAdsGetProvincesResponse, type ZaloProfileAdsProvinceId, ZaloProfileAdsService, type ZaloProfileAdsSubCategoryId, type ZaloProfileAdsUploadOaAvatarRequest, type ZaloProfileAdsUploadOaAvatarResponse, type ZaloProfileAdsUploadOaCoverRequest, type ZaloProfileAdsUploadOaCoverResponse, ZaloProfileAdsValidator, type ZaloRedisLikeClient, ZaloReportsService, ZaloReportsValidator, type ZaloSdkAuth, type ZaloSdkAuthContext, ZaloSdkError, ZaloSdkHttpClient, type ZaloSessionStore, type ZaloSsoAuthOptions, type ZaloUploadAndSaveImageRequest, type ZaloUploadAndSaveImageResult, type ZaloUploadAndSaveVideoRequest, type ZaloUploadAndSaveVideoResult, type ZaloWidgetAPIGetOfficialAccountInfoRequest, type ZaloWidgetAPIGetOfficialAccountInfoResponse, type ZaloWidgetAPIGetWidgetUserProfileRequest, type ZaloWidgetAPIGetWidgetUserProfileResponse, type ZaloWidgetAPIListStickerCategoriesRequest, type ZaloWidgetAPIListStickerCategoriesResponse, type ZaloWidgetAPIListStickersByCategoryRequest, type ZaloWidgetAPIListStickersByCategoryResponse, ZaloWidgetApiService, computeZpsidFingerprint, createZaloSsoAuth, decodePlaySessionJwt, ZaloAdsSdk as default, defaultSharedMemorySessionStore, deriveAccountKeyFromZpsid, parseZaloCookieInput, validateChangeCampaignStatusParams, validateCloneInstantPageRequest, validateCreateCampaignPayload, validateCreateCustomAudienceRequest, validateCreateFlowRequest, validateCreateFormEventAudienceRequest, validateCreateFormRequest, validateCreateInstantPageRequest, validateCreateLookalikeAudienceRequest, validateCreateMessageOaEventAudienceRequest, validateCreateMessagePersonalEventAudienceRequest, validateCreateOaPageRequest, validateCreatePhoneAudienceRequest, validateCreateSavedAudienceRequest, validateCropCoordinates, validateDateRangeReportRequest, validateDuplicateAdParams, validateEstimateAudienceRequest, validateGetInstantPageDetailRequest, validateGetInstantPageSharedUserRequest, validateListFlowsByOfficialAccountRequest, validateListFormLeadsRequest, validateListFormsByOfficialAccountRequest, validateListInstantPageEditHistoryRequest, validateListInstantPageFormRecordsRequest, validateListInstantPageLeadsRequest, validateListInstantPageSharesRequest, validateListInstantPageUsersRequest, validateListMiniPageTemplatesRequest, validateListOfficialAccountsRequest, validateRenameCampaignParams, validateSaveMediaRequest, validateSearchInstantPagesRequest, validateToggleLeadNotificationRequest, validateUpdateAdPayload, validateUpdateFlowRequest, validateUpdateInstantPageRequest, validateUpdateInstantPageSharesRequest, validateUpdateLeadNotificationIntervalRequest, validateUploadCustomAudiencePhoneListRequest, validateUploadMediaRequest, validateUpsertCustomReportRequest, validateUpsertInstantPageFormRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -196,6 +196,10 @@ interface ZaloSsoAuthOptions {
|
|
|
196
196
|
* Nếu không truyền, SDK tự động trích xuất từ `zpsid` (ví dụ: `zalo_330114198_...`).
|
|
197
197
|
*/
|
|
198
198
|
accountKey?: string;
|
|
199
|
+
/**
|
|
200
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) - chứa accountId, memberId, agencyId, accountType.
|
|
201
|
+
*/
|
|
202
|
+
accountScope?: ZaloAccountScope;
|
|
199
203
|
/**
|
|
200
204
|
* Alias của `accountKey` dành cho hệ thống Multi-Integration trên Backend.
|
|
201
205
|
*/
|
|
@@ -275,6 +279,7 @@ declare function parseZaloCookieInput(rawInput: string): {
|
|
|
275
279
|
*/
|
|
276
280
|
declare class ZaloAuthManager {
|
|
277
281
|
private explicitAccountKey?;
|
|
282
|
+
private accountScope?;
|
|
278
283
|
private zpsid?;
|
|
279
284
|
private readonly getZpsidFn?;
|
|
280
285
|
private extraCookies;
|
|
@@ -294,6 +299,8 @@ declare class ZaloAuthManager {
|
|
|
294
299
|
* Trả về `sessionStore` đang sử dụng (RAM / Redis / Tiered).
|
|
295
300
|
*/
|
|
296
301
|
getSessionStore(): ZaloSessionStore;
|
|
302
|
+
getAccountScope(): ZaloAccountScope | undefined;
|
|
303
|
+
setAccountScope(scope?: ZaloAccountScope): void;
|
|
297
304
|
/**
|
|
298
305
|
* Cập nhật `zpsid` mới và xóa toàn bộ cache phiên cũ trên cả RAM lẫn Redis.
|
|
299
306
|
*/
|
|
@@ -380,7 +387,19 @@ interface ZaloSdkAuth {
|
|
|
380
387
|
getHeaders?: (context: ZaloSdkAuthContext) => Promise<Record<string, string> | undefined> | Record<string, string> | undefined;
|
|
381
388
|
getCookies?: (context: ZaloSdkAuthContext) => Promise<Record<string, string> | undefined> | Record<string, string> | undefined;
|
|
382
389
|
}
|
|
390
|
+
interface ZaloAccountScope {
|
|
391
|
+
accountId?: string | number;
|
|
392
|
+
memberId?: string | number;
|
|
393
|
+
agencyId?: string | number;
|
|
394
|
+
accountType?: 'PERSONAL' | 'ACCESSOR' | 'AGENCY' | 'AGENCY_MASTER' | 'AGENCY_SUB_ACCOUNT' | string;
|
|
395
|
+
isRoot?: boolean;
|
|
396
|
+
}
|
|
383
397
|
interface ZaloAdsSdkOptions {
|
|
398
|
+
/**
|
|
399
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) - chứa accountId, memberId, agencyId, accountType.
|
|
400
|
+
* Dùng để tự động gài tham số báo cáo (agencyId, createdBy) và cô lập phiên (ads_user_id, PLAY_SESSION).
|
|
401
|
+
*/
|
|
402
|
+
accountScope?: ZaloAccountScope;
|
|
384
403
|
/**
|
|
385
404
|
* Định danh Integration (`integrationId`) hoặc `accountKey` để cô lập phiên khi quản lý nhiều tài khoản trên RAM/Redis.
|
|
386
405
|
* Nếu không truyền, SDK tự động tạo `accountKey` duy nhất từ `zpsid`.
|
|
@@ -1053,6 +1072,7 @@ declare class ZaloSdkHttpClient {
|
|
|
1053
1072
|
private readonly authByHost;
|
|
1054
1073
|
private authManagerInstance?;
|
|
1055
1074
|
private readonly autoRetryOn401;
|
|
1075
|
+
accountScope?: ZaloAccountScope;
|
|
1056
1076
|
constructor(options?: ZaloAdsSdkOptions);
|
|
1057
1077
|
get authManager(): ZaloAuthManager | undefined;
|
|
1058
1078
|
setAuthManager(manager?: ZaloAuthManager): void;
|
|
@@ -5668,6 +5688,14 @@ declare class ZaloAdsSdk {
|
|
|
5668
5688
|
* Trình quản lý xác thực `ZaloAuthManager` đang gắn với SDK (nếu khởi tạo bằng `zpsid` / `ssoAuth` / `authManager`).
|
|
5669
5689
|
*/
|
|
5670
5690
|
get authManager(): ZaloAuthManager | undefined;
|
|
5691
|
+
/**
|
|
5692
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) đang gắn với instance SDK.
|
|
5693
|
+
*/
|
|
5694
|
+
get accountScope(): ZaloAccountScope | undefined;
|
|
5695
|
+
/**
|
|
5696
|
+
* Cập nhật phạm vi tài khoản quảng cáo cô lập.
|
|
5697
|
+
*/
|
|
5698
|
+
setAccountScope(scope?: ZaloAccountScope): void;
|
|
5671
5699
|
/**
|
|
5672
5700
|
* Cập nhật cookie `zpsid` gốc (hoặc chuỗi Cookie trình duyệt) để tự động xác thực cho toàn bộ các domain Zalo Ads.
|
|
5673
5701
|
*/
|
|
@@ -5697,6 +5725,10 @@ interface ZaloIntegrationCredentials {
|
|
|
5697
5725
|
* Các cookie bổ sung muốn gắn kèm.
|
|
5698
5726
|
*/
|
|
5699
5727
|
extraCookies?: Record<string, string>;
|
|
5728
|
+
/**
|
|
5729
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) - chứa accountId, memberId, agencyId, accountType.
|
|
5730
|
+
*/
|
|
5731
|
+
accountScope?: ZaloAccountScope;
|
|
5700
5732
|
}
|
|
5701
5733
|
interface ZaloAdsClientRequest extends ZaloIntegrationCredentials {
|
|
5702
5734
|
/**
|
|
@@ -5810,6 +5842,7 @@ declare class ZaloAdsIntegrationManager {
|
|
|
5810
5842
|
zpsid: string;
|
|
5811
5843
|
zoawSek?: string;
|
|
5812
5844
|
extraCookies?: Record<string, string>;
|
|
5845
|
+
accountScope?: ZaloAccountScope;
|
|
5813
5846
|
}): Promise<ZaloIntegrationVerificationResult>;
|
|
5814
5847
|
/**
|
|
5815
5848
|
* Số lượng instance SDK đang giữ trong Pool RAM.
|
|
@@ -6261,4 +6294,4 @@ declare const ZaloMediaValidator: {
|
|
|
6261
6294
|
validateSaveMedia: typeof validateSaveMediaRequest;
|
|
6262
6295
|
};
|
|
6263
6296
|
|
|
6264
|
-
export { ALLOWED_CTAS_PER_AD_TYPE, ALL_ZALO_ADS_DOMAINS, AutomatedRuleActionTypeEnum, AutomatedRuleConditionFieldEnum, AutomatedRuleFrequencyEnum, AutomatedRuleOperatorEnum, AutomatedRuleScopeEnum, AutomatedRuleTimeRangeEnum, type AutomatedRuleValidationResult, type BodyType, type CampaignValidationResult, type CleanDateRangeReport, ConversionLabelEnum, ConversionUrlTypeEnum, type ConversionValidationResult, type DateRangeReportQuery, type FileDownloadResponse, type FileInput, type HttpMethod, MAX_REPORT_RANGE_MS, MAX_REPORT_RANGE_SECONDS, type MediaValidationResult, MemoryZaloSessionStore, type MemoryZaloSessionStoreOptions, type OperationDefinition, RedisZaloSessionStore, type RedisZaloSessionStoreOptions, type RequestOptions, TieredZaloSessionStore, type TieredZaloSessionStoreOptions, VALID_AD_TYPES, VALID_CAMPAIGN_TYPES, VIETNAM_PHONE_REGEX, type ValidateAdOptions, type ValidateCampaignOptions, type ValidateImageInput, type ValidateUploadMediaOptions, type ValidateVideoInput, type ValidationResult, ZALO_NEW_REGION_PROVINCE_CODES, ZALO_PROFILE_ADS_PROVINCES, ZALO_PROFILE_ADS_SUB_CATEGORIES, ZALO_PROVINCE_MERGE_MAPPING, ZALO_REGION_PROVINCE_CODES, ZaloAccountService, type ZaloAdsAccessorItemDto, type ZaloAdsAccountAgencyInfoDto, ZaloAdsIntegrationManager as ZaloAdsAccountPool, ZaloAdsActionType, type ZaloAdsAdAppInfoSettingsDto, type ZaloAdsAdImageSettingsDto, type ZaloAdsAdInfoSettingsDto, type ZaloAdsAdLocationSettingsDto, type ZaloAdsAdMultiImageItemDto, type ZaloAdsAdMutationResultDto, type ZaloAdsAdPriceSettingsDto, type ZaloAdsAdReportItemDto, type ZaloAdsAdSettingsDto, type ZaloAdsAdTargetingLocationContainerDto, type ZaloAdsAdTargetingProvinceItemDto, type ZaloAdsAdTargetingRegionItemDto, type ZaloAdsAdTargetingSettingsDto, type ZaloAdsAdUpdatePayloadDto, type ZaloAdsAdZVideoSettingsDto, ZaloAdsAgeRangeId, type ZaloAdsAgencyEmployeeItemDto, type ZaloAdsAutomatedRuleActionDto, type ZaloAdsAutomatedRuleAppliedItemDto, type ZaloAdsAutomatedRuleConditionDto, type ZaloAdsAutomatedRuleScheduleDto, ZaloAdsBudgetScheduleType, type ZaloAdsBudgetScheduleTypeValue, type ZaloAdsCampaignCreatePayloadDto, type ZaloAdsCampaignDetailExtendDto, type ZaloAdsCampaignReportItemDto, ZaloAdsCampaignStatus, type ZaloAdsCampaignStatusValue, type ZaloAdsChangeAutomatedRuleStatusRequest, type ZaloAdsChangeAutomatedRuleStatusResponse, type ZaloAdsChangeCampaignStatusRequest, type ZaloAdsChangeCampaignStatusResponse, type ZaloAdsClientRequest, type ZaloAdsCommerceFormAudienceTargetingDto, type ZaloAdsConversionElementSelectorDto, type ZaloAdsConversionItemDto, type ZaloAdsConversionNameItemDto, type ZaloAdsCreateArticleCampaignRequest, type ZaloAdsCreateArticleCampaignResponse, type ZaloAdsCreateAutomatedRuleRequest, type ZaloAdsCreateAutomatedRuleResponse, type ZaloAdsCreateCommerceCampaignRequest, type ZaloAdsCreateCommerceCampaignResponse, type ZaloAdsCreateCommerceFormAudienceRequest, type ZaloAdsCreateCommerceFormAudienceResponse, type ZaloAdsCreateConversionRequest, type ZaloAdsCreateConversionResponse, type ZaloAdsCreateCustomAudienceRequest, type ZaloAdsCreateCustomAudienceResponse, type ZaloAdsCreateDisplayCampaignRequest, type ZaloAdsCreateDisplayCampaignResponse, type ZaloAdsCreateEcommerceCampaignRequest, type ZaloAdsCreateEcommerceCampaignResponse, ZaloAdsCreateFlowRequest, ZaloAdsCreateFlowResponse, type ZaloAdsCreateFormCampaignRequest, type ZaloAdsCreateFormCampaignResponse, type ZaloAdsCreateFormEventAudienceRequest, type ZaloAdsCreateFormEventAudienceResponse, type ZaloAdsCreateFormLeadAudienceRequest, type ZaloAdsCreateFormLeadAudienceResponse, type ZaloAdsCreateFormPayloadDto, type ZaloAdsCreateFormRequest, type ZaloAdsCreateFormResponse, type ZaloAdsCreateLeadSignalAudienceRequest, type ZaloAdsCreateLeadSignalAudienceResponse, type ZaloAdsCreateLookalikeAudienceRequest, type ZaloAdsCreateLookalikeAudienceResponse, type ZaloAdsCreateMessageCampaignRequest, type ZaloAdsCreateMessageCampaignResponse, type ZaloAdsCreateMessageOaEventAudienceRequest, type ZaloAdsCreateMessageOaEventAudienceResponse, type ZaloAdsCreateMessageOaLeadAudienceRequest, type ZaloAdsCreateMessageOaLeadAudienceResponse, type ZaloAdsCreateMessagePersonalEventAudienceRequest, type ZaloAdsCreateMessagePersonalEventAudienceResponse, type ZaloAdsCreateOaCampaignRequest, type ZaloAdsCreateOaCampaignResponse, type ZaloAdsCreateOfficialAccountCampaignRequest, type ZaloAdsCreateOfficialAccountCampaignResponse, type ZaloAdsCreatePhoneAudienceRequest, type ZaloAdsCreatePhoneAudienceResponse, ZaloAdsCreatePostCampaignRequest, ZaloAdsCreatePostCampaignResponse, type ZaloAdsCreateSavedAudienceRequest, type ZaloAdsCreateSavedAudienceResponse, type ZaloAdsCreateSpellCheckV3JobRequest, type ZaloAdsCreateSpellCheckV3JobResponse, type ZaloAdsCreateVideoCampaignRequest, type ZaloAdsCreateVideoCampaignResponse, type ZaloAdsCreateWebsiteCampaignRequest, type ZaloAdsCreateWebsiteCampaignResponse, type ZaloAdsDeleteAutomatedRuleRequest, type ZaloAdsDeleteAutomatedRuleResponse, type ZaloAdsDeleteCampaignRequest, type ZaloAdsDeleteCampaignResponse, type ZaloAdsDeleteConversionRequest, type ZaloAdsDeleteConversionResponse, type ZaloAdsDeleteCustomAudienceRequest, type ZaloAdsDeleteCustomAudienceResponse, type ZaloAdsDeleteCustomReportRequest, type ZaloAdsDeleteCustomReportResponse, ZaloAdsDeliveryType, type ZaloAdsDeliveryTypeValue, type ZaloAdsDomain, type ZaloAdsDownloadReportRequest, type ZaloAdsDownloadReportResponse, type ZaloAdsDuplicateAdRequest, type ZaloAdsDuplicateAdResponse, type ZaloAdsFileGroupItemDto, ZaloAdsFlowButtonDto, ZaloAdsFlowChildMessageDto, ZaloAdsFlowMessageDto, type ZaloAdsFormAnswerDto, type ZaloAdsFormEventAudienceTargetingDto, type ZaloAdsFormLeadAudienceTargetingDto, type ZaloAdsFormQuestionDto, type ZaloAdsFormQuestionUiDto, type ZaloAdsFormSectionContentDto, type ZaloAdsFormSectionDto, type ZaloAdsFormSectionImageItemDto, type ZaloAdsFormSectionTableItemDto, type ZaloAdsGetAdByIdRequest, type ZaloAdsGetAdByIdResponse, type ZaloAdsGetAdChangeLogRequest, type ZaloAdsGetAdChangeLogResponse, type ZaloAdsGetApiAdGetlistadadvancetargetingRequest, type ZaloAdsGetApiAdGetlistadadvancetargetingResponse, type ZaloAdsGetApiBaAccountAllaccessorsRequest, type ZaloAdsGetApiBaAccountAllaccessorsResponse, type ZaloAdsGetApiBaAccountAllgrantedmembersRequest, type ZaloAdsGetApiBaAccountAllgrantedmembersResponse, type ZaloAdsGetApiBaAgencyEmployeesRequest, type ZaloAdsGetApiBaAgencyEmployeesResponse, type ZaloAdsGetApiConversionAllRequest, type ZaloAdsGetApiConversionAllResponse, type ZaloAdsGetApiConversionStandardEventsRequest, type ZaloAdsGetApiConversionStandardEventsResponse, type ZaloAdsGetApiCustomAudienceAllRequest, type ZaloAdsGetApiCustomAudienceAllResponse, type ZaloAdsGetApiFilegroupsRequest, type ZaloAdsGetApiFilegroupsResponse, type ZaloAdsGetApiLpNewsRequest, type ZaloAdsGetApiLpNewsResponse, type ZaloAdsGetApiMediaItemsRequest, type ZaloAdsGetApiMediaItemsResponse, type ZaloAdsGetApiMemberFilesRequest, type ZaloAdsGetApiMemberFilesResponse, type ZaloAdsGetApiNotifiesHeaderRequest, type ZaloAdsGetApiNotifiesHeaderResponse, type ZaloAdsGetApiPaymentTransactionHistoryRequest, type ZaloAdsGetApiPaymentTransactionHistoryResponse, type ZaloAdsGetApiPlaceGetalldistrictsRequest, type ZaloAdsGetApiPlaceGetalldistrictsResponse, type ZaloAdsGetApiSpellCheckV2Request, type ZaloAdsGetApiSpellCheckV2Response, type ZaloAdsGetApiWhoamiRequest, type ZaloAdsGetApiWhoamiResponse, type ZaloAdsGetAutomatedRuleDetailRequest, type ZaloAdsGetAutomatedRuleDetailResponse, type ZaloAdsGetAutomatedRuleHistoryRequest, type ZaloAdsGetAutomatedRuleHistoryResponse, type ZaloAdsGetDemographicsReportRequest, type ZaloAdsGetDemographicsReportResponse, type ZaloAdsGetReportOverviewRequest, type ZaloAdsGetReportOverviewResponse, type ZaloAdsGetReportapiV2AdsRequest, type ZaloAdsGetReportapiV2AdsResponse, type ZaloAdsGetReportapiV2CampaignsRequest, type ZaloAdsGetReportapiV2CampaignsResponse, type ZaloAdsGetReportapiV2UniqueUserRequest, type ZaloAdsGetReportapiV2UniqueUserResponse, type ZaloAdsGetReportapiV3CampaignsRequest, type ZaloAdsGetReportapiV3CampaignsResponse, type ZaloAdsGetSpellCheckV3JobRequest, type ZaloAdsGetSpellCheckV3JobResponse, type ZaloAdsGetZaapiCampaignReportcampaignRequest, type ZaloAdsGetZaapiCampaignReportcampaignResponse, type ZaloAdsGetZaapiCheckcamphasmanyadsRequest, type ZaloAdsGetZaapiCheckcamphasmanyadsResponse, type ZaloAdsGetZaapiGetadsfromcampaignidRequest, type ZaloAdsGetZaapiGetadsfromcampaignidResponse, type ZaloAdsGetZaapiGetallpagesRequest, type ZaloAdsGetZaapiGetallpagesResponse, type ZaloAdsGetZaapiGetownedarticlesRequest, type ZaloAdsGetZaapiGetownedarticlesResponse, type ZaloAdsGetZaapiGetownedpagesRequest, type ZaloAdsGetZaapiGetownedpagesResponse, type ZaloAdsGrantedMemberItemDto, ZaloAdsImageRatio, type ZaloAdsImageRatioValue, ZaloAdsIntegrationManager, type ZaloAdsIntegrationManagerOptions, type ZaloAdsLeadSignalAudienceTargetingDto, type ZaloAdsLeadSignalOaItem, type ZaloAdsListAgencyCustomersWithBudgetRequest, type ZaloAdsListAgencyCustomersWithBudgetResponse, type ZaloAdsListAutomatedRulesRequest, type ZaloAdsListAutomatedRulesResponse, type ZaloAdsListConversionNamesRequest, type ZaloAdsListConversionNamesResponse, type ZaloAdsListCustomReportsRequest, type ZaloAdsListCustomReportsResponse, type ZaloAdsListFlowsByOfficialAccountRequest, type ZaloAdsListFlowsByOfficialAccountResponse, type ZaloAdsListFormsByOfficialAccountRequest, type ZaloAdsListFormsByOfficialAccountResponse, type ZaloAdsListLeadSignalOasResponse, type ZaloAdsListMiniPagesByTemplateRequest, type ZaloAdsListMiniPagesByTemplateResponse, type ZaloAdsListPersonalPixelLabelsRequest, type ZaloAdsListPersonalPixelLabelsResponse, type ZaloAdsListReportFiltersRequest, type ZaloAdsListReportFiltersResponse, type ZaloAdsLookalikeAudienceTargetingDto, type ZaloAdsLpNewsButtonDto, type ZaloAdsLpNewsItemDto, type ZaloAdsMediaSavePayloadDto, type ZaloAdsMediaSaveSettingsDto, type ZaloAdsMemberFileItemDto, ZaloAdsMessageAdUpdateDataDto, type ZaloAdsMessageOaEventAudienceTargetingDto, type ZaloAdsMessageOaLeadAudienceTargetingDto, type ZaloAdsMessagePersonalEventAudienceTargetingDto, type ZaloAdsNotifyHeaderItemDto, ZaloAdsOsId, type ZaloAdsOsIdValue, type ZaloAdsOwnedArticleItemDto, type ZaloAdsOwnedPageExtraInfoDto, type ZaloAdsOwnedPageItemDto, type ZaloAdsOwnedPageLocationDto, type ZaloAdsPageConfigDto, type ZaloAdsPaymentTransactionItemDto, type ZaloAdsPhoneAudienceTargetingDto, type ZaloAdsPostApiAdEstimateaudienceRequest, type ZaloAdsPostApiAdEstimateaudienceResponse, type ZaloAdsPostApiMediaSaveRequest, type ZaloAdsPostApiMediaSaveResponse, type ZaloAdsPostApiMemberUploadImageRequest, type ZaloAdsPostApiMemberUploadImageResponse, type ZaloAdsPostZaapiDeleteadRequest, type ZaloAdsPostZaapiDeleteadResponse, ZaloAdsPriceLimitType, type ZaloAdsPriceLimitTypeValue, ZaloAdsPriceType, type ZaloAdsPriceTypeValue, ZaloAdsProvinceCode, type ZaloAdsProvinceCodeValue, ZaloAdsRegionId, type ZaloAdsRegionIdValue, type ZaloAdsRenameCampaignRequest, type ZaloAdsRenameCampaignResponse, ZaloAdsSdk, type ZaloAdsSdkOptions, ZaloAdsService, type ZaloAdsSpellCheckIssueDto, type ZaloAdsSpellCheckViolationDto, ZaloAdsSpendingMethod, type ZaloAdsSpendingMethodValue, type ZaloAdsStandardEventItemDto, type ZaloAdsUniqueUserReportDataDto, type ZaloAdsUpdateArticleAdRequest, type ZaloAdsUpdateArticleAdResponse, type ZaloAdsUpdateAutomatedRuleRequest, type ZaloAdsUpdateAutomatedRuleResponse, type ZaloAdsUpdateCommerceAdRequest, type ZaloAdsUpdateCommerceAdResponse, type ZaloAdsUpdateDisplayAdRequest, type ZaloAdsUpdateDisplayAdResponse, type ZaloAdsUpdateEcommerceAdRequest, type ZaloAdsUpdateEcommerceAdResponse, type ZaloAdsUpdateFlowRequest, type ZaloAdsUpdateFlowResponse, type ZaloAdsUpdateFormAdRequest, type ZaloAdsUpdateFormAdResponse, ZaloAdsUpdateMessageAdRequest, ZaloAdsUpdateMessageAdResponse, type ZaloAdsUpdateNewAdsRequest, type ZaloAdsUpdateNewAdsResponse, type ZaloAdsUpdateOaAdRequest, type ZaloAdsUpdateOaAdResponse, type ZaloAdsUpdateOfficialAccountAdRequest, type ZaloAdsUpdateOfficialAccountAdResponse, type ZaloAdsUpdatePostAdRequest, type ZaloAdsUpdatePostAdResponse, ZaloAdsUpdateVideoAdRequest, ZaloAdsUpdateVideoAdResponse, type ZaloAdsUpdateWebsiteAdRequest, type ZaloAdsUpdateWebsiteAdResponse, type ZaloAdsUploadCustomAudiencePhoneListRequest, type ZaloAdsUploadCustomAudiencePhoneListResponse, type ZaloAdsUploadVideoRequest, type ZaloAdsUploadVideoResponse, type ZaloAdsUpsertCustomReportRequest, type ZaloAdsUpsertCustomReportResponse, ZaloAdsUseConversion, type ZaloAdsUseConversionValue, ZaloAdsVideoSrc, type ZaloAdsVideoSrcValue, type ZaloAdsWhoamiProfile, ZaloAdsXTemplates, type ZaloAdsXTemplatesValue, type ZaloAdsZaapiCampaignReportItemDto, ZaloAudiencesService, ZaloAudiencesValidator, type ZaloAuthDomain, ZaloAuthManager, ZaloAutomatedRulesService, ZaloAutomatedRulesValidator, ZaloCampaignsService, ZaloCampaignsValidator, type ZaloChatWidgetGetChatWidgetLoginConfigRequest, type ZaloChatWidgetGetChatWidgetLoginConfigResponse, type ZaloChatWidgetGetLoginConfigRequest, type ZaloChatWidgetGetLoginConfigResponse, ZaloChatWidgetService, ZaloConversionsService, ZaloConversionsValidator, type ZaloCreateFormCleanPayload, type ZaloCreateFormRequestInput, type ZaloDomainSession, ZaloFlowsService, ZaloFlowsValidator, type ZaloFormQuestionAnswerInput, type ZaloFormQuestionInput, type ZaloFormSectionInput, type ZaloFormSessionProfile, type ZaloFormsAudienceExclusionTargetingItem, type ZaloFormsAuthSessionOaItem, type ZaloFormsConversationLeadItem, type ZaloFormsDisableFormLeadNotificationRequest, type ZaloFormsDisableFormLeadNotificationResponse, type ZaloFormsEnableFormLeadNotificationRequest, type ZaloFormsEnableFormLeadNotificationResponse, type ZaloFormsExportFormLeadReportRequest, type ZaloFormsExportFormLeadReportResponse, type ZaloFormsGetAuthSessionResponse, type ZaloFormsLeadAnswerItem, type ZaloFormsLeadItem, type ZaloFormsListAudienceExclusionTargetingRequest, type ZaloFormsListAudienceExclusionTargetingResponse, type ZaloFormsListConversationLeadsRequest, type ZaloFormsListConversationLeadsResponse, type ZaloFormsListFormLeadsRequest, type ZaloFormsListFormLeadsResponse, type ZaloFormsListManagedFormsByOfficialAccountRequest, type ZaloFormsListManagedFormsByOfficialAccountResponse, type ZaloFormsListScenariosByOfficialAccountRequest, type ZaloFormsListScenariosByOfficialAccountResponse, type ZaloFormsListSimpleFormsByOfficialAccountRequest, type ZaloFormsListSimpleFormsByOfficialAccountResponse, type ZaloFormsScenarioItem, ZaloFormsService, type ZaloFormsTrackManageFormEventRequest, type ZaloFormsTrackManageFormEventResponse, type ZaloFormsUpdateFormLeadNotificationIntervalRequest, type ZaloFormsUpdateFormLeadNotificationIntervalResponse, ZaloFormsValidator, type ZaloInstantPageActive, ZaloInstantPageBlockType, ZaloInstantPageSharePermission, type ZaloInstantPageSharePermissionValue, type ZaloInstantPageStatus, type ZaloInstantPagesCloneInstantPageRequest, type ZaloInstantPagesCloneInstantPageResponse, type ZaloInstantPagesCreateInstantPageRequest, type ZaloInstantPagesCreateInstantPageResponse, type ZaloInstantPagesFormRecordItem, type ZaloInstantPagesGetInstantPageDetailRequest, type ZaloInstantPagesGetInstantPageDetailResponse, type ZaloInstantPagesGetInstantPageSharedUserRequest, type ZaloInstantPagesGetInstantPageSharedUserResponse, type ZaloInstantPagesListInstantPageEditHistoryRequest, type ZaloInstantPagesListInstantPageEditHistoryResponse, type ZaloInstantPagesListInstantPageFormRecordsRequest, type ZaloInstantPagesListInstantPageFormRecordsResponse, type ZaloInstantPagesListInstantPageLeadsRequest, type ZaloInstantPagesListInstantPageLeadsResponse, type ZaloInstantPagesListInstantPageSharesRequest, type ZaloInstantPagesListInstantPageSharesResponse, type ZaloInstantPagesListInstantPageUsersRequest, type ZaloInstantPagesListInstantPageUsersResponse, type ZaloInstantPagesListMiniPageTemplatesRequest, type ZaloInstantPagesListMiniPageTemplatesResponse, type ZaloInstantPagesListOfficialAccountsRequest, type ZaloInstantPagesListOfficialAccountsResponse, type ZaloInstantPagesOfficialAccountItem, type ZaloInstantPagesSearchInstantPagesRequest, type ZaloInstantPagesSearchInstantPagesResponse, ZaloInstantPagesService, type ZaloInstantPagesShareMemberDto, type ZaloInstantPagesUpdateInstantPageRequest, type ZaloInstantPagesUpdateInstantPageResponse, type ZaloInstantPagesUpdateInstantPageSharesRequest, type ZaloInstantPagesUpdateInstantPageSharesResponse, type ZaloInstantPagesUpsertInstantPageFormRequest, type ZaloInstantPagesUpsertInstantPageFormResponse, ZaloInstantPagesValidator, type ZaloIntegrationCredentials, type ZaloIntegrationVerificationResult, ZaloMediaService, ZaloMediaValidator, type ZaloPlaySessionPayload, type ZaloProfileAdsAdministrativeItem, type ZaloProfileAdsCreateOaPageRequest, type ZaloProfileAdsCreateOaPageResponse, type ZaloProfileAdsGetDistrictsRequest, type ZaloProfileAdsGetDistrictsResponse, type ZaloProfileAdsGetProvincesResponse, type ZaloProfileAdsProvinceId, ZaloProfileAdsService, type ZaloProfileAdsSubCategoryId, type ZaloProfileAdsUploadOaAvatarRequest, type ZaloProfileAdsUploadOaAvatarResponse, type ZaloProfileAdsUploadOaCoverRequest, type ZaloProfileAdsUploadOaCoverResponse, ZaloProfileAdsValidator, type ZaloRedisLikeClient, ZaloReportsService, ZaloReportsValidator, type ZaloSdkAuth, type ZaloSdkAuthContext, ZaloSdkError, ZaloSdkHttpClient, type ZaloSessionStore, type ZaloSsoAuthOptions, type ZaloUploadAndSaveImageRequest, type ZaloUploadAndSaveImageResult, type ZaloUploadAndSaveVideoRequest, type ZaloUploadAndSaveVideoResult, type ZaloWidgetAPIGetOfficialAccountInfoRequest, type ZaloWidgetAPIGetOfficialAccountInfoResponse, type ZaloWidgetAPIGetWidgetUserProfileRequest, type ZaloWidgetAPIGetWidgetUserProfileResponse, type ZaloWidgetAPIListStickerCategoriesRequest, type ZaloWidgetAPIListStickerCategoriesResponse, type ZaloWidgetAPIListStickersByCategoryRequest, type ZaloWidgetAPIListStickersByCategoryResponse, ZaloWidgetApiService, computeZpsidFingerprint, createZaloSsoAuth, decodePlaySessionJwt, ZaloAdsSdk as default, defaultSharedMemorySessionStore, deriveAccountKeyFromZpsid, parseZaloCookieInput, validateChangeCampaignStatusParams, validateCloneInstantPageRequest, validateCreateCampaignPayload, validateCreateCustomAudienceRequest, validateCreateFlowRequest, validateCreateFormEventAudienceRequest, validateCreateFormRequest, validateCreateInstantPageRequest, validateCreateLookalikeAudienceRequest, validateCreateMessageOaEventAudienceRequest, validateCreateMessagePersonalEventAudienceRequest, validateCreateOaPageRequest, validateCreatePhoneAudienceRequest, validateCreateSavedAudienceRequest, validateCropCoordinates, validateDateRangeReportRequest, validateDuplicateAdParams, validateEstimateAudienceRequest, validateGetInstantPageDetailRequest, validateGetInstantPageSharedUserRequest, validateListFlowsByOfficialAccountRequest, validateListFormLeadsRequest, validateListFormsByOfficialAccountRequest, validateListInstantPageEditHistoryRequest, validateListInstantPageFormRecordsRequest, validateListInstantPageLeadsRequest, validateListInstantPageSharesRequest, validateListInstantPageUsersRequest, validateListMiniPageTemplatesRequest, validateListOfficialAccountsRequest, validateRenameCampaignParams, validateSaveMediaRequest, validateSearchInstantPagesRequest, validateToggleLeadNotificationRequest, validateUpdateAdPayload, validateUpdateFlowRequest, validateUpdateInstantPageRequest, validateUpdateInstantPageSharesRequest, validateUpdateLeadNotificationIntervalRequest, validateUploadCustomAudiencePhoneListRequest, validateUploadMediaRequest, validateUpsertCustomReportRequest, validateUpsertInstantPageFormRequest };
|
|
6297
|
+
export { ALLOWED_CTAS_PER_AD_TYPE, ALL_ZALO_ADS_DOMAINS, AutomatedRuleActionTypeEnum, AutomatedRuleConditionFieldEnum, AutomatedRuleFrequencyEnum, AutomatedRuleOperatorEnum, AutomatedRuleScopeEnum, AutomatedRuleTimeRangeEnum, type AutomatedRuleValidationResult, type BodyType, type CampaignValidationResult, type CleanDateRangeReport, ConversionLabelEnum, ConversionUrlTypeEnum, type ConversionValidationResult, type DateRangeReportQuery, type FileDownloadResponse, type FileInput, type HttpMethod, MAX_REPORT_RANGE_MS, MAX_REPORT_RANGE_SECONDS, type MediaValidationResult, MemoryZaloSessionStore, type MemoryZaloSessionStoreOptions, type OperationDefinition, RedisZaloSessionStore, type RedisZaloSessionStoreOptions, type RequestOptions, TieredZaloSessionStore, type TieredZaloSessionStoreOptions, VALID_AD_TYPES, VALID_CAMPAIGN_TYPES, VIETNAM_PHONE_REGEX, type ValidateAdOptions, type ValidateCampaignOptions, type ValidateImageInput, type ValidateUploadMediaOptions, type ValidateVideoInput, type ValidationResult, ZALO_NEW_REGION_PROVINCE_CODES, ZALO_PROFILE_ADS_PROVINCES, ZALO_PROFILE_ADS_SUB_CATEGORIES, ZALO_PROVINCE_MERGE_MAPPING, ZALO_REGION_PROVINCE_CODES, type ZaloAccountScope, ZaloAccountService, type ZaloAdsAccessorItemDto, type ZaloAdsAccountAgencyInfoDto, ZaloAdsIntegrationManager as ZaloAdsAccountPool, ZaloAdsActionType, type ZaloAdsAdAppInfoSettingsDto, type ZaloAdsAdImageSettingsDto, type ZaloAdsAdInfoSettingsDto, type ZaloAdsAdLocationSettingsDto, type ZaloAdsAdMultiImageItemDto, type ZaloAdsAdMutationResultDto, type ZaloAdsAdPriceSettingsDto, type ZaloAdsAdReportItemDto, type ZaloAdsAdSettingsDto, type ZaloAdsAdTargetingLocationContainerDto, type ZaloAdsAdTargetingProvinceItemDto, type ZaloAdsAdTargetingRegionItemDto, type ZaloAdsAdTargetingSettingsDto, type ZaloAdsAdUpdatePayloadDto, type ZaloAdsAdZVideoSettingsDto, ZaloAdsAgeRangeId, type ZaloAdsAgencyEmployeeItemDto, type ZaloAdsAutomatedRuleActionDto, type ZaloAdsAutomatedRuleAppliedItemDto, type ZaloAdsAutomatedRuleConditionDto, type ZaloAdsAutomatedRuleScheduleDto, ZaloAdsBudgetScheduleType, type ZaloAdsBudgetScheduleTypeValue, type ZaloAdsCampaignCreatePayloadDto, type ZaloAdsCampaignDetailExtendDto, type ZaloAdsCampaignReportItemDto, ZaloAdsCampaignStatus, type ZaloAdsCampaignStatusValue, type ZaloAdsChangeAutomatedRuleStatusRequest, type ZaloAdsChangeAutomatedRuleStatusResponse, type ZaloAdsChangeCampaignStatusRequest, type ZaloAdsChangeCampaignStatusResponse, type ZaloAdsClientRequest, type ZaloAdsCommerceFormAudienceTargetingDto, type ZaloAdsConversionElementSelectorDto, type ZaloAdsConversionItemDto, type ZaloAdsConversionNameItemDto, type ZaloAdsCreateArticleCampaignRequest, type ZaloAdsCreateArticleCampaignResponse, type ZaloAdsCreateAutomatedRuleRequest, type ZaloAdsCreateAutomatedRuleResponse, type ZaloAdsCreateCommerceCampaignRequest, type ZaloAdsCreateCommerceCampaignResponse, type ZaloAdsCreateCommerceFormAudienceRequest, type ZaloAdsCreateCommerceFormAudienceResponse, type ZaloAdsCreateConversionRequest, type ZaloAdsCreateConversionResponse, type ZaloAdsCreateCustomAudienceRequest, type ZaloAdsCreateCustomAudienceResponse, type ZaloAdsCreateDisplayCampaignRequest, type ZaloAdsCreateDisplayCampaignResponse, type ZaloAdsCreateEcommerceCampaignRequest, type ZaloAdsCreateEcommerceCampaignResponse, ZaloAdsCreateFlowRequest, ZaloAdsCreateFlowResponse, type ZaloAdsCreateFormCampaignRequest, type ZaloAdsCreateFormCampaignResponse, type ZaloAdsCreateFormEventAudienceRequest, type ZaloAdsCreateFormEventAudienceResponse, type ZaloAdsCreateFormLeadAudienceRequest, type ZaloAdsCreateFormLeadAudienceResponse, type ZaloAdsCreateFormPayloadDto, type ZaloAdsCreateFormRequest, type ZaloAdsCreateFormResponse, type ZaloAdsCreateLeadSignalAudienceRequest, type ZaloAdsCreateLeadSignalAudienceResponse, type ZaloAdsCreateLookalikeAudienceRequest, type ZaloAdsCreateLookalikeAudienceResponse, type ZaloAdsCreateMessageCampaignRequest, type ZaloAdsCreateMessageCampaignResponse, type ZaloAdsCreateMessageOaEventAudienceRequest, type ZaloAdsCreateMessageOaEventAudienceResponse, type ZaloAdsCreateMessageOaLeadAudienceRequest, type ZaloAdsCreateMessageOaLeadAudienceResponse, type ZaloAdsCreateMessagePersonalEventAudienceRequest, type ZaloAdsCreateMessagePersonalEventAudienceResponse, type ZaloAdsCreateOaCampaignRequest, type ZaloAdsCreateOaCampaignResponse, type ZaloAdsCreateOfficialAccountCampaignRequest, type ZaloAdsCreateOfficialAccountCampaignResponse, type ZaloAdsCreatePhoneAudienceRequest, type ZaloAdsCreatePhoneAudienceResponse, ZaloAdsCreatePostCampaignRequest, ZaloAdsCreatePostCampaignResponse, type ZaloAdsCreateSavedAudienceRequest, type ZaloAdsCreateSavedAudienceResponse, type ZaloAdsCreateSpellCheckV3JobRequest, type ZaloAdsCreateSpellCheckV3JobResponse, type ZaloAdsCreateVideoCampaignRequest, type ZaloAdsCreateVideoCampaignResponse, type ZaloAdsCreateWebsiteCampaignRequest, type ZaloAdsCreateWebsiteCampaignResponse, type ZaloAdsDeleteAutomatedRuleRequest, type ZaloAdsDeleteAutomatedRuleResponse, type ZaloAdsDeleteCampaignRequest, type ZaloAdsDeleteCampaignResponse, type ZaloAdsDeleteConversionRequest, type ZaloAdsDeleteConversionResponse, type ZaloAdsDeleteCustomAudienceRequest, type ZaloAdsDeleteCustomAudienceResponse, type ZaloAdsDeleteCustomReportRequest, type ZaloAdsDeleteCustomReportResponse, ZaloAdsDeliveryType, type ZaloAdsDeliveryTypeValue, type ZaloAdsDomain, type ZaloAdsDownloadReportRequest, type ZaloAdsDownloadReportResponse, type ZaloAdsDuplicateAdRequest, type ZaloAdsDuplicateAdResponse, type ZaloAdsFileGroupItemDto, ZaloAdsFlowButtonDto, ZaloAdsFlowChildMessageDto, ZaloAdsFlowMessageDto, type ZaloAdsFormAnswerDto, type ZaloAdsFormEventAudienceTargetingDto, type ZaloAdsFormLeadAudienceTargetingDto, type ZaloAdsFormQuestionDto, type ZaloAdsFormQuestionUiDto, type ZaloAdsFormSectionContentDto, type ZaloAdsFormSectionDto, type ZaloAdsFormSectionImageItemDto, type ZaloAdsFormSectionTableItemDto, type ZaloAdsGetAdByIdRequest, type ZaloAdsGetAdByIdResponse, type ZaloAdsGetAdChangeLogRequest, type ZaloAdsGetAdChangeLogResponse, type ZaloAdsGetApiAdGetlistadadvancetargetingRequest, type ZaloAdsGetApiAdGetlistadadvancetargetingResponse, type ZaloAdsGetApiBaAccountAllaccessorsRequest, type ZaloAdsGetApiBaAccountAllaccessorsResponse, type ZaloAdsGetApiBaAccountAllgrantedmembersRequest, type ZaloAdsGetApiBaAccountAllgrantedmembersResponse, type ZaloAdsGetApiBaAgencyEmployeesRequest, type ZaloAdsGetApiBaAgencyEmployeesResponse, type ZaloAdsGetApiConversionAllRequest, type ZaloAdsGetApiConversionAllResponse, type ZaloAdsGetApiConversionStandardEventsRequest, type ZaloAdsGetApiConversionStandardEventsResponse, type ZaloAdsGetApiCustomAudienceAllRequest, type ZaloAdsGetApiCustomAudienceAllResponse, type ZaloAdsGetApiFilegroupsRequest, type ZaloAdsGetApiFilegroupsResponse, type ZaloAdsGetApiLpNewsRequest, type ZaloAdsGetApiLpNewsResponse, type ZaloAdsGetApiMediaItemsRequest, type ZaloAdsGetApiMediaItemsResponse, type ZaloAdsGetApiMemberFilesRequest, type ZaloAdsGetApiMemberFilesResponse, type ZaloAdsGetApiNotifiesHeaderRequest, type ZaloAdsGetApiNotifiesHeaderResponse, type ZaloAdsGetApiPaymentTransactionHistoryRequest, type ZaloAdsGetApiPaymentTransactionHistoryResponse, type ZaloAdsGetApiPlaceGetalldistrictsRequest, type ZaloAdsGetApiPlaceGetalldistrictsResponse, type ZaloAdsGetApiSpellCheckV2Request, type ZaloAdsGetApiSpellCheckV2Response, type ZaloAdsGetApiWhoamiRequest, type ZaloAdsGetApiWhoamiResponse, type ZaloAdsGetAutomatedRuleDetailRequest, type ZaloAdsGetAutomatedRuleDetailResponse, type ZaloAdsGetAutomatedRuleHistoryRequest, type ZaloAdsGetAutomatedRuleHistoryResponse, type ZaloAdsGetDemographicsReportRequest, type ZaloAdsGetDemographicsReportResponse, type ZaloAdsGetReportOverviewRequest, type ZaloAdsGetReportOverviewResponse, type ZaloAdsGetReportapiV2AdsRequest, type ZaloAdsGetReportapiV2AdsResponse, type ZaloAdsGetReportapiV2CampaignsRequest, type ZaloAdsGetReportapiV2CampaignsResponse, type ZaloAdsGetReportapiV2UniqueUserRequest, type ZaloAdsGetReportapiV2UniqueUserResponse, type ZaloAdsGetReportapiV3CampaignsRequest, type ZaloAdsGetReportapiV3CampaignsResponse, type ZaloAdsGetSpellCheckV3JobRequest, type ZaloAdsGetSpellCheckV3JobResponse, type ZaloAdsGetZaapiCampaignReportcampaignRequest, type ZaloAdsGetZaapiCampaignReportcampaignResponse, type ZaloAdsGetZaapiCheckcamphasmanyadsRequest, type ZaloAdsGetZaapiCheckcamphasmanyadsResponse, type ZaloAdsGetZaapiGetadsfromcampaignidRequest, type ZaloAdsGetZaapiGetadsfromcampaignidResponse, type ZaloAdsGetZaapiGetallpagesRequest, type ZaloAdsGetZaapiGetallpagesResponse, type ZaloAdsGetZaapiGetownedarticlesRequest, type ZaloAdsGetZaapiGetownedarticlesResponse, type ZaloAdsGetZaapiGetownedpagesRequest, type ZaloAdsGetZaapiGetownedpagesResponse, type ZaloAdsGrantedMemberItemDto, ZaloAdsImageRatio, type ZaloAdsImageRatioValue, ZaloAdsIntegrationManager, type ZaloAdsIntegrationManagerOptions, type ZaloAdsLeadSignalAudienceTargetingDto, type ZaloAdsLeadSignalOaItem, type ZaloAdsListAgencyCustomersWithBudgetRequest, type ZaloAdsListAgencyCustomersWithBudgetResponse, type ZaloAdsListAutomatedRulesRequest, type ZaloAdsListAutomatedRulesResponse, type ZaloAdsListConversionNamesRequest, type ZaloAdsListConversionNamesResponse, type ZaloAdsListCustomReportsRequest, type ZaloAdsListCustomReportsResponse, type ZaloAdsListFlowsByOfficialAccountRequest, type ZaloAdsListFlowsByOfficialAccountResponse, type ZaloAdsListFormsByOfficialAccountRequest, type ZaloAdsListFormsByOfficialAccountResponse, type ZaloAdsListLeadSignalOasResponse, type ZaloAdsListMiniPagesByTemplateRequest, type ZaloAdsListMiniPagesByTemplateResponse, type ZaloAdsListPersonalPixelLabelsRequest, type ZaloAdsListPersonalPixelLabelsResponse, type ZaloAdsListReportFiltersRequest, type ZaloAdsListReportFiltersResponse, type ZaloAdsLookalikeAudienceTargetingDto, type ZaloAdsLpNewsButtonDto, type ZaloAdsLpNewsItemDto, type ZaloAdsMediaSavePayloadDto, type ZaloAdsMediaSaveSettingsDto, type ZaloAdsMemberFileItemDto, ZaloAdsMessageAdUpdateDataDto, type ZaloAdsMessageOaEventAudienceTargetingDto, type ZaloAdsMessageOaLeadAudienceTargetingDto, type ZaloAdsMessagePersonalEventAudienceTargetingDto, type ZaloAdsNotifyHeaderItemDto, ZaloAdsOsId, type ZaloAdsOsIdValue, type ZaloAdsOwnedArticleItemDto, type ZaloAdsOwnedPageExtraInfoDto, type ZaloAdsOwnedPageItemDto, type ZaloAdsOwnedPageLocationDto, type ZaloAdsPageConfigDto, type ZaloAdsPaymentTransactionItemDto, type ZaloAdsPhoneAudienceTargetingDto, type ZaloAdsPostApiAdEstimateaudienceRequest, type ZaloAdsPostApiAdEstimateaudienceResponse, type ZaloAdsPostApiMediaSaveRequest, type ZaloAdsPostApiMediaSaveResponse, type ZaloAdsPostApiMemberUploadImageRequest, type ZaloAdsPostApiMemberUploadImageResponse, type ZaloAdsPostZaapiDeleteadRequest, type ZaloAdsPostZaapiDeleteadResponse, ZaloAdsPriceLimitType, type ZaloAdsPriceLimitTypeValue, ZaloAdsPriceType, type ZaloAdsPriceTypeValue, ZaloAdsProvinceCode, type ZaloAdsProvinceCodeValue, ZaloAdsRegionId, type ZaloAdsRegionIdValue, type ZaloAdsRenameCampaignRequest, type ZaloAdsRenameCampaignResponse, ZaloAdsSdk, type ZaloAdsSdkOptions, ZaloAdsService, type ZaloAdsSpellCheckIssueDto, type ZaloAdsSpellCheckViolationDto, ZaloAdsSpendingMethod, type ZaloAdsSpendingMethodValue, type ZaloAdsStandardEventItemDto, type ZaloAdsUniqueUserReportDataDto, type ZaloAdsUpdateArticleAdRequest, type ZaloAdsUpdateArticleAdResponse, type ZaloAdsUpdateAutomatedRuleRequest, type ZaloAdsUpdateAutomatedRuleResponse, type ZaloAdsUpdateCommerceAdRequest, type ZaloAdsUpdateCommerceAdResponse, type ZaloAdsUpdateDisplayAdRequest, type ZaloAdsUpdateDisplayAdResponse, type ZaloAdsUpdateEcommerceAdRequest, type ZaloAdsUpdateEcommerceAdResponse, type ZaloAdsUpdateFlowRequest, type ZaloAdsUpdateFlowResponse, type ZaloAdsUpdateFormAdRequest, type ZaloAdsUpdateFormAdResponse, ZaloAdsUpdateMessageAdRequest, ZaloAdsUpdateMessageAdResponse, type ZaloAdsUpdateNewAdsRequest, type ZaloAdsUpdateNewAdsResponse, type ZaloAdsUpdateOaAdRequest, type ZaloAdsUpdateOaAdResponse, type ZaloAdsUpdateOfficialAccountAdRequest, type ZaloAdsUpdateOfficialAccountAdResponse, type ZaloAdsUpdatePostAdRequest, type ZaloAdsUpdatePostAdResponse, ZaloAdsUpdateVideoAdRequest, ZaloAdsUpdateVideoAdResponse, type ZaloAdsUpdateWebsiteAdRequest, type ZaloAdsUpdateWebsiteAdResponse, type ZaloAdsUploadCustomAudiencePhoneListRequest, type ZaloAdsUploadCustomAudiencePhoneListResponse, type ZaloAdsUploadVideoRequest, type ZaloAdsUploadVideoResponse, type ZaloAdsUpsertCustomReportRequest, type ZaloAdsUpsertCustomReportResponse, ZaloAdsUseConversion, type ZaloAdsUseConversionValue, ZaloAdsVideoSrc, type ZaloAdsVideoSrcValue, type ZaloAdsWhoamiProfile, ZaloAdsXTemplates, type ZaloAdsXTemplatesValue, type ZaloAdsZaapiCampaignReportItemDto, ZaloAudiencesService, ZaloAudiencesValidator, type ZaloAuthDomain, ZaloAuthManager, ZaloAutomatedRulesService, ZaloAutomatedRulesValidator, ZaloCampaignsService, ZaloCampaignsValidator, type ZaloChatWidgetGetChatWidgetLoginConfigRequest, type ZaloChatWidgetGetChatWidgetLoginConfigResponse, type ZaloChatWidgetGetLoginConfigRequest, type ZaloChatWidgetGetLoginConfigResponse, ZaloChatWidgetService, ZaloConversionsService, ZaloConversionsValidator, type ZaloCreateFormCleanPayload, type ZaloCreateFormRequestInput, type ZaloDomainSession, ZaloFlowsService, ZaloFlowsValidator, type ZaloFormQuestionAnswerInput, type ZaloFormQuestionInput, type ZaloFormSectionInput, type ZaloFormSessionProfile, type ZaloFormsAudienceExclusionTargetingItem, type ZaloFormsAuthSessionOaItem, type ZaloFormsConversationLeadItem, type ZaloFormsDisableFormLeadNotificationRequest, type ZaloFormsDisableFormLeadNotificationResponse, type ZaloFormsEnableFormLeadNotificationRequest, type ZaloFormsEnableFormLeadNotificationResponse, type ZaloFormsExportFormLeadReportRequest, type ZaloFormsExportFormLeadReportResponse, type ZaloFormsGetAuthSessionResponse, type ZaloFormsLeadAnswerItem, type ZaloFormsLeadItem, type ZaloFormsListAudienceExclusionTargetingRequest, type ZaloFormsListAudienceExclusionTargetingResponse, type ZaloFormsListConversationLeadsRequest, type ZaloFormsListConversationLeadsResponse, type ZaloFormsListFormLeadsRequest, type ZaloFormsListFormLeadsResponse, type ZaloFormsListManagedFormsByOfficialAccountRequest, type ZaloFormsListManagedFormsByOfficialAccountResponse, type ZaloFormsListScenariosByOfficialAccountRequest, type ZaloFormsListScenariosByOfficialAccountResponse, type ZaloFormsListSimpleFormsByOfficialAccountRequest, type ZaloFormsListSimpleFormsByOfficialAccountResponse, type ZaloFormsScenarioItem, ZaloFormsService, type ZaloFormsTrackManageFormEventRequest, type ZaloFormsTrackManageFormEventResponse, type ZaloFormsUpdateFormLeadNotificationIntervalRequest, type ZaloFormsUpdateFormLeadNotificationIntervalResponse, ZaloFormsValidator, type ZaloInstantPageActive, ZaloInstantPageBlockType, ZaloInstantPageSharePermission, type ZaloInstantPageSharePermissionValue, type ZaloInstantPageStatus, type ZaloInstantPagesCloneInstantPageRequest, type ZaloInstantPagesCloneInstantPageResponse, type ZaloInstantPagesCreateInstantPageRequest, type ZaloInstantPagesCreateInstantPageResponse, type ZaloInstantPagesFormRecordItem, type ZaloInstantPagesGetInstantPageDetailRequest, type ZaloInstantPagesGetInstantPageDetailResponse, type ZaloInstantPagesGetInstantPageSharedUserRequest, type ZaloInstantPagesGetInstantPageSharedUserResponse, type ZaloInstantPagesListInstantPageEditHistoryRequest, type ZaloInstantPagesListInstantPageEditHistoryResponse, type ZaloInstantPagesListInstantPageFormRecordsRequest, type ZaloInstantPagesListInstantPageFormRecordsResponse, type ZaloInstantPagesListInstantPageLeadsRequest, type ZaloInstantPagesListInstantPageLeadsResponse, type ZaloInstantPagesListInstantPageSharesRequest, type ZaloInstantPagesListInstantPageSharesResponse, type ZaloInstantPagesListInstantPageUsersRequest, type ZaloInstantPagesListInstantPageUsersResponse, type ZaloInstantPagesListMiniPageTemplatesRequest, type ZaloInstantPagesListMiniPageTemplatesResponse, type ZaloInstantPagesListOfficialAccountsRequest, type ZaloInstantPagesListOfficialAccountsResponse, type ZaloInstantPagesOfficialAccountItem, type ZaloInstantPagesSearchInstantPagesRequest, type ZaloInstantPagesSearchInstantPagesResponse, ZaloInstantPagesService, type ZaloInstantPagesShareMemberDto, type ZaloInstantPagesUpdateInstantPageRequest, type ZaloInstantPagesUpdateInstantPageResponse, type ZaloInstantPagesUpdateInstantPageSharesRequest, type ZaloInstantPagesUpdateInstantPageSharesResponse, type ZaloInstantPagesUpsertInstantPageFormRequest, type ZaloInstantPagesUpsertInstantPageFormResponse, ZaloInstantPagesValidator, type ZaloIntegrationCredentials, type ZaloIntegrationVerificationResult, ZaloMediaService, ZaloMediaValidator, type ZaloPlaySessionPayload, type ZaloProfileAdsAdministrativeItem, type ZaloProfileAdsCreateOaPageRequest, type ZaloProfileAdsCreateOaPageResponse, type ZaloProfileAdsGetDistrictsRequest, type ZaloProfileAdsGetDistrictsResponse, type ZaloProfileAdsGetProvincesResponse, type ZaloProfileAdsProvinceId, ZaloProfileAdsService, type ZaloProfileAdsSubCategoryId, type ZaloProfileAdsUploadOaAvatarRequest, type ZaloProfileAdsUploadOaAvatarResponse, type ZaloProfileAdsUploadOaCoverRequest, type ZaloProfileAdsUploadOaCoverResponse, ZaloProfileAdsValidator, type ZaloRedisLikeClient, ZaloReportsService, ZaloReportsValidator, type ZaloSdkAuth, type ZaloSdkAuthContext, ZaloSdkError, ZaloSdkHttpClient, type ZaloSessionStore, type ZaloSsoAuthOptions, type ZaloUploadAndSaveImageRequest, type ZaloUploadAndSaveImageResult, type ZaloUploadAndSaveVideoRequest, type ZaloUploadAndSaveVideoResult, type ZaloWidgetAPIGetOfficialAccountInfoRequest, type ZaloWidgetAPIGetOfficialAccountInfoResponse, type ZaloWidgetAPIGetWidgetUserProfileRequest, type ZaloWidgetAPIGetWidgetUserProfileResponse, type ZaloWidgetAPIListStickerCategoriesRequest, type ZaloWidgetAPIListStickerCategoriesResponse, type ZaloWidgetAPIListStickersByCategoryRequest, type ZaloWidgetAPIListStickersByCategoryResponse, ZaloWidgetApiService, computeZpsidFingerprint, createZaloSsoAuth, decodePlaySessionJwt, ZaloAdsSdk as default, defaultSharedMemorySessionStore, deriveAccountKeyFromZpsid, parseZaloCookieInput, validateChangeCampaignStatusParams, validateCloneInstantPageRequest, validateCreateCampaignPayload, validateCreateCustomAudienceRequest, validateCreateFlowRequest, validateCreateFormEventAudienceRequest, validateCreateFormRequest, validateCreateInstantPageRequest, validateCreateLookalikeAudienceRequest, validateCreateMessageOaEventAudienceRequest, validateCreateMessagePersonalEventAudienceRequest, validateCreateOaPageRequest, validateCreatePhoneAudienceRequest, validateCreateSavedAudienceRequest, validateCropCoordinates, validateDateRangeReportRequest, validateDuplicateAdParams, validateEstimateAudienceRequest, validateGetInstantPageDetailRequest, validateGetInstantPageSharedUserRequest, validateListFlowsByOfficialAccountRequest, validateListFormLeadsRequest, validateListFormsByOfficialAccountRequest, validateListInstantPageEditHistoryRequest, validateListInstantPageFormRecordsRequest, validateListInstantPageLeadsRequest, validateListInstantPageSharesRequest, validateListInstantPageUsersRequest, validateListMiniPageTemplatesRequest, validateListOfficialAccountsRequest, validateRenameCampaignParams, validateSaveMediaRequest, validateSearchInstantPagesRequest, validateToggleLeadNotificationRequest, validateUpdateAdPayload, validateUpdateFlowRequest, validateUpdateInstantPageRequest, validateUpdateInstantPageSharesRequest, validateUpdateLeadNotificationIntervalRequest, validateUploadCustomAudiencePhoneListRequest, validateUploadMediaRequest, validateUpsertCustomReportRequest, validateUpsertInstantPageFormRequest };
|
package/dist/index.js
CHANGED
|
@@ -451,6 +451,7 @@ function parseZaloCookieInput(rawInput) {
|
|
|
451
451
|
}
|
|
452
452
|
var ZaloAuthManager = class {
|
|
453
453
|
explicitAccountKey;
|
|
454
|
+
accountScope;
|
|
454
455
|
zpsid;
|
|
455
456
|
getZpsidFn;
|
|
456
457
|
extraCookies;
|
|
@@ -468,6 +469,7 @@ var ZaloAuthManager = class {
|
|
|
468
469
|
throw new Error("A Fetch implementation is required (Node.js 18+ provides global fetch).");
|
|
469
470
|
}
|
|
470
471
|
this.explicitAccountKey = normalizedOptions.integrationId ?? normalizedOptions.accountKey;
|
|
472
|
+
this.accountScope = normalizedOptions.accountScope;
|
|
471
473
|
this.extraCookies = { ...normalizedOptions.extraCookies ?? {} };
|
|
472
474
|
if (normalizedOptions.zpsid) {
|
|
473
475
|
const parsed = parseZaloCookieInput(normalizedOptions.zpsid);
|
|
@@ -515,6 +517,12 @@ var ZaloAuthManager = class {
|
|
|
515
517
|
getSessionStore() {
|
|
516
518
|
return this.sessionStore;
|
|
517
519
|
}
|
|
520
|
+
getAccountScope() {
|
|
521
|
+
return this.accountScope;
|
|
522
|
+
}
|
|
523
|
+
setAccountScope(scope) {
|
|
524
|
+
this.accountScope = scope;
|
|
525
|
+
}
|
|
518
526
|
/**
|
|
519
527
|
* Cập nhật `zpsid` mới và xóa toàn bộ cache phiên cũ trên cả RAM lẫn Redis.
|
|
520
528
|
*/
|
|
@@ -729,6 +737,13 @@ var ZaloAuthManager = class {
|
|
|
729
737
|
if (session.zpsidFingerprint && session.zpsidFingerprint !== currentFingerprint) {
|
|
730
738
|
return false;
|
|
731
739
|
}
|
|
740
|
+
if (session.domain === "ads.zalo.me" && this.accountScope?.memberId && String(this.accountScope.memberId) !== "0" && !this.accountScope.isRoot) {
|
|
741
|
+
const expectedMemberId = String(this.accountScope.memberId);
|
|
742
|
+
const activeMemberId = String(session.playSessionPayload?.data?.id ?? "");
|
|
743
|
+
if (activeMemberId && activeMemberId !== expectedMemberId) {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
732
747
|
return true;
|
|
733
748
|
}
|
|
734
749
|
async resolveZpsid() {
|
|
@@ -804,11 +819,64 @@ var ZaloAuthManager = class {
|
|
|
804
819
|
const whoamiJson = await whoamiRes.json().catch(() => null);
|
|
805
820
|
if (whoamiJson?.data) {
|
|
806
821
|
adsProfile = whoamiJson.data;
|
|
807
|
-
|
|
808
|
-
|
|
822
|
+
}
|
|
823
|
+
const currentActiveId = String(
|
|
824
|
+
decodePlaySessionJwt(cookies["PLAY_SESSION"] || "")?.data?.id ?? ""
|
|
825
|
+
);
|
|
826
|
+
const shouldSwitchContext = Boolean(
|
|
827
|
+
this.accountScope?.memberId && String(this.accountScope.memberId) !== "0" && !this.accountScope.isRoot && (!explicitPlaySession || currentActiveId && currentActiveId !== String(this.accountScope.memberId))
|
|
828
|
+
);
|
|
829
|
+
if (shouldSwitchContext) {
|
|
830
|
+
const memberIdStr = String(this.accountScope.memberId);
|
|
831
|
+
const switchUrls = [];
|
|
832
|
+
if (this.accountScope.accountType === "ACCESSOR") {
|
|
833
|
+
switchUrls.push(`https://ads.zalo.me/api/ba/personal/login?memberId=${memberIdStr}`);
|
|
834
|
+
} else if (this.accountScope.accountType === "AGENCY_MASTER" || this.accountScope.accountType === "AGENCY" || this.accountScope.accountType === "AGENCY_SUB_ACCOUNT") {
|
|
835
|
+
switchUrls.push(`https://ads.zalo.me/api/ba/agency/login?memberId=${memberIdStr}`);
|
|
836
|
+
switchUrls.push(`https://ads.zalo.me/api/ba/personal/login?memberId=${memberIdStr}`);
|
|
837
|
+
} else {
|
|
838
|
+
switchUrls.push(`https://ads.zalo.me/api/ba/agency/login?memberId=${memberIdStr}`);
|
|
839
|
+
switchUrls.push(`https://ads.zalo.me/api/ba/personal/login?memberId=${memberIdStr}`);
|
|
809
840
|
}
|
|
841
|
+
for (const switchUrl of switchUrls) {
|
|
842
|
+
try {
|
|
843
|
+
const switchRes = await this.fetchImpl(switchUrl, {
|
|
844
|
+
method: "GET",
|
|
845
|
+
headers: {
|
|
846
|
+
Cookie: this.formatCookieHeader(cookies),
|
|
847
|
+
"User-Agent": this.userAgent,
|
|
848
|
+
Accept: "application/json, text/plain, */*"
|
|
849
|
+
},
|
|
850
|
+
redirect: "manual"
|
|
851
|
+
});
|
|
852
|
+
this.mergeSetCookies(switchRes, cookies);
|
|
853
|
+
const location = switchRes.headers.get("location") || "";
|
|
854
|
+
if (location && !location.includes("/client/denied")) {
|
|
855
|
+
const switchedWhoamiRes = await this.fetchImpl("https://ads.zalo.me/api/whoami", {
|
|
856
|
+
method: "GET",
|
|
857
|
+
headers: {
|
|
858
|
+
Cookie: this.formatCookieHeader(cookies),
|
|
859
|
+
"User-Agent": this.userAgent,
|
|
860
|
+
Accept: "application/json"
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
this.mergeSetCookies(switchedWhoamiRes, cookies);
|
|
864
|
+
const switchedJson = await switchedWhoamiRes.json().catch(() => null);
|
|
865
|
+
if (switchedJson?.data) {
|
|
866
|
+
adsProfile = switchedJson.data;
|
|
867
|
+
}
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
} catch {
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
if (this.accountScope?.memberId && String(this.accountScope.memberId) !== "0") {
|
|
875
|
+
cookies["ads_user_id"] = String(this.accountScope.memberId);
|
|
810
876
|
} else if (this.extraCookies?.ads_user_id) {
|
|
811
|
-
cookies["ads_user_id"] = this.extraCookies.ads_user_id;
|
|
877
|
+
cookies["ads_user_id"] = String(this.extraCookies.ads_user_id);
|
|
878
|
+
} else if (adsProfile?.id) {
|
|
879
|
+
cookies["ads_user_id"] = String(adsProfile.id);
|
|
812
880
|
}
|
|
813
881
|
} else if (domain === "page.ads.zalo.me") {
|
|
814
882
|
await this.followOAuthRedirects("https://page.ads.zalo.me/api/login", cookies, false);
|
|
@@ -1010,22 +1078,31 @@ var ZaloSdkHttpClient = class {
|
|
|
1010
1078
|
authByHost = /* @__PURE__ */ new Map();
|
|
1011
1079
|
authManagerInstance;
|
|
1012
1080
|
autoRetryOn401;
|
|
1081
|
+
accountScope;
|
|
1013
1082
|
constructor(options = {}) {
|
|
1014
1083
|
this.fetchImpl = options.fetch ?? globalThis.fetch;
|
|
1015
1084
|
if (!this.fetchImpl) throw new Error("A Fetch implementation is required (Node.js 18+ provides global fetch).");
|
|
1016
1085
|
this.baseUrls = { ...DEFAULT_BASE_URLS, ...options.baseUrls ?? {} };
|
|
1017
1086
|
this.autoRetryOn401 = options.autoRetryOn401 ?? true;
|
|
1087
|
+
this.accountScope = options.accountScope;
|
|
1018
1088
|
if (options.authManager) {
|
|
1019
1089
|
this.authManagerInstance = options.authManager;
|
|
1090
|
+
if (options.accountScope && !this.authManagerInstance.getAccountScope()) {
|
|
1091
|
+
this.authManagerInstance.setAccountScope(options.accountScope);
|
|
1092
|
+
}
|
|
1020
1093
|
} else if (options.zpsid || options.ssoAuth) {
|
|
1021
1094
|
const extraCookies = {
|
|
1022
1095
|
...options.ssoAuth?.extraCookies ?? {},
|
|
1023
1096
|
...options.zoawSek ? { zoaw_sek: options.zoawSek } : {}
|
|
1024
1097
|
};
|
|
1098
|
+
if (options.accountScope?.memberId && String(options.accountScope.memberId) !== "0") {
|
|
1099
|
+
extraCookies["ads_user_id"] = String(options.accountScope.memberId);
|
|
1100
|
+
}
|
|
1025
1101
|
this.authManagerInstance = new ZaloAuthManager({
|
|
1026
1102
|
fetch: this.fetchImpl,
|
|
1027
1103
|
integrationId: options.integrationId,
|
|
1028
1104
|
accountKey: options.accountKey,
|
|
1105
|
+
accountScope: options.accountScope ?? options.ssoAuth?.accountScope,
|
|
1029
1106
|
sessionStore: options.sessionStore,
|
|
1030
1107
|
redis: options.redis,
|
|
1031
1108
|
redisKeyPrefix: options.redisKeyPrefix,
|
|
@@ -1142,6 +1219,16 @@ var ZaloSdkHttpClient = class {
|
|
|
1142
1219
|
add("header_param", operation.headerFields);
|
|
1143
1220
|
add("cookie_param", operation.cookieFields);
|
|
1144
1221
|
add("body", operation.bodyFields);
|
|
1222
|
+
if (this.accountScope && output.query_param) {
|
|
1223
|
+
const query = output.query_param;
|
|
1224
|
+
const isAgencyContext = this.accountScope.accountType === "AGENCY_SUB_ACCOUNT" || this.accountScope.accountType === "AGENCY_MASTER" || this.accountScope.accountType === "AGENCY" || Boolean(this.accountScope.agencyId);
|
|
1225
|
+
if (operation.queryFields.includes("agencyId") && query.agencyId === void 0 && isAgencyContext && this.accountScope.agencyId) {
|
|
1226
|
+
query.agencyId = Number(this.accountScope.agencyId);
|
|
1227
|
+
}
|
|
1228
|
+
if (operation.queryFields.includes("createdBy") && query.createdBy === void 0 && this.accountScope.accountType === "AGENCY_SUB_ACCOUNT" && this.accountScope.memberId && String(this.accountScope.memberId) !== "0") {
|
|
1229
|
+
query.createdBy = Number(this.accountScope.memberId);
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1145
1232
|
return output;
|
|
1146
1233
|
}
|
|
1147
1234
|
async resolveFile(input) {
|
|
@@ -4048,7 +4135,6 @@ var ZaloReportsService = class {
|
|
|
4048
4135
|
getReportapiV3Campaigns(request, options) {
|
|
4049
4136
|
const normalized = {
|
|
4050
4137
|
filter: "[]",
|
|
4051
|
-
agencyId: 0,
|
|
4052
4138
|
...request
|
|
4053
4139
|
};
|
|
4054
4140
|
return this.client.requestWithoutBody(OP_ZaloAdsGetReportapiV3Campaigns, this.client.toTransportInput(OP_ZaloAdsGetReportapiV3Campaigns, normalized), options);
|
|
@@ -7260,6 +7346,21 @@ var ZaloAdsSdk = class {
|
|
|
7260
7346
|
get authManager() {
|
|
7261
7347
|
return this.client.authManager;
|
|
7262
7348
|
}
|
|
7349
|
+
/**
|
|
7350
|
+
* Phạm vi tài khoản quảng cáo cô lập (Isolated Workspace) đang gắn với instance SDK.
|
|
7351
|
+
*/
|
|
7352
|
+
get accountScope() {
|
|
7353
|
+
return this.client.accountScope;
|
|
7354
|
+
}
|
|
7355
|
+
/**
|
|
7356
|
+
* Cập nhật phạm vi tài khoản quảng cáo cô lập.
|
|
7357
|
+
*/
|
|
7358
|
+
setAccountScope(scope) {
|
|
7359
|
+
this.client.accountScope = scope;
|
|
7360
|
+
if (this.client.authManager) {
|
|
7361
|
+
this.client.authManager.setAccountScope(scope);
|
|
7362
|
+
}
|
|
7363
|
+
}
|
|
7263
7364
|
/**
|
|
7264
7365
|
* Cập nhật cookie `zpsid` gốc (hoặc chuỗi Cookie trình duyệt) để tự động xác thực cho toàn bộ các domain Zalo Ads.
|
|
7265
7366
|
*/
|
|
@@ -7339,6 +7440,9 @@ var ZaloAdsIntegrationManager = class {
|
|
|
7339
7440
|
existing.sdk.setZpsid(request.zpsid);
|
|
7340
7441
|
existing.zpsid = cleanZpsid;
|
|
7341
7442
|
}
|
|
7443
|
+
if (request.accountScope) {
|
|
7444
|
+
existing.sdk.setAccountScope(request.accountScope);
|
|
7445
|
+
}
|
|
7342
7446
|
this.sdkPool.set(integrationId, existing);
|
|
7343
7447
|
return existing.sdk;
|
|
7344
7448
|
}
|
|
@@ -7353,15 +7457,20 @@ var ZaloAdsIntegrationManager = class {
|
|
|
7353
7457
|
...request.extraCookies ?? {},
|
|
7354
7458
|
...request.zoawSek ? { zoaw_sek: request.zoawSek } : {}
|
|
7355
7459
|
};
|
|
7460
|
+
if (request.accountScope?.memberId && String(request.accountScope.memberId) !== "0") {
|
|
7461
|
+
extraCookies.ads_user_id = String(request.accountScope.memberId);
|
|
7462
|
+
}
|
|
7356
7463
|
const sdk = new ZaloAdsSdk({
|
|
7357
7464
|
integrationId,
|
|
7358
7465
|
zpsid: cleanZpsid,
|
|
7466
|
+
accountScope: request.accountScope,
|
|
7359
7467
|
sessionStore: this.sessionStore,
|
|
7360
7468
|
fetch: this.fetchImpl,
|
|
7361
7469
|
baseUrls: this.baseUrls,
|
|
7362
7470
|
ssoAuth: {
|
|
7363
7471
|
integrationId,
|
|
7364
7472
|
zpsid: cleanZpsid,
|
|
7473
|
+
accountScope: request.accountScope,
|
|
7365
7474
|
extraCookies,
|
|
7366
7475
|
sessionStore: this.sessionStore,
|
|
7367
7476
|
sessionTtlMs: this.sessionTtlMs,
|
|
@@ -7445,7 +7554,8 @@ var ZaloAdsIntegrationManager = class {
|
|
|
7445
7554
|
integrationId: accountKey,
|
|
7446
7555
|
zpsid: params.zpsid,
|
|
7447
7556
|
zoawSek: params.zoawSek,
|
|
7448
|
-
extraCookies: params.extraCookies
|
|
7557
|
+
extraCookies: params.extraCookies,
|
|
7558
|
+
accountScope: params.accountScope
|
|
7449
7559
|
});
|
|
7450
7560
|
const sessions = await sdk.authenticateAll([
|
|
7451
7561
|
"ads.zalo.me",
|