@wix/auto_sdk_editor-branches_branches 1.0.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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  11. package/build/cjs/src/editor-branches-v1-branch-branches.context.js +27 -0
  12. package/build/cjs/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  13. package/build/cjs/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  14. package/build/cjs/src/editor-branches-v1-branch-branches.http.js +210 -0
  15. package/build/cjs/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  16. package/build/cjs/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  17. package/build/cjs/src/editor-branches-v1-branch-branches.meta.js +123 -0
  18. package/build/cjs/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  19. package/build/cjs/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  20. package/build/cjs/src/editor-branches-v1-branch-branches.public.js +76 -0
  21. package/build/cjs/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  22. package/build/cjs/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  23. package/build/cjs/src/editor-branches-v1-branch-branches.types.js +46 -0
  24. package/build/cjs/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  25. package/build/cjs/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  26. package/build/cjs/src/editor-branches-v1-branch-branches.universal.js +272 -0
  27. package/build/cjs/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  39. package/build/es/src/editor-branches-v1-branch-branches.context.js +19 -0
  40. package/build/es/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  41. package/build/es/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  42. package/build/es/src/editor-branches-v1-branch-branches.http.js +202 -0
  43. package/build/es/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  44. package/build/es/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  45. package/build/es/src/editor-branches-v1-branch-branches.meta.js +92 -0
  46. package/build/es/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  47. package/build/es/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  48. package/build/es/src/editor-branches-v1-branch-branches.public.js +63 -0
  49. package/build/es/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  50. package/build/es/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  51. package/build/es/src/editor-branches-v1-branch-branches.types.js +43 -0
  52. package/build/es/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  53. package/build/es/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  54. package/build/es/src/editor-branches-v1-branch-branches.universal.js +241 -0
  55. package/build/es/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  66. package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js +27 -0
  67. package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  68. package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  69. package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js +210 -0
  70. package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  71. package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  72. package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js +123 -0
  73. package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  74. package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  75. package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js +76 -0
  76. package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  77. package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  78. package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.js +46 -0
  79. package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  80. package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  81. package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.js +272 -0
  82. package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  93. package/build/internal/es/src/editor-branches-v1-branch-branches.context.js +19 -0
  94. package/build/internal/es/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  95. package/build/internal/es/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  96. package/build/internal/es/src/editor-branches-v1-branch-branches.http.js +202 -0
  97. package/build/internal/es/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  98. package/build/internal/es/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  99. package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js +92 -0
  100. package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  101. package/build/internal/es/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  102. package/build/internal/es/src/editor-branches-v1-branch-branches.public.js +63 -0
  103. package/build/internal/es/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  104. package/build/internal/es/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  105. package/build/internal/es/src/editor-branches-v1-branch-branches.types.js +43 -0
  106. package/build/internal/es/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  107. package/build/internal/es/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  108. package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js +241 -0
  109. package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.queryBranches = exports.deleteBranch = exports.updateBranch = exports.getBranch = exports.createBranch = void 0;
