1"use strict";(this.webpackChunkbigossp_platform=this.webpackChunkbigossp_platform||[]).push([[6300],{69399:function(n,e,t){t.d(e,{Z:function(){return d}});var a=t(74165),i=(t(89629),t(30940)),r=t(15861),c=t(20347),o=t(2060),l=t(27131),s=t(53312),u=t(95879);function d(){var n=(0,c.I0)();function e(){return(e=(0,r.Z)((0,a.Z)().mark((function e(){var t,r,c,d;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=!1,e.next=4,(0,s.e)();case 4:null!==(c=e.sent)&&void 0!==c&&null!==(t=c.list)&&void 0!==t&&t[0]&&(d=new Date(c.list[0].validTime).getTime(),r=(0,u.x)(d).willExpired),n((0,l.A2)({infoId:o.cD.GUIDE_SDK_REPORTING_API,show:r})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),(0,o.wl)(window.location.pathname)||(null===e.t0||void 0===e.t0?void 0:e.t0.message)&&i.ZP.error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}return{run:function(){return e.apply(this,arguments)}}}},95879:function(n,e,t){t.d(e,{x:function(){return a}});function a(n){var e=(n-Date.now())/1e3,t=~~(e/86400),a=~~(e/3600),i=~~(e/60);return{showDayGap:t>0,showHourGap:a>0,showMinuteGap:i>0,isExpired:e<60,willExpired:e<=1209600,dayGap:t,hourGap:a,minuteGap:i}}},12613:function(n,e,t){t.r(e),t.d(e,{default:function(){return V}});var a,i=t(92437),r=t(91399),c=t(2919),o=(t(87101),t(64011)),l=(t(96083),t(32433)),s=(t(79621),t(65270)),u=t(1413),d=(t(89629),t(30940)),p=t(29439),v=t(10355),h=t(87976),m=t(53312),f=t(96592),x=t(96245);!function(n){n[n.REPORTING_API=1]="REPORTING_API",n[n.INVENTORY_API=2]="INVENTORY_API"}(a||(a={}));var g=[{value:a.REPORTING_API,label:"BIGO Ads Reporting API"},{value:a.INVENTORY_API,label:"BIGO Ads Inventory Management API"}],j=g.map((function(n){return n.value})),N=(0,x.In)(g),y=(t(13423),t(4811)),w=t(81516),I=t(91499),k=t(62967),Z=t.n(k),P=t(32628),_=t(20347),b=t(95879),T=t(13115);function A(n){var e=n.validTime,t=(0,f.$)().t,a=(0,i.useMemo)((function(){return(0,b.x)(e)}),[e]),r=a.isExpired,c=a.willExpired,o=a.showDayGap,l=a.showHourGap,s=a.showMinuteGap,u=a.dayGap,d=a.hourGap,p=a.minuteGap,v="";return r?(v=t("lang780"),(0,T.jsx)("span",{className:"warning",children:v})):c?(o?v=t("lang781",{count:u}):l?v=t("lang786",{count:d}):s&&(v=t("lang787",{count:p})),(0,T.jsx)("span",{className:"warning",children:v})):(0,T.jsxs)("div",{className:"validate-date",children:["".concat(t("lang782")," "),Z()(e).utcOffset(8).format("YYYY-MM-DD HH:mm:ss")," (UTC+8)"]})}var E=function(n){var e=n.tokenInfo,t=n.refresh,a=(0,f.$)().t,r=(0,_.v9)(P.Je),c=i.useState(!1),o=(0,p.Z)(c,2),s=o[0],u=o[1];return(0,T.jsxs)("div",{className:"token-viewer",children:[(0,T.jsxs)("div",{className:"header",children:[(0,T.jsx)("div",{className:"title",children:a("lang775")}),!r&&(0,T.jsx)("div",{className:"reset-btn",children:(0,T.jsx)(y.Z,{placement:"topRight",title:a("lang778"),onConfirm:function(){return function(n){u(!0);var e=d.ZP.loading("".concat(a("lang777"),"..."));(0,m.k)({id:n}).then((function(){d.ZP.success(a("lang788")),null===t||void 0===t||t()})).catch((function(n){(null===n||void 0===n?void 0:n.message)&&d.ZP.error(n.message)})).finally((function(){u(!1),e()}))}(e.id)},okText:a("lang779"),cancelText:a("lang014"),okButtonProps:{loading:s},children:(0,T.jsxs)(l.Z,{type:"link",children:[a("lang777")," ",(0,T.jsx)(w.Z,{})]})})})]}),(0,T.jsxs)("div",{className:"content",children:[(0,T.jsx)("div",{className:"token",children:e.token}),(0,T.jsx)(A,{validTime:e.validTime})]}),(0,T.jsx)("div",{className:"copy-btn",children:(0,T.jsx)(l.Z,{type:"primary",onClick:function(){(0,I.v)(e.token).then((function(){d.ZP.success(a("lang783"))})).catch((function(n){d.ZP.error(a("lang784"))}))},children:a("lang785")})})]})},R=t(69399);var G=(0,r.EN)((function(n){var e=n.match,t=(0,f.$)().t,a=(0,R.Z)().run,r=(0,i.useCallback)((function(n){h.m.push("".concat(e.path,"/doc?type=").concat(n))}),[e]),c=(0,i.useState)([]),x=(0,p.Z)(c,2),g=x[0],y=x[1],w=(0,i.useCallback)((function(){var n=d.ZP.loading(t("lang766"));(0,m.e)().then((function(n){var e,t,a=null===n||void 0===n||null===(e=n.list)||void 0===e||null===(t=e.filter((function(n){return j.includes(n.t
1ype)})))||void 0===t?void 0:t.map((function(n){return(0,u.Z)((0,u.Z)({},n),{},{validTime:new Date(n.validTime).getTime()})}));y(a||[])})).catch((function(n){(null===n||void 0===n?void 0:n.message)&&d.ZP.error(n.message)})).finally((function(){n()}))}),[t]),I=function(){w(),a()};return(0,i.useEffect)((function(){I()}),[]),(0,T.jsx)(v.Z,{className:"guide-sdk-reporting-api",children:g.map((function(n,e){return(0,T.jsxs)("div",{className:"card-wrapper",children:[(0,T.jsx)("div",{className:"title",children:N[n.type]}),(0,T.jsxs)("div",{className:"content",children:[(0,T.jsxs)("div",{className:"row info",children:[(0,T.jsxs)("div",{children:[(0,T.jsxs)("span",{className:"name",children:[t("lang773"),":"]}),(0,T.jsx)("span",{children:n.version})]}),(0,T.jsxs)("div",{children:[(0,T.jsxs)("span",{className:"name",children:[t("lang774"),":"]}),(0,T.jsx)("span",{children:n.versionOnlineTime})]})]}),(0,T.jsxs)("div",{className:"row",children:[(0,T.jsx)("div",{children:(0,T.jsx)(o.Z,{overlayClassName:"reporting-api-token-viewer",placement:"bottomLeft",content:(0,T.jsx)(E,{tokenInfo:n,refresh:I}),trigger:"click",children:(0,T.jsxs)(l.Z,{type:"link",className:"operate-btn",children:[t("lang775")," ",(0,b.x)(n.validTime).willExpired?(0,T.jsx)(s.Z,{status:"error"}):null]})})}),(0,T.jsx)("div",{children:(0,T.jsx)(l.Z,{type:"link",className:"operate-btn",onClick:function(){return r(n.type)},children:t("lang776")})})]})]})]},"".concat(e,"-").concat(n.id,"-").concat(n.type,"-").concat(n.version))}))})})),C=t(74165),O=t(15861),D=(t(76995),t(18078)),Y=t(29425),M=t(69780),S=t(42631);function z(n){var e=n.type,t=void 0===e?a.REPORTING_API:e,i=(0,f.$)().t,r=[{path:"/guide",title:i("lang679")},{path:"/guide/sdk/reportingApi",title:"API"},{path:"/guide/sdk/reportingApi/doc?type=".concat(t),title:N[t]||i("lang682")}];return(0,T.jsx)("div",{className:"header-layout",children:(0,T.jsx)(D.Z,{children:r.map((function(n){return(0,T.jsx)(D.Z.Item,{href:n.path,children:n.title},n.path)}))})})}var H=function(n){var e=(0,i.useState)((function(){return(0,Y.R8)([{field:"type",type:"number",enumList:j,fallback:a.REPORTING_API}])})),t=(0,p.Z)(e,1)[0].type,r=void 0===t?a.REPORTING_API:t,c=(0,i.useCallback)((0,O.Z)((0,C.Z)().mark((function n(){var e,t;return(0,C.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=[{type:a.REPORTING_API,zh:(0,S.N)("/backend/developer_reporting_api_zh.md"),en:(0,S.N)("/backend/developer_reporting_api_en.md")},{type:a.INVENTORY_API,zh:(0,S.N)("/backend/inventory_management_api_zh.md"),en:(0,S.N)("/backend/inventory_management_api_en.md")}],n.abrupt("return",null!==(e=null===t||void 0===t?void 0:t.find((function(n){return n.type===r})))&&void 0!==e?e:t[0]);case 2:case"end":return n.stop()}}),n)}))),[r]);return(0,T.jsx)(v.Z,{headerRender:(0,T.jsx)(z,{type:r}),children:(0,T.jsx)(M.Z,{showAnchor:!0,fetchConfig:c})})};var V=(0,r.EN)((function(n){var e=n.match;return(0,T.jsxs)(r.rs,{children:[(0,T.jsx)(r.AW,{exact:!0,path:"".concat(e.path,"/doc"),component:H}),(0,T.jsx)(r.AW,{exact:!0,path:"".concat(e.path),component:G}),(0,T.jsx)(r.AW,{path:"*",component:c.nD})]})}))},53312:function(n,e,t){t.d(e,{e:function(){return r},k:function(){return c}});var a=t(98439),i=t(12187);function r(){return(0,a.A_)(i.WJ,void 0,{notAllowCancel:!0})}function c(n){return(0,a.j0)(i.J8,n)}},91499:function(n,e,t){function a(n){var e;return null!==(e=navigator.clipboard)&&void 0!==e&&e.writeText?navigator.clipboard.writeText(n):new Promise((function(e,t){var a=document.createElement("textarea");a.style.position="absolute",a.style.left="-9999px",a.value=n,document.body.appendChild(a),a.focus(),a.select();try{var i,r;null!==(i=(r=document).execCommand)&&void 0!==i&&i.call(r,"copy")?e():t(new Error("copy fail"))}catch(c){t(c)}document.body.removeChild(a)}))}function i(){var n;return!(null===(n=window.getSelection())||void 0===n||!n.toString())}t.d(e,{C:function(){return i},v:function(){return a}})}}]); 2//# sourceMappingURL=6300.b44d9986.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.