@gravity-rail/sdk 0.45.0 → 0.47.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.
Files changed (33) hide show
  1. package/README.md +2 -0
  2. package/dist/{chat-interaction-CGNwztoc.d.cts → chat-interaction-Bqj3Vbst.d.cts} +35 -14
  3. package/dist/{chat-interaction-DRn2dJ2X.d.ts → chat-interaction-DiZVtDRE.d.ts} +35 -14
  4. package/dist/{chunk-STN3ZOEX.js → chunk-N4GQWNGU.js} +50 -1
  5. package/dist/chunk-N4GQWNGU.js.map +1 -0
  6. package/dist/helpers.d.cts +4 -4
  7. package/dist/helpers.d.ts +4 -4
  8. package/dist/index.cjs +50 -0
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +6 -6
  11. package/dist/index.d.ts +6 -6
  12. package/dist/index.js +3 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/internal.cjs +50 -0
  15. package/dist/internal.cjs.map +1 -1
  16. package/dist/internal.d.cts +5 -5
  17. package/dist/internal.d.ts +5 -5
  18. package/dist/internal.js +3 -1
  19. package/dist/internal.js.map +1 -1
  20. package/dist/{member-import-mE0BhGIw.d.ts → member-import-C2Xt_o5d.d.ts} +1 -1
  21. package/dist/{member-import-D6KvS3Zg.d.cts → member-import-D7U4kDIy.d.cts} +1 -1
  22. package/dist/{revision-state-CuBzCvtB.d.cts → revision-state-DaVz2528.d.ts} +10 -3
  23. package/dist/{revision-state-YMNaA2cN.d.ts → revision-state-ZC4qP3CS.d.cts} +10 -3
  24. package/dist/schemas.cjs +2 -0
  25. package/dist/schemas.cjs.map +1 -1
  26. package/dist/schemas.d.cts +17 -2
  27. package/dist/schemas.d.ts +17 -2
  28. package/dist/schemas.js +2 -0
  29. package/dist/schemas.js.map +1 -1
  30. package/dist/{tasks-DAPby6cw.d.cts → tasks-Ca6yfsj2.d.cts} +4 -0
  31. package/dist/{tasks-DAPby6cw.d.ts → tasks-Ca6yfsj2.d.ts} +4 -0
  32. package/package.json +1 -1
  33. package/dist/chunk-STN3ZOEX.js.map +0 -1