27
+ const ambassadorWixEditorBranchesV1Branch = __importStar(require("./editor-branches-v1-branch-branches.http.js"));
28
+ function createBranch() {
29
+ const payload = {};
30
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.createBranch(payload);
31
+ const getUrl = (context) => {
32
+ const { url } = getRequestOptions(context);
33
+ return url;
34
+ };
35
+ return {
36
+ getUrl,
37
+ httpMethod: 'POST',
38
+ path: '/v1/branches',
39
+ pathParams: {},
40
+ __requestType: null,
41
+ __originalRequestType: null,
42
+ __responseType: null,
43
+ __originalResponseType: null,
44
+ };
45
+ }
46
+ exports.createBranch = createBranch;
47
+ function getBranch() {
48
+ const payload = { branchId: ':branchId' };
49
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.getBranch(payload);
50
+ const getUrl = (context) => {
51
+ const { url } = getRequestOptions(context);
52
+ return url;
53
+ };
54
+ return {
55
+ getUrl,
56
+ httpMethod: 'GET',
57
+ path: '/v1/branches/{branchId}',
58
+ pathParams: { branchId: 'branchId' },
59
+ __requestType: null,
60
+ __originalRequestType: null,
61
+ __responseType: null,
62
+ __originalResponseType: null,
63
+ };
64
+ }
65
+ exports.getBranch = getBranch;
66
+ function updateBranch() {
67
+ const payload = { branch: { id: ':branchId' } };
68
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.updateBranch(payload);
69
+ const getUrl = (context) => {
70
+ const { url } = getRequestOptions(context);
71
+ return url;
72
+ };
73
+ return {
74
+ getUrl,
75
+ httpMethod: 'PATCH',
76
+ path: '/v1/branches/{branch.id}',
77
+ pathParams: { branchId: 'branchId' },
78
+ __requestType: null,
79
+ __originalRequestType: null,
80
+ __responseType: null,
81
+ __originalResponseType: null,
82
+ };
83
+ }
84
+ exports.updateBranch = updateBranch;
85
+ function deleteBranch() {
86
+ const payload = { branchId: ':branchId' };
87
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.deleteBranch(payload);
88
+ const getUrl = (context) => {
89
+ const { url } = getRequestOptions(context);
90
+ return url;
91
+ };
92
+ return {
93
+ getUrl,
94
+ httpMethod: 'DELETE',
95
+ path: '/v1/branches/{branchId}',
96
+ pathParams: { branchId: 'branchId' },
97
+ __requestType: null,
98
+ __originalRequestType: null,
99
+ __responseType: null,
100
+ __originalResponseType: null,
101
+ };
102
+ }
103
+ exports.deleteBranch = deleteBranch;
104
+ function queryBranches() {
105
+ const payload = {};
106
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.queryBranches(payload);
107
+ const getUrl = (context) => {
108
+ const { url } = getRequestOptions(context);
109
+ return url;
110
+ };
111
+ return {
112
+ getUrl,
113
+ httpMethod: 'GET',
114
+ path: '/v1/branches/query',
115
+ pathParams: {},
116
+ __requestType: null,
117
+ __originalRequestType: null,
118
+ __responseType: null,
119
+ __originalResponseType: null,
120
+ };
121
+ }
122
+ exports.queryBranches = queryBranches;
123
+ //# sourceMappingURL=editor-branches-v1-branch-branches.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-branches-v1-branch-branches.meta.js","sourceRoot":"","sources":["../../../../src/editor-branches-v1-branch-branches.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kHAAoG;AAsBpG,SAAgB,YAAY;IAU1B,MAAM,OAAO,GAA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CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA9BD,sCA8BC"}
@@ -0,0 +1,54 @@
1
+ import { EventDefinition, HttpClient } from '@wix/sdk-types';
2
+ import { Branch, BranchCreatedEnvelope, BranchDeletedEnvelope, BranchNonNullableFields, BranchUpdatedEnvelope, BranchesQueryBuilder, UpdateBranch } from './editor-branches-v1-branch-branches.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function createBranch(httpClient: HttpClient): CreateBranchSignature;
7
+ interface CreateBranchSignature {
8
+ /**
9
+ * Creates a branch.
10
+ * If a source branch is not provided, the branch will include a blank website.
11
+ * @param - Branch to be created.
12
+ * @returns Created branch.
13
+ */
14
+ (branch: Branch): Promise<Branch & BranchNonNullableFields>;
15
+ }
16
+ export declare function getBranch(httpClient: HttpClient): GetBranchSignature;
17
+ interface GetBranchSignature {
18
+ /**
19
+ * Retrieves a branch.
20
+ * @param - ID of branch to retrieve.
21
+ * @returns Requested branch.
22
+ */
23
+ (branchId: string): Promise<Branch & BranchNonNullableFields>;
24
+ }
25
+ export declare function updateBranch(httpClient: HttpClient): UpdateBranchSignature;
26
+ interface UpdateBranchSignature {
27
+ /**
28
+ * Updates a branch.
29
+ *
30
+ * `ORIGINAL_BRANCH` types can't be updated.
31
+ * @param - Branch ID.
32
+ * @returns Updated branch.
33
+ */
34
+ (_id: string | null, branch: UpdateBranch): Promise<Branch & BranchNonNullableFields>;
35
+ }
36
+ export declare function deleteBranch(httpClient: HttpClient): DeleteBranchSignature;
37
+ interface DeleteBranchSignature {
38
+ /**
39
+ * Permanently deletes a branch.
40
+ * @param - ID of branch to delete.
41
+ */
42
+ (branchId: string): Promise<void>;
43
+ }
44
+ export declare function queryBranches(httpClient: HttpClient): QueryBranchesSignature;
45
+ interface QueryBranchesSignature {
46
+ /**
47
+ * Retrieves a list of branches, given the specified [paging, filtering, and sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
48
+ */
49
+ (): BranchesQueryBuilder;
50
+ }
51
+ export declare const onBranchCreated: EventDefinition<BranchCreatedEnvelope, "wix.editor.branches.v1.branch_created">;
52
+ export declare const onBranchDeleted: EventDefinition<BranchDeletedEnvelope, "wix.editor.branches.v1.branch_deleted">;
53
+ export declare const onBranchUpdated: EventDefinition<BranchUpdatedEnvelope, "wix.editor.branches.v1.branch_updated">;
54
+ export { ActionEvent, BaseEventMetadata, Branch, BranchCreatedEnvelope, BranchDeletedEnvelope, BranchNonNullableFields, BranchSourceOneOf, BranchUpdatedEnvelope, BranchesQueryBuilder, BranchesQueryResult, CreateBranchRequest, CreateBranchResponse, CreateBranchResponseNonNullableFields, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteBranchRequest, DeleteBranchResponse, DomainEvent, DomainEventBodyOneOf, EditorType, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetBranchRequest, GetBranchResponse, GetBranchResponseNonNullableFields, HtmlSitePublished, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Page, QueryBranchesRequest, QueryBranchesResponse, QueryBranchesResponseNonNullableFields, RestoreInfo, SortOrder, Sorting, SourceBranch, SourceTemplate, SourceType, Type, UpdateBranch, UpdateBranchRequest, UpdateBranchResponse, UpdateBranchResponseNonNullableFields, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, WebhookIdentityType, } from './editor-branches-v1-branch-branches.universal.js';
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.Type = exports.SourceType = exports.SortOrder = exports.EditorType = exports.onBranchUpdated = exports.onBranchDeleted = exports.onBranchCreated = exports.queryBranches = exports.deleteBranch = exports.updateBranch = exports.getBranch = exports.createBranch = exports.__metadata = void 0;
4
+ const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
5
+ const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
6
+ const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
7
+ const sdk_types_1 = require("@wix/sdk-types");
8
+ const editor_branches_v1_branch_branches_universal_js_1 = require("./editor-branches-v1-branch-branches.universal.js");
9
+ exports.__metadata = { PACKAGE_NAME: '@wix/editor-branches' };
10
+ function createBranch(httpClient) {
11
+ return (branch) => (0, editor_branches_v1_branch_branches_universal_js_1.createBranch)(branch,
12
+ // @ts-ignore
13
+ { httpClient });
14
+ }
15
+ exports.createBranch = createBranch;
16
+ function getBranch(httpClient) {
17
+ return (branchId) => (0, editor_branches_v1_branch_branches_universal_js_1.getBranch)(branchId,
18
+ // @ts-ignore
19
+ { httpClient });
20
+ }
21
+ exports.getBranch = getBranch;
22
+ function updateBranch(httpClient) {
23
+ return (_id, branch) => (0, editor_branches_v1_branch_branches_universal_js_1.updateBranch)(_id, branch,
24
+ // @ts-ignore
25
+ { httpClient });
26
+ }
27
+ exports.updateBranch = updateBranch;
28
+ function deleteBranch(httpClient) {
29
+ return (branchId) => (0, editor_branches_v1_branch_branches_universal_js_1.deleteBranch)(branchId,
30
+ // @ts-ignore
31
+ { httpClient });
32
+ }
33
+ exports.deleteBranch = deleteBranch;
34
+ function queryBranches(httpClient) {
35
+ return () => (0, editor_branches_v1_branch_branches_universal_js_1.queryBranches)(
36
+ // @ts-ignore
37
+ { httpClient });
38
+ }
39
+ exports.queryBranches = queryBranches;
40
+ exports.onBranchCreated = (0, sdk_types_1.EventDefinition)('wix.editor.branches.v1.branch_created', true, (event) => (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(event, [
41
+ {
42
+ transformFn: timestamp_1.transformRESTTimestampToSDKTimestamp,
43
+ paths: [
44
+ { path: 'entity.createdDate' },
45
+ { path: 'entity.updatedDate' },
46
+ { path: 'metadata.eventTime' },
47
+ ],
48
+ },
49
+ ])))();
50
+ exports.onBranchDeleted = (0, sdk_types_1.EventDefinition)('wix.editor.branches.v1.branch_deleted', true, (event) => (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(event, [
51
+ {
52
+ transformFn: timestamp_1.transformRESTTimestampToSDKTimestamp,
53
+ paths: [
54
+ { path: 'entity.createdDate' },
55
+ { path: 'entity.updatedDate' },
56
+ { path: 'metadata.eventTime' },
57
+ ],
58
+ },
59
+ ])))();
60
+ exports.onBranchUpdated = (0, sdk_types_1.EventDefinition)('wix.editor.branches.v1.branch_updated', true, (event) => (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(event, [
61
+ {
62
+ transformFn: timestamp_1.transformRESTTimestampToSDKTimestamp,
63
+ paths: [
64
+ { path: 'entity.createdDate' },
65
+ { path: 'entity.updatedDate' },
66
+ { path: 'metadata.eventTime' },
67
+ ],
68
+ },
69
+ ])))();
70
+ var editor_branches_v1_branch_branches_universal_js_2 = require("./editor-branches-v1-branch-branches.universal.js");
71
+ Object.defineProperty(exports, "EditorType", { enumerable: true, get: function () { return editor_branches_v1_branch_branches_universal_js_2.EditorType; } });
72
+ Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return editor_branches_v1_branch_branches_universal_js_2.SortOrder; } });
73
+ Object.defineProperty(exports, "SourceType", { enumerable: true, get: function () { return editor_branches_v1_branch_branches_universal_js_2.SourceType; } });
74
+ Object.defineProperty(exports, "Type", { enumerable: true, get: function () { return editor_branches_v1_branch_branches_universal_js_2.Type; } });
75
+ Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return editor_branches_v1_branch_branches_universal_js_2.WebhookIdentityType; } });
76
+ //# sourceMappingURL=editor-branches-v1-branch-branches.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-branches-v1-branch-branches.public.js","sourceRoot":"","sources":["../../../../src/editor-branches-v1-branch-branches.public.ts"],"names":[],"mappings":";;;AAAA,oFAAkG;AAClG,0EAAkG;AAClG,sFAAkF;AAClF,8CAA6D;AAC7D,uHAa2D;AAE9C,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEnE,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,MAAc,EAAE,EAAE,CACxB,IAAA,8DAAqB,EACnB,MAAM;IACN,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oCAOC;AAYD,SAAgB,SAAS,CAAC,UAAsB;IAC9C,OAAO,CAAC,QAAgB,EAAE,EAAE,CAC1B,IAAA,2DAAkB,EAChB,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,8BAOC;AAWD,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,GAAkB,EAAE,MAAoB,EAAE,EAAE,CAClD,IAAA,8DAAqB,EACnB,GAAG,EACH,MAAM;IACN,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,oCAQC;AAeD,SAAgB,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,QAAgB,EAAE,EAAE,CAC1B,IAAA,8DAAqB,EACnB,QAAQ;IACR,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,oCAOC;AAUD,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,GAAG,EAAE,CACV,IAAA,+DAAsB;IACpB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAND,sCAMC;AASY,QAAA,eAAe,GAAG,IAAA,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