@ahoo-wang/fetcher-wow 3.13.15 → 3.15.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"commandClient.d.ts","sourceRoot":"","sources":["../../src/command/commandClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAEL,WAAW,EACX,kBAAkB,EAKnB,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,qBACa,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAClD,YAAW,kBAAkB;aAED,WAAW,CAAC,EAAE,WAAW;gBAAzB,WAAW,CAAC,EAAE,WAAW,YAAA;IAErD;;;;;;;;;;;;;;;;;;;OAmBG;IAEH,IAAI,CACS,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,EAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC5C,OAAO,CAAC,aAAa,CAAC;IAIzB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IAKH,iBAAiB,CACJ,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,EAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC5C,OAAO,CAAC,wBAAwB,CAAC;CAGrC"}
1
+ {"version":3,"file":"commandClient.d.ts","sourceRoot":"","sources":["../../src/command/commandClient.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC9B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EACV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vD,SAAQ,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;CACvB"}
1
+ {"version":3,"file":"commandRequest.d.ts","sourceRoot":"","sources":["../../src/command/commandRequest.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc;CA8G5D;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACzE,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CACvD,SAAQ,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/command/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,oBA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,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa,EAAE,kBAAkB;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C"}
1
+ {"version":3,"file":"wowMetadata.d.ts","sourceRoot":"","sources":["../../src/configuration/wowMetadata.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa,EAAE,kBAAkB;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C"}
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@ahoo-wang/fetcher"),b=require("@ahoo-wang/fetcher-eventstream"),n=require("@ahoo-wang/fetcher-decorator");var ut=Object.defineProperty,It=Object.getOwnPropertyDescriptor,J=(t,e,r,i)=>{for(var E=i>1?void 0:i?It(e,r):e,c=t.length-1,A;c>=0;c--)(A=t[c])&&(E=(i?A(e,r,E):A(E))||E);return i&&E&&ut(e,r,E),E},U=(t,e)=>(r,i)=>e(r,i,t);exports.CommandClient=class{constructor(e){this.apiMetadata=e}send(e,r){throw n.autoGeneratedError(e,r)}sendAndWaitStream(e,r){throw n.autoGeneratedError(e,r)}};J([n.endpoint(),U(0,n.request()),U(1,n.attribute())],exports.CommandClient.prototype,"send",1);J([n.endpoint(void 0,void 0,{headers:{Accept:f.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:b.JsonEventStreamResultExtractor}),U(0,n.request()),U(1,n.attribute())],exports.CommandClient.prototype,"sendAndWaitStream",1);exports.CommandClient=J([n.api()],exports.CommandClient);const s=class s{};s.COMMAND_HEADERS_PREFIX="Command-",s.TENANT_ID=`${s.COMMAND_HEADERS_PREFIX}Tenant-Id`,s.OWNER_ID=`${s.COMMAND_HEADERS_PREFIX}Owner-Id`,s.SPACE_ID=`${s.COMMAND_HEADERS_PREFIX}Space-Id`,s.AGGREGATE_ID=`${s.COMMAND_HEADERS_PREFIX}Aggregate-Id`,s.AGGREGATE_VERSION=`${s.COMMAND_HEADERS_PREFIX}Aggregate-Version`,s.WAIT_PREFIX=`${s.COMMAND_HEADERS_PREFIX}Wait-`,s.WAIT_TIME_OUT=`${s.WAIT_PREFIX}Timeout`,s.WAIT_STAGE=`${s.WAIT_PREFIX}Stage`,s.WAIT_CONTEXT=`${s.WAIT_PREFIX}Context`,s.WAIT_PROCESSOR=`${s.WAIT_PREFIX}Processor`,s.WAIT_FUNCTION=`${s.WAIT_PREFIX}Function`,s.WAIT_TAIL_PREFIX=`${s.WAIT_PREFIX}Tail-`,s.WAIT_TAIL_STAGE=`${s.WAIT_TAIL_PREFIX}Stage`,s.WAIT_TAIL_CONTEXT=`${s.WAIT_TAIL_PREFIX}Context`,s.WAIT_TAIL_PROCESSOR=`${s.WAIT_TAIL_PREFIX}Processor`,s.WAIT_TAIL_FUNCTION=`${s.WAIT_TAIL_PREFIX}Function`,s.REQUEST_ID=`${s.COMMAND_HEADERS_PREFIX}Request-Id`,s.LOCAL_FIRST=`${s.COMMAND_HEADERS_PREFIX}Local-First`,s.COMMAND_AGGREGATE_CONTEXT=`${s.COMMAND_HEADERS_PREFIX}Aggregate-Context`,s.COMMAND_AGGREGATE_NAME=`${s.COMMAND_HEADERS_PREFIX}Aggregate-Name`,s.COMMAND_TYPE=`${s.COMMAND_HEADERS_PREFIX}Type`,s.COMMAND_HEADER_X_PREFIX=`${s.COMMAND_HEADERS_PREFIX}Header-`;let X=s;var z=(t=>(t.SENT="SENT",t.PROCESSED="PROCESSED",t.SNAPSHOT="SNAPSHOT",t.PROJECTED="PROJECTED",t.EVENT_HANDLED="EVENT_HANDLED",t.SAGA_HANDLED="SAGA_HANDLED",t))(z||{}),o=(t=>(t.AND="AND",t.OR="OR",t.NOR="NOR",t.ID="ID",t.IDS="IDS",t.AGGREGATE_ID="AGGREGATE_ID",t.AGGREGATE_IDS="AGGREGATE_IDS",t.TENANT_ID="TENANT_ID",t.OWNER_ID="OWNER_ID",t.SPACE_ID="SPACE_ID",t.DELETED="DELETED",t.ALL="ALL",t.EQ="EQ",t.NE="NE",t.GT="GT",t.LT="LT",t.GTE="GTE",t.LTE="LTE",t.CONTAINS="CONTAINS",t.IN="IN",t.NOT_IN="NOT_IN",t.BETWEEN="BETWEEN",t.ALL_IN="ALL_IN",t.STARTS_WITH="STARTS_WITH",t.ENDS_WITH="ENDS_WITH",t.ELEM_MATCH="ELEM_MATCH",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.TRUE="TRUE",t.FALSE="FALSE",t.EXISTS="EXISTS",t.TODAY="TODAY",t.BEFORE_TODAY="BEFORE_TODAY",t.TOMORROW="TOMORROW",t.THIS_WEEK="THIS_WEEK",t.NEXT_WEEK="NEXT_WEEK",t.LAST_WEEK="LAST_WEEK",t.THIS_MONTH="THIS_MONTH",t.LAST_MONTH="LAST_MONTH",t.RECENT_DAYS="RECENT_DAYS",t.EARLIER_DAYS="EARLIER_DAYS",t.MATCH="MATCH",t.RAW="RAW",t))(o||{});const St=new Set(["AND","OR","NOR"]),Nt=new Set(["NULL","NOT_NULL","TRUE","FALSE","EXISTS","TODAY","TOMORROW","THIS_WEEK","NEXT_WEEK","LAST_WEEK","THIS_MONTH","LAST_MONTH"]);function w(t){return!!t}const P=class P{};P.IGNORE_CASE_OPTION_KEY="ignoreCase",P.ZONE_ID_OPTION_KEY="zoneId",P.DATE_PATTERN_OPTION_KEY="datePattern";let Q=P;function $(t){if(!(typeof t>"u"))return{ignoreCase:t}}function O(t,e){if(typeof t>"u"&&typeof e>"u")return;const r={};return typeof t<"u"&&(r.datePattern=t),typeof e<"u"&&(r.zoneId=e),r}var Z=(t=>(t.ACTIVE="ACTIVE",t.DELETED="DELETED",t.ALL="ALL",t))(Z||{});function m(...t){if(t.length===0)return _();if(t.length===1)return w(t[0])?t[0]:_();const e=[];return t.forEach(r=>{r?.operator===o.ALL||!w(r)||(r.operator===o.AND&&r.children?e.push(...r.children):e.push(r))}),{operator:o.AND,children:e}}function Rt(...t){const e=t?.filter(r=>w(r));return e.length===0?_():{operator:o.OR,children:e}}function Ot(...t){return t.length===0?_():{operator:o.NOR,children:t}}function lt(t){return{operator:o.ID,value:t}}function Dt(t){return{operator:o.IDS,value:t}}function Y(t){return{operator:o.AGGREGATE_ID,value:t}}function H(t){return{operator:o.AGGREGATE_IDS,value:t}}function _t(t){return{operator:o.TENANT_ID,value:t}}function Lt(t){return{operator:o.OWNER_ID,value:t}}function ht(t){return{operator:o.SPACE_ID,value:t}}function k(t){return{operator:o.DELETED,value:t}}function Ct(){return k("ACTIVE")}function _(){return{operator:o.ALL}}function pt(t,e){return{field:t,operator:o.EQ,value:e}}function gt(t,e){return{field:t,operator:o.NE,value:e}}function tt(t,e){return{field:t,operator:o.GT,value:e}}function et(t,e){return{field:t,operator:o.LT,value:e}}function ft(t,e){return{field:t,operator:o.GTE,value:e}}function Gt(t,e){return{field:t,operator:o.LTE,value:e}}function yt(t,e,r){const i=$(r);return{field:t,operator:o.CONTAINS,value:e,options:i}}function Mt(t,...e){return{field:t,operator:o.IN,value:e}}function Pt(t,...e){return{field:t,operator:o.NOT_IN,value:e}}function Wt(t,e,r){return{field:t,operator:o.BETWEEN,value:[e,r]}}function dt(t,...e){return{field:t,operator:o.ALL_IN,value:e}}function vt(t,e,r){const i=$(r);return{field:t,operator:o.STARTS_WITH,value:e,options:i}}function Ut(t,e){return{field:t,operator:o.MATCH,value:e}}function wt(t,e,r){const i=$(r);return{field:t,operator:o.ENDS_WITH,value:e,options:i}}function bt(t,e){return{field:t,operator:o.ELEM_MATCH,children:[e]}}function $t(t){return{field:t,operator:o.NULL}}function Vt(t){return{field:t,operator:o.NOT_NULL}}function Bt(t){return{field:t,operator:o.TRUE}}function Xt(t){return{field:t,operator:o.FALSE}}function Qt(t,e=!0){return{field:t,operator:o.EXISTS,value:e}}function Yt(t,e,r){const i=O(e,r);return{field:t,operator:o.TODAY,options:i}}function Ht(t,e,r,i){const E=O(r,i);return{field:t,operator:o.BEFORE_TODAY,value:e,options:E}}function Ft(t,e,r){const i=O(e,r);return{field:t,operator:o.TOMORROW,options:i}}function xt(t,e,r){const i=O(e,r);return{field:t,operator:o.THIS_WEEK,options:i}}function qt(t,e,r){const i=O(e,r);return{field:t,operator:o.NEXT_WEEK,options:i}}function jt(t,e,r){const i=O(e,r);return{field:t,operator:o.LAST_WEEK,options:i}}function Kt(t,e,r){const i=O(e,r);return{field:t,operator:o.THIS_MONTH,options:i}}function Jt(t,e,r){const i=O(e,r);return{field:t,operator:o.LAST_MONTH,options:i}}function zt(t,e,r,i){const E=O(r,i);return{field:t,operator:o.RECENT_DAYS,value:e,options:E}}function Zt(t,e,r,i){const E=O(r,i);return{field:t,operator:o.EARLIER_DAYS,value:e,options:E}}function mt(t){return{operator:o.RAW,value:t}}const g={index:1,size:10};function kt({index:t=g.index,size:e=g.size}=g){return{index:t,size:e}}const rt={};function it(){return rt}function te({include:t,exclude:e}=it()){return{include:t,exclude:e}}function F({condition:t=_(),projection:e,sort:r}={}){return{condition:t,projection:e,sort:r}}function x({condition:t=_(),projection:e,sort:r,limit:i=g.size}={}){return{condition:t,projection:e,sort:r,limit:i}}function ee({condition:t=_(),projection:e,sort:r,pagination:i=g}={}){return{condition:t,projection:e,sort:r,pagination:i}}const nt={total:0,list:[]};function re({total:t,list:e=[]}=nt){return t===void 0&&(t=e.length),{total:t,list:e}}var W=(t=>(t.ASC="ASC",t.DESC="DESC",t))(W||{});function ie(t){return{field:t,direction:"ASC"}}function ne(t){return{field:t,direction:"DESC"}}const T=class T{};T.HEADER="header",T.COMMAND_OPERATOR=`${T.HEADER}.command_operator`,T.AGGREGATE_ID="aggregateId",T.TENANT_ID="tenantId",T.OWNER_ID="ownerId",T.SPACE_ID="spaceId",T.COMMAND_ID="commandId",T.REQUEST_ID="requestId",T.VERSION="version",T.BODY="body",T.BODY_ID=`${T.BODY}.id`,T.BODY_NAME=`${T.BODY}.name`,T.BODY_TYPE=`${T.BODY}.bodyType`,T.BODY_REVISION=`${T.BODY}.revision`,T.BODY_BODY=`${T.BODY}.body`,T.CREATE_TIME="createTime";let q=T;const l=class l{};l.EVENT_STREAM_RESOURCE_NAME="event",l.COUNT=`${l.EVENT_STREAM_RESOURCE_NAME}/count`,l.LIST=`${l.EVENT_STREAM_RESOURCE_NAME}/list`,l.PAGED=`${l.EVENT_STREAM_RESOURCE_NAME}/paged`;let p=l;var Ee=Object.defineProperty,se=Object.getOwnPropertyDescriptor,v=(t,e,r,i)=>{for(var E=i>1?void 0:i?se(e,r):e,c=t.length-1,A;c>=0;c--)(A=t[c])&&(E=(i?A(e,r,E):A(E))||E);return i&&E&&Ee(e,r,E),E},L=(t,e)=>(r,i)=>e(r,i,t);exports.EventStreamQueryClient=class{constructor(e){this.apiMetadata=e}count(e,r,i){throw n.autoGeneratedError(e,r,i)}list(e,r,i){throw n.autoGeneratedError(e,r,i)}listStream(e,r,i){throw n.autoGeneratedError(e,r,i)}paged(e,r,i){throw n.autoGeneratedError(e,r,i)}};v([n.post(p.COUNT),L(0,n.body()),L(1,n.attribute())],exports.EventStreamQueryClient.prototype,"count",1);v([n.post(p.LIST),L(0,n.body()),L(1,n.attribute())],exports.EventStreamQueryClient.prototype,"list",1);v([n.post(p.LIST,{headers:{Accept:f.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:b.JsonEventStreamResultExtractor}),L(0,n.body()),L(1,n.attribute())],exports.EventStreamQueryClient.prototype,"listStream",1);v([n.post(p.PAGED),L(0,n.body()),L(1,n.attribute())],exports.EventStreamQueryClient.prototype,"paged",1);exports.EventStreamQueryClient=v([n.api()],exports.EventStreamQueryClient);const S=class S{};S.VERSION="version",S.TENANT_ID="tenantId",S.OWNER_ID="ownerId",S.SPACE_ID="spaceId",S.EVENT_ID="eventId",S.FIRST_EVENT_TIME="firstEventTime",S.EVENT_TIME="eventTime",S.FIRST_OPERATOR="firstOperator",S.OPERATOR="operator",S.SNAPSHOT_TIME="snapshotTime",S.TAGS="tags",S.DELETED="deleted",S.STATE="state";let j=S;const I=class I{};I.SNAPSHOT_RESOURCE_NAME="snapshot",I.COUNT=`${I.SNAPSHOT_RESOURCE_NAME}/count`,I.LIST=`${I.SNAPSHOT_RESOURCE_NAME}/list`,I.LIST_STATE=`${I.LIST}/state`,I.PAGED=`${I.SNAPSHOT_RESOURCE_NAME}/paged`,I.PAGED_STATE=`${I.PAGED}/state`,I.SINGLE=`${I.SNAPSHOT_RESOURCE_NAME}/single`,I.SINGLE_STATE=`${I.SINGLE}/state`;let R=I;var oe=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,N=(t,e,r,i)=>{for(var E=i>1?void 0:i?Ae(e,r):e,c=t.length-1,A;c>=0;c--)(A=t[c])&&(E=(i?A(e,r,E):A(E))||E);return i&&E&&oe(e,r,E),E},u=(t,e)=>(r,i)=>e(r,i,t);exports.SnapshotQueryClient=class{constructor(e){this.apiMetadata=e}count(e,r,i){throw n.autoGeneratedError(e,r,i)}list(e,r,i){throw n.autoGeneratedError(e,r,i)}listStream(e,r,i){throw n.autoGeneratedError(e,r,i)}listState(e,r,i){throw n.autoGeneratedError(e,r,i)}listStateStream(e,r,i){throw n.autoGeneratedError(e,r,i)}paged(e,r,i){throw n.autoGeneratedError(e,r,i)}pagedState(e,r,i){throw n.autoGeneratedError(e,r,i)}single(e,r,i){throw n.autoGeneratedError(e,r,i)}singleState(e,r,i){throw n.autoGeneratedError(e,r,i)}getById(e,r,i){const E=F({condition:Y(e)});return this.single(E,r,i)}getStateById(e,r,i){const E=F({condition:Y(e)});return this.singleState(E,r,i)}getByIds(e,r,i){const E=x({condition:H(e),limit:e.length});return this.list(E,r,i)}getStateByIds(e,r,i){const E=x({condition:H(e),limit:e.length});return this.listState(E,r,i)}};N([n.post(R.COUNT),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"count",1);N([n.post(R.LIST),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"list",1);N([n.post(R.LIST,{headers:{Accept:f.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:b.JsonEventStreamResultExtractor}),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"listStream",1);N([n.post(R.LIST_STATE),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"listState",1);N([n.post(R.LIST_STATE,{headers:{Accept:f.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:b.JsonEventStreamResultExtractor}),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"listStateStream",1);N([n.post(R.PAGED),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"paged",1);N([n.post(R.PAGED_STATE),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"pagedState",1);N([n.post(R.SINGLE),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"single",1);N([n.post(R.SINGLE_STATE),u(0,n.body()),u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"singleState",1);N([u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"getById",1);N([u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"getStateById",1);N([u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"getByIds",1);N([u(1,n.attribute())],exports.SnapshotQueryClient.prototype,"getStateByIds",1);exports.SnapshotQueryClient=N([n.api()],exports.SnapshotQueryClient);var Te=Object.defineProperty,ae=Object.getOwnPropertyDescriptor,V=(t,e,r,i)=>{for(var E=i>1?void 0:i?ae(e,r):e,c=t.length-1,A;c>=0;c--)(A=t[c])&&(E=(i?A(e,r,E):A(E))||E);return i&&E&&Te(e,r,E),E},D=(t,e)=>(r,i)=>e(r,i,t);const h=class h{};h.LOAD="{id}/state",h.LOAD_VERSIONED=`${h.LOAD}/{version}`,h.LOAD_TIME_BASED=`${h.LOAD}/time/{createTime}`;let G=h;exports.LoadStateAggregateClient=class{constructor(e){this.apiMetadata=e}load(e,r,i){throw n.autoGeneratedError(e,r,i)}loadVersioned(e,r,i,E){throw n.autoGeneratedError(e,r,i,E)}loadTimeBased(e,r,i,E){throw n.autoGeneratedError(e,r,i,E)}};V([n.get(G.LOAD),D(0,n.path("id")),D(1,n.attribute())],exports.LoadStateAggregateClient.prototype,"load",1);V([n.get(G.LOAD_VERSIONED),D(0,n.path("id")),D(1,n.path("version")),D(2,n.attribute())],exports.LoadStateAggregateClient.prototype,"loadVersioned",1);V([n.get(G.LOAD_TIME_BASED),D(0,n.path("id")),D(1,n.path("createTime")),D(2,n.attribute())],exports.LoadStateAggregateClient.prototype,"loadTimeBased",1);exports.LoadStateAggregateClient=V([n.api()],exports.LoadStateAggregateClient);var ce=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,B=(t,e,r,i)=>{for(var E=i>1?void 0:i?ue(e,r):e,c=t.length-1,A;c>=0;c--)(A=t[c])&&(E=(i?A(e,r,E):A(E))||E);return i&&E&&ce(e,r,E),E},d=(t,e)=>(r,i)=>e(r,i,t);const C=class C{};C.LOAD="state",C.LOAD_VERSIONED=`${C.LOAD}/{version}`,C.LOAD_TIME_BASED=`${C.LOAD}/time/{createTime}`;let y=C;exports.LoadOwnerStateAggregateClient=class{constructor(e){this.apiMetadata=e}load(e,r){throw n.autoGeneratedError(e,r)}loadVersioned(e,r,i){throw n.autoGeneratedError(e,r,i)}loadTimeBased(e,r,i){throw n.autoGeneratedError(e,r,i)}};B([n.get(y.LOAD),d(0,n.attribute())],exports.LoadOwnerStateAggregateClient.prototype,"load",1);B([n.get(y.LOAD_VERSIONED),d(0,n.path("version")),d(1,n.attribute())],exports.LoadOwnerStateAggregateClient.prototype,"loadVersioned",1);B([n.get(y.LOAD_TIME_BASED),d(0,n.path("createTime")),d(1,n.attribute())],exports.LoadOwnerStateAggregateClient.prototype,"loadTimeBased",1);exports.LoadOwnerStateAggregateClient=B([n.api()],exports.LoadOwnerStateAggregateClient);const Et="~";function st({field:t,cursorId:e=Et,direction:r=W.DESC}){return r===W.ASC?tt(t,e):et(t,e)}function ot({field:t,direction:e=W.DESC}){return{field:t,direction:e}}function Ie(t){const e=t.query,r=m(st(t),e.condition),i=ot(t);return{...e,condition:r,sort:[i]}}function M(t){let e=f.combineURLs(t.resourceAttribution??"",t.aggregateName??"");return t.contextAlias&&(e=f.combineURLs(t.contextAlias,e)),{...t,basePath:e}}class Se{constructor(e){this.defaultOptions=e}createSnapshotQueryClient(e){const r=M({...this.defaultOptions,...e});return new exports.SnapshotQueryClient(r)}createLoadStateAggregateClient(e){const r=M({...this.defaultOptions,...e});return new exports.LoadStateAggregateClient(r)}createOwnerLoadStateAggregateClient(e){const r=M({...this.defaultOptions,...e});return new exports.LoadOwnerStateAggregateClient(r)}createEventStreamQueryClient(e){const r=M({...this.defaultOptions,...e});return new exports.EventStreamQueryClient(r)}}const Ne={},Re=["*"];var At=(t=>(t.NONE="",t.TENANT="/tenant/{tenantId}",t.OWNER="/owner/{ownerId}",t.TENANT_OWNER="/tenant/{tenantId}/owner/{ownerId}",t))(At||{}),Tt=(t=>(t.RECOVERABLE="RECOVERABLE",t.UNKNOWN="UNKNOWN",t.UNRECOVERABLE="UNRECOVERABLE",t))(Tt||{});const a=class a{static isSucceeded(e){return e===a.SUCCEEDED}static isError(e){return!a.isSucceeded(e)}};a.SUCCEEDED="Ok",a.SUCCEEDED_MESSAGE="",a.NOT_FOUND="NotFound",a.NOT_FOUND_MESSAGE="Not found resource!",a.BAD_REQUEST="BadRequest",a.ILLEGAL_ARGUMENT="IllegalArgument",a.ILLEGAL_STATE="IllegalState",a.REQUEST_TIMEOUT="RequestTimeout",a.TOO_MANY_REQUESTS="TooManyRequests",a.DUPLICATE_REQUEST_ID="DuplicateRequestId",a.COMMAND_VALIDATION="CommandValidation",a.REWRITE_NO_COMMAND="RewriteNoCommand",a.EVENT_VERSION_CONFLICT="EventVersionConflict",a.DUPLICATE_AGGREGATE_ID="DuplicateAggregateId",a.COMMAND_EXPECT_VERSION_CONFLICT="CommandExpectVersionConflict",a.SOURCING_VERSION_CONFLICT="SourcingVersionConflict",a.ILLEGAL_ACCESS_DELETED_AGGREGATE="IllegalAccessDeletedAggregate",a.ILLEGAL_ACCESS_OWNER_AGGREGATE="IllegalAccessOwnerAggregate",a.ILLEGAL_ACCESS_SPACE_AGGREGATE="IllegalAccessSpaceAggregate",a.INTERNAL_SERVER_ERROR="InternalServerError";let K=a;var at=(t=>(t.COMMAND="COMMAND",t.ERROR="ERROR",t.EVENT="EVENT",t.SOURCING="SOURCING",t.STATE_EVENT="STATE_EVENT",t))(at||{});const Oe="";var ct=(t=>(t.MAP="MAP",t.STRING="STRING",t))(ct||{});function le(t,e,r){if(t==null)return r;const i=Array.isArray(e)?e:e.split(".").filter(Boolean);if(i.length===0)return t;let E=t;for(const c of i){if(Array.isArray(E)){const A=parseInt(c,10);if(isNaN(A)||A<0||!Number.isInteger(A))return r;E=E[A]}else if(typeof E=="object")E=E[c];else return r;if(E==null)return r}return E}exports.CURSOR_ID_START=Et;exports.CommandHeaders=X;exports.CommandStage=z;exports.ConditionOptionKey=Q;exports.DEFAULT_OWNER_ID=Oe;exports.DEFAULT_PAGINATION=g;exports.DEFAULT_PROJECTION=rt;exports.DeletionState=Z;exports.DomainEventStreamMetadataFields=q;exports.EMPTY_ABAC_TAGS=Ne;exports.EMPTY_PAGED_LIST=nt;exports.EMPTY_VALUE_OPERATORS=Nt;exports.ErrorCodes=K;exports.EventStreamQueryEndpointPaths=p;exports.FunctionKind=at;exports.LOGICAL_OPERATORS=St;exports.LoadOwnerStateAggregateEndpointPaths=y;exports.LoadStateAggregateEndpointPaths=G;exports.MessageHeaderSqlType=ct;exports.Operator=o;exports.QueryClientFactory=Se;exports.RecoverableType=Tt;exports.ResourceAttributionPathSpec=At;exports.SnapshotMetadataFields=j;exports.SnapshotQueryEndpointPaths=R;exports.SortDirection=W;exports.WILDCARD_ABAC_TAG_VALUES=Re;exports.active=Ct;exports.aggregateId=Y;exports.aggregateIds=H;exports.all=_;exports.allIn=dt;exports.and=m;exports.asc=ie;exports.beforeToday=Ht;exports.between=Wt;exports.contains=yt;exports.createQueryApiMetadata=M;exports.cursorCondition=st;exports.cursorQuery=Ie;exports.cursorSort=ot;exports.dateOptions=O;exports.defaultProjection=it;exports.deleted=k;exports.desc=ne;exports.earlierDays=Zt;exports.elemMatch=bt;exports.endsWith=wt;exports.eq=pt;exports.exists=Qt;exports.getPropertyValue=le;exports.gt=tt;exports.gte=ft;exports.id=lt;exports.ids=Dt;exports.ignoreCaseOptions=$;exports.isFalse=Xt;exports.isIn=Mt;exports.isNull=$t;exports.isTrue=Bt;exports.isValidateCondition=w;exports.lastMonth=Jt;exports.lastWeek=jt;exports.listQuery=x;exports.lt=et;exports.lte=Gt;exports.match=Ut;exports.ne=gt;exports.nextWeek=qt;exports.nor=Ot;exports.notIn=Pt;exports.notNull=Vt;exports.or=Rt;exports.ownerId=Lt;exports.pagedList=re;exports.pagedQuery=ee;exports.pagination=kt;exports.projection=te;exports.raw=mt;exports.recentDays=zt;exports.singleQuery=F;exports.spaceId=ht;exports.startsWith=vt;exports.tenantId=_t;exports.thisMonth=Kt;exports.thisWeek=xt;exports.today=Yt;exports.tomorrow=Ft;
2
- //# sourceMappingURL=index.cjs.js.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@ahoo-wang/fetcher`),t=require(`@ahoo-wang/fetcher-eventstream`),n=require(`@ahoo-wang/fetcher-decorator`);function r(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}function i(e,t){return function(n,r){t(n,r,e)}}function a(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var o,s,c,ee,l=class{constructor(e){this.apiMetadata=e}send(e,t){throw(0,n.autoGeneratedError)(e,t)}sendAndWaitStream(e,t){throw(0,n.autoGeneratedError)(e,t)}};a([(0,n.endpoint)(),i(0,(0,n.request)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(s=typeof Record<`u`&&Record)==`function`?s:Object]),r(`design:returntype`,typeof(o=typeof Promise<`u`&&Promise)==`function`?o:Object)],l.prototype,`send`,null),a([(0,n.endpoint)(void 0,void 0,{headers:{Accept:e.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:t.JsonEventStreamResultExtractor}),i(0,(0,n.request)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(ee=typeof Record<`u`&&Record)==`function`?ee:Object]),r(`design:returntype`,typeof(c=typeof Promise<`u`&&Promise)==`function`?c:Object)],l.prototype,`sendAndWaitStream`,null),l=a([(0,n.api)(),r(`design:paramtypes`,[Object])],l);var te=class e{static{this.COMMAND_HEADERS_PREFIX=`Command-`}static{this.TENANT_ID=`${e.COMMAND_HEADERS_PREFIX}Tenant-Id`}static{this.OWNER_ID=`${e.COMMAND_HEADERS_PREFIX}Owner-Id`}static{this.SPACE_ID=`${e.COMMAND_HEADERS_PREFIX}Space-Id`}static{this.AGGREGATE_ID=`${e.COMMAND_HEADERS_PREFIX}Aggregate-Id`}static{this.AGGREGATE_VERSION=`${e.COMMAND_HEADERS_PREFIX}Aggregate-Version`}static{this.WAIT_PREFIX=`${e.COMMAND_HEADERS_PREFIX}Wait-`}static{this.WAIT_TIME_OUT=`${e.WAIT_PREFIX}Timeout`}static{this.WAIT_STAGE=`${e.WAIT_PREFIX}Stage`}static{this.WAIT_CONTEXT=`${e.WAIT_PREFIX}Context`}static{this.WAIT_PROCESSOR=`${e.WAIT_PREFIX}Processor`}static{this.WAIT_FUNCTION=`${e.WAIT_PREFIX}Function`}static{this.WAIT_TAIL_PREFIX=`${e.WAIT_PREFIX}Tail-`}static{this.WAIT_TAIL_STAGE=`${e.WAIT_TAIL_PREFIX}Stage`}static{this.WAIT_TAIL_CONTEXT=`${e.WAIT_TAIL_PREFIX}Context`}static{this.WAIT_TAIL_PROCESSOR=`${e.WAIT_TAIL_PREFIX}Processor`}static{this.WAIT_TAIL_FUNCTION=`${e.WAIT_TAIL_PREFIX}Function`}static{this.REQUEST_ID=`${e.COMMAND_HEADERS_PREFIX}Request-Id`}static{this.LOCAL_FIRST=`${e.COMMAND_HEADERS_PREFIX}Local-First`}static{this.COMMAND_AGGREGATE_CONTEXT=`${e.COMMAND_HEADERS_PREFIX}Aggregate-Context`}static{this.COMMAND_AGGREGATE_NAME=`${e.COMMAND_HEADERS_PREFIX}Aggregate-Name`}static{this.COMMAND_TYPE=`${e.COMMAND_HEADERS_PREFIX}Type`}static{this.COMMAND_HEADER_X_PREFIX=`${e.COMMAND_HEADERS_PREFIX}Header-`}},ne=function(e){return e.SENT=`SENT`,e.PROCESSED=`PROCESSED`,e.SNAPSHOT=`SNAPSHOT`,e.PROJECTED=`PROJECTED`,e.EVENT_HANDLED=`EVENT_HANDLED`,e.SAGA_HANDLED=`SAGA_HANDLED`,e}({}),u=function(e){return e.AND=`AND`,e.OR=`OR`,e.NOR=`NOR`,e.ID=`ID`,e.IDS=`IDS`,e.AGGREGATE_ID=`AGGREGATE_ID`,e.AGGREGATE_IDS=`AGGREGATE_IDS`,e.TENANT_ID=`TENANT_ID`,e.OWNER_ID=`OWNER_ID`,e.SPACE_ID=`SPACE_ID`,e.DELETED=`DELETED`,e.ALL=`ALL`,e.EQ=`EQ`,e.NE=`NE`,e.GT=`GT`,e.LT=`LT`,e.GTE=`GTE`,e.LTE=`LTE`,e.CONTAINS=`CONTAINS`,e.IN=`IN`,e.NOT_IN=`NOT_IN`,e.BETWEEN=`BETWEEN`,e.ALL_IN=`ALL_IN`,e.STARTS_WITH=`STARTS_WITH`,e.ENDS_WITH=`ENDS_WITH`,e.ELEM_MATCH=`ELEM_MATCH`,e.NULL=`NULL`,e.NOT_NULL=`NOT_NULL`,e.TRUE=`TRUE`,e.FALSE=`FALSE`,e.EXISTS=`EXISTS`,e.TODAY=`TODAY`,e.BEFORE_TODAY=`BEFORE_TODAY`,e.TOMORROW=`TOMORROW`,e.THIS_WEEK=`THIS_WEEK`,e.NEXT_WEEK=`NEXT_WEEK`,e.LAST_WEEK=`LAST_WEEK`,e.THIS_MONTH=`THIS_MONTH`,e.LAST_MONTH=`LAST_MONTH`,e.RECENT_DAYS=`RECENT_DAYS`,e.EARLIER_DAYS=`EARLIER_DAYS`,e.MATCH=`MATCH`,e.RAW=`RAW`,e}({}),re=new Set([u.AND,u.OR,u.NOR]),ie=new Set([u.NULL,u.NOT_NULL,u.TRUE,u.FALSE,u.EXISTS,u.TODAY,u.TOMORROW,u.THIS_WEEK,u.NEXT_WEEK,u.LAST_WEEK,u.THIS_MONTH,u.LAST_MONTH]);function d(e){return!!e}var ae=class{static{this.IGNORE_CASE_OPTION_KEY=`ignoreCase`}static{this.ZONE_ID_OPTION_KEY=`zoneId`}static{this.DATE_PATTERN_OPTION_KEY=`datePattern`}};function f(e){if(e!==void 0)return{ignoreCase:e}}function p(e,t){if(e===void 0&&t===void 0)return;let n={};return e!==void 0&&(n.datePattern=e),t!==void 0&&(n.zoneId=t),n}var m=function(e){return e.ACTIVE=`ACTIVE`,e.DELETED=`DELETED`,e.ALL=`ALL`,e}({});function h(...e){if(e.length===0)return v();if(e.length===1)return d(e[0])?e[0]:v();let t=[];return e.forEach(e=>{e?.operator===u.ALL||!d(e)||(e.operator===u.AND&&e.children?t.push(...e.children):t.push(e))}),{operator:u.AND,children:t}}function oe(...e){let t=e?.filter(e=>d(e));return t.length===0?v():{operator:u.OR,children:t}}function se(...e){return e.length===0?v():{operator:u.NOR,children:e}}function ce(e){return{operator:u.ID,value:e}}function le(e){return{operator:u.IDS,value:e}}function g(e){return{operator:u.AGGREGATE_ID,value:e}}function _(e){return{operator:u.AGGREGATE_IDS,value:e}}function ue(e){return{operator:u.TENANT_ID,value:e}}function de(e){return{operator:u.OWNER_ID,value:e}}function fe(e){return{operator:u.SPACE_ID,value:e}}function pe(e){return{operator:u.DELETED,value:e}}function me(){return pe(m.ACTIVE)}function v(){return{operator:u.ALL}}function he(e,t){return{field:e,operator:u.EQ,value:t}}function ge(e,t){return{field:e,operator:u.NE,value:t}}function y(e,t){return{field:e,operator:u.GT,value:t}}function b(e,t){return{field:e,operator:u.LT,value:t}}function _e(e,t){return{field:e,operator:u.GTE,value:t}}function ve(e,t){return{field:e,operator:u.LTE,value:t}}function ye(e,t,n){let r=f(n);return{field:e,operator:u.CONTAINS,value:t,options:r}}function be(e,...t){return{field:e,operator:u.IN,value:t}}function xe(e,...t){return{field:e,operator:u.NOT_IN,value:t}}function Se(e,t,n){return{field:e,operator:u.BETWEEN,value:[t,n]}}function Ce(e,...t){return{field:e,operator:u.ALL_IN,value:t}}function we(e,t,n){let r=f(n);return{field:e,operator:u.STARTS_WITH,value:t,options:r}}function Te(e,t){return{field:e,operator:u.MATCH,value:t}}function Ee(e,t,n){let r=f(n);return{field:e,operator:u.ENDS_WITH,value:t,options:r}}function De(e,t){return{field:e,operator:u.ELEM_MATCH,children:[t]}}function Oe(e){return{field:e,operator:u.NULL}}function ke(e){return{field:e,operator:u.NOT_NULL}}function Ae(e){return{field:e,operator:u.TRUE}}function je(e){return{field:e,operator:u.FALSE}}function Me(e,t=!0){return{field:e,operator:u.EXISTS,value:t}}function Ne(e,t,n){let r=p(t,n);return{field:e,operator:u.TODAY,options:r}}function Pe(e,t,n,r){let i=p(n,r);return{field:e,operator:u.BEFORE_TODAY,value:t,options:i}}function Fe(e,t,n){let r=p(t,n);return{field:e,operator:u.TOMORROW,options:r}}function Ie(e,t,n){let r=p(t,n);return{field:e,operator:u.THIS_WEEK,options:r}}function Le(e,t,n){let r=p(t,n);return{field:e,operator:u.NEXT_WEEK,options:r}}function Re(e,t,n){let r=p(t,n);return{field:e,operator:u.LAST_WEEK,options:r}}function ze(e,t,n){let r=p(t,n);return{field:e,operator:u.THIS_MONTH,options:r}}function Be(e,t,n){let r=p(t,n);return{field:e,operator:u.LAST_MONTH,options:r}}function Ve(e,t,n,r){let i=p(n,r);return{field:e,operator:u.RECENT_DAYS,value:t,options:i}}function He(e,t,n,r){let i=p(n,r);return{field:e,operator:u.EARLIER_DAYS,value:t,options:i}}function Ue(e){return{operator:u.RAW,value:e}}var x={index:1,size:10};function We({index:e=x.index,size:t=x.size}=x){return{index:e,size:t}}var S={};function C(){return S}function Ge({include:e,exclude:t}=C()){return{include:e,exclude:t}}function w({condition:e=v(),projection:t,sort:n}={}){return{condition:e,projection:t,sort:n}}function T({condition:e=v(),projection:t,sort:n,limit:r=x.size}={}){return{condition:e,projection:t,sort:n,limit:r}}function Ke({condition:e=v(),projection:t,sort:n,pagination:r=x}={}){return{condition:e,projection:t,sort:n,pagination:r}}var E={total:0,list:[]};function qe({total:e,list:t=[]}=E){return e===void 0&&(e=t.length),{total:e,list:t}}var D=function(e){return e.ASC=`ASC`,e.DESC=`DESC`,e}({});function Je(e){return{field:e,direction:D.ASC}}function Ye(e){return{field:e,direction:D.DESC}}var Xe=class e{static{this.HEADER=`header`}static{this.COMMAND_OPERATOR=`${e.HEADER}.command_operator`}static{this.AGGREGATE_ID=`aggregateId`}static{this.TENANT_ID=`tenantId`}static{this.OWNER_ID=`ownerId`}static{this.SPACE_ID=`spaceId`}static{this.COMMAND_ID=`commandId`}static{this.REQUEST_ID=`requestId`}static{this.VERSION=`version`}static{this.BODY=`body`}static{this.BODY_ID=`${e.BODY}.id`}static{this.BODY_NAME=`${e.BODY}.name`}static{this.BODY_TYPE=`${e.BODY}.bodyType`}static{this.BODY_REVISION=`${e.BODY}.revision`}static{this.BODY_BODY=`${e.BODY}.body`}static{this.CREATE_TIME=`createTime`}},O=class e{static{this.EVENT_STREAM_RESOURCE_NAME=`event`}static{this.COUNT=`${e.EVENT_STREAM_RESOURCE_NAME}/count`}static{this.LIST=`${e.EVENT_STREAM_RESOURCE_NAME}/list`}static{this.PAGED=`${e.EVENT_STREAM_RESOURCE_NAME}/paged`}},k,A,j,M,N,P,F,I,L,R,z,B,V=class{constructor(e){this.apiMetadata=e}count(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}list(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}listStream(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}paged(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}};a([(0,n.post)(O.COUNT),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(A=typeof Record<`u`&&Record)==`function`?A:Object,typeof(j=typeof AbortController<`u`&&AbortController)==`function`?j:Object]),r(`design:returntype`,typeof(k=typeof Promise<`u`&&Promise)==`function`?k:Object)],V.prototype,`count`,null),a([(0,n.post)(O.LIST),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(N=typeof Record<`u`&&Record)==`function`?N:Object,typeof(P=typeof AbortController<`u`&&AbortController)==`function`?P:Object]),r(`design:returntype`,typeof(M=typeof Promise<`u`&&Promise)==`function`?M:Object)],V.prototype,`list`,null),a([(0,n.post)(O.LIST,{headers:{Accept:e.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:t.JsonEventStreamResultExtractor}),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(I=typeof Record<`u`&&Record)==`function`?I:Object,typeof(L=typeof AbortController<`u`&&AbortController)==`function`?L:Object]),r(`design:returntype`,typeof(F=typeof Promise<`u`&&Promise)==`function`?F:Object)],V.prototype,`listStream`,null),a([(0,n.post)(O.PAGED),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(z=typeof Record<`u`&&Record)==`function`?z:Object,typeof(B=typeof AbortController<`u`&&AbortController)==`function`?B:Object]),r(`design:returntype`,typeof(R=typeof Promise<`u`&&Promise)==`function`?R:Object)],V.prototype,`paged`,null),V=a([(0,n.api)(),r(`design:paramtypes`,[Object])],V);var Ze=class{static{this.VERSION=`version`}static{this.TENANT_ID=`tenantId`}static{this.OWNER_ID=`ownerId`}static{this.SPACE_ID=`spaceId`}static{this.EVENT_ID=`eventId`}static{this.FIRST_EVENT_TIME=`firstEventTime`}static{this.EVENT_TIME=`eventTime`}static{this.FIRST_OPERATOR=`firstOperator`}static{this.OPERATOR=`operator`}static{this.SNAPSHOT_TIME=`snapshotTime`}static{this.TAGS=`tags`}static{this.DELETED=`deleted`}static{this.STATE=`state`}},H=class e{static{this.SNAPSHOT_RESOURCE_NAME=`snapshot`}static{this.COUNT=`${e.SNAPSHOT_RESOURCE_NAME}/count`}static{this.LIST=`${e.SNAPSHOT_RESOURCE_NAME}/list`}static{this.LIST_STATE=`${e.LIST}/state`}static{this.PAGED=`${e.SNAPSHOT_RESOURCE_NAME}/paged`}static{this.PAGED_STATE=`${e.PAGED}/state`}static{this.SINGLE=`${e.SNAPSHOT_RESOURCE_NAME}/single`}static{this.SINGLE_STATE=`${e.SINGLE}/state`}},U,W,G,K,q,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,J=class{constructor(e){this.apiMetadata=e}count(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}list(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}listStream(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}listState(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}listStateStream(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}paged(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}pagedState(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}single(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}singleState(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}getById(e,t,n){let r=w({condition:g(e)});return this.single(r,t,n)}getStateById(e,t,n){let r=w({condition:g(e)});return this.singleState(r,t,n)}getByIds(e,t,n){let r=T({condition:_(e),limit:e.length});return this.list(r,t,n)}getStateByIds(e,t,n){let r=T({condition:_(e),limit:e.length});return this.listState(r,t,n)}};a([(0,n.post)(H.COUNT),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(W=typeof Record<`u`&&Record)==`function`?W:Object,typeof(G=typeof AbortController<`u`&&AbortController)==`function`?G:Object]),r(`design:returntype`,typeof(U=typeof Promise<`u`&&Promise)==`function`?U:Object)],J.prototype,`count`,null),a([(0,n.post)(H.LIST),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(q=typeof Record<`u`&&Record)==`function`?q:Object,typeof(Qe=typeof AbortController<`u`&&AbortController)==`function`?Qe:Object]),r(`design:returntype`,typeof(K=typeof Promise<`u`&&Promise)==`function`?K:Object)],J.prototype,`list`,null),a([(0,n.post)(H.LIST,{headers:{Accept:e.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:t.JsonEventStreamResultExtractor}),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(et=typeof Record<`u`&&Record)==`function`?et:Object,typeof(tt=typeof AbortController<`u`&&AbortController)==`function`?tt:Object]),r(`design:returntype`,typeof($e=typeof Promise<`u`&&Promise)==`function`?$e:Object)],J.prototype,`listStream`,null),a([(0,n.post)(H.LIST_STATE),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(rt=typeof Record<`u`&&Record)==`function`?rt:Object,typeof(it=typeof AbortController<`u`&&AbortController)==`function`?it:Object]),r(`design:returntype`,typeof(nt=typeof Promise<`u`&&Promise)==`function`?nt:Object)],J.prototype,`listState`,null),a([(0,n.post)(H.LIST_STATE,{headers:{Accept:e.ContentTypeValues.TEXT_EVENT_STREAM},resultExtractor:t.JsonEventStreamResultExtractor}),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(ot=typeof Record<`u`&&Record)==`function`?ot:Object,typeof(st=typeof AbortController<`u`&&AbortController)==`function`?st:Object]),r(`design:returntype`,typeof(at=typeof Promise<`u`&&Promise)==`function`?at:Object)],J.prototype,`listStateStream`,null),a([(0,n.post)(H.PAGED),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(lt=typeof Record<`u`&&Record)==`function`?lt:Object,typeof(ut=typeof AbortController<`u`&&AbortController)==`function`?ut:Object]),r(`design:returntype`,typeof(ct=typeof Promise<`u`&&Promise)==`function`?ct:Object)],J.prototype,`paged`,null),a([(0,n.post)(H.PAGED_STATE),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(ft=typeof Record<`u`&&Record)==`function`?ft:Object,typeof(pt=typeof AbortController<`u`&&AbortController)==`function`?pt:Object]),r(`design:returntype`,typeof(dt=typeof Promise<`u`&&Promise)==`function`?dt:Object)],J.prototype,`pagedState`,null),a([(0,n.post)(H.SINGLE),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(ht=typeof Record<`u`&&Record)==`function`?ht:Object,typeof(gt=typeof AbortController<`u`&&AbortController)==`function`?gt:Object]),r(`design:returntype`,typeof(mt=typeof Promise<`u`&&Promise)==`function`?mt:Object)],J.prototype,`single`,null),a([(0,n.post)(H.SINGLE_STATE),i(0,(0,n.body)()),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Object,typeof(vt=typeof Record<`u`&&Record)==`function`?vt:Object,typeof(yt=typeof AbortController<`u`&&AbortController)==`function`?yt:Object]),r(`design:returntype`,typeof(_t=typeof Promise<`u`&&Promise)==`function`?_t:Object)],J.prototype,`singleState`,null),a([i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[String,typeof(xt=typeof Record<`u`&&Record)==`function`?xt:Object,typeof(St=typeof AbortController<`u`&&AbortController)==`function`?St:Object]),r(`design:returntype`,typeof(bt=typeof Promise<`u`&&Promise)==`function`?bt:Object)],J.prototype,`getById`,null),a([i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[String,typeof(wt=typeof Record<`u`&&Record)==`function`?wt:Object,typeof(Tt=typeof AbortController<`u`&&AbortController)==`function`?Tt:Object]),r(`design:returntype`,typeof(Ct=typeof Promise<`u`&&Promise)==`function`?Ct:Object)],J.prototype,`getStateById`,null),a([i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Array,typeof(Dt=typeof Record<`u`&&Record)==`function`?Dt:Object,typeof(Ot=typeof AbortController<`u`&&AbortController)==`function`?Ot:Object]),r(`design:returntype`,typeof(Et=typeof Promise<`u`&&Promise)==`function`?Et:Object)],J.prototype,`getByIds`,null),a([i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Array,typeof(At=typeof Record<`u`&&Record)==`function`?At:Object,typeof(jt=typeof AbortController<`u`&&AbortController)==`function`?jt:Object]),r(`design:returntype`,typeof(kt=typeof Promise<`u`&&Promise)==`function`?kt:Object)],J.prototype,`getStateByIds`,null),J=a([(0,n.api)(),r(`design:paramtypes`,[Object])],J);var Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Y=class e{static{this.LOAD=`{id}/state`}static{this.LOAD_VERSIONED=`${e.LOAD}/{version}`}static{this.LOAD_TIME_BASED=`${e.LOAD}/time/{createTime}`}},X=class{constructor(e){this.apiMetadata=e}load(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}loadVersioned(e,t,r,i){throw(0,n.autoGeneratedError)(e,t,r,i)}loadTimeBased(e,t,r,i){throw(0,n.autoGeneratedError)(e,t,r,i)}};a([(0,n.get)(Y.LOAD),i(0,(0,n.path)(`id`)),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[String,typeof(Nt=typeof Record<`u`&&Record)==`function`?Nt:Object,typeof(Pt=typeof AbortController<`u`&&AbortController)==`function`?Pt:Object]),r(`design:returntype`,typeof(Mt=typeof Promise<`u`&&Promise)==`function`?Mt:Object)],X.prototype,`load`,null),a([(0,n.get)(Y.LOAD_VERSIONED),i(0,(0,n.path)(`id`)),i(1,(0,n.path)(`version`)),i(2,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[String,Number,typeof(It=typeof Record<`u`&&Record)==`function`?It:Object,typeof(Lt=typeof AbortController<`u`&&AbortController)==`function`?Lt:Object]),r(`design:returntype`,typeof(Ft=typeof Promise<`u`&&Promise)==`function`?Ft:Object)],X.prototype,`loadVersioned`,null),a([(0,n.get)(Y.LOAD_TIME_BASED),i(0,(0,n.path)(`id`)),i(1,(0,n.path)(`createTime`)),i(2,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[String,Number,typeof(zt=typeof Record<`u`&&Record)==`function`?zt:Object,typeof(Bt=typeof AbortController<`u`&&AbortController)==`function`?Bt:Object]),r(`design:returntype`,typeof(Rt=typeof Promise<`u`&&Promise)==`function`?Rt:Object)],X.prototype,`loadTimeBased`,null),X=a([(0,n.api)(),r(`design:paramtypes`,[Object])],X);var Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Z=class e{static{this.LOAD=`state`}static{this.LOAD_VERSIONED=`${e.LOAD}/{version}`}static{this.LOAD_TIME_BASED=`${e.LOAD}/time/{createTime}`}},Q=class{constructor(e){this.apiMetadata=e}load(e,t){throw(0,n.autoGeneratedError)(e,t)}loadVersioned(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}loadTimeBased(e,t,r){throw(0,n.autoGeneratedError)(e,t,r)}};a([(0,n.get)(Z.LOAD),i(0,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[typeof(Ht=typeof Record<`u`&&Record)==`function`?Ht:Object,typeof(Ut=typeof AbortController<`u`&&AbortController)==`function`?Ut:Object]),r(`design:returntype`,typeof(Vt=typeof Promise<`u`&&Promise)==`function`?Vt:Object)],Q.prototype,`load`,null),a([(0,n.get)(Z.LOAD_VERSIONED),i(0,(0,n.path)(`version`)),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Number,typeof(Gt=typeof Record<`u`&&Record)==`function`?Gt:Object,typeof(Kt=typeof AbortController<`u`&&AbortController)==`function`?Kt:Object]),r(`design:returntype`,typeof(Wt=typeof Promise<`u`&&Promise)==`function`?Wt:Object)],Q.prototype,`loadVersioned`,null),a([(0,n.get)(Z.LOAD_TIME_BASED),i(0,(0,n.path)(`createTime`)),i(1,(0,n.attribute)()),r(`design:type`,Function),r(`design:paramtypes`,[Number,typeof(Jt=typeof Record<`u`&&Record)==`function`?Jt:Object,typeof(Yt=typeof AbortController<`u`&&AbortController)==`function`?Yt:Object]),r(`design:returntype`,typeof(qt=typeof Promise<`u`&&Promise)==`function`?qt:Object)],Q.prototype,`loadTimeBased`,null),Q=a([(0,n.api)(),r(`design:paramtypes`,[Object])],Q);var Xt=`~`;function Zt({field:e,cursorId:t=`~`,direction:n=D.DESC}){return n===D.ASC?y(e,t):b(e,t)}function Qt({field:e,direction:t=D.DESC}){return{field:e,direction:t}}function $t(e){let t=e.query,n=h(Zt(e),t.condition),r=Qt(e);return{...t,condition:n,sort:[r]}}function $(t){let n=(0,e.combineURLs)(t.resourceAttribution??``,t.aggregateName??``);return t.contextAlias&&(n=(0,e.combineURLs)(t.contextAlias,n)),{...t,basePath:n}}var en=class{constructor(e){this.defaultOptions=e}createSnapshotQueryClient(e){return new J($({...this.defaultOptions,...e}))}createLoadStateAggregateClient(e){return new X($({...this.defaultOptions,...e}))}createOwnerLoadStateAggregateClient(e){return new Q($({...this.defaultOptions,...e}))}createEventStreamQueryClient(e){return new V($({...this.defaultOptions,...e}))}},tn={},nn=[`*`],rn=function(e){return e.NONE=``,e.TENANT=`/tenant/{tenantId}`,e.OWNER=`/owner/{ownerId}`,e.TENANT_OWNER=`/tenant/{tenantId}/owner/{ownerId}`,e}({}),an=function(e){return e.RECOVERABLE=`RECOVERABLE`,e.UNKNOWN=`UNKNOWN`,e.UNRECOVERABLE=`UNRECOVERABLE`,e}({}),on=class e{static{this.SUCCEEDED=`Ok`}static{this.SUCCEEDED_MESSAGE=``}static{this.NOT_FOUND=`NotFound`}static{this.NOT_FOUND_MESSAGE=`Not found resource!`}static{this.BAD_REQUEST=`BadRequest`}static{this.ILLEGAL_ARGUMENT=`IllegalArgument`}static{this.ILLEGAL_STATE=`IllegalState`}static{this.REQUEST_TIMEOUT=`RequestTimeout`}static{this.TOO_MANY_REQUESTS=`TooManyRequests`}static{this.DUPLICATE_REQUEST_ID=`DuplicateRequestId`}static{this.COMMAND_VALIDATION=`CommandValidation`}static{this.REWRITE_NO_COMMAND=`RewriteNoCommand`}static{this.EVENT_VERSION_CONFLICT=`EventVersionConflict`}static{this.DUPLICATE_AGGREGATE_ID=`DuplicateAggregateId`}static{this.COMMAND_EXPECT_VERSION_CONFLICT=`CommandExpectVersionConflict`}static{this.SOURCING_VERSION_CONFLICT=`SourcingVersionConflict`}static{this.ILLEGAL_ACCESS_DELETED_AGGREGATE=`IllegalAccessDeletedAggregate`}static{this.ILLEGAL_ACCESS_OWNER_AGGREGATE=`IllegalAccessOwnerAggregate`}static{this.ILLEGAL_ACCESS_SPACE_AGGREGATE=`IllegalAccessSpaceAggregate`}static{this.INTERNAL_SERVER_ERROR=`InternalServerError`}static isSucceeded(t){return t===e.SUCCEEDED}static isError(t){return!e.isSucceeded(t)}},sn=function(e){return e.COMMAND=`COMMAND`,e.ERROR=`ERROR`,e.EVENT=`EVENT`,e.SOURCING=`SOURCING`,e.STATE_EVENT=`STATE_EVENT`,e}({}),cn=``,ln=function(e){return e.MAP=`MAP`,e.STRING=`STRING`,e}({});function un(e,t,n){if(e==null)return n;let r=Array.isArray(t)?t:t.split(`.`).filter(Boolean);if(r.length===0)return e;let i=e;for(let e of r){if(Array.isArray(i)){let t=parseInt(e,10);if(isNaN(t)||t<0||!Number.isInteger(t))return n;i=i[t]}else if(typeof i==`object`)i=i[e];else return n;if(i==null)return n}return i}exports.CURSOR_ID_START=Xt,Object.defineProperty(exports,`CommandClient`,{enumerable:!0,get:function(){return l}}),exports.CommandHeaders=te,exports.CommandStage=ne,exports.ConditionOptionKey=ae,exports.DEFAULT_OWNER_ID=cn,exports.DEFAULT_PAGINATION=x,exports.DEFAULT_PROJECTION=S,exports.DeletionState=m,exports.DomainEventStreamMetadataFields=Xe,exports.EMPTY_ABAC_TAGS=tn,exports.EMPTY_PAGED_LIST=E,exports.EMPTY_VALUE_OPERATORS=ie,exports.ErrorCodes=on,Object.defineProperty(exports,`EventStreamQueryClient`,{enumerable:!0,get:function(){return V}}),exports.EventStreamQueryEndpointPaths=O,exports.FunctionKind=sn,exports.LOGICAL_OPERATORS=re,Object.defineProperty(exports,`LoadOwnerStateAggregateClient`,{enumerable:!0,get:function(){return Q}}),exports.LoadOwnerStateAggregateEndpointPaths=Z,Object.defineProperty(exports,`LoadStateAggregateClient`,{enumerable:!0,get:function(){return X}}),exports.LoadStateAggregateEndpointPaths=Y,exports.MessageHeaderSqlType=ln,exports.Operator=u,exports.QueryClientFactory=en,exports.RecoverableType=an,exports.ResourceAttributionPathSpec=rn,exports.SnapshotMetadataFields=Ze,Object.defineProperty(exports,`SnapshotQueryClient`,{enumerable:!0,get:function(){return J}}),exports.SnapshotQueryEndpointPaths=H,exports.SortDirection=D,exports.WILDCARD_ABAC_TAG_VALUES=nn,exports.active=me,exports.aggregateId=g,exports.aggregateIds=_,exports.all=v,exports.allIn=Ce,exports.and=h,exports.asc=Je,exports.beforeToday=Pe,exports.between=Se,exports.contains=ye,exports.createQueryApiMetadata=$,exports.cursorCondition=Zt,exports.cursorQuery=$t,exports.cursorSort=Qt,exports.dateOptions=p,exports.defaultProjection=C,exports.deleted=pe,exports.desc=Ye,exports.earlierDays=He,exports.elemMatch=De,exports.endsWith=Ee,exports.eq=he,exports.exists=Me,exports.getPropertyValue=un,exports.gt=y,exports.gte=_e,exports.id=ce,exports.ids=le,exports.ignoreCaseOptions=f,exports.isFalse=je,exports.isIn=be,exports.isNull=Oe,exports.isTrue=Ae,exports.isValidateCondition=d,exports.lastMonth=Be,exports.lastWeek=Re,exports.listQuery=T,exports.lt=b,exports.lte=ve,exports.match=Te,exports.ne=ge,exports.nextWeek=Le,exports.nor=se,exports.notIn=xe,exports.notNull=ke,exports.or=oe,exports.ownerId=de,exports.pagedList=qe,exports.pagedQuery=Ke,exports.pagination=We,exports.projection=Ge,exports.raw=Ue,exports.recentDays=Ve,exports.singleQuery=w,exports.spaceId=fe,exports.startsWith=we,exports.tenantId=ue,exports.thisMonth=ze,exports.thisWeek=Ie,exports.today=Ne,exports.tomorrow=Fe;
2
+ //# sourceMappingURL=index.cjs.js.map