@spiffcommerce/core 40.3.11 → 40.3.13

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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./index-RxtoSp5Y.cjs");class E{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:d}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=d}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){const c=this.marshaller,d=n.getEventStreamMember(),b=n.getMemberSchema(d),y=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};y.write(n,o);const t=y.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of i)yield r}};return c.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,b,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??f},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){const c=this.marshaller,d=n.getEventStreamMember(),y=n.getMemberSchema(d).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",a=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,a);return delete l[d],{[f]:!0,...l}}else if(e in y){const l=y[e];if(l.isStructSchema()){const m={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?m[s]=a:g.isStringSchema()?m[s]=(this.serdeContext?.utf8Encoder??z.toUtf8)(a):g.isStructSchema()&&(m[s]=await this.deserializer.read(g,a));else if(v){const p=t[e].headers[s]?.value;p!=null&&(g.isNumericSchema()?p&&typeof p=="object"&&"bytes"in p?m[s]=BigInt(p.toString()):m[s]=Number(p):m[s]=p)}}if(u)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,n,o){const c=this.serializer;let d=i,b=null,y;const f=n.getSchema()[4].includes(i),h={};if(f){const t=n.getMemberSchema(i);if(t.isStructSchema()){for(const[e,a]of t.structIterator()){const{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)b=e;else if(l){const u=o[i][e];let s="binary";a.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":a.isTimestampSchema()?s="timestamp":a.isStringSchema()?s="string":a.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[i][e])}}if(b!==null){const e=t.getMemberSchema(b);e.isBlobSchema()?y="application/octet-stream":e.isStringSchema()&&(y="text/plain"),c.write(e,o[i][b])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[i];d=t,c.write(15,e)}const S=c.flush()??new Uint8Array;return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??z.fromUtf8)(S):S,eventType:d,explicitPayloadContentType:y,additionalHeaders:h}}}exports.EventStreamSerde=E;
2
- //# sourceMappingURL=index-Bmfg5pEn.cjs.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./index-CeKEdAZd.cjs");class E{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:d}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=d}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){const c=this.marshaller,d=n.getEventStreamMember(),b=n.getMemberSchema(d),y=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};y.write(n,o);const t=y.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of i)yield r}};return c.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,b,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??f},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){const c=this.marshaller,d=n.getEventStreamMember(),y=n.getMemberSchema(d).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",a=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,a);return delete l[d],{[f]:!0,...l}}else if(e in y){const l=y[e];if(l.isStructSchema()){const m={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?m[s]=a:g.isStringSchema()?m[s]=(this.serdeContext?.utf8Encoder??z.toUtf8)(a):g.isStructSchema()&&(m[s]=await this.deserializer.read(g,a));else if(v){const p=t[e].headers[s]?.value;p!=null&&(g.isNumericSchema()?p&&typeof p=="object"&&"bytes"in p?m[s]=BigInt(p.toString()):m[s]=Number(p):m[s]=p)}}if(u)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,n,o){const c=this.serializer;let d=i,b=null,y;const f=n.getSchema()[4].includes(i),h={};if(f){const t=n.getMemberSchema(i);if(t.isStructSchema()){for(const[e,a]of t.structIterator()){const{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)b=e;else if(l){const u=o[i][e];let s="binary";a.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":a.isTimestampSchema()?s="timestamp":a.isStringSchema()?s="string":a.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[i][e])}}if(b!==null){const e=t.getMemberSchema(b);e.isBlobSchema()?y="application/octet-stream":e.isStringSchema()&&(y="text/plain"),c.write(e,o[i][b])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[i];d=t,c.write(15,e)}const S=c.flush()??new Uint8Array;return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??z.fromUtf8)(S):S,eventType:d,explicitPayloadContentType:y,additionalHeaders:h}}}exports.EventStreamSerde=E;
2
+ //# sourceMappingURL=index-DX0s3w44.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-Bmfg5pEn.cjs","sources":["../../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"],"sourcesContent":["import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n"],"names":["EventStreamSerde","marshaller","serializer","deserializer","serdeContext","defaultContentType","eventStream","requestSchema","initialRequest","eventStreamMember","unionSchema","initialRequestMarker","eventStreamIterable","headers","body","page","event","unionMember","key","additionalHeaders","eventType","explicitPayloadContentType","response","responseSchema","initialResponseContainer","memberSchemas","initialResponseMarker","asyncIterable","dataObject","eventStreamSchema","out","hasBindings","name","member","eventHeader","eventPayload","toUtf8","value","asyncIterator","firstEvent","done","explicitPayloadMember","isKnownSchema","eventSchema","memberName","memberSchema","type","payloadSchema","messageSerialization","fromUtf8"],"mappings":"wHACO,MAAMA,CAAiB,CAC1B,WACA,WACA,aACA,aACA,mBACA,YAAY,CAAE,WAAAC,EAAY,WAAAC,EAAY,aAAAC,EAAc,aAAAC,EAAc,mBAAAC,GAAuB,CACrF,KAAK,WAAaJ,EAClB,KAAK,WAAaC,EAClB,KAAK,aAAeC,EACpB,KAAK,aAAeC,EACpB,KAAK,mBAAqBC,CAC9B,CACA,MAAM,qBAAqB,CAAE,YAAAC,EAAa,cAAAC,EAAe,eAAAC,CAAc,EAAK,CACxE,MAAMP,EAAa,KAAK,WAClBQ,EAAoBF,EAAc,qBAAoB,EACtDG,EAAcH,EAAc,gBAAgBE,CAAiB,EAC7DP,EAAa,KAAK,WAClBG,EAAqB,KAAK,mBAC1BM,EAAuB,OAAO,sBAAsB,EACpDC,EAAsB,CACxB,OAAQ,OAAO,aAAa,GAAI,CAC5B,GAAIJ,EAAgB,CAChB,MAAMK,EAAU,CACZ,cAAe,CAAE,KAAM,SAAU,MAAO,iBAAiB,EACzD,gBAAiB,CAAE,KAAM,SAAU,MAAO,OAAO,EACjD,gBAAiB,CAAE,KAAM,SAAU,MAAOR,CAAkB,CACpF,EACoBH,EAAW,MAAMK,EAAeC,CAAc,EAC9C,MAAMM,EAAOZ,EAAW,MAA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AAc,mBACnB1B,EAA6B,cAEjCnB,EAAW,MAAM6C,EAAe/B,EAAMC,CAAW,EAAEwB,CAAqB,CAAC,CAC7E,MAEIvC,EAAW,MAAMyC,EAAa3B,EAAMC,CAAW,CAAC,CAExD,SACS0B,EAAY,eACjBzC,EAAW,MAAMyC,EAAa,EAAE,MAGhC,OAAM,IAAI,MAAM,qFAAqF,CAE7G,KA9DoB,CAChB,KAAM,CAACG,EAAMT,CAAK,EAAIrB,EAAMC,CAAW,EACvCG,EAAY0B,EACZ5C,EAAW,MAAM,GAAImC,CAAK,CAC9B,CA2DA,MAAMW,EAAuB9C,EAAW,MAAK,GAAM,IAAI,WAIvD,MAAO,CACH,KAJS,OAAO8C,GAAyB,UACtC,KAAK,cAAc,aAAeC,EAAAA,UAAUD,CAAoB,EACjEA,EAGF,UAAA5B,EACA,2BAAAC,EACA,kBAAAF,CACZ,CACI,CACJ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-DX0s3w44.cjs","sources":["../../../node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"],"sourcesContent":["import { fromUtf8, toUtf8 } from \"@smithy/util-utf8\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n const body = event[unionMember].body;\n if (unionMember === \"initial-response\") {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n if (hasBindings) {\n return {\n [unionMember]: out,\n };\n }\n if (body.byteLength === 0) {\n return {\n [unionMember]: {},\n };\n }\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const [key, value] of Object.entries(firstEvent.value)) {\n initialResponseContainer[key] = value;\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n"],"names":["EventStreamSerde","marshaller","serializer","deserializer","serdeContext","defaultContentType","eventStream","requestSchema","initialRequest","eventStreamMember","unionSchema","initialRequestMarker","eventStreamIterable","headers","body","page","event","unionMember","key","additionalHeaders","eventType","explicitPayloadContentType","response","responseSchema","initialResponseContainer","memberSchemas","initialResponseMarker","asyncIterable","dataObject","eventStreamSchema","out","hasBindings","name","member","eventHeader","eventPayload","toUtf8","value","asyncIterator","firstEvent","done","explicitPayloadMember","isKnownSchema","eventSchema","memberName","memberSchema","type","payloadSchema","messageSerialization","fromUtf8"],"mappings":"wHACO,MAAMA,CA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AAAA,UAAUD,CAAoB,EACjEA,EAGF,UAAA5B,EACA,2BAAAC,EACA,kBAAAF,CACZ,CACI,CACJ","x_google_ignoreList":[0]}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-RxtoSp5Y.cjs");exports.AddonHandle=e.AddonHandle;exports.AddressValidationJobStatus=e.AddressValidationJobStatus;exports.AddressValidationResultConfirmationLevel=e.AddressValidationResultConfirmationLevel;exports.AddressValidationStatus=e.AddressValidationStatus;exports.ArrayInput=e.ArrayInput;exports.AspectType=e.AspectType;exports.AssetNotFoundError=e.AssetNotFoundError;exports.AssetType=e.AssetType;exports.BringForwardCommand=e.BringForwardCommand;exports.BringToBackCommand=e.BringToBackCommand;exports.BringToFrontCommand=e.BringToFrontCommand;exports.BundleDesignCreationCartAddMode=e.BundleDesignCreationCartAddMode;exports.CanvasCommand=e.CanvasCommand;exports.CollectionProduct=e.CollectionProduct;exports.ColorOptionGlobalPropertyHandle=e.ColorOptionGlobalPropertyHandle;exports.CommandContext=e.CommandContext;exports.ConversionDataType=e.ConversionDataType;exports.CreateElementCommand=e.CreateElementCommand;exports.CreateLayoutCommand=e.CreateLayoutCommand;exports.CurrencyContext=e.CurrencyContext;exports.CurrencyService=e.CurrencyService;exports.DeleteElementCommand=e.DeleteElementCommand;exports.DigitalContentStepHandle=e.DigitalContentStepHandle;exports.FileUploadGlobalPropertyHandle=e.FileUploadGlobalPropertyHandle;exports.FlowExecutionNodeResult=e.FlowExecutionNodeResult;exports.FlowExecutionResult=e.FlowExecutionResult;exports.FlowService=e.FlowService;exports.FontAlignmentCommand=e.FontAlignmentCommand;exports.FontColorCommand=e.FontColorCommand;exports.FontSizeCommand=e.FontSizeCommand;exports.FontSourceCommand=e.FontSourceCommand;exports.FrameService=e.FrameService;exports.FrameStep=e.FrameStep;exports.FrameStepHandle=e.FrameStepHandle;exports.GlobalPropertyHandle=e.GlobalPropertyHandle;exports.GroupCommand=e.GroupCommand;exports.IllustrationStepHandle=e.IllustrationStepHandle;exports.InformationMessageType=e.InformationMessageType;exports.InformationStepHandle=e.InformationStepHandle;exports.IntegrationProduct=e.IntegrationProduct;exports.IntegrationType=e.IntegrationType;exports.LayoutElementFactory=e.LayoutElementFactory;exports.LayoutElementType=e.LayoutElementType;exports.LayoutNotFoundError=e.LayoutNotFoundError;exports.LayoutRenderingPurpose=e.LayoutRenderingPurpose;exports.MaterialStepHandle=e.MaterialStepHandle;exports.MisconfigurationError=e.MisconfigurationError;exports.MockWorkflowManager=e.MockWorkflowManager;exports.ModelStepHandle=e.ModelStepHandle;exports.ModuleStepHandle=e.ModuleStepHandle;exports.MoveCommand=e.MoveCommand;exports.ObjectInput=e.ObjectInput;exports.ObjectInputType=e.ObjectInputType;exports.OptionGlobalPropertyHandle=e.OptionGlobalPropertyHandle;exports.OptionNotFoundError=e.OptionNotFoundError;exports.ParseError=e.ParseError;exports.PictureStepHandle=e.PictureStepHandle;exports.ProductCameraRig=e.ProductCameraRig;exports.ProductCollection=e.ProductCollection;exports.ProductCollectionProductSortKey=e.ProductCollectionProductSortKey;exports.ProductWorkflow=e.ProductWorkflow;exports.PromiseCache=e.promiseCache;exports.PromiseQueue=e.PromiseQueue;exports.QuestionStepHandle=e.QuestionStepHandle;exports.QueueablePromise=e.QueueablePromise;exports.ResizeCommand=e.ResizeCommand;exports.ResourceNotFoundError=e.ResourceNotFoundError;exports.RotateCommand=e.RotateCommand;exports.ScaleAxis=e.ScaleAxis;exports.SendBackwardsCommand=e.SendBackwardsCommand;exports.ShapeStepHandle=e.ShapeStepHandle;exports.ShareActionType=e.ShareActionType;exports.SpiffCommerceClient=e.SpiffCommerceClient;exports.StakeholderType=e.StakeholderType;exports.StepAspectType=e.StepAspectType;exports.StepHandle=e.StepHandle;exports.StepType=e.StepType;exports.TextAlgorithm=e.TextAlgorithm;exports.TextChangeCommand=e.TextChangeCommand;exports.TextGlobalPropertyHandle=e.TextGlobalPropertyHandle;exports.TextInput=e.TextInput;exports.TextStepHandle=e.TextStepHandle;exports.UnhandledBehaviorError=e.UnhandledBehaviorError;exports.UnitOfMeasurement=e.UnitOfMeasurement;exports.UpdateImageSourceCommand=e.UpdateImageSourceCommand;exports.Variant=e.Variant;exports.WorkflowExperienceEventType=e.WorkflowExperienceEventType;exports.WorkflowExperienceImpl=e.WorkflowExperienceImpl;exports.amtChannelsForAspect=e.amtChannelsForAspect;exports.assetService=e.assetService;exports.browserColorToHex=e.browserColorToHex;exports.cmPerPixel=e.cmPerPixel;exports.currentDirection=e.currentDirection;exports.dataUrlFromExternalUrl=e.dataUrlFromExternalUrl;exports.deleteBundle=e.deleteBundle;exports.designService=e.designService;exports.determineCorrectFontSizeAndLines=e.determineCorrectFontSizeAndLines;exports.digitalContentStepService=e.digitalContentStepService;exports.domParser=e.domParser;exports.duplicateBundle=e.duplicateBundle;exports.duplicateTransaction=e.duplicateTransaction;exports.fetchAsString=e.fetchAsString;exports.findAngle=e.findAngle;exports.findElement=e.findElement;exports.findPmsColors=e.findPmsColors;exports.frameDataCache=e.frameDataCache;exports.frameStepService=e.frameStepService;exports.generate=e.generate;exports.generateCommands=e.generateCommands;exports.generateSVGWithUnknownColors=e.generateSVGWithUnknownColors;exports.generateStateFromDesignInputSteps=e.generateStateFromDesignInputSteps;exports.getAddressValidationJobs=e.getAddressValidationJobs;exports.getAttributesFromArrayBuffer=e.getAttributesFromArrayBuffer;exports.getAxisAlignedBoundingBox=e.getAxisAlignedBoundingBox;exports.getBoundedOffsets=e.getBoundedOffsets;exports.getBundleIdForTransaction=e.getBundleIdForTransaction;exports.getBundleThemeConfiguration=e.getBundleThemeConfiguration;exports.getCustomer=e.getCustomer;exports.getCustomerBundles=e.getCustomerBundles;exports.getElementVertices=e.getElementVertices;exports.getFrameData=e.getFrameData;exports.getGlobalPropertyStateForBundle=e.getGlobalPropertyStateForBundle;exports.getIntegration=e.getIntegration;exports.getIntegrationProducts=e.getIntegrationProducts;exports.getNEPoint=e.getNEPoint;exports.getNWPoint=e.getNWPoint;exports.getOrderedTransactions=e.getOrderedTransactions;exports.getOverrideThemeConfiguration=e.getOverrideThemeConfiguration;exports.getPointOfRotation=e.getPointOfRotation;exports.getProductCollections=e.getProductCollections;exports.getSEPoint=e.getSEPoint;exports.getSvgElement=e.getSvgElement;exports.getTemplateBundles=e.getTemplateBundles;exports.getTemplateTransactions=e.getTemplateTransactions;exports.getTransaction=e.getTransaction;exports.getTransactionThemeConfiguration=e.getTransactionThemeConfiguration;exports.getTransactionsForBundle=e.getTransactionsForBundle;exports.getTransformedAssetURL=e.getTransformedAssetURL;exports.getTrueCoordinates=e.getTrueCoordinates;exports.getUnorderedTransactions=e.getUnorderedTransactions;exports.getValidationJobsForWorkflowExperiences=e.getValidationJobsForWorkflowExperiences;exports.getWorkflow=e.getWorkflow;exports.getWorkflows=e.getWorkflows;exports.graphQlManager=e.graphQlManager;exports.illustrationStepService=e.illustrationStepService;exports.isCloseToValue=e.isCloseToValue;exports.loadFont=e.loadFont;exports.matchHexToPms=e.matchHexToPms;exports.materialStepService=e.materialStepService;exports.metafieldManager=e.metafieldManager;exports.mmPerPixel=e.mmPerPixel;exports.modelStepService=e.modelStepService;exports.modifySVGColors=e.modifySVGColors;exports.moduleStepService=e.moduleStepService;exports.nameBundle=e.nameBundle;exports.nameTransaction=e.nameTransaction;exports.optionService=e.optionService;exports.outlineFontsInSvg=e.outlineFontsInSvg;exports.overrideWorkflowExperienceRecipientAddress=e.overrideWorkflowExperienceRecipientAddress;exports.patternImageDataCache=e.patternImageDataCache;exports.persistenceService=e.persistenceService;exports.pictureStepService=e.pictureStepService;exports.pmsToRgb=e.pmsToRgb;exports.questionStepService=e.questionStepService;exports.registerFetchImplementation=e.registerFetchImplementation;exports.registerWindowImplementation=e.registerWindowImplementation;exports.rehydrateSerializedLayout=e.rehydrateSerializedLayout;exports.rgbToPms=e.rgbToPms;exports.rotateAroundPoint=e.rotateAroundPoint;exports.sanitizeSvgTree=e.sanitizeSvgTree;exports.setBearerAuthenticationToken=e.setBearerAuthenticationToken;exports.setCanvasModule=e.setCanvasModule;exports.shapeStepService=e.shapeStepService;exports.shortenUrl=e.shortenUrl;exports.spiffCoreConfiguration=e.spiffCoreConfiguration;exports.stepAspectValuesToDesignInputSteps=e.stepAspectValuesToDesignInputSteps;exports.svgColorValueToDefinition=e.svgColorValueToDefinition;exports.svgStringDimensions=e.svgStringDimensions;exports.svgToDataUrl=e.svgToDataUrl;exports.textStepService=e.textStepService;exports.toast=e.toast;exports.validateWorkflowExperienceRecipient=e.validateWorkflowExperienceRecipient;exports.validateWorkflowExperienceRecipients=e.validateWorkflowExperienceRecipients;exports.xmlSerializer=e.xmlSerializer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CeKEdAZd.cjs");exports.AddonHandle=e.AddonHandle;exports.AddressValidationJobStatus=e.AddressValidationJobStatus;exports.AddressValidationResultConfirmationLevel=e.AddressValidationResultConfirmationLevel;exports.AddressValidationStatus=e.AddressValidationStatus;exports.ArrayInput=e.ArrayInput;exports.AspectType=e.AspectType;exports.AssetNotFoundError=e.AssetNotFoundError;exports.AssetType=e.AssetType;exports.BringForwardCommand=e.BringForwardCommand;exports.BringToBackCommand=e.BringToBackCommand;exports.BringToFrontCommand=e.BringToFrontCommand;exports.BundleDesignCreationCartAddMode=e.BundleDesignCreationCartAddMode;exports.CanvasCommand=e.CanvasCommand;exports.CollectionProduct=e.CollectionProduct;exports.ColorOptionGlobalPropertyHandle=e.ColorOptionGlobalPropertyHandle;exports.CommandContext=e.CommandContext;exports.ConversionDataType=e.ConversionDataType;exports.CreateElementCommand=e.CreateElementCommand;exports.CreateLayoutCommand=e.CreateLayoutCommand;exports.CurrencyContext=e.CurrencyContext;exports.CurrencyService=e.CurrencyService;exports.DeleteElementCommand=e.DeleteElementCommand;exports.DigitalContentStepHandle=e.DigitalContentStepHandle;exports.FileUploadGlobalPropertyHandle=e.FileUploadGlobalPropertyHandle;exports.FlowExecutionNodeResult=e.FlowExecutionNodeResult;exports.FlowExecutionResult=e.FlowExecutionResult;exports.FlowService=e.FlowService;exports.FontAlignmentCommand=e.FontAlignmentCommand;exports.FontColorCommand=e.FontColorCommand;exports.FontSizeCommand=e.FontSizeCommand;exports.FontSourceCommand=e.FontSourceCommand;exports.FrameService=e.FrameService;exports.FrameStep=e.FrameStep;exports.FrameStepHandle=e.FrameStepHandle;exports.GlobalPropertyHandle=e.GlobalPropertyHandle;exports.GroupCommand=e.GroupCommand;exports.IllustrationStepHandle=e.IllustrationStepHandle;exports.InformationMessageType=e.InformationMessageType;exports.InformationStepHandle=e.InformationStepHandle;exports.IntegrationProduct=e.IntegrationProduct;exports.IntegrationType=e.IntegrationType;exports.LayoutElementFactory=e.LayoutElementFactory;exports.LayoutElementType=e.LayoutElementType;exports.LayoutNotFoundError=e.LayoutNotFoundError;exports.LayoutRenderingPurpose=e.LayoutRenderingPurpose;exports.MaterialStepHandle=e.MaterialStepHandle;exports.MisconfigurationError=e.MisconfigurationError;exports.MockWorkflowManager=e.MockWorkflowManager;exports.ModelStepHandle=e.ModelStepHandle;exports.ModuleStepHandle=e.ModuleStepHandle;exports.MoveCommand=e.MoveCommand;exports.ObjectInput=e.ObjectInput;exports.ObjectInputType=e.ObjectInputType;exports.OptionGlobalPropertyHandle=e.OptionGlobalPropertyHandle;exports.OptionNotFoundError=e.OptionNotFoundError;exports.ParseError=e.ParseError;exports.PictureStepHandle=e.PictureStepHandle;exports.ProductCameraRig=e.ProductCameraRig;exports.ProductCollection=e.ProductCollection;exports.ProductCollectionProductSortKey=e.ProductCollectionProductSortKey;exports.ProductWorkflow=e.ProductWorkflow;exports.PromiseCache=e.promiseCache;exports.PromiseQueue=e.PromiseQueue;exports.QuestionStepHandle=e.QuestionStepHandle;exports.QueueablePromise=e.QueueablePromise;exports.ResizeCommand=e.ResizeCommand;exports.ResourceNotFoundError=e.ResourceNotFoundError;exports.RotateCommand=e.RotateCommand;exports.ScaleAxis=e.ScaleAxis;exports.SendBackwardsCommand=e.SendBackwardsCommand;exports.ShapeStepHandle=e.ShapeStepHandle;exports.ShareActionType=e.ShareActionType;exports.SpiffCommerceClient=e.SpiffCommerceClient;exports.StakeholderType=e.StakeholderType;exports.StepAspectType=e.StepAspectType;exports.StepHandle=e.StepHandle;exports.StepType=e.StepType;exports.TextAlgorithm=e.TextAlgorithm;exports.TextChangeCommand=e.TextChangeCommand;exports.TextGlobalPropertyHandle=e.TextGlobalPropertyHandle;exports.TextInput=e.TextInput;exports.TextStepHandle=e.TextStepHandle;exports.UnhandledBehaviorError=e.UnhandledBehaviorError;exports.UnitOfMeasurement=e.UnitOfMeasurement;exports.UpdateImageSourceCommand=e.UpdateImageSourceCommand;exports.Variant=e.Variant;exports.WorkflowExperienceEventType=e.WorkflowExperienceEventType;exports.WorkflowExperienceImpl=e.WorkflowExperienceImpl;exports.amtChannelsForAspect=e.amtChannelsForAspect;exports.assetService=e.assetService;exports.browserColorToHex=e.browserColorToHex;exports.cmPerPixel=e.cmPerPixel;exports.currentDirection=e.currentDirection;exports.dataUrlFromExternalUrl=e.dataUrlFromExternalUrl;exports.deleteBundle=e.deleteBundle;exports.designService=e.designService;exports.determineCorrectFontSizeAndLines=e.determineCorrectFontSizeAndLines;exports.digitalContentStepService=e.digitalContentStepService;exports.domParser=e.domParser;exports.duplicateBundle=e.duplicateBundle;exports.duplicateTransaction=e.duplicateTransaction;exports.fetchAsString=e.fetchAsString;exports.findAngle=e.findAngle;exports.findElement=e.findElement;exports.findPmsColors=e.findPmsColors;exports.frameDataCache=e.frameDataCache;exports.frameStepService=e.frameStepService;exports.generate=e.generate;exports.generateCommands=e.generateCommands;exports.generateSVGWithUnknownColors=e.generateSVGWithUnknownColors;exports.generateStateFromDesignInputSteps=e.generateStateFromDesignInputSteps;exports.getAddressValidationJobs=e.getAddressValidationJobs;exports.getAttributesFromArrayBuffer=e.getAttributesFromArrayBuffer;exports.getAxisAlignedBoundingBox=e.getAxisAlignedBoundingBox;exports.getBoundedOffsets=e.getBoundedOffsets;exports.getBundleIdForTransaction=e.getBundleIdForTransaction;exports.getBundleThemeConfiguration=e.getBundleThemeConfiguration;exports.getCustomer=e.getCustomer;exports.getCustomerBundles=e.getCustomerBundles;exports.getElementVertices=e.getElementVertices;exports.getFrameData=e.getFrameData;exports.getGlobalPropertyStateForBundle=e.getGlobalPropertyStateForBundle;exports.getIntegration=e.getIntegration;exports.getIntegrationProducts=e.getIntegrationProducts;exports.getNEPoint=e.getNEPoint;exports.getNWPoint=e.getNWPoint;exports.getOrderedTransactions=e.getOrderedTransactions;exports.getOverrideThemeConfiguration=e.getOverrideThemeConfiguration;exports.getPointOfRotation=e.getPointOfRotation;exports.getProductCollections=e.getProductCollections;exports.getSEPoint=e.getSEPoint;exports.getSvgElement=e.getSvgElement;exports.getTemplateBundles=e.getTemplateBundles;exports.getTemplateTransactions=e.getTemplateTransactions;exports.getTransaction=e.getTransaction;exports.getTransactionThemeConfiguration=e.getTransactionThemeConfiguration;exports.getTransactionsForBundle=e.getTransactionsForBundle;exports.getTransformedAssetURL=e.getTransformedAssetURL;exports.getTrueCoordinates=e.getTrueCoordinates;exports.getUnorderedTransactions=e.getUnorderedTransactions;exports.getValidationJobsForWorkflowExperiences=e.getValidationJobsForWorkflowExperiences;exports.getWorkflow=e.getWorkflow;exports.getWorkflows=e.getWorkflows;exports.graphQlManager=e.graphQlManager;exports.illustrationStepService=e.illustrationStepService;exports.isCloseToValue=e.isCloseToValue;exports.loadFont=e.loadFont;exports.matchHexToPms=e.matchHexToPms;exports.materialStepService=e.materialStepService;exports.metafieldManager=e.metafieldManager;exports.mmPerPixel=e.mmPerPixel;exports.modelStepService=e.modelStepService;exports.modifySVGColors=e.modifySVGColors;exports.moduleStepService=e.moduleStepService;exports.nameBundle=e.nameBundle;exports.nameTransaction=e.nameTransaction;exports.optionService=e.optionService;exports.outlineFontsInSvg=e.outlineFontsInSvg;exports.overrideWorkflowExperienceRecipientAddress=e.overrideWorkflowExperienceRecipientAddress;exports.patternImageDataCache=e.patternImageDataCache;exports.persistenceService=e.persistenceService;exports.pictureStepService=e.pictureStepService;exports.pmsToRgb=e.pmsToRgb;exports.questionStepService=e.questionStepService;exports.registerFetchImplementation=e.registerFetchImplementation;exports.registerWindowImplementation=e.registerWindowImplementation;exports.rehydrateSerializedLayout=e.rehydrateSerializedLayout;exports.rgbToPms=e.rgbToPms;exports.rotateAroundPoint=e.rotateAroundPoint;exports.sanitizeSvgTree=e.sanitizeSvgTree;exports.setBearerAuthenticationToken=e.setBearerAuthenticationToken;exports.setCanvasModule=e.setCanvasModule;exports.shapeStepService=e.shapeStepService;exports.shortenUrl=e.shortenUrl;exports.spiffCoreConfiguration=e.spiffCoreConfiguration;exports.stepAspectValuesToDesignInputSteps=e.stepAspectValuesToDesignInputSteps;exports.svgColorValueToDefinition=e.svgColorValueToDefinition;exports.svgStringDimensions=e.svgStringDimensions;exports.svgToDataUrl=e.svgToDataUrl;exports.textStepService=e.textStepService;exports.toast=e.toast;exports.validateWorkflowExperienceRecipient=e.validateWorkflowExperienceRecipient;exports.validateWorkflowExperienceRecipients=e.validateWorkflowExperienceRecipients;exports.xmlSerializer=e.xmlSerializer;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, a as t, b as o, c as n, d as r, e as i, g as l, h as d, B as m, i as c, j as p, k as u, C as g, l as b, m as S, n as C, o as T, p as f, q as v, r as P, s as y, D as F, u as A, F as x, v as E, w as h, x as B, y as H, z as I, E as w, G as k, H as R, I as D, J as M, K as W, L as V, M as U, N as O, O as G, P as L, Q as N, R as z, S as Q, T as J, U as j, V as q, W as K, X, Y, Z, _, $, a0 as aa, a1 as ea, a2 as sa, a3 as ta, a4 as oa, a5 as na, a6 as ra, a7 as ia, a8 as la, a9 as da, aa as ma, ab as ca, ac as pa, ad as ua, ae as ga, af as ba, ag as Sa, ah as Ca, ai as Ta, aj as fa, ak as va, al as Pa, am as ya, an as Fa, ao as Aa, ap as xa, aq as Ea, ar as ha, as as Ba, at as Ha, au as Ia, av as wa, aw as ka, ax as Ra, ay as Da, az as Ma, aA as Wa, aB as Va, aC as Ua, aD as Oa, aE as Ga, aF as La, aG as Na, aH as za, aI as Qa, aJ as Ja, aK as ja, aL as qa, aM as Ka, aN as Xa, aO as Ya, aP as Za, aQ as _a, aR as $a, aS as ae, aT as ee, aU as se, aV as te, aW as oe, aX as ne, aY as re, aZ as ie, a_ as le, a$ as de, b0 as me, b1 as ce, b2 as pe, b3 as ue, b4 as ge, b5 as be, b6 as Se, b7 as Ce, b8 as Te, b9 as fe, ba as ve, bb as Pe, bc as ye, bd as Fe, be as Ae, bf as xe, bg as Ee, bh as he, bi as Be, bj as He, bk as Ie, bl as we, bm as ke, bn as Re, bo as De, bp as Me, bq as We, br as Ve, bs as Ue, bt as Oe, bu as Ge, bv as Le, bw as Ne, bx as ze, by as Qe, bz as Je, bA as je, bB as qe, bC as Ke, bD as Xe, bE as Ye, bF as Ze, bG as _e, bH as $e, bI as as, bJ as es, bK as ss, bL as ts, bM as os, bN as ns, bO as rs, bP as is, bQ as ls, bR as ds, bS as ms, bT as cs, bU as ps, bV as us, bW as gs, bX as bs, bY as Ss, bZ as Cs, b_ as Ts, b$ as fs, c0 as vs, c1 as Ps, c2 as ys, c3 as Fs } from "./index-DAsc4Ftt.js";
1
+ import { A as s, a as t, b as o, c as n, d as r, e as i, g as l, h as d, B as m, i as c, j as p, k as u, C as g, l as b, m as S, n as C, o as T, p as f, q as v, r as P, s as y, D as F, u as A, F as x, v as E, w as h, x as B, y as H, z as I, E as w, G as k, H as R, I as D, J as M, K as W, L as V, M as U, N as O, O as G, P as L, Q as N, R as z, S as Q, T as J, U as j, V as q, W as K, X, Y, Z, _, $, a0 as aa, a1 as ea, a2 as sa, a3 as ta, a4 as oa, a5 as na, a6 as ra, a7 as ia, a8 as la, a9 as da, aa as ma, ab as ca, ac as pa, ad as ua, ae as ga, af as ba, ag as Sa, ah as Ca, ai as Ta, aj as fa, ak as va, al as Pa, am as ya, an as Fa, ao as Aa, ap as xa, aq as Ea, ar as ha, as as Ba, at as Ha, au as Ia, av as wa, aw as ka, ax as Ra, ay as Da, az as Ma, aA as Wa, aB as Va, aC as Ua, aD as Oa, aE as Ga, aF as La, aG as Na, aH as za, aI as Qa, aJ as Ja, aK as ja, aL as qa, aM as Ka, aN as Xa, aO as Ya, aP as Za, aQ as _a, aR as $a, aS as ae, aT as ee, aU as se, aV as te, aW as oe, aX as ne, aY as re, aZ as ie, a_ as le, a$ as de, b0 as me, b1 as ce, b2 as pe, b3 as ue, b4 as ge, b5 as be, b6 as Se, b7 as Ce, b8 as Te, b9 as fe, ba as ve, bb as Pe, bc as ye, bd as Fe, be as Ae, bf as xe, bg as Ee, bh as he, bi as Be, bj as He, bk as Ie, bl as we, bm as ke, bn as Re, bo as De, bp as Me, bq as We, br as Ve, bs as Ue, bt as Oe, bu as Ge, bv as Le, bw as Ne, bx as ze, by as Qe, bz as Je, bA as je, bB as qe, bC as Ke, bD as Xe, bE as Ye, bF as Ze, bG as _e, bH as $e, bI as as, bJ as es, bK as ss, bL as ts, bM as os, bN as ns, bO as rs, bP as is, bQ as ls, bR as ds, bS as ms, bT as cs, bU as ps, bV as us, bW as gs, bX as bs, bY as Ss, bZ as Cs, b_ as Ts, b$ as fs, c0 as vs, c1 as Ps, c2 as ys, c3 as Fs } from "./index-3u8XmLUI.js";
2
2
  export {
3
3
  s as AddonHandle,
4
4
  t as AddressValidationJobStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "40.3.11",
3
+ "version": "40.3.13",
4
4
  "description": "Core client API for interacting with the Spiff Commerce backend.",
5
5
  "source": "src/index.ts",
6
6
  "main": "./dist/index.cjs",