package/dist/internal.cjs CHANGED
@@ -140,6 +140,7 @@ __export(internal_exports, {
140
140
  JobPosition: () => JobPosition,
141
141
  JourneysApi: () => JourneysApi,
142
142
  MASKED_SECRET_SENTINEL: () => MASKED_SECRET_SENTINEL,
143
+ MAX_EMAIL_SEND_RECIPIENTS: () => MAX_EMAIL_SEND_RECIPIENTS,
143
144
  MEMBER_ENTITLEMENT_STATUSES: () => MEMBER_ENTITLEMENT_STATUSES,
144
145
  MEMBER_RELATIONSHIP_KINDS: () => MEMBER_RELATIONSHIP_KINDS,
145
146
  MEMBER_SUBSCRIPTION_STATUSES: () => MEMBER_SUBSCRIPTION_STATUSES,
@@ -634,6 +635,9 @@ var ToolkitState = /* @__PURE__ */ ((ToolkitState2) => {
634
635
  return ToolkitState2;
635
636
  })(ToolkitState || {});
636
637
 
638
+ // src/types/generated/event_rule_action_limits.ts
639
+ var MAX_EMAIL_SEND_RECIPIENTS = 20;
640
+
637
641
  // src/types/event-types.ts
638
642
  var EventRuleObjectType = /* @__PURE__ */ ((EventRuleObjectType2) => {
639
643
  EventRuleObjectType2["TASK"] = "task";
@@ -5902,6 +5906,45 @@ var DashboardsApi = class extends BaseApiClient {
5902
5906
 
5903
5907
  // src/api/data-types.ts
5904
5908
  var DataTypesApi = class extends BaseApiClient {
5909
+ /** Read an anonymous Form's visitor-writable schema without a Member session. */
5910
+ async getAnonymousFormSchema(wid, formUuid) {
5911
+ return this.fetchPublicAnonymousForm(
5912
+ `w/${encodeURIComponent(wid)}/anonymous-forms/${encodeURIComponent(formUuid)}`
5913
+ );
5914
+ }
5915
+ /** Submit visitor-provided values. No cookie or API credential is sent. */
5916
+ async submitAnonymousForm(wid, formUuid, input) {
5917
+ return this.fetchPublicAnonymousForm(
5918
+ `w/${encodeURIComponent(wid)}/anonymous-forms/${encodeURIComponent(formUuid)}/submissions`,
5919
+ { method: "POST", body: JSON.stringify(input) }
5920
+ );
5921
+ }
5922
+ async fetchPublicAnonymousForm(endpoint, options = {}) {
5923
+ const headers = new Headers(options.headers);
5924
+ if (options.body !== void 0) headers.set("Content-Type", "application/json");
5925
+ let response;
5926
+ try {
5927
+ response = await this.fetchFunction(`${this.baseUrl}/api/v2/${endpoint}`, {
5928
+ ...options,
5929
+ credentials: "omit",
5930
+ headers
5931
+ });
5932
+ } catch {
5933
+ throw new ApiError("Anonymous Form request failed", 0);
5934
+ }
5935
+ if (!response.ok) {
5936
+ let message = `Request failed with status ${response.status}`;
5937
+ try {
5938
+ const body = await response.json();
5939
+ if (typeof body.detail === "string" && body.detail.length > 0) {
5940
+ message = body.detail;
5941
+ }
5942
+ } catch {
5943
+ }
5944
+ throw new ApiError(message, response.status);
5945
+ }
5946
+ return await response.json();
5947
+ }
5905
5948
  /** Read the local Form's draft and optimistic publication counters. */
5906
5949
  async getDataTypeDraft(wid, id) {
5907
5950
  return this.fetch(`w/${wid}/data-types/${id}/schema-draft`);
@@ -14414,6 +14457,7 @@ var WORKSPACE_METHOD_NAMES = [
14414
14457
  "getAgents",
14415
14458
  "getAnonymousResolution",
14416
14459
  "getAnonymousFormSubmission",
14460
+ "getAnonymousFormSchema",
14417
14461
  "getAnonymousResolutions",
14418
14462
  "getApiKeys",
14419
14463
  "getArchiveBlockers",
@@ -14799,6 +14843,7 @@ var WORKSPACE_METHOD_NAMES = [
14799
14843
  "linkUnlinkedSalesforceMembersByIdentity",
14800
14844
  "listAbilities",
14801
14845
  "listAnonymousFormSubmissions",
14846
+ "submitAnonymousForm",
14802
14847
  "listAppConnections",
14803
14848
  "listAvailableAppConnections",
14804
14849
  "listInstallations",
@@ -15252,6 +15297,8 @@ function bindTrackedLinksMethods(target, trackedLinks) {
15252
15297
 
15253
15298
  // src/client/bindings/data-types.ts
15254
15299
  function bindDataTypesMethods(target, dataTypes) {
15300
+ target.getAnonymousFormSchema = dataTypes.getAnonymousFormSchema.bind(dataTypes);
15301
+ target.submitAnonymousForm = dataTypes.submitAnonymousForm.bind(dataTypes);
15255
15302
  target.getDataTypeDraft = dataTypes.getDataTypeDraft.bind(dataTypes);
15256
15303
  target.saveDataTypeDraft = dataTypes.saveDataTypeDraft.bind(dataTypes);
15257
15304
  target.publishDataTypeDraft = dataTypes.publishDataTypeDraft.bind(dataTypes);
@@ -16446,6 +16493,8 @@ var GravityRailClient = class {
16446
16493
  getCelContext;
16447
16494
  validateCelExpression;
16448
16495
  // Data Types API
16496
+ getAnonymousFormSchema;
16497
+ submitAnonymousForm;
16449
16498
  getDataTypes;
16450
16499
  getDataTypeDraft;
16451
16500
  saveDataTypeDraft;
@@ -17862,6 +17911,7 @@ var ChatInteractionController = class {
17862
17911
  JobPosition,
17863
17912
  JourneysApi,
17864
17913
  MASKED_SECRET_SENTINEL,
17914
+ MAX_EMAIL_SEND_RECIPIENTS,
17865
17915
  MEMBER_ENTITLEMENT_STATUSES,
17866
17916
  MEMBER_RELATIONSHIP_KINDS,
17867
17917
  MEMBER_SUBSCRIPTION_STATUSES